modularMat
Shortcuts:
- mm
material
modularMat
RayTK
v0.36
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
: -
Apply When
:-
Always
: -
Only If Unassigned
:
-
Inputs
-
SDF
: (required)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
Context
- Return Types:
Sdf
- Coordinate Types:
-
Color Contribution 1
: (optional) First shading element.- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
-
Color Contribution 2
: (optional) Second shading element.- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
-
Color Contribution 3
: (optional) Third shading element.- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
-
Color Contribution 4
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
-
Color Contribution 5
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
-
Color Contribution 6
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
-
Color Contribution 7
: (optional)- Coordinate Types:
float
vec2
vec3
vec4
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Coordinate Types:
Variables
-
lightcolor
: -
lightpos
: -
surfacecolor
: -
surfaceuv
: -
ao
: -
shadedlevel
: -
normal
: -
reflectcolor
: -
sdf
: