Add Offscreen Framebuffer support

This commit is contained in:
Thraix
2023-02-05 01:04:07 +01:00
parent 9de2ff594b
commit 708b81c571
25 changed files with 597 additions and 219 deletions
+2 -2
View File
@@ -10,6 +10,6 @@ layout(location = 3) in vec3 fragLightPos;
layout(location = 0) out vec4 outColor;
void main() {
float scale = 0.45 + max(dot(vec3(0, 1, 0), normalize(fragLightPos - fragPosition)), 0.0);
outColor = vec4(fragColor, 1.0) * texture(texSampler, fragTexCoord) * scale;
float scale = 0.45 + max(dot(vec3(0, 1, 0), normalize(fragLightPos - fragPosition)), 0.0);
outColor = vec4(fragColor, 1.0) * texture(texSampler, fragTexCoord) * scale;
}