New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
everything wrong with mat4 inout and varying in shaders #41109
Comments
Update: tested on AMD Vega8 Windows, Bug does not work there(web and native works correct) Look like its only Nvidia bug, or Godot very low level problem, idk... |
Sounds like a driver bug if it only fails on one GPU. |
Will be nice if I have more test results... |
OS: Fedora 31 With the configuration above, I get output that looks like "Bug visual result" with the black square. |
Calinou thanks! |
https://opengl.gpuinfo.org/ can be used to see Varying limitations, I do not think Godot hit its limit. (when AMD Vega8 has the same limit as Nvidia and everything works on AMD) I tested shader in Vulkan, no bug there. (varying as out/in) I tested shader in GLES 3 minimal engine, (varying as out/in also) same bug there. so its Nvidia driver bug |
On the web bug test I get the second output, the "correct visual result" |
maybe you launch with ANGLE on if its WIndows and Nvidia you should have bug result |
@vladimirzb you launch Chrome with ANGLE off? |
@danilw
Did I tried correctly? If not, I am open to try it the correct way ;D |
@vladimirzb this will launch Chrome in ANGLE off mode by default Chrome on Windows launched with ANGLE on, and this bug work only in OpenGL, when ANGLE in Chrome is OpenGL to dx11 translator. |
same as #43055 I think it can be closed because the latest Nvidia driver brings even more "GLSL" bugs than this... |
Godot version:
Godot 3.2.2 stable
OS/device including version:
Linux, Windows
I can confirm it only on Nvidia GPU, AMD does not have this bug
Issue description:
I do not know the reason and is this Godot bug
or maybe I miss something
GPU Nvidia 750 (tested only on Nvidia)
Bug - sometime mat4 can be broken and have no value(something broken) in the Fragment shader when in the Vertex logic everything works. (this is not my shaders bugs)
At some point, Godot build-in matrix (like WORLD_MATRIX) can be ruined.
Web version launch link with BUG
Steps to reproduce:
shader files:
minimal.shader (mesh) - minimal code
bug2.shader (mesh) - added one function that do more bugs...
and 3 files with similar code bug3.shader (particle) - I use particles to test WORLD_MARTIX is it ruined in fragment shader, on this code its not broken(in this code, my code way to large to put it there), but display more bugs.
There way too many bugs my example function in this shaders that return
mat4 lookAt()
return not same value for every of this returns:Bug visual result on my Nvidia:
Correct visual result:
minimal shader code:
links to all bugged shaders:
minimal.shader
bug2.shader
bug3.shader
bug31.shader
bug32.shader
Lines with comments - in other shadders I display that those lines have not same result in every shader, because bug
function translate almost always do nothing to varying, also
mat4 tm=tmtx; translate(tm,a); tmtx=tm;
does not fix it. Only in bug31.shader this function translate works.Minimal reproduction project:
mat4_bugs.zip with source code
with a correct result mat4_bugs_correct.zip with source code
The text was updated successfully, but these errors were encountered: