diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-10-23 05:32:09 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-10-23 05:32:09 +0300 |
commit | 3f12f02beab87184e25f0bbf250b39597ac08a1d (patch) | |
tree | 4c5cd5958df36812cbd214a88df4722ac30bdf7f /source | |
parent | c6281d5dc7c40c6fabef0873b3865eadcb09c63e (diff) | |
parent | 14a4961490605a38ea33ff2d39729d7d5579378b (diff) |
Merge branch 'blender-v2.91-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl | 3 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_walk.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_state.cc | 3 |
4 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl index db3497bd043..5f14f590128 100644 --- a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl @@ -115,9 +115,10 @@ void prepare_raycast(vec3 ray_origin, /* Clip to segment's end. */ max_time /= length(ss_step.xyz); - /* Clipping to frustum sides. */ max_time = min(max_time, line_unit_box_intersect_dist(ss_start.xyz, ss_step.xyz)); + /* Avoid no iteration. */ + max_time = max(max_time, 1.0); /* Convert to texture coords. Z component included * since this is how it's stored in the depth buffer. diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 9dbdb37ef27..f5962f36412 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -550,10 +550,11 @@ void ED_region_do_draw(bContext *C, ARegion *region) * for drawing of borders/gestures etc */ ED_region_pixelspace(region); + /* Remove sRGB override by rebinding the framebuffer. */ GPUFrameBuffer *fb = GPU_framebuffer_active_get(); GPU_framebuffer_bind(fb); + ED_region_draw_cb_draw(C, region, REGION_DRAW_POST_PIXEL); - GPU_framebuffer_bind_no_srgb(fb); region_draw_azones(area, region); diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c index 1d89b040b85..3c9e4fa49b9 100644 --- a/source/blender/editors/space_view3d/view3d_walk.c +++ b/source/blender/editors/space_view3d/view3d_walk.c @@ -337,7 +337,7 @@ static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *region, voi immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - immUniformThemeColor3(TH_VIEW_OVERLAY); + immUniformThemeColorAlpha(TH_VIEW_OVERLAY, 1.0f); immBegin(GPU_PRIM_LINES, 8); diff --git a/source/blender/gpu/intern/gpu_state.cc b/source/blender/gpu/intern/gpu_state.cc index d0048ab9b87..fae196b202a 100644 --- a/source/blender/gpu/intern/gpu_state.cc +++ b/source/blender/gpu/intern/gpu_state.cc @@ -167,7 +167,8 @@ void GPU_depth_range(float near, float far) void GPU_line_width(float width) { - SET_MUTABLE_STATE(line_width, width * PIXELSIZE); + width = max_ff(1.0f, width * PIXELSIZE); + SET_MUTABLE_STATE(line_width, width); } void GPU_point_size(float size) |