Blender Git Commit Log

Git Commits -> Revision 4ea9f42

October 12, 2020, 10:19 (GMT)
Materials: support the custom uniform attributes in Eevee.

The attributes are provided to the shader via a UBO indexed with
resource_id, similar to the existing Object Info data. Unlike that,
however, it is necessary to maintain a separate buffer for every
requested combination of attributes.

This is done using a hash table with the attribute set as the key,
as it is not inconceivable that technically different materials may
use the same set of attributes. In addition, in order to minimize
wasted memory, a sparse UBO pool is implemented, so that chunks that
don't require that set of data don't have to allocate any memory.

Differential Revision: https://developer.blender.org/D2057

Commit Details:

Full Hash: 4ea9f4259c6247ef4956a17baa9a699d6dbaf5f3
Parent Commit: b364be8
Lines Changed: +684, -3

19 Modified Paths:

/intern/cycles/blender/blender_object.cpp (+2, -0) (Diff)
/source/blender/blenlib/BLI_bitmap.h (+1, -1) (Diff)
/source/blender/draw/DRW_engine.h (+2, -0) (Diff)
/source/blender/draw/intern/draw_instance_data.c (+367, -0) (Diff)
/source/blender/draw/intern/draw_instance_data.h (+22, -0) (Diff)
/source/blender/draw/intern/draw_manager.c (+5, -0) (Diff)
/source/blender/draw/intern/draw_manager.h (+16, -0) (Diff)
/source/blender/draw/intern/draw_manager_data.c (+22, -0) (Diff)
/source/blender/draw/intern/draw_manager_exec.c (+18, -0) (Diff)
/source/blender/gpu/GPU_material.h (+27, -0) (Diff)
/source/blender/gpu/GPU_shader.h (+3, -0) (Diff)
/source/blender/gpu/GPU_uniform_buffer.h (+1, -0) (Diff)
/source/blender/gpu/GPU_viewport.h (+2, -0) (Diff)
/source/blender/gpu/intern/gpu_codegen.c (+17, -0) (Diff)
/source/blender/gpu/intern/gpu_material.c (+6, -0) (Diff)
/source/blender/gpu/intern/gpu_node_graph.c (+149, -0) (Diff)
/source/blender/gpu/intern/gpu_node_graph.h (+10, -0) (Diff)
/source/blender/gpu/intern/gpu_viewport.c (+3, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_attribute.c (+11, -2) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021