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
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

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: 1993
Joined: Sun Mar 30, 2014 2:51 pm
x 1073
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
Halfling
Posts: 55
Joined: Fri Feb 16, 2018 9:32 am
x 8

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