{"action":"created","issue":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/6666","labels_url":"https://api.github.com/repos/mrdoob/three.js/issues/6666/labels{/name}","comments_url":"https://api.github.com/repos/mrdoob/three.js/issues/6666/comments","events_url":"https://api.github.com/repos/mrdoob/three.js/issues/6666/events","html_url":"https://github.com/mrdoob/three.js/issues/6666","id":86694719,"number":6666,"title":"SpritePlugin & Blending","user":{"login":"ebann","id":10442358,"avatar_url":"https://avatars.githubusercontent.com/u/10442358?v=3","gravatar_id":"","url":"https://api.github.com/users/ebann","html_url":"https://github.com/ebann","followers_url":"https://api.github.com/users/ebann/followers","following_url":"https://api.github.com/users/ebann/following{/other_user}","gists_url":"https://api.github.com/users/ebann/gists{/gist_id}","starred_url":"https://api.github.com/users/ebann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebann/subscriptions","organizations_url":"https://api.github.com/users/ebann/orgs","repos_url":"https://api.github.com/users/ebann/repos","events_url":"https://api.github.com/users/ebann/events{/privacy}","received_events_url":"https://api.github.com/users/ebann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-09T18:44:20Z","updated_at":"2015-06-09T20:36:45Z","closed_at":null,"body":"The renderer.state.setBlending() tries to optimize calls made to it by remembering the current blending state\r\n\r\nHowever the Sprite plugin do the following during render:\r\n[...]\r\n\tgl.enable( gl.BLEND );\r\n[...]\r\nrenderer.state.setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst );\r\n\r\n> It enables the blending without notifying the renderer.\r\n> Which leads to an inconsistent state where the renderer.state thinks that blending is disabled but it's not.\r\n\r\nFor example:\r\nA Mesh sets the current blending state to THREE.NoBlending.\r\nThen a Sprite with a material.blending=THREE.NoBlending is rendered.\r\nThe glBlending is set to true (gl.enable( gl.BLEND );) by the SpritePlugin\r\nAnd when the SpritePlugins calls renderer.state.setBlending(THREE.NoBlending), the glBlending is not changed to false. As the current blending state is already THREE.NoBlending\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mrdoob/three.js/issues/comments/110497184","html_url":"https://github.com/mrdoob/three.js/issues/6666#issuecomment-110497184","issue_url":"https://api.github.com/repos/mrdoob/three.js/issues/6666","id":110497184,"user":{"login":"ebann","id":10442358,"avatar_url":"https://avatars.githubusercontent.com/u/10442358?v=3","gravatar_id":"","url":"https://api.github.com/users/ebann","html_url":"https://github.com/ebann","followers_url":"https://api.github.com/users/ebann/followers","following_url":"https://api.github.com/users/ebann/following{/other_user}","gists_url":"https://api.github.com/users/ebann/gists{/gist_id}","starred_url":"https://api.github.com/users/ebann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebann/subscriptions","organizations_url":"https://api.github.com/users/ebann/orgs","repos_url":"https://api.github.com/users/ebann/repos","events_url":"https://api.github.com/users/ebann/events{/privacy}","received_events_url":"https://api.github.com/users/ebann/received_events","type":"User","site_admin":false},"created_at":"2015-06-09T20:36:45Z","updated_at":"2015-06-09T20:36:45Z","body":"I would suggest a little bit of testing before merging, I can't do that myself for now."}}