Getting World Position from Depth Buffer Value
问题 I've been working on a deferred renderer to do lighting with, and it works quite well, albeit using a position buffer in my G-buffer. Lighting is done in world space. I have tried to implement an algorithm to recreate the world space positions from the depth buffer, and the texture coordinates, albeit with no luck. My vertex shader is nothing particularly special, but this is the part of my fragment shader in which I (attempt to) calculate the world space position: // Inverse projection