Texel (and texture) don't support function overloads

Issue #1405 new
created an issue

I'm trying to work with a cubemap, but using Texel or texture doesn't appear to work with overloads. It produces this error:

ERROR: 'texture' : can't use function syntax on variable

Using textureCube instead of texture works as intended.

Pixel shader:

uniform CubeImage skybox;
varying vec3 texCoords;

vec4 effect(vec4 color, Image image, vec2 textureCoords, vec2 screenCoords) {
  return Texel(skybox, texCoords);

I'm running this with LÖVE 11.1 on Ubuntu 17.10 on integrated Intel graphics.

If I had to guess, I'd assume the problem is with the drivers for Intel systems?

Comments (3)

  1. Bart van Strien

    Someone else also ran across this problem, but they named their argument texture, so when compiling with glsl3 it was actually shadowing the texture function. Are you defining a variable called texture somewhere?

  2. MarkSill reporter

    The shader shown is a complete shader, so that's not my issue.

    I've been experimenting with bypassing LÖVE's boilerplate shader code and I don't have this issue there, so I guess it's not a driver issue, but I didn't see anything in wrap_Graphics.lua to suggest there's an issue there.

    Unless someone else comes up with this issue, I'd guess I just did something wrong, so feel free to resolve the issue if you want.

  3. Log in to comment