mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-24 21:37:46 +00:00
Improve SHPK documentation
This commit is contained in:
parent
a2db761e18
commit
88562f4dc6
1 changed files with 4 additions and 0 deletions
|
@ -78,15 +78,19 @@ struct SHPKHeader {
|
|||
}
|
||||
|
||||
pub struct Shader {
|
||||
/// The HLSL bytecode of this shader. The DX level used varies.
|
||||
pub bytecode: Vec<u8>
|
||||
}
|
||||
|
||||
pub struct ShaderPackage {
|
||||
/// The vertex shaders in this package
|
||||
pub vertex_shaders: Vec<Shader>,
|
||||
/// The pixel (fragment) shaders in this package
|
||||
pub pixel_shaders: Vec<Shader>
|
||||
}
|
||||
|
||||
impl ShaderPackage {
|
||||
/// Reads an existing SHPK file
|
||||
pub fn from_existing(buffer: ByteSpan) -> Option<ShaderPackage> {
|
||||
let mut cursor = Cursor::new(buffer);
|
||||
let shpk_header = SHPKHeader::read(&mut cursor).unwrap();
|
||||
|
|
Loading…
Add table
Reference in a new issue