From 4f8e4044ae6b9b7d71e1d16170f40f1753e4da89 Mon Sep 17 00:00:00 2001 From: Nick Alberelli Date: Fri, 10 Oct 2025 18:38:24 +0200 Subject: [PATCH 1/3] API Documentation: Add note to `gpu.shader` to explicitly set all uniforms Fix #103176 Pull Request: https://projects.blender.org/blender/blender/pulls/146860 --- source/blender/python/gpu/gpu_py_shader.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index db4143b6a97..62cd9d28ed2 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -1049,6 +1049,11 @@ PyDoc_STRVAR( "All built-in shaders have the ``mat4 ModelViewProjectionMatrix`` uniform.\n" "\n" "Its value must be modified using the :class:`gpu.matrix` module.\n" + "\n" + ".. important::\n" + "\n" + " Shader uniforms must be explicitly initialized to avoid retaining values from previous " + "executions.\n" "\n" PYDOC_BUILTIN_SHADER_DESCRIPTION); static PyModuleDef pygpu_shader_module_def = { /*m_base*/ PyModuleDef_HEAD_INIT, From abc2cb24c94a88dd124209e57935321bc2a6b14d Mon Sep 17 00:00:00 2001 From: Christoph Neuhauser Date: Fri, 10 Oct 2025 19:11:46 +0200 Subject: [PATCH 2/3] Fix: EEVEE: Write to vertex shader outputs to avoid Intel linking errors eevee_geom_world_vert.glsl and eevee_geom_volume_vert.glsl do not support shadows, but the shader validation pipeline still compiles the shadow variant of these shaders. This results in the fragment shader reading from inputs that are not written to as vertex shader outputs. On the Intel Windows OpenGL driver, this leads to a shader linking failure. This PR avoids the issue by writing zeros to the interface variables when MAT_SHADOW is defined. Pull Request: https://projects.blender.org/blender/blender/pulls/147821 --- .../engines/eevee/shaders/eevee_geom_volume_vert.glsl | 10 ++++++++++ .../engines/eevee/shaders/eevee_geom_world_vert.glsl | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/source/blender/draw/engines/eevee/shaders/eevee_geom_volume_vert.glsl b/source/blender/draw/engines/eevee/shaders/eevee_geom_volume_vert.glsl index bffd8f6b165..5a8e9cb2d15 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_geom_volume_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_geom_volume_vert.glsl @@ -28,4 +28,14 @@ void main() interp.P = drw_point_object_to_world(lP); gl_Position = reverse_z::transform(drw_point_world_to_homogenous(interp.P)); + +#ifdef MAT_SHADOW + /* Volumes currently do not support shadow. But the shader validation pipeline still compiles the + * shadow variant of this shader. Avoid linking error on Intel Windows drivers. */ +# ifdef SHADOW_UPDATE_ATOMIC_RASTER + shadow_iface.shadow_view_id = 0; +# endif + shadow_clip.position = float3(0); + shadow_clip.vector = float3(0); +#endif } diff --git a/source/blender/draw/engines/eevee/shaders/eevee_geom_world_vert.glsl b/source/blender/draw/engines/eevee/shaders/eevee_geom_world_vert.glsl index a9ab71bad4e..c4b0003a65a 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_geom_world_vert.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_geom_world_vert.glsl @@ -29,4 +29,14 @@ void main() interp.N = float3(1); gl_Position = reverse_z::transform(gl_Position); + +#ifdef MAT_SHADOW + /* This shader currently does not support shadow. But the shader validation pipeline still + * compiles the shadow variant of this shader. Avoid linking error on Intel Windows drivers. */ +# ifdef SHADOW_UPDATE_ATOMIC_RASTER + shadow_iface.shadow_view_id = 0; +# endif + shadow_clip.position = float3(0); + shadow_clip.vector = float3(0); +#endif } From 64b4db4a128e31c983521b5f435d43c415fecae5 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Fri, 10 Oct 2025 20:04:27 +0200 Subject: [PATCH 3/3] Fix #147765: Padding of Quick Tooltips Some tooltips pop up up instantly with just a word or two and then expand later to show more information, for example for the Properties categories. This type of tooltip is not considering padding when clamping to the window bounds, making it possible for them to be positioned in such a way that clips some content. This PR just adds padding to the window bounds. Pull Request: https://projects.blender.org/blender/blender/pulls/147835 --- .../editors/interface/regions/interface_region_tooltip.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/interface/regions/interface_region_tooltip.cc b/source/blender/editors/interface/regions/interface_region_tooltip.cc index abc2914daea..79718fb973f 100644 --- a/source/blender/editors/interface/regions/interface_region_tooltip.cc +++ b/source/blender/editors/interface/regions/interface_region_tooltip.cc @@ -1509,10 +1509,10 @@ static ARegion *ui_tooltip_create_with_data(bContext *C, init_rect.ymin = init_rect_overlap->ymin - pad; init_rect.ymax = init_rect_overlap->ymax + pad; rcti rect_clamp; - rect_clamp.xmin = 0; - rect_clamp.xmax = win_size[0]; - rect_clamp.ymin = 0; - rect_clamp.ymax = win_size[1]; + rect_clamp.xmin = pad_x + pad; + rect_clamp.xmax = win_size[0] - pad_x - pad; + rect_clamp.ymin = pad_y + pad; + rect_clamp.ymax = win_size[1] - pad_y - pad; /* try right. */ const int size_x = BLI_rcti_size_x(&rect_i); const int size_y = BLI_rcti_size_y(&rect_i);