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

Fix for "don't use render texture property" #5

Open
christiankaseburg opened this issue Feb 28, 2018 · 1 comment
Open

Fix for "don't use render texture property" #5

christiankaseburg opened this issue Feb 28, 2018 · 1 comment

Comments

@christiankaseburg
Copy link

christiankaseburg commented Feb 28, 2018

Hello,

Here is the fix for the warning for everyone who got the package from npm:
three.webglrenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead.

Locate your shaderpass file in your node_modules, and search for this line:
this.uniforms[ this.textureID ].value = readBuffer;

Next, replace that line with this:
this.uniforms[ this.textureID ].value = readBuffer.texture;

As you can see all that is added to this line is .texture to the readBuffer to fix the warning.

@johnmarinelli
Copy link

@christiankaseburg this just saved me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants