Closed ngokevin closed 8 years ago
Comment by nickdesaulniers Friday Sep 04, 2015 at 17:34 GMT
:+1: :yellow_heart: :slot_machine: :moneybag: :heavy_dollar_sign:
Comment by dmarcos Friday Sep 04, 2015 at 17:41 GMT
Linking to current work on three.js: https://github.com/mrdoob/three.js/issues/5847
Comment by kearwood Friday Sep 04, 2015 at 21:12 GMT
The implementation of the shader in ThreeJS is made more complicated than necessary due to the lack of textureCubeLod in our WebGL implementation. Perhaps the selection of the workaround and compromises it brings is adding friction to landing Physically Based lighting in ThreeJS.
For Gecko, we have a bug (with a patch) to enable textureCubeLod in WebGL: https://bugzilla.mozilla.org/show_bug.cgi?id=1111689
This has not been landed in m-c yet, although the patch was r+'ed several months ago. Last update was on July 7th, with an intent to land.
Comment by kearwood Friday Sep 04, 2015 at 21:33 GMT
We won't need all of the functionality in bhouston's shader, such as anisotropic specular, at this stage of vr-markup. As a placeholder until the final shader is ready in ThreeJS, we could use a simpler shader such as the one in this demo:
Comment by dmarcos Tuesday Sep 08, 2015 at 06:47 GMT
Implemented basic PBR approach based on the example provided by @kearwood
Comment by dmarcos Tuesday Sep 08, 2015 at 16:33 GMT
Outstanding issues.
Comment by dmarcos Tuesday Sep 08, 2015 at 16:36 GMT
For anyone with shaders mad skills this is where our shader lives at: https://github.com/MozVR/vr-markup/blob/dev/src/shaders/pbr.js
Comment by jcarpenter Friday Sep 11, 2015 at 16:45 GMT
The implementation plan, per discussions between @kearwood and @dmarcos:
Per @kearwood:
That order increases in complexity. #2 onwards reduces the overhead that would differentiate performance of Blinn-Phong from PBR. ThreeJS has most of this done already.
I’d recommend we stay with #1 for our current milestone / until end of september
If #2 is already in ThreeJS (very likely), we can just flip a flag and it will work without changes on our end or PBR specific stuff
3 is already done by ThreeJS, but needs to be updated for PBR. I’d recommend that in our next milestone, perhaps coordinating with the Clara.io guys that may have already done it
4 might not be on the radar for a long time. Would have the greatest effect for mobile.
Comment by ngokevin Tuesday Oct 27, 2015 at 18:18 GMT
Couple weeks ago, three.js landed their MeshPhysicalMaterial on dev. I'm working on getting rid of our custom PBR shader and lighting system and just use three's.
Check it out in action: https://github.com/mrdoob/three.js/blob/master/examples/webgl_shading_physical.html
Issue by jcarpenter Friday Sep 04, 2015 at 17:27 GMT Originally opened as https://github.com/aframevr/aframe-core/issues/73
Enables developer to specify the visual (eg lighting and material) properties of their scene using a physically-based renderer (PBR).