I’m trying to implement deferred lighting and I have done the first and second pass but I’m stuck on the third as I don’t know how to map from the current pixel being drawn to the generated texture with the light.
Generated texture with light calculated
Current picture
I would appreciate it if someone could help me figure out how to map my generated texture with the current pixel I’m drawing.
I don’t know if it matters, but I’m working with DirectX but an explantion with OpenGL would also be welcomed.