MatrixTransform : X3DGroupingNode {
  SFMatrix4f [in,out] matrix identity
}

CommonSurfaceShader :  X3DShaderNode {
  default-container-field: shaders

  SFFloat         [in,out]     alphaFactor                      1
  SFInt32         [in,out]     alphaTextureId                   -1
  SFInt32         [in,out]     alphaTextureCoordinatesId        0
  SFString        [in,out]     alphaTextureChannelMask          "a"
  SFNode          [in,out]     alphaTexture                     NULL
    range: X3DTextureNode

  SFVec3f         [in,out]     ambientFactor                    0.2 0.2 0.2
  SFInt32         [in,out]     ambientTextureId                 -1
  SFInt32         [in,out]     ambientTextureCoordinatesId      0
  SFString        [in,out]     ambientTextureChannelMask        "rgb"
  SFNode          [in,out]     ambientTexture                   NULL
    range: X3DTextureNode

  SFVec3f         [in,out]     diffuseFactor                    0.8 0.8 0.8
  SFInt32         [in,out]     diffuseTextureId                 -1
  SFInt32         [in,out]     diffuseTextureCoordinatesId      0
  SFString        [in,out]     diffuseTextureChannelMask        "rgb"
  SFNode          [in,out]     diffuseTexture                   NULL
    range: X3DTextureNode
    doc: The texture controlling the diffuse color, multiplied by @link(DiffuseFactor).

  # Added in X3DOM
  SFNode          [in,out]     diffuseDisplacementTexture       NULL
    range: X3DTextureNode

  # Added in X3DOM
  SFString        [in,out]     displacementAxis                 "y"
  SFFloat         [in,out]     displacementFactor               255.0
  SFInt32         [in,out]     displacementTextureId            -1
  SFInt32         [in,out]     displacementTextureCoordinatesId 0
  SFNode          [in,out]     displacementTexture              NULL
    range: X3DTextureNode

  SFVec3f         [in,out]     emissiveFactor                   0 0 0
  SFInt32         [in,out]     emissiveTextureId                -1
  SFInt32         [in,out]     emissiveTextureCoordinatesId     0
  SFString        [in,out]     emissiveTextureChannelMask       "rgb"
  SFNode          [in,out]     emissiveTexture                  NULL
    range: X3DTextureNode

  SFVec3f         [in,out]     environmentFactor                1 1 1
  SFInt32         [in,out]     environmentTextureId             -1
  SFInt32         [in,out]     environmentTextureCoordinatesId  0
  SFString        [in,out]     environmentTextureChannelMask    "rgb"
  SFNode          [in,out]     environmentTexture               NULL
    range: X3DEnvironmentTextureNode

  # Added in X3DOM
  SFNode          [in,out]     multiDiffuseAlphaTexture             NULL
    range: X3DTextureNode
    doc: The texture controlling the diffuse (rgb) and alpha (alpha channel). Diffuse color is multiplied by @link(DiffuseFactor), alpha is (or rather: should be) multiplied by @link(AlphaFactor).
  SFNode          [in,out]     multiEmmisiveAmbientIntensityTexture NULL
    range: X3DTextureNode
  SFNode          [in,out]     multiSpecularShininessTexture        NULL
    range: X3DTextureNode
  SFNode          [in,out]     multiVisibilityTexture               NULL
    range: X3DTextureNode

  # Note that we don't expose normalFormat, normalSpace as enumerated type.
  # That's because
  # - these fields are ignored
  # - I don't want CGE devs
  #   to think that we support (or plan to support)
  #   other normalmap formats / space, when we don't (because tangent space
  #   is so standard).
  # - CommonSurfaceShader is deprecated now, so I don't want to add extra enum
  #   types to support it.

  SFString        [in,out]     normalFormat                     "UNORM"
    #range: ["UNORM"]
  SFString        [in,out]     normalSpace                      "TANGENT"
    #range: ["TANGENT"]

  SFInt32         [in,out]     normalTextureId                  -1
  SFInt32         [in,out]     normalTextureCoordinatesId       0
  SFString        [in,out]     normalTextureChannelMask         "rgb"
  SFVec3f         []           normalScale                      2 2 2
  SFVec3f         []           normalBias                       -1 -1 -1
  SFNode          [in,out]     normalTexture                    NULL
    range: X3DTextureNode
    doc: Normalmap for bump mapping (the texture controlling the normals).

  # Added in Castle Game Engine
  SFFloat         [in,out]     normalTextureParallaxHeight      0

  SFVec3f         [in,out]     reflectionFactor                 0 0 0
  SFInt32         [in,out]     reflectionTextureId              -1
  SFInt32         [in,out]     reflectionTextureCoordinatesId   0
  SFString        [in,out]     reflectionTextureChannelMask     "rgb"
  SFNode          [in,out]     reflectionTexture                NULL
    range: X3DTextureNode

  SFFloat         [in,out]     shininessFactor                  0.2
  SFInt32         [in,out]     shininessTextureId               -1
  SFInt32         [in,out]     shininessTextureCoordinatesId    0
  SFString        [in,out]     shininessTextureChannelMask      "a"
  SFNode          [in,out]     shininessTexture                 NULL
    range: X3DTextureNode

  SFVec3f         [in,out]     specularFactor                   0 0 0
  SFInt32         [in,out]     specularTextureId                -1
  SFInt32         [in,out]     specularTextureCoordinatesId     0
  SFString        [in,out]     specularTextureChannelMask       "rgb"
  SFNode          [in,out]     specularTexture                  NULL
    range: X3DTextureNode

  SFVec3f         [in,out]     transmissionFactor               0 0 0
  SFInt32         [in,out]     transmissionTextureId            -1
  SFInt32         [in,out]     transmissionTextureCoordinatesId 0
  SFString        [in,out]     transmissionTextureChannelMask   "rgb"
  SFNode          [in,out]     transmissionTexture              NULL
    range: X3DTextureNode

  # Additional fields (not in alphabetical order)

  # Affects how normal maps work
  SFInt32         [in,out]     tangentTextureCoordinatesId      -1
  SFInt32         [in,out]     binormalTextureCoordinatesId     -1

  # Affects how alphaTexture contents are treated
  SFBool          [in,out]     invertAlphaTexture               FALSE

  SFFloat         [in,out]     relativeIndexOfRefraction        1

  SFFloat         [in,out]     fresnelBlend                     0

  MFBool          []           textureTransformEnabled          [false, false, false, false, false, false, false, false]
}

ImageBackground : X3DBackgroundNode {
  SFColorRGBA [in,out] color     1 1 1 1
    doc: Color that is multiplied by the texture color. Opaque white by default. Note that the alpha component of this color matters (just like the alpha channel of the texture in @link(Texture)). If the resulting image is partially-transparent, it will be mixed with black underneath.
  SFNode      [in,out] texture   NULL
    range: X3DTextureNode
    doc: Texture displayed in a full-screen quad. Only 2D single-texture nodes are supported now. If you leave this as @nil, the TImageBackgroundNode has no visible effect.
  MFVec2f     [in,out] texCoords [ Vector2(0, 0), Vector2(1, 0), Vector2(1, 1), Vector2(0, 1) ]
    doc: Texture coordinates of the full-screen quad. By default they use the whole texture area: @orderedList( @item(Vector2(0, 0),) @item(Vector2(1, 0),) @item(Vector2(1, 1),) @item(Vector2(0, 1)) ) It is undefined what happens if there are not exactly 4 items.
}

Plane : X3DGeometryNode {
  SFVec2f []       size     2 2
    range: (0,Inf)
    change: chGeometry
  SFBool  []       solid    TRUE
    change: chGeometry
}

Toggler : X3DChildNode {
  SFBool     [in,out]      status      FALSE
    change: chNone
    doc: Stored Boolean value.
  SFBool     [in,out]      notStatus   TRUE
    change: chNone
    doc: Always the negated value of @link(Status). You can set either @link(Status) or @link(NotStatus), changing one changes also the other to keep them being negated values of each other. Also events (like @link(EventToggle)) change both properties.
  XFAny      [in]          toggle
    doc: Send any value to this event (the value is ignored) to toggle @link(Status) between @true and @false.
  XFAny      [in]          set
    doc: Send any value to this event (the value is ignored) to set @link(Status) to @true.
  XFAny      [in]          reset
    doc: Send any value to this event (the value is ignored) to set @link(Status) to @false.
  SFBool     [out]         changed
    doc: Outputs a @true value whenever the @link(Status) changed.
  SFBool     [out]         on
    doc: Outputs a @true value whenever the @link(Status) changed to @true.
  SFBool     [out]         off
    doc: Outputs a @true value whenever the @link(Status) changed to @false.
  SFBool     [in,out]      enabled     TRUE
    change: chNone
    doc: When the node is disabled, input events are ignored (this includes @link(EventToggle), @link(EventSet), @link(EventReset) but also sending new values to @link(Status) and @link(NotStatus)) and output events (@link(EventOn), @link(EventOff), @link(EventChanged)) are never generated.
}

Converter : X3DChildNode {
  SFBool [in,out] enabled TRUE
  XFAny [in] in
  XFAny [out] out
}
