playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.52k stars 1.33k forks source link

Sheen doesn't work as expected when using Specular #5440

Closed animech-sijo closed 1 year ago

animech-sijo commented 1 year ago

Sheen doesn't work as expected on materials that use Specular setup:

Using Metalness instead of Specular solves these issues. However, since materials use Specular by default, using sheen is very confusing, especially since this limitation isn't documented anywhere (as far as I know). I only figured this out when looking at the glTF spec, which I presume was used as reference.

Is it possible to implement Sheen for Specular as well? If not, can this limitation be communicated more clearly, either in the Help docs, API, or directly in the Playcanvas editor?

GSterbrant commented 1 year ago

Hello @animech-sijo. You're right, we have only implemented the Sheen to work with the metalness PBR shaders. Perhaps we should just disable sheen if that workflow isn't used.

Sheen is a fresnel function primarily, so it would make sense it would look incorrect when not used with similar physics in mind. Thanks for bringing this to our attention!