Skip to main content Link Menu Expand (external link) Document Search Copy Copied

modularMat

Shortcuts:

A material that is composed of one or more shading elements.

The shading contribution operators are intended to be used with this material, including diffuseContrib, specularContrib, and skyLightContrib. However any float or vector field operator can be used as a lighting element as long as it’s set up to use MaterialContext.

Parameters

  • Enable:
  • Base Color:
  • Use Light Color: Whether to apply the light color to the base color. This does not affect whether the shading elements use the light color.
  • Use Local Position:
  • Enable Ambient Occlusion:
  • Enable Reflection:

Inputs

  • definition_in: (required)
    • Coordinate Types: vec3
    • Context Types: Context
    • Return Types: Sdf
  • Color Contribution 1: (optional) First shading element.
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
  • Color Contribution 2: (optional) Second shading element.
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
  • Color Contribution 3: (optional) Third shading element.
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
  • Color Contribution 3: (optional)
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
  • Color Contribution 3: (optional)
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
  • Color Contribution 3: (optional)
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
  • Color Contribution 3: (optional)
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4

Variables

  • lightcolor:
  • lightpos:
  • surfacecolor:
  • surfaceuv:
  • ao:
  • shadedlevel:
  • normal:
  • reflectcolor: