mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
18 lines
474 B
GLSL
18 lines
474 B
GLSL
#version 330 core
|
|
layout (location = 0) out vec3 gPosition;
|
|
layout (location = 1) out vec3 gNormal;
|
|
layout (location = 2) out vec3 gAlbedo;
|
|
|
|
in vec2 TexCoords;
|
|
in vec3 FragPos;
|
|
in vec3 Normal;
|
|
|
|
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
|
|
gAlbedo.rgb = vec3(0.95);
|
|
} |