Hacker News new | past | comments | ask | show | jobs | submit login
Screen Space Reflection (zznewclear13.github.io)
85 points by ibobev 9 months ago | hide | past | favorite | 11 comments




MDK2 on the Dreamcast did render-to-texture to do mirrors.

https://youtu.be/-nVw_q3yEA4?t=210

The PC version lacked all R2T effects. The developers went with "Chaotic Insane", and replaced the mirrors with a colored noise texture, adding a sign saying, "Your reflection is not available at this time --Management".

https://youtu.be/xuONTSKjfNE?t=259

On a related note, R2T was also used in a cutscene. A video broadcast used R2T on the Dreamcast, and on other versions they just flattened the character placed it inside the monitor, and tweaked the camera work to try to hide it.

Dreamcast version:

https://youtu.be/-nVw_q3yEA4?t=14

PC version:

https://youtu.be/xuONTSKjfNE?t=15


I never understood why render to texture looks so bad in mirrors if it works so good in Portal (not a reflection but it seems like the same problem?)

Isn't it just a matter of properly calculating the camera position/frustum so that it is perspective-correct? Portal has the same issue[0] until you properly position the camera.

What makes reflections different?

[0] https://m.youtube.com/watch?v=NGeZCAi2bJs 2:50, 4:05, 5:06, 6:58


Portal does not render to texture, it just renders different content, making use of depth/stencil buffers for masking. This can work for plain mirrors, but the advantage of RTT is that you can sample the texture at arbitrary points, so it can be distorted.


I didn't mean Portal specific implementation but rather the mechanic. Check the video I linked to. Isn't that RTT?


It probably is, but that is a hobbyist implementation. How good RTT looks depends a lot on the resolution, rendering the scene a second time to another high resolution target is not necessarily feasible or justified.


We do love the neutral good one.

https://www.youtube.com/watch?v=g_tRYN6xdvc

Although sometimes it can have results that would better be described as chaotic

https://youtu.be/g5p9X0xYYz8?t=2m20s


I've never seen screen space reflection use ray tracing. That seams to defeat the purpose of doing screen space reflections!

At least in games, they usually just take the rendered image, invert it, and then show it on the reflective surface, with some optional blurring added depending on the surface. It's extremely quick, though certainly has shortcomings.


This is ray marching, not ray tracing. Ray marching takes steps through an implicit surface, in this case the depth buffer, while ray tracing does full ray/triangle intersections.

Games have been doing SSR with ray marching for a decade at least [0]. Just inverting the image would only work on perfectly flat surfaces exactly aligned with the camera.

[0] https://jcgt.org/published/0003/04/04/paper.pdf


Seems*


Typo. I know the difference.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: