Merge branch 'blender-v2.83-release'
This commit is contained in:
commit
59d7fbb052
Notes:
blender-bot
2023-02-14 06:42:54 +01:00
Referenced by issue #76277, Enabling Viewer Border in Compositor Crashes Blender
|
@ -69,6 +69,7 @@ static void OVERLAY_engine_init(void *vedata)
|
|||
pd->overlay.flag = V3D_OVERLAY_HIDE_TEXT | V3D_OVERLAY_HIDE_MOTION_PATHS |
|
||||
V3D_OVERLAY_HIDE_BONES | V3D_OVERLAY_HIDE_OBJECT_XTRAS |
|
||||
V3D_OVERLAY_HIDE_OBJECT_ORIGINS;
|
||||
pd->overlay.wireframe_threshold = v3d->overlay.wireframe_threshold;
|
||||
}
|
||||
|
||||
if (v3d->shading.type == OB_WIRE) {
|
||||
|
|
|
@ -169,7 +169,7 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata)
|
|||
|
||||
psl->grid_ps = NULL;
|
||||
|
||||
if (shd->grid_flag == 0 || !DRW_state_is_fbo()) {
|
||||
if ((shd->grid_flag == 0 && shd->zpos_flag == 0) || !DRW_state_is_fbo()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,9 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata)
|
|||
DRW_shgroup_uniform_float_copy(grp, "meshSize", shd->grid_mesh_size);
|
||||
DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth);
|
||||
DRW_shgroup_call(grp, geom, NULL);
|
||||
if (shd->zneg_flag) {
|
||||
DRW_shgroup_call(grp, geom, NULL);
|
||||
}
|
||||
|
||||
grp = DRW_shgroup_create(sh, psl->grid_ps);
|
||||
DRW_shgroup_uniform_int(grp, "gridFlag", &shd->grid_flag, 1);
|
||||
|
@ -196,14 +198,18 @@ void OVERLAY_grid_cache_init(OVERLAY_Data *vedata)
|
|||
DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth);
|
||||
DRW_shgroup_uniform_float(grp, "gridSteps", shd->grid_steps, ARRAY_SIZE(shd->grid_steps));
|
||||
DRW_shgroup_call(grp, geom, NULL);
|
||||
if (shd->grid_flag) {
|
||||
DRW_shgroup_call(grp, geom, NULL);
|
||||
}
|
||||
|
||||
grp = DRW_shgroup_create(sh, psl->grid_ps);
|
||||
DRW_shgroup_uniform_int(grp, "gridFlag", &shd->zpos_flag, 1);
|
||||
DRW_shgroup_uniform_vec3(grp, "planeAxes", shd->zplane_axes, 1);
|
||||
DRW_shgroup_uniform_block(grp, "globalsBlock", G_draw.block_ubo);
|
||||
DRW_shgroup_uniform_texture_ref(grp, "depthBuffer", &dtxl->depth);
|
||||
DRW_shgroup_call(grp, geom, NULL);
|
||||
if (shd->zpos_flag) {
|
||||
DRW_shgroup_call(grp, geom, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void OVERLAY_grid_draw(OVERLAY_Data *vedata)
|
||||
|
|
|
@ -1341,6 +1341,7 @@ struct GPUShader *OVERLAY_shader_volume_velocity(bool use_needle)
|
|||
NULL,
|
||||
datatoc_gpu_shader_flat_color_frag_glsl,
|
||||
datatoc_common_view_lib_glsl,
|
||||
"#define blender_srgb_to_framebuffer_space(a) a\n"
|
||||
"#define USE_NEEDLE\n");
|
||||
}
|
||||
else if (!sh_data->volume_velocity_sh) {
|
||||
|
@ -1349,7 +1350,7 @@ struct GPUShader *OVERLAY_shader_volume_velocity(bool use_needle)
|
|||
NULL,
|
||||
datatoc_gpu_shader_flat_color_frag_glsl,
|
||||
datatoc_common_view_lib_glsl,
|
||||
NULL);
|
||||
"#define blender_srgb_to_framebuffer_space(a) a\n");
|
||||
}
|
||||
return (use_needle) ? sh_data->volume_velocity_needle_sh : sh_data->volume_velocity_sh;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ static GPUShader *hair_refine_shader_get(ParticleRefineShader sh)
|
|||
g_refine_shaders[sh] = DRW_shader_create(vert_with_lib,
|
||||
NULL,
|
||||
datatoc_gpu_shader_3D_smooth_color_frag_glsl,
|
||||
"#define blender_srgb_to_framebuffer_space(a) a\n"
|
||||
"#define HAIR_PHASE_SUBDIV\n"
|
||||
"#define TF_WORKAROUND\n");
|
||||
#endif
|
||||
|
|
|
@ -165,26 +165,33 @@ static const char *gl_enum_to_str(GLenum e)
|
|||
ENUM_TO_STRING(TEXTURE_2D_MULTISAMPLE),
|
||||
ENUM_TO_STRING(RGBA32F),
|
||||
ENUM_TO_STRING(RGBA16F),
|
||||
ENUM_TO_STRING(RGBA16UI),
|
||||
ENUM_TO_STRING(RGBA16I),
|
||||
ENUM_TO_STRING(RGBA16),
|
||||
ENUM_TO_STRING(RG32F),
|
||||
ENUM_TO_STRING(RGBA8UI),
|
||||
ENUM_TO_STRING(RGBA8I),
|
||||
ENUM_TO_STRING(RGBA8),
|
||||
ENUM_TO_STRING(RGB16F),
|
||||
ENUM_TO_STRING(RG32F),
|
||||
ENUM_TO_STRING(RG16F),
|
||||
ENUM_TO_STRING(RG16UI),
|
||||
ENUM_TO_STRING(RG16I),
|
||||
ENUM_TO_STRING(RG16),
|
||||
ENUM_TO_STRING(RGBA8),
|
||||
ENUM_TO_STRING(RGBA8UI),
|
||||
ENUM_TO_STRING(RG8UI),
|
||||
ENUM_TO_STRING(RG8I),
|
||||
ENUM_TO_STRING(RG8),
|
||||
ENUM_TO_STRING(R8UI),
|
||||
ENUM_TO_STRING(R8I),
|
||||
ENUM_TO_STRING(R8),
|
||||
ENUM_TO_STRING(R32F),
|
||||
ENUM_TO_STRING(R32UI),
|
||||
ENUM_TO_STRING(R32I),
|
||||
ENUM_TO_STRING(R16F),
|
||||
ENUM_TO_STRING(R16I),
|
||||
ENUM_TO_STRING(R16UI),
|
||||
ENUM_TO_STRING(RG8),
|
||||
ENUM_TO_STRING(RG16UI),
|
||||
ENUM_TO_STRING(R16I),
|
||||
ENUM_TO_STRING(R16),
|
||||
ENUM_TO_STRING(R8),
|
||||
ENUM_TO_STRING(R8UI),
|
||||
ENUM_TO_STRING(R11F_G11F_B10F),
|
||||
ENUM_TO_STRING(SRGB8_ALPHA8),
|
||||
ENUM_TO_STRING(DEPTH24_STENCIL8),
|
||||
ENUM_TO_STRING(DEPTH32F_STENCIL8),
|
||||
ENUM_TO_STRING(DEPTH_COMPONENT32F),
|
||||
|
@ -457,7 +464,7 @@ static GLenum gpu_format_to_gl_internalformat(eGPUTextureFormat format)
|
|||
case GPU_RG16I:
|
||||
return GL_RG16I;
|
||||
case GPU_RG16F:
|
||||
return GL_RGBA32F;
|
||||
return GL_RG16F;
|
||||
case GPU_RG16:
|
||||
return GL_RG16;
|
||||
case GPU_R8UI:
|
||||
|
|
Loading…
Reference in New Issue