CultMath GLSL: shaders/CultMath.glsl generated from the HLSL by one enumerated lowering, pinned
GlslLowering (test project) is the HLSL -> GLSL ES 3.00 transformation as named steps: includes inlined by the C# mirror's own resolver, guards and texture functions dropped, type names, static const, casts by a balanced scanner, intrinsic renames, literals passed through, the CULTMATH_GLSL guard and a provenance line. GlslMirrorTests pins the committed file to the lowering (CULTMATH_WRITE_GLSL=1 regenerates it), finds no HLSL-only token, finds every public function but the texture samplers, and pins fixtures/glsl-parity.json (256 seeded cases per family as float32 bit patterns) to C#. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0eeb619b35
commit
d2ff33085f
5 changed files with 7655 additions and 1 deletions
|
|
@ -374,7 +374,7 @@ public sealed class HlslSourceCompatibilityTests
|
|||
return (result.Success ? Assembly.Load(stream.ToArray()) : null, errors);
|
||||
}
|
||||
|
||||
private static string FindCultMathRoot()
|
||||
internal static string FindCultMathRoot()
|
||||
{
|
||||
var directory = new DirectoryInfo(AppContext.BaseDirectory);
|
||||
while (directory is not null && !File.Exists(Path.Combine(directory.FullName, "packages", "cultmath", "shaders", "CultMath.hlsl")))
|
||||
|
|
|
|||
Loading…
Reference in a new issue