Why does sampling an image from a frame buffer display rainbow colors?

So, I’ve decided to try to render the results of one render pass as a texture onto the next, when I do that and sample the image, the areas which it doesn’t render to in that original render pass becomes rainbow like colors when displayed as a texture, so why is that?


here’s what it looks like

So, does your code say they should not be a rainbow colors?

No, I am just wondering why when I render the image from the frame buffer of the first renderpass that it’s filling it with this rainbow color in areas it doesn’t draw to. I just find it really strange, and just want to know why it happens.

I decided to take a look in render doc to see what is causing it,

the input looks like what I want:

something in the sampler in the shader is doing something weird, and I don’t know why it would be doing this if it has the color data for the background there.

EDIT: I figured out that I could just make the clear color transparent and it stops, but that still doesn’t answer why it did that rainbow color in the first place

That is not the right question. The question is why it shouldn’t draw rainbow colors? Did you tell the driver not to? If you did not tell it to draw rainbow colors, then what colors did you tell it to draw? Or did you forget to tell it at all, in which case why do you wonder it draws whatever it would like.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.