Add missing documentation
CI / cargo fmt (push) Failing after 25s
CI / cargo test (GPU) (push) Has been cancelled
CI / cargo test (push) Has been cancelled

This commit is contained in:
2026-06-27 11:02:19 -04:00
parent a9da463041
commit 344ecc3450
4 changed files with 46 additions and 8 deletions
+6 -2
View File
@@ -13,9 +13,10 @@ use glam::{Affine2, Vec3, Vec4, vec2, vec3};
use spirv_std::num_traits::Float;
use spirv_std::spirv;
/// Utility trait for [`Affine2`] to convert between `flam3` notation and [`glam`].
/// Utility trait to convert between `flam3` notation and [`glam`].
#[allow(missing_docs)]
pub trait Coefficients2 {
/// Convert affine transformation coefficients to the [`Affine2`] representation.
/// Convert affine transformation coefficients to the [`glam`] representation.
/// Parameters use the following form:
///
/// ```text
@@ -77,6 +78,7 @@ impl Coefficients2 for Affine2 {
#[derive(Copy, Clone, Pod, Zeroable)]
#[repr(C)]
#[allow(missing_docs)]
pub struct ShaderConstants {
pub width: u32,
pub height: u32,
@@ -84,11 +86,13 @@ pub struct ShaderConstants {
}
#[spirv(fragment)]
#[allow(missing_docs)]
pub fn main_fs(vtx_color: Vec3, output: &mut Vec4) {
*output = Vec4::from((vtx_color, 1.));
}
#[spirv(vertex)]
#[allow(missing_docs)]
pub fn main_vs(
#[spirv(vertex_index)] vert_id: i32,
#[spirv(descriptor_set = 0, binding = 0, storage_buffer)] constants: &ShaderConstants,