Name
*
Code
{"properties":{"frame":0,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/perspectiveCamera_FPS_MOBILE","versions":{"polygonjs":"1.1.260"}},"root":{"type":"root","nodes":{"COP":{"type":"copNetwork","nodes":{"envMap":{"type":"envMap","inputs":["imageEnv"]},"imageEnv":{"type":"imageEXR","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/piz_compressed.exr"}},"imageUv":{"type":"image","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/uv.jpg","tflipY":true}}}},"ground":{"type":"geo","nodes":{"BVH1":{"type":"BVH","inputs":["material1"],"flags":{"display":true}},"BVHVisualizer1":{"type":"BVHVisualizer","inputs":["BVH1"]},"MAT":{"type":"materialsNetwork","nodes":{"meshStandardBuilder1":{"type":"meshStandardBuilder","nodes":{"attribute1":{"type":"attribute","params":{"name":"id"},"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec2_1":{"type":"floatToVec2","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}}},"inputs":[{"index":0,"node":"round1","output":"val"}]},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"raw_input":0.55,"overriden_options":{}},"z":{"raw_input":0.7,"overriden_options":{}}},"inputs":[{"index":0,"node":"random1","output":"rand"}]},"globals1":{"type":"globals"},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"node":"floatToVec3_1","output":"vec3"}]},"output1":{"type":"output","inputs":[null,null,{"index":2,"node":"oklabToRgb1","output":"rgb"}]},"random1":{"type":"random","params":{"seed":{"overriden_options":{}}},"inputs":[{"index":0,"node":"floatToVec2_1","output":"vec2"}]},"round1":{"type":"round","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"attribute1","output":"val"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}}},"params":{"metalness":0,"roughness":0.86},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-main","type":"MeshStandardMaterial","name":"/ground/MAT/meshStandardBuilder1","color":16777215,"roughness":0.86,"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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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// 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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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}","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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]}},"customDistanceMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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}","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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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}","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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]}}}}}}},"attribCreate1":{"type":"attribCreate","params":{"name":"id","value1":9.2},"inputs":["noise1"]},"attribPromote1":{"type":"attribPromote","params":{"classFrom":1,"classTo":0,"name":"id"},"inputs":["copy1"]},"box1":{"type":"box"},"copy1":{"type":"copy","params":{"copyAttributes":true,"attributesToCopy":"id"},"inputs":["box1","scatter1"]},"material1":{"type":"material","params":{"material":"../MAT/meshStandardBuilder1"},"inputs":["merge1"]},"merge1":{"type":"merge","params":{"compact":true},"inputs":["merge2","attribCreate1"]},"merge2":{"type":"merge","params":{"compact":true},"inputs":["attribPromote1"]},"noise1":{"type":"noise","params":{"amplitude":0.96,"freq":[0.11999999999999995,0.11999999999999995,0.11999999999999995],"useNormals":true},"inputs":["plane1"]},"plane1":{"type":"plane","params":{"size":[15,15],"stepSize":0.15085,"center":[0,0.2,0]}},"scatter1":{"type":"scatter","params":{"pointsCount":26,"seed":11},"inputs":["noise1"]}},"flags":{"display":true}},"lights":{"type":"geo","nodes":{"hemisphereLight1":{"type":"hemisphereLight"},"merge1":{"type":"merge","inputs":["polarTransform1","hemisphereLight1"],"flags":{"display":true}},"polarTransform1":{"type":"polarTransform","params":{"longitude":230.4,"latitude":25.2,"depth":4.3},"inputs":["spotLight1"]},"spotLight1":{"type":"spotLight","params":{"angle":46.8,"penumbra":0.42,"showHelper":true}}},"flags":{"display":true}},"perspectiveCamera_DEBUG":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[0.020102296266434172,0.20530141113094572,0.3741745397814876]}},"cameraOrbitControls2":{"type":"cameraOrbitControls","params":{"tdamping":false,"polarAngleRange":["$PI*0.5","$PI*0.5"]}}}}},"params":{"t":[3.0161526633531355,1.1787657307191874,2.814738208647524],"r":[-22.723127930556515,44.66532130223666,16.403892417511617],"controls":"events1/cameraOrbitControls1"},"flags":{"display":true},"selection":["events1"]},"perspectiveCamera_FPS_MOBILE":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"firstPersonControls1":{"type":"firstPersonControls","params":{"colliderObject":"../../../ground/BVH1"}},"keyboard1":{"type":"keyboard","params":{"element":1,"keyCodes":""}},"message1":{"type":"message","inputs":[{"index":0,"node":"pointer1","output":"pointerdown"}]},"mobileJoystickControls1":{"type":"mobileJoystickControls","params":{"colliderObject":"../../../ground/BVH1"}},"pointer1":{"type":"pointer"}}}},"params":{"t":[3.0161526633531355,1.1787657307191874,2.814738208647524],"r":[-22.723127930556515,44.66532130223666,16.403892417511617],"controls":"events1/mobileJoystickControls1"},"flags":{"display":true}}},"params":{"mainCameraPath":"/perspectiveCamera_FPS_MOBILE"}},"ui":{"nodes":{"COP":{"pos":[-150,250],"nodes":{"envMap":{"pos":[50,200]},"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]}}},"ground":{"pos":[0,-200],"nodes":{"BVH1":{"pos":[50,950]},"BVHVisualizer1":{"pos":[-50,1100]},"MAT":{"pos":[-400,700],"nodes":{"meshStandardBuilder1":{"pos":[0,-100],"nodes":{"attribute1":{"pos":[-300,300]},"floatToVec2_1":{"pos":[-100,300]},"floatToVec3_1":{"pos":[200,300]},"globals1":{"pos":[-200,0]},"oklabToRgb1":{"pos":[350,300]},"output1":{"pos":[550,0]},"random1":{"pos":[0,300]},"round1":{"pos":[-200,300]}}}}},"attribCreate1":{"pos":[50,200]},"attribPromote1":{"pos":[-200,500]},"box1":{"pos":[-300,200]},"copy1":{"pos":[-200,400]},"material1":{"pos":[50,850]},"merge1":{"pos":[50,750]},"merge2":{"pos":[-200,600]},"noise1":{"pos":[0,50]},"plane1":{"pos":[0,-50]},"scatter1":{"pos":[-100,200]}}},"lights":{"pos":[200,0],"nodes":{"hemisphereLight1":{"pos":[0,100]},"merge1":{"pos":[-100,350]},"polarTransform1":{"pos":[-150,200]},"spotLight1":{"pos":[-150,100]}}},"perspectiveCamera_DEBUG":{"pos":[-150,150],"nodes":{"events1":{"pos":[-200,50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]},"cameraOrbitControls2":{"pos":[150,200]}}}}},"perspectiveCamera_FPS_MOBILE":{"pos":[-150,50],"nodes":{"events1":{"pos":[-200,50],"nodes":{"firstPersonControls1":{"pos":[150,-50]},"keyboard1":{"pos":[-100,-50]},"message1":{"pos":[0,50]},"mobileJoystickControls1":{"pos":[150,-200]},"pointer1":{"pos":[-100,-200]}}}}}}}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.5,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/perspectiveCamera_FPS_MOBILE","linkIndex":1}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":null,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-48,"y":-22},"zoom":0.6360000000000001},"history":{"2":{"position":{"x":-48,"y":-22},"zoom":0.6360000000000001},"3":{"position":{"x":-48,"y":-22},"zoom":0.5},"6":{"position":{"x":11.339999999999996,"y":-96.49999999999999},"zoom":0.6172839506172841},"9":{"position":{"x":-32,"y":-88},"zoom":0.5},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"createExport":true,"compressJs":true,"publishToIntegrations":false},"paramsModal":[]}
Used nodes
cop/envMap;cop/image;cop/imageEXR;event/cameraOrbitControls;event/firstPersonControls;event/keyboard;event/message;event/mobileJoystickControls;event/pointer;mat/meshStandardBuilder;obj/copNetwork;obj/geo;obj/perspectiveCamera;sop/BVH;sop/BVHVisualizer;sop/attribCreate;sop/attribPromote;sop/box;sop/copy;sop/eventsNetwork;sop/hemisphereLight;sop/material;sop/materialsNetwork;sop/merge;sop/noise;sop/plane;sop/polarTransform;sop/scatter;sop/spotLight
Used operations
Used modules
Used assemblers
GL_MESH_STANDARD
Used integrations
[]
Used assets
Nodes map
{"/COP":"obj/copNetwork","/COP/envMap":"cop/envMap","/COP/imageEnv":"cop/imageEXR","/COP/imageUv":"cop/image","/ground":"obj/geo","/ground/BVH1":"sop/BVH","/ground/BVHVisualizer1":"sop/BVHVisualizer","/ground/MAT":"sop/materialsNetwork","/ground/MAT/meshStandardBuilder1":"mat/meshStandardBuilder","/ground/attribCreate1":"sop/attribCreate","/ground/attribPromote1":"sop/attribPromote","/ground/box1":"sop/box","/ground/copy1":"sop/copy","/ground/material1":"sop/material","/ground/merge1":"sop/merge","/ground/merge2":"sop/merge","/ground/noise1":"sop/noise","/ground/plane1":"sop/plane","/ground/scatter1":"sop/scatter","/lights":"obj/geo","/lights/hemisphereLight1":"sop/hemisphereLight","/lights/merge1":"sop/merge","/lights/polarTransform1":"sop/polarTransform","/lights/spotLight1":"sop/spotLight","/perspectiveCamera_DEBUG":"obj/perspectiveCamera","/perspectiveCamera_DEBUG/events1":"sop/eventsNetwork","/perspectiveCamera_DEBUG/events1/cameraOrbitControls1":"event/cameraOrbitControls","/perspectiveCamera_DEBUG/events1/cameraOrbitControls2":"event/cameraOrbitControls","/perspectiveCamera_FPS_MOBILE":"obj/perspectiveCamera","/perspectiveCamera_FPS_MOBILE/events1":"sop/eventsNetwork","/perspectiveCamera_FPS_MOBILE/events1/firstPersonControls1":"event/firstPersonControls","/perspectiveCamera_FPS_MOBILE/events1/keyboard1":"event/keyboard","/perspectiveCamera_FPS_MOBILE/events1/message1":"event/message","/perspectiveCamera_FPS_MOBILE/events1/mobileJoystickControls1":"event/mobileJoystickControls","/perspectiveCamera_FPS_MOBILE/events1/pointer1":"event/pointer"}
Js version
Editor version
Engine version
Name
*
Code
{"properties":{"frame":0,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/perspectiveCamera_FPS_MOBILE","versions":{"polygonjs":"1.1.260"}},"root":{"type":"root","nodes":{"COP":{"type":"copNetwork","nodes":{"envMap":{"type":"envMap","inputs":["imageEnv"]},"imageEnv":{"type":"imageEXR","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/piz_compressed.exr"}},"imageUv":{"type":"image","params":{"url":"https://raw.githubusercontent.com/polygonjs/polygonjs-assets/master/textures/uv.jpg","tflipY":true}}}},"ground":{"type":"geo","nodes":{"BVH1":{"type":"BVH","inputs":["material1"],"flags":{"display":true}},"BVHVisualizer1":{"type":"BVHVisualizer","inputs":["BVH1"]},"MAT":{"type":"materialsNetwork","nodes":{"meshStandardBuilder1":{"type":"meshStandardBuilder","nodes":{"attribute1":{"type":"attribute","params":{"name":"id"},"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"floatToVec2_1":{"type":"floatToVec2","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}}},"inputs":[{"index":0,"node":"round1","output":"val"}]},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"raw_input":0.55,"overriden_options":{}},"z":{"raw_input":0.7,"overriden_options":{}}},"inputs":[{"index":0,"node":"random1","output":"rand"}]},"globals1":{"type":"globals"},"oklabToRgb1":{"type":"oklabToRgb","params":{"oklab":{"overriden_options":{}}},"inputs":[{"index":0,"node":"floatToVec3_1","output":"vec3"}]},"output1":{"type":"output","inputs":[null,null,{"index":2,"node":"oklabToRgb1","output":"rgb"}]},"random1":{"type":"random","params":{"seed":{"overriden_options":{}}},"inputs":[{"index":0,"node":"floatToVec2_1","output":"vec2"}]},"round1":{"type":"round","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"attribute1","output":"val"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}}},"params":{"metalness":0,"roughness":0.86},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-main","type":"MeshStandardMaterial","name":"/ground/MAT/meshStandardBuilder1","color":16777215,"roughness":0.86,"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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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// 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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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}","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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]}},"customDistanceMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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}","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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/ground/MAT/meshStandardBuilder1-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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\n\n// /ground/MAT/meshStandardBuilder1/attribute1\nattribute float id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tv_POLY_attribute_id = float(id);\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}","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// /ground/MAT/meshStandardBuilder1/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// /ground/MAT/meshStandardBuilder1/attribute1\nvarying float v_POLY_attribute_id;\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// /ground/MAT/meshStandardBuilder1/attribute1\n\tfloat v_POLY_attribute1_val = v_POLY_attribute_id;\n\t\n\t// /ground/MAT/meshStandardBuilder1/round1\n\tfloat v_POLY_round1_val = sign(v_POLY_attribute1_val)*floor(abs(v_POLY_attribute1_val)+0.5);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_round1_val, 0.0);\n\t\n\t// /ground/MAT/meshStandardBuilder1/random1\n\tfloat v_POLY_random1_rand = rand(v_POLY_floatToVec2_1_vec2);\n\t\n\t// /ground/MAT/meshStandardBuilder1/floatToVec3_1\n\tvec3 v_POLY_floatToVec3_1_vec3 = vec3(v_POLY_random1_rand, 0.55, 0.7);\n\t\n\t// /ground/MAT/meshStandardBuilder1/oklabToRgb1\n\tvec3 v_POLY_oklabToRgb1_rgb = linear_srgb_from_oklab(v_POLY_floatToVec3_1_vec3);\n\t\n\t// /ground/MAT/meshStandardBuilder1/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":false,"resolutionDependent":false,"paramConfigs":[]}}}}}}},"attribCreate1":{"type":"attribCreate","params":{"name":"id","value1":9.2},"inputs":["noise1"]},"attribPromote1":{"type":"attribPromote","params":{"classFrom":1,"classTo":0,"name":"id"},"inputs":["copy1"]},"box1":{"type":"box"},"copy1":{"type":"copy","params":{"copyAttributes":true,"attributesToCopy":"id"},"inputs":["box1","scatter1"]},"material1":{"type":"material","params":{"material":"../MAT/meshStandardBuilder1"},"inputs":["merge1"]},"merge1":{"type":"merge","params":{"compact":true},"inputs":["merge2","attribCreate1"]},"merge2":{"type":"merge","params":{"compact":true},"inputs":["attribPromote1"]},"noise1":{"type":"noise","params":{"amplitude":0.96,"freq":[0.11999999999999995,0.11999999999999995,0.11999999999999995],"useNormals":true},"inputs":["plane1"]},"plane1":{"type":"plane","params":{"size":[15,15],"stepSize":0.15085,"center":[0,0.2,0]}},"scatter1":{"type":"scatter","params":{"pointsCount":26,"seed":11},"inputs":["noise1"]}},"flags":{"display":true}},"lights":{"type":"geo","nodes":{"hemisphereLight1":{"type":"hemisphereLight"},"merge1":{"type":"merge","inputs":["polarTransform1","hemisphereLight1"],"flags":{"display":true}},"polarTransform1":{"type":"polarTransform","params":{"longitude":230.4,"latitude":25.2,"depth":4.3},"inputs":["spotLight1"]},"spotLight1":{"type":"spotLight","params":{"angle":46.8,"penumbra":0.42,"showHelper":true}}},"flags":{"display":true}},"perspectiveCamera_DEBUG":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[0.020102296266434172,0.20530141113094572,0.3741745397814876]}},"cameraOrbitControls2":{"type":"cameraOrbitControls","params":{"tdamping":false,"polarAngleRange":["$PI*0.5","$PI*0.5"]}}}}},"params":{"t":[3.0161526633531355,1.1787657307191874,2.814738208647524],"r":[-22.723127930556515,44.66532130223666,16.403892417511617],"controls":"events1/cameraOrbitControls1"},"flags":{"display":true},"selection":["events1"]},"perspectiveCamera_FPS_MOBILE":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"firstPersonControls1":{"type":"firstPersonControls","params":{"colliderObject":"../../../ground/BVH1"}},"keyboard1":{"type":"keyboard","params":{"element":1,"keyCodes":""}},"message1":{"type":"message","inputs":[{"index":0,"node":"pointer1","output":"pointerdown"}]},"mobileJoystickControls1":{"type":"mobileJoystickControls","params":{"colliderObject":"../../../ground/BVH1"}},"pointer1":{"type":"pointer"}}}},"params":{"t":[3.0161526633531355,1.1787657307191874,2.814738208647524],"r":[-22.723127930556515,44.66532130223666,16.403892417511617],"controls":"events1/mobileJoystickControls1"},"flags":{"display":true}}},"params":{"mainCameraPath":"/perspectiveCamera_FPS_MOBILE"}},"ui":{"nodes":{"COP":{"pos":[-150,250],"nodes":{"envMap":{"pos":[50,200]},"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]}}},"ground":{"pos":[0,-200],"nodes":{"BVH1":{"pos":[50,950]},"BVHVisualizer1":{"pos":[-50,1100]},"MAT":{"pos":[-400,700],"nodes":{"meshStandardBuilder1":{"pos":[0,-100],"nodes":{"attribute1":{"pos":[-300,300]},"floatToVec2_1":{"pos":[-100,300]},"floatToVec3_1":{"pos":[200,300]},"globals1":{"pos":[-200,0]},"oklabToRgb1":{"pos":[350,300]},"output1":{"pos":[550,0]},"random1":{"pos":[0,300]},"round1":{"pos":[-200,300]}}}}},"attribCreate1":{"pos":[50,200]},"attribPromote1":{"pos":[-200,500]},"box1":{"pos":[-300,200]},"copy1":{"pos":[-200,400]},"material1":{"pos":[50,850]},"merge1":{"pos":[50,750]},"merge2":{"pos":[-200,600]},"noise1":{"pos":[0,50]},"plane1":{"pos":[0,-50]},"scatter1":{"pos":[-100,200]}}},"lights":{"pos":[200,0],"nodes":{"hemisphereLight1":{"pos":[0,100]},"merge1":{"pos":[-100,350]},"polarTransform1":{"pos":[-150,200]},"spotLight1":{"pos":[-150,100]}}},"perspectiveCamera_DEBUG":{"pos":[-150,150],"nodes":{"events1":{"pos":[-200,50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]},"cameraOrbitControls2":{"pos":[150,200]}}}}},"perspectiveCamera_FPS_MOBILE":{"pos":[-150,50],"nodes":{"events1":{"pos":[-200,50],"nodes":{"firstPersonControls1":{"pos":[150,-50]},"keyboard1":{"pos":[-100,-50]},"message1":{"pos":[0,50]},"mobileJoystickControls1":{"pos":[150,-200]},"pointer1":{"pos":[-100,-200]}}}}}}}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.5,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/perspectiveCamera_FPS_MOBILE","linkIndex":1}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":null,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-48,"y":-22},"zoom":0.6360000000000001},"history":{"2":{"position":{"x":-48,"y":-22},"zoom":0.6360000000000001},"3":{"position":{"x":-48,"y":-22},"zoom":0.5},"6":{"position":{"x":11.339999999999996,"y":-96.49999999999999},"zoom":0.6172839506172841},"9":{"position":{"x":-32,"y":-88},"zoom":0.5},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"createExport":true,"compressJs":true,"publishToIntegrations":false},"paramsModal":[]}
Used nodes
cop/envMap;cop/image;cop/imageEXR;event/cameraOrbitControls;event/firstPersonControls;event/keyboard;event/message;event/mobileJoystickControls;event/pointer;mat/meshStandardBuilder;obj/copNetwork;obj/geo;obj/perspectiveCamera;sop/BVH;sop/BVHVisualizer;sop/attribCreate;sop/attribPromote;sop/box;sop/copy;sop/eventsNetwork;sop/hemisphereLight;sop/material;sop/materialsNetwork;sop/merge;sop/noise;sop/plane;sop/polarTransform;sop/scatter;sop/spotLight
Used operations
Used modules
Used assemblers
GL_MESH_STANDARD
Used integrations
[]
Used assets
Nodes map
{"/COP":"obj/copNetwork","/COP/envMap":"cop/envMap","/COP/imageEnv":"cop/imageEXR","/COP/imageUv":"cop/image","/ground":"obj/geo","/ground/BVH1":"sop/BVH","/ground/BVHVisualizer1":"sop/BVHVisualizer","/ground/MAT":"sop/materialsNetwork","/ground/MAT/meshStandardBuilder1":"mat/meshStandardBuilder","/ground/attribCreate1":"sop/attribCreate","/ground/attribPromote1":"sop/attribPromote","/ground/box1":"sop/box","/ground/copy1":"sop/copy","/ground/material1":"sop/material","/ground/merge1":"sop/merge","/ground/merge2":"sop/merge","/ground/noise1":"sop/noise","/ground/plane1":"sop/plane","/ground/scatter1":"sop/scatter","/lights":"obj/geo","/lights/hemisphereLight1":"sop/hemisphereLight","/lights/merge1":"sop/merge","/lights/polarTransform1":"sop/polarTransform","/lights/spotLight1":"sop/spotLight","/perspectiveCamera_DEBUG":"obj/perspectiveCamera","/perspectiveCamera_DEBUG/events1":"sop/eventsNetwork","/perspectiveCamera_DEBUG/events1/cameraOrbitControls1":"event/cameraOrbitControls","/perspectiveCamera_DEBUG/events1/cameraOrbitControls2":"event/cameraOrbitControls","/perspectiveCamera_FPS_MOBILE":"obj/perspectiveCamera","/perspectiveCamera_FPS_MOBILE/events1":"sop/eventsNetwork","/perspectiveCamera_FPS_MOBILE/events1/firstPersonControls1":"event/firstPersonControls","/perspectiveCamera_FPS_MOBILE/events1/keyboard1":"event/keyboard","/perspectiveCamera_FPS_MOBILE/events1/message1":"event/message","/perspectiveCamera_FPS_MOBILE/events1/mobileJoystickControls1":"event/mobileJoystickControls","/perspectiveCamera_FPS_MOBILE/events1/pointer1":"event/pointer"}
Js version
Editor version
Engine version
Logout
0%
There was a problem displaying your scene:
view scene source