Tracking: Collection of issues found when porting HLSL to rust-gpu #744
Labels
a: documentation
Improvements or additions to documentation
t: tracking issue
An issue tracking the progress of a specific feature or change.
I and some others have been porting a body of HLSL code to rust-gpu. Here's some notes about unexpected differences, pitfalls, and hard-to-port things.
Fixable issues (doesn't mean they're easy!)
#derive(Debug)
on a struct really weirds the compiler out, no way to see what you did wrong#[rustfmt::skip]
on shader entry points, since rustfmt eats long attributes!For example, this line gets mangled from:
into:
Unintuitive behavior mismatches
const_mat3! is equivalent to the transpose of HLSL's float3x3. Same goes for the other matrix constructors, of course. Dangerous trap! But probably the right way around, really.const_mat3!
is no longer supported in latestglam
.Inconveniences that may not be fixable
Documentation issues
The text was updated successfully, but these errors were encountered: