rework to remove use of UniformsUtils.* #10178

Merged
merged 1 commit into from Nov 20, 2016

Projects

None yet

2 participants

@aardgoose
Contributor

First attempt,

Renders the example scene correctly as far as I can tell.

I have taken advantage of the shallow copy behaviour to use common uniform objects for
height, width and matProjInverse, which then only need updating once per render rather than for each light etc.

Do you think it might be useful to have a Uniforms.clone() method to avoid lines like

uniforms.specular = new THREE.Uniform( uniforms.specular.value.clone() );

becomes

uniforms.specular = uniforms.specular.clone();

@mrdoob
Owner
mrdoob commented Nov 20, 2016 edited

Do you think it might be useful to have a Uniforms.clone() method to avoid lines like

Yes! That'd be great!

@mrdoob mrdoob merged commit b7d17be into mrdoob:dev Nov 20, 2016
@mrdoob
Owner
mrdoob commented Nov 20, 2016

Thanks!

@mrdoob mrdoob added a commit that referenced this pull request Nov 20, 2016
@mrdoob Uniform: Added clone(). See #10178. a243f2b
@mrdoob
Owner
mrdoob commented Nov 20, 2016

Do you think it might be useful to have a Uniforms.clone() method to avoid lines like

Yes! That'd be great!

Done!

@aardgoose aardgoose deleted the aardgoose:deferred-renderer-uniforms branch Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment