Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh3
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh15
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh3
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_shadow_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/infos/workbench_volume_info.hh1
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl4
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl6
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl27
-rw-r--r--source/blender/draw/engines/workbench/workbench_data.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_antialiasing.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_cavity.c21
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_dof.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_outline.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_engine.c25
-rw-r--r--source/blender/draw/engines/workbench/workbench_engine.h19
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_opaque.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_private.h19
-rw-r--r--source/blender/draw/engines/workbench/workbench_render.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_shader.cc19
-rw-r--r--source/blender/draw/engines/workbench/workbench_shader_shared.h3
-rw-r--r--source/blender/draw/engines/workbench/workbench_shadow.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_transparent.c19
-rw-r--r--source/blender/draw/engines/workbench/workbench_volume.c19
29 files changed, 69 insertions, 292 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh
index f577ae197b4..2cd4a874b58 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_composite_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
@@ -13,7 +14,7 @@ GPU_SHADER_CREATE_INFO(workbench_composite)
.fragment_out(0, Type::VEC4, "fragColor")
.typedef_source("workbench_shader_shared.h")
.fragment_source("workbench_composite_frag.glsl")
- .additional_info("draw_fullscreen");
+ .additional_info("draw_fullscreen", "draw_view");
/** \} */
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh
index 3e0124546b0..d63d1521728 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh
index 60d79ed50d9..089644d20bc 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh
@@ -1,13 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
GPU_SHADER_CREATE_INFO(workbench_effect_cavity_common)
.fragment_out(0, Type::VEC4, "fragColor")
- .sampler(0, ImageType::DEPTH_2D, "depthBuffer")
- .sampler(1, ImageType::FLOAT_2D, "normalBuffer")
- .sampler(2, ImageType::UINT_2D, "objectIdBuffer")
- .sampler(3, ImageType::FLOAT_2D, "cavityJitter")
- .uniform_buf(3, "vec4", "samples_coords[512]")
+ .sampler(0, ImageType::FLOAT_2D, "normalBuffer")
.uniform_buf(4, "WorldData", "world_data", Frequency::PASS)
.typedef_source("workbench_shader_shared.h")
.fragment_source("workbench_effect_cavity_frag.glsl")
@@ -17,15 +14,23 @@ GPU_SHADER_CREATE_INFO(workbench_effect_cavity_common)
GPU_SHADER_CREATE_INFO(workbench_effect_cavity)
.do_static_compilation(true)
.define("USE_CAVITY")
+ .uniform_buf(3, "vec4", "samples_coords[512]")
+ .sampler(1, ImageType::DEPTH_2D, "depthBuffer")
+ .sampler(2, ImageType::FLOAT_2D, "cavityJitter")
.additional_info("workbench_effect_cavity_common");
GPU_SHADER_CREATE_INFO(workbench_effect_curvature)
.do_static_compilation(true)
.define("USE_CURVATURE")
+ .sampler(1, ImageType::UINT_2D, "objectIdBuffer")
.additional_info("workbench_effect_cavity_common");
GPU_SHADER_CREATE_INFO(workbench_effect_cavity_curvature)
.do_static_compilation(true)
.define("USE_CAVITY")
.define("USE_CURVATURE")
+ .uniform_buf(3, "vec4", "samples_coords[512]")
+ .sampler(1, ImageType::DEPTH_2D, "depthBuffer")
+ .sampler(2, ImageType::FLOAT_2D, "cavityJitter")
+ .sampler(3, ImageType::UINT_2D, "objectIdBuffer")
.additional_info("workbench_effect_cavity_common");
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh
index 252a7d4f3a3..559e785d220 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
@@ -52,4 +53,4 @@ GPU_SHADER_CREATE_INFO(workbench_effect_dof_resolve)
.fragment_out(0, Type::VEC4, "finalColorAdd", DualBlend::SRC_0)
.fragment_out(0, Type::VEC4, "finalColorMul", DualBlend::SRC_1)
.additional_info("workbench_effect_dof")
- .do_static_compilation(true); \ No newline at end of file
+ .do_static_compilation(true);
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh
index 3849fe57a25..e76875b3fa5 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh
index 78403c292f0..e5ba0390244 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh
index 29eadc8048a..6e1da090f9f 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_shadow_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_shadow_info.hh
index c26d3c3aaf8..c66e4d61233 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_shadow_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_shadow_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh
index e5b7bc8e2a7..46bfa7e50fd 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_volume_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_volume_info.hh
index dd9492481ec..5d098d61dbf 100644
--- a/source/blender/draw/engines/workbench/shaders/infos/workbench_volume_info.hh
+++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_volume_info.hh
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "gpu_shader_create_info.hh"
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl
index ad83d6f39e5..880f17b0c9d 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_cavity_lib.glsl
@@ -5,6 +5,8 @@
/* From The Alchemy screen-space ambient obscurance algorithm
* http://graphics.cs.williams.edu/papers/AlchemyHPG11/VV11AlchemyAO.pdf */
+#ifdef USE_CAVITY
+
void cavity_compute(vec2 screenco,
sampler2D depthBuffer,
sampler2D normalBuffer,
@@ -90,3 +92,5 @@ void cavity_compute(vec2 screenco,
cavities = clamp(cavities * world_data.cavity_valley_factor, 0.0, 1.0);
edges = edges * world_data.cavity_ridge_factor;
}
+
+#endif /* USE_CAVITY */
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl
index 18a093275c5..a6f7a1f522a 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_curvature_lib.glsl
@@ -1,4 +1,8 @@
+#pragma BLENDER_REQUIRE(workbench_common_lib.glsl)
+
+#ifdef USE_CURVATURE
+
float curvature_soft_clamp(float curvature, float control)
{
if (curvature < 0.5 / control) {
@@ -43,3 +47,5 @@ void curvature_compute(vec2 uv,
curvature = 2.0 * curvature_soft_clamp(normal_diff, world_data.curvature_ridge);
}
}
+
+#endif /* USE_CURVATURE */
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
index e9525ce9de0..d8f8a1cc03f 100644
--- a/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
+++ b/source/blender/draw/engines/workbench/shaders/workbench_effect_dof_frag.glsl
@@ -254,31 +254,8 @@ void main()
* Morgan McGuire and Kyle Whitson
* http://graphics.cs.williams.edu
*
- *
- * Copyright (c) Morgan McGuire and Williams College, 2006
- * All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * SPDX-License-Identifier: BSD-2-Clause
+ * Copyright 2006 Morgan McGuire and Williams College, All rights reserved.
*/
#ifdef BLUR2
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index b84ddec4973..bf197986687 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2018, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2018 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
index f4014fac41f..3b8642d37d2 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_effect_cavity.c b/source/blender/draw/engines/workbench/workbench_effect_cavity.c
index 04ff2077443..1e80f721298 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_cavity.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_cavity.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
@@ -164,10 +149,10 @@ void workbench_cavity_cache_init(WORKBENCH_Data *data)
grp = DRW_shgroup_create(sh, psl->cavity_ps);
DRW_shgroup_uniform_texture(grp, "normalBuffer", wpd->normal_buffer_tx);
- DRW_shgroup_uniform_block(grp, "samples_coords", wpd->vldata->cavity_sample_ubo);
DRW_shgroup_uniform_block(grp, "world_data", wpd->world_ubo);
if (SSAO_ENABLED(wpd)) {
+ DRW_shgroup_uniform_block(grp, "samples_coords", wpd->vldata->cavity_sample_ubo);
DRW_shgroup_uniform_texture(grp, "depthBuffer", dtxl->depth);
DRW_shgroup_uniform_texture(grp, "cavityJitter", wpd->vldata->cavity_jitter_tx);
}
diff --git a/source/blender/draw/engines/workbench/workbench_effect_dof.c b/source/blender/draw/engines/workbench/workbench_effect_dof.c
index b5f43251a43..6b64a9d7f09 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_dof.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_dof.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2016, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2016 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_effect_outline.c b/source/blender/draw/engines/workbench/workbench_effect_outline.c
index 4f716c5a7bc..1e59e06bf38 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_outline.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_outline.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c
index 0dfc3c4b119..f97db2fcda9 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.c
+++ b/source/blender/draw/engines/workbench/workbench_engine.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2016, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2016 Blender Foundation. */
/** \file
* \ingroup draw_engine
@@ -34,8 +19,8 @@
#include "BKE_paint.h"
#include "BKE_particle.h"
+#include "DNA_curves_types.h"
#include "DNA_fluid_types.h"
-#include "DNA_hair_types.h"
#include "DNA_image_types.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
@@ -419,9 +404,9 @@ void workbench_cache_populate(void *ved, Object *ob)
workbench_shadow_cache_populate(vedata, ob, has_transp_mat);
}
}
- else if (ob->type == OB_HAIR) {
+ else if (ob->type == OB_CURVES) {
int color_type = workbench_color_type_get(wpd, ob, NULL, NULL, NULL);
- workbench_cache_hair_populate(wpd, ob, NULL, NULL, color_type, false, HAIR_MATERIAL_NR);
+ workbench_cache_hair_populate(wpd, ob, NULL, NULL, color_type, false, CURVES_MATERIAL_NR);
}
else if (ob->type == OB_VOLUME) {
if (wpd->shading.type != OB_WIRE) {
diff --git a/source/blender/draw/engines/workbench/workbench_engine.h b/source/blender/draw/engines/workbench/workbench_engine.h
index 8fd427c2683..6f6f2143868 100644
--- a/source/blender/draw/engines/workbench/workbench_engine.h
+++ b/source/blender/draw/engines/workbench/workbench_engine.h
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2016, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2016 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 1b12e29617c..4744c0db6ce 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2018, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2018 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_opaque.c b/source/blender/draw/engines/workbench/workbench_opaque.c
index 708e3e93686..191a2e6d1cc 100644
--- a/source/blender/draw/engines/workbench/workbench_opaque.c
+++ b/source/blender/draw/engines/workbench/workbench_opaque.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_private.h b/source/blender/draw/engines/workbench/workbench_private.h
index 2cf96a8e139..2e310b7f98d 100644
--- a/source/blender/draw/engines/workbench/workbench_private.h
+++ b/source/blender/draw/engines/workbench/workbench_private.h
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2016, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2016 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c
index 125bee87614..72de3fe298a 100644
--- a/source/blender/draw/engines/workbench/workbench_render.c
+++ b/source/blender/draw/engines/workbench/workbench_render.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2016, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2016 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_shader.cc b/source/blender/draw/engines/workbench/workbench_shader.cc
index bbc0bc02b03..9501e653d3b 100644
--- a/source/blender/draw/engines/workbench/workbench_shader.cc
+++ b/source/blender/draw/engines/workbench/workbench_shader.cc
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_shader_shared.h b/source/blender/draw/engines/workbench/workbench_shader_shared.h
index 0bfd5957834..b2e8fa30d85 100644
--- a/source/blender/draw/engines/workbench/workbench_shader_shared.h
+++ b/source/blender/draw/engines/workbench/workbench_shader_shared.h
@@ -1,6 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef GPU_SHADER
-# include "gpu_shader_shared_utils.h"
+# include "GPU_shader_shared_utils.h"
#endif
#define WORKBENCH_SHADER_SHARED_H
diff --git a/source/blender/draw/engines/workbench/workbench_shadow.c b/source/blender/draw/engines/workbench/workbench_shadow.c
index 3386d9b6390..432e571d74b 100644
--- a/source/blender/draw/engines/workbench/workbench_shadow.c
+++ b/source/blender/draw/engines/workbench/workbench_shadow.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_transparent.c b/source/blender/draw/engines/workbench/workbench_transparent.c
index 2f9b85acf31..ffbe7acf6a0 100644
--- a/source/blender/draw/engines/workbench/workbench_transparent.c
+++ b/source/blender/draw/engines/workbench/workbench_transparent.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2020, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2020 Blender Foundation. */
/** \file
* \ingroup draw_engine
diff --git a/source/blender/draw/engines/workbench/workbench_volume.c b/source/blender/draw/engines/workbench/workbench_volume.c
index 9632060d69c..c6f40c5d6bb 100644
--- a/source/blender/draw/engines/workbench/workbench_volume.c
+++ b/source/blender/draw/engines/workbench/workbench_volume.c
@@ -1,20 +1,5 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Copyright 2018, Blender Foundation.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright 2018 Blender Foundation. */
/** \file
* \ingroup draw_engine