-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Examples: Remove EquirectangularToCubeGenerator. #17708
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
| exrBackground = cubemapGenerator.renderTarget; | ||
| var cubeMapTexture = cubemapGenerator.update( renderer ); | ||
| var options = { | ||
| minFilter: THREE.NearestFilter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that makes sense. Here, or in the lines above. Probably should be Linear.
You will have to step through the code to see if it matters.
Also, you will almost surely have to change the loader output data type to HalfFloat to duplicate the previous results.
.setDataType( THREE.HalfFloatType )There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that makes sense. Here, or in the lines above. Probably should be Linear.
Why do you think are the previous texture filtering settings wrong? It does actually look good.
Also, you will almost surely have to change the loader output data type to HalfFloat to duplicate the previous results.
That's true. Let me fix this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your example is throwing errors on my machine.
I have always used Linear interpolation when the encoding supports it. Some encodings like RGBE are not compatible with linear, so nearest must be used. I have never seen Linear and Nearest mixed in the same texture. If there is a use case for that, I am not aware of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your example is throwing errors on my machine.
Um, can't reproduce this on my iMac with Chrome. What errors are logged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failure is on macOS Safari.
WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I can reproduce with Safari. It seems WebGLRenderTargetCube.fromEquirectangularTexture() throws this error when the input texture is of THREE.HalfFloatType. Using THREE.FloatType with EXRLoader as before solves the issue. However, since WebGLRenderTargetCube.fromEquirectangularTexture() strictly derives the type of the source texture (unlike EquirectangularToCubeGenerator which does type: options.type || this.sourceTexture.type), I can't quickly fix this issue without changing previous values (see #17708 (comment)).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see #17727
As I did, you need to make sure As I said above, PMREM changes the input texture, so you need to check the background texture after PMREM is finished. Personally, I think setting a background cube map with mipmapping disabled is probably not what we want to be recommending, but I guess that can be a separate issue. |
|
I've checked all examples again and made sure the properties of the background's texture are the same as before. Let me list those values in the following table: Background:
EnvMap:
Measured after PMREM has finished. |
The PNG background/env maps in the EXR example have set |
|
Right. Fix it if you can. Otherwise, wait until the PMREM rewrite is finalized. |
|
Merging for now. The settings in Sidenote: Let's not forget |
...and use
WebGLRenderTargetCube.fromEquirectangularTexture()instead.