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:
authorAntonioya <blendergit@gmail.com>2018-09-30 19:26:50 +0300
committerAntonioya <blendergit@gmail.com>2018-09-30 19:26:50 +0300
commitda032bdf23d806c6959c4c4c24d6b66e94e54992 (patch)
treed7c1620755374f2dc68bd0f89b25172f672c841c /source/blender
parent5c184c4fecc4b0142727b160cbb5da0fc945e011 (diff)
GP: Cleanup and remove old debug code
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_shadow_prepare_frag.glsl29
1 files changed, 5 insertions, 24 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_shadow_prepare_frag.glsl b/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_shadow_prepare_frag.glsl
index 873f70eb1ab..e2bd725ec0d 100644
--- a/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_shadow_prepare_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/fx/gpencil_fx_shadow_prepare_frag.glsl
@@ -54,6 +54,9 @@ void main()
float dx = (ProjectionMatrix[3][3] == 0.0) ? (noffset[0] / (nloc.z * defaultpixsize)) : (noffset[0] / defaultpixsize);
float dy = (ProjectionMatrix[3][3] == 0.0) ? (noffset[1] / (nloc.z * defaultpixsize)) : (noffset[1] / defaultpixsize);
+ float cosv = cos(rotation);
+ float sinv = sin(rotation);
+
/* move point to new coords system */
vec2 tpos = vec2(uv.x, uv.y) - loc2d;
@@ -65,8 +68,8 @@ void main()
tpos.y *= 1.0 / scale[1];
/* rotation */
- tpos.x = (tpos.x * cos(rotation)) - (tpos.y * sin(rotation));
- tpos.y = (tpos.x * sin(rotation)) + (tpos.y * cos(rotation));
+ tpos.x = (tpos.x * cosv) - (tpos.y * sinv);
+ tpos.y = (tpos.x * sinv) + (tpos.y * cosv);
/* back to original coords system */
vec2 texpos = tpos + loc2d;
@@ -93,28 +96,6 @@ void main()
if (src_pixel.a == 0.0f) {
discard;
}
-
-
-
- // /* check inside viewport */
- // else if ((uv.x - dx < 0) || (uv.x - dx > Viewport[0])) {
- // discard;
- // }
- // else if ((uv.y - dy < 0) || (uv.y - dy > Viewport[1])) {
- // discard;
- // }
- // /* pixel is equal to mask color, keep */
- // else if (src_pixel.rgb == mask_color.rgb) {
- // discard;
- // }
- // else {
- // if ((src_pixel.a > 0) && (offset_pixel.a > 0)) {
- // discard;
- // }
- // else {
- // outcolor = vec4(rim_color, 1.0);
- // }
- // }
gl_FragDepth = stroke_depth;
FragColor = outcolor;