From b9f6d033beecd75398be14419d37d8aab0609812 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 11 Mar 2020 14:58:19 +0100 Subject: 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 --- source/blender/draw/intern/draw_manager_shader.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender/draw/intern/draw_manager_shader.c') 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, -- cgit v1.2.3