Page 1 of 1
projective texturing in 2.2
Posted: Mon Aug 19, 2019 10:03 pm
by bayoubengal
http://wiki.ogre3d.org/Intermediate+Tutorial+6
How would one go about adapting this tutorial to the 2.2 branch?
Re: projective texturing in 2.2
Posted: Mon Aug 19, 2019 10:15 pm
by dark_sylinc
See samples:
- Samples/2.0/ApiUsage/Decals
- Samples/2.0/ApiUsage/UpdatingDecalsAndAreaLightTex (doesn't show decals, but shows how to update a texture used by decals dynamically, which is the same way it is used for textured area lights)
Re: projective texturing in 2.2
Posted: Tue Sep 03, 2019 3:02 pm
by bayoubengal
greetings! After figuring out some problems, I have he decal working. But, I dont' see how to do the Frustum part of the tutorial. I want to project the decal across the scene onto whatever surfaces it hits. The further the surface is from the source, the larger it should appear.
-james
Re: projective texturing in 2.2
Posted: Tue Sep 03, 2019 11:48 pm
by bayoubengal
dark_sylinc wrote: Mon Aug 19, 2019 10:15 pm
See samples:
- Samples/2.0/ApiUsage/Decals
- Samples/2.0/ApiUsage/UpdatingDecalsAndAreaLightTex (doesn't show decals, but shows how to update a texture used by decals dynamically, which is the same way it is used for textured area lights)
I have been experimenting at the following spot in ForwardPlusBase::fillGobalLightListBuffer() to inject a projection matrix into the decal bounds comparison in the shader. I tried a simple scale matrix and got a flickering decal as the camera moves.
*lightData++ = static_cast<float>( invWorldView
[0] );
is this concept valid?