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>2022-01-26 14:46:37 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-01-26 14:46:37 +0300
commit5b299e5999e2b59e30edd4e770f64aa700e482d6 (patch)
tree17052358b339e20c44ca942e62b735ef63b23f88 /source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl
parent9bce134e56c28045aee37080f5c5b6622a07927b (diff)
D13910: Workbench: Port shaders to use GPUShaderCreateInfo
Also adds a few things to GPUShader for easily create shaders. Heavy usage of macros to compose the createInfo and avoid duplications and copy paste bugs. This makes the link between the shader request functions (in workbench_shader.cc) and the actual createInfo a bit obscure since the names are composed and not searchable. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D13910
Diffstat (limited to 'source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl')
-rw-r--r--source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl48
1 files changed, 0 insertions, 48 deletions
diff --git a/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl b/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl
deleted file mode 100644
index c784c8b2db9..00000000000
--- a/source/blender/draw/engines/workbench/shaders/workbench_data_lib.glsl
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#ifndef WORKBENCH_SHADER_SHARED_H
-struct LightData {
- vec4 direction;
- vec4 specular_color;
- vec4 diffuse_color_wrap; /* rgb: diffuse col a: wrapped lighting factor */
-};
-
-struct WorldData {
- vec4 viewport_size;
- vec4 object_outline_color;
- vec4 shadow_direction_vs;
- float shadow_focus;
- float shadow_shift;
- float shadow_mul;
- float shadow_add;
- /* - 16 bytes alignment - */
- LightData lights[4];
- vec4 ambient_color;
-
- int cavity_sample_start;
- int cavity_sample_end;
- float cavity_sample_count_inv;
- float cavity_jitter_scale;
-
- float cavity_valley_factor;
- float cavity_ridge_factor;
- float cavity_attenuation;
- float cavity_distance;
-
- float curvature_ridge;
- float curvature_valley;
- float ui_scale;
- float _pad0;
-
- int matcap_orientation;
- bool use_specular;
- int _pad1;
- int _pad2;
-};
-
-# define viewport_size_inv viewport_size.zw
-
-layout(std140) uniform world_block
-{
- WorldData world_data;
-};
-#endif