cpsmusic
01-19-2006, 07:24 AM
Hi,
I'm having a problem with texture alignment.
I've got a large textured wall that has a lamp on it. When the lamp is off everything is ok. When the lamp is on, I need to display a lightmap around the lamp. I've done this as follows:
When the lamp is on, I draw a quad around the lamp (slightly offset from the wall), and then apply the wall's texture and then the lightmap.
I've managed to get this working, however due to the position of the lamp, the texture applied to the lightmap's quad doesn't align with those on the wall surrounding it.
Is there some way to draw the texture from, say, halfway along one axis to 1 1/2 times along the same axis?
Unfortunately, moving the lamp is not an option.
Cheers,
Chris
I'm having a problem with texture alignment.
I've got a large textured wall that has a lamp on it. When the lamp is off everything is ok. When the lamp is on, I need to display a lightmap around the lamp. I've done this as follows:
When the lamp is on, I draw a quad around the lamp (slightly offset from the wall), and then apply the wall's texture and then the lightmap.
I've managed to get this working, however due to the position of the lamp, the texture applied to the lightmap's quad doesn't align with those on the wall surrounding it.
Is there some way to draw the texture from, say, halfway along one axis to 1 1/2 times along the same axis?
Unfortunately, moving the lamp is not an option.
Cheers,
Chris