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:
authorDalai Felinto <dfelinto@gmail.com>2017-01-09 19:58:13 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-01-09 19:58:13 +0300
commit5ed5ed59c36695882ea2b6880abd5cd996fe2416 (patch)
tree60f230d54bc85d491bd1b8af6a4cfeb75bb09ff2 /source/blender/gpu/GPU_shader.h
parente42e1769b36fddf9b0c161bcb2f7c7f2aeb613eb (diff)
Fix T49861: Interlace stereo drawing
This does not address stapling shader in 2.8, though the solution can be similar (own shader, not polutting interlace shader). part of T49043 Reviewers: merwin Differential Revision: https://developer.blender.org/D2440
Diffstat (limited to 'source/blender/gpu/GPU_shader.h')
-rw-r--r--source/blender/gpu/GPU_shader.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index c6e4fb5e73a..394e751ed9b 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -112,6 +112,8 @@ typedef enum GPUBuiltinShader {
GPU_SHADER_3D_IMAGE_MODULATE_ALPHA,
GPU_SHADER_3D_IMAGE_RECT_MODULATE_ALPHA,
GPU_SHADER_3D_IMAGE_DEPTH,
+ /* stereo 3d */
+ GPU_SHADER_2D_IMAGE_INTERLACE,
/* points */
GPU_SHADER_2D_POINT_FIXED_SIZE_UNIFORM_COLOR,
GPU_SHADER_2D_POINT_UNIFORM_SIZE_UNIFORM_COLOR_SMOOTH,
@@ -128,6 +130,16 @@ typedef enum GPUBuiltinShader {
GPU_NUM_BUILTIN_SHADERS /* (not an actual shader) */
} GPUBuiltinShader;
+/* Keep these in sync with:
+ * gpu_shader_image_interlace_frag.glsl
+ * gpu_shader_image_rect_interlace_frag.glsl
+ **/
+typedef enum GPUInterlaceShader {
+ GPU_SHADER_INTERLACE_ROW = 0,
+ GPU_SHADER_INTERLACE_COLUMN = 1,
+ GPU_SHADER_INTERLACE_CHECKER = 2,
+} GPUInterlaceShader;
+
GPUShader *GPU_shader_get_builtin_shader(GPUBuiltinShader shader);
GPUShader *GPU_shader_get_builtin_fx_shader(int effects, bool persp);