Render depth to texture suffering Moiré pattern artefact

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Render depth to texture suffering Moiré pattern artefact

Post by robmar »

I´m rendering the scene depth to a RTT using the standard shader method to get a greyscale of the depth.

If I use it rendering to the standard frame buffer it works perfectly.

But if I render it to a RTT then I see this sort of moiré pattern, a splattering of pixels that have a very high depth level that move together as I spin the view or model.

I´ve spent hours going through everything but can´t find why the same shader used on an RTT causes this artefact.

Is this a known issue?
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Re: Render depth to texture suffering Moiré pattern artefact

Post by vectorcorpse »

did u create a 32 bit float texture for the RTT and pass the data has float? if not u'll lose depth resolution since only int's will get stored on the texture.
robmar
Posts: 1125
Joined: Sun Aug 14, 2011 11:30 pm

Re: Render depth to texture suffering Moiré pattern artefact

Post by robmar »

Yes exactly, that worked well!
Post Reply