const ShaderLitMaterial: LC<ShaderLitMaterialProps>
ShaderModule
Flat shader, for unlit passes (e.g. shadow map)
fn getFragment(color: vec4, uv: vec4, st: vec4) -> vec4
ShaderModule
Depth-only shader, for optimized shadow passes (optional) fn getDepth( alpha: f32, uv: vec4, st: vec4, position: vec4, ) -> DepthFragment;
ShaderModule
Surface shader, for material properties
fn getSurface( color: vec4, uv: vec4, st: vec4, normal: vec4, tangent: vec4, position: vec4, ) -> SurfaceFragment
ShaderModule
Environment shader, for reflections
fn getEnvironment( N: vec3, V: vec3, surface: SurfaceFragment, ) -> vec3
ShaderModule
Material lighting shader, for lighting model. e.g. applyPBRMaterial
.
fn getLight(surface: SurfaceFragment) -> vec4 render?
(
material: Record<string,
Record<string, | undefined | StorageSource | ParsedBundle<any> | ParsedModule<any> | LambdaSource<ShaderModule<any>> | TextureSource | null | undefined>>,
) => LiveElement
children?
| LiveElement
| (material: Record<string, Record<string, | undefined | StorageSource | ParsedBundle<any> | ParsedModule<any> | LambdaSource<ShaderModule<any>> | TextureSource | null | undefined>>) => LiveElement
packages / workbench / src / material / shader-lit-material.ts