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:
authorClément Foucault <foucault.clem@gmail.com>2021-05-20 22:09:28 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-05-21 00:51:52 +0300
commit6dc49ec9924b21af4e67f30150394138cb17754b (patch)
tree24658d842531c91de3c6360222608cd0364d9db2 /source/blender/draw/engines/eevee/eevee_instance.cc
parent0c71240f14e6016728a9942c079d357bc9eb4b41 (diff)
GPU/EEVEE: Refactor codegen and nodetree support
This is the first step towards the new evaluation scheme of EEVEE closures. This commit contains: - Removal of GPU_SOURCE_BUILTIN type, prefering global instead. This avoid many boilerplate code since most of the old builtins are now datas that are always present (i.e: view matrices, normals). - Rewritting of codegen in C++ to use `std::stringstream`. - Added a callback to let engine decide what to do with codegen code. This remove a lot of needs for defines because of code order dependency. The engine can insert the nodetree code in custom ways to create advance effects (i.e: add displacement or vertex lighting). Engine now returns final shader strings. - Closure nodes evaluation replacment is a placeholder for now.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_instance.cc')
-rw-r--r--source/blender/draw/engines/eevee/eevee_instance.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_instance.cc b/source/blender/draw/engines/eevee/eevee_instance.cc
index 8cf3931b005..fad6b1d6115 100644
--- a/source/blender/draw/engines/eevee/eevee_instance.cc
+++ b/source/blender/draw/engines/eevee/eevee_instance.cc
@@ -158,7 +158,7 @@ void Instance::object_sync(Object *ob)
GPUBatch **mat_geom = DRW_cache_object_surface_material_get(
ob, material_array.gpu_materials.data(), material_array.gpu_materials.size());
- for (auto i : IndexRange(ob->totcol)) {
+ for (auto i : material_array.gpu_materials.index_range()) {
if (mat_geom[i] == nullptr) {
continue;
}