Different textures on opposite faces of Manual Object

Problems building or running the engine, queries about how to use features etc.
Post Reply
jyioushichi7
Gnoblar
Posts: 2
Joined: Tue Sep 18, 2018 8:51 am

Different textures on opposite faces of Manual Object

Post by jyioushichi7 »

Ogre Version: :1.11:
Operating System: :Windows 10:

Hello everyone, I'm new to Ogre and rendering. What I have been doing is create a Manual Object (a triangle) and assigning a material to it without backface culling so that I could see both sides. I have a simple issue which I have been stuck for 1 whole day now and I've read the forums for anything that could lead me to the solution but I can't seem to find anything.

How do I create a Manual Object (a triangle) that has a different texture at the front and at the back?

Any help would be greatly appreciated.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Different textures on opposite faces of Manual Object

Post by paroj »

Ogre does not support two sided materials. You either have to duplicate your triangle and enable backface culling or write a shader to pick your texture there (e.g. using gl_FrontFacing)
jyioushichi7
Gnoblar
Posts: 2
Joined: Tue Sep 18, 2018 8:51 am

Re: Different textures on opposite faces of Manual Object

Post by jyioushichi7 »

I see, thank you very much! Would writing the shader avoid from having duplication of triangles?
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Different textures on opposite faces of Manual Object

Post by paroj »

yes
Post Reply