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>2017-02-09 22:55:31 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-02-11 22:36:20 +0300
commite05800d23b40a6eda0b154de934f8f8c6e1b3438 (patch)
treedccd0b12a4057a7d288d7e9bbad200cdc428118d /source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl
parent1abd2f279dfe87c2d1d648b9780f25697a9b2c52 (diff)
Clay Engine: converted Empties to the new instancing method
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl
new file mode 100644
index 00000000000..8ea6a979873
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_instance_variying_size_variying_color_vert.glsl
@@ -0,0 +1,16 @@
+
+uniform mat4 ViewProjectionMatrix;
+
+in vec3 pos;
+/* Instance attrib */
+in mat4 InstanceModelMatrix;
+in vec3 color;
+in float size;
+
+flat out vec4 finalColor;
+
+void main()
+{
+ gl_Position = ViewProjectionMatrix * InstanceModelMatrix * vec4(pos * size, 1.0);
+ finalColor = vec4(color, 1.0);
+}