You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the following declaration in SceneEditorCommon.slang.h: uint drawID : DRAW_ID;
HLSL implicitly assigns nointerpolation qualifier to it, but GLSL requires that the user define it with the flat qualifier.
I tried adding nointerpolation, but Slang didn't replace it with flat.
The simple solution for now would be to just replace nointerpolation with flat, but the long-term solution would be for Slang to detect uint outputs and assign the required qualifiers
The text was updated successfully, but these errors were encountered:
Spitting out nointerpolation as flat should be easy in principle. There might be an additional bug here where my "lowering" logic isn't propagating interpolation qualifiers from struct fields over to the global variables I generate in GLSL.
Doing something based on types should be easy enough too. I will try to implement both when I fix this.
Fixesshader-slang#104
- Map HLSL `nointerpolation` to GLSL `flat`
- When lowering a `struct` type varying input/output, look for interpolation modifiers along the "chain" from the leaf field up to the original shader input variable (and take the first one found)
- Not sure if this is strictly needed, but it seems like a reasonable policy
- Add `flat` to varying input of integer type, with no other interpolation modifier
- Note: I do *not* do anything to ignore a manually imposed interpolation modifier that might be incorrect
We have the following declaration in
SceneEditorCommon.slang.h
:uint drawID : DRAW_ID;
HLSL implicitly assigns
nointerpolation
qualifier to it, but GLSL requires that the user define it with theflat
qualifier.I tried adding
nointerpolation
, but Slang didn't replace it withflat
.The simple solution for now would be to just replace
nointerpolation
withflat
, but the long-term solution would be for Slang to detectuint
outputs and assign the required qualifiersThe text was updated successfully, but these errors were encountered: