Skip to main content
gamedev.net
🔒 Locked

Stencil Buffer reflections

Started by riksweeney Aug 27, 2006 at 1:20 PM 1 replies 450+ views
Original Post
riksweeney
riksweeney
Hi, I'm having a few problems with my Stencil Buffer reflections. Basically, I've made my platform reflective aswell as the floor below it. The 1st problem is that I have a yellow cube below my platfrom and I can see it through through the platform:
The second problem is that the blue cube is above the platform and is being reflected in both the platform and the floor (it should only be being reflected in the platform):
Does anyone know what I can do to solve either of these problems? Thanks Richard
torakka
torakka
Hi. Allow drawing of the "reflected" fragments only where there is something to reflect from. One feasible way is to draw the floor into stencil plane and use stencil test to pass only fragments overlapping the floor.
Centurion
Centurion
I have no idea why yellow cube is can be seen trough platform, try disabling mirror and see if yellow cube still appears. About blue cube - there is no way i know doing that grapically, when you drawing mirror image what you really do is inverse world around mirror plane and draw it, so the solution would be to draw only that part of world in mirror image, that can be seen from it. You should remove polygons programmaticaly or use clip planes for that

Topic Locked

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

Sign in to reply to this topic.