This commit is contained in:
Branimir Karadžić
2023-09-30 15:49:11 -07:00
parent 2a9791506b
commit 8abb775f45
2 changed files with 3 additions and 3 deletions

View File

@@ -11,6 +11,6 @@ IMAGE2D_RW(i_light, rgba8, 2);
void main()
{
ivec2 coord = ivec2(gl_FragCoord.xy);
imageStore(i_light, coord, vec4(0.0, 0.0, 0.0, 0.0) );
ivec2 coord = ivec2(gl_FragCoord.xy);
imageStore(i_light, coord, vec4(0.0, 0.0, 0.0, 0.0) );
}

View File

@@ -32,7 +32,7 @@ void main()
vec3 view = mul(u_view, vec4(wpos, 0.0) ).xyz;
view = -normalize(view);
ivec2 coord = ivec2(gl_FragCoord.xy);
ivec2 coord = ivec2(gl_FragCoord.xy);
vec3 lightColor = calcLight(wpos, normal, view, u_lightPosRadius[0].xyz, u_lightPosRadius[0].w, u_lightRgbInnerR[0].xyz, u_lightRgbInnerR[0].w);
vec4 color = imageLoad(i_light, coord);