+ | Shader class system better working

This commit is contained in:
TheRedShip
2025-02-13 00:28:20 +01:00
parent a71529312b
commit 6e3b0c44eb
11 changed files with 402 additions and 213 deletions

View File

@ -2,8 +2,9 @@
in vec2 TexCoords;
out vec4 FragColor;
uniform sampler2D screenTexture;
layout (binding = 0, rgba32f) uniform image2D screenTexture;
void main() {
FragColor = texture(screenTexture, TexCoords);
FragColor = imageLoad(screenTexture, ivec2(gl_FragCoord.xy));
// FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}

View File

@ -2,7 +2,7 @@ hitInfo traceRay(inout Ray ray);
vec3 GetEnvironmentLight(Ray ray)
{
return vec3(0.);
// return vec3(0.);
vec3 sun_pos = vec3(-0.5, 0.5, 0.5);
float SunFocus = 1.5;
float SunIntensity = 1.;