Author Topic: CCCamp 2015 demo vs. NVIDIA compiler  (Read 3544 times)

0 Members and 1 Guest are viewing this topic.

Stefan

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4343
    • View Profile
CCCamp 2015 demo vs. NVIDIA compiler
« on: December 24, 2015, 10:43:09 AM »
Yet another example how diferent vendors' compilers behave.

Shadertoy demo CCCamp 2015 (incl. in new demo pack) works fine with AMD, Intel and MESA, but fails with NVIDIA compiler in the end

Code: [Select]
color -= 4.0 * pow(length(uv - 0.5),3.0) * vec3(0.08*smoothstep(0.8,1.0,1.0 - h.z));

<!> [OpenGL] GPU program (shadertoy_prog) linking info log - Fragment info
   lvalue in array access too complex or possible array index out of bounds

If you change -= to = it renders partially

Injecting an ABS doesn't help

Code: [Select]
color -= 4.0 * pow(abs(length(uv - 0.5)),3.0) * vec3(0.08*smoothstep(0.8,1.0,1.0 - h.z));