Skip to main content

cube_with_normals

Function cube_with_normals 

Source
pub fn cube_with_normals() -> (RawMesh, Vec<[f32; 3]>)
Expand description

The same cube, beside one outward normal per vertex.

A lit pipeline shades with the normal, and the unlit one derives the normal it draws with from the fragment’s derivatives, so only the scenes that shade need to carry one.