-
-
Notifications
You must be signed in to change notification settings - Fork 384
Closed
galacean/engine-toolkit
#311Labels
glTFrenderingRendering related functionsRendering related functionsshaderShader related functionsShader related functions
Milestone
Description
GLTF
https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_iridescence
UNITY HDRP
https://docs.unity3d.com/Packages/[email protected]/manual/Material-Type.html
Babylon
https://github.com/BabylonJS/Babylon.js/blob/baf64330206f50880ae5bc874affbfd0f85f67ea/packages/dev/core/src/Shaders/ShadersInclude/pbrBRDFFunctions.fx#L188
uniform 和 gltf2.0一一对应
three.js
https://threejs.org/examples/#webgl_loader_gltf_iridescence
技术对比
- 在计算第一层 薄膜折射率 的算法中这几个引擎都大差不差,基本框架是一样的,只是算法的小细节不太一样,babylon和three.js的算法重叠度较高,完全一致
- 虽然unity hdrp管线是针对pc端,但是关于iridescence的算法其实是做了简化
总结
- unity的算法更简化,算法中避免了大量的临时变量的创建,尤其是向量的操作,相对来说更节省内存,但和gltf的uniform无法对应,参考意义不大
- 相较于unity,gltf官方/babylon/thress.js基本都是类似的算法,并未做太多简化
方案
目前我们已有的:
basetexture 对应 薄膜干涉颜色纹理,iridescence 对应 强度,iridescent ior 对应 折射率,厚度仅输出了 iridescence Thickness
需要增加的:
针对gltf2.0的标准补充 薄膜干涉厚度纹理,薄膜干涉最小厚度,薄膜干涉最大厚度
GuoLei1990
Metadata
Metadata
Assignees
Labels
glTFrenderingRendering related functionsRendering related functionsshaderShader related functionsShader related functions
Type
Projects
Status
Done
Status
Done
Status
Done