Open PierreWang opened 1 year ago
Suggestion to fix the issue: Add "interpolation" token to HdSt_ResourceLayout::Member. In _ParseMembers function of resourceLayout.cpp, allow the size of memberInput to be 4. The 4th member input can be an interpolation attribute. Then in codeGen.cpp, this interpolation attribute is passed down to the shader generator, and the shader generator needs to make corresponding changes to write the interpolation attribute in the shader.
Filed as internal issue #USD-7607
Description of Issue
The member in a block can have interpolation attribute. Such as: struct VSOutput { vec4 Pos; vec3 Color [[flat]]; } ;
Currently when we parse a "layout" in the glslfx file, only the name, type and the arraysize of the member is parsed. You can not specify the interpolation attribute. And it will not be written to the generated shader.
Steps to Reproduce
System Information (OS, Hardware)
Windows 10. Mac OS Catalina.
Package Versions
v22.08
Build Flags
N/A (default)