Skip to content

Commit

Permalink
SpritePlugin: Handle material.visible. Fixes #9257.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Jun 30, 2016
1 parent 44ca421 commit b239812
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderers/webgl/plugins/SpritePlugin.js
Expand Up @@ -176,6 +176,8 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
var sprite = sprites[ i ];
var material = sprite.material;

if ( material.visible === false ) continue;

gl.uniform1f( uniforms.alphaTest, material.alphaTest );
gl.uniformMatrix4fv( uniforms.modelViewMatrix, false, sprite.modelViewMatrix.elements );

Expand Down Expand Up @@ -351,7 +353,7 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
}

function painterSortStable ( a, b ) {

if ( a.renderOrder !== b.renderOrder ) {

return a.renderOrder - b.renderOrder;
Expand Down

0 comments on commit b239812

Please sign in to comment.