Reputation: 319
I made 2 examples of rendering (here I only render traingles with a single texture).
The first uses forward rendering : I simply draw triangles directly to the swapchain with a simple fragment shader:
outColor = vec4(texture(texAlbedo, fragTexCoord).rgba);
The second uses deferred shading : a first pass draw the scene with the texture and a second pass copy the result pixels to another texture. The second pass only uses a compute shader.
imageStore(resultImage, ivec2(gl_GlobalInvocationID.xy), vec4(albedo.bgr, 1.0));
I think both results should be the same but the second get rendering problems.
The result of the first example :
The result of the second example:
I don't understand this problem. Thank you for your help ! :)
Upvotes: 0
Views: 115
Reputation: 319
Thank you for your responses. The problem was that in the second example, I was creating image views without mipmap levels.
Upvotes: 1