Lightmap 100 and 120 shaders. Snake and platformer example refining.

This commit is contained in:
jussi
2023-11-16 22:37:28 +02:00
parent 118a1f3a8b
commit 5c8324d25f
8 changed files with 253 additions and 110 deletions

View File

@@ -0,0 +1,20 @@
#version 120
// Input vertex attributes (from vertex shader)
varying vec2 fragTexCoord;
varying vec2 fragTexCoord2;
varying vec3 fragPosition;
varying vec4 fragColor;
// Input uniform values
uniform sampler2D texture0;
uniform sampler2D texture1;
void main()
{
// Texel color fetching from texture sampler
vec4 texelColor = texture2D(texture0, fragTexCoord);
vec4 texelColor2 = texture2D(texture1, fragTexCoord2);
gl_FragColor = texelColor * texelColor2;
}