port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
uniform sampler2D tex;
uniform sampler3D gammaRamp;
uniform float blurType;
uniform float blurAmount;
void main()
{
vec2 p = gl_TexCoord[0].xy;
vec4 blur = ( texture2DLod(tex, p, 7.0)
+ texture2DLod(tex, p, 6.0)
+ texture2DLod(tex, p, 5.0)
+ texture2DLod(tex, p, 4.0)
+ texture2DLod(tex, p, 3.0)
+ texture2DLod(tex, p, 2.0)
+ texture2DLod(tex, p, 1.0)) * vec4(0.142857); /* 1/7 */
vec4 center = texture2D(tex, p);
vec4 blurred = (vec4(1.0) - (vec4(1.0) - blur) * (vec4(1.0) - center));
vec4 blurred2 = blurred * mix( blurred, vec4(1.0), blurType);
vec4 uncorrected = mix(center, blurred2, blurAmount);
/* gamma correction */
gl_FragColor = texture3D(gammaRamp, uncorrected.xyz);
}