RESOLVED: glsl samplerCube textureCube() compile fail

Hi I get this error during shader compilation when I think I shouldn’t. This is from the info dat connected to the glsl material.

Pixel Shader Compile Results:
0(83) : error C1101: ambiguous overloaded function reference “textureCube(samplerCube, vec3)”
(0) : fpf gpf vpf tpf hpf gp4 fp50 vp50 cp50 gp50 uvec4 textureCube(usamplerCube, vec3)
(0) : fpf gpf vpf tpf hpf gp4 fp50 vp50 cp50 gp50 ivec4 textureCube(isamplerCube, vec3)
(0) : vec4 textureCube(samplerCube, vec3)

Attached file. Note, I’m not doing anything sensical with the result - I’m just trying to access a samplerCube with the textureCube() glsl function.

also, the line number in the error reported in the info dat seems to be off by 1 from the actual line in the file.

build 11440
glsl_textureCube.toe (5.13 KB)

Not sure why Nvidia’s error is so bad there… All the texture functions in GLSL 3.30 and later are simply texture(). There is no textureCube(), texture2D() etc. It’s implicitly known by the sampler you pass in. So just change the textureCube() to texture() and you are set.

Ah that explains why you use texture() for the envMap…

You may want to update the docs about this here as it makes reference to textureCube()

derivative.ca/wiki088/index. … be_Map_TOP

thanks!

Good point, docs updated