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

Calling cubeCamera.clear(renderer) generates warnings/errors #15865

Closed
4 of 13 tasks
manthrax opened this issue Mar 1, 2019 · 3 comments
Closed
4 of 13 tasks

Calling cubeCamera.clear(renderer) generates warnings/errors #15865

manthrax opened this issue Mar 1, 2019 · 3 comments
Labels

Comments

@manthrax
Copy link
Contributor

manthrax commented Mar 1, 2019

Description of the problem

Calling

var cubeCamera = new THREE.CubeCamera(0.1,1000,256);
cubeCamera.clear(renderer)

generates a warning about .activeCubeFace now being a parameter on setRenderTarget and then generates subsequent webGL errors. This looks like the CubeCamera code hasn't been updated to reflect the new behavior, as the next line in the function calls

renderer.setRenderTarget( renderTarget );  : three.js line 40194

But doesn't pass the activeCubeFace as the second parameter.

I made a local copy of the library and changed the offending call site to:

	//renderTarget.activeCubeFace = i; //Don't do the bad thing..
	renderer.setRenderTarget( renderTarget, i ); //Do the right thing...

and that seems to fix it.

https://jsfiddle.net/manthrax/gutwrs90/2/ <----r102 repro
https://jsfiddle.net/manthrax/ehfjkvxq/ <---- dev branch repro

Three.js version
  • Dev
  • r102
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)

all

@WestLangley
Copy link
Collaborator

Thanks. Would you like to file a PR and fix it?

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 1, 2019

Damn, this method was missed in #15808. It needs basically the same fix like CubeCamera.update().

@mrdoob mrdoob added this to the r103 milestone Mar 2, 2019
manthrax added a commit to manthrax/three.js that referenced this issue Mar 2, 2019
@manthrax
Copy link
Contributor Author

manthrax commented Mar 2, 2019

I think that PR is what is needed. Let me know if I'm missing something..

@mrdoob mrdoob removed this from the r103 milestone Mar 2, 2019
@mrdoob mrdoob closed this as completed Mar 2, 2019
@mrdoob mrdoob added Bug and removed Bug (easy) labels Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants