pub struct TexelRect {
pub uv0: DevicePoint,
pub uv1: DevicePoint,
}
Expand description
Stores two coordinates in texel space. The coordinates are stored in texel coordinates because the texture atlas may grow. Storing them as texel coords and normalizing the UVs in the vertex shader means nothing needs to be updated on the CPU when the texture size changes.
Fields§
§uv0: DevicePoint
§uv1: DevicePoint
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TexelRect
impl<'de> Deserialize<'de> for TexelRect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Into<TexelRect> for DeviceIntRect
impl Into<TexelRect> for DeviceIntRect
impl Copy for TexelRect
impl StructuralPartialEq for TexelRect
Auto Trait Implementations§
impl Freeze for TexelRect
impl RefUnwindSafe for TexelRect
impl Send for TexelRect
impl Sync for TexelRect
impl Unpin for TexelRect
impl UnwindSafe for TexelRect
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