0
\$\begingroup\$

How do I render 2 reflective surfaces, Example a mirror, face each other? To render a single surface I would use a cube map by rendering from the object on six directions.

But to render 2 surfaces it is becoming a paradox on which one to render first! Can anyone gimme a spark?

https://learnopengl.com/#!Advanced-OpenGL/Cubemaps

I used this tutorial

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

There aren't many options for this:

  1. Use the previous frame's rendering result in a feed-back loop, initialize with black, or transparent, or a fake reflection texture
  2. Same as 1 but render a few extra times quickly within 1 frame to reduce reflection lag
  3. Use pure ray-tracing with a limit on ray bounces

Number 3 is impractical in most situations.

\$\endgroup\$
3
  • \$\begingroup\$ Oh..anyway. how ue4 accomplish it? \$\endgroup\$ Commented Jan 22, 2017 at 18:58
  • 2
    \$\begingroup\$ You'll have to create a new question for this. \$\endgroup\$ Commented Jan 22, 2017 at 20:26
  • \$\begingroup\$ @YashwanthCB Surely not 3, so it must be 1 or 2. The difference is not that big. \$\endgroup\$ Commented Jan 22, 2017 at 20:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .