more tweaks

This commit is contained in:
Alug committed 2024-07-08 20:42:38 +02:00
1 parent c152799295
commit b9db67bc08
1 file changed
+5 -5
+5 -5
View File
@@ -72,9 +72,9 @@
"if (scr_resolution.y > 720.0) {\n" \
"halfResolutiony = scr_resolution.y * 0.5;\n" \
"}\n" \
"float zFactor = clamp((z - 768.0) / (3072.0 - 768.0), 0.0, 1.0);\n" \
"halfResolutionx = mix(halfResolutionx, halfResolutionx * 4.0, zFactor);\n" \
"halfResolutiony = mix(halfResolutiony, halfResolutiony * 4.0, zFactor);\n" \
"float zFactor = clamp((z - 768.0) / (6144.0 - 768.0), 0.0, 1.0);\n" \
"halfResolutionx = mix(halfResolutionx, halfResolutionx * 2.0, zFactor);\n" \
"halfResolutiony = mix(halfResolutiony, halfResolutiony * 2.0, zFactor);\n" \
"vec2 normalizedPosition = position * vec2(halfResolutionx / scr_resolution.x, halfResolutiony / scr_resolution.y);\n" \
"int x = int(mod(normalizedPosition.x, 4.0));\n" \
"int y = int(mod(normalizedPosition.y, 4.0));\n" \
@@ -85,9 +85,9 @@
"15.0, 7.0, 13.0, 5.0\n" \
");\n" \
"#ifdef SRB2_PALETTE_RENDERING\n" \
"float threshold = bayerMatrix[y*4 + x] / 11.0;\n" \
"float threshold = (1.0 - pow(zFactor, 2.0)) * (bayerMatrix[y*4 + x] / 11.0);\n" \
"#else\n" \
"float threshold = bayerMatrix[y*4 + x] / 16.0;\n" \
"float threshold = (1.0 - pow(zFactor, 2.0)) * (bayerMatrix[y*4 + x] / 16.0);\n" \
"#endif\n" \
"return mix(baseValue + threshold - 0.5 / 16.0, baseValue, zFactor);\n"