Issue was possibily being caused by duplicating a light even when that
light was not in the render_light_instances array.
(cherry picked from commit 545bf86d39)
When setting the default precision type for uniforms (before compiling
the shader) prevent boolean uniforms from having one set. Booleans can't
have a precision type and on some Android devices this caused a
compilation failure.
Fixes#30317
(cherry picked from commit 10f1e0f63a)
The use of different default precision values (highp in vertex; mediump
in fragment) for uniform variables caused the shader program to not link properly on some android
devices/emulators.
(cherry picked from commit 502dbc7c4a)
If a non-imported texture resource file (e.g. DDS) gets updated the editor
doesn't reload it. The cause of the problem is two-fold:
First, the code of ImageTexture assumes that textures are always imported
from an image, but that's not the case for e.g. DDS. This change thus adds
code to issue a resource reload in case an image reload is not possible
(which is the case for non-imported texture resources).
Second, the code is filled with bogus calls to Image::get_image_data_size()
to determine the mipmap offset when that should be done using
Image::get_image_mipmap_offset(). Previous code literally passed the integer
mip level value to Image::get_image_data_size() where that actually expects
a boolean. Thus this part of the change might actually solve some other
issues as well.
To be pedantic, the texture_get_data() funciton of the rasterizer drivers is
still quite a mess, as it only ever returns the whole mipchain when
GLES_OVER_GL is set (practically only on desktop builds) but this change does
not attempt to resolve that.
(cherry picked from commit e34eb5c26c)
This error is generated whenever rendering collision debug meshes.
There's no reason why this should be treated as an error as index-less
meshes are supported and used across the engine.
(cherry picked from commit 1dd98baaa6)
Non-tools OpenGLES2 devices that use the USE_SKELETON_SOFTWARE path (i.e. do not support float texture) depend on surface->data being set containing the bone IDs and weights (rasterizer_scene_gles2.cpp, line 1456, RasterizerSceneGLES2::_setup_geometry). However currently if TOOLS_ENABLED is not defined, surface->data is not stored in main memory in rasterizer_storage_gles2.cpp. This causes a crash in rasterizer_scene_gles2.cpp when a rigged object comes into view.
This fix addresses the specific case of skinned objects when USE_SKELETON_SOFTWARE is active, and stores a copy of the bone data, as is done when TOOLS_ENABLED is defined. This fixes the crash by allowing the same mechanism as on desktop, without adding the memory overhead of storing all vertex data where not required.
Fixes#28298
(cherry picked from commit e36e9fdb1c)
Proper counting code has been added to update info struct.
Extra: Added the render_info_capture calculations.
Fixes: #27273
(cherry picked from commit 4839b17f93)
When transparent_bg is on, or the render target is too small,
Godot would skip postprocessing and disregard keep_3d_linear.
This fixes#26817.
(cherry picked from commit 7cbfce7a8c)
Bug introduced in #26343 where `(float *)` was mistakenly converted
to `(uint8_t *)`, so we were getting `2` instead of `8`.
Fixes#27705.
(cherry picked from commit b182e038e7)
Example of the warning:
./core/script_language.h:198:7: warning: 'class ScriptCodeCompletionCache' has virtual functions and accessible non-virtual destructor [-Wnon-virtual-dtor]
(cherry picked from commit f9f2413e69)
- Cleaned up and improved the code determining when we need to use a depth
prepass (previously it wasn't executed in certain cases even if it was
needed)
- Added code to prepare and bind the depth texture even when no depth prepass
or MRTs (more precisely effect buffers) are used
Fixes#25870, #25535, and #25387.
(cherry picked from commit 849596c40c)
In canvas.glsl and scene.glsl, we were using texel2DFetch from stdlib.glsl,
which uses texture2DLod. In both cases, the stdlib.glsl include came before
the define of texture2DLod.
Might fix issues for drivers that don't support GL_EXT_shader_texture_lod.