Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1struct pbr_types__StandardMaterial {
2 base_color: vec4<f32>,
3 emissive: vec4<f32>,
4 perceptual_roughness: f32,
5 metallic: f32,
6 reflectance: f32,
7 flags: u32,
8 alpha_cutoff: f32,
9}
11struct pbr_functions__PbrInput {
12 material: pbr_types__StandardMaterial,
13 occlusion: f32,
14 frag_coord: vec4<f32>,
15 world_position: vec4<f32>,
16 world_normal: vec3<f32>,
17 N: vec3<f32>,
18 V: vec3<f32>,
19 is_orthographic: bool,
22fn pbr_functions__pbr(in: pbr_functions__PbrInput) -> vec4<f32> {
23 var output_color_2: vec4<f32> = in.material.base_color;
25 if ((in.material.flags & 64u) != 0u) {
26 output_color_2.w = 1.0;
27 } else {
28 if ((in.material.flags & 128u) != 0u) {
29 let _e52: f32 = output_color_2.w;
30 if (_e52 >= in.material.alpha_cutoff) {
31 output_color_2.w = 1.0;
32 } else {
33 discard;
34 }
35 }
36 }
38 return output_color_2;
Contents