Remove osg::Material fixed function state

Closes #9241 (closed)

Closes #4954 (closed)

Closes #6904 (closed)

Closes #5061 (closed)

Closes #8464 (closed)

Part of #9239

Replaces osg::Material fixed function pipeline state with uniforms.

While we could simply get away with no stateattribute, this provides a useful mechanism to collect materials and add eventual batching. Another idea discussed was using a custom osg::Uniform class which can hold material data, but I couldn't get this to "just work" without changing the guts of OSG. If there's ideas I'm open, as this would be preferable.

This also replaces some usage of osg::Material in various places with named uniforms. There's no reason to abuse material data anymore now that everything is in shaders in first place. As such we'll probably want extra care to make sure nothing broke with the sky.

Edited by Cody Glassman

Merge request reports

Loading
Loading