UnityGLTF icon indicating copy to clipboard operation
UnityGLTF copied to clipboard

Custom shader / transparency + refraction in export?

Open efsjouw opened this issue 4 years ago • 1 comments

Hi, it doesn't seem like my custom material/shader effect is being exported. Is there any way to make this work by copying the properties or something?

What it looks like in Unity: https://postimg.cc/LY41sG6y image

What is looks like in the previewer: https://postimg.cc/sB4Ws3yQ image

EDIT: edited image links

efsjouw avatar Apr 07 '20 09:04 efsjouw

glTF does not support arbitrary custom shaders, as these aren't portable across tools and engines. The core glTF PBR model has fixed inputs, described in the specification. These include alpha, with modes for "alpha blend" and "alpha clip". Only alpha-based transparency is currently supported.

There are proposals in progress for inputs with physically-based transparency, see https://github.com/KhronosGroup/glTF/milestone/2 for a full list of relevant discussions, and probably the item on KHR_materials_transmission is most relevant. However, these are still drafts and not yet supported in tools.

donmccurdy avatar Apr 08 '20 17:04 donmccurdy