pub struct CompiledShader {
pub wgsl: String,
pub interface: ShaderInterface,
pub folds: Vec<String>,
}Expand description
A warp or composite shader: WGSL module source (starting with lactea_abi::WGSL_COMMON,
entry fs_main) plus the resource interface the renderer binds in group 1.
Fields§
§wgsl: StringWGSL module source.
interface: ShaderInterfaceResource interface bound in group 1.
folds: Vec<String>Per-vertex values interpolated as extra varyings (lactea_hlsl::Translated::folds). Entry k is a complete
WGSL function fn fold_k(vs_uv: vec4<f32>, vs_rad_ang: vec2<f32>, vs_diffuse: vec4<f32>) -> f32 that may read
the WGSL_COMMON uniforms and call earlier fold_j. The fragment shader’s VsOut carries them as
@location(3 + k / 4) fold{k / 4}: vec4<f32>, component k % 4. Empty: no extra varyings.
Trait Implementations§
Source§impl Clone for CompiledShader
impl Clone for CompiledShader
Auto Trait Implementations§
impl Forget for CompiledShader
impl Freeze for CompiledShaderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<TextureBinding>: Freeze,
PhantomData<TexSource>: Freeze,
PhantomData<String>: Freeze,
impl Move for CompiledShader
impl RefUnwindSafe for CompiledShader
impl Send for CompiledShaderwhere
RawVecInner: Send,
impl Sync for CompiledShaderwhere
RawVecInner: Sync,
impl Unpin for CompiledShader
impl UnsafeUnpin for CompiledShaderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TextureBinding>: UnsafeUnpin,
PhantomData<TexSource>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for CompiledShaderwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more