[osg-users] Is it possible to pass uniform from node's StateSet to the deferred pass fragment shader?
michael kapelko
kornerr at gmail.com
Thu Mar 31 19:06:51 PDT 2016
Hi.
Currently I have a forward pass fragment shader (
https://github.com/OGStudio/editor/blob/master/pipeline/pass1.frag ) with
uniforms "useNormalMap", "useGlowMap" which define if certain draw buffers
should be filled with bumps and glows.
I provide those uniforms with NODE->getOrCreateStateSet()->addUniform(), it
works perfectly fine.
I also have a deferred pass fragment shader (
https://github.com/OGStudio/editor/blob/master/pipeline/pass2.frag ) with
uniforms that I provide with PASS->getOrCreateStateSet()->addUniform(), it
works perfectly fine.
Now I tried to provide a new uniform to the deferred pass fragment shader
with NODE->getOrCreateStateSet()->addUniform(), and it does not work. Only
PASS approach works for the deferred pass fragment shader.
Is it possible to pass uniform value from the NODE's StateSet to the
deferred pass fragment shader? Am I missing something?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160401/39e88eba/attachment-0002.htm>
More information about the osg-users
mailing list