Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reflective Shadow Mapping By: Mitchell Allen.

Similar presentations


Presentation on theme: "Reflective Shadow Mapping By: Mitchell Allen."— Presentation transcript:

1 Reflective Shadow Mapping By: Mitchell Allen

2 What is Reflective Shadow Mapping?
Deferred Rendering

3 Shadow Mapping Render from light's POV, grab the depth buffer
Points that pass depth test are lit. Points that fail are larger than recorded depth. Next pass, render scene from camera POV To perform depth tests, transform scene like before. LightCoord = Mbias * Mlightview * Mworld * vertex In fragment shader, perform depth test Get (LightC.x, LightC.y)/LightC.w from depth buffer Compare to value LightC.z / LightC.w (lit if equal)

4 Deferred Rendering Write needed variables to frame buffer textures
Diffuse color, per-pixel normals, world pos/depth Can use unclamped, float textures Perform lighting calculations in final pass Texture a fullscreen quad and read from textures Per-fragment, perform lighting calculations Benefits of using deferred rendering: Only perform calculations for visible pixels Can add many, small lights to a scene

5 Reflective Shadow Maps
Shadow Maps are the depth buffer from the light's POV. Deferred buffers include color, normal, and world position data. Reflective Shadow Maps are all four!

6 Irradiance The “reflective” part involves light bouncing from diffuse surfaces. Uses many, small lights Only illuminated points (visible from light) reflect light (of color light diffuse * point diffuse). Formula involves current normal, position, and color, as well as sampled normal, position, color

7 RenderMonkey Prototype
Using provided models and render targets, I made a rough sample of shadow mapping. There is no diffuse lighting and no light bounces. Currently, it has 8-bit depth precision and uses a power-of-two texture. I plan to use 24-bit precision and rectangular textures (640x480).

8 OBJ File Parser A simple program to load and view OBJ models
OBJ format is very similar to COOR/POLY. Allows integration of arbitrary 3d assets Does ignore provided normals and texcoords


Download ppt "Reflective Shadow Mapping By: Mitchell Allen."

Similar presentations


Ads by Google