我刚刚意识到,统一中的全局变量必须在函数中初始化。作为新的着色器,我不知道我是不是做了错误的方式。const float PI = 3.14159265359;fixed4 frag(v2f i) : SV_Target float result = PI * otherVariable;}令人困惑的是,当我在frag函数中重新初始化全局变量(PI)时,我得到了预
我正在尝试做一些事情,比如 while (currentLayerDepth < currentDepth) currentUV -= step; currentLayerDepth += eachLayer;
} 它记录了一个错误Shader error in 'Unlit/CustomParallax': unable to unroll loop, loop does not appear to termina