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/gpu/shaders/gpu_shader_gpencil_stroke_vert.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert.glsl14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert.glsl b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert.glsl
index 16e12b2989e..07b4ae52110 100644
--- a/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_gpencil_stroke_vert.glsl
@@ -1,4 +1,3 @@
-#ifndef USE_GPU_SHADER_CREATE_INFO
uniform mat4 ModelViewProjectionMatrix;
uniform mat4 ProjectionMatrix;
@@ -13,21 +12,22 @@ in float thickness;
out vec4 finalColor;
out float finalThickness;
-#endif
-float defaultpixsize = gpencil_stroke_data.pixsize * (1000.0 / gpencil_stroke_data.pixfactor);
+#define TRUE 1
+
+float defaultpixsize = pixsize * (1000.0 / pixfactor);
void main(void)
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
- geometry_in.finalColor = color;
+ finalColor = color;
- if (gpencil_stroke_data.keep_size) {
- geometry_in.finalThickness = thickness;
+ if (keep_size == TRUE) {
+ finalThickness = thickness;
}
else {
float size = (ProjectionMatrix[3][3] == 0.0) ? (thickness / (gl_Position.z * defaultpixsize)) :
(thickness / defaultpixsize);
- geometry_in.finalThickness = max(size * gpencil_stroke_data.objscale, 1.0);
+ finalThickness = max(size * objscale, 1.0);
}
}