Struct physis::shpk::ShaderPackage
source · pub struct ShaderPackage {
pub material_parameters_size: u32,
pub vertex_shaders: Vec<Shader>,
pub pixel_shaders: Vec<Shader>,
pub material_parameters: Vec<MaterialParameter>,
pub system_keys: Vec<Key>,
pub scene_keys: Vec<Key>,
pub material_keys: Vec<Key>,
pub sub_view_key1_default: u32,
pub sub_view_key2_default: u32,
/* private fields */
}
Fields§
§material_parameters_size: u32
§vertex_shaders: Vec<Shader>
§pixel_shaders: Vec<Shader>
§material_parameters: Vec<MaterialParameter>
§system_keys: Vec<Key>
§scene_keys: Vec<Key>
§material_keys: Vec<Key>
§sub_view_key1_default: u32
§sub_view_key2_default: u32
Implementations§
source§impl ShaderPackage
impl ShaderPackage
sourcepub fn from_existing(buffer: ByteSpan<'_>) -> Option<ShaderPackage>
pub fn from_existing(buffer: ByteSpan<'_>) -> Option<ShaderPackage>
Reads an existing SHPK file
pub fn find_node(&self, selector: u32) -> Option<&Node>
pub fn build_selector_from_all_keys( system_keys: &[u32], scene_keys: &[u32], material_keys: &[u32], subview_keys: &[u32], ) -> u32
pub fn build_selector_from_keys( system_key: u32, scene_key: u32, material_key: u32, subview_key: u32, ) -> u32
pub fn build_selector(keys: &[u32]) -> u32
pub fn crc(str: &str) -> u32
Trait Implementations§
source§impl BinRead for ShaderPackage
impl BinRead for ShaderPackage
source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments. Read more§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
big-endian byte order. Read more§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Read
Self
from the reader using default arguments and assuming
little-endian byte order. Read more§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
Read
T
from the reader assuming native-endian byte order. Read more§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader using the given arguments. Read more§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming big-endian byte order, using the
given arguments. Read more§fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_le_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Read
Self
from the reader, assuming little-endian byte order, using
the given arguments. Read moresource§impl Debug for ShaderPackage
impl Debug for ShaderPackage
source§impl ReadEndian for ShaderPackage
impl ReadEndian for ShaderPackage
Auto Trait Implementations§
impl Freeze for ShaderPackage
impl RefUnwindSafe for ShaderPackage
impl Send for ShaderPackage
impl Sync for ShaderPackage
impl Unpin for ShaderPackage
impl UnwindSafe for ShaderPackage
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