Arthur Monteiro
Arthur Monteiro

Reputation: 319

Bad result using compute shader

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 : enter image description here

The result of the second example: enter image description here

I don't understand this problem. Thank you for your help ! :)

Upvotes: 0

Views: 115

Answers (1)

Arthur Monteiro
Arthur Monteiro

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

Related Questions