Open thargy opened 6 years ago
I recently came across a similar issue. There are some parts of the code which should be comparing fully-qualified field / member names. I don't think it will be terribly hard to fix, and we should be able to add a simple test for it.
In an attempt to better understand ShaderGen, I've had a go at converting the
ComputeParticles
shaders from theVeldrid-Samples
project. After lots of trial and error, I got to the following:However, this throws the following error on build:
Which refers to: https://github.com/mellinoe/ShaderGen/blob/347b0078c91a1e28f20149a20bc30e301aa5e393/src/ShaderGen/ShaderMethodVisitor.cs#L479
Moving the ParticleCompute class into it's own file fixes the issue. I'm raising as a bug as classes can be created in the same file (even if generally considered bad practice).