mirror of
https://github.com/storytold/materialcraft.git
synced 2026-11-30 10:04:02 +01:00
Preserve half blend precision across output size expressions
This commit is contained in:
1 parent
14be8d0588
commit
d98d3fc921
10 files changed
+147
-16
No files matched your search
@@ -15,6 +15,11 @@ impl Program {
|
||||
self.instructions.get(self.output).map_or(0, |instruction| instruction.type_code)
|
||||
}
|
||||
|
||||
/// Whether the result depends only on literals and pure operations.
|
||||
pub fn output_is_literal(&self) -> bool {
|
||||
self.instructions.get(self.output).is_some_and(|instruction| instruction.literal)
|
||||
}
|
||||
|
||||
pub fn node_type(&self, id: u32) -> Option<u32> {
|
||||
self.instructions.iter().find(|instruction| instruction.id == id).map(|instruction| instruction.type_code)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user