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-06-05 14:49:45 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-06-05 16:29:00 +0300
commit3caf7ba32de00a3c354a4a13dd078e790d056ebe (patch)
tree4face2b68c14eb1b697b981f40874fc8ff0c7ad5 /source/blender/draw/engines/eevee/eevee_shader.hh
parentb3084d23bf719862866e4c558033595219090a42 (diff)
EEVEE: Lookdev: Add back lighting support
This does not include reference spheres rendering. The approach is a bit different than before. Now we use a `bNodeTree` to control the rendering of lookdev. This generates a `GPUMaterial` that is stored per `Instance`. This way rendering lookdev is just updating the temp light cache using this material as world material. Removing the use of custom shader. This introduces a small hack in order to bind the studiolight hdri after the nodetree glsl parsing. The background display however is still using a custom shader in order to sample the world cubemap with different roughness. The view space option of the studiolight is now faster by using a transform before shading instead of rebaking the lightprobe constantly. This should not have any particular impact on render time.
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_shader.hh')
-rw-r--r--source/blender/draw/engines/eevee/eevee_shader.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_shader.hh b/source/blender/draw/engines/eevee/eevee_shader.hh
index 707950cb54a..8a64155e34c 100644
--- a/source/blender/draw/engines/eevee/eevee_shader.hh
+++ b/source/blender/draw/engines/eevee/eevee_shader.hh
@@ -86,6 +86,8 @@ enum eShaderType {
LIGHTPROBE_FILTER_DIFFUSE,
LIGHTPROBE_FILTER_VISIBILITY,
+ LOOKDEV_BACKGROUND,
+
MOTION_BLUR_GATHER,
MOTION_BLUR_TILE_DILATE,
MOTION_BLUR_TILE_FLATTEN,
@@ -129,6 +131,12 @@ class ShaderModule {
GPUMaterial *world_shader_get(::World *blender_world,
struct bNodeTree *nodetree,
eMaterialDomain domain_type);
+ GPUMaterial *material_shader_get(const char *name,
+ ListBase &materials,
+ struct bNodeTree *nodetree,
+ eMaterialGeometry geometry_type,
+ eMaterialDomain domain_type,
+ bool is_lookdev);
GPUShaderSource material_shader_code_generate(GPUMaterial *mat, const GPUCodegenOutput *codegen);