Archived

This topic is now archived and is closed to further replies.

Khanh

reflection: by stencil vs by render-to-texture

Recommended Posts

Well, stencil will generally be cheaper I''d imagine, but the primary reason people use render-to-texture is so that the reflection can be rippled (using either per-pixel dependent reads, or per-vertex perturbed uvs). To do this, you obviously need to be able to feed the reflection in as a texture to another pass (fullscreen, or water surface), hence the need for render-to-texture. Also, in this same pass you can add in fresnel terms, sun lighting etc.

So, if you want funky looking water like in HL2 etc, then go for render-to-texture. But if you just want a flat mirror reflection, then go for stencil.

HTH

Matt Halpin

Share this post


Link to post
Share on other sites