NSMBU Proper Float Casting (#270)

* Update 70b82af4d17024d2_0000000000000000_vs.txt

* Update ec4a85d51e778437_0000000000000000_vs.txt
This commit is contained in:
Skal Fate 2018-11-15 19:08:14 -07:00 committed by GitHub
parent bb152f6dd0
commit cff6321de9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -1,11 +1,12 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_packing : enable #extension GL_ARB_shading_language_packing : enable
// shader 70b82af4d17024d2 // shader 70b82af4d17024d2
//AA fix //AA fix
const float resScale = intBitsToFloat($width)/intBitsToFloat($gameWidth);
const float resScale = float($width)/float($gameWidth);
uniform ivec4 uf_remappedVS[1]; uniform ivec4 uf_remappedVS[1];
uniform vec2 uf_windowSpaceToClipSpaceTransform; uniform vec2 uf_windowSpaceToClipSpaceTransform;
layout(location = 0) in uvec4 attrDataSem0; layout(location = 0) in uvec4 attrDataSem0;

View File

@ -1,4 +1,3 @@
#version 420 #version 420
#extension GL_ARB_texture_gather : enable #extension GL_ARB_texture_gather : enable
#extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_separate_shader_objects : enable
@ -6,7 +5,7 @@
// shader ec4a85d51e778437 // shader ec4a85d51e778437
//box blur fix //box blur fix
const float resScale = intBitsToFloat($width)/intBitsToFloat($gameWidth); const float resScale = float($width)/float($gameWidth);
uniform ivec4 uf_remappedVS[1]; uniform ivec4 uf_remappedVS[1];
uniform vec2 uf_windowSpaceToClipSpaceTransform; uniform vec2 uf_windowSpaceToClipSpaceTransform;
@ -67,9 +66,9 @@ PS0f = R2f.x + -(intBitsToFloat(uf_remappedVS[0].x) / resScale);
backupReg0f = R2f.y; backupReg0f = R2f.y;
backupReg1f = R2f.x; backupReg1f = R2f.x;
PV1f.x = R2f.y + -(intBitsToFloat(uf_remappedVS[0].y) / resScale); 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.z = PS0f;
R2f.x = backupReg1f + intBitsToFloat(uf_remappedVS[0].x)/ resScale; R2f.x = backupReg1f + intBitsToFloat(uf_remappedVS[0].x) / resScale;
PS1f = R2f.x; PS1f = R2f.x;
// 2 // 2
R2f.w = PV1f.x; R2f.w = PV1f.x;