mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Framebuffer rendering on quad is now working! 😂
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
@include "light_struct"
|
||||
|
||||
// layout(location = 0) out vec4 fragColor;
|
||||
layout (location = 1) out vec3 fragColor;
|
||||
layout(location = 0) out vec3 fragPosition;
|
||||
layout (location = 1) out vec4 fragColor;
|
||||
layout (location = 2) out vec3 fragNormal;
|
||||
layout (location = 3) out vec3 fragUV;
|
||||
|
||||
in vec3 outPosition;
|
||||
in vec3 outColor;
|
||||
@@ -99,5 +101,8 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
fragColor = vec3(1,1,1);//result;
|
||||
fragPosition = outPosition;
|
||||
fragColor = vec4(result, 1.0);
|
||||
fragNormal = outNormal;
|
||||
fragUV = outUV;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#version 330 core
|
||||
out vec4 FragColor;
|
||||
|
||||
|
||||
in vec2 outTexCoords;
|
||||
|
||||
uniform sampler2D screenTexture;
|
||||
|
||||
void main() {
|
||||
void main() {
|
||||
FragColor = texture(screenTexture, outTexCoords);
|
||||
}
|
||||
Reference in New Issue
Block a user