我如何从顶点着色器中传递一个值,作为s语和hlsl中的平面变量?

问题描述 投票:0回答:1
在我的顶点着色器中的GLSL代码中,我有:

layout(location = 2) out flat uint out_uniform_index; layout(location = 3) out vec2 out_pos_in_chamfer_box; layout(location = 4) out flat vec2 out_chamfer_box_size;
在GLSL中,我认为整数是自动平坦的,但是对于浮点类型,您必须专门标记它。我正在尝试使用lang语,但我不知道该怎么做,因为它似乎没有“平坦”的关键字预选赛。由于语的语法与HLSL有关,我想知道HLSL是否也没有此预选赛。我该如何在语中做到这一点?
    

您可以在此处找到doc中的nointerpolation
shader hlsl slang-shader-language
1个回答
0
投票
https://learn.microsoft.com/en-us/windows/windows/win32/direct3dhlsl/dx-graphics-graphics-hlsls-hlslsl-schrentist

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.