1#define_import_path bevy_render::view3struct ColorGrading {4 balance: mat3x3<f32>,5 saturation: vec3<f32>,6 contrast: vec3<f32>,7 gamma: vec3<f32>,8 gain: vec3<f32>,9 lift: vec3<f32>,10 midtone_range: vec2<f32>,11 exposure: f32,12 hue: f32,13 post_saturation: f32,14}16struct View {17 clip_from_world: mat4x4<f32>,18 unjittered_clip_from_world: mat4x4<f32>,19 world_from_clip: mat4x4<f32>,20 world_from_view: mat4x4<f32>,21 view_from_world: mat4x4<f32>,22 // Typically a right-handed projection matrix, one of either:23 //24 // Perspective (infinite reverse z)25 // ```26 // f = 1 / tan(fov_y_radians / 2)27 //28 // ⎡ f / aspect 0 0 0 ⎤29 // ⎢ 0 f 0 0 ⎥30 // ⎢ 0 0 0 -1 ⎥31 // ⎣ 0 0 near 0 ⎦32 // ```33 //34 // Orthographic35 // ```36 // w = right - left37 // h = top - bottom38 // d = near - far39 // cw = -right - left40 // ch = -top - bottom41 //42 // ⎡ 2 / w 0 0 0 ⎤43 // ⎢ 0 2 / h 0 0 ⎥44 // ⎢ 0 0 1 / d 0 ⎥45 // ⎣ cw / w ch / h near / d 1 ⎦46 // ```47 //48 // `clip_from_view[3][3] == 1.0` is the standard way to check if a projection is orthographic49 // 50 // Custom projections are also possible however.51 clip_from_view: mat4x4<f32>,52 view_from_clip: mat4x4<f32>,53 world_position: vec3<f32>,54 exposure: f32,55 // viewport(x_origin, y_origin, width, height)56 viewport: vec4<f32>,57 // 6 world-space half spaces (normal: vec3, distance: f32) ordered left, right, top, bottom, near, far.58 // The normal vectors point towards the interior of the frustum.59 // A half space contains `p` if `normal.dot(p) + distance > 0.`60 frustum: array<vec4<f32>, 6>,61 color_grading: ColorGrading,62 mip_bias: f32,63 frame_count: u32,64};