If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
![]() |
|
|
#1 |
|
Registered
Join Date: Apr 2012
Posts: 3
|
Hi,
I'm wondering if anyone can give me some advice. I am trying to implement mirror relfection for planar surfaces (glass tables, polished wood floors and so on) on the iPad. How to do this? My current thinking is to render the reflector first, use that as a stencil, then render the scene normally, and afterwards the scene mirrored by the reflector plane and using the stencil. Straightforward, but is it the fastest way? I'm a bit new to this, so any help is really appreciated |
|
|
|
|
|
#2 |
|
Darlek ******
Join Date: Jun 2004
Posts: 9,486
|
cube environment map maybe ?
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™ |
|
|
|
|
|
#3 | |
|
Moderator
Join Date: Feb 2002
Location: Taiwan
Posts: 2,346
|
Quote:
However, if you have performance problem you may want to render it with a reduced resolution, although I'm not familiar enough with iPad's GPU to know if it worth the effort. |
|
|
|
|
|
|
#4 |
|
Darlek ******
Join Date: Jun 2004
Posts: 9,486
|
Was my idea, bad ?
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™ |
|
|
|
|
|
#5 |
|
Moderator
Join Date: Feb 2002
Location: Taiwan
Posts: 2,346
|
|
|
|
|
|
|
#6 |
|
Now Officially a Top 10 Poster
Join Date: May 2006
Location: Maastricht, The Netherlands
Posts: 12,879
|
Can you use a (transform of) the previous framebuffer?
|
|
|
|
|
|
#7 |
|
Darlek ******
Join Date: Jun 2004
Posts: 9,486
|
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™ |
|
|
|
|
|
#8 |
|
Registered
Join Date: Apr 2012
Posts: 3
|
Not sure. I guess that would make it a screen-space method? There are probably a number of subleties involved even if you look at the reflector from the side.
I've heard that some commercial engines have something like that (UE3??) |
|
|
|
|
|
#9 |
|
Registered
Join Date: Apr 2012
Posts: 3
|
Very nice
|
|
|
|
|
|
#10 |
|
Darlek ******
Join Date: Jun 2004
Posts: 9,486
|
ps: if you want it
http://www.nvidia.com/object/cool_st...ml#!/demos/601
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™ |
|
|
|
|
|
#11 | |
|
Tea maker
Join Date: Feb 2002
Location: In the Island of Sodor, where the steam trains lie
Posts: 4,379
|
Quote:
__________________
"Your work is both good and original. Unfortunately the part that is good is not original and the part that is original is not good." -(attributed to) Samuel Johnson "I invented the term Object-Oriented, and I can tell you I did not have C++ in mind." Alan Kay |
|
|
|
|
|
|
#12 | |
|
Now Officially a Top 10 Poster
Join Date: May 2006
Location: Maastricht, The Netherlands
Posts: 12,879
|
Quote:
I'm just guessing though based on stuff I read on these boards. No idea if that kind of thing could end up expensive on the iPad or if there are cheaper ways to do it. |
|
|
|
|
|
|
#13 | |
|
Member
Join Date: Dec 2005
Posts: 2,089
|
Quote:
@subsym depends on what youre doing a single surface eg floor, I'ld use it its straight forward and gives nearperfect results, perhaps use a scaling matrix also so the reflections are squashed (or elongated). the powervr gpu doesnt like it when you start doing different texture coordinates in the fragment shader (way slower than a desktop GPU from my testing), so screenbased stuff will prolly be slow
__________________
stalk me on twitter |
|
|
|
|
![]() |
| Tags |
| ios, opengl, relfections |
| Thread Tools | |
| Display Modes | |
|
|