Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shader Passes: clone defines #13422

Merged
merged 1 commit into from
Feb 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/js/postprocessing/AdaptiveToneMappingPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
uniforms: THREE.UniformsUtils.clone( this.adaptLuminanceShader.uniforms ),
vertexShader: this.adaptLuminanceShader.vertexShader,
fragmentShader: this.adaptLuminanceShader.fragmentShader,
defines: this.adaptLuminanceShader.defines,
defines: Object.assign( {}, this.adaptLuminanceShader.defines ),
blending: THREE.NoBlending
} );

Expand Down
2 changes: 1 addition & 1 deletion examples/js/postprocessing/BokehPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ THREE.BokehPass = function ( scene, camera, params ) {
bokehUniforms[ "farClip" ].value = camera.far;

this.materialBokeh = new THREE.ShaderMaterial( {
defines: bokehShader.defines,
defines: Object.assign( {}, bokehShader.defines ),
uniforms: bokehUniforms,
vertexShader: bokehShader.vertexShader,
fragmentShader: bokehShader.fragmentShader
Expand Down
4 changes: 2 additions & 2 deletions examples/js/postprocessing/SAOPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ THREE.SAOPass = function ( scene, camera, depthTexture, useNormals, resolution )

this.vBlurMaterial = new THREE.ShaderMaterial( {
uniforms: THREE.UniformsUtils.clone( THREE.DepthLimitedBlurShader.uniforms ),
defines: THREE.DepthLimitedBlurShader.defines,
defines: Object.assign( {}, THREE.DepthLimitedBlurShader.defines ),
vertexShader: THREE.DepthLimitedBlurShader.vertexShader,
fragmentShader: THREE.DepthLimitedBlurShader.fragmentShader
} );
Expand All @@ -112,7 +112,7 @@ THREE.SAOPass = function ( scene, camera, depthTexture, useNormals, resolution )

this.hBlurMaterial = new THREE.ShaderMaterial( {
uniforms: THREE.UniformsUtils.clone( THREE.DepthLimitedBlurShader.uniforms ),
defines: THREE.DepthLimitedBlurShader.defines,
defines: Object.assign( {}, THREE.DepthLimitedBlurShader.defines ),
vertexShader: THREE.DepthLimitedBlurShader.vertexShader,
fragmentShader: THREE.DepthLimitedBlurShader.fragmentShader
} );
Expand Down
4 changes: 2 additions & 2 deletions examples/js/postprocessing/SMAAPass.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/js/postprocessing/ShaderPass.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ THREE.ShaderPass = function ( shader, textureID ) {

this.material = new THREE.ShaderMaterial( {

defines: shader.defines || {},
defines: Object.assign( {}, shader.defines ),
uniforms: this.uniforms,
vertexShader: shader.vertexShader,
fragmentShader: shader.fragmentShader
Expand Down