1
對於下面的代碼:「一流陣」:不支持
vec4[8] Get8Neighbours(sampler2D sampler)
{
int i = 0;
vec2 at;
vec4[8] ret;
vec2 step = vec2(1.0)/uResolution.x;
for(float x = -1.0; x < 2.0; x++)
{
for(float y = -1.0; y < 2.0; y++)
{
if(x != 0.0 || y != 0.0)
{
at = vec2(x,y);
ret[i] = texture2D(sampler, vTextureCoord + (at * step));
i++;
}
}
}
return ret;
}
我從標題得到錯誤。 WebGL中不支持哪部分內容?錯誤信息並沒有太多幫助,Google也沒有給我任何提示。我不能在WebGL中使用數組嗎?