Skip to main content
GameDev.net gamedev.net
🔒 Locked

Reflection - one pass approach?

Started by razor1911 Sep 24, 2010 at 5:15 PM 1 replies 1k views
Original Post
razor1911
razor1911
TYPICAL WATER REFLECTION SCENARIO.

My engine today is now a bit 'tide' in FPS, and i cannot allow myself to render the heightmap again clipped -1 to a texture and pass it to a water shader as a reflection texture for a water plane.

So here is the question to all,
is there any method i can use, to generate the reflection texture from a Frame texture (bound to the framebuffer) without rendering the scene _once more_ with a 'clip plane' approach?



Any GLSL trick, or anything ?

many many thanks for any ideas..





ProPuke
ProPuke
To directly answer your question - maybe. But I can't think of any ingenious way of doing it.

What's the slowdown from re-rendering the scene?
If it's polygon or shader complexity then you could render @ a lower lod or skip some details (simplify your lighting to skip specularity & any bump/offset mapping etc).
If it's scene generation then I'd advise generating & storing in vertex arrays, @ least for the frame & reflection, but really you shouldn't be regenerating anything that's changing anyway.

A quick, alternative cheat might be to generate & periodically update a cubemap for use as the reflection.
Obviously you'd lose out on quality, and it's not a suitable solution if there's a lot of dynamic content moving. But if you can get away with a lower resolution reflection, & don't have to update it often it may be suitable.
____ _ ___ ___ __ _`By offloading cognitive load to the computer, programmers are able to design more elegant systems' - Unununium OS regarding Python
razor1911
razor1911
I was just thinking if there is some alternative available for a reflection process,
well - i'll better go and have a test rendering the scene clip-planed offscreen to a texture and see the performance.

Surely i'll drop the details where possible, lodding all to the highest level.

Thanks ProPuke ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.