Closed pixelnerve closed 8 years ago
I'll take a look on Tuesday. Might have more luck using RWStructuredBuffer or a struct with float4x4 member. Also worth looking at Amazon lumberyard source code - last time I checked they were using this project and had made some fixes and enhancements.
You also might want to look at the work going on to get hlsl to spirv working in the glslangValidatator. Spirv-cross can turn spirv to glsl and metal.
@James-Jones
My first try was with a full struct used for transforms. Output was different but still invalid. For instance was trying to convert float bits to uint of the matrix not each matrix row or component
I'll look into those suggestions. Thanks
@James-Jones I can confirm that the version of HLSLCrossCompiler from Lumberyard works well. Converts things correctly so far. They also have a version that converts HLSL to Metal. Might be worth a look.
As for glsl validator it's a no go. No compute shaders and other recent features are implemented yet
@James-Jones Testing a simple structured buffer with float4x4 will result in an invalid GLSL shader with this output:
Input HLSL code: