diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-30 14:55:13 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-30 17:44:58 +0300 |
commit | da741013a1e1b2e7c4f61a9486588253a457afd2 (patch) | |
tree | b491c53eadf1fcc07e2a326d000b1c94fbf07f48 /source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl | |
parent | 55401fbb3d0daa82c999e388c2b5b87e7113b091 (diff) |
EEVEE: GLSL refactor/cleanup
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code
complexity and duplication.
- split bsdf_common_lib.glsl into multiple sub library which are now shared
with other engines.
- the surface shader code is now more organised and have its own files.
- change default world to use a material nodetree and make lookdev shader
more clear.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D8306
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl b/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl index 96b891c929f..30cda401284 100644 --- a/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl +++ b/source/blender/draw/engines/eevee/shaders/volumetric_geom.glsl @@ -1,4 +1,6 @@ +#pragma BLENDER_REQUIRE(common_view_lib.glsl) + #ifdef MESH_SHADER /* TODO tight slices */ layout(triangles) in; @@ -12,12 +14,16 @@ in vec4 vPos[]; flat out int slice; +RESOURCE_ID_VARYING + #ifdef MESH_SHADER /* TODO tight slices */ void main() { gl_Layer = slice = int(vPos[0].z); + PASS_RESOURCE_ID + # ifdef USE_ATTR pass_attr(0); # endif @@ -48,6 +54,8 @@ void main() { gl_Layer = slice = int(vPos[0].z); + PASS_RESOURCE_ID + # ifdef USE_ATTR pass_attr(0); # endif |