glGetShaderInfoLog返回“编译失败”。在PowerVR SGX 544MP上(Galaxy S4)

时间:2016-01-28 02:38:14

标签: opengl-es

/* fragment shader */
void main(void)
{
    highp vec3 color;
    highp float tx;
    highp float ty;
    highp vec3 sptr_k;
    highp float fsum_r;
    highp float fwsum;
    highp float value;
    highp float w;
    highp float stepvalue = 1.0;
    int i = 1;
    highp float fstep = 2.0;
    tx = 1.0 / 720.0;
    ty = 1.0 / 720.0;
    fstep = fstep * tx;
    color.r = texture2D(sampler2DBase, v_baseTexCoord).r;
    fsum_r = 0.0;
    fwsum = 0.0;
    sptr_k.r = color.r;
    fwsum = fsum_r + 0.1; // if deleting it works.
    fwsum = 1.0 / fwsum;
    color.r = clamp(fsum_r * fwsum, 0.0, 1.0);
    color.g = color.r;
    color.b = color.r;
    gl_FragColor = vec4(color.rgb, 1.0);
}

我的问题:

  1. 片段着色器获取“编译失败”。通过API glGetShaderInfoLog
  2. 删除fwsum = fsum_r + 0.1;后,片段着色器可以正常工作。
  3. 此问题仅在PowerVR SGX 544MP(Samsung Galaxy S4)上重新出现。

0 个答案:

没有答案