add docs to view uniform frustum field (#16369)

just some docs to save future me some clicking around
This commit is contained in:
atlv 2024-11-17 19:33:24 -05:00 committed by GitHub
parent 1cb5604a17
commit c6fe275b21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -429,6 +429,9 @@ pub struct ViewUniform {
pub exposure: f32, pub exposure: f32,
// viewport(x_origin, y_origin, width, height) // viewport(x_origin, y_origin, width, height)
pub viewport: Vec4, pub viewport: Vec4,
/// 6 world-space half spaces (normal: vec3, distance: f32) ordered left, right, top, bottom, near, far.
/// The normal vectors point towards the interior of the frustum.
/// A half space contains `p` if `normal.dot(p) + distance > 0.`
pub frustum: [Vec4; 6], pub frustum: [Vec4; 6],
pub color_grading: ColorGradingUniform, pub color_grading: ColorGradingUniform,
pub mip_bias: f32, pub mip_bias: f32,

View file

@ -25,6 +25,9 @@ struct View {
exposure: f32, exposure: f32,
// viewport(x_origin, y_origin, width, height) // viewport(x_origin, y_origin, width, height)
viewport: vec4<f32>, viewport: vec4<f32>,
// 6 world-space half spaces (normal: vec3, distance: f32) ordered left, right, top, bottom, near, far.
// The normal vectors point towards the interior of the frustum.
// A half space contains `p` if `normal.dot(p) + distance > 0.`
frustum: array<vec4<f32>, 6>, frustum: array<vec4<f32>, 6>,
color_grading: ColorGrading, color_grading: ColorGrading,
mip_bias: f32, mip_bias: f32,