Blender Git Commit Log
Git Commits -> Revision 7d36a00
Revision 7d36a00 by Clément Foucault (eevee-rewrite, temp-eevee-gpencil-rewrite, viewport-compositor) May 22, 2021, 00:55 (GMT) |
GPUNodeTree: Add weight tree inversion This constructs a "mirror" nodetree that feeds the closure "shader" nodes with their respective final weight. The tree is mirrored using simple math nodes. This is quite messy but this is the only way to proceed without introducing special nodes. The other issue with this method is that inputs are all uniforms even for unplugged socket on temporary math nodes with add bloat to the shader uniform buffer structure. Only the part relevant to the weighting is duplicated. Other connexions with the shading tree are reuse. All shader nodes are updated to receive a `Weight` hidden parameter. The original shader mixing tree is preserve to let the choice of using either way to weight the output. For now this is only done for the output nodes. This will need to be extended to Closure to RGBA sub-tree. |
Commit Details:
Full Hash: 7d36a00d140e5e8d73326ea163d1d1de76a255d1
Parent Commit: 9a857d8
Lines Changed: +333, -76
42 Modified Paths:
/source/blender/draw/engines/eevee/shaders/eevee_closure_lib.glsl (+6, -31) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl (+2, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_diffuse.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_emission.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_glass.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_glossy.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_holdout.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_mix_shader.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl (+2, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_refraction.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_subsurface_scattering.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_toon.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_translucent.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_transparent.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_velvet.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_absorption.glsl (+1, -6) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_principled.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_scatter.glsl (+2, -6) (Diff)
/source/blender/nodes/shader/nodes/node_shader_background.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c (+3, -6) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c (+2, -6) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_emission.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_holdout.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_absorption.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_principled.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_scatter.c (+1, -0) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+276, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_add_shader.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl (+2, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_background.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_diffuse.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_eevee_specular.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_emission.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_glass.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_glossy.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_holdout.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_mix_shader.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_principled.glsl (+2, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_refraction.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_subsurface_scattering.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_toon.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_translucent.glsl (+1, -1) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_transparent.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_velvet.glsl (+2, -2) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_absorption.glsl (+1, -6) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_principled.glsl (+1, -0) (Diff)
/source/blender/gpu/shaders/material/gpu_shader_material_volume_scatter.glsl (+2, -6) (Diff)
/source/blender/nodes/shader/nodes/node_shader_background.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c (+3, -6) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c (+2, -6) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_hair.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_hair_principled.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_principled.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_refraction.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_eevee_specular.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_emission.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_holdout.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_absorption.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_principled.c (+1, -0) (Diff)
/source/blender/nodes/shader/nodes/node_shader_volume_scatter.c (+1, -0) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+276, -2) (Diff)