Screen Space Local Reflections

Local reflection in the screenspace. This is a minimal example, it can be extended, for example to make a mask of the intensity of reflections, blur, antialising, etc.

Pros: does not require the creation of additional cameras. You can use g-buffer, already created for other purposes (such as deferred lighting). Performance is almost independence of the scene complexity. Works with autoshaders.

Cons: Multiple artifacts – you need to mask them somehow (possible blur). Reflect only what is seen on the screen. “Voracious” raytrace algorythm.

I have included two version of shader in the source code. They are a bit different in the raytrace cycle. The difference will be noticable while distancing the camera.

sslr

Source (updated to v2)

Advertisements
This entry was posted in Tutorials. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s