shader-slang / slang

Making it easier to work with shaders
MIT License
1.78k stars 159 forks source link

Implement HLSL resource bindings and default type `float4` to `SubpassInput<T>` #4462

Closed ArielG-NV closed 23 hours ago

ArielG-NV commented 4 days ago

fixes: #4440

  1. Removed GLSLInputAttachmentIndexLayoutModifier and the somewhat 'hacky' binding model 'input_attachment' previously relied upon. This was changed to work with the slang-type-layout rules system. This means we propagate resourceInfo rather than a modifier to store 'input_attachment' binding data. This change allows Slang automatic bindings, HLSL bindings, GLSL bindings, and translation of GLSL to and from HLSL bindings to work as expected.
  2. Added default argument float4 to SubpassInput.
  3. Merged glsl.meta and hlsl.meta SubpassInput logic.

Note: