Hi guys,
Running on Windows 7 with NVIDIA GeForce GTX 960, I get the following error message when launching the game:
Error tile.lua:187: Shader uniform 'borderColour' does not exist. A common error is to define but not use the variable. Traceback [C]: in function 'send' tile.lua:187: in function 'drawFunc' camera.lua:51: in function 'drawTo' tile.lua:182: in function 'drawCanvas' world.lua:14: in function 'draw' game.lua:247: in function 'draw' main.lua:82: in function 'draw' [C]: in function 'xpcall'
I fixed it with the following change to the glow shader code:
vec4 borderColour_force = borderColour; // This line added if (closestDist == 0 || closestDist > glowSize) { return vec4(0, 0, 0, 0); } else if (closestDist <= borderSize + 0.5) { return borderColour_force; // This line changed }
I assume that the uniform borderColour was somehow optimized away by my graphics driver, and the error was caused when the CPU code tried to access it.
I think the problem is borderColour was never referenced outside the if statement. Referencing it outside the if statement by assigning it to the new local variable borderColour_force fixed the issue for me.