REVIEWED: Ligthmap example

This commit is contained in:
Ray 2023-05-04 20:35:20 +02:00
commit 5573f0f1c7

View file

@ -1,4 +1,5 @@
#version 330
// Input vertex attributes (from vertex shader)
in vec2 fragTexCoord;
in vec2 fragTexCoord2;
@ -12,9 +13,11 @@ uniform sampler2D texture1;
// Output fragment color
out vec4 finalColor;
void main() {
// Texel color fetching from texture sampler
vec4 texelColor = texture( texture0, fragTexCoord );
vec4 texelColor2 = texture( texture1, fragTexCoord2 );
finalColor = texelColor * texelColor2;
void main()
{
// Texel color fetching from texture sampler
vec4 texelColor = texture(texture0, fragTexCoord);
vec4 texelColor2 = texture(texture1, fragTexCoord2);
finalColor = texelColor * texelColor2;
}