Conversation
|
Marked as a breaking change due to Three.js version bump, and also rendering changes. |
cdata
left a comment
There was a problem hiding this comment.
You left out a semi-colon 😱
Seriously though, amazing work on this. Can't wait to see it on some real sites 👍
| } | ||
| } | ||
|
|
||
| export let renderer = new Renderer({debug: isDebugMode()}); |
There was a problem hiding this comment.
Moving renderer into here has consequences, but we will only realize them in tests for now. The move means new Renderer happens (every) first time that this module gets imported from somewhere, regardless of why it was imported. So, in our test that tests Renderer, we will create an extra instance of it and that instance will just sit around and do nothing.
Just putting this out there, since it is bound to come up down the road. No action requested.
src/utilities/debug.ts
Outdated
| const helper = new CameraHelper(scene.shadow.shadow.camera); | ||
| scene.add(helper); | ||
| } | ||
| } |
|
🔥🔥🔥🔥🔥🔥 |
|
🎉 🎉 🎉 🎉 🎉 |
|
Spectacular work Emmett! For comparing: This looks much better with all my local models. |
|
Actually, that's not fair. I should add |
|
It's pretty incredible to see how far we have come 😮 BTW it might be better in the comparison to also set |
|
I'm so happy the models have had time to "dry off". 0.5.1 had lots of models look really wet. @mrdoob Check out this model in your tool: |
|
@pushmatrix Nice! Is it okay if I add that model to |
|
@mrdoob Of course! Just hope people don't get confused why they are looking at a sphere :P |
|
Done! |
|
@mrdoob great to see that there's a simple testing page for model-viewer! After trying it out I found a slight bug: https://model-viewer-tester.glitch.me/ does not allow changing the environment map (nothing happens when selecting something in the dropdown) |
Rendering refactor for anti-aliasing (google#880) * removed normalmap blur * added roughnessmipmapper * need to change strategies * roughness shader runs * changing roughness mips, but not saving the texture properly * texture saving working, but seems to have a race condition * commented out debugging * roughness mipmapper sort of working but may have a race * working better now; equation needs work * mipmapping and saving work, equation should be tweaked * merging master * roughness mipmapper working * cleanup * added vertex normal antialiasing * fixed skybox * disaligned blur axes to remove pole artifact * added uniform mip level * moved geometry antialiasing up to affect main roughness value * using two roughness values * moved debugging function * fixed black PMREM corner pixels * added directional light fidelity test * remapped roughness * best yet * first cleanup * second cleanup * more cleanup * fixed unlit model bug * reverting index * bumped threejs version * cleanup * cleaning spaces * added docs, shader improvement * updated goldens * slight update of PMREM parameters to match analysis * updated goldens * addressing feedback * renderer -> threeRenderer * moved debug to utilities * added comma






Fixes #724
This is the big one I've been working on for weeks now, and I believe it solves the rest of this umbrella issue that has represented our various rendering artifacts. The normal map detail is back, we have a new roughness mipmapper to anti-alias the normal map, as well as anti-aliasing on the geometry normals. I've also updated PMREM to simplify its shader, remove some blur artifacts, and remap the roughness. I've also made a new fidelity test, DirectionalLightTest, which compares Filament's directional light to our PMREM using a single white pixel as input, scaled to be the same 1 lux of illuminance. This is a very hard test, since a directional light can make much more precise calculations, and I'm quite happy with the result. Note some of the difference is also due to modeling multiscattering differently in three vs filament.
You can still find aliasing here and there, but it's much improved and some I can't do much about (like where triangles don't share normals; MSAA handles this pretty well, but it's not always enough).