Hello Michael,

Michael Babcock wrote:
> I'm having a problem with a GLSL shader. It works fine for opaque 
> objects, but transparent objects don't look right. I tracked it down to 
> my use of the OpenSG uniforms OSGWorldMatrix and OSGTransInvWorldMatrix. 
> It appears these variables contain garbage or out-of-date values for 
> transparency sorted objects.
> 
> If I setSortTrans(false) on the render action, the shader works 
> correctly, but of course transparency isn't rendered correctly in this case.
> 
> Any ideas why this might be the case?

very strange, I just checked the code in the RenderAction that updates 
the matrices and it is the same for transparent and opaque objects. I 
don't know in what context you are using this and how much work it is, 
but would it be possible for you to create a small (like the testFoo.cpp 
ones) program that shows the behavior ?
Alternatively, can you run your code in a debugger with a breakpoint 
being set on void RenderAction::updateShader(State *state) and see if it 
gets called before each object that is being rendered with your shader ?

        Thanks,
                Carsten

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to