-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
HalfFloat PMREM #22998
HalfFloat PMREM #22998
Conversation
Looks like some problems with the node materials; anyone have any pointers on that? I haven't used those. |
Also, does anyone have a convenient performance benchmarking tool for this? I'd be interested to know how much of a difference it makes (primarily to frame rate). |
/ping @sunag for node |
Oh, I think that might be because I removed part of the |
There were some issues this month about |
@WestLangley Thanks for noticing that problem; turns out it was not what I first thought. Instead, the toneMapping changed (it's off during |
@sunag You can see in the screenshots I updated that this broke something in the pmrem node; seems likely related to the toneMapping issue I found above. |
@elalish Currently, the renderer.toneMapping = toneMappingOptions[ params.toneMapping ];
mesh.material.needsUpdate = true; Maybe that can be avoided. I'll defer to @Mugen87 regarding the implementation details. Also, remember to consider the |
Beautiful! Thanks! |
As I said, ...
|
You mean that we still have to remove that line, right? |
Yes... and that would be a good test that the code changes are working correctly. And maybe a Migration note would be advisable. |
* changed format * PMREM RGBE->HalfFloat * fixed toneMapping problem * update screenshots * Update WebGLRenderer.js * Update WebGLRenderer.js Co-authored-by: Michael Herzog <[email protected]>
@sunag The node examples https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_materials_envmaps_hdr_nodes.html https://raw.githack.com/mrdoob/three.js/dev/examples/webgl_materials_envmaps_pmrem_nodes.html Do you think you can fix them before |
@Mugen87 Probably yes., I was thinking it release would be in the Christmas,.. I was working in |
@sunag you can always check here the date in which every release is due: |
This reverts commit 2768965.
This reverts commit 2768965.
This reverts commit 2768965.
This reverts commit 2768965.
This reverts commit 2768965.
This reverts commit 2768965.
This reverts commit 2768965.
This reverts commit 2768965.
We've been rendering to HalfFloat textures for several months now for model-viewer's auto-generated environment lighting without complaint, so it seems that at this point HalfFloat texture support is pretty universal (finally!). The only reason I wrote PMREMGenerator to use RGBE internally was because at the time there was not decent floating point rendering support. This made the code complicated and slow because I had to do manual bilinear interpolation (since decode was needed before mixing).
Here I've removed all that by switching PMREM to use HalfFloat internally. I suppose it'll take twice the GPU RAM (16 bits vs 8), but hopefully that's more than offset by skipping a bunch of exponentiation. I've tested on my Macbook Pro and my Pixel 3 and can't see any difference to our glTF renders. I'd appreciate some more device testing, but I'm fairly confident given our widely deployed use of HalfFloat render targets in MV.
@mrdoob @WestLangley