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>2022-04-19 13:01:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-04-19 13:09:18 +0300
commitfa3bd17ae87301ca198d16d2dc7d2432548f34f9 (patch)
treec08eb8740784799dd3bf9517f4eb4380bc4e6cab /source/blender/gpu/intern/gpu_node_graph.h
parent1e3f4c70ab56578b8b0e0056870bd17cc118982a (diff)
GPU: Replace `GPUMaterialVolumeGrid` by `GPUMaterialAttribute`
This is to make the codegen and shading nodes object type agnostic. This is essential for flexibility of the engine to use the nodetree as it see fits. The essential volume attributes struct properties are moved to the `GPUMaterialAttribute` which see its final input name set on creation. The binding process is centralized into `draw_volume.cc` to avoid duplicating the code between multiple engines. It mimics the hair attributes process. Volume object grid transforms and other per object uniforms are packed into one UBO per object. The grid transform is now based on object which simplify the matrix preparations. This also gets rid of the double transforms and use object info orco factors for volume objects. Tagging @brecht because he did the initial implementation of Volume Grids.
Diffstat (limited to 'source/blender/gpu/intern/gpu_node_graph.h')
-rw-r--r--source/blender/gpu/intern/gpu_node_graph.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/source/blender/gpu/intern/gpu_node_graph.h b/source/blender/gpu/intern/gpu_node_graph.h
index 024119e1c24..ae472d5b7aa 100644
--- a/source/blender/gpu/intern/gpu_node_graph.h
+++ b/source/blender/gpu/intern/gpu_node_graph.h
@@ -34,8 +34,6 @@ typedef enum eGPUDataSource {
GPU_SOURCE_STRUCT,
GPU_SOURCE_TEX,
GPU_SOURCE_TEX_TILED_MAPPING,
- GPU_SOURCE_VOLUME_GRID,
- GPU_SOURCE_VOLUME_GRID_TRANSFORM,
GPU_SOURCE_FUNCTION_CALL,
} eGPUDataSource;
@@ -48,8 +46,6 @@ typedef enum {
GPU_NODE_LINK_IMAGE,
GPU_NODE_LINK_IMAGE_TILED,
GPU_NODE_LINK_IMAGE_TILED_MAPPING,
- GPU_NODE_LINK_VOLUME_GRID,
- GPU_NODE_LINK_VOLUME_GRID_TRANSFORM,
GPU_NODE_LINK_OUTPUT,
GPU_NODE_LINK_UNIFORM,
GPU_NODE_LINK_DIFFERENTIATE_FLOAT_FN,
@@ -90,8 +86,6 @@ struct GPUNodeLink {
const float *data;
/* GPU_NODE_LINK_COLORBAND */
struct GPUTexture **colorband;
- /* GPU_NODE_LINK_VOLUME_GRID */
- struct GPUMaterialVolumeGrid *volume_grid;
/* GPU_NODE_LINK_OUTPUT */
struct GPUOutput *output;
/* GPU_NODE_LINK_ATTR */
@@ -134,8 +128,6 @@ typedef struct GPUInput {
struct GPUMaterialAttribute *attr;
/* GPU_SOURCE_UNIFORM_ATTR */
struct GPUUniformAttr *uniform_attr;
- /* GPU_SOURCE_VOLUME_GRID | GPU_SOURCE_VOLUME_GRID_TRANSFORM */
- struct GPUMaterialVolumeGrid *volume_grid;
/* GPU_SOURCE_FUNCTION_CALL */
char function_call[64];
};
@@ -170,7 +162,6 @@ typedef struct GPUNodeGraph {
/* Requested attributes and textures. */
ListBase attributes;
ListBase textures;
- ListBase volume_grids;
/* The list of uniform attributes. */
GPUUniformAttrList uniform_attrs;