From 2433b8eb0db55102292359d2d750a7769b0c6607 Mon Sep 17 00:00:00 2001 From: ZZYZX Date: Mon, 16 Dec 2019 01:17:41 +0200 Subject: [PATCH] Removed -f suffixes for floats (not supported on AMD) --- Build/Updater.exe | Bin 192000 -> 192000 bytes Source/Native/ShaderDisplay2D.h | 4 ++-- Source/Native/ShaderPlotter.h | 4 ++-- Source/Native/ShaderThings2D.h | 4 ++-- Source/Native/ShaderWorld3D.h | 20 +++++++++--------- .../VisplaneExplorer/Resources/vpo.dll | Bin 107520 -> 107520 bytes 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Build/Updater.exe b/Build/Updater.exe index 759e77057802c0161e59887162776a5b8a23395e..94ae5f4e3317a7b10a5b9938120e60d7f9ddd0fa 100755 GIT binary patch delta 45 zcmV+|0Mh?}+zWu*3y_Ecy0fv0%1;mj10EL262?rf^W~VU{6QUqWKf4>Pyx4OPy(Et D*bo#R delta 45 zcmV+|0Mh?}+zWu*3y_EcDYCJO%1;m>h#HJfZN5#L&9>i4zRUlEWKf4>Pyx4OPy(Et D 0f) + if (mod(floor(mix(tPos.x, tPos.y, yFrac)), 2.0) > 0.0) discard; } diff --git a/Source/Native/ShaderThings2D.h b/Source/Native/ShaderThings2D.h index 89e867cb..54fbcf0a 100644 --- a/Source/Native/ShaderThings2D.h +++ b/Source/Native/ShaderThings2D.h @@ -12,7 +12,7 @@ static const char* things2D_vs = R"( void main() { - gl_Position = projection * vec4(AttrPosition, 1.0f); + gl_Position = projection * vec4(AttrPosition, 1.0); Color = AttrColor; UV = AttrUV; } @@ -47,7 +47,7 @@ static const char* things2D_ps_sprite = R"( if (Color.a > 0.0) { vec3 cr = desaturate(c.rgb); - FragColor = vec4((cr.r + Color.r) / 2.0f, (cr.g + Color.g) / 2.0f, (cr.b + Color.b) / 2.0f, c.a * rendersettings.w * Color.a); + FragColor = vec4((cr.r + Color.r) / 2.0, (cr.g + Color.g) / 2.0, (cr.b + Color.b) / 2.0, c.a * rendersettings.w * Color.a); } else { diff --git a/Source/Native/ShaderWorld3D.h b/Source/Native/ShaderWorld3D.h index 09e3895c..a7562253 100644 --- a/Source/Native/ShaderWorld3D.h +++ b/Source/Native/ShaderWorld3D.h @@ -161,7 +161,7 @@ static const char* world3D_ps_main = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -190,7 +190,7 @@ static const char* world3D_ps_fullbright = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -236,7 +236,7 @@ static const char* world3D_ps_main_highlight = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -275,7 +275,7 @@ static const char* world3D_ps_fullbright_highlight = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -331,7 +331,7 @@ static const char* world3D_ps_main_fog = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -391,7 +391,7 @@ static const char* world3D_ps_main_highlight_fog = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -415,7 +415,7 @@ static const char* world3D_ps_constant_color = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -437,7 +437,7 @@ static const char* world3D_ps_vertex_color = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; @@ -499,7 +499,7 @@ static const char* world3D_ps_lightpass = R"( lightColorMod.rgb *= df; } - if (lightColor.a > 0.979f && lightColor.a < 0.981f) // attenuated light 98% + if (lightColor.a > 0.979 && lightColor.a < 0.981) // attenuated light 98% lightColorMod.rgb *= diffuseContribution; if (lightColorMod.r <= 0.0 && lightColorMod.g <= 0.0 && lightColorMod.b <= 0.0) @@ -539,6 +539,6 @@ static const char* world3D_ps_skybox = R"( if (FragColor.a < 0.5) discard; #endif - if (fogsettings.x >= 0.0f) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); + if (fogsettings.x >= 0.0) FragColor = mix(FragColor, fogcolor, clamp((-viewpos.z - fogsettings.x) / (fogsettings.y - fogsettings.x), 0.0, 1.0)); } )"; diff --git a/Source/Plugins/VisplaneExplorer/Resources/vpo.dll b/Source/Plugins/VisplaneExplorer/Resources/vpo.dll index e87cb01ee4391a20d7878c38a30960014b4f3cec..4b1c9b8cba566becb95299b906aa1aaeadc2879a 100755 GIT binary patch delta 126 zcmZoT!PansZG!+K)9=mALX6vm7#TO!S^eJpEtUZYn1DD1i1*B5WZ2Wh2ohp|$?*W$ zB0#J#n~_1G874RVUp=D~(5&rJ4UEf}1ePng^f^2{;IQugthGhwL#no4Xkv8X0LhDW IGrp1l06Wqs?f?J) delta 126 zcmZoT!PansZG!+KQ_QAjA;#@OjEtM=tYS8Oi)8=;CLm4$;ytq%8TK?Wf`k}gay&q` z2oNjGW@J!khRIF;SI;N~G;6z51LHC#fgH=zS2@n5dG7qIex|TPN_qQ*CPo(yki1wo H<0}aOHuNMe