diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 19:07:43 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-03-11 19:12:16 +0300 |
commit | c476c36e400883d929a7149def8dcb6ad6157a86 (patch) | |
tree | c19c43ad1ed82f333c08bee7d2096024fed812dd /source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl | |
parent | f01bc597a8e6bf5df19f1af0c422918c96b25e41 (diff) |
Workbench Simplification Refactor
This patch is (almost) a complete rewrite of workbench engine.
The features remain unchanged but the code quality is greatly improved.
Hair shading is brighter but also more correct.
This also introduce the concept of `DRWShaderLibrary` to make a simple
include system inside the GLSL files.
Differential Revision: https://developer.blender.org/D7060
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl b/source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl index aa1d437c307..9e1527a9e7f 100644 --- a/source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl +++ b/source/blender/gpu/shaders/gpu_shader_common_obinfos_lib.glsl @@ -1,7 +1,8 @@ -/* Need to be included after common_view_lib.glsl for resource_id. */ +#pragma BLENDER_REQUIRE(common_view_lib.glsl) + #ifndef GPU_OBINFOS_UBO -#define GPU_OBINFOS_UBO +# define GPU_OBINFOS_UBO struct ObjectInfos { vec4 drw_OrcoTexCoFactors[2]; vec4 drw_ObjectColor; @@ -13,7 +14,7 @@ layout(std140) uniform infoBlock /* DRW_RESOURCE_CHUNK_LEN = 512 */ ObjectInfos drw_infos[512]; }; -#define OrcoTexCoFactors (drw_infos[resource_id].drw_OrcoTexCoFactors) -#define ObjectInfo (drw_infos[resource_id].drw_Infos) -#define ObjectColor (drw_infos[resource_id].drw_ObjectColor) +# define OrcoTexCoFactors (drw_infos[resource_id].drw_OrcoTexCoFactors) +# define ObjectInfo (drw_infos[resource_id].drw_Infos) +# define ObjectColor (drw_infos[resource_id].drw_ObjectColor) #endif |