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:
Diffstat (limited to 'source/blender/draw/modes/shaders/object_particle_prim_vert.glsl')
-rw-r--r--source/blender/draw/modes/shaders/object_particle_prim_vert.glsl10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl b/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl
index 2483ca5b2d2..ff16f61b884 100644
--- a/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl
+++ b/source/blender/draw/modes/shaders/object_particle_prim_vert.glsl
@@ -5,7 +5,7 @@ uniform mat4 ModelViewMatrix;
uniform mat4 ProjectionMatrix;
uniform int screen_space;
uniform float pixel_size;
-uniform float draw_size;
+uniform int draw_size;
in vec3 pos;
in vec4 rot;
@@ -36,7 +36,13 @@ void main()
gl_Position = ProjectionMatrix * gl_Position;
}
else {
- gl_Position = ModelViewProjectionMatrix * vec4(pos + rotate(inst_pos * pix_size * draw_size, rot), 1.0);
+ int size = draw_size;
+
+ if (axis > -1) {
+ size *= 2;
+ }
+
+ gl_Position = ModelViewProjectionMatrix * vec4(pos + rotate(inst_pos * pix_size * size, rot), 1.0);
}
finalAxis = axis;