Is this a feedback loop?

Hello ,

to make an effect of each previous frames slowly fading , I’m am rendering to a texture ,

Not using glClear() , instead with glBlendEquation set to REVEVRSE_SUBSTRACT, I draw a quad over and play with the opacity.

This works on my laptop GTX 1060 MQ, but when laptop goes in eco mode (egpu) the renderered is trashed, full of garbage data.

My problem is the final hardware will be using AMD’s Vega 8, wich render’s the same grabage .

I found this section “Feedback_Loops” in the wiki: Framebuffer_Object#Feedback_Loops,

is it my problem ? what is my alternative ?

image

thanks

A feedback loop is when a texture is used as both source and destination for a rendering operation (draw call). I.e. if the texture is bound to a texture unit which is accessible by the fragment shader and also bound to the current framebuffer object.

It isn’t necessary for the fragment shader to actually sample the texture. The fact that it can sample the texture (a sampler uniform references the texture unit to which the texture is bound) is sufficient.

See the tail end of the wiki page section you linked to (Framebuffer_Object#Feedback_Loops). In particular:

Alternatively, duplicate the resource so you’re not reading/writing the same render target, use multipass, or take full responsibility for write side effect synchronization using Image Load/Store or Compute Shaders. There may be other options depending on the specifics of your problem.

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