【问题标题】:How does one set an array in hlsl?How does one set an array in hlsl?
【发布时间】:2022-12-02 04:08:45
【问题描述】:

In glsl, array = int[8]( 0, 0, 0, 0, 0, 0, 0, 0 ); works fine, but in hlsl this doesn't seem to be the case. It doesn't seem to be mentioned in any guides how you do this. What exactly am I meant to do?

【问题讨论】:

    标签: hlsl hlsl2glsl


    【解决方案1】:

    For example, like this:

    int array[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
    

    【讨论】: