Smithsonian / dpo-voyager

DPO Voyager - 3D Explorer and Tool Suite
Apache License 2.0
167 stars 28 forks source link

fix USE_CLEARCOAT in main shader fragment #247

Closed sdumetz closed 8 months ago

sdumetz commented 8 months ago

The current implementation of clearcoat's outgoingLight references variables that don't exist in three v0.157.

When using a model that triggers USE_CLEARCOAT, we get an error :


FRAGMENT

ERROR: 0:3265: 'clearcoatSpecularDirect' : undeclared identifier
ERROR: 0:3265: 'clearcoatSpecularIndirect' : undeclared identifier

I rolled back the line to match the current implementation.

Updating three to a later version (r158 and up) would also be a valid fix but I don't know if it will break anything else.

gjcope commented 8 months ago

There is also an issue with Sheen. We will update to r158 to fix both. (https://github.com/Smithsonian/dpo-voyager/commit/07af1459a604ec0de3b245f13af3e1df135d5acf)

gjcope commented 8 months ago

Please check https://github.com/Smithsonian/dpo-voyager/tree/rc-37 for resolution

gjcope commented 8 months ago

This has been fixed in v0.37.0 with a Three.js update as referenced above.