Using RenderTexture to create reflection make the render "choppy" (code included) #2279
-
Hi,
As you can see in the video, everything works as expected, but the reflected images doesn't move as smoothly as the image above. 2024-12-18.17-28-14.mp4thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 13 replies
-
It's not a bug. The RenderTexture is flipped in the Y axis, so to draw it in the correct orientation you would need to call |
Beta Was this translation helpful? Give feedback.
-
Would it be more efficient to render the entire scene to a |
Beta Was this translation helpful? Give feedback.
-
@rudiHammad Can you try to comment out |
Beta Was this translation helpful? Give feedback.
I just checked the code in your initial post again, and realised that you're not calling
Director::getInstance()->getRenderer()->render();
after therenderTexture->end();
call. That would have been part of what I was referring to, but also the fact that your original code is callingscene->visit()
again.Each loop, the
void Director::mainLoop()
, as the name implies, runs in a loop. Inside this is a call todrawScene();
, which calls_glView->renderScene(_runningScene, _renderer);
. It does the following: