[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Public WebGL] Spec change request.
- To: public webgl <public_webgl@khronos.org>
- Subject: [Public WebGL] Spec change request.
- From: Steve Baker <steve@sjbaker.org>
- Date: Sat, 04 Dec 2010 21:34:41 -0600
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=sjbaker.org; h=message-id :date:from:mime-version:to:subject:content-type: content-transfer-encoding; s=sjbaker.org; bh=b7ya0yjOyZrE/8nvzEx SIPaMXOo=; b=KRvkyX+be0wBXqssErtE3SkEXEWnVhaNHVrgjm7EbqE+SHWo+/9 Xs7pJCCuhARgAFItiNFVprGT02wgu+gNomQuhQW/jIUXkPGIzuyjp2jnPVwfigbc rjgJIQLSzphaSCKi9uEEUdIoIcN5p0sK22R+voFwrQC3tNVveHepMsmY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=sjbaker.org; h=message-id:date :from:mime-version:to:subject:content-type: content-transfer-encoding; q=dns; s=sjbaker.org; b=O6lf13Jyisi2Y nlipPcCEwmdaEmJ1yD3yGB19X0fRaaShk+dhTLSXWqZZ7yaCQqdVP5FJwzwUOLiT OPKayAaMCzLxuT8FKHHUGpoZIGzYhYdvDDfPThdX6t0W2U61d4TU3v/E85OTmtDI yWyq4mcpvdGfrNIlMYoty3H2Z0hwjM=
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- Sender: owner-public_webgl@khronos.org
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100520 SUSE/3.0.5 Thunderbird/3.0.5
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: