提交 db0644ed 编写于 作者: M Mr.doob

WebGLRenderer/Plugins: Cleaned up attributes code.

上级 75782e67
......@@ -1726,7 +1726,6 @@ THREE.WebGLRenderer = function ( parameters ) {
// custom render plugins (post pass)
this.resetGLState();
spritePlugin.render( scene, camera );
lensFlarePlugin.render( scene, camera, _currentWidth, _currentHeight );
......
......@@ -295,9 +295,10 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
gl.useProgram( program );
renderer.state.disableUnusedAttributes();
renderer.state.initAttributes();
renderer.state.enableAttribute( attributes.vertex );
renderer.state.enableAttribute( attributes.uv );
renderer.state.disableUnusedAttributes();
// loop through all lens flares to update their occlusion and positions
// setup gl and common used attribs/unforms
......
......@@ -98,9 +98,10 @@ THREE.SpritePlugin = function ( renderer, sprites ) {
gl.useProgram( program );
renderer.state.disableUnusedAttributes();
renderer.state.initAttributes();
renderer.state.enableAttribute( attributes.position );
renderer.state.enableAttribute( attributes.uv );
renderer.state.disableUnusedAttributes();
gl.disable( gl.CULL_FACE );
gl.enable( gl.BLEND );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册