25 lines
725 B
GLSL
25 lines
725 B
GLSL
#version 440
|
|
layout (location = 0) out vec3 gPosition;
|
|
layout (location = 1) out vec3 gNormal;
|
|
layout (location = 2) out vec4 gAlbedoSpec;
|
|
|
|
in vec2 TexCoords;
|
|
in vec3 FragPos;
|
|
in vec3 Normal;
|
|
|
|
//uniform sampler2D texture_diffuse1;
|
|
|
|
void main()
|
|
{
|
|
// store the fragment position vector in the first gbuffer texture
|
|
gPosition = FragPos;
|
|
// also store the per-fragment normals into the gbuffer
|
|
gNormal = normalize(Normal);
|
|
// and the diffuse per-fragment color
|
|
gAlbedoSpec.rgb = vec3(1, 1, 1);
|
|
//gAlbedoSpec.rgb = texture(texture_diffuse1, TexCoords).rgb;
|
|
// store specular intensity in gAlbedoSpec's alpha component
|
|
//gAlbedoSpec.a = texture(texture_specular1, TexCoords).r;
|
|
gAlbedoSpec.a = 1;
|
|
}
|