2021-08-25 12:32:22 +00:00
|
|
|
#version 330 core
|
|
|
|
|
2021-08-26 20:51:46 +00:00
|
|
|
layout(location = 0) out vec4 outGBuffer0;
|
|
|
|
layout(location = 1) out vec4 outGBuffer1;
|
|
|
|
layout(location = 2) out vec4 outGBuffer2;
|
2021-08-25 12:32:22 +00:00
|
|
|
|
|
|
|
in vec3 normalVS;
|
|
|
|
|
2021-08-26 20:51:46 +00:00
|
|
|
const float CHROME_METALNESS = 1.0;
|
|
|
|
const float CHROME_ROUGHNESS = 0.1;
|
|
|
|
|
2021-08-25 12:32:22 +00:00
|
|
|
vec2 encodeNormal(vec3 n);
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2021-08-26 20:51:46 +00:00
|
|
|
outGBuffer0.rg = encodeNormal(normalVS);
|
|
|
|
outGBuffer0.b = CHROME_ROUGHNESS;
|
|
|
|
outGBuffer0.a = 1.0;
|
|
|
|
outGBuffer1.rgb = vec3(1.0);
|
|
|
|
outGBuffer1.a = CHROME_METALNESS;
|
|
|
|
outGBuffer2.rgb = vec3(0.0);
|
|
|
|
outGBuffer2.a = 1.0;
|
2021-08-25 12:32:22 +00:00
|
|
|
}
|