Download

Flipping polygons direction with vertex shader

I need to flip polygons direction with shader any ideas how to do that ?
Please dont tell me about using 2 sided material I dont want any extra geometry.

The direction, where polygon is facing, is not related to normals. Use 2 sided material.

Using two sided material does not add any extra geometry. It just disabled backface culling. Backface culling is based on triangle winding and does not use vertex normals.

Ok right. Anyway is not free and i need to use it for landscape with tessellation so it may cost a lot.
So is there any way to flip polygon direciton with shader ?

Could be possible to use RotateAboutAxis and use every vertex as pivot point ?

No. There isn’t.

Two sided rendering does not increase vertex shader or tesselation cost at all. It only increase pixel shader cost when landscape backface is rendered but later front faces is rendered top of these pixels. But for landscape this is usually very small problem and these pixels are also rejected by early depth test most of the time.

That makes sense, Thanks.
What about using POM on 2 sided mesh, would it generate extra cost?