diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 15:59:52 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-15 20:51:55 +0300 |
commit | 24c846b2b4f1617ebfeb799045d284a9e24fa9ed (patch) | |
tree | 45fc3e78dc247a005fc9a5c25463cb8f21302eea /source/blender/draw/engines | |
parent | 987d14a3b2427e9d1c136ddbea0a2eb9b25170f6 (diff) |
GPU: Shader: Move IN_OUT define to shader GPU_shader_create_ex
This adds the opportunity to use it in multiple places.
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl | 32 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/shaders/workbench_shader_interface_lib.glsl | 6 |
2 files changed, 14 insertions, 24 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index 1e75f6dd5bb..36fe9df9e5a 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -137,24 +137,20 @@ void blend_mode_output( } } -#ifdef GPU_VERTEX_SHADER -# define IN_OUT out -#else -# define IN_OUT in -#endif - -/* Shader interface. */ -IN_OUT vec4 finalColorMul; -IN_OUT vec4 finalColorAdd; -IN_OUT vec3 finalPos; -IN_OUT vec2 finalUvs; -noperspective IN_OUT float strokeThickness; -noperspective IN_OUT float strokeHardeness; -flat IN_OUT vec2 strokeAspect; -flat IN_OUT vec2 strokePt1; -flat IN_OUT vec2 strokePt2; -flat IN_OUT int matFlag; -flat IN_OUT float depth; +IN_OUT ShaderStageInterface +{ + vec4 finalColorMul; + vec4 finalColorAdd; + vec3 finalPos; + vec2 finalUvs; + noperspective float strokeThickness; + noperspective float strokeHardeness; + flat vec2 strokeAspect; + flat vec2 strokePt1; + flat vec2 strokePt2; + flat int matFlag; + flat float depth; +}; #ifdef GPU_FRAGMENT_SHADER diff --git a/source/blender/draw/engines/workbench/shaders/workbench_shader_interface_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_shader_interface_lib.glsl index 8e2f7ba4735..6bfa351aeb0 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_shader_interface_lib.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_shader_interface_lib.glsl @@ -1,10 +1,4 @@ -#ifdef GPU_VERTEX_SHADER -# define IN_OUT out -#else -# define IN_OUT in -#endif - IN_OUT ShaderStageInterface { vec3 normal_interp; |