REVIEWED: Ligthmap example
This commit is contained in:
parent
abcbd9817e
commit
5573f0f1c7
1 changed files with 82 additions and 73 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue