Name
*
Code
{"properties":{"frame":25123,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/cameras/cameras:sopGroup/perspectiveCamera1","versions":{"polygonjs":"1.5.85"}},"root":{"type":"root","nodes":{"geo1":{"type":"geo","nodes":{"sphere1":{"type":"sphere"},"MAT":{"type":"materialsNetwork","nodes":{"meshStandard1":{"type":"meshStandard","params":{"useMap":1,"map":"../../../COP/image1","useEnvMap":1,"envMap":"../../../COP/envMap","metalness":1,"roughness":0}},"meshToon1":{"type":"meshToon"},"meshStandardBuilder2":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"oklabToRgb1","output":"rgb"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.17},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.74},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.02028856305209031,0.24620132669705552,0.651405637412793],"asColor":1},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"type":4,"color":[0.02121901037134225,0.4286904966038916,0.1412632911304446],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[{"index":0,"inputName":"value0","node":"rgbToOklab1","output":"oklab"},{"index":1,"inputName":"value1","node":"rgbToOklab2","output":"oklab"},{"index":2,"inputName":"blend","node":"smoothstep1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}},"rgbToOklab1":{"type":"rgbToOklab","params":{"rgb":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"rgb","node":"constant1","output":"val"}]},"rgbToOklab2":{"type":"rgbToOklab","params":{"rgb":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"rgb","node":"constant2","output":"val"}]},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"oklab","node":"mix1","output":"mix"}]}},"params":{"useEnvMap":1,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-main","type":"MeshStandardMaterial","name":"/geo1/MAT/meshStandardBuilder2","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder1":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,null,null,null,{"index":5,"inputName":"metalness","node":"constant1","output":"val"},{"index":6,"inputName":"roughness","node":"clamp1","output":"val"}]},"noise1":{"type":"noise","params":{"outputType":1,"amp":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":5.5200000000000005},"position":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"freq":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"offset":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"maxInputsCount":4,"inputs":[null,{"index":1,"inputName":"position","node":"attribute1","output":"val"},null,{"index":3,"inputName":"offset","node":"floatToVec3_1","output":"vec3"}],"connection_points":{"in":[{"name":"amp","type":"float"},{"name":"position","type":"vec3"},{"name":"freq","type":"vec3"},{"name":"offset","type":"vec3"}],"out":[{"name":"noise","type":"float"}]}},"constant1":{"type":"constant","params":{"float":1},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"constant2":{"type":"constant","params":{"float":0.48},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"constant3":{"type":"constant","params":{"float":0.5},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"constant3","output":"val"},{"index":1,"inputName":"preAdd","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"clamp1":{"type":"clamp","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"min":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"max":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"abs1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"min","type":"float"},{"name":"max","type":"float"}],"out":[{"name":"val","type":"float"}]}},"abs1":{"type":"abs","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"in","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.05},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"globals1","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[null,{"index":1,"inputName":"y","node":"multAdd2","output":"val"}]},"attribute1":{"type":"attribute","params":{"name":"restP","type":2},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}}},"params":{"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-main","type":"MeshStandardMaterial","name":"/geo1/MAT/meshStandardBuilder1","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder3":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"oklabToRgb1","output":"rgb"}]},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"oklab","node":"add1","output":"sum"}]},"attribute1":{"type":"attribute","params":{"name":"restP","type":2},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"noise1":{"type":"noise","params":{"type":5,"outputType":3,"amp":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0,0,0],"overriden_options":{}},"position":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"freq":{"type":"vector4","default_value":[1,1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.22,0.22,0.22,0.22]},"offset":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":4,"inputs":[{"index":0,"inputName":"amp","node":"floatToVec3_2","output":"vec3"},{"index":1,"inputName":"position","node":"vec3ToVec4_1","output":"vec4"}],"connection_points":{"in":[{"name":"amp","type":"vec3"},{"name":"position","type":"vec4"},{"name":"freq","type":"vec4"},{"name":"offset","type":"vec4"}],"out":[{"name":"noise","type":"vec3"}]}},"vec3ToVec4_1":{"type":"vec3ToVec4","params":{"vec3":{"overriden_options":{}},"w":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"vec3","node":"attribute1","output":"val"},{"index":1,"inputName":"w","node":"multAdd1","output":"val"}]},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.22},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"globals1","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"add1":{"type":"add","params":{"add0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":3,"inputs":[{"index":0,"inputName":"add0","node":"multAdd2","output":"val"},{"index":1,"inputName":"add1","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"add0","type":"vec3"},{"name":"add1","type":"vec3"},{"name":"add2","type":"vec3"}],"out":[{"name":"sum","type":"vec3"}]}},"multScalar1":{"type":"multScalar","params":{"value":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.05}},"inputs":[{"index":0,"inputName":"value","node":"attribute1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"mult","type":"float"}],"out":[{"name":"val","type":"vec3"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"postAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.3,0.5,0.9]}},"inputs":[{"index":0,"inputName":"value","node":"multScalar1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"preAdd","type":"vec3"},{"name":"mult","type":"vec3"},{"name":"postAdd","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"constant3":{"type":"constant","maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_2":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"raw_input":0.04,"overriden_options":{}},"z":{"raw_input":0.52,"overriden_options":{}}}}},"params":{"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder4":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"oklabToRgb1","output":"rgb"},{"index":3,"inputName":"alpha","node":"smoothstep1","output":"val"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.17},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.74},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"oklab","node":"add1","output":"sum"}]},"attribute1":{"type":"attribute","params":{"name":"restP","type":2},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"noise1":{"type":"noise","params":{"type":5,"outputType":3,"amp":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0,0,0],"overriden_options":{}},"position":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"freq":{"type":"vector4","default_value":[1,1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.22,0.22,0.22,0.22]},"offset":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":4,"inputs":[{"index":0,"inputName":"amp","node":"floatToVec3_2","output":"vec3"},{"index":1,"inputName":"position","node":"vec3ToVec4_1","output":"vec4"}],"connection_points":{"in":[{"name":"amp","type":"vec3"},{"name":"position","type":"vec4"},{"name":"freq","type":"vec4"},{"name":"offset","type":"vec4"}],"out":[{"name":"noise","type":"vec3"}]}},"vec3ToVec4_1":{"type":"vec3ToVec4","params":{"vec3":{"overriden_options":{}},"w":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"vec3","node":"attribute1","output":"val"},{"index":1,"inputName":"w","node":"multAdd1","output":"val"}]},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.22},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"globals1","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"add1":{"type":"add","params":{"add0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":3,"inputs":[{"index":0,"inputName":"add0","node":"multAdd2","output":"val"},{"index":1,"inputName":"add1","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"add0","type":"vec3"},{"name":"add1","type":"vec3"},{"name":"add2","type":"vec3"}],"out":[{"name":"sum","type":"vec3"}]}},"multScalar1":{"type":"multScalar","params":{"value":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.05}},"inputs":[{"index":0,"inputName":"value","node":"attribute1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"mult","type":"float"}],"out":[{"name":"val","type":"vec3"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"postAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.3,0.5,0.9]}},"inputs":[{"index":0,"inputName":"value","node":"multScalar1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"preAdd","type":"vec3"},{"name":"mult","type":"vec3"},{"name":"postAdd","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"constant3":{"type":"constant","maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_2":{"type":"floatToVec3","params":{"y":0.04,"z":0.52}}},"params":{"transparent":1,"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"transparent":true,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder5":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"constant1","output":"val"},{"index":3,"inputName":"alpha","node":"smoothstep1","output":"val"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.56},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.5},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.651405637412793,0.02028856305209031,0.10224173307914941],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}}},"params":{"transparent":true,"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"transparent":true,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder6":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"constant1","output":"val"},null,null,null,{"index":6,"inputName":"roughness","node":"smoothstep1","output":"val"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.15},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.651405637412793,0.02028856305209031,0.10224173307914941],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"sin1":{"type":"sin","params":{"radians":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[{"index":0,"inputName":"radians","node":"multAdd1","output":"val"}],"connection_points":{"in":[{"name":"radians","type":"float"}],"out":[{"name":"val","type":"float"}]}},"abs1":{"type":"abs","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[{"index":0,"inputName":"in","node":"sin1","output":"val"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":14},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant2":{"type":"constant","maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}}},"params":{"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshPhysical1":{"type":"meshPhysical","params":{"metalness":1,"roughness":0,"sheen":0.88,"useIridescence":1,"iridescence":0}}}},"material2":{"type":"material","params":{"material":"../MAT/meshStandardBuilder1"},"inputs":["transform2"]},"transform2":{"type":"transform","params":{"t":[-2.032341512148976,1.0389819840828998,0]},"inputs":["restAttributes1"]},"merge1":{"type":"merge","params":{"inputsCount":7},"maxInputsCount":7,"inputs":["material2","material3","material4","material5","material6","material7"],"flags":{"display":true}},"restAttributes1":{"type":"restAttributes","inputs":["sphere1"]},"material3":{"type":"material","params":{"material":"../MAT/meshStandardBuilder2"},"inputs":["transform3"]},"transform3":{"type":"transform","params":{"t":[0.17477330994931028,1.0389819840828998,0]},"inputs":["restAttributes1"]},"material4":{"type":"material","params":{"material":"../MAT/meshStandardBuilder3"},"inputs":["transform4"]},"transform4":{"type":"transform","params":{"t":[2.4200140589514394,1.0389819840828998,0]},"inputs":["restAttributes1"]},"material5":{"type":"material","params":{"material":"../MAT/meshStandardBuilder4"},"inputs":["transform5"]},"transform5":{"type":"transform","params":{"t":[2.3561408993622077,3.2019039787880046,0]},"inputs":["restAttributes1"]},"material6":{"type":"material","params":{"material":"../MAT/meshStandardBuilder5"},"inputs":["transform6"]},"transform6":{"type":"transform","params":{"t":[0.08964682630602283,3.2019039787880046,0]},"inputs":["restAttributes1"]},"material7":{"type":"material","params":{"material":"../MAT/meshStandardBuilder6"},"inputs":["transform7"]},"transform7":{"type":"transform","params":{"t":[-2.2025652357431733,3.2019039787880046,0]},"inputs":["restAttributes1"]}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}},"ground":{"type":"geo","nodes":{"material1":{"type":"material","params":{"material":"../MAT/meshStandardBuilder1"},"inputs":["box1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"meshStandardBuilder1":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"mix1","output":"mix"}]},"vec3ToFloat1":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"vec","node":"globals1","output":"position"}]},"floatToVec2_1":{"type":"floatToVec2","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"x","node":"vec3ToFloat1","output":"x"},{"index":1,"inputName":"y","node":"vec3ToFloat1","output":"z"}]},"checkers1":{"type":"checkers","params":{"uv":{"overriden_options":{}},"freq":{"overriden_options":{}},"freqMult":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"uv","node":"floatToVec2_1","output":"vec2"}]},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"inputName":"value0","node":"constant1","output":"val"},{"index":1,"inputName":"value1","node":"constant2","output":"val"},{"index":2,"inputName":"blend","node":"checkers1","output":"checker"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.24313725490196078,0.5098039215686274,0.8549019607843137],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"type":4,"color":[0.047058823529411764,0.10196078431372549,0.17647058823529413],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}}},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":0,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}}}},"box1":{"type":"box","params":{"sizes":[9.98,1,9.98],"center":[0,-0.5,0]}}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"envMap":{"type":"envMap","inputs":["imageEnv"]},"imageEnv":{"type":"imageEXR","params":{"tminFilter":true,"tmagFilter":true,"tanisotropy":true,"useRendererMaxAnisotropy":true}},"image1":{"type":"image"}}},"lights":{"type":"geo","nodes":{"hemisphereLight1":{"type":"hemisphereLight","params":{"intensity":0.52}},"spotLight1":{"type":"spotLight","params":{"decay":0.1,"distance":10,"castShadow":1}},"polarTransform1":{"type":"polarTransform","params":{"center":[0,0.7,0],"latitude":25.2,"depth":6.4},"inputs":["spotLight1"]},"merge1":{"type":"merge","inputs":["hemisphereLight1","polarTransform1"],"flags":{"display":true}}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}},"cameras":{"type":"geo","nodes":{"perspectiveCamera1":{"type":"perspectiveCamera","params":{"position":[3.3,3.3,3.3]}},"cameraControls1":{"type":"cameraControls","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[0.26209981090049145,2.0635221791477,-0.5206587790593755]}}},"params":{"node":"cameraOrbitControls1"},"inputs":["perspectiveCamera1"],"flags":{"display":true}}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}}},"params":{"mainCameraPath":"/cameras/cameras:sopGroup/perspectiveCamera1"}},"ui":{"nodes":{"geo1":{"pos":[-50,-350],"nodes":{"sphere1":{"pos":[600,-300]},"MAT":{"pos":[-200,350],"selection":["meshPhysical1"],"nodes":{"meshStandard1":{"pos":[0,0]},"meshToon1":{"pos":[0,150]},"meshStandardBuilder2":{"pos":[0,500],"nodes":{"globals1":{"pos":[-950,0]},"output1":{"pos":[200,0]},"fresnel1":{"pos":[-700,150]},"smoothstep1":{"pos":[-500,50]},"constant1":{"pos":[-400,-250]},"constant2":{"pos":[-400,-100]},"mix1":{"pos":[-100,-50]},"rgbToOklab1":{"pos":[-250,-250]},"rgbToOklab2":{"pos":[-250,-100]},"oklabToRgb1":{"pos":[0,-50]}}},"meshStandardBuilder1":{"pos":[0,350],"selection":["attribute1"],"nodes":{"globals1":{"pos":[-800,0]},"output1":{"pos":[200,0]},"noise1":{"pos":[-400,250]},"constant1":{"pos":[0,-50]},"constant2":{"pos":[0,250]},"constant3":{"pos":[-400,50]},"multAdd1":{"pos":[-150,100]},"clamp1":{"pos":[0,150]},"abs1":{"pos":[-250,250]},"multAdd2":{"pos":[-650,400]},"floatToVec3_1":{"pos":[-550,400]},"attribute1":{"pos":[-600,-100]}}},"meshStandardBuilder3":{"pos":[0,650],"selection":["oklabToRgb1","attribute1","noise1","vec3ToVec4_1","multAdd1","add1","multScalar1","multAdd2","constant3","floatToVec3_2"],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"oklabToRgb1":{"pos":[-200,-250]},"attribute1":{"pos":[-950,-250]},"noise1":{"pos":[-500,-150]},"vec3ToVec4_1":{"pos":[-850,-150]},"multAdd1":{"pos":[-1050,-50]},"add1":{"pos":[-350,-250]},"multScalar1":{"pos":[-750,-300]},"multAdd2":{"pos":[-600,-300]},"constant3":{"pos":[-750,-50]},"floatToVec3_2":{"pos":[-650,-50]}}},"meshStandardBuilder4":{"pos":[0,800],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"fresnel1":{"pos":[-950,200]},"smoothstep1":{"pos":[-750,100]},"oklabToRgb1":{"pos":[-50,-400]},"attribute1":{"pos":[-800,-400]},"noise1":{"pos":[-350,-300]},"vec3ToVec4_1":{"pos":[-700,-300]},"multAdd1":{"pos":[-900,-200]},"add1":{"pos":[-200,-400]},"multScalar1":{"pos":[-600,-450]},"multAdd2":{"pos":[-450,-450]},"constant3":{"pos":[-600,-200]},"floatToVec3_2":{"pos":[-500,-200]}}},"meshStandardBuilder5":{"pos":[0,950],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"fresnel1":{"pos":[-950,150]},"smoothstep1":{"pos":[-750,100]},"constant1":{"pos":[-300,-500]}}},"meshStandardBuilder6":{"pos":[0,1100],"selection":["smoothstep1"],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"fresnel1":{"pos":[-950,150]},"smoothstep1":{"pos":[-50,50]},"constant1":{"pos":[-300,-500]},"sin1":{"pos":[-550,-100]},"abs1":{"pos":[-400,-100]},"multAdd1":{"pos":[-750,-100]},"constant2":{"pos":[200,250]}}},"meshPhysical1":{"pos":[0,1250]}}},"material2":{"pos":[250,350]},"transform2":{"pos":[250,200]},"merge1":{"pos":[750,800]},"restAttributes1":{"pos":[600,-150]},"material3":{"pos":[450,350]},"transform3":{"pos":[450,200]},"material4":{"pos":[650,350]},"transform4":{"pos":[650,200]},"material5":{"pos":[850,250]},"transform5":{"pos":[850,100]},"material6":{"pos":[1050,250]},"transform6":{"pos":[1050,100]},"material7":{"pos":[1250,250]},"transform7":{"pos":[1250,100]}}},"ground":{"pos":[-50,-450],"nodes":{"material1":{"pos":[0,300]},"MAT":{"pos":[-200,300],"nodes":{"meshStandardBuilder1":{"pos":[0,200],"nodes":{"globals1":{"pos":[-450,0]},"output1":{"pos":[400,0]},"vec3ToFloat1":{"pos":[-200,200]},"floatToVec2_1":{"pos":[-100,200]},"checkers1":{"pos":[50,200]},"mix1":{"pos":[250,0]},"constant1":{"pos":[50,-150]},"constant2":{"pos":[0,0]}}}}},"box1":{"pos":[0,100]}}},"COP":{"pos":[-300,-50],"selection":["image1"],"nodes":{"envMap":{"pos":[50,250]},"imageEnv":{"pos":[50,100]},"image1":{"pos":[-200,100]}}},"lights":{"pos":[-50,-250],"nodes":{"hemisphereLight1":{"pos":[50,-50]},"spotLight1":{"pos":[300,-50]},"polarTransform1":{"pos":[300,150]},"merge1":{"pos":[100,300]}}},"cameras":{"pos":[-50,-150],"nodes":{"perspectiveCamera1":{"pos":[0,-50]},"cameraControls1":{"pos":[0,150],"nodes":{"cameraOrbitControls1":{"pos":[0,0]}}}}}}},"shaders":{"/geo1/MAT/meshStandardBuilder2":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder1":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder3":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder4":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder5":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder6":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/ground/MAT/meshStandardBuilder1":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"}},"jsFunctionBodies":{}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.6373117033603708,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/cameras/cameras:sopGroup/perspectiveCamera1","isViewerInitLayoutData":true,"linkIndex":1,"overlayedNetwork":{"allowed":false,"displayed":false}}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":42,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-782.8653643250636,"y":-321.7132321336815},"zoom":0.5696912299262147},"history":{"2":{"position":{"x":62.54553192632958,"y":223.1583293886238},"zoom":1.0222221069335933},"36":{"position":{"x":-782.8653643250636,"y":-321.7132321336815},"zoom":0.5696912299262147},"209":{"position":{"x":-226.08697638124295,"y":-40.97827113030884},"zoom":1.0222221069335933},"441":{"position":{"x":-258.2608986924896,"y":-1082.9349047446437},"zoom":1.0222221069335933},"1105":{"position":{"x":353.63168842056365,"y":-92.32189277428509},"zoom":0.7682221069335925},"1471":{"position":{"x":292.98110301946434,"y":-167.7650084738139},"zoom":0.7502221069335931},"2146":{"position":{"x":329.6268554216961,"y":48.174996803566046},"zoom":0.540222106933593},"2917":{"position":{"x":278.110739677538,"y":220.77100766630429},"zoom":0.5122221069335928},"3473":{"position":{"x":316.115728528011,"y":26.997950058604573},"zoom":0.7186912299262148},"4098":{"position":{"x":216.39762340091883,"y":-166.78017574495718},"zoom":0.488222106933593},"5162":{"position":{"x":0,"y":0},"zoom":1.0222221069335933}},"paramsDisplayed":false,"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/geo1","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/geo1","/","/lights","/","/geo1","/geo1/MAT/meshStandardBuilder6","/geo1/MAT","/geo1/MAT/meshStandardBuilder6","/geo1/MAT","/geo1","/geo1/MAT","/geo1","/geo1/MAT","/geo1","/geo1/MAT","/geo1","/","/","/geo1"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":18,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"checkRemoteAssetsUse":true,"minimizeFilesCount":false},"paramsModal":[]}
Used nodes
cop/envMap;cop/image;cop/imageEXR;event/cameraOrbitControls;mat/meshPhysical;mat/meshStandard;mat/meshStandardBuilder;mat/meshToon;obj/copNetwork;obj/geo;sop/box;sop/cameraControls;sop/hemisphereLight;sop/material;sop/materialsNetwork;sop/merge;sop/perspectiveCamera;sop/polarTransform;sop/restAttributes;sop/sphere;sop/spotLight;sop/transform
Used operations
Used modules
Used assemblers
GL_MESH_STANDARD
Used integrations
[]
Used assets
Nodes map
{"/geo1":"obj/geo","/geo1/sphere1":"sop/sphere","/geo1/MAT":"sop/materialsNetwork","/geo1/MAT/meshStandard1":"mat/meshStandard","/geo1/MAT/meshToon1":"mat/meshToon","/geo1/MAT/meshStandardBuilder2":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder1":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder3":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder4":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder5":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder6":"mat/meshStandardBuilder","/geo1/MAT/meshPhysical1":"mat/meshPhysical","/geo1/material2":"sop/material","/geo1/transform2":"sop/transform","/geo1/merge1":"sop/merge","/geo1/restAttributes1":"sop/restAttributes","/geo1/material3":"sop/material","/geo1/transform3":"sop/transform","/geo1/material4":"sop/material","/geo1/transform4":"sop/transform","/geo1/material5":"sop/material","/geo1/transform5":"sop/transform","/geo1/material6":"sop/material","/geo1/transform6":"sop/transform","/geo1/material7":"sop/material","/geo1/transform7":"sop/transform","/ground":"obj/geo","/ground/material1":"sop/material","/ground/MAT":"sop/materialsNetwork","/ground/MAT/meshStandardBuilder1":"mat/meshStandardBuilder","/ground/box1":"sop/box","/COP":"obj/copNetwork","/COP/envMap":"cop/envMap","/COP/imageEnv":"cop/imageEXR","/COP/image1":"cop/image","/lights":"obj/geo","/lights/hemisphereLight1":"sop/hemisphereLight","/lights/spotLight1":"sop/spotLight","/lights/polarTransform1":"sop/polarTransform","/lights/merge1":"sop/merge","/cameras":"obj/geo","/cameras/perspectiveCamera1":"sop/perspectiveCamera","/cameras/cameraControls1":"sop/cameraControls","/cameras/cameraControls1/cameraOrbitControls1":"event/cameraOrbitControls"}
Js version
Editor version
Engine version
Name
*
Code
{"properties":{"frame":25123,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/cameras/cameras:sopGroup/perspectiveCamera1","versions":{"polygonjs":"1.5.85"}},"root":{"type":"root","nodes":{"geo1":{"type":"geo","nodes":{"sphere1":{"type":"sphere"},"MAT":{"type":"materialsNetwork","nodes":{"meshStandard1":{"type":"meshStandard","params":{"useMap":1,"map":"../../../COP/image1","useEnvMap":1,"envMap":"../../../COP/envMap","metalness":1,"roughness":0}},"meshToon1":{"type":"meshToon"},"meshStandardBuilder2":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"oklabToRgb1","output":"rgb"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.17},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.74},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.02028856305209031,0.24620132669705552,0.651405637412793],"asColor":1},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"type":4,"color":[0.02121901037134225,0.4286904966038916,0.1412632911304446],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[{"index":0,"inputName":"value0","node":"rgbToOklab1","output":"oklab"},{"index":1,"inputName":"value1","node":"rgbToOklab2","output":"oklab"},{"index":2,"inputName":"blend","node":"smoothstep1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}},"rgbToOklab1":{"type":"rgbToOklab","params":{"rgb":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"rgb","node":"constant1","output":"val"}]},"rgbToOklab2":{"type":"rgbToOklab","params":{"rgb":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"rgb","node":"constant2","output":"val"}]},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"oklab","node":"mix1","output":"mix"}]}},"params":{"useEnvMap":1,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-main","type":"MeshStandardMaterial","name":"/geo1/MAT/meshStandardBuilder2","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder2-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder1":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,null,null,null,{"index":5,"inputName":"metalness","node":"constant1","output":"val"},{"index":6,"inputName":"roughness","node":"clamp1","output":"val"}]},"noise1":{"type":"noise","params":{"outputType":1,"amp":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":5.5200000000000005},"position":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"freq":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"offset":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"maxInputsCount":4,"inputs":[null,{"index":1,"inputName":"position","node":"attribute1","output":"val"},null,{"index":3,"inputName":"offset","node":"floatToVec3_1","output":"vec3"}],"connection_points":{"in":[{"name":"amp","type":"float"},{"name":"position","type":"vec3"},{"name":"freq","type":"vec3"},{"name":"offset","type":"vec3"}],"out":[{"name":"noise","type":"float"}]}},"constant1":{"type":"constant","params":{"float":1},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"constant2":{"type":"constant","params":{"float":0.48},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"constant3":{"type":"constant","params":{"float":0.5},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"constant3","output":"val"},{"index":1,"inputName":"preAdd","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"clamp1":{"type":"clamp","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"min":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"max":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"abs1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"min","type":"float"},{"name":"max","type":"float"}],"out":[{"name":"val","type":"float"}]}},"abs1":{"type":"abs","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"in","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.05},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"globals1","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[null,{"index":1,"inputName":"y","node":"multAdd2","output":"val"}]},"attribute1":{"type":"attribute","params":{"name":"restP","type":2},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}}},"params":{"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-main","type":"MeshStandardMaterial","name":"/geo1/MAT/meshStandardBuilder1","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder1-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder3":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"oklabToRgb1","output":"rgb"}]},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"oklab","node":"add1","output":"sum"}]},"attribute1":{"type":"attribute","params":{"name":"restP","type":2},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"noise1":{"type":"noise","params":{"type":5,"outputType":3,"amp":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0,0,0],"overriden_options":{}},"position":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"freq":{"type":"vector4","default_value":[1,1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.22,0.22,0.22,0.22]},"offset":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":4,"inputs":[{"index":0,"inputName":"amp","node":"floatToVec3_2","output":"vec3"},{"index":1,"inputName":"position","node":"vec3ToVec4_1","output":"vec4"}],"connection_points":{"in":[{"name":"amp","type":"vec3"},{"name":"position","type":"vec4"},{"name":"freq","type":"vec4"},{"name":"offset","type":"vec4"}],"out":[{"name":"noise","type":"vec3"}]}},"vec3ToVec4_1":{"type":"vec3ToVec4","params":{"vec3":{"overriden_options":{}},"w":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"vec3","node":"attribute1","output":"val"},{"index":1,"inputName":"w","node":"multAdd1","output":"val"}]},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.22},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"globals1","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"add1":{"type":"add","params":{"add0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":3,"inputs":[{"index":0,"inputName":"add0","node":"multAdd2","output":"val"},{"index":1,"inputName":"add1","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"add0","type":"vec3"},{"name":"add1","type":"vec3"},{"name":"add2","type":"vec3"}],"out":[{"name":"sum","type":"vec3"}]}},"multScalar1":{"type":"multScalar","params":{"value":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.05}},"inputs":[{"index":0,"inputName":"value","node":"attribute1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"mult","type":"float"}],"out":[{"name":"val","type":"vec3"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"postAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.3,0.5,0.9]}},"inputs":[{"index":0,"inputName":"value","node":"multScalar1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"preAdd","type":"vec3"},{"name":"mult","type":"vec3"},{"name":"postAdd","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"constant3":{"type":"constant","maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_2":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"raw_input":0.04,"overriden_options":{}},"z":{"raw_input":0.52,"overriden_options":{}}}}},"params":{"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder3-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder4":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"oklabToRgb1","output":"rgb"},{"index":3,"inputName":"alpha","node":"smoothstep1","output":"val"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.17},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.74},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"oklab","node":"add1","output":"sum"}]},"attribute1":{"type":"attribute","params":{"name":"restP","type":2},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"noise1":{"type":"noise","params":{"type":5,"outputType":3,"amp":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0,0,0],"overriden_options":{}},"position":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"freq":{"type":"vector4","default_value":[1,1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.22,0.22,0.22,0.22]},"offset":{"type":"vector4","default_value":[0,0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":4,"inputs":[{"index":0,"inputName":"amp","node":"floatToVec3_2","output":"vec3"},{"index":1,"inputName":"position","node":"vec3ToVec4_1","output":"vec4"}],"connection_points":{"in":[{"name":"amp","type":"vec3"},{"name":"position","type":"vec4"},{"name":"freq","type":"vec4"},{"name":"offset","type":"vec4"}],"out":[{"name":"noise","type":"vec3"}]}},"vec3ToVec4_1":{"type":"vec3ToVec4","params":{"vec3":{"overriden_options":{}},"w":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"vec3","node":"attribute1","output":"val"},{"index":1,"inputName":"w","node":"multAdd1","output":"val"}]},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.22},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"globals1","output":"time"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"add1":{"type":"add","params":{"add0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"add2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"maxInputsCount":3,"inputs":[{"index":0,"inputName":"add0","node":"multAdd2","output":"val"},{"index":1,"inputName":"add1","node":"noise1","output":"noise"}],"connection_points":{"in":[{"name":"add0","type":"vec3"},{"name":"add1","type":"vec3"},{"name":"add2","type":"vec3"}],"out":[{"name":"sum","type":"vec3"}]}},"multScalar1":{"type":"multScalar","params":{"value":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.05}},"inputs":[{"index":0,"inputName":"value","node":"attribute1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"mult","type":"float"}],"out":[{"name":"val","type":"vec3"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}},"preAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"vector3","default_value":[1,1,1],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"postAdd":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":[0.3,0.5,0.9]}},"inputs":[{"index":0,"inputName":"value","node":"multScalar1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec3"},{"name":"preAdd","type":"vec3"},{"name":"mult","type":"vec3"},{"name":"postAdd","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"constant3":{"type":"constant","maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec3_2":{"type":"floatToVec3","params":{"y":0.04,"z":0.52}}},"params":{"transparent":1,"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"transparent":true,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder4-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder5":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"constant1","output":"val"},{"index":3,"inputName":"alpha","node":"smoothstep1","output":"val"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.56},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.5},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.651405637412793,0.02028856305209031,0.10224173307914941],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}}},"params":{"transparent":true,"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"transparent":true,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder5-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":true,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshStandardBuilder6":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"constant1","output":"val"},null,null,null,{"index":6,"inputName":"roughness","node":"smoothstep1","output":"val"}]},"fresnel1":{"type":"fresnel","params":{"worldPosition":{"overriden_options":{}},"worldNormal":{"overriden_options":{}},"cameraPosition":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"worldPosition","node":"globals1","output":"worldPosition"},{"index":1,"inputName":"worldNormal","node":"globals1","output":"worldNormal"},{"index":2,"inputName":"cameraPosition","node":"globals1","output":"cameraPosition"}]},"smoothstep1":{"type":"smoothstep","params":{"edge0":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":0.15},"edge1":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"x":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[null,null,{"index":2,"inputName":"x","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"edge0","type":"float"},{"name":"edge1","type":"float"},{"name":"x","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.651405637412793,0.02028856305209031,0.10224173307914941],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"sin1":{"type":"sin","params":{"radians":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[{"index":0,"inputName":"radians","node":"multAdd1","output":"val"}],"connection_points":{"in":[{"name":"radians","type":"float"}],"out":[{"name":"val","type":"float"}]}},"abs1":{"type":"abs","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}}},"inputs":[{"index":0,"inputName":"in","node":"sin1","output":"val"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false,"computeOnDirty":true,"dependentOnFoundParam":false},"overriden_options":{}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false},"raw_input":14},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true,"computeOnDirty":true,"dependentOnFoundParam":false}}},"inputs":[{"index":0,"inputName":"value","node":"fresnel1","output":"fresnel"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant2":{"type":"constant","maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}}},"params":{"useEnvMap":true,"envMap":"../../../COP/envMap","metalness":1},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":1,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"forceSinglePass":true,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshStandardBuilder6-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}},"meshPhysical1":{"type":"meshPhysical","params":{"metalness":1,"roughness":0,"sheen":0.88,"useIridescence":1,"iridescence":0}}}},"material2":{"type":"material","params":{"material":"../MAT/meshStandardBuilder1"},"inputs":["transform2"]},"transform2":{"type":"transform","params":{"t":[-2.032341512148976,1.0389819840828998,0]},"inputs":["restAttributes1"]},"merge1":{"type":"merge","params":{"inputsCount":7},"maxInputsCount":7,"inputs":["material2","material3","material4","material5","material6","material7"],"flags":{"display":true}},"restAttributes1":{"type":"restAttributes","inputs":["sphere1"]},"material3":{"type":"material","params":{"material":"../MAT/meshStandardBuilder2"},"inputs":["transform3"]},"transform3":{"type":"transform","params":{"t":[0.17477330994931028,1.0389819840828998,0]},"inputs":["restAttributes1"]},"material4":{"type":"material","params":{"material":"../MAT/meshStandardBuilder3"},"inputs":["transform4"]},"transform4":{"type":"transform","params":{"t":[2.4200140589514394,1.0389819840828998,0]},"inputs":["restAttributes1"]},"material5":{"type":"material","params":{"material":"../MAT/meshStandardBuilder4"},"inputs":["transform5"]},"transform5":{"type":"transform","params":{"t":[2.3561408993622077,3.2019039787880046,0]},"inputs":["restAttributes1"]},"material6":{"type":"material","params":{"material":"../MAT/meshStandardBuilder5"},"inputs":["transform6"]},"transform6":{"type":"transform","params":{"t":[0.08964682630602283,3.2019039787880046,0]},"inputs":["restAttributes1"]},"material7":{"type":"material","params":{"material":"../MAT/meshStandardBuilder6"},"inputs":["transform7"]},"transform7":{"type":"transform","params":{"t":[-2.2025652357431733,3.2019039787880046,0]},"inputs":["restAttributes1"]}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}},"ground":{"type":"geo","nodes":{"material1":{"type":"material","params":{"material":"../MAT/meshStandardBuilder1"},"inputs":["box1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"meshStandardBuilder1":{"type":"meshStandardBuilder","nodes":{"globals1":{"type":"globals"},"output1":{"type":"output","inputs":[null,null,{"index":2,"inputName":"color","node":"mix1","output":"mix"}]},"vec3ToFloat1":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"vec","node":"globals1","output":"position"}]},"floatToVec2_1":{"type":"floatToVec2","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"x","node":"vec3ToFloat1","output":"x"},{"index":1,"inputName":"y","node":"vec3ToFloat1","output":"z"}]},"checkers1":{"type":"checkers","params":{"uv":{"overriden_options":{}},"freq":{"overriden_options":{}},"freqMult":{"overriden_options":{}}},"inputs":[{"index":0,"inputName":"uv","node":"floatToVec2_1","output":"vec2"}]},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"inputName":"value0","node":"constant1","output":"val"},{"index":1,"inputName":"value1","node":"constant2","output":"val"},{"index":2,"inputName":"blend","node":"checkers1","output":"checker"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.24313725490196078,0.5098039215686274,0.8549019607843137],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"type":4,"color":[0.047058823529411764,0.10196078431372549,0.17647058823529413],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}}},"persisted_config":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-main","type":"MeshStandardMaterial","color":16777215,"roughness":1,"metalness":0,"emissive":0,"envMapIntensity":1,"blendColor":0,"fog":false},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-customDepthMaterial","type":"MeshDepthMaterial","name":"customDepthMaterial","side":1,"blendColor":0,"depthPacking":3201},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDistanceMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-customDistanceMaterial","type":"MeshDistanceMaterial","name":"customDistanceMaterial","blendColor":0},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.6,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-customDepthDOFMaterial","type":"MeshDepthMaterial","name":"customDepthDOFMaterial","blendColor":0,"depthPacking":3200},"onBeforeCompileDataJSONWithoutShaders":{"paramConfigs":[],"timeDependent":false,"resolutionDependent":false,"raymarchingLightsWorldCoordsDependent":false}}}}}}},"box1":{"type":"box","params":{"sizes":[9.98,1,9.98],"center":[0,-0.5,0]}}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"envMap":{"type":"envMap","inputs":["imageEnv"]},"imageEnv":{"type":"imageEXR","params":{"tminFilter":true,"tmagFilter":true,"tanisotropy":true,"useRendererMaxAnisotropy":true}},"image1":{"type":"image"}}},"lights":{"type":"geo","nodes":{"hemisphereLight1":{"type":"hemisphereLight","params":{"intensity":0.52}},"spotLight1":{"type":"spotLight","params":{"decay":0.1,"distance":10,"castShadow":1}},"polarTransform1":{"type":"polarTransform","params":{"center":[0,0.7,0],"latitude":25.2,"depth":6.4},"inputs":["spotLight1"]},"merge1":{"type":"merge","inputs":["hemisphereLight1","polarTransform1"],"flags":{"display":true}}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}},"cameras":{"type":"geo","nodes":{"perspectiveCamera1":{"type":"perspectiveCamera","params":{"position":[3.3,3.3,3.3]}},"cameraControls1":{"type":"cameraControls","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[0.26209981090049145,2.0635221791477,-0.5206587790593755]}}},"params":{"node":"cameraOrbitControls1"},"inputs":["perspectiveCamera1"],"flags":{"display":true}}},"params":{"CADLinearTolerance":{"overriden_options":{"callback":"{}"}},"CADAngularTolerance":{"overriden_options":{"callback":"{}"}},"CADCurveAbscissa":{"overriden_options":{"callback":"{}"}},"CADCurveTolerance":{"overriden_options":{"callback":"{}"}},"CADDisplayEdges":{"overriden_options":{"callback":"{}"}},"CADEdgesColor":{"overriden_options":{"callback":"{}"}},"CADDisplayMeshes":{"overriden_options":{"callback":"{}"}},"CADMeshesColor":{"overriden_options":{"callback":"{}"}},"CADWireframe":{"overriden_options":{"callback":"{}"}},"CSGFacetAngle":{"overriden_options":{"callback":"{}"}},"CSGLinesColor":{"overriden_options":{"callback":"{}"}},"CSGMeshesColor":{"overriden_options":{"callback":"{}"}},"CSGWireframe":{"overriden_options":{"callback":"{}"}},"QUADTriangles":{"overriden_options":{"callback":"{}"}},"QUADWireframe":{"overriden_options":{"callback":"{}"}},"TetScale":{"overriden_options":{"callback":"{}"}},"TetDisplayLines":{"overriden_options":{"callback":"{}"}},"TetDisplaySharedFaces":{"overriden_options":{"callback":"{}"}},"TetDisplayPoints":{"overriden_options":{"callback":"{}"}},"TetDisplayCenter":{"overriden_options":{"callback":"{}"}},"TetDisplaySphere":{"overriden_options":{"callback":"{}"}}},"flags":{"display":true}}},"params":{"mainCameraPath":"/cameras/cameras:sopGroup/perspectiveCamera1"}},"ui":{"nodes":{"geo1":{"pos":[-50,-350],"nodes":{"sphere1":{"pos":[600,-300]},"MAT":{"pos":[-200,350],"selection":["meshPhysical1"],"nodes":{"meshStandard1":{"pos":[0,0]},"meshToon1":{"pos":[0,150]},"meshStandardBuilder2":{"pos":[0,500],"nodes":{"globals1":{"pos":[-950,0]},"output1":{"pos":[200,0]},"fresnel1":{"pos":[-700,150]},"smoothstep1":{"pos":[-500,50]},"constant1":{"pos":[-400,-250]},"constant2":{"pos":[-400,-100]},"mix1":{"pos":[-100,-50]},"rgbToOklab1":{"pos":[-250,-250]},"rgbToOklab2":{"pos":[-250,-100]},"oklabToRgb1":{"pos":[0,-50]}}},"meshStandardBuilder1":{"pos":[0,350],"selection":["attribute1"],"nodes":{"globals1":{"pos":[-800,0]},"output1":{"pos":[200,0]},"noise1":{"pos":[-400,250]},"constant1":{"pos":[0,-50]},"constant2":{"pos":[0,250]},"constant3":{"pos":[-400,50]},"multAdd1":{"pos":[-150,100]},"clamp1":{"pos":[0,150]},"abs1":{"pos":[-250,250]},"multAdd2":{"pos":[-650,400]},"floatToVec3_1":{"pos":[-550,400]},"attribute1":{"pos":[-600,-100]}}},"meshStandardBuilder3":{"pos":[0,650],"selection":["oklabToRgb1","attribute1","noise1","vec3ToVec4_1","multAdd1","add1","multScalar1","multAdd2","constant3","floatToVec3_2"],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"oklabToRgb1":{"pos":[-200,-250]},"attribute1":{"pos":[-950,-250]},"noise1":{"pos":[-500,-150]},"vec3ToVec4_1":{"pos":[-850,-150]},"multAdd1":{"pos":[-1050,-50]},"add1":{"pos":[-350,-250]},"multScalar1":{"pos":[-750,-300]},"multAdd2":{"pos":[-600,-300]},"constant3":{"pos":[-750,-50]},"floatToVec3_2":{"pos":[-650,-50]}}},"meshStandardBuilder4":{"pos":[0,800],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"fresnel1":{"pos":[-950,200]},"smoothstep1":{"pos":[-750,100]},"oklabToRgb1":{"pos":[-50,-400]},"attribute1":{"pos":[-800,-400]},"noise1":{"pos":[-350,-300]},"vec3ToVec4_1":{"pos":[-700,-300]},"multAdd1":{"pos":[-900,-200]},"add1":{"pos":[-200,-400]},"multScalar1":{"pos":[-600,-450]},"multAdd2":{"pos":[-450,-450]},"constant3":{"pos":[-600,-200]},"floatToVec3_2":{"pos":[-500,-200]}}},"meshStandardBuilder5":{"pos":[0,950],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"fresnel1":{"pos":[-950,150]},"smoothstep1":{"pos":[-750,100]},"constant1":{"pos":[-300,-500]}}},"meshStandardBuilder6":{"pos":[0,1100],"selection":["smoothstep1"],"nodes":{"globals1":{"pos":[-1200,50]},"output1":{"pos":[550,0]},"fresnel1":{"pos":[-950,150]},"smoothstep1":{"pos":[-50,50]},"constant1":{"pos":[-300,-500]},"sin1":{"pos":[-550,-100]},"abs1":{"pos":[-400,-100]},"multAdd1":{"pos":[-750,-100]},"constant2":{"pos":[200,250]}}},"meshPhysical1":{"pos":[0,1250]}}},"material2":{"pos":[250,350]},"transform2":{"pos":[250,200]},"merge1":{"pos":[750,800]},"restAttributes1":{"pos":[600,-150]},"material3":{"pos":[450,350]},"transform3":{"pos":[450,200]},"material4":{"pos":[650,350]},"transform4":{"pos":[650,200]},"material5":{"pos":[850,250]},"transform5":{"pos":[850,100]},"material6":{"pos":[1050,250]},"transform6":{"pos":[1050,100]},"material7":{"pos":[1250,250]},"transform7":{"pos":[1250,100]}}},"ground":{"pos":[-50,-450],"nodes":{"material1":{"pos":[0,300]},"MAT":{"pos":[-200,300],"nodes":{"meshStandardBuilder1":{"pos":[0,200],"nodes":{"globals1":{"pos":[-450,0]},"output1":{"pos":[400,0]},"vec3ToFloat1":{"pos":[-200,200]},"floatToVec2_1":{"pos":[-100,200]},"checkers1":{"pos":[50,200]},"mix1":{"pos":[250,0]},"constant1":{"pos":[50,-150]},"constant2":{"pos":[0,0]}}}}},"box1":{"pos":[0,100]}}},"COP":{"pos":[-300,-50],"selection":["image1"],"nodes":{"envMap":{"pos":[50,250]},"imageEnv":{"pos":[50,100]},"image1":{"pos":[-200,100]}}},"lights":{"pos":[-50,-250],"nodes":{"hemisphereLight1":{"pos":[50,-50]},"spotLight1":{"pos":[300,-50]},"polarTransform1":{"pos":[300,150]},"merge1":{"pos":[100,300]}}},"cameras":{"pos":[-50,-150],"nodes":{"perspectiveCamera1":{"pos":[0,-50]},"cameraControls1":{"pos":[0,150],"nodes":{"cameraOrbitControls1":{"pos":[0,0]}}}}}}},"shaders":{"/geo1/MAT/meshStandardBuilder2":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n// /geo1/MAT/meshStandardBuilder2/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder2/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder2/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.02028856305209031, 0.24620132669705552, 0.651405637412793);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.02121901037134225, 0.4286904966038916, 0.1412632911304446);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab1\n\tvec3 v_POLY_rgbToOklab1_oklab = oklab_from_linear_srgb(v_POLY_constant1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/rgbToOklab2\n\tvec3 v_POLY_rgbToOklab2_oklab = oklab_from_linear_srgb(v_POLY_constant2_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_rgbToOklab1_oklab, v_POLY_rgbToOklab2_oklab, v_POLY_smoothstep1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_mix1_mix);\n\t\n\t// /geo1/MAT/meshStandardBuilder2/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder1":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder1/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\nfloat snoise(vec3 v)\n { \n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n\n// First corner\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n\n// Other corners\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxx;\n // x1 = x0 - i1 + 1.0 * C.xxx;\n // x2 = x0 - i2 + 2.0 * C.xxx;\n // x3 = x0 - 1.0 + 3.0 * C.xxx;\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; // 2.0*C.x = 1/3 = C.y\n vec3 x3 = x0 - D.yyy; // -1.0+3.0*C.x = -0.5 = -D.y\n\n// Permutations\n i = mod289(i); \n vec4 p = permute( permute( permute( \n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 )) \n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n\n// Gradients: 7x7 points over a square, mapped onto an octahedron.\n// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\n float n_ = 0.142857142857; // 1.0/7.0\n vec3 ns = n_ * D.wyz - D.xzx;\n\n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); // mod(p,7*7)\n\n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); // mod(j,N)\n\n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n\n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n\n //vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\n //vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n\n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n\n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n\n//Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n\n// Mix final noise value\n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1), \n dot(p2,x2), dot(p3,x3) ) );\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1(in vec3 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder1/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder1/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder1/constant1\n\tfloat v_POLY_constant1_val = 1.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/multAdd2\n\tfloat v_POLY_multAdd2_val = (0.05*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.0, v_POLY_multAdd2_val, 0.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/noise1\n\tfloat v_POLY_noise1_noise = 5.5200000000000005*fbm_snoise_geo1_MAT_meshStandardBuilder1_noise1((v_POLY_attribute1_val*vec3(1.0, 1.0, 1.0))+v_POLY_floatToVec3_1_vec3);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/abs1\n\tfloat v_POLY_abs1_val = abs(v_POLY_noise1_noise);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/clamp1\n\tfloat v_POLY_clamp1_val = clamp(v_POLY_abs1_val, 0.0, 1.0);\n\t\n\t// /geo1/MAT/meshStandardBuilder1/output1\n\tfloat POLY_metalness = v_POLY_constant1_val;\n\tfloat POLY_roughness = v_POLY_clamp1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder3":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder3/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder3/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder3/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder3_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder3/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder4":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder4/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n// /geo1/MAT/meshStandardBuilder4/noise1\n// Modulo 289 without a division (only multiplications)\nfloat mod289(float x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec2 mod289(vec2 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\nvec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n}\n// Modulo 7 without a division\nvec3 mod7(vec3 x) {\n return x - floor(x * (1.0 / 7.0)) * 7.0;\n}\n\n// Permutation polynomial: (34x^2 + x) mod 289\nfloat permute(float x) {\n return mod289(((x*34.0)+1.0)*x);\n}\nvec3 permute(vec3 x) {\n return mod289((34.0 * x + 1.0) * x);\n}\nvec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n}\n\nfloat taylorInvSqrt(float r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\nvec4 taylorInvSqrt(vec4 r)\n{\n return 1.79284291400159 - 0.85373472095314 * r;\n}\n\nvec2 fade(vec2 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\nvec4 fade(vec4 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n//\n// Description : Array and textureless GLSL 2D/3D/4D simplex \n// noise functions.\n// Author : Ian McEwan, Ashima Arts.\n// Maintainer : stegu\n// Lastmod : 20110822 (ijm)\n// License : Copyright (C) 2011 Ashima Arts. All rights reserved.\n// Distributed under the MIT License. See LICENSE file.\n// https://github.com/ashima/webgl-noise\n// https://github.com/stegu/webgl-noise\n// \n\n\n\n\n\n\n\nvec4 grad4(float j, vec4 ip)\n {\n const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\n vec4 p,s;\n\n p.xyz = floor( fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\n p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\n s = vec4(lessThan(p, vec4(0.0)));\n p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www; \n\n return p;\n }\n\t\t\t\t\t\t\n// (sqrt(5) - 1)/4 = F4, used once below\n#define F4 0.309016994374947451\n\nfloat snoise(vec4 v)\n {\n const vec4 C = vec4( 0.138196601125011, // (5 - sqrt(5))/20 G4\n 0.276393202250021, // 2 * G4\n 0.414589803375032, // 3 * G4\n -0.447213595499958); // -1 + 4 * G4\n\n// First corner\n vec4 i = floor(v + dot(v, vec4(F4)) );\n vec4 x0 = v - i + dot(i, C.xxxx);\n\n// Other corners\n\n// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\n vec4 i0;\n vec3 isX = step( x0.yzw, x0.xxx );\n vec3 isYZ = step( x0.zww, x0.yyz );\n// i0.x = dot( isX, vec3( 1.0 ) );\n i0.x = isX.x + isX.y + isX.z;\n i0.yzw = 1.0 - isX;\n// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\n i0.y += isYZ.x + isYZ.y;\n i0.zw += 1.0 - isYZ.xy;\n i0.z += isYZ.z;\n i0.w += 1.0 - isYZ.z;\n\n // i0 now contains the unique values 0,1,2,3 in each channel\n vec4 i3 = clamp( i0, 0.0, 1.0 );\n vec4 i2 = clamp( i0-1.0, 0.0, 1.0 );\n vec4 i1 = clamp( i0-2.0, 0.0, 1.0 );\n\n // x0 = x0 - 0.0 + 0.0 * C.xxxx\n // x1 = x0 - i1 + 1.0 * C.xxxx\n // x2 = x0 - i2 + 2.0 * C.xxxx\n // x3 = x0 - i3 + 3.0 * C.xxxx\n // x4 = x0 - 1.0 + 4.0 * C.xxxx\n vec4 x1 = x0 - i1 + C.xxxx;\n vec4 x2 = x0 - i2 + C.yyyy;\n vec4 x3 = x0 - i3 + C.zzzz;\n vec4 x4 = x0 + C.wwww;\n\n// Permutations\n i = mod289(i); \n float j0 = permute( permute( permute( permute(i.w) + i.z) + i.y) + i.x);\n vec4 j1 = permute( permute( permute( permute (\n i.w + vec4(i1.w, i2.w, i3.w, 1.0 ))\n + i.z + vec4(i1.z, i2.z, i3.z, 1.0 ))\n + i.y + vec4(i1.y, i2.y, i3.y, 1.0 ))\n + i.x + vec4(i1.x, i2.x, i3.x, 1.0 ));\n\n// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\n// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\n vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0) ;\n\n vec4 p0 = grad4(j0, ip);\n vec4 p1 = grad4(j1.x, ip);\n vec4 p2 = grad4(j1.y, ip);\n vec4 p3 = grad4(j1.z, ip);\n vec4 p4 = grad4(j1.w, ip);\n\n// Normalise gradients\n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n p4 *= taylorInvSqrt(dot(p4,p4));\n\n// Mix contributions from the five corners\n vec3 m0 = max(0.6 - vec3(dot(x0,x0), dot(x1,x1), dot(x2,x2)), 0.0);\n vec2 m1 = max(0.6 - vec2(dot(x3,x3), dot(x4,x4) ), 0.0);\n m0 = m0 * m0;\n m1 = m1 * m1;\n return 49.0 * ( dot(m0*m0, vec3( dot( p0, x0 ), dot( p1, x1 ), dot( p2, x2 )))\n + dot(m1*m1, vec2( dot( p3, x3 ), dot( p4, x4 ) ) ) ) ;\n\n }\n\n\nfloat fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1(in vec4 st) {\n\tfloat value = 0.0;\n\tfloat amplitude = 1.0;\n\tfor (int i = 0; i < 3; i++) {\n\t\tvalue += amplitude * snoise(st);\n\t\tst *= 2.0;\n\t\tamplitude *= 0.5;\n\t}\n\treturn value;\n}\n\n\n// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n//////////////////////////////////////////////////////////////////////\n//\n// Visualizing Björn Ottosson's \"oklab\" colorspace\n//\n// shadertoy implementation by mattz\n//\n// license CC0 (public domain)\n// https://creativecommons.org/share-your-work/public-domain/cc0/\n//\n// Click and drag to set lightness (mouse x) and chroma (mouse y).\n// Hue varies linearly across the image from left to right.\n//\n// While mouse is down, plotted curves show oklab components\n// L (red), a (green), and b (blue). \n//\n// To test the inverse mapping, the plotted curves are generated\n// by mapping the (pre-clipping) linear RGB color back to oklab \n// space.\n//\n// White bars on top of the image (and black bars on the bottom of\n// the image) indicate clipping when one or more of the R, G, B \n// components are greater than 1.0 (or less than 0.0 respectively).\n//\n// The color accompanying the black/white bar shows which channels\n// are out of gamut.\n//\n// Click in the bottom left to reset the view.\n//\n// Hit the 'G' key to toggle displaying a gamut test:\n//\n// * black pixels indicate that RGB values for some hues\n// were clipped to 0 at the given lightness/chroma pair.\n//\n// * white pixels indicate that RGB values for some hues\n// were clipped to 1 at the given lightness/chroma pair\n//\n// * gray pixels indicate that both types of clipping happened\n//\n// Hit the 'U' key to display a uniform sampling of linear sRGB \n// space, converted into oklab lightness (x position) and chroma\n// (y position) coordinates. If you mouse over a colored dot, the\n// spectrum on screen should include that exact color.\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// sRGB color transform and inverse from \n// https://bottosson.github.io/posts/colorwrong/#what-can-we-do%3F\n\nvec3 srgb_from_linear_srgb(vec3 x) {\n\n vec3 xlo = 12.92*x;\n vec3 xhi = 1.055 * pow(x, vec3(0.4166666666666667)) - 0.055;\n \n return mix(xlo, xhi, step(vec3(0.0031308), x));\n\n}\n\nvec3 linear_srgb_from_srgb(vec3 x) {\n\n vec3 xlo = x / 12.92;\n vec3 xhi = pow((x + 0.055)/(1.055), vec3(2.4));\n \n return mix(xlo, xhi, step(vec3(0.04045), x));\n\n}\n\n//////////////////////////////////////////////////////////////////////\n// oklab transform and inverse from\n// https://bottosson.github.io/posts/oklab/\n\n\nconst mat3 fwdA = mat3(1.0, 1.0, 1.0,\n 0.3963377774, -0.1055613458, -0.0894841775,\n 0.2158037573, -0.0638541728, -1.2914855480);\n \nconst mat3 fwdB = mat3(4.0767245293, -1.2681437731, -0.0041119885,\n -3.3072168827, 2.6093323231, -0.7034763098,\n 0.2307590544, -0.3411344290, 1.7068625689);\n\nconst mat3 invB = mat3(0.4121656120, 0.2118591070, 0.0883097947,\n 0.5362752080, 0.6807189584, 0.2818474174,\n 0.0514575653, 0.1074065790, 0.6302613616);\n \nconst mat3 invA = mat3(0.2104542553, 1.9779984951, 0.0259040371,\n 0.7936177850, -2.4285922050, 0.7827717662,\n -0.0040720468, 0.4505937099, -0.8086757660);\n\nvec3 oklab_from_linear_srgb(vec3 c) {\n\n vec3 lms = invB * c;\n \n return invA * (sign(lms)*pow(abs(lms), vec3(0.3333333333333)));\n \n}\n\nvec3 linear_srgb_from_oklab(vec3 c) {\n\n vec3 lms = fwdA * c;\n \n return fwdB * (lms * lms * lms);\n \n}\n\n\n// https://www.shadertoy.com/view/WtccD7\nconst float max_chroma = 0.33;\nvec3 uvToOklab(vec3 uvw){\n\n // setup oklab color\n float theta = 2.*3.141592653589793*uvw.x;\n \n float L = 0.8;\n float chroma = 0.1;\n \n //if (max(iMouse.x, iMouse.y) > 0.05 * iResolution.y) {\n L = uvw.y;//iMouse.x / iResolution.x;\n chroma = uvw.z * max_chroma;// / iResolution.y;\n //}\n \n float a = chroma*cos(theta);\n float b = chroma*sin(theta);\n \n vec3 lab = vec3(L, a, b);\n\treturn lab;\n\n // convert to rgb \n // vec3 rgb = linear_srgb_from_oklab(lab);\n\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder4/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /geo1/MAT/meshStandardBuilder4/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder4/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/floatToVec3_2\n\tvec3 v_POLY_floatToVec3_2_vec3 = vec3(0.0, 0.04, 0.52);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multScalar1\n\tvec3 v_POLY_multScalar1_val = (0.05*v_POLY_attribute1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.22*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshStandardBuilder4/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/multAdd2\n\tvec3 v_POLY_multAdd2_val = (vec3(1.0, 1.0, 1.0)*(v_POLY_multScalar1_val + vec3(0.0, 0.0, 0.0))) + vec3(0.3, 0.5, 0.9);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/vec3ToVec4_1\n\tvec4 v_POLY_vec3ToVec4_1_vec4 = vec4(v_POLY_attribute1_val.xyz, v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.17, 0.74, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/noise1\n\tfloat v_POLY_noise1_noisex = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(0.0, 0.0, 0.0, 0.0)))).x;\n\tfloat v_POLY_noise1_noisey = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(1000.0, 1000.0, 1000.0, 1000.0)))).y;\n\tfloat v_POLY_noise1_noisez = (v_POLY_floatToVec3_2_vec3*fbm_snoise_geo1_MAT_meshStandardBuilder4_noise1((v_POLY_vec3ToVec4_1_vec4*vec4(0.22, 0.22, 0.22, 0.22))+(vec4(0.0, 0.0, 0.0, 0.0)+vec4(2000.0, 2000.0, 2000.0, 2000.0)))).z;\n\tvec3 v_POLY_noise1_noise = vec3(v_POLY_noise1_noisex, v_POLY_noise1_noisey, v_POLY_noise1_noisez);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/add1\n\tvec3 v_POLY_add1_sum = (v_POLY_multAdd2_val + v_POLY_noise1_noise + vec3(0.0, 0.0, 0.0));\n\t\n\t// /geo1/MAT/meshStandardBuilder4/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_add1_sum);\n\t\n\t// /geo1/MAT/meshStandardBuilder4/output1\n\tdiffuseColor.xyz = v_POLY_oklabToRgb1_rgb;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder5":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder5/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nuniform float time;\n\n// /geo1/MAT/meshStandardBuilder5/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder5/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /geo1/MAT/meshStandardBuilder5/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.56, 0.5, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder5/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tdiffuseColor.a = v_POLY_smoothstep1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/geo1/MAT/meshStandardBuilder6":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/globals1\n\tv_POLY_globals1_worldPosition = modelMatrix * vec4( position, 1.0 );\n\tv_POLY_globals1_worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );\n\tv_POLY_globals1_cameraPosition = vec3(cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshStandardBuilder6/fresnel1\nfloat fresnel(vec4 worldPosition, vec3 worldNormal, vec3 cameraPosition){\n\treturn dot(\n\t\tnormalize(worldNormal),\n\t\tnormalize(cameraPosition - worldPosition.xyz)\n\t);\n}\n\n\n\n\n\n\n\n// /geo1/MAT/meshStandardBuilder6/globals1\nvarying vec4 v_POLY_globals1_worldPosition;\nvarying vec3 v_POLY_globals1_worldNormal;\nvarying vec3 v_POLY_globals1_cameraPosition;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshStandardBuilder6/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.651405637412793, 0.02028856305209031, 0.10224173307914941);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/fresnel1\n\tfloat v_POLY_fresnel1_fresnel = fresnel(v_POLY_globals1_worldPosition,v_POLY_globals1_worldNormal,v_POLY_globals1_cameraPosition);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/smoothstep1\n\tfloat v_POLY_smoothstep1_val = smoothstep(0.15, 1.0, v_POLY_fresnel1_fresnel);\n\t\n\t// /geo1/MAT/meshStandardBuilder6/output1\n\tdiffuseColor.xyz = v_POLY_constant1_val;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = v_POLY_smoothstep1_val;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"},"/ground/MAT/meshStandardBuilder1":{"vertex":"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n// removed:\n//\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}","fragment":"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive * POLY_emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat roughnessFactor = roughness * POLY_roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n\n\tfloat metalnessFactor = metalness * POLY_metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\nif(POLY_SSSModel.isActive){\n\tRE_Direct_Scattering(directLight, geometryNormal, geometryViewDir, POLY_SSSModel, reflectedLight);\n}\n\n\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}","customDepthMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n","customDistanceMaterial.vertex":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}","customDistanceMaterial.fragment":"\n// INSERT DEFINES\n\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\n\t#include <alphatest_fragment>\n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = packDepthToRGBA( dist );\n\n}\n","customDepthDOFMaterial.vertex":"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/globals1\n\tv_POLY_globals1_position = vec3(position);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tvec3 transformed = position;\n\tvec3 objectNormal = normal;\n\t#ifdef USE_TANGENT\n\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t#endif\n\n\n\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}","customDepthDOFMaterial.fragment":"\n// INSERT DEFINES\n\n\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include <common>\n\n\n\n// /ground/MAT/meshStandardBuilder1/checkers1\n// https://iquilezles.org/articles/checkerfiltering/\nfloat checkers(vec2 p) {\n\tvec2 s = sign(fract(p*.5)-.5);\n\treturn .5 - .5*s.x*s.y;\n}\nfloat checkersGrad( in vec2 p, in vec2 ddx, in vec2 ddy )\n{\n // filter kernel\n vec2 w = max(abs(ddx), abs(ddy)) + 0.01;\n // analytical integral (box filter)\n vec2 i = 2.0*(abs(fract((p-0.5*w)/2.0)-0.5)-abs(fract((p+0.5*w)/2.0)-0.5))/w;\n // xor pattern\n return 0.5 - 0.5*i.x*i.y;\n}\n\n\n\n\n\n\n\n\n// /ground/MAT/meshStandardBuilder1/globals1\nvarying vec3 v_POLY_globals1_position;\n\n\n\n\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvarying vec2 vHighPrecisionZW;\n\nstruct SSSModel {\n\tbool isActive;\n\tvec3 color;\n\tfloat thickness;\n\tfloat power;\n\tfloat scale;\n\tfloat distortion;\n\tfloat ambient;\n\tfloat attenuation;\n};\n\nvoid RE_Direct_Scattering(\n\tconst in IncidentLight directLight,\n\tconst in vec3 geometryNormal,\n\tconst in vec3 geometryViewDir,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometryNormal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometryViewDir, -scatteringHalf)), sssModel.power) * sssModel.scale;\n\tvec3 scatteringIllu = (scatteringDot + sssModel.ambient) * (sssModel.color * (1.0-sssModel.thickness));\n\treflectedLight.directDiffuse += scatteringIllu * sssModel.attenuation * directLight.color;\n}\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /ground/MAT/meshStandardBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.24313725490196078, 0.5098039215686274, 0.8549019607843137);\n\t\n\t// /ground/MAT/meshStandardBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.047058823529411764, 0.10196078431372549, 0.17647058823529413);\n\t\n\t// /ground/MAT/meshStandardBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_globals1_position.x;\n\tfloat v_POLY_vec3ToFloat1_z = v_POLY_globals1_position.z;\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_vec3ToFloat1_x, v_POLY_vec3ToFloat1_z);\n\t\n\t// /ground/MAT/meshStandardBuilder1/checkers1\n\tvec2 v_POLY_checkers1_coord = v_POLY_floatToVec2_1_vec2*vec2(1.0, 1.0)*1.0;\n\tfloat v_POLY_checkers1_checker = checkersGrad(v_POLY_checkers1_coord, dFdx(v_POLY_checkers1_coord), dFdy(v_POLY_checkers1_coord));\n\t\n\t// /ground/MAT/meshStandardBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant2_val, v_POLY_checkers1_checker);\n\t\n\t// /ground/MAT/meshStandardBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\n\tfloat POLY_metalness = 1.0;\n\tfloat POLY_roughness = 1.0;\n\tvec3 POLY_emissive = vec3(1.0, 1.0, 1.0);\n\tSSSModel POLY_SSSModel = SSSModel(/*isActive*/false,/*color*/vec3(1.0, 1.0, 1.0), /*thickness*/0.1, /*power*/2.0, /*scale*/16.0, /*distortion*/0.1,/*ambient*/0.4,/*attenuation*/0.8 );\n\n\n\n\n\t// INSERT BODY\n\t// the new body lines should be added before the alphatest_fragment\n\t// so that alpha is set before (which is really how it would be set if the alphamap_fragment above was used by the material node parameters)\n\n\t#include <alphatest_fragment>\n\n\t#include <logdepthbuf_fragment>\n\n\n\t// Higher precision equivalent of gl_FragCoord.z. This assumes depthRange has been left to its default values.\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), diffuseColor.a );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#endif\n\n}\n"}},"jsFunctionBodies":{}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.6373117033603708,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/cameras/cameras:sopGroup/perspectiveCamera1","isViewerInitLayoutData":true,"linkIndex":1,"overlayedNetwork":{"allowed":false,"displayed":false}}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":42,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-782.8653643250636,"y":-321.7132321336815},"zoom":0.5696912299262147},"history":{"2":{"position":{"x":62.54553192632958,"y":223.1583293886238},"zoom":1.0222221069335933},"36":{"position":{"x":-782.8653643250636,"y":-321.7132321336815},"zoom":0.5696912299262147},"209":{"position":{"x":-226.08697638124295,"y":-40.97827113030884},"zoom":1.0222221069335933},"441":{"position":{"x":-258.2608986924896,"y":-1082.9349047446437},"zoom":1.0222221069335933},"1105":{"position":{"x":353.63168842056365,"y":-92.32189277428509},"zoom":0.7682221069335925},"1471":{"position":{"x":292.98110301946434,"y":-167.7650084738139},"zoom":0.7502221069335931},"2146":{"position":{"x":329.6268554216961,"y":48.174996803566046},"zoom":0.540222106933593},"2917":{"position":{"x":278.110739677538,"y":220.77100766630429},"zoom":0.5122221069335928},"3473":{"position":{"x":316.115728528011,"y":26.997950058604573},"zoom":0.7186912299262148},"4098":{"position":{"x":216.39762340091883,"y":-166.78017574495718},"zoom":0.488222106933593},"5162":{"position":{"x":0,"y":0},"zoom":1.0222221069335933}},"paramsDisplayed":false,"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/geo1","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/geo1","/","/lights","/","/geo1","/geo1/MAT/meshStandardBuilder6","/geo1/MAT","/geo1/MAT/meshStandardBuilder6","/geo1/MAT","/geo1","/geo1/MAT","/geo1","/geo1/MAT","/geo1","/geo1/MAT","/geo1","/","/","/geo1"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":18,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"checkRemoteAssetsUse":true,"minimizeFilesCount":false},"paramsModal":[]}
Used nodes
cop/envMap;cop/image;cop/imageEXR;event/cameraOrbitControls;mat/meshPhysical;mat/meshStandard;mat/meshStandardBuilder;mat/meshToon;obj/copNetwork;obj/geo;sop/box;sop/cameraControls;sop/hemisphereLight;sop/material;sop/materialsNetwork;sop/merge;sop/perspectiveCamera;sop/polarTransform;sop/restAttributes;sop/sphere;sop/spotLight;sop/transform
Used operations
Used modules
Used assemblers
GL_MESH_STANDARD
Used integrations
[]
Used assets
Nodes map
{"/geo1":"obj/geo","/geo1/sphere1":"sop/sphere","/geo1/MAT":"sop/materialsNetwork","/geo1/MAT/meshStandard1":"mat/meshStandard","/geo1/MAT/meshToon1":"mat/meshToon","/geo1/MAT/meshStandardBuilder2":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder1":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder3":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder4":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder5":"mat/meshStandardBuilder","/geo1/MAT/meshStandardBuilder6":"mat/meshStandardBuilder","/geo1/MAT/meshPhysical1":"mat/meshPhysical","/geo1/material2":"sop/material","/geo1/transform2":"sop/transform","/geo1/merge1":"sop/merge","/geo1/restAttributes1":"sop/restAttributes","/geo1/material3":"sop/material","/geo1/transform3":"sop/transform","/geo1/material4":"sop/material","/geo1/transform4":"sop/transform","/geo1/material5":"sop/material","/geo1/transform5":"sop/transform","/geo1/material6":"sop/material","/geo1/transform6":"sop/transform","/geo1/material7":"sop/material","/geo1/transform7":"sop/transform","/ground":"obj/geo","/ground/material1":"sop/material","/ground/MAT":"sop/materialsNetwork","/ground/MAT/meshStandardBuilder1":"mat/meshStandardBuilder","/ground/box1":"sop/box","/COP":"obj/copNetwork","/COP/envMap":"cop/envMap","/COP/imageEnv":"cop/imageEXR","/COP/image1":"cop/image","/lights":"obj/geo","/lights/hemisphereLight1":"sop/hemisphereLight","/lights/spotLight1":"sop/spotLight","/lights/polarTransform1":"sop/polarTransform","/lights/merge1":"sop/merge","/cameras":"obj/geo","/cameras/perspectiveCamera1":"sop/perspectiveCamera","/cameras/cameraControls1":"sop/cameraControls","/cameras/cameraControls1/cameraOrbitControls1":"event/cameraOrbitControls"}
Js version
Editor version
Engine version
Logout
0%
There was a problem displaying your scene:
view scene source