Changing overlapping color

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Ezerg
Gnoblar
Posts: 14
Joined: Wed Oct 26, 2016 4:14 pm
Location: Rosario, Argentina
x 1

Changing overlapping color

Post by Ezerg »

Hello everyone, first post here.
To the question: I'm currently trying to build a game that is basically a moving vehicle that leaves a green trail (2D manual mesh) in it's path, what i'm trying to achieve is exactly what this image shows:

Image

My problem is that i need to change, by some method/technique, the color of the intersected path where the two meshes overlap.
I've been searching around this forum and found this thread http://www.ogre3d.org/forums/viewtopic.php?f=2&t=47674, I've replicated that solution in my code but now on the screen i only see the intersected path. I'm a total newbie in stencil buffers and in Ogre generally :oops: , so I'm still not sure of this is the best approach to my problem.
should I try another method rather than applying a stencil buffer? vertex/fragment shader code that could help?

Any advice or direction that you could provide will be very appreciated.
Thanks a lot
Post Reply