http://wiki.ogre3d.org/Intermediate+Tutorial+6
How would one go about adapting this tutorial to the 2.2 branch?
projective texturing in 2.2
-
dark_sylinc
- OGRE Team Member

- Posts: 5570
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1405
Re: projective texturing in 2.2
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)
-
bayoubengal
- Halfling
- Posts: 48
- Joined: Wed Sep 05, 2018 3:18 pm
Re: projective texturing in 2.2
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
-james
-
bayoubengal
- Halfling
- Posts: 48
- Joined: Wed Sep 05, 2018 3:18 pm
Re: projective texturing in 2.2
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?