renderling/pbr/debug.rs
1//! Debugging helpers.
2use crabslab::SlabItem;
3
4/// Used to debug shaders by early exiting the shader and attempting to display
5/// the value as shaded colors.
6#[repr(u32)]
7#[derive(Clone, Copy, Default, PartialEq, PartialOrd, SlabItem, core::fmt::Debug)]
8pub enum DebugChannel {
9 #[default]
10 None,
11
12 /// Displays the first set of UV coordinates as a color.
13 UvCoords0,
14
15 /// Displays the second set of UV coordinates as a color.
16 UvCoords1,
17
18 /// Displays normals after normal mapping, in world space
19 Normals,
20
21 /// Displays only the vertex color for the fragment.
22 VertexColor,
23
24 /// Displays vertex normals.
25 VertexNormals,
26
27 /// Displays uv normals. These are normals coming from a normal map texture.
28 /// These are the normals in tangent space.
29 UvNormals,
30
31 /// Displays vertex normals.
32 Tangents,
33
34 /// Displays bitangents as calculated from normals and tangents.
35 Bitangents,
36
37 /// Displays only the diffuse irradiance value.
38 DiffuseIrradiance,
39
40 /// Displays only the specular reflection value.
41 SpecularReflection,
42
43 /// Displays only the BRDF value for the fragment.
44 Brdf,
45
46 /// Displays only the albedo color for the fragment.
47 Albedo,
48
49 /// Displays only the roughness value for the fragment.
50 Roughness,
51
52 /// Displays only the metallic value for the fragment.
53 Metallic,
54
55 /// Displays only the occlusion color for the fragment.
56 Occlusion,
57
58 /// Displays only the calculated emissive effect (emissive_tex_color *
59 /// emissive_factor * emissive_strength) of the fragment.
60 Emissive,
61
62 /// Displays only the emissive color (from the emissive map texture) of the
63 /// fragment.
64 UvEmissive,
65
66 /// Displays only teh emissive factor of the fragment.
67 EmissiveFactor,
68
69 /// Displays only the emissive strength of the fragment
70 /// (KHR_materials_emissive_strength).
71 EmissiveStrength,
72}