Back home 🏡 WGSL Spec Bevy WGSL Functions

pbr_fragment.wgsl

Import path

Functions

pbr_input_from_vertex_output

#
prepare a basic PbrInput from the vertex stage output, mesh binding and view binding
fn pbr_input_from_vertex_output(in: VertexOutput, is_front: bool, double_sided: bool) -> pbr_types::PbrInput
Parameter Type
in VertexOutput
is_front bool
double_sided bool
Returns: pbr_types::PbrInput

pbr_input_from_standard_material

#
Prepare a full PbrInput by sampling all textures to resolve the material members
fn pbr_input_from_standard_material(in: VertexOutput, is_front: bool) -> pbr_types::PbrInput
Parameter Type
in VertexOutput
is_front bool
Returns: pbr_types::PbrInput