[osg-users] Shader Uniform Performance Question(s)

2008-11-19 Thread paul1492
Maybe somebody on this list can save me from reinventing the wheel... I'm looking to get a better understanding of performance issues related to uniforms. How much overhead is there in having a uniform?  If there only a performance hit if the uniform changes values or every frame. What if I

Re: [osg-users] Shader Uniform Performance Question(s)

2008-11-19 Thread Ümit Uzun
Hi Paul, 2008/11/19 [EMAIL PROTECTED] Maybe somebody on this list can save me from reinventing the wheel... I'm looking to get a better understanding of performance issues related to uniforms. How much overhead is there in having a uniform? If there only a performance hit if the uniform

Re: [osg-users] Shader Uniform Performance Question(s)

2008-11-19 Thread David Spilling
Paul, From my perspective : How much overhead is there in having a uniform? GLSL? Not much. If there only a performance hit if the uniform changes values or every frame. What if I change the Uniform in OSG to exactly the same value it already has, would there be a performance hit? I

Re: [osg-users] Shader Uniform Performance Question(s)

2008-11-19 Thread Ümit Uzun
Hi David, You are right there is much uniform variables can be changed in every frame but these all Built-in variables. I think this difference can change the state of your tenet. I have read OrangeBook and Randi Rost ( GLSL GURU :) ) advices using uniform variables if you rarely update and in

Re: [osg-users] Shader Uniform Performance Question(s)

2008-11-19 Thread David Spilling
Umit, Sorry to be picky, but: Firstly, uniform variables are intented to using in rarely changing values, and attributes is used while needing frequently changing values. Not quite. Lots of the fixed-function uniforms - which are deprecated under GL3 - potentially change every frame (