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\$
4
\$\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\$
  • \$\begingroup\$ Oh..anyway. how ue4 accomplish it? \$\endgroup\$ – Yashwanth CB Jan 22 '17 at 18:58
  • 2
    \$\begingroup\$ You'll have to create a new question for this. \$\endgroup\$ – Stephane Hockenhull Jan 22 '17 at 20:26
  • \$\begingroup\$ @YashwanthCB Surely not 3, so it must be 1 or 2. The difference is not that big. \$\endgroup\$ – HolyBlackCat Jan 22 '17 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.