Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/gpencil/shaders/gpencil_stroke_geom.glsl
| Show First 20 Lines • Show All 188 Lines • ▼ Show 20 Lines | void main(void) | ||||
| if (finaluvdata[2].x > 1.0) { | if (finaluvdata[2].x > 1.0) { | ||||
| if ((finaluvdata[1].y != 0.0) && (finaluvdata[2].y != 0.0)) { | if ((finaluvdata[1].y != 0.0) && (finaluvdata[2].y != 0.0)) { | ||||
| float d = ceil(finaluvdata[2].x) - 1.0; | float d = ceil(finaluvdata[2].x) - 1.0; | ||||
| if (floor(d / 2.0) == (d / 2.0)) { | if (floor(d / 2.0) == (d / 2.0)) { | ||||
| y_a = 1.0; | y_a = 1.0; | ||||
| y_b = 0.0; | y_b = 0.0; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* generate the triangle strip */ | /* generate the triangle strip */ | ||||
| uvfac = vec2(0.0, 0.0); | uvfac = vec2(0.0, 0.0); | ||||
| mTexCoord = (color_type == GPENCIL_COLOR_SOLID) ? vec2(0, 0) : vec2(finaluvdata[1].x, y_a); | mTexCoord = (color_type == GPENCIL_COLOR_SOLID) ? vec2(0, 0) : vec2(finaluvdata[1].x, y_a); | ||||
| mColor = finalColor[1]; | mColor = finalColor[1]; | ||||
| gl_Position = vec4((sp1 + length_a * miter_a) / Viewport, getZdepth(P1), 1.0); | gl_Position = vec4((sp1 + length_a * miter_a) / Viewport, getZdepth(P1), 1.0); | ||||
| EmitVertex(); | EmitVertex(); | ||||
| mTexCoord = (color_type == GPENCIL_COLOR_SOLID) ? vec2(0, 1) : vec2(finaluvdata[1].x, y_b); | mTexCoord = (color_type == GPENCIL_COLOR_SOLID) ? vec2(0, 1) : vec2(finaluvdata[1].x, y_b); | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||