pub trait GaussianShConfig {
type Field: Pod + Zeroable;
const FEATURE: &'static str;
// Required methods
fn from_sh(sh: &[Vec3; 15]) -> Self::Field;
fn to_sh(field: &Self::Field) -> [Vec3; 15];
}Expand description
The spherical harmonics configuration of Gaussian.
Currently, there are four configurations:
- Single precision
GaussianShSingleConfig- Format: 15 *
Vec3
- Format: 15 *
- Half precision
GaussianShHalfConfig- Format: (15 * 3 + 1) *
f16
- Format: (15 * 3 + 1) *
- 8 bit normalized
GaussianShNorm8Config- Format: (15 * 3 + 3) *
i8
- Format: (15 * 3 + 3) *
- None
GaussianShNoneConfig- Cannot be converted back to SH
Required Associated Constants§
Sourceconst FEATURE: &'static str
const FEATURE: &'static str
The feature name of the configuration.
Must match the wesl::Feature name in the shader.
Required Associated Types§
Sourcetype Field: Pod + Zeroable
type Field: Pod + Zeroable
The GaussianPod field type.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.