Skip to content
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

3D in GLES2 is completely broken #25263

Closed
YeldhamDev opened this issue Jan 23, 2019 · 15 comments
Closed

3D in GLES2 is completely broken #25263

YeldhamDev opened this issue Jan 23, 2019 · 15 comments

Comments

@YeldhamDev
Copy link
Member

Godot version:
2c9536b

Issue description:
With @reduz's most recent commits (likely 4f4e46e), the 3D rendering in GLES2 is completely broken as for now:
screenshot at 2019-01-23 13-11-05

@muiroc
Copy link
Contributor

muiroc commented Jan 23, 2019

in my case now both types of meshes (compressed and uncompressed) are visibile and the errors are gone (to clarify, this in webgl)

console output?
in webgl there were now errors about texureLod when the third parameter was an integer

EDIT wait a sec, actually I still need to rebuild the latest editor 😄

@YeldhamDev
Copy link
Member Author

The output has a mountain of text, but here are the last errors printed:

 drivers/gles2/shader_gles2.cpp:196 - SceneShaderGLES2: Fragment shader compilation failed:
0:70(9): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:70(2): error: `return' with wrong type error, in function `texel2DFetch' returning vec4

 drivers/gles2/shader_gles2.cpp:426 - Method/Function Failed, returning: __null
 drivers/gles2/shader_gles2.cpp:133 - Condition ' !version ' is true. returned: false
 drivers/gles2/shader_gles2.h:524 - Condition ' !version ' is true. returned: -1
 drivers/gles2/shader_gles2.h:524 - Condition ' !version ' is true. returned: -1
 drivers/gles2/shader_gles2.h:524 - Condition ' !version ' is true. returned: -1
 drivers/gles2/shader_gles2.h:524 - Condition ' !version ' is true. returned: -1
 drivers/gles2/shader_gles2.h:524 - Condition ' !version ' is true. returned: -1

@LinuxUserGD
Copy link
Contributor

LinuxUserGD commented Jan 23, 2019

Same error (Arch Linux):

ERROR: _display_error_with_code: SceneShaderGLES2: Fragment shader compilation failed:
0:75(9): error: no matching function for call to `texture2DLod(sampler2D, vec2, float)'; candidates are:
0:75(2): error: `return' with wrong type error, in function `texel2DFetch' returning vec4

   At: drivers/gles2/shader_gles2.cpp:196.
ERROR: get_current_version: Method/Function Failed, returning: __null
   At: drivers/gles2/shader_gles2.cpp:426.
ERROR: bind: Condition ' !version ' is true. returned: false
   At: drivers/gles2/shader_gles2.cpp:133.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: get_uniform_location: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.cpp:522.
ERROR: get_uniform_location: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.cpp:522.
ERROR: get_uniform_location: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.cpp:522.
ERROR: get_uniform_location: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.cpp:522.
ERROR: get_uniform_location: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.cpp:522.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.
ERROR: _get_uniform: Condition ' !version ' is true. returned: -1
   At: drivers/gles2/shader_gles2.h:524.

@reduz
Copy link
Member

reduz commented Jan 23, 2019

OS, GPU and sample project ploz, because so far it works fine for me.

@YeldhamDev
Copy link
Member Author

@reduz Manjaro GNU/Linux - Intel i5, Haswell-ULT

@LinuxUserGD
Copy link
Contributor

Arch Linux (Antergos)
OpenGL ES 2.0 Renderer: Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)
example: Platformer 3D demo

@groud groud added this to the 3.1 milestone Jan 23, 2019
@reduz
Copy link
Member

reduz commented Jan 23, 2019

Oh I see, intel related. Will check it asap.

@LinuxUserGD
Copy link
Contributor

But it works on Windows 10 64 bit

@santouits
Copy link
Contributor

#ifndef USE_GLES_OVER_GL

#ifndef USE_GLES_OVER_GL

#ifndef USE_GLES_OVER_GL

Those ifndef were added in the last commit and maybe some implementations of gles 2 need explicitely to enable EXT_shader_texture_lod or GL_ARB_shader_texture_lod for the functions to work. Remove them?

@reduz
Copy link
Member

reduz commented Jan 23, 2019

I don't know, texture lod is core for OpenGL 2.1, so on desktop it should not need any extension.

@reduz
Copy link
Member

reduz commented Jan 23, 2019

oh right, my mistake, I now realize it's not core. It only works on vertex programs in 2.1. Will fix ASAP.

@swarnimarun
Copy link
Contributor

swarnimarun commented Jan 23, 2019

Yep it's not working for me but when I switch to the nvidia card in my laptop it seemed fine.... Need to check more I guess.
btw I am using Manjaro.

@reduz reduz closed this as completed in 2d57ec2 Jan 23, 2019
@LinuxUserGD
Copy link
Contributor

So GL2 works?

@reduz
Copy link
Member

reduz commented Jan 23, 2019 via email

@LinuxUserGD
Copy link
Contributor

Yes, it works now 👍

slapin pushed a commit to slapin/godot that referenced this issue Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants