• Advertisement

Archived

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

reflection: by stencil vs by render-to-texture

This topic is 5218 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I assume the reflection can be done by stencil buffer OR render--to-texture. What is better in your opinion? thanks for your smart idea Khanh

Share this post


Link to post
Share on other sites
Advertisement
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

  • Advertisement