Struct ark_api_ffi::render_v0::SdfInstanceData
source · [−]#[repr(C)]pub struct SdfInstanceData {
pub world_from_instance: [f32; 16],
pub bounding_box_index: u32,
pub dynamic_data_offset: u32,
pub dynamic_data_length: u32,
pub detail_bias: f32,
pub opacity: f32,
pub lighting: f32,
pub depth_test: PodBool,
pub depth_write: PodBool,
pub _pad: [u8; 2],
}Expand description
Describes an instance of an Sdf function to be rendered.
Fields
world_from_instance: [f32; 16]Instance space to world transform for the draw call. Column major.
bounding_box_index: u32Index into the bounding box array.
dynamic_data_offset: u32Dynamic data for the procedural instance
Set both to zero in order to render it without modification.
dynamic_data_length: u32detail_bias: f32Detail level. 0.0 means automatic detail.
TODO: Define what this means.
opacity: f32Range: [0, 1]. Set to 1 for fully opaque rendering.
Set to < 1 for transparent rendering.
Transparent objects are rendered back-to-front, after opaque objects,
but before objects with depth_test=false.
lighting: f32Range: [0, 1]. Interpolated between unlit and lit colors.
Set to 0 to disable lighting. Set to 1 to enable lighting.
depth_test: PodBoolIf true, depth testing is enabled, which means things closer to the camera
will rendered on top of things further away. This is normally what you want.
If false, this instance will be rendered on top of previous instances, even if this instance is further away.
In other words, settings depth_test=false will
make your instance visible through all other instances, even if they are not transparent.
Instances with depth_test=false are always rendered last.
depth_write: PodBoolControl whether or not to write to the depth buffer.
NOTE: render order is respected, EXCEPT for instances which are transparent or has depth_test=false.
_pad: [u8; 2]Trait Implementations
sourceimpl Clone for SdfInstanceData
impl Clone for SdfInstanceData
sourcefn clone(&self) -> SdfInstanceData
fn clone(&self) -> SdfInstanceData
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for SdfInstanceData
impl Debug for SdfInstanceData
impl Copy for SdfInstanceData
impl Pod for SdfInstanceData
Auto Trait Implementations
impl RefUnwindSafe for SdfInstanceData
impl Send for SdfInstanceData
impl Sync for SdfInstanceData
impl Unpin for SdfInstanceData
impl UnwindSafe for SdfInstanceData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> CheckedBitPattern for T where
T: AnyBitPattern,
impl<T> CheckedBitPattern for T where
T: AnyBitPattern,
type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
sourcefn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret bits as &Self.