Skip to main content
edited title
Link
kochol
  • 182
  • 6

View space Speed up lighting in deferred shading

Source Link
kochol
  • 182
  • 6

View space lighting in deferred shading

I implemented a simple deferred shading renderer. I use 3 G-Buffer for storing position (R32F), normal (G16R16F) and albedo (ARGB8). I use sphere map algorithm to store normals in world space. Currently I use inverse of view * projection matrix to calculate the position of each pixel from stored depth value.

  1. First I want to avoid per pixel matrix multiplication for calculating the position. Is there another way to store and calculate position in G-Buffer without the need of matrix multiplication
  2. Store the normal in view space

Every lighting in my engine is in world space and I want do the lighting in view space to speed up my lighting pass.

I want an optimized lighting pass for my deferred engine.