{
	"type": "meshStandardBuilder",
	"nodes": {
		"constant1": {
			"type": "constant",
			"params": {
				"type": 4,
				"color": [
					0.3764705882352941,
					0.7529411764705882,
					0.9411764705882353
				],
				"asColor": true
			},
			"connection_points": {
				"in": [],
				"out": [
					{
						"name": "val",
						"type": "vec3"
					}
				]
			}
		},
		"globals1": {
			"type": "globals"
		},
		"output1": {
			"type": "output",
			"inputs": [
				null,
				null,
				{
					"index": 2,
					"node": "oklabToRgb1",
					"output": "rgb"
				}
			]
		},
		"attribute1": {
			"type": "attribute",
			"params": {
				"name": "restP",
				"type": 2
			},
			"connection_points": {
				"in": [],
				"out": [
					{
						"name": "val",
						"type": "vec3"
					}
				]
			}
		},
		"length1": {
			"type": "length",
			"params": {
				"x": {
					"type": "vector3",
					"default_value": [
						0,
						0,
						0
					],
					"options": {
						"spare": true,
						"editable": false
					}
				}
			},
			"inputs": [
				{
					"index": 0,
					"node": "attribute1",
					"output": "val"
				}
			],
			"connection_points": {
				"in": [
					{
						"name": "x",
						"type": "vec3"
					}
				],
				"out": [
					{
						"name": "val",
						"type": "float"
					}
				]
			}
		},
		"add1": {
			"type": "add",
			"params": {
				"add0": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": false
					}
				},
				"add1": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": false
					}
				},
				"add2": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": true
					}
				}
			},
			"maxInputsCount": 3,
			"inputs": [
				{
					"index": 0,
					"node": "length1",
					"output": "val"
				},
				{
					"index": 1,
					"node": "multAdd1",
					"output": "val"
				}
			],
			"connection_points": {
				"in": [
					{
						"name": "add0",
						"type": "float"
					},
					{
						"name": "add1",
						"type": "float"
					},
					{
						"name": "add2",
						"type": "float"
					}
				],
				"out": [
					{
						"name": "sum",
						"type": "float"
					}
				]
			}
		},
		"multAdd1": {
			"type": "multAdd",
			"params": {
				"value": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": false
					}
				},
				"preAdd": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": true
					}
				},
				"mult": {
					"type": "float",
					"default_value": 1,
					"options": {
						"spare": true,
						"editable": true
					},
					"raw_input": -0.5
				},
				"postAdd": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": true
					}
				}
			},
			"inputs": [
				{
					"index": 0,
					"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"
					}
				]
			}
		},
		"oklabToRgb1": {
			"type": "oklabToRgb",
			"params": {
				"oklab": {
					"overriden_options": {}
				}
			},
			"inputs": [
				{
					"index": 0,
					"node": "floatToVec3_1",
					"output": "vec3"
				}
			]
		},
		"floatToVec3_1": {
			"type": "floatToVec3",
			"params": {
				"x": {
					"raw_input": 0.75,
					"overriden_options": {}
				},
				"y": {
					"raw_input": 0.64,
					"overriden_options": {}
				},
				"z": {
					"raw_input": -1.5,
					"overriden_options": {}
				}
			},
			"inputs": [
				null,
				null,
				{
					"index": 2,
					"node": "cycle1",
					"output": "val"
				}
			]
		},
		"cycle1": {
			"type": "cycle",
			"params": {
				"in": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": false
					}
				},
				"min": {
					"type": "float",
					"default_value": 0,
					"options": {
						"spare": true,
						"editable": true
					},
					"raw_input": -1
				},
				"max": {
					"type": "float",
					"default_value": 1,
					"options": {
						"spare": true,
						"editable": true
					}
				}
			},
			"inputs": [
				{
					"index": 0,
					"node": "add1",
					"output": "sum"
				}
			],
			"connection_points": {
				"in": [
					{
						"name": "in",
						"type": "float"
					},
					{
						"name": "min",
						"type": "float"
					},
					{
						"name": "max",
						"type": "float"
					}
				],
				"out": [
					{
						"name": "val",
						"type": "float"
					}
				]
			}
		}
	},
	"params": {
		"metalness": 0,
		"roughness": 1
	},
	"persisted_config": {
		"material": {
			"metadata": {
				"version": 4.5,
				"type": "Material",
				"generator": "Material.toJSON"
			},
			"uuid": "/fxhash/MAT/meshStandardBuilder3-main",
			"type": "MeshStandardMaterial",
			"name": "/fxhash/MAT/meshStandardBuilder3",
			"color": 16777215,
			"roughness": 1,
			"metalness": 0,
			"emissive": 0,
			"envMapIntensity": 1,
			"depthFunc": 3,
			"depthTest": true,
			"depthWrite": true,
			"colorWrite": true,
			"stencilWrite": false,
			"stencilWriteMask": 255,
			"stencilFunc": 519,
			"stencilRef": 0,
			"stencilFuncMask": 255,
			"stencilFail": 7680,
			"stencilZFail": 7680,
			"stencilZPass": 7680
		},
		"onBeforeCompileDataJSON": {
			"vertexShader": "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n\n\n\n// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <uv_pars_vertex>\n#include <uv2_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#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 <uv2_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/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// 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}",
			"fragmentShader": "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define 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 SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n\n\n\n// /fxhash/MAT/meshStandardBuilder3/cycle1\nfloat cycle(float val, float val_min, float val_max){\n\tif(val >= val_min && val < val_max){\n\t\treturn val;\n\t} else {\n\t\tfloat range = val_max - val_min;\n\t\tif(val >= val_max){\n\t\t\tfloat delta = (val - val_max);\n\t\t\treturn val_min + mod(delta, range);\n\t\t} else {\n\t\t\tfloat delta = (val_min - val);\n\t\t\treturn val_max - mod(delta, range);\n\t\t}\n\t}\n}\n\n// /fxhash/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// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/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 <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\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 <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 GeometricContext geometry,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/length1\n\tfloat v_POLY_length1_val = length(v_POLY_attribute1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (-0.5*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/add1\n\tfloat v_POLY_add1_sum = (v_POLY_length1_val + v_POLY_multAdd1_val + 0.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/cycle1\n\tfloat v_POLY_cycle1_val = cycle(v_POLY_add1_sum, -1.0, 1.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.75, 0.64, v_POLY_cycle1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /fxhash/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\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, geometry, 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 + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",
			"timeDependent": true,
			"resolutionDependent": false,
			"paramConfigs": []
		},
		"customMaterials": {
			"customDepthMaterial": {
				"material": {
					"metadata": {
						"version": 4.5,
						"type": "Material",
						"generator": "Material.toJSON"
					},
					"uuid": "/fxhash/MAT/meshStandardBuilder3-customDepthMaterial",
					"type": "MeshDepthMaterial",
					"name": "customDepthMaterial",
					"depthFunc": 3,
					"depthTest": true,
					"depthWrite": true,
					"colorWrite": true,
					"stencilWrite": false,
					"stencilWriteMask": 255,
					"stencilFunc": 519,
					"stencilRef": 0,
					"stencilFuncMask": 255,
					"stencilFail": 7680,
					"stencilZFail": 7680,
					"stencilZPass": 7680,
					"depthPacking": 3201
				},
				"onBeforeCompileDataJSON": {
					"vertexShader": "#include <common>\n\n\n\n// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/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}",
					"fragmentShader": "\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// /fxhash/MAT/meshStandardBuilder3/cycle1\nfloat cycle(float val, float val_min, float val_max){\n\tif(val >= val_min && val < val_max){\n\t\treturn val;\n\t} else {\n\t\tfloat range = val_max - val_min;\n\t\tif(val >= val_max){\n\t\t\tfloat delta = (val - val_max);\n\t\t\treturn val_min + mod(delta, range);\n\t\t} else {\n\t\t\tfloat delta = (val_min - val);\n\t\t\treturn val_max - mod(delta, range);\n\t\t}\n\t}\n}\n\n// /fxhash/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// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/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 GeometricContext geometry,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/length1\n\tfloat v_POLY_length1_val = length(v_POLY_attribute1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (-0.5*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/add1\n\tfloat v_POLY_add1_sum = (v_POLY_length1_val + v_POLY_multAdd1_val + 0.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/cycle1\n\tfloat v_POLY_cycle1_val = cycle(v_POLY_add1_sum, -1.0, 1.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.75, 0.64, v_POLY_cycle1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /fxhash/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",
					"timeDependent": true,
					"resolutionDependent": false,
					"paramConfigs": []
				}
			},
			"customDistanceMaterial": {
				"material": {
					"metadata": {
						"version": 4.5,
						"type": "Material",
						"generator": "Material.toJSON"
					},
					"uuid": "/fxhash/MAT/meshStandardBuilder3-customDistanceMaterial",
					"type": "MeshDistanceMaterial",
					"name": "customDistanceMaterial",
					"depthFunc": 3,
					"depthTest": true,
					"depthWrite": true,
					"colorWrite": true,
					"stencilWrite": false,
					"stencilWriteMask": 255,
					"stencilFunc": 519,
					"stencilRef": 0,
					"stencilFuncMask": 255,
					"stencilFail": 7680,
					"stencilZFail": 7680,
					"stencilZPass": 7680
				},
				"onBeforeCompileDataJSON": {
					"vertexShader": "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n\n\n\n// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/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}",
					"fragmentShader": "\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// /fxhash/MAT/meshStandardBuilder3/cycle1\nfloat cycle(float val, float val_min, float val_max){\n\tif(val >= val_min && val < val_max){\n\t\treturn val;\n\t} else {\n\t\tfloat range = val_max - val_min;\n\t\tif(val >= val_max){\n\t\t\tfloat delta = (val - val_max);\n\t\t\treturn val_min + mod(delta, range);\n\t\t} else {\n\t\t\tfloat delta = (val_min - val);\n\t\t\treturn val_max - mod(delta, range);\n\t\t}\n\t}\n}\n\n// /fxhash/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// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/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 GeometricContext geometry,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/length1\n\tfloat v_POLY_length1_val = length(v_POLY_attribute1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (-0.5*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/add1\n\tfloat v_POLY_add1_sum = (v_POLY_length1_val + v_POLY_multAdd1_val + 0.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/cycle1\n\tfloat v_POLY_cycle1_val = cycle(v_POLY_add1_sum, -1.0, 1.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.75, 0.64, v_POLY_cycle1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /fxhash/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",
					"timeDependent": true,
					"resolutionDependent": false,
					"paramConfigs": []
				}
			},
			"customDepthDOFMaterial": {
				"material": {
					"metadata": {
						"version": 4.5,
						"type": "Material",
						"generator": "Material.toJSON"
					},
					"uuid": "/fxhash/MAT/meshStandardBuilder3-customDepthDOFMaterial",
					"type": "MeshDepthMaterial",
					"name": "customDepthDOFMaterial",
					"depthFunc": 3,
					"depthTest": true,
					"depthWrite": true,
					"colorWrite": true,
					"stencilWrite": false,
					"stencilWriteMask": 255,
					"stencilFunc": 519,
					"stencilRef": 0,
					"stencilFuncMask": 255,
					"stencilFail": 7680,
					"stencilZFail": 7680,
					"stencilZPass": 7680,
					"depthPacking": 3200
				},
				"onBeforeCompileDataJSON": {
					"vertexShader": "#include <common>\n\n\n\n// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nvarying vec3 v_POLY_attribute_restP;\n\n// /fxhash/MAT/meshStandardBuilder3/attribute1\nattribute vec3 restP;\n\n\n\n\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tv_POLY_attribute_restP = vec3(restP);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/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}",
					"fragmentShader": "\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// /fxhash/MAT/meshStandardBuilder3/cycle1\nfloat cycle(float val, float val_min, float val_max){\n\tif(val >= val_min && val < val_max){\n\t\treturn val;\n\t} else {\n\t\tfloat range = val_max - val_min;\n\t\tif(val >= val_max){\n\t\t\tfloat delta = (val - val_max);\n\t\t\treturn val_min + mod(delta, range);\n\t\t} else {\n\t\t\tfloat delta = (val_min - val);\n\t\t\treturn val_max - mod(delta, range);\n\t\t}\n\t}\n}\n\n// /fxhash/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// /fxhash/MAT/meshStandardBuilder3/globals1\nuniform float time;\n\n// /fxhash/MAT/meshStandardBuilder3/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 GeometricContext geometry,\n\tconst in SSSModel sssModel,\n\tinout ReflectedLight reflectedLight\n\t){\n\tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * sssModel.distortion));\n\tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -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// /fxhash/MAT/meshStandardBuilder3/attribute1\n\tvec3 v_POLY_attribute1_val = v_POLY_attribute_restP;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/globals1\n\tfloat v_POLY_globals1_time = time;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/length1\n\tfloat v_POLY_length1_val = length(v_POLY_attribute1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/multAdd1\n\tfloat v_POLY_multAdd1_val = (-0.5*(v_POLY_globals1_time + 0.0)) + 0.0;\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/add1\n\tfloat v_POLY_add1_sum = (v_POLY_length1_val + v_POLY_multAdd1_val + 0.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/cycle1\n\tfloat v_POLY_cycle1_val = cycle(v_POLY_add1_sum, -1.0, 1.0);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(0.75, 0.64, v_POLY_cycle1_val);\n\t\n\t// /fxhash/MAT/meshStandardBuilder3/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /fxhash/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",
					"timeDependent": true,
					"resolutionDependent": false,
					"paramConfigs": []
				}
			}
		}
	}
}