22 lines
440 B
GLSL
22 lines
440 B
GLSL
#version 430
|
|
|
|
uniform vec3 La;
|
|
|
|
layout (binding=0) uniform sampler2D DiffuseTexture;
|
|
layout (binding=1) uniform sampler2D LightingTexture;
|
|
|
|
in VertexData
|
|
{
|
|
vec3 Position;
|
|
vec2 TextureCoord;
|
|
} Input;
|
|
|
|
out vec4 FragmentColor;
|
|
|
|
void main()
|
|
{
|
|
vec4 DiffuseTexel = texture(DiffuseTexture, Input.TextureCoord);
|
|
vec4 LightingTexel = texture(LightingTexture, Input.TextureCoord);
|
|
|
|
FragmentColor = DiffuseTexel * vec4(La, 1.0) + LightingTexel;
|
|
} |