Flickering edge with RenderTargetTexture

Hello guys!

I’m back with another question :slight_smile:

So I came across this nice playground (https://www.babylonjs-playground.com/#1WROZH#158) created by @Wingnut, and I’ve noticed that the border of the RenderTargetTexture flickers when the target gets re-rendered. I noticed it by increasing the border width in line #76.

Is there a way of either setting the border or the texture on top of the other? Or is there perhaps some flag for fixing this issue?

Thanks in advance!

Hi there I did some playing around with it.
Kind of a hack quick fix by setting the visibility to 0.99 perhaps wingnut might be able to explain further :slight_smile:

1 Like

Hmm… that’s weird :sweat_smile: But it solves it :slight_smile: Thanks!

1 Like

It is some z-fighting between the plane and the edge lines. You can disable the depth writing for the plane to fix the problem:

https://www.babylonjs-playground.com/#1WROZH#161

2 Likes