From cff6321de946ae2688e10da1d1d4c119925eb0ca Mon Sep 17 00:00:00 2001 From: Skal Fate <20464880+skalfate@users.noreply.github.com> Date: Thu, 15 Nov 2018 19:08:14 -0700 Subject: [PATCH] NSMBU Proper Float Casting (#270) * Update 70b82af4d17024d2_0000000000000000_vs.txt * Update ec4a85d51e778437_0000000000000000_vs.txt --- .../70b82af4d17024d2_0000000000000000_vs.txt | 7 ++++--- .../ec4a85d51e778437_0000000000000000_vs.txt | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/NewSuperMarioBrosU_Resolution/70b82af4d17024d2_0000000000000000_vs.txt b/Source/NewSuperMarioBrosU_Resolution/70b82af4d17024d2_0000000000000000_vs.txt index 2f6cb571..37b3e972 100644 --- a/Source/NewSuperMarioBrosU_Resolution/70b82af4d17024d2_0000000000000000_vs.txt +++ b/Source/NewSuperMarioBrosU_Resolution/70b82af4d17024d2_0000000000000000_vs.txt @@ -1,11 +1,12 @@ - #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_packing : enable // shader 70b82af4d17024d2 -//AA fix -const float resScale = intBitsToFloat($width)/intBitsToFloat($gameWidth); +//AA fix + +const float resScale = float($width)/float($gameWidth); + uniform ivec4 uf_remappedVS[1]; uniform vec2 uf_windowSpaceToClipSpaceTransform; layout(location = 0) in uvec4 attrDataSem0; diff --git a/Source/NewSuperMarioBrosU_Resolution/ec4a85d51e778437_0000000000000000_vs.txt b/Source/NewSuperMarioBrosU_Resolution/ec4a85d51e778437_0000000000000000_vs.txt index b4b86e3c..dbc1618b 100644 --- a/Source/NewSuperMarioBrosU_Resolution/ec4a85d51e778437_0000000000000000_vs.txt +++ b/Source/NewSuperMarioBrosU_Resolution/ec4a85d51e778437_0000000000000000_vs.txt @@ -1,4 +1,3 @@ - #version 420 #extension GL_ARB_texture_gather : enable #extension GL_ARB_separate_shader_objects : enable @@ -6,7 +5,7 @@ // shader ec4a85d51e778437 //box blur fix -const float resScale = intBitsToFloat($width)/intBitsToFloat($gameWidth); +const float resScale = float($width)/float($gameWidth); uniform ivec4 uf_remappedVS[1]; uniform vec2 uf_windowSpaceToClipSpaceTransform; @@ -67,9 +66,9 @@ PS0f = R2f.x + -(intBitsToFloat(uf_remappedVS[0].x) / resScale); backupReg0f = R2f.y; backupReg1f = R2f.x; PV1f.x = R2f.y + -(intBitsToFloat(uf_remappedVS[0].y) / resScale); -R2f.y = backupReg0f + intBitsToFloat(uf_remappedVS[0].y)/resScale; +R2f.y = backupReg0f + intBitsToFloat(uf_remappedVS[0].y) / resScale; R2f.z = PS0f; -R2f.x = backupReg1f + intBitsToFloat(uf_remappedVS[0].x)/ resScale; +R2f.x = backupReg1f + intBitsToFloat(uf_remappedVS[0].x) / resScale; PS1f = R2f.x; // 2 R2f.w = PV1f.x;