{ "X3D": {
    "encoding":"UTF-8",
    "@profile":"Immersive",
    "@version":"3.2",
    "@xsd:noNamespaceSchemaLocation":"https://www.web3d.org/specifications/x3d-3.2.xsd",
    "JSON schema":"https://www.web3d.org/specifications/x3d-4.0-JSONSchema.autogenerated.json",
    "head": {
        "component": [
          {
            "@name":"Shaders",
            "@level":1
          }
        ],
        "meta": [
          {
            "@name":"title",
            "@content":"SimpleShader.x3d"
          },
          {
            "@name":"description",
            "@content":"Simple shader example"
          },
          {
            "@name":"creator",
            "@content":"John Stewart"
          },
          {
            "@name":"translator",
            "@content":"Holger Seelig, John Carlson, Don Brutzman and Jeff Malnick"
          },
          {
            "@name":"created",
            "@content":"26 May 2009"
          },
          {
            "@name":"translated",
            "@content":"15 October 2009"
          },
          {
            "@name":"modified",
            "@content":"20 October 2019"
          },
          {
            "@name":"reference",
            "@content":"http://www.opengl.org/wiki/Fragment_Shader"
          },
          {
            "@name":"reference",
            "@content":"http://www.opengl.org/wiki/http://www.opengl.org/wiki/Vertex_Shader"
          },
          {
            "@name":"reference",
            "@content":"https://www.web3d.org/x3d/wiki/index.php/X3D_Plugfest"
          },
          {
            "@name":"subject",
            "@content":"X3D shader example"
          },
          {
            "@name":"reference",
            "@content":"originals/simpleShader.x3dv"
          },
          {
            "@name":"reference",
            "@content":"ShaderTutorialInstantReality.pdf"
          },
          {
            "@name":"generator",
            "@content":"Titania V3.0.3, http://titania.create3000.de"
          },
          {
            "@name":"comment",
            "@content":"World of Titania"
          },
          {
            "@name":"outputStyle",
            "@content":"nicest"
          },
          {
            "@name":"warning",
            "@content":"under development"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit"
          },
          {
            "@name":"identifier",
            "@content":"https://www.web3d.org/x3d/content/examples/Basic/Shaders/SimpleShader.x3d"
          },
          {
            "@name":"license",
            "@content":"../../license.html"
          },
          {
            "@name":"translated",
            "@content":"20 April 2026"
          },
          {
            "@name":"generator",
            "@content":"X3dToJson.xslt, https://www.web3d.org/x3d/stylesheets/X3dToJson.html"
          },
          {
            "@name":"reference",
            "@content":"X3D JSON encoding: https://www.web3d.org/wiki/index.php/X3D_JSON_Encoding"
          }
        ]
    },
    "Scene": {
        "-children":[
          { "ProtoDeclare":
            {
              "@name":"myPrototype",
              "ProtoInterface": {
                  "field": [
                    {
                      "@name":"myInputRange",
                      "@accessType":"initializeOnly",
                      "@type":"SFVec3f",
                      "@value":[0.95,0.44,0.22]
                    }
                  ]
              },
              "ProtoBody": {
                  "-children":[
                    { "Transform":
                      {
                        "@DEF":"TR",
                        "-children":[
                          { "Shape":
                            {
                              "-appearance":
                                { "Appearance":
                                  {
                                    "-material":
                                      { "Material":
                                        {
                                          "@diffuseColor":[0.5,0.5,0.9]
                                        }
                                      },
                                    "-shaders":[
                                      { "ComposedShader":
                                        {
                                          "@language":"GLSL",
                                          "field": [
                                            {
                                              "@name":"decis",
                                              "@accessType":"initializeOnly",
                                              "@type":"SFVec3f"
                                            }
                                          ],
                                          "IS": {
                                              "connect": [
                                                {
                                                  "@nodeField":"decis",
                                                  "@protoField":"myInputRange"
                                                }
                                              ]
                                          },
                                          "-parts":[
                                            { "ShaderPart":
                                              {
                                                "@type":"VERTEX"
                                              }
                                            },
                                            { "ShaderPart":
                                              {
                                                "@type":"FRAGMENT"
                                              }
                                            }
                                          ]
                                        }
                                      },
                                      { "ComposedShader":
                                        {
                                          "@DEF":"Cobweb",
                                          "@language":"GLSL",
                                          "field": [
                                            {
                                              "@name":"decis",
                                              "@accessType":"initializeOnly",
                                              "@type":"SFVec3f",
                                              "@value":[0.95,0.77,0.44]
                                            }
                                          ],
                                          "-parts":[
                                            { "ShaderPart":
                                              {
                                                "@type":"VERTEX"
                                              }
                                            },
                                            { "ShaderPart":
                                              {
                                                "@DEF":"_1",
                                                "@type":"FRAGMENT"
                                              }
                                            }
                                          ]
                                        }
                                      }
                                    ]
                                  }
                                },
                              "-geometry":
                                { "Sphere":
                                  {
                                    "@radius":1.75
                                  }
                                }
                            }
                          }
                        ]
                      }
                    }
                  ]
              }
            }
          },
          { "WorldInfo":
            {
              "@title":"SimpleShader",
              "-metadata":
                { "MetadataSet":
                  {
                    "@name":"Titania",
                    "@DEF":"Titania",
                    "@reference":"http://titania.create3000.de",
                    "-value":[
                      { "MetadataSet":
                        {
                          "@name":"Selection",
                          "@DEF":"Selection",
                          "@reference":"http://titania.create3000.de",
                          "-value":[
                            { "MetadataSet":
                              {
                                "@name":"nodes",
                                "@DEF":"nodes",
                                "@reference":"http://titania.create3000.de",
                                "-children":[
                                  {
                                    "#comment":"NULL"
                                  }
                                ]
                              }
                            }
                          ]
                        }
                      },
                      { "MetadataSet":
                        {
                          "@name":"NavigationInfo",
                          "@DEF":"NavigationInfo",
                          "@reference":"http://titania.create3000.de",
                          "-value":[
                            { "MetadataString":
                              {
                                "@name":"type",
                                "@DEF":"type",
                                "@reference":"http://titania.create3000.de",
                                "@value":["EXAMINE"]
                              }
                            }
                          ]
                        }
                      },
                      { "MetadataSet":
                        {
                          "@name":"Viewpoint",
                          "@DEF":"Viewpoint",
                          "@reference":"http://titania.create3000.de",
                          "-value":[
                            { "MetadataDouble":
                              {
                                "@name":"position",
                                "@DEF":"position",
                                "@reference":"http://titania.create3000.de",
                                "@value":[6.24067728185014,0.00250837343276661,2.92117542307615]
                              }
                            },
                            { "MetadataDouble":
                              {
                                "@name":"orientation",
                                "@DEF":"orientation",
                                "@reference":"http://titania.create3000.de",
                                "@value":[-0.110173424710488,0.990158061907379,-0.0863065984000336,1.21146676119191]
                              }
                            },
                            { "MetadataDouble":
                              {
                                "@name":"centerOfRotation",
                                "@DEF":"centerOfRotation",
                                "@reference":"http://titania.create3000.de",
                                "@value":[-0.808320198626341,-0.358072370409949,0.22817191560906]
                              }
                            }
                          ]
                        }
                      }
                    ]
                  }
                }
            }
          },
          { "ProtoInstance":
            {
              "@name":"myPrototype"
            }
          }
        ]
    }
  }
}