79732456

Date: 2025-08-11 19:58:25
Score: 0.5
Natty:
Report link

I was provided an answer through SDL support.

The issue was due to fragment shader missing the appropriate space binding. According to https://learn.microsoft.com/en-us/windows/win32/direct3d12/resource-binding-in-hlsl, "if the space keyword is omitted, then the default space index of 0 is implicitly assigned to the range." So the uniform buffer must have been using space0.

The corrected fragment shader:

struct Input
{
    float4  Color       : COLOR0;
    float4  Position    : SV_Position;
};


cbuffer UniformBlock : register(b0, space3)
{
    float4x4 pallete;
};


float4 main(Input input) : SV_Target0
{
    float3 rgb = pallete[0].xyz;
    return float4(rgb, 1.0);
}
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: nu_id