shading each ManualObjectSection separetly

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Shem
Kobold
Posts: 39
Joined: Fri Feb 16, 2018 9:32 am
x 5

shading each ManualObjectSection separetly

Post by Shem »

Hi,

Forgive me if this is a noob question but is there a way to use the shaders on each ManualObjectSection independently? I have a mesh made of a line list

Code: Select all

m_ManualObject->begin(m_MaterialName, Ogre::RenderOperation::OT_LINE_LIST)
and each line is in a different section. I need the shaders to be used individually on each line. Is it possible or do I need each line to be in a separate ManualObject?

Thanks in advance
Shem

paroj
OGRE Team Member
OGRE Team Member
Posts: 1222
Joined: Sun Mar 30, 2014 2:51 pm
x 487
Contact:

Re: shading each ManualObjectSection separetly

Post by paroj »

you need to use different materials per section, which in turn can have different shaders.

Note, that you should still group your lines by material or the performance will be not optimal.

Shem
Kobold
Posts: 39
Joined: Fri Feb 16, 2018 9:32 am
x 5

Re: shading each ManualObjectSection separetly

Post by Shem »

Thanks for the quick reply Pavel.
I'll experiment a bit and let you know.

Post Reply