pub struct WarpAnim {
pub y_flip: bool,
pub gpu_pow: bool,
pub skip_tiny_warp: bool,
pub warp_time: f32,
pub scale_inv: f32,
pub f: [f32; 4],
}Expand description
Warp-animation terms computed once per frame in ComputeGridAlphaValues.
Fields§
§y_flip: boolprojectM’s warp vertex shader evaluates the four warp terms with a mesh y of the
opposite sign (its mesh row 0 is the top of the image, MD2’s the bottom). true flips
y in those terms (WarpAnim::projectm).
gpu_pow: boolprojectM computes pow(zoom, ..) in a GPU vertex shader, where a negative base gives NaN (exp2(y*log2(x)));
MD2 does it on the CPU (powf, finite). true in WarpAnim::projectm.
skip_tiny_warp: boolMilkDrop 3 adds the four warp sin / cos terms only when |warp| > 0.0001; MD2 always adds them
(CompatRules::md3_warp_skip_tiny).
warp_time: f32fWarpTime = GetTime() * m_fWarpAnimSpeed
scale_inv: f32fWarpScaleInv = 1 / m_fWarpScale
f: [f32; 4]f[0..4]
Implementations§
Trait Implementations§
impl Copy for WarpAnim
impl StructuralPartialEq for WarpAnim
Auto Trait Implementations§
impl Forget for WarpAnim
impl Freeze for WarpAnim
impl Move for WarpAnim
impl RefUnwindSafe for WarpAnim
impl Send for WarpAnim
impl Sync for WarpAnim
impl Unpin for WarpAnim
impl UnsafeUnpin for WarpAnim
impl UnwindSafe for WarpAnim
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