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