Is posible to use this technique with deferred lighting?
Answer
What does the projected texture represent? Projective texturing is a means of generating texture coordinates from vertex positions, to make it appear that the texture is projected over the scene like a film projector.
Can you still do these computations in deferred rendering? Yes. But when and how you do it depends on what the values in the texture represent?
Projective textures are often used to represent things like flashlights. In which case, the texel values are light intensities. And that means you need to do the projection during the lighting pass. Once you reconstruct the position of the particular screen pixel, just do the usual projection computation.
If the projective texture alters the albedo (diffuse reflectance, or diffuse color) of the object, then this must be done in the G-buffer pass. There, you can do the projection computations per-fragment or per-vertex, but you'll get better results per-fragment.
No comments:
Post a Comment