/usr/share/sludge/fixScaleSprite.frag is in sludge-engine 2.2.1-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | uniform sampler2D tex0;
uniform sampler2D tex1;
uniform sampler2D tex2;
uniform bool useLightTexture;
varying vec2 varCoord0;
varying vec2 varCoord1;
varying vec2 varCoord2;
varying vec4 color;
varying vec4 secondaryColor;
void main()
{
vec4 texture = texture2D (tex0, varCoord0);
vec4 texture2 = texture2D (tex2, varCoord2);
vec3 col;
if (useLightTexture) {
vec4 texture1 = texture2D (tex1, varCoord1);
col = texture1.rgb * texture.rgb;
} else {
col = color.rgb * texture.rgb;
}
col += vec3(secondaryColor);
vec4 color = vec4 (col, color.a * texture.a);
col = mix (texture2.rgb, color.rgb, color.a);
gl_FragColor = vec4 (col, max(texture.a, texture2.a));
}
|