Name
*
Code
{"properties":{"frame":0,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/perspectiveCamera1","versions":{"polygonjs":"1.1.261"}},"root":{"type":"root","nodes":{"hemisphereLight1":{"type":"hemisphereLight","flags":{"display":true}},"perspectiveCamera1":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[0.8291353145271415,-0.14544683664514974,0.11845464135823094]}}},"selection":["cameraOrbitControls1"]},"renderersNetwork1":{"type":"renderersNetwork","nodes":{"WebGLRenderer1":{"type":"WebGLRenderer","params":{"toneMapping":0,"outputEncoding":3000}}}}},"params":{"t":[0.5161526633531355,2.8787657307191874,7.114738208647523],"r":[-22.723127930556515,44.66532130223666,16.403892417511617],"controls":"./events1/cameraOrbitControls1","setRenderer":1,"renderer":"renderersNetwork1/WebGLRenderer1"},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"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}},"envMap":{"type":"envMap","inputs":["imageEnv"]}}},"plane_lines":{"type":"geo","nodes":{"plane1":{"type":"plane","params":{"size":[4,4],"stepSize":0.25075,"asLines":1}},"noise1":{"type":"noise","params":{"amplitude":0.32,"freq":[0.18000000000000005,0.18000000000000005,0.18000000000000005],"useNormals":1},"inputs":["plane1"]},"material1":{"type":"material","params":{"material":"../MAT/lineBasic1"},"inputs":["noise1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"lineBasic1":{"type":"lineBasic","params":{"color":[0,0,0]}}},"selection":["lineBasic1"]}},"params":{"t":[-2.5,0,0]},"flags":{"display":true},"selection":["material1","MAT"]},"sphere_lines":{"type":"geo","nodes":{"sphere1":{"type":"sphere","params":{"resolution":[20,20],"asLines":1}},"noise1":{"type":"noise","params":{"amplitude":0.29,"freq":[0.3,0.3,0.3],"offset":[1.4,0,0],"useNormals":1},"inputs":["sphere1"]},"material1":{"type":"material","params":{"material":"../MAT/lineBasic1"},"inputs":["noise1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"lineBasic1":{"type":"lineBasic","params":{"color":[0,0,0]}}},"selection":["lineBasic1"]}},"flags":{"display":true}},"sphere_mesh_and_lines":{"type":"geo","nodes":{"noise1":{"type":"noise","params":{"amplitude":0.29,"freq":[0.3,0.3,0.3],"offset":[1.4,0,0],"useNormals":true},"inputs":["merge1"],"flags":{"display":true}},"sphere1":{"type":"sphere","params":{"resolution":[20,20],"asLines":1}},"sphere2":{"type":"sphere","params":{"radius":0.98,"resolution":[20,20]}},"merge1":{"type":"merge","inputs":["material2","material1"]},"material1":{"type":"material","params":{"material":"../MAT/meshBasic1"},"inputs":["sphere2"]},"MAT":{"type":"materialsNetwork","nodes":{"meshBasic1":{"type":"meshBasic","params":{"color":{"raw_input":[0.7607843137254902,0.7568627450980392,0.7568627450980392],"overriden_options":{"conversion":"no conversion"}}}},"lineBasic1":{"type":"lineBasic","params":{"color":[0,0,0]}}}},"material2":{"type":"material","params":{"material":"../MAT/lineBasic1"},"inputs":["sphere1"]}},"params":{"t":[2.42812159350023,0,0]},"flags":{"display":true}},"sphere_mesh_with_custom_shader":{"type":"geo","nodes":{"noise1":{"type":"noise","params":{"amplitude":0.29,"freq":[0.3,0.3,0.3],"offset":[1.4,0,0],"useNormals":true},"inputs":["sphere1"]},"sphere1":{"type":"sphere","params":{"resolution":[20,20]}},"material1":{"type":"material","params":{"material":"../MAT/meshBasicBuilder1"},"inputs":["noise1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"meshBasicBuilder1":{"type":"meshBasicBuilder","nodes":{"abs2":{"type":"abs","params":{"in":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"multAdd5","output":"val"}],"connection_points":{"in":[{"name":"in","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"colorCorrect1":{"type":"colorCorrect","params":{"color":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec3ToVec4_1","output":"vec4"}]},"constant1":{"type":"constant","params":{"type":4,"color":[0.7607843137254902,0.7568627450980392,0.7568627450980392],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"float":0.38},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"constant3":{"type":"constant","params":{"type":4,"color":[0.050980392156862744,0.050980392156862744,0.050980392156862744],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"floatToVec2_1":{"type":"floatToVec2","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant2","output":"val"},{"index":1,"node":"constant2","output":"val"}]},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"max1","output":"val"},{"index":1,"node":"max1","output":"val"},{"index":2,"node":"max1","output":"val"}]},"fract2":{"type":"fract","params":{"in":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"multAdd4","output":"val"}],"connection_points":{"in":[{"name":"in","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"globals1":{"type":"globals"},"max1":{"type":"max","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":"vec2ToFloat1","output":"x"},{"index":1,"node":"vec2ToFloat1","output":"y"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false},"overriden_options":{}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false},"overriden_options":{}}},"inputs":[{"index":0,"node":"constant1","output":"val"},{"index":1,"node":"constant3","output":"val"},{"index":2,"node":"max1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}},"multAdd1":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true},"raw_input":[28,28]},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"globals1","output":"uv"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true},"raw_input":[11.5,11.5]},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"smoothstep3","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"multAdd4":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true},"raw_input":[-0.5,-0.5]},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true}},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"multAdd1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"multAdd5":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true},"raw_input":[-0.5,-0.5]},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true}},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"fract2","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"output1":{"type":"output","inputs":[null,null,{"index":2,"node":"mix1","output":"mix"}]},"smoothstep3":{"type":"smoothstep","params":{"edge0":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"edge1":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true}},"x":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false},"overriden_options":{}}},"inputs":[{"index":0,"node":"floatToVec2_1","output":"vec2"},null,{"index":2,"node":"abs2","output":"val"}],"connection_points":{"in":[{"name":"edge0","type":"vec2"},{"name":"edge1","type":"vec2"},{"name":"x","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"twoWaySwitch1":{"type":"twoWaySwitch","params":{"condition":{"type":"boolean","default_value":false,"options":{"spare":true,"editable":true}},"ifTrue":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}},"ifFalse":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}}},"connection_points":{"in":[{"name":"condition","type":"bool"},{"name":"ifTrue","type":"float"},{"name":"ifFalse","type":"float"}],"out":[{"name":"val","type":"float"}]}},"vec2ToFloat1":{"type":"vec2ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"multAdd2","output":"val"}]},"vec3ToVec4_1":{"type":"vec3ToVec4","params":{"vec3":{"overriden_options":{}},"w":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant1","output":"val"}]},"vec4ToVec3_1":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"colorCorrect1","output":"out"}]}},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1-main","type":"MeshBasicMaterial","name":"/sphere_mesh_with_custom_shader/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},"onBeforeCompileDataJSON":{"vertexShader":"#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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 <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\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\t#endif\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\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}","fragmentShader":"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\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":"/sphere_mesh_with_custom_shader/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,"depthPacking":3201},"onBeforeCompileDataJSON":{"vertexShader":"#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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":"/sphere_mesh_with_custom_shader/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},"onBeforeCompileDataJSON":{"vertexShader":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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":"/sphere_mesh_with_custom_shader/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,"depthPacking":3200},"onBeforeCompileDataJSON":{"vertexShader":"#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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":[]}}}}}},"selection":["meshBasicBuilder1"]}},"params":{"t":[5.043486941297932,0,0]},"flags":{"display":true}}},"params":{"bgColor":{"raw_input":[0.7607843137254902,0.7568627450980392,0.7568627450980392],"overriden_options":{"conversion":"no conversion"}},"mainCameraPath":"/perspectiveCamera1"}},"ui":{"nodes":{"hemisphereLight1":{"pos":[150,100]},"perspectiveCamera1":{"pos":[-200,100],"nodes":{"events1":{"pos":[-200,50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]}}},"renderersNetwork1":{"pos":[-200,150],"nodes":{"WebGLRenderer1":{"pos":[-100,100]}}}}},"COP":{"pos":[-200,200],"nodes":{"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]},"envMap":{"pos":[50,200]}}},"plane_lines":{"pos":[0,-300],"nodes":{"plane1":{"pos":[-250,-50]},"noise1":{"pos":[-250,50]},"material1":{"pos":[-250,150]},"MAT":{"pos":[-450,150],"nodes":{"lineBasic1":{"pos":[0,-100]}}}}},"sphere_lines":{"pos":[0,-200],"nodes":{"sphere1":{"pos":[0,-150]},"noise1":{"pos":[0,-50]},"material1":{"pos":[0,100]},"MAT":{"pos":[-200,100],"nodes":{"lineBasic1":{"pos":[0,-100]}}}}},"sphere_mesh_and_lines":{"pos":[0,-100],"nodes":{"noise1":{"pos":[0,-50]},"sphere1":{"pos":[-100,-400]},"sphere2":{"pos":[100,-400]},"merge1":{"pos":[0,-150]},"material1":{"pos":[100,-300]},"MAT":{"pos":[-250,-150],"nodes":{"meshBasic1":{"pos":[0,-100]},"lineBasic1":{"pos":[0,0]}}},"material2":{"pos":[-100,-300]}}},"sphere_mesh_with_custom_shader":{"pos":[0,0],"nodes":{"noise1":{"pos":[0,-50]},"sphere1":{"pos":[0,-150]},"material1":{"pos":[0,50]},"MAT":{"pos":[-200,50],"nodes":{"meshBasicBuilder1":{"pos":[0,100],"nodes":{"abs2":{"pos":[-450,250]},"colorCorrect1":{"pos":[350,-350]},"constant1":{"pos":[50,-300]},"constant2":{"pos":[-500,50]},"constant3":{"pos":[50,-150]},"floatToVec2_1":{"pos":[-400,50]},"floatToVec3_1":{"pos":[350,100]},"fract2":{"pos":[-650,250]},"globals1":{"pos":[-1100,150]},"max1":{"pos":[100,100]},"mix1":{"pos":[250,-100]},"multAdd1":{"pos":[-900,250]},"multAdd2":{"pos":[-150,100]},"multAdd4":{"pos":[-750,250]},"multAdd5":{"pos":[-550,250]},"output1":{"pos":[550,-250]},"smoothstep3":{"pos":[-300,150]},"twoWaySwitch1":{"pos":[250,250]},"vec2ToFloat1":{"pos":[0,100]},"vec3ToVec4_1":{"pos":[200,-350]},"vec4ToVec3_1":{"pos":[450,-350]}}}}}}}}}}
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":81,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-104.40243902439022,"y":5.439024390243894},"zoom":0.6560000000000001},"history":{"2":{"position":{"x":-104.40243902439022,"y":5.439024390243894},"zoom":0.6560000000000001},"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},"33":{"position":{"x":-61,"y":-130},"zoom":0.5},"75":{"position":{"x":200,"y":-50},"zoom":0.5},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146},"396":{"position":{"x":-110,"y":14},"zoom":0.5},"464":{"position":{"x":-128,"y":2},"zoom":0.558},"565":{"position":{"x":-17.13841713841714,"y":96.66722166722165},"zoom":0.6160000000000001},"648":{"position":{"x":-160.06097560975604,"y":98.47560975609755},"zoom":0.6560000000000001},"777":{"position":{"x":0,"y":0},"zoom":0.6160000000000001},"936":{"position":{"x":-44.20731707317072,"y":-25.914634146341456},"zoom":0.6560000000000001},"1013":{"position":{"x":28.04878048780492,"y":60.67073170731707},"zoom":0.6560000000000001},"1519":{"position":{"x":0,"y":0},"zoom":0.5},"1698":{"position":{"x":0,"y":100},"zoom":0.6160000000000001}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/","/plane_lines","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/plane_lines","/","/sphere_lines","/","/sphere_mesh_and_lines","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_with_custom_shader","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_with_custom_shader","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader","/","/plane_lines","/plane_lines/MAT","/plane_lines","/plane_lines/MAT","/plane_lines","/","/sphere_lines","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_with_custom_shader","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader","/"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":53,"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;mat/lineBasic;mat/meshBasic;mat/meshBasicBuilder;obj/copNetwork;obj/geo;obj/hemisphereLight;obj/perspectiveCamera;rop/WebGLRenderer;sop/eventsNetwork;sop/material;sop/materialsNetwork;sop/merge;sop/noise;sop/plane;sop/renderersNetwork;sop/sphere
Used operations
Used modules
Used assemblers
GL_MESH_BASIC
Used integrations
[]
Used assets
Nodes map
{"/hemisphereLight1":"obj/hemisphereLight","/perspectiveCamera1":"obj/perspectiveCamera","/perspectiveCamera1/events1":"sop/eventsNetwork","/perspectiveCamera1/events1/cameraOrbitControls1":"event/cameraOrbitControls","/perspectiveCamera1/renderersNetwork1":"sop/renderersNetwork","/perspectiveCamera1/renderersNetwork1/WebGLRenderer1":"rop/WebGLRenderer","/COP":"obj/copNetwork","/COP/imageEnv":"cop/imageEXR","/COP/imageUv":"cop/image","/COP/envMap":"cop/envMap","/plane_lines":"obj/geo","/plane_lines/plane1":"sop/plane","/plane_lines/noise1":"sop/noise","/plane_lines/material1":"sop/material","/plane_lines/MAT":"sop/materialsNetwork","/plane_lines/MAT/lineBasic1":"mat/lineBasic","/sphere_lines":"obj/geo","/sphere_lines/sphere1":"sop/sphere","/sphere_lines/noise1":"sop/noise","/sphere_lines/material1":"sop/material","/sphere_lines/MAT":"sop/materialsNetwork","/sphere_lines/MAT/lineBasic1":"mat/lineBasic","/sphere_mesh_and_lines":"obj/geo","/sphere_mesh_and_lines/noise1":"sop/noise","/sphere_mesh_and_lines/sphere1":"sop/sphere","/sphere_mesh_and_lines/sphere2":"sop/sphere","/sphere_mesh_and_lines/merge1":"sop/merge","/sphere_mesh_and_lines/material1":"sop/material","/sphere_mesh_and_lines/MAT":"sop/materialsNetwork","/sphere_mesh_and_lines/MAT/meshBasic1":"mat/meshBasic","/sphere_mesh_and_lines/MAT/lineBasic1":"mat/lineBasic","/sphere_mesh_and_lines/material2":"sop/material","/sphere_mesh_with_custom_shader":"obj/geo","/sphere_mesh_with_custom_shader/noise1":"sop/noise","/sphere_mesh_with_custom_shader/sphere1":"sop/sphere","/sphere_mesh_with_custom_shader/material1":"sop/material","/sphere_mesh_with_custom_shader/MAT":"sop/materialsNetwork","/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1":"mat/meshBasicBuilder"}
Js version
Editor version
Engine version
Name
*
Code
{"properties":{"frame":0,"maxFrame":600,"maxFrameLocked":false,"realtimeState":true,"mainCameraPath":"/perspectiveCamera1","versions":{"polygonjs":"1.1.261"}},"root":{"type":"root","nodes":{"hemisphereLight1":{"type":"hemisphereLight","flags":{"display":true}},"perspectiveCamera1":{"type":"perspectiveCamera","nodes":{"events1":{"type":"eventsNetwork","nodes":{"cameraOrbitControls1":{"type":"cameraOrbitControls","params":{"target":[0.8291353145271415,-0.14544683664514974,0.11845464135823094]}}},"selection":["cameraOrbitControls1"]},"renderersNetwork1":{"type":"renderersNetwork","nodes":{"WebGLRenderer1":{"type":"WebGLRenderer","params":{"toneMapping":0,"outputEncoding":3000}}}}},"params":{"t":[0.5161526633531355,2.8787657307191874,7.114738208647523],"r":[-22.723127930556515,44.66532130223666,16.403892417511617],"controls":"./events1/cameraOrbitControls1","setRenderer":1,"renderer":"renderersNetwork1/WebGLRenderer1"},"flags":{"display":true}},"COP":{"type":"copNetwork","nodes":{"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}},"envMap":{"type":"envMap","inputs":["imageEnv"]}}},"plane_lines":{"type":"geo","nodes":{"plane1":{"type":"plane","params":{"size":[4,4],"stepSize":0.25075,"asLines":1}},"noise1":{"type":"noise","params":{"amplitude":0.32,"freq":[0.18000000000000005,0.18000000000000005,0.18000000000000005],"useNormals":1},"inputs":["plane1"]},"material1":{"type":"material","params":{"material":"../MAT/lineBasic1"},"inputs":["noise1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"lineBasic1":{"type":"lineBasic","params":{"color":[0,0,0]}}},"selection":["lineBasic1"]}},"params":{"t":[-2.5,0,0]},"flags":{"display":true},"selection":["material1","MAT"]},"sphere_lines":{"type":"geo","nodes":{"sphere1":{"type":"sphere","params":{"resolution":[20,20],"asLines":1}},"noise1":{"type":"noise","params":{"amplitude":0.29,"freq":[0.3,0.3,0.3],"offset":[1.4,0,0],"useNormals":1},"inputs":["sphere1"]},"material1":{"type":"material","params":{"material":"../MAT/lineBasic1"},"inputs":["noise1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"lineBasic1":{"type":"lineBasic","params":{"color":[0,0,0]}}},"selection":["lineBasic1"]}},"flags":{"display":true}},"sphere_mesh_and_lines":{"type":"geo","nodes":{"noise1":{"type":"noise","params":{"amplitude":0.29,"freq":[0.3,0.3,0.3],"offset":[1.4,0,0],"useNormals":true},"inputs":["merge1"],"flags":{"display":true}},"sphere1":{"type":"sphere","params":{"resolution":[20,20],"asLines":1}},"sphere2":{"type":"sphere","params":{"radius":0.98,"resolution":[20,20]}},"merge1":{"type":"merge","inputs":["material2","material1"]},"material1":{"type":"material","params":{"material":"../MAT/meshBasic1"},"inputs":["sphere2"]},"MAT":{"type":"materialsNetwork","nodes":{"meshBasic1":{"type":"meshBasic","params":{"color":{"raw_input":[0.7607843137254902,0.7568627450980392,0.7568627450980392],"overriden_options":{"conversion":"no conversion"}}}},"lineBasic1":{"type":"lineBasic","params":{"color":[0,0,0]}}}},"material2":{"type":"material","params":{"material":"../MAT/lineBasic1"},"inputs":["sphere1"]}},"params":{"t":[2.42812159350023,0,0]},"flags":{"display":true}},"sphere_mesh_with_custom_shader":{"type":"geo","nodes":{"noise1":{"type":"noise","params":{"amplitude":0.29,"freq":[0.3,0.3,0.3],"offset":[1.4,0,0],"useNormals":true},"inputs":["sphere1"]},"sphere1":{"type":"sphere","params":{"resolution":[20,20]}},"material1":{"type":"material","params":{"material":"../MAT/meshBasicBuilder1"},"inputs":["noise1"],"flags":{"display":true}},"MAT":{"type":"materialsNetwork","nodes":{"meshBasicBuilder1":{"type":"meshBasicBuilder","nodes":{"abs2":{"type":"abs","params":{"in":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"multAdd5","output":"val"}],"connection_points":{"in":[{"name":"in","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"colorCorrect1":{"type":"colorCorrect","params":{"color":{"overriden_options":{}}},"inputs":[{"index":0,"node":"vec3ToVec4_1","output":"vec4"}]},"constant1":{"type":"constant","params":{"type":4,"color":[0.7607843137254902,0.7568627450980392,0.7568627450980392],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"constant2":{"type":"constant","params":{"float":0.38},"maxInputsCount":0,"connection_points":{"in":[],"out":[{"name":"val","type":"float"}]}},"constant3":{"type":"constant","params":{"type":4,"color":[0.050980392156862744,0.050980392156862744,0.050980392156862744],"asColor":true},"connection_points":{"in":[],"out":[{"name":"val","type":"vec3"}]}},"floatToVec2_1":{"type":"floatToVec2","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant2","output":"val"},{"index":1,"node":"constant2","output":"val"}]},"floatToVec3_1":{"type":"floatToVec3","params":{"x":{"overriden_options":{}},"y":{"overriden_options":{}},"z":{"overriden_options":{}}},"inputs":[{"index":0,"node":"max1","output":"val"},{"index":1,"node":"max1","output":"val"},{"index":2,"node":"max1","output":"val"}]},"fract2":{"type":"fract","params":{"in":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}}},"inputs":[{"index":0,"node":"multAdd4","output":"val"}],"connection_points":{"in":[{"name":"in","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"globals1":{"type":"globals"},"max1":{"type":"max","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":"vec2ToFloat1","output":"x"},{"index":1,"node":"vec2ToFloat1","output":"y"}],"connection_points":{"in":[{"name":"in0","type":"float"},{"name":"in1","type":"float"}],"out":[{"name":"val","type":"float"}]}},"mix1":{"type":"mix","params":{"value0":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false}},"value1":{"type":"vector3","default_value":[0,0,0],"options":{"spare":true,"editable":false},"overriden_options":{}},"blend":{"type":"float","default_value":0.5,"options":{"spare":true,"editable":false},"overriden_options":{}}},"inputs":[{"index":0,"node":"constant1","output":"val"},{"index":1,"node":"constant3","output":"val"},{"index":2,"node":"max1","output":"val"}],"connection_points":{"in":[{"name":"value0","type":"vec3"},{"name":"value1","type":"vec3"},{"name":"blend","type":"float"}],"out":[{"name":"mix","type":"vec3"}]}},"multAdd1":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true},"raw_input":[28,28]},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"globals1","output":"uv"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"multAdd2":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true},"raw_input":[11.5,11.5]},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"smoothstep3","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"multAdd4":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true},"raw_input":[-0.5,-0.5]},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true}},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"multAdd1","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"multAdd5":{"type":"multAdd","params":{"value":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"preAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true},"raw_input":[-0.5,-0.5]},"mult":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true}},"postAdd":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":true}}},"inputs":[{"index":0,"node":"fract2","output":"val"}],"connection_points":{"in":[{"name":"value","type":"vec2"},{"name":"preAdd","type":"vec2"},{"name":"mult","type":"vec2"},{"name":"postAdd","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"output1":{"type":"output","inputs":[null,null,{"index":2,"node":"mix1","output":"mix"}]},"smoothstep3":{"type":"smoothstep","params":{"edge0":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false}},"edge1":{"type":"vector2","default_value":[1,1],"options":{"spare":true,"editable":true}},"x":{"type":"vector2","default_value":[0,0],"options":{"spare":true,"editable":false},"overriden_options":{}}},"inputs":[{"index":0,"node":"floatToVec2_1","output":"vec2"},null,{"index":2,"node":"abs2","output":"val"}],"connection_points":{"in":[{"name":"edge0","type":"vec2"},{"name":"edge1","type":"vec2"},{"name":"x","type":"vec2"}],"out":[{"name":"val","type":"vec2"}]}},"twoWaySwitch1":{"type":"twoWaySwitch","params":{"condition":{"type":"boolean","default_value":false,"options":{"spare":true,"editable":true}},"ifTrue":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}},"ifFalse":{"type":"float","default_value":0,"options":{"spare":true,"editable":true}}},"connection_points":{"in":[{"name":"condition","type":"bool"},{"name":"ifTrue","type":"float"},{"name":"ifFalse","type":"float"}],"out":[{"name":"val","type":"float"}]}},"vec2ToFloat1":{"type":"vec2ToFloat","params":{"vec":{"overriden_options":{}}},"inputs":[{"index":0,"node":"multAdd2","output":"val"}]},"vec3ToVec4_1":{"type":"vec3ToVec4","params":{"vec3":{"overriden_options":{}},"w":{"overriden_options":{}}},"inputs":[{"index":0,"node":"constant1","output":"val"}]},"vec4ToVec3_1":{"type":"vec4ToVec3","params":{"vec4":{"overriden_options":{}}},"inputs":[{"index":0,"node":"colorCorrect1","output":"out"}]}},"persisted_config":{"material":{"metadata":{"version":4.5,"type":"Material","generator":"Material.toJSON"},"uuid":"/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1-main","type":"MeshBasicMaterial","name":"/sphere_mesh_with_custom_shader/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},"onBeforeCompileDataJSON":{"vertexShader":"#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\n\n\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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 <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\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\t#endif\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\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}","fragmentShader":"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\n\n\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\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":"/sphere_mesh_with_custom_shader/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,"depthPacking":3201},"onBeforeCompileDataJSON":{"vertexShader":"#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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":"/sphere_mesh_with_custom_shader/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},"onBeforeCompileDataJSON":{"vertexShader":"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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":"/sphere_mesh_with_custom_shader/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,"depthPacking":3200},"onBeforeCompileDataJSON":{"vertexShader":"#include <common>\n\n\n\n// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\n\tv_POLY_globals1_uv = vec2(uv);\n\t\n\t// /sphere_mesh_with_custom_shader/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\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/globals1\nvarying vec2 v_POLY_globals1_uv;\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// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant1\n\tvec3 v_POLY_constant1_val = vec3(0.7607843137254902, 0.7568627450980392, 0.7568627450980392);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant3\n\tvec3 v_POLY_constant3_val = vec3(0.050980392156862744, 0.050980392156862744, 0.050980392156862744);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/constant2\n\tfloat v_POLY_constant2_val = 0.38;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/floatToVec2_1\n\tvec2 v_POLY_floatToVec2_1_vec2 = vec2(v_POLY_constant2_val, v_POLY_constant2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd1\n\tvec2 v_POLY_multAdd1_val = (vec2(28.0, 28.0)*(v_POLY_globals1_uv + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd4\n\tvec2 v_POLY_multAdd4_val = (vec2(1.0, 1.0)*(v_POLY_multAdd1_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/fract2\n\tvec2 v_POLY_fract2_val = fract(v_POLY_multAdd4_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd5\n\tvec2 v_POLY_multAdd5_val = (vec2(1.0, 1.0)*(v_POLY_fract2_val + vec2(-0.5, -0.5))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/abs2\n\tvec2 v_POLY_abs2_val = abs(v_POLY_multAdd5_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/smoothstep3\n\tvec2 v_POLY_smoothstep3_val = smoothstep(v_POLY_floatToVec2_1_vec2, vec2(1.0, 1.0), v_POLY_abs2_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/multAdd2\n\tvec2 v_POLY_multAdd2_val = (vec2(11.5, 11.5)*(v_POLY_smoothstep3_val + vec2(0.0, 0.0))) + vec2(0.0, 0.0);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/vec2ToFloat1\n\tfloat v_POLY_vec2ToFloat1_x = v_POLY_multAdd2_val.x;\n\tfloat v_POLY_vec2ToFloat1_y = v_POLY_multAdd2_val.y;\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/max1\n\tfloat v_POLY_max1_val = max(v_POLY_vec2ToFloat1_x, v_POLY_vec2ToFloat1_y);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/mix1\n\tvec3 v_POLY_mix1_mix = mix(v_POLY_constant1_val, v_POLY_constant3_val, v_POLY_max1_val);\n\t\n\t// /sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1/output1\n\tdiffuseColor.xyz = v_POLY_mix1_mix;\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":[]}}}}}},"selection":["meshBasicBuilder1"]}},"params":{"t":[5.043486941297932,0,0]},"flags":{"display":true}}},"params":{"bgColor":{"raw_input":[0.7607843137254902,0.7568627450980392,0.7568627450980392],"overriden_options":{"conversion":"no conversion"}},"mainCameraPath":"/perspectiveCamera1"}},"ui":{"nodes":{"hemisphereLight1":{"pos":[150,100]},"perspectiveCamera1":{"pos":[-200,100],"nodes":{"events1":{"pos":[-200,50],"nodes":{"cameraOrbitControls1":{"pos":[150,50]}}},"renderersNetwork1":{"pos":[-200,150],"nodes":{"WebGLRenderer1":{"pos":[-100,100]}}}}},"COP":{"pos":[-200,200],"nodes":{"imageEnv":{"pos":[50,100]},"imageUv":{"pos":[-100,100]},"envMap":{"pos":[50,200]}}},"plane_lines":{"pos":[0,-300],"nodes":{"plane1":{"pos":[-250,-50]},"noise1":{"pos":[-250,50]},"material1":{"pos":[-250,150]},"MAT":{"pos":[-450,150],"nodes":{"lineBasic1":{"pos":[0,-100]}}}}},"sphere_lines":{"pos":[0,-200],"nodes":{"sphere1":{"pos":[0,-150]},"noise1":{"pos":[0,-50]},"material1":{"pos":[0,100]},"MAT":{"pos":[-200,100],"nodes":{"lineBasic1":{"pos":[0,-100]}}}}},"sphere_mesh_and_lines":{"pos":[0,-100],"nodes":{"noise1":{"pos":[0,-50]},"sphere1":{"pos":[-100,-400]},"sphere2":{"pos":[100,-400]},"merge1":{"pos":[0,-150]},"material1":{"pos":[100,-300]},"MAT":{"pos":[-250,-150],"nodes":{"meshBasic1":{"pos":[0,-100]},"lineBasic1":{"pos":[0,0]}}},"material2":{"pos":[-100,-300]}}},"sphere_mesh_with_custom_shader":{"pos":[0,0],"nodes":{"noise1":{"pos":[0,-50]},"sphere1":{"pos":[0,-150]},"material1":{"pos":[0,50]},"MAT":{"pos":[-200,50],"nodes":{"meshBasicBuilder1":{"pos":[0,100],"nodes":{"abs2":{"pos":[-450,250]},"colorCorrect1":{"pos":[350,-350]},"constant1":{"pos":[50,-300]},"constant2":{"pos":[-500,50]},"constant3":{"pos":[50,-150]},"floatToVec2_1":{"pos":[-400,50]},"floatToVec3_1":{"pos":[350,100]},"fract2":{"pos":[-650,250]},"globals1":{"pos":[-1100,150]},"max1":{"pos":[100,100]},"mix1":{"pos":[250,-100]},"multAdd1":{"pos":[-900,250]},"multAdd2":{"pos":[-150,100]},"multAdd4":{"pos":[-750,250]},"multAdd5":{"pos":[-550,250]},"output1":{"pos":[550,-250]},"smoothstep3":{"pos":[-300,150]},"twoWaySwitch1":{"pos":[250,250]},"vec2ToFloat1":{"pos":[0,100]},"vec3ToVec4_1":{"pos":[200,-350]},"vec4ToVec3_1":{"pos":[450,-350]}}}}}}}}}}
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":81,"linkIndex":1}},"split_mode":"vertical"},"split_panel1":{"panelTypes":["network","params","viewer"],"currentPanelIndex":0,"panel_data":{"camera":{"position":{"x":-104.40243902439022,"y":5.439024390243894},"zoom":0.6560000000000001},"history":{"2":{"position":{"x":-104.40243902439022,"y":5.439024390243894},"zoom":0.6560000000000001},"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},"33":{"position":{"x":-61,"y":-130},"zoom":0.5},"75":{"position":{"x":200,"y":-50},"zoom":0.5},"131":{"position":{"x":-59.04899999999998,"y":-65.1854},"zoom":0.8467543904215146},"396":{"position":{"x":-110,"y":14},"zoom":0.5},"464":{"position":{"x":-128,"y":2},"zoom":0.558},"565":{"position":{"x":-17.13841713841714,"y":96.66722166722165},"zoom":0.6160000000000001},"648":{"position":{"x":-160.06097560975604,"y":98.47560975609755},"zoom":0.6560000000000001},"777":{"position":{"x":0,"y":0},"zoom":0.6160000000000001},"936":{"position":{"x":-44.20731707317072,"y":-25.914634146341456},"zoom":0.6560000000000001},"1013":{"position":{"x":28.04878048780492,"y":60.67073170731707},"zoom":0.6560000000000001},"1519":{"position":{"x":0,"y":0},"zoom":0.5},"1698":{"position":{"x":0,"y":100},"zoom":0.6160000000000001}},"linkIndex":1}},"split_mode":"horizontal"},"currentNodes":["/","/","/","/","/","/","/","/"],"navigationHistory":{"nodePaths":{"1":["/","/plane_lines","/","/perspectiveCamera1","/perspectiveCamera1/renderersNetwork1","/perspectiveCamera1","/","/plane_lines","/","/sphere_lines","/","/sphere_mesh_and_lines","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_with_custom_shader","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_with_custom_shader","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader","/","/plane_lines","/plane_lines/MAT","/plane_lines","/plane_lines/MAT","/plane_lines","/","/sphere_lines","/","/sphere_mesh_and_lines","/sphere_mesh_and_lines","/sphere_mesh_and_lines/MAT","/sphere_mesh_and_lines","/","/sphere_mesh_with_custom_shader","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1","/sphere_mesh_with_custom_shader/MAT","/sphere_mesh_with_custom_shader","/"],"2":["/"],"3":["/"],"4":["/"],"5":["/"],"6":["/"],"7":["/"],"8":["/"]},"index":{"1":53,"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;mat/lineBasic;mat/meshBasic;mat/meshBasicBuilder;obj/copNetwork;obj/geo;obj/hemisphereLight;obj/perspectiveCamera;rop/WebGLRenderer;sop/eventsNetwork;sop/material;sop/materialsNetwork;sop/merge;sop/noise;sop/plane;sop/renderersNetwork;sop/sphere
Used operations
Used modules
Used assemblers
GL_MESH_BASIC
Used integrations
[]
Used assets
Nodes map
{"/hemisphereLight1":"obj/hemisphereLight","/perspectiveCamera1":"obj/perspectiveCamera","/perspectiveCamera1/events1":"sop/eventsNetwork","/perspectiveCamera1/events1/cameraOrbitControls1":"event/cameraOrbitControls","/perspectiveCamera1/renderersNetwork1":"sop/renderersNetwork","/perspectiveCamera1/renderersNetwork1/WebGLRenderer1":"rop/WebGLRenderer","/COP":"obj/copNetwork","/COP/imageEnv":"cop/imageEXR","/COP/imageUv":"cop/image","/COP/envMap":"cop/envMap","/plane_lines":"obj/geo","/plane_lines/plane1":"sop/plane","/plane_lines/noise1":"sop/noise","/plane_lines/material1":"sop/material","/plane_lines/MAT":"sop/materialsNetwork","/plane_lines/MAT/lineBasic1":"mat/lineBasic","/sphere_lines":"obj/geo","/sphere_lines/sphere1":"sop/sphere","/sphere_lines/noise1":"sop/noise","/sphere_lines/material1":"sop/material","/sphere_lines/MAT":"sop/materialsNetwork","/sphere_lines/MAT/lineBasic1":"mat/lineBasic","/sphere_mesh_and_lines":"obj/geo","/sphere_mesh_and_lines/noise1":"sop/noise","/sphere_mesh_and_lines/sphere1":"sop/sphere","/sphere_mesh_and_lines/sphere2":"sop/sphere","/sphere_mesh_and_lines/merge1":"sop/merge","/sphere_mesh_and_lines/material1":"sop/material","/sphere_mesh_and_lines/MAT":"sop/materialsNetwork","/sphere_mesh_and_lines/MAT/meshBasic1":"mat/meshBasic","/sphere_mesh_and_lines/MAT/lineBasic1":"mat/lineBasic","/sphere_mesh_and_lines/material2":"sop/material","/sphere_mesh_with_custom_shader":"obj/geo","/sphere_mesh_with_custom_shader/noise1":"sop/noise","/sphere_mesh_with_custom_shader/sphere1":"sop/sphere","/sphere_mesh_with_custom_shader/material1":"sop/material","/sphere_mesh_with_custom_shader/MAT":"sop/materialsNetwork","/sphere_mesh_with_custom_shader/MAT/meshBasicBuilder1":"mat/meshBasicBuilder"}
Js version
Editor version
Engine version
Logout
0%
There was a problem displaying your scene:
view scene source