- Home /
Drawing ice sheets on terrain: Z-fighting
I want to make a weapon that can freeze terrain and make it slippery. To do this I instantiate thin, flat cylinders with an ice texture and a slippery physics material. I am instantiating it slightly above the terrain itself (around 0.01 units above the terrain). The problem is that you can't see the ice a lot of the time, and when you can, it flickers a lot.
How would I fix the z fighting?
Answer by Meltdown · Jan 17, 2013 at 03:14 PM
You can't 'fix' the z-fighting, if the sheets are all at the same height the graphics card won't know what to draw and in what order.
You will need an offset for each sheet. So for each sheet you instantiate simply increment its height by 0.01 units or whatever stops the z-fighting.
Seems like he mentioned that he's already offsetting it.
They need to be offset from each other, and probably more further off the ground if the planes and the ground are z-fighting.
Answer by GambinoInd · Apr 27, 2013 at 02:41 AM
You might want to try projecting it onto the terrain using a projector. Using a 3D cylinder you might need to increase the offset a little bit more than 0.01.
Your answer
Follow this Question
Related Questions
Make a simple tree 1 Answer
How to get Terrain to respect shader offset 0 Answers
How would I go about blending Noise? 1 Answer
C#: Generate Raw File from byte[]? 1 Answer
Realtime shadows iOS 0 Answers