{"id":13731696,"url":"https://github.com/tyt2y3/vaserenderer","last_synced_at":"2025-09-07T22:36:03.462Z","repository":{"id":9374948,"uuid":"11232379","full_name":"tyt2y3/vaserenderer","owner":"tyt2y3","description":"VASE renderer is a polyline and curve renderer on OpenGL.","archived":false,"fork":false,"pushed_at":"2023-11-05T12:32:58.000Z","size":8106,"stargazers_count":350,"open_issues_count":0,"forks_count":39,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-06T05:17:29.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"tyt2y3.github.io/vaser-web","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyt2y3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2013-07-07T11:15:29.000Z","updated_at":"2025-04-03T03:51:48.000Z","dependencies_parsed_at":"2024-01-31T02:09:35.375Z","dependency_job_id":"19f37022-73c3-41a2-83e2-09af92cfba49","html_url":"https://github.com/tyt2y3/vaserenderer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyt2y3%2Fvaserenderer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyt2y3%2Fvaserenderer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyt2y3%2Fvaserenderer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyt2y3%2Fvaserenderer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyt2y3","download_url":"https://codeload.github.com/tyt2y3/vaserenderer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247543593,"owners_count":20955865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:36.246Z","updated_at":"2025-04-06T20:12:26.323Z","avatar_url":"https://github.com/tyt2y3.png","language":"C++","funding_links":[],"categories":["Graphics"],"sub_categories":[],"readme":"\u003e This project was started many, many years ago. The C++ implementation is a pre-OpenGL 3 relic. The C# implementation is more \"modern\" and uses fragment shader, which is better.\n\n\u003cbody\u003e\n\t\u003cdiv class='vaser_wrap'\u003e\n\t\t\u003cdiv class='article_name'\u003e\n\t\t\t\u003ch1\u003eVASE\u003cspan style='line-height:40px;'\u003e renderer\u003c/span\u003e\u003c/h1\u003e\n\t\t\u003c/div\u003e\n\u003ch2\u003eAbout\u003c/h2\u003e\n\u003cp\u003eVASE renderer version 0.42 (VASEr 0.42) is a tessellating library for rendering high quality 2D vector graphics. It is an attempt to address unconventional features in 2d graphics. It is intended for OpenGL 1.1+, but much of the code is API independent C++.\u003c/p\u003e\n\n\u003ch2\u003eUnconventional features\u003c/h2\u003e\n\u003ch3\u003ePer vertex coloring and weighting\u003c/h3\u003e\n\u003cdiv style='position:relative; overflow:hidden; height:220px; float:left;'\u003e\u003cimg style='position:relative; top:-40px;' src='docs/sample_images/polyline_3.png' /\u003e\u003c/div\u003e\n\u003cbr\u003e\u003cbr\u003eVASEr revolutionarily lets you control the color and thickness at each vertex for a polyline. This feature is unseen on any commonly available graphics library.\n\t\u003cdiv style='clear:both'\u003e\u003c/div\u003e\n\n\u003ch3\u003eLinear gradient along curve\u003c/h3\u003e\n\u003cdiv style='position:relative; overflow:hidden; height:200px; float:right;'\u003e\u003cimg style='position:relative; top:-60px;' src='docs/sample_images/bezier_2.png' /\u003e\u003c/div\u003e\n\u003cbr\u003eA similar feature is also available to curves. Because there are so many vertices on a curve that it is impractical to specify data on each point, VASEr lets you define a linear gradient of color and thickness along the length of a curve, giving you two more degrees of freedom.\n\t\u003cdiv style='clear:both'\u003e\u003c/div\u003e\n\n\u003ch3\u003eFeathering for brush like effects\u003c/h3\u003e\n\u003cimg src='docs/sample_images/bezier_3.png' style='float:left;' /\u003e\n\u003cimg src='docs/sample_images/bezier_4.png' style='float:left;' /\u003e\n\u003cimg src='docs/sample_images/bezier_5.png' style='float:left;' /\u003e\n\u003cbr\u003eVASEr must use an outsetting polygon anyway, so it is free (as in computational cost) to scale it up, and it is called feathering in VASEr.\n\t\u003cdiv style='clear:both'\u003e\u003c/div\u003e\n\n\u003ch3\u003ePremium quality anti aliasing\u003c/h3\u003e\n\u003cdiv style='background:#333; margin: 10px; border:5px solid #AAA; float:left; height: 150px; overflow:hidden;'\u003e\n\u003cimg src='docs/sample_images/fade_intro_1.png' /\u003e\n\u003cimg src='docs/sample_images/fade_intro_2.png' /\u003e\n\u003cimg src='docs/sample_images/fade_intro_3.png' /\u003e\n\u003cimg src='docs/sample_images/fade_intro_4.png' /\u003e\n\u003c/div\u003e\n\u003cbr\u003e\u003cbr\u003eFrom left to right: raw polygon without anti aliasing, \u003cbr\u003e\nanti aliased with outset fade polygon, \u003cbr\u003e\nexaggerated outsetting polygon with wireframe, \u003cbr\u003e\nsame as left without wireframe.\n\t\u003cdiv style='clear:both'\u003e\u003c/div\u003e\n\u003cp\u003eOutset-fade polygon is the high quality, fast, portable, consistent and hassle free technique for anti aliasing. The difficulties are to calibrate the outsetting distance to achieve believable result and to perform tedious tessellation. Luckily VASEr did this for you.\u003c/p\u003e\n\u003cp\u003eBelow are line rendering comparison between VASEr and Cairo and AGG:\u003c/p\u003e\n\u003cdiv\u003e\n\t\u003cdiv id='ab_va'\u003eVASEr\u003cbr\u003e\u003cimg src='docs/sample_images/ab_vaser_line_thickness1.png' /\u003e\u003c/div\u003e\n\t\u003cdiv id='ab_ca' style='display:none;'\u003eCairo\u003cbr\u003e\u003cimg src='docs/sample_images/ab_cairo_line_thickness.png' /\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\t\u003cdiv id='a_agg' style='display:none;'\u003eAGG\u003cbr\u003e\u003cimg src='docs/sample_images/agg_line_thickness.png' /\u003e\u003c/div\u003e\n\u003c/div\u003e\n\u003cp\u003eThere is small difference, but it is more a matter of taste than correctness. In terms of clarity VASEr is like between Cairo and AGG, and VASEr is the most crisp among the three. VASEr even do pixel alignment to 1px completely horizontal or vertical lines.\u003c/p\u003e\n\u003cp\u003eThe flaw is, because the outsetting distance is resolution dependent, while the triangulation is unaffected under rotational transformation, fidelity will be lost under scale and sheer.\u003c/p\u003e\n\n\u003ch2\u003eArticles\u003c/h2\u003e\n\n+ \u003ca href='http://artgrammer.blogspot.com/2011/07/drawing-polylines-by-tessellation.html' target='_blank'\u003eDrawing polylines by tessellation.\u003c/a\u003e\u003cbr\u003e\n+ \u003ca href='http://artgrammer.blogspot.hk/2011/05/drawing-nearly-perfect-2d-line-segments.html'\u003eDrawing nearly perfect 2D line segments in OpenGL\u003c/a\u003e\n\n\u003ch2\u003eRelated Work\u003c/h2\u003e\n\u003cul\u003e\n\u003cli\u003eIf you only need uniform color \u0026 width and only wanted a clean mesh, you can try out \u003ca href=\"https://github.com/CrushedPixel/Polyline2D\"\u003ePolyline2D\u003c/a\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003ch2\u003eAcknowledgement\u003c/h2\u003e\n\u003cp\u003eBezier curve subdivision code is extracted from Anti-Grain Geometry V2.4 by Maxim Shemanarev (McSeem).\u003c/p\u003e\n\u003cp\u003eThe open-source graphics library AGG inspired me a lot during my teenage.\u003c/p\u003e\n\n\u003c/body\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyt2y3%2Fvaserenderer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyt2y3%2Fvaserenderer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyt2y3%2Fvaserenderer/lists"}