CultPhasor.cos/.sin become .cosine/.sine in C# and HLSL (GLSL regenerated next)

SPIRV-Cross renames members matching GLSL builtins, so the source names change. Resolver and JSON writer accessors follow the members; the wire (positional MessagePack, JSON keys) is untouched in this commit. The committed GLSL is stale until its regeneration commit, so CommittedGlslEqualsLowering fails here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-17 19:25:39 +02:00
commit d605c70bba
6 changed files with 37 additions and 37 deletions

View file

@ -511,8 +511,8 @@ public static class CultMathJson
a => new CultPhasor(new float4(a[0], a[1], a[2], a[3]), new float4(a[4], a[5], a[6], a[7])),
(v, a) =>
{
a[0] = v.cos.x; a[1] = v.cos.y; a[2] = v.cos.z; a[3] = v.cos.w;
a[4] = v.sin.x; a[5] = v.sin.y; a[6] = v.sin.z; a[7] = v.sin.w;
a[0] = v.cosine.x; a[1] = v.cosine.y; a[2] = v.cosine.z; a[3] = v.cosine.w;
a[4] = v.sine.x; a[5] = v.sine.y; a[6] = v.sine.z; a[7] = v.sine.w;
}),
Add<SpanNoise, float>(f, new Fields<float>(("field", Xyzw<float>()), ("curvature", Val<float>()), ("fold", Val<float>())),
a => new SpanNoise(new float4(a[0], a[1], a[2], a[3]), a[4], a[5]),

View file

@ -221,7 +221,7 @@ public sealed class CultMathResolver : IFormatterResolver
}
return value;
}),
Shape<CultPhasor>((ref MessagePackWriter w, CultPhasor v) => { w.WriteArrayHeader(2); PutFloat4(ref w, v.cos); PutFloat4(ref w, v.sin); },
Shape<CultPhasor>((ref MessagePackWriter w, CultPhasor v) => { w.WriteArrayHeader(2); PutFloat4(ref w, v.cosine); PutFloat4(ref w, v.sine); },
(ref MessagePackReader r) =>
{
var value = default(CultPhasor);
@ -229,8 +229,8 @@ public sealed class CultMathResolver : IFormatterResolver
{
switch (i)
{
case 0: value.cos = GetFloat4(ref r); break;
case 1: value.sin = GetFloat4(ref r); break;
case 0: value.cosine = GetFloat4(ref r); break;
case 1: value.sine = GetFloat4(ref r); break;
default: r.Skip(); break;
}
}