[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Public WebGL] Spec change request.

When I benchmark my rendering code - I find that an unreasonable
percentage of the time is spent doing this:

    if ( someUniformLocation != null )                               
<==== THIS!
      gl.uniformXXX ( someUniformLocation, XXX ) ;

...in situations where a uniform variable might not exist in the shader
in some rendering passes but does exist in others (eg, when the shadow
and depth rendering passes don't need to see textures and such).

Losing the 'if' test would speed things up significantly.

It would be a performance win if all of the various uniform setter
functions would legally accept a 'null' location (and do nothing)
without flagging an error in that circumstance.   An 'if' in C++ (which
you're probably doing anyway in order to do error detection) is much
faster than doing one in JavaScript - and I don't see any downsides.

Any chance of a spec change?

  -- Steve

You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: