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.
- 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
- 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.