basicMat
Material with a basic lighting model.
The material combines several elements to determine the color of a given surface point.
First, the base color uses the Basecolor
parameter and optionally the Base Color Field
input. Next, the specular color uses the color and relative position of the light. Third, the “Sky” color acts as a simple pseudo light, that uses the surface normal but doesn’t support shadows.
Parameters
Name | Description | Regular Handling | Read-Only Handling |
---|---|---|---|
Enable | |||
Base Color | Runtime | Baked | |
Sky Color | Color of the “sky” pseudo-light. | Runtime | Baked |
Sky Amount | Amount of “sky” light to apply. | ||
Sky Direction | Vector of the direction where the “sky” light comes from. | Runtime | Baked |
Specular Amount | Amount of specular light color to apply. | Runtime | Baked |
Specular Exponent | Controls the sharpness of the specular color rolloff. | Runtime | Baked |
Enable Shadow | Whether to use shadows. If this is enabled, and the | Baked | Baked |
Use Local Position | Whether to use the “local” position relative to the input shape when looking up colors using the | Baked | Baked |
Use Surface Color | Baked | Baked | |
Apply When | Runtime | Baked | |
|
Inputs
-
SDF Shape
: (required)- Coordinate Types:
vec3
- Context Types:
Context
- Return Types:
Sdf
- Coordinate Types:
-
Base Color Field
: (optional)- Coordinate Types:
vec3
- Context Types:
MaterialContext
- Return Types:
float
vec4
- Supports Variables:
lightcolor
lightpos
surfacecolor
surfaceuv
normal
- Coordinate Types:
Variables
-
Light Color
: -
Light Position
: -
Surface Color (r, g, b, is set)
: -
Surface UV (u, v, w, is set)
: -
Surface Normal
: