Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  transparent flat mirror (help!?)  (Read 329 times)
0 Members and 1 Guest are viewing this topic.
Offline mustang

Jr. Member
**

Posts: 69



« on: 2005-01-19 08:26:02 »

Hi,

I wrote an OpenGL render which renders the opaque objects first, and then transparent objects last. Allowing for them to blend with their background objects.

Then I added the feature to render flat planes as mirrors. I render the mirror objects first before everything else (they have to be first right? there isn't another way?). How: The stencil is rendered, the mirrored copy of the scene is rendered inside the stencil, and then the flat mirror is blended on top to give the effect of a reflective floor or mirror.

Now, I have to support reflection transparent objects that are flat. For example, a glass door or glass dividing wall in a room.

If transparent objects have to be rendered last, but mirrored objects need to be rendered first. Then I have a problem right??

The reason is that drawing the mirrored scene with the depth testing won't work it you do that render pass after the opaque objects were rendered.

Am I making sence? This is hard to explain. Has anyone done flat mirrored reflections that are transparent using the stencil trick?
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.114 seconds with 21 queries.