-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
WebGLCubeRenderTarget: Use CubeTexture. #20182
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
Conversation
|
It seems when applying an instance of |
|
It seems these checks are problematic: uniforms.flipEnvMap.value = envMap.isCubeTexture ? - 1 : 1;The engine should not set |
|
Ah, the removed comments from #18438 explain the need for further refactoring^^. |
|
@mrdoob @WestLangley Do you have already a preferred solution for this use case? Maybe a flag |
|
Well, at least it seems the flag approach works^^. |
|
This is an excellent refactoring, IMHO. Everything seems to be working. TBH, I am not a fan of CubeTexture extends Texture
this._needsFlipEnvMap = true;
WebGLCubeRenderTarget extends WebGLRenderTarget
this.texture = new CubeTexture()
this.texture._needsFlipEnvMap = false;
|
|
@mrdoob What do you think about this PR? I would love to see |
|
Yes! Lets give this a try! |
|
Thanks! |
Would |
|
BTW: I would like to add a comment to the property that explains why it's there. I understand that it's necessary to flip the env map when just using |
|
I used to know, but I forgot... |
I do not think so. What is in the PR is better. |
Well, it seems the flipping happens since the early days^^. |
|
@WestLangey said:
|
|
I hope you don't mind if I copy this into the code base for clarification 😇 . |
This PR makes
WebGLCubeRenderTargetuse aCubeTexture.I've realized this allows a nice refactoring in
WebGLTextures.setTextureCubeDynamic()becomes obsolete.