VERSIÓ 1.2.5

- [NEW] Soport bàsic per a shaders.
This commit is contained in:
2025-06-18 13:49:35 +02:00
parent 0cb1296ad3
commit 79781bbed1
5 changed files with 328 additions and 6 deletions

32
data/basic.glsl Normal file
View File

@@ -0,0 +1,32 @@
varying vec2 TEX0;
#if defined(VERTEX)
void main()
{
TEX0 = vec2(gl_MultiTexCoord0.x, 1.0-gl_MultiTexCoord0.y)*1.0001;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
#elif defined(FRAGMENT)
uniform sampler2D Texture;
void main()
{
vec2 winsize = vec2(640.0,480.0);
vec2 pixpos = TEX0 * winsize;
float y = floor(pixpos.y);
if (mod(y,4.0) == 0.0)
{
vec4 color = texture2D(Texture, TEX0);
vec4 blend = vec4(0.8, 0.8, 0.8, 1.0);
gl_FragColor = color * blend;
}
else
{
gl_FragColor = texture2D(Texture, TEX0);
}
}
#endif