Update leenkx/Shaders/compositor_pass/compositor_pass.frag.glsl

This commit is contained in:
LeenkxTeam 2025-04-07 21:14:52 +00:00
parent 2bc2ab43a1
commit 4805dd06a7

View File

@ -625,4 +625,37 @@ fragColor.rgb = min(fragColor.rgb, 65504 * 0.5);
#ifdef _CLUT #ifdef _CLUT
fragColor = LUTlookup(fragColor, lutTexture); fragColor = LUTlookup(fragColor, lutTexture);
#endif #endif
#ifdef _CDitheringBlueNoise
const float ditherStrength = ditherStrengthValue / 255.0;
float noise = ditherBlueNoiseStyle(gl_FragCoord.xy);
float noiseOffset = (noise - 0.5) * ditherStrength;
fragColor.rgb += noiseOffset;
#endif
#ifdef _CDitheringWhiteNoise
const float ditherStrength = ditherStrengthValue / 255.0;
float noise = ditherWhiteNoise(gl_FragCoord.xy);
float noiseOffset = (noise - 0.5) * ditherStrength;
fragColor.rgb += noiseOffset;
#endif
#ifdef _CDitheringOrderedBayer4x4
const float ditherStrength = ditherStrengthValue / 255.0;
float noise = ditherOrderedBayer4x4(ivec2(gl_FragCoord.xy));
float noiseOffset = (noise - 0.5) * ditherStrength;
fragColor.rgb += noiseOffset;
#endif
#ifdef _CDitheringOrderedBayer8x8
const float ditherStrength = ditherStrengthValue / 255.0;
float noise = ditherOrderedBayer8x8(ivec2(gl_FragCoord.xy));
float noiseOffset = (noise - 0.5) * ditherStrength;
fragColor.rgb += noiseOffset;
#endif
//fragColor.rgb = clamp(fragColor.rgb, 0.0, 1.0);
} }