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:
authorBrecht Van Lommel <brecht>2020-03-11 16:58:19 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-03-11 16:59:05 +0300
commitb9f6d033beecd75398be14419d37d8aab0609812 (patch)
treeb2385a92388dfb1d17a99a72dd442bc5bc38de85 /source/blender/draw/intern/draw_manager_shader.c
parente1e772a80243f3c279fcd076c8311301e8885d41 (diff)
Eevee: internal support for arbitrary number of volume grids
This has no user visible impact yet since smoke volumes only support a fixed set of attributes, but will become important with the new volume object. For GPU shader compilation, volume grids are now handled separately from image textures. They are somewhere between a vertex attribute and an image texture, basically an attribute that is stored as a texture. Differential Revision: https://developer.blender.org/D6952
Diffstat (limited to 'source/blender/draw/intern/draw_manager_shader.c')
-rw-r--r--source/blender/draw/intern/draw_manager_shader.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_manager_shader.c b/source/blender/draw/intern/draw_manager_shader.c
index 9c34cdbac3b..ed05fb85dc9 100644
--- a/source/blender/draw/intern/draw_manager_shader.c
+++ b/source/blender/draw/intern/draw_manager_shader.c
@@ -356,7 +356,7 @@ GPUShader *DRW_shader_create_3d_depth_only(eGPUShaderConfig sh_cfg)
GPUMaterial *DRW_shader_find_from_world(World *wo,
const void *engine_type,
- int options,
+ const int options,
bool deferred)
{
GPUMaterial *mat = GPU_material_from_nodetree_find(&wo->gpumaterial, engine_type, options);
@@ -372,7 +372,7 @@ GPUMaterial *DRW_shader_find_from_world(World *wo,
GPUMaterial *DRW_shader_find_from_material(Material *ma,
const void *engine_type,
- int options,
+ const int options,
bool deferred)
{
GPUMaterial *mat = GPU_material_from_nodetree_find(&ma->gpumaterial, engine_type, options);
@@ -389,7 +389,8 @@ GPUMaterial *DRW_shader_find_from_material(Material *ma,
GPUMaterial *DRW_shader_create_from_world(struct Scene *scene,
World *wo,
const void *engine_type,
- int options,
+ const int options,
+ const bool is_volume_shader,
const char *vert,
const char *geom,
const char *frag_lib,
@@ -409,6 +410,7 @@ GPUMaterial *DRW_shader_create_from_world(struct Scene *scene,
&wo->gpumaterial,
engine_type,
options,
+ is_volume_shader,
vert,
geom,
frag_lib,
@@ -426,7 +428,8 @@ GPUMaterial *DRW_shader_create_from_world(struct Scene *scene,
GPUMaterial *DRW_shader_create_from_material(struct Scene *scene,
Material *ma,
const void *engine_type,
- int options,
+ const int options,
+ const bool is_volume_shader,
const char *vert,
const char *geom,
const char *frag_lib,
@@ -446,6 +449,7 @@ GPUMaterial *DRW_shader_create_from_material(struct Scene *scene,
&ma->gpumaterial,
engine_type,
options,
+ is_volume_shader,
vert,
geom,
frag_lib,