Files
OpenRA/glsl/postprocess_chronoshift.frag
let5sne.win10 9cf6ebb986
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled
Initial commit: OpenRA game engine
Fork from OpenRA/OpenRA with one-click launch script (start-ra.cmd)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:46:54 +08:00

16 lines
346 B
GLSL

#version {VERSION}
#ifdef GL_ES
precision mediump float;
#endif
uniform float Blend;
uniform sampler2D SourceTexture;
out vec4 fragColor;
void main()
{
vec4 c = texelFetch(SourceTexture, ivec2(gl_FragCoord.xy), 0);
float lum = 0.5 * (min(c.r, min(c.g, c.b)) + max(c.r, max(c.g, c.b)));
fragColor = mix(c, vec4(lum, lum, lum, c.a), Blend);
}