First Pass: Planar Reflections


The left-most image above is from my first pass at adding planar reflections to the game board top surface. There are lot of good sources on how to implement planar reflections, but my go to was the book Real-Time Rendering: Third Edition (RTR) (Note: The fourth edition of Real-Time Rendering is currently available as well) -- RTR Chapter 9: Global Illumination, Section 9.3.1 describes planar reflections. If you're looking for code + description for planar reflections, you can also check out RasterTek Tutorial 27: Reflection. The approach I followed to implement reflections was to first render the scene from the position of the camera reflected over the reflection plane in one pass (see the right-most image above) and then use the resulting texture when rendering the game board in order to look up the reflection value for each pixel being rendered. The image at the top represents performing an additive blend of the reflection value; however, I'll be switching it to linear interpolation because interpolation is more accurate for a mirror reflection. Also, the size of the reflection render target is low resolution (512 x 512), so aliasing (jagged edges) is fairly noticeable on the final image and needs to be corrected. Anyway, I plan to revisit reflections when I switch to physically-based rendering (RTR Chapter 7: Advanced Shading) so definitely stay tuned.

Get Peg Puzzle

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.