-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
HDR EnvMap example with high quality, flexible PMREM Generator. #8237
Conversation
…the THREE namespace, move into examples.
cube_uv_reflection map shader. (written by @spidersharma03, modified by @bhouston)
…/float fixed. (written by @spidersharma03, modified by @bhouston)
…lors are not encoded and we need to get perfect blends.
# Conflicts: # src/renderers/shaders/ShaderLib.js # src/renderers/webgl/WebGLPrograms.js
…ng wrong when using RGBE encoding.
Many thanks to @bhouston and @spidersharma03 for their work on improving Which PRs do you now want merged and which ones are outdated? Also, what is still on the near-term to-do list, as far as you are concerned? |
@WestLangley, this PR contains the non-merged PR #8232. Outstanding issues is to figure out if this new code, of which there is a fair bit, works on all devices. It is designed to render PBR with HDR IBL maps on all devices that are WebGL 1.0 compliant without any extensions. I think it needs to auto-fallback to UnsignedByte when Float / Half textures are not available - which it does not do. We also have to test the UnsignedByte RGBE workflow to ensure there are no artifacts. UPDATE: I was able to modify the PR so it always uses RGBE with UnsignedByte and it always looks good. Thus the main issue in this comment is addressed. |
The latest changes to this PR ensure that it looks good and runs at fast frame rates on Nexus 5 and a Samsung Galaxy TabPRO as well as Ubuntu 15.04. I still need to test this on the iPad and iPhone as well as a few more mobile devices. |
BTW @MiiBond this PR may be of interest. |
BTW @spite, this PR may be of interest as well. |
@WestLangley @mrdoob This PR also re-enables indirect light probe irradiance when you use it with the PMREM generated CubeUV layout because this PR gets rid of the seams on all devices: https://github.com/mrdoob/three.js/pull/8237/files#diff-29f010d669a36f5263d5351f4702e64fR104 :) |
Super sweet! I can confirm that it works on iOS too! 😁 |
HDR EnvMap example with high quality, flexible PMREM Generator.
Many thanks! |
They work if you enabled them 2cb798d 😉 |
This looks great! Congratulations! 👍 With HDR looks even better than what i was testing! https://www.clicktorelease.com/tmp/snapshot-fsk2-big.jpg |
@spite, nice! Are those beautiful graphics using your code or this new code? |
@spite, one need thing about the approach in this PR is that it requires zero extensions, while giving what should be near perfect results. |
@bhouston those are snapshots from my tests, also without extensions. very cool stuff you've got there! |
renderTarget.texture.minFilter = this.sourceTexture.minFilter; | ||
renderTarget.texture.magFilter = this.sourceTexture.magFilter; | ||
this.cubeLods.push( renderTarget ); | ||
size = Math.max( 16, size / 2 ); |
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.
@benaadams @spidersharma03 Any particular reason the mipmaps are not any smaller than 16x16? Should this be configurable so that PMREMGenerator can be used as a general purpose cube map filtering tool? Right now it seems tailored toward the UV Packer (which may not be necessary in WebGL2).
great stuff Ben! |
@mattdesl @mrdoob, Restriction to 16x16 was done as there were artifacts with roughness maps lower than 16x16. The line:: Regarding the multiplication by 0.9 and some other stuff in the code:: |
I've cleaned up the earlier PR #7902 from @spidersharma03 that addressed issue #7402 in a number of ways:
To refresh from the other, this is based upon @spidersharma03's real-time filtered cubemap generator, that also creates single texture cube map hierarchy with both roughness levels and mipmaps. It is pretty awesome.
I do believe this is the critical missing piece (e.g. #7402) that completes @WestLangley's Standard material implementation.
The results this PR products look like this and it should look like this on all browsers (if there are not any bugs):
Interactive:
http://ci.threejs.org/api/pullrequests/8237/examples/index.html#webgl_materials_envmaps_hdr
PS. Anyone know how to get shadows working when using the effect compositor? There should be shadows here but I do not see any.