pbr_functions.wgsl
Name | Type | Shader Def |
---|---|---|
ddx_uv |
vec2<f32>
![]() |
🟢 MESHLET_MESH_MATERIAL_PASS |
ddy_uv |
vec2<f32>
![]() |
🟢 MESHLET_MESH_MATERIAL_PASS |
mip_bias |
f32
![]() |
🔴 MESHLET_MESH_MATERIAL_PASS |
🟢 VISIBILITY_RANGE_DITHER
Parameter | Type |
---|---|
frag_coord |
vec4<f32>
![]() |
dither |
i32
![]() |
Parameter | Type |
---|---|
material | StandardMaterial |
output_color |
vec4<f32>
![]() |
Parameter | Type |
---|---|
texture | texture_2d<f32> |
samp |
sampler
![]() |
uv |
vec2<f32>
![]() |
bias | SampleBias |
Parameter | Type |
---|---|
world_normal |
vec3<f32>
![]() |
double_sided |
bool
![]() |
is_front |
bool
![]() |
Parameter | Type |
---|---|
world_normal |
vec3<f32>
![]() |
world_tangent |
vec4<f32>
![]() |
Parameter | Type |
---|---|
standard_material_flags |
u32
![]() |
TBN |
mat3x3<f32>
![]() |
double_sided |
bool
![]() |
is_front |
bool
![]() |
in_Nt |
vec3<f32>
![]() |
🟢 STANDARD_MATERIAL_ANISOTROPY
KHR_materials_anisotropy
specification:
https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_materials_anisotropy/README.md#image-based-lightingParameter | Type |
---|---|
lighting_input | LightingInput> |
Parameter | Type |
---|---|
world_position |
vec4<f32>
![]() |
is_orthographic |
bool
![]() |
Parameter | Type |
---|---|
base_color |
vec3<f32>
![]() |
metallic |
f32
![]() |
specular_transmission |
f32
![]() |
diffuse_transmission |
f32
![]() |
Parameter | Type |
---|---|
base_color |
vec3<f32>
![]() |
metallic |
f32
![]() |
reflectance |
f32
![]() |
Parameter | Type |
---|---|
fog_params | Fog |
input_color |
vec4<f32>
![]() |
fragment_world_position |
vec3<f32>
![]() |
view_world_position |
vec3<f32>
![]() |
sample_texture
. How this is done depends on whether we're rendering meshlets or regular meshes.