Closed vitvakatu closed 5 years ago
Hm, this is going to be difficult to debug, esp. since I cannot reproduce this. Can you give an exact video card model?
Tove's shader renderer (i.e. the right one above) is a pretty brittle piece of GLSL programming with various texture lookups (including one binary search) depending on each other for reading out its data structures. If even one access is slightly off, the whole thing goes havoc. The turquoise color in the picture above are cases where this lookup failed. I've tested the thing with a couple of GPUs and one software renderer, but this above is some driver thing.
Here's some things you could try, which might help me understand what's going on:
LIBGL_ALWAYS_SOFTWARE=1 love .
, i.e. forcing the software renderer instead of the hardware renderer.lib/tove/init.lua
file (the one you downloaded), search for rayOnX = dxy.x < dxy.y;
and change it to rayOnX = true;
if string.find(device, "Parallels") ~= nil then
to if true then
changes anything, this avoids using mat3
which caused a problem with one driver.I can reproduce the issue, using the latest git version of the library on Arch Linux. The artifacts look identical:
Regarding the three tests:
Changing if string.find(device, "Parallels") ~= nil then
doesn't seem to affect the issue at all
Tweaking rayOnX = dxy.x < dxy.y;
by itself looks like this
LIBGL_ALWAYS_SOFTWARE=1
by itself looks like this:rayOnX
tweak and the LIBGL_ALWAYS_SOFTWARE
variable, we get this:Hardware + driver info:
00:02.0 VGA compatible controller [0300]: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller [8086:0416] (rev 06) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. 4th Gen Core Processor Integrated Graphics Controller [1043:157d]
Kernel driver in use: i915
Also, running the demo with my NVIDIA card shows an error:
Error
Cannot compile pixel shader code:
Line 382: error: ambiguous overloaded function reference "mix(ivec4, ivec4, bvec4)"
Traceback
[C]: in function 'newShader'
tove/init.lua:1324: in function 'newGeometryFillShader'
tove/init.lua:1750: in function 'newComputeFeedData'
tove/init.lua:1793: in function 'gen'
tove/init.lua:2284: in function 'shaders'
tove/init.lua:2470: in function 'f'
tove/init.lua:2502: in function '_create'
tove/init.lua:2217: in function 'draw'
assets/tovedemo.lua:109: in function 'draw'
main.lua:28: in function 'draw'
[C]: in function 'xpcall'
@pdesaulniers The NVIdia error is a correct error due to a GLSL call I messed up - should be fixed in top of tree (I'm planning to make an official release in the next weeks where this is included).
The artefacts problem is difficult. I can now also reproduce this with one machine here. I need to think about how to add debugging code to tackle this.
Seems like it's working now! I'm not getting any weird artifacts using either my Intel or NVIDIA card:
I had hoped for this. With the last commits from today, I can no longer reproduce issues. I tested with NVidia on Windows and Linux, as well with Intel hardware drivers on macOS.
I tested again on all devices I own. Seems it's working everywhere now.
Hi! Just tried your library and found weird artifacts with all the examples
I'm running Kubuntu with Intel integrated video card