Original Post
Hello there, I'm coding a deferred shading algorythm, for thoses of you not familliar with the subject its simply a way to lighten a scene in image space. Now my problem is not directly related to deferred shading but rater to finding the dimensions of screen aligned quad that would perfectly fit the projection of a sphere in 3D. The sphere is centered on a light position in 3D and its radius is equal to the range of the attenuation of the light. What I tried is to transform the position of the light in view space then, in the same space, create a screen aligned quad using the apropriate radius. But after projection, the quad is not large enough (this works only in ortho projection). It would be easier to understand with a picture, but I dont know how to add one here...
as an example.