Name
*
Code
{"properties":{"frame":0,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraNodePath":null,"versions":{"polygonjs":"1.1.237"}},"root":{"type":"root","nodes":{"geo1":{"type":"geo","nodes":{"MAT":{"type":"materialsNetwork","nodes":{"meshBasicBuilder1":{"type":"meshBasicBuilder","nodes":{"compare1":{"type":"compare","params":{"value0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false},"raw_input":1},"value1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec3ToFloat1","output":"x"},{"index":1,"node":"multAdd1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"float"},{"name":"value1","type":"float"}],"out":[{"name":"val","type":"bool"}]}},"complement1":{"type":"complement","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec4ToFloat1","output":"y"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"complement2":{"type":"complement","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"divide1","output":"divide"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.9490196078431372,0.050980392156862744,0.050980392156862744],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"type":4,"color":[0.10980392156862745,0.9490196078431372,0.050980392156862744],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"divide1":{"type":"divide","params":{"div0":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div1":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div2":{"type":"float","default_value":1,"options":{"spare":true,"editable":true}}},"maxInputsCount":3,"inputs":[{"index":0,"node":"vec4ToFloat1","output":"x"},{"index":1,"node":"vec2ToFloat1","output":"x"}],"connection_points":{"in":[{"name":"div0","type":"float"},{"name":"div1","type":"float"},{"name":"div2","type":"float"}],"out":[{"name":"divide","type":"float"}]}},"divide2":{"type":"divide","params":{"div0":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div1":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div2":{"type":"float","default_value":1,"options":{"spare":true,"editable":true}}},"maxInputsCount":3,"inputs":[{"index":0,"node":"vec4ToFloat1","output":"y"},{"index":1,"node":"vec2ToFloat1","output":"y"}],"connection_points":{"in":[{"name":"div0","type":"float"},{"name":"div1","type":"float"},{"name":"div2","type":"float"}],"out":[{"name":"divide","type":"float"}]}},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"divide1","output":"divide"},{"index":1,"node":"divide2","output":"divide"}]},"globals1":{"type":"globals"},"min1":{"type":"min","params":{"in0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"in1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec3ToFloat1","output":"x"},{"index":1,"node":"vec3ToFloat2","output":"x"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"min2":{"type":"min","params":{"in0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"in1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"min1","output":"val"},{"index":1,"node":"vec3ToFloat3","output":"x"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"min3":{"type":"min","params":{"in0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"in1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"min2","output":"val"},{"index":1,"node":"vec3ToFloat4","output":"x"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"modelViewMatrixMult1":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner0","output":"val"}]},"modelViewMatrixMult2":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner1","output":"val"}]},"modelViewMatrixMult3":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner2","output":"val"}]},"modelViewMatrixMult4":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner3","output":"val"}]},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true},"raw_input":0.5},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"divide1","output":"divide"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"negate1":{"type":"negate","params":{"in":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec4ToVec3_1","output":"vec3"}],"connection_points":{"in":[{"name":"in","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"output1":{"type":"output","inputs":[null,null,{"index":2,"node":"twoWaySwitch1","output":"val"}]},"param_corner0":{"type":"param","params":{"name":"corner0","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param_corner1":{"type":"param","params":{"name":"corner1","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param_corner2":{"type":"param","params":{"name":"corner2","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param_corner3":{"type":"param","params":{"name":"corner3","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"twoWaySwitch1":{"type":"twoWaySwitch","params":{"condition":{"type":"boolean","default_value":false,"options":{"spare":true,"editable":false}},"ifTrue":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"ifFalse":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"compare1","output":"val"},{"index":1,"node":"constant1","output":"val"},{"index":2,"node":"constant2","output":"val"}],"connection_points":{"in":[{"name":"condition","type":"bool"},{"name":"ifTrue","type":"vec3"},{"name":"ifFalse","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"varyingRead1":{"type":"varyingRead","params":{"name":"varyingCorner0","type":2},"connection_points":{"in":[],"out":[{"name":"fragment","type":"vec3"}]}},"varyingWrite1":{"type":"varyingWrite","params":{"name":"varyingCorner0","type":2,"vertex":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec4ToVec3_1","output":"vec3"}],"connection_points":{"in":[{"name":"vertex","type":"vec3"}],"out":[]}},"vec2ToFloat1":{"type":"vec2ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"globals1","output":"resolution"}]},"vec3ToFloat1":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"varyingRead1","output":"fragment"}]},"vec3ToFloat2":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec4ToVec3_2","output":"vec3"}]},"vec3ToFloat3":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec4ToVec3_3","output":"vec3"}]},"vec3ToFloat4":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec4ToVec3_4","output":"vec3"}]},"vec4ToFloat1":{"type":"vec4ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"globals1","output":"gl_FragCoord"}]},"vec4ToVec3_1":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult1","output":"mvMult"}]},"vec4ToVec3_2":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult2","output":"mvMult"}]},"vec4ToVec3_3":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult3","output":"mvMult"}]},"vec4ToVec3_4":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult4","output":"mvMult"}]}},"params":{"corner0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 0).x","point('/geo2/OUT', 'P', 0).y","point('/geo2/OUT', 'P', 0).z"],"overriden_options":{"callback":"{}"}},"corner1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 1).x","point('/geo2/OUT', 'P', 1).y","point('/geo2/OUT', 'P', 1).z"],"overriden_options":{"callback":"{}"}},"corner2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 2).x","point('/geo2/OUT', 'P', 2).y","point('/geo2/OUT', 'P', 2).z"],"overriden_options":{"callback":"{}"}},"corner3":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 3).x","point('/geo2/OUT', 'P', 3).y","point('/geo2/OUT', 'P', 3).z"],"overriden_options":{"callback":"{}"}}},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-main","type":"MeshBasicMaterial","name":"/geo1/MAT/meshBasicBuilder1","color":16777215,"reflectivity":1,"refractionRatio":0.98,"depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\n\n\n\n\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n\n}\n","fragmentShader":"\nuniform vec3 diffuse;\nuniform float opacity;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\n\n\n\n\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 <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\n\n\n\n\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\n\t// accumulation (baked indirect lighting only)\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;\n\n\t#else\n\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\n\t#endif\n\n\t// modulation\n\t#include <aomap_fragment>\n\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\n\t#include <envmap_fragment>\n\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\n}\n","timeDependent":false,"resolutionDependent":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-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,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\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>\n\n// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible.\n// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for\n// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1.\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <uv_vertex>\n\n\t#include <skinbase_vertex>\n\n\t#ifdef USE_DISPLACEMENTMAP\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\tvHighPrecisionZW = gl_Position.zw;\n\n}\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// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\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\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\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":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]}},"customDistanceMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-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,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#define DISTANCE\n\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\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>\n\nvoid main() {\n\n\t#include <uv_vertex>\n\n\t#include <skinbase_vertex>\n\n\t#ifdef USE_DISPLACEMENTMAP\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\tvWorldPosition = worldPosition.xyz;\n\n}\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// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\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\nvoid main () {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\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":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-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,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\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>\n\n// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible.\n// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for\n// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1.\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <uv_vertex>\n\n\t#include <skinbase_vertex>\n\n\t#ifdef USE_DISPLACEMENTMAP\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\tvHighPrecisionZW = gl_Position.zw;\n\n}\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// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\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\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\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":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]}}}}}},"selection":["meshBasicBuilder1"]},"material1":{"type":"material","params":{"material":"../MAT/meshBasicBuilder1"},"inputs":["plane1"],"flags":{"display":true}},"plane1":{"type":"plane","params":{"size":[12.6,5.7],"direction":[0,0,1],"center":[0,0,-4.7]}}},"inputs":["perspectiveCamera1"],"flags":{"display":true},"selection":["MAT"]},"hemisphereLight1":{"type":"hemisphereLight","flags":{"display":true}},"perspectiveCamera1":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[-0.032038692179124195,-0.15399795053673598,0.9101078754183982]}}},"selection":["cameraOrbitControls1"]}},"params":{"r":[-2.8532186467961016,0.5933348467503096,0.029570841140726178]},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"envMap":{"type":"envMap","inputs":["imageEnv"]},"imageEnv":{"type":"image","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}}}},"geo2":{"type":"geo","nodes":{"OUT":{"type":"null","inputs":["transform1"],"flags":{"display":true}},"plane1":{"type":"plane"},"transform1":{"type":"transform","params":{"t":[0.48186118693100877,-0.05207246397404336,-3.534651627921943],"r":[22,-41.90178326602226,-24.33666412902554]},"inputs":["plane1"]}},"flags":{"display":true}}},"selection":["geo1"]},"ui":{"nodes":{"geo1":{"pos":[-150,0],"nodes":{"MAT":{"pos":[-250,150],"nodes":{"meshBasicBuilder1":{"pos":[0,0],"nodes":{"compare1":{"pos":[350,50]},"complement1":{"pos":[300,-250]},"complement2":{"pos":[0,-450]},"constant1":{"pos":[400,-150]},"constant2":{"pos":[350,-50]},"divide1":{"pos":[-50,-100]},"divide2":{"pos":[250,-350]},"floatToVec3_1":{"pos":[450,-450]},"globals1":{"pos":[-550,-350]},"min1":{"pos":[550,300]},"min2":{"pos":[650,350]},"min3":{"pos":[750,450]},"modelViewMatrixMult1":{"pos":[-400,300]},"modelViewMatrixMult2":{"pos":[-400,450]},"modelViewMatrixMult3":{"pos":[-400,600]},"modelViewMatrixMult4":{"pos":[-400,700]},"multAdd1":{"pos":[100,-50]},"negate1":{"pos":[-150,250]},"output1":{"pos":[750,-100]},"param_corner0":{"pos":[-550,300]},"param_corner1":{"pos":[-550,450]},"param_corner2":{"pos":[-550,600]},"param_corner3":{"pos":[-550,700]},"twoWaySwitch1":{"pos":[550,50]},"varyingRead1":{"pos":[150,200]},"varyingWrite1":{"pos":[0,200]},"vec2ToFloat1":{"pos":[-300,-150]},"vec3ToFloat1":{"pos":[300,300]},"vec3ToFloat2":{"pos":[300,450]},"vec3ToFloat3":{"pos":[300,600]},"vec3ToFloat4":{"pos":[300,700]},"vec4ToFloat1":{"pos":[-250,-350]},"vec4ToVec3_1":{"pos":[-300,300]},"vec4ToVec3_2":{"pos":[-300,450]},"vec4ToVec3_3":{"pos":[-300,600]},"vec4ToVec3_4":{"pos":[-300,700]}}}}},"material1":{"pos":[0,150]},"plane1":{"pos":[0,0]}}},"hemisphereLight1":{"pos":[200,50]},"perspectiveCamera1":{"pos":[-150,-150],"nodes":{"events1":{"pos":[-200,50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]}}}}},"COP":{"pos":[-150,150],"nodes":{"envMap":{"pos":[50,200]},"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]}}},"geo2":{"pos":[50,-100],"nodes":{"OUT":{"pos":[0,100]},"plane1":{"pos":[0,-150]},"transform1":{"pos":[0,0]}}}}}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.5,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/perspectiveCamera1","linkIndex":1}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":189,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-544.2068994540834,"y":-268.18060847203185},"zoom":0.5572962962962963},"history":{"2":{"position":{"x":-48,"y":-22},"zoom":0.6620000000000001},"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},"32":{"position":{"x":-48,"y":-22},"zoom":0.5850000000000001},"122":{"position":{"x":-275.3504273504273,"y":-86.95726495726495},"zoom":0.5850000000000001},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146},"148":{"position":{"x":-490.73504273504267,"y":-112.59829059829059},"zoom":0.5850000000000001},"186":{"position":{"x":-544.2068994540834,"y":-268.18060847203185},"zoom":0.5572962962962963}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/geo1/MAT/meshBasicBuilder1","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/","/geo2","/","/geo1","/geo1/MAT","/geo1/MAT/meshBasicBuilder1"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":5,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"compressJs":true,"createZip":true},"paramsModal":[{"nodePath":"/geo2/transform1","style":{"top":548,"left":1448,"width":423,"height":340}}]}
Used nodes
cop/envMap;cop/image;event/cameraOrbitControls;mat/meshBasicBuilder;obj/copNetwork;obj/geo;obj/hemisphereLight;obj/perspectiveCamera;sop/eventsNetwork;sop/material;sop/materialsNetwork;sop/null;sop/plane;sop/transform
Used operations
Used modules
EXRLoader
Used assemblers
GL_MESH_BASIC
Used integrations
[]
Used assets
Nodes map
{"/geo1":"obj/geo","/geo1/MAT":"sop/materialsNetwork","/geo1/MAT/meshBasicBuilder1":"mat/meshBasicBuilder","/geo1/material1":"sop/material","/geo1/plane1":"sop/plane","/hemisphereLight1":"obj/hemisphereLight","/perspectiveCamera1":"obj/perspectiveCamera","/perspectiveCamera1/events1":"sop/eventsNetwork","/perspectiveCamera1/events1/cameraOrbitControls1":"event/cameraOrbitControls","/COP":"obj/copNetwork","/COP/envMap":"cop/envMap","/COP/imageEnv":"cop/image","/COP/imageUv":"cop/image","/geo2":"obj/geo","/geo2/OUT":"sop/null","/geo2/plane1":"sop/plane","/geo2/transform1":"sop/transform"}
Js version
Editor version
Engine version
Name
*
Code
{"properties":{"frame":0,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraNodePath":null,"versions":{"polygonjs":"1.1.237"}},"root":{"type":"root","nodes":{"geo1":{"type":"geo","nodes":{"MAT":{"type":"materialsNetwork","nodes":{"meshBasicBuilder1":{"type":"meshBasicBuilder","nodes":{"compare1":{"type":"compare","params":{"value0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false},"raw_input":1},"value1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec3ToFloat1","output":"x"},{"index":1,"node":"multAdd1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"float"},{"name":"value1","type":"float"}],"out":[{"name":"val","type":"bool"}]}},"complement1":{"type":"complement","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec4ToFloat1","output":"y"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"complement2":{"type":"complement","params":{"in":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"divide1","output":"divide"}],"connection_points":{"in":[{"name":"in","type":"float"}],"out":[{"name":"val","type":"float"}]}},"constant1":{"type":"constant","params":{"type":4,"color":[0.9490196078431372,0.050980392156862744,0.050980392156862744],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"type":4,"color":[0.10980392156862745,0.9490196078431372,0.050980392156862744],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"divide1":{"type":"divide","params":{"div0":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div1":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div2":{"type":"float","default_value":1,"options":{"spare":true,"editable":true}}},"maxInputsCount":3,"inputs":[{"index":0,"node":"vec4ToFloat1","output":"x"},{"index":1,"node":"vec2ToFloat1","output":"x"}],"connection_points":{"in":[{"name":"div0","type":"float"},{"name":"div1","type":"float"},{"name":"div2","type":"float"}],"out":[{"name":"divide","type":"float"}]}},"divide2":{"type":"divide","params":{"div0":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div1":{"type":"float","default_value":1,"options":{"spare":true,"editable":false}},"div2":{"type":"float","default_value":1,"options":{"spare":true,"editable":true}}},"maxInputsCount":3,"inputs":[{"index":0,"node":"vec4ToFloat1","output":"y"},{"index":1,"node":"vec2ToFloat1","output":"y"}],"connection_points":{"in":[{"name":"div0","type":"float"},{"name":"div1","type":"float"},{"name":"div2","type":"float"}],"out":[{"name":"divide","type":"float"}]}},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"divide1","output":"divide"},{"index":1,"node":"divide2","output":"divide"}]},"globals1":{"type":"globals"},"min1":{"type":"min","params":{"in0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"in1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec3ToFloat1","output":"x"},{"index":1,"node":"vec3ToFloat2","output":"x"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"min2":{"type":"min","params":{"in0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"in1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"min1","output":"val"},{"index":1,"node":"vec3ToFloat3","output":"x"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"min3":{"type":"min","params":{"in0":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"in1":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"min2","output":"val"},{"index":1,"node":"vec3ToFloat4","output":"x"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"modelViewMatrixMult1":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner0","output":"val"}]},"modelViewMatrixMult2":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner1","output":"val"}]},"modelViewMatrixMult3":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner2","output":"val"}]},"modelViewMatrixMult4":{"type":"modelViewMatrixMult","params":{"vector":{"overriden_options":{}}},"inputs":[{"index":0,"node":"param_corner3","output":"val"}]},"multAdd1":{"type":"multAdd","params":{"value":{"type":"float","default_value":0,"options":{"spare":true,"editable":false}},"preAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}},"mult":{"type":"float","default_value":1,"options":{"spare":true,"editable":true},"raw_input":0.5},"postAdd":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"divide1","output":"divide"}],"connection_points":{"in":[{"name":"value","type":"float"},{"name":"preAdd","type":"float"},{"name":"mult","type":"float"},{"name":"postAdd","type":"float"}],"out":[{"name":"val","type":"float"}]}},"negate1":{"type":"negate","params":{"in":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec4ToVec3_1","output":"vec3"}],"connection_points":{"in":[{"name":"in","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"output1":{"type":"output","inputs":[null,null,{"index":2,"node":"twoWaySwitch1","output":"val"}]},"param_corner0":{"type":"param","params":{"name":"corner0","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param_corner1":{"type":"param","params":{"name":"corner1","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param_corner2":{"type":"param","params":{"name":"corner2","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"param_corner3":{"type":"param","params":{"name":"corner3","type":4},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"twoWaySwitch1":{"type":"twoWaySwitch","params":{"condition":{"type":"boolean","default_value":false,"options":{"spare":true,"editable":false}},"ifTrue":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"ifFalse":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"compare1","output":"val"},{"index":1,"node":"constant1","output":"val"},{"index":2,"node":"constant2","output":"val"}],"connection_points":{"in":[{"name":"condition","type":"bool"},{"name":"ifTrue","type":"vec3"},{"name":"ifFalse","type":"vec3"}],"out":[{"name":"val","type":"vec3"}]}},"varyingRead1":{"type":"varyingRead","params":{"name":"varyingCorner0","type":2},"connection_points":{"in":[],"out":[{"name":"fragment","type":"vec3"}]}},"varyingWrite1":{"type":"varyingWrite","params":{"name":"varyingCorner0","type":2,"vertex":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"vec4ToVec3_1","output":"vec3"}],"connection_points":{"in":[{"name":"vertex","type":"vec3"}],"out":[]}},"vec2ToFloat1":{"type":"vec2ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"globals1","output":"resolution"}]},"vec3ToFloat1":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"varyingRead1","output":"fragment"}]},"vec3ToFloat2":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec4ToVec3_2","output":"vec3"}]},"vec3ToFloat3":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec4ToVec3_3","output":"vec3"}]},"vec3ToFloat4":{"type":"vec3ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec4ToVec3_4","output":"vec3"}]},"vec4ToFloat1":{"type":"vec4ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"globals1","output":"gl_FragCoord"}]},"vec4ToVec3_1":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult1","output":"mvMult"}]},"vec4ToVec3_2":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult2","output":"mvMult"}]},"vec4ToVec3_3":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult3","output":"mvMult"}]},"vec4ToVec3_4":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"modelViewMatrixMult4","output":"mvMult"}]}},"params":{"corner0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 0).x","point('/geo2/OUT', 'P', 0).y","point('/geo2/OUT', 'P', 0).z"],"overriden_options":{"callback":"{}"}},"corner1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 1).x","point('/geo2/OUT', 'P', 1).y","point('/geo2/OUT', 'P', 1).z"],"overriden_options":{"callback":"{}"}},"corner2":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 2).x","point('/geo2/OUT', 'P', 2).y","point('/geo2/OUT', 'P', 2).z"],"overriden_options":{"callback":"{}"}},"corner3":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"computeOnDirty":true,"cook":false,"dependentOnFoundNode":true},"raw_input":["point('/geo2/OUT', 'P', 3).x","point('/geo2/OUT', 'P', 3).y","point('/geo2/OUT', 'P', 3).z"],"overriden_options":{"callback":"{}"}}},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-main","type":"MeshBasicMaterial","name":"/geo1/MAT/meshBasicBuilder1","color":16777215,"reflectivity":1,"refractionRatio":0.98,"depthFunc":3,"depthTest":true,"depthWrite":true,"colorWrite":true,"stencilWrite":false,"stencilWriteMask":255,"stencilFunc":519,"stencilRef":0,"stencilFuncMask":255,"stencilFail":7680,"stencilZFail":7680,"stencilZPass":7680,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\n\n\n\n\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n\nvoid main() {\n\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n\n}\n","fragmentShader":"\nuniform vec3 diffuse;\nuniform float opacity;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\n\n\n\n\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 <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\n\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\n\n\n\n\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\n\t// accumulation (baked indirect lighting only)\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;\n\n\t#else\n\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\n\t#endif\n\n\t// modulation\n\t#include <aomap_fragment>\n\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\n\t#include <envmap_fragment>\n\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\n}\n","timeDependent":false,"resolutionDependent":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]},"customMaterials":{"customDepthMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-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,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\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>\n\n// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible.\n// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for\n// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1.\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <uv_vertex>\n\n\t#include <skinbase_vertex>\n\n\t#ifdef USE_DISPLACEMENTMAP\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\tvHighPrecisionZW = gl_Position.zw;\n\n}\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// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\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\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\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":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]}},"customDistanceMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-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,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#define DISTANCE\n\nvarying vec3 vWorldPosition;\n\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\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>\n\nvoid main() {\n\n\t#include <uv_vertex>\n\n\t#include <skinbase_vertex>\n\n\t#ifdef USE_DISPLACEMENTMAP\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\tvWorldPosition = worldPosition.xyz;\n\n}\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// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\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\nvoid main () {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\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":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]}},"customDepthDOFMaterial":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/geo1/MAT/meshBasicBuilder1-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,"shadowSide":null},"onBeforeCompileDataJSON":{"vertexShader":"\n#include <common>\n\n\n\n// /geo1/MAT/meshBasicBuilder1/param_corner0\nuniform vec3 v_POLY_param_corner0;\n\n// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingWrite1\nvarying vec3 varyingCorner0;\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>\n\n// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible.\n// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for\n// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1.\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include <uv_vertex>\n\n\t#include <skinbase_vertex>\n\n\t#ifdef USE_DISPLACEMENTMAP\n\n// removed:\n//\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\n\t#endif\n\n// removed:\n//\t#include <begin_vertex>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/param_corner0\n\tvec3 v_POLY_param_corner0_val = v_POLY_param_corner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/modelViewMatrixMult1\n\tvec4 v_POLY_modelViewMatrixMult1_mvMult = modelViewMatrix * vec4(v_POLY_param_corner0_val, 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToVec3_1\n\tvec3 v_POLY_vec4ToVec3_1_vec3 = v_POLY_modelViewMatrixMult1_mvMult.xyz;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/varyingWrite1\n\tvaryingCorner0 = v_POLY_vec4ToVec3_1_vec3;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/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\n\tvHighPrecisionZW = gl_Position.zw;\n\n}\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// /geo1/MAT/meshBasicBuilder1/globals1\nuniform vec2 resolution;\n\n// /geo1/MAT/meshBasicBuilder1/varyingRead1\nvarying vec3 varyingCorner0;\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\nvoid main() {\n\n\t#include <clipping_planes_fragment>\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\n\n\n\t// /geo1/MAT/meshBasicBuilder1/varyingRead1\n\tvec3 v_POLY_varyingRead1_fragment = varyingCorner0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/globals1\n\tvec2 v_POLY_globals1_resolution = resolution;\n\tvec4 v_POLY_globals1_gl_FragCoord = gl_FragCoord;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.9490196078431372, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/constant2\n\tvec3 v_POLY_constant2_val = vec3(0.10980392156862745, 0.9490196078431372, 0.050980392156862744);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec3ToFloat1\n\tfloat v_POLY_vec3ToFloat1_x = v_POLY_varyingRead1_fragment.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec4ToFloat1\n\tfloat v_POLY_vec4ToFloat1_y = v_POLY_globals1_gl_FragCoord.y;\n\tfloat v_POLY_vec4ToFloat1_x = v_POLY_globals1_gl_FragCoord.x;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_globals1_resolution.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_globals1_resolution.y;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/divide1\n\tfloat v_POLY_divide1_divide = (v_POLY_vec4ToFloat1_x / v_POLY_vec2ToFloat1_x / 1.0);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/multAdd1\n\tfloat v_POLY_multAdd1_val = (0.5*(v_POLY_divide1_divide + 0.0)) + 0.0;\n\t\n\t// /geo1/MAT/meshBasicBuilder1/compare1\n\tbool v_POLY_compare1_val = (v_POLY_vec3ToFloat1_x < v_POLY_multAdd1_val);\n\t\n\t// /geo1/MAT/meshBasicBuilder1/twoWaySwitch1\n\tvec3 v_POLY_twoWaySwitch1_val;\n\tif(v_POLY_compare1_val){\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant1_val;\n\t} else {\n\tv_POLY_twoWaySwitch1_val = v_POLY_constant2_val;\n\t}\n\t\n\t// /geo1/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_twoWaySwitch1_val;\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":true,"paramConfigs":[{"type":"vector3","name":"corner0","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner0"},{"type":"vector3","name":"corner1","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner1"},{"type":"vector3","name":"corner2","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner2"},{"type":"vector3","name":"corner3","defaultValue":[0,0,0],"uniformName":"v_POLY_param_corner3"}]}}}}}},"selection":["meshBasicBuilder1"]},"material1":{"type":"material","params":{"material":"../MAT/meshBasicBuilder1"},"inputs":["plane1"],"flags":{"display":true}},"plane1":{"type":"plane","params":{"size":[12.6,5.7],"direction":[0,0,1],"center":[0,0,-4.7]}}},"inputs":["perspectiveCamera1"],"flags":{"display":true},"selection":["MAT"]},"hemisphereLight1":{"type":"hemisphereLight","flags":{"display":true}},"perspectiveCamera1":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[-0.032038692179124195,-0.15399795053673598,0.9101078754183982]}}},"selection":["cameraOrbitControls1"]}},"params":{"r":[-2.8532186467961016,0.5933348467503096,0.029570841140726178]},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"envMap":{"type":"envMap","inputs":["imageEnv"]},"imageEnv":{"type":"image","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}}}},"geo2":{"type":"geo","nodes":{"OUT":{"type":"null","inputs":["transform1"],"flags":{"display":true}},"plane1":{"type":"plane"},"transform1":{"type":"transform","params":{"t":[0.48186118693100877,-0.05207246397404336,-3.534651627921943],"r":[22,-41.90178326602226,-24.33666412902554]},"inputs":["plane1"]}},"flags":{"display":true}}},"selection":["geo1"]},"ui":{"nodes":{"geo1":{"pos":[-150,0],"nodes":{"MAT":{"pos":[-250,150],"nodes":{"meshBasicBuilder1":{"pos":[0,0],"nodes":{"compare1":{"pos":[350,50]},"complement1":{"pos":[300,-250]},"complement2":{"pos":[0,-450]},"constant1":{"pos":[400,-150]},"constant2":{"pos":[350,-50]},"divide1":{"pos":[-50,-100]},"divide2":{"pos":[250,-350]},"floatToVec3_1":{"pos":[450,-450]},"globals1":{"pos":[-550,-350]},"min1":{"pos":[550,300]},"min2":{"pos":[650,350]},"min3":{"pos":[750,450]},"modelViewMatrixMult1":{"pos":[-400,300]},"modelViewMatrixMult2":{"pos":[-400,450]},"modelViewMatrixMult3":{"pos":[-400,600]},"modelViewMatrixMult4":{"pos":[-400,700]},"multAdd1":{"pos":[100,-50]},"negate1":{"pos":[-150,250]},"output1":{"pos":[750,-100]},"param_corner0":{"pos":[-550,300]},"param_corner1":{"pos":[-550,450]},"param_corner2":{"pos":[-550,600]},"param_corner3":{"pos":[-550,700]},"twoWaySwitch1":{"pos":[550,50]},"varyingRead1":{"pos":[150,200]},"varyingWrite1":{"pos":[0,200]},"vec2ToFloat1":{"pos":[-300,-150]},"vec3ToFloat1":{"pos":[300,300]},"vec3ToFloat2":{"pos":[300,450]},"vec3ToFloat3":{"pos":[300,600]},"vec3ToFloat4":{"pos":[300,700]},"vec4ToFloat1":{"pos":[-250,-350]},"vec4ToVec3_1":{"pos":[-300,300]},"vec4ToVec3_2":{"pos":[-300,450]},"vec4ToVec3_3":{"pos":[-300,600]},"vec4ToVec3_4":{"pos":[-300,700]}}}}},"material1":{"pos":[0,150]},"plane1":{"pos":[0,0]}}},"hemisphereLight1":{"pos":[200,50]},"perspectiveCamera1":{"pos":[-150,-150],"nodes":{"events1":{"pos":[-200,50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]}}}}},"COP":{"pos":[-150,150],"nodes":{"envMap":{"pos":[50,200]},"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]}}},"geo2":{"pos":[50,-100],"nodes":{"OUT":{"pos":[0,100]},"plane1":{"pos":[0,-150]},"transform1":{"pos":[0,0]}}}}}}
Code editor
{"multiple_panel":{"split_ratio":0.5,"split_panel0":{"split_ratio":0.5,"split_panel0":{"panelTypes":["viewer"],"currentPanelIndex":0,"panel_data":{"camera":"/perspectiveCamera1","linkIndex":1}},"split_panel1":{"panelTypes":["params"],"currentPanelIndex":0,"panel_data":{"active_folder":189,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-544.2068994540834,"y":-268.18060847203185},"zoom":0.5572962962962963},"history":{"2":{"position":{"x":-48,"y":-22},"zoom":0.6620000000000001},"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},"32":{"position":{"x":-48,"y":-22},"zoom":0.5850000000000001},"122":{"position":{"x":-275.3504273504273,"y":-86.95726495726495},"zoom":0.5850000000000001},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146},"148":{"position":{"x":-490.73504273504267,"y":-112.59829059829059},"zoom":0.5850000000000001},"186":{"position":{"x":-544.2068994540834,"y":-268.18060847203185},"zoom":0.5572962962962963}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/geo1/MAT/meshBasicBuilder1","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/","/geo2","/","/geo1","/geo1/MAT","/geo1/MAT/meshBasicBuilder1"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":5,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0}},"fullscreenPanelId":null,"saveOptions":{"compressJs":true,"createZip":true},"paramsModal":[{"nodePath":"/geo2/transform1","style":{"top":548,"left":1448,"width":423,"height":340}}]}
Used nodes
cop/envMap;cop/image;event/cameraOrbitControls;mat/meshBasicBuilder;obj/copNetwork;obj/geo;obj/hemisphereLight;obj/perspectiveCamera;sop/eventsNetwork;sop/material;sop/materialsNetwork;sop/null;sop/plane;sop/transform
Used operations
Used modules
EXRLoader
Used assemblers
GL_MESH_BASIC
Used integrations
[]
Used assets
Nodes map
{"/geo1":"obj/geo","/geo1/MAT":"sop/materialsNetwork","/geo1/MAT/meshBasicBuilder1":"mat/meshBasicBuilder","/geo1/material1":"sop/material","/geo1/plane1":"sop/plane","/hemisphereLight1":"obj/hemisphereLight","/perspectiveCamera1":"obj/perspectiveCamera","/perspectiveCamera1/events1":"sop/eventsNetwork","/perspectiveCamera1/events1/cameraOrbitControls1":"event/cameraOrbitControls","/COP":"obj/copNetwork","/COP/envMap":"cop/envMap","/COP/imageEnv":"cop/image","/COP/imageUv":"cop/image","/geo2":"obj/geo","/geo2/OUT":"sop/null","/geo2/plane1":"sop/plane","/geo2/transform1":"sop/transform"}
Js version
Editor version
Engine version
Logout
0%
There was a problem displaying your scene:
view scene source