<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_Thin_%28GLSL-A4K%29</id>
	<title>Vapoursynth Thin (GLSL-A4K) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.selur.net/index.php?action=history&amp;feed=atom&amp;title=Vapoursynth_Thin_%28GLSL-A4K%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_Thin_(GLSL-A4K)&amp;action=history"/>
	<updated>2026-11-19T06:41:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.selur.net/index.php?title=Vapoursynth_Thin_(GLSL-A4K)&amp;diff=549&amp;oldid=prev</id>
		<title>Selur: New filter page (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.selur.net/index.php?title=Vapoursynth_Thin_(GLSL-A4K)&amp;diff=549&amp;oldid=prev"/>
		<updated>2026-11-16T08:50:07Z</updated>

		<summary type="html">&lt;p&gt;New filter page (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;float:right; margin:0 0 1em 1em;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Thin (GLSL-A4K)&amp;#039;&amp;#039;&amp;#039; thins the outlines of anime and cartoons on the GPU with the Anime4K &amp;#039;&amp;#039;Thin&amp;#039;&amp;#039; shader.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Filtering → Vapoursynth → Line&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[File:Vapoursynth_GLSLThin.png|none|Thin (GLSL-A4K) controls in Hybrid]]&lt;br /&gt;
&lt;br /&gt;
== What it does ==&lt;br /&gt;
The shader computes an edge gradient of the luma (Sobel plus Gaussian) and warps the picture towards the edges, which makes lines narrower. The warp can run several times. Three variants trade quality for GPU time.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* vs-placebo (libplacebo) and a GPU with Vulkan support.&lt;br /&gt;
* The GLSL shader folder in Hybrid&amp;#039;s VapourSynth plugins; without it the filter is locked.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Control !! Parameter !! Range / values !! Hybrid default !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| Strength || STRENGTH || 0.01 – 100 || 0.6 || Warp strength per iteration; higher gives thinner lines, past a point they visibly bend. Scaled with the picture height relative to 1080p.&lt;br /&gt;
|-&lt;br /&gt;
| Iterations || ITERATIONS || 1 – 100 || 1 || Number of warp passes; lower Strength with more iterations is cleaner but slower.&lt;br /&gt;
|-&lt;br /&gt;
| Speed || – || VeryFast, Fast, HQ || VeryFast || Shader variant: VeryFast and Fast compute the gradient at reduced resolution, HQ at full resolution with the largest kernel.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Default settings on a 10-bit YUV 4:2:0 source (640x356):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# adjusting color space from YUV420P10 to YUV444P16 for vsGLSLThinLine&lt;br /&gt;
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16)&lt;br /&gt;
# Line thinning using GLSL Anime4K-Thin&lt;br /&gt;
with open(&amp;quot;F:/Hybrid/64bit/vsfilters/GLSL/parameterized/Anime4K_Thin_VeryFast.glsl&amp;quot;) as glslf:&lt;br /&gt;
  glsl = glslf.read()&lt;br /&gt;
glsl = glsl.replace(&amp;#039;#define STRENGTH 0.6&amp;#039;, &amp;#039;#define STRENGTH 0.6&amp;#039;)&lt;br /&gt;
glsl = glsl.replace(&amp;#039;#define ITERATIONS 1&amp;#039;, &amp;#039;#define ITERATIONS 1&amp;#039;)&lt;br /&gt;
clip = core.placebo.Shader(clip, shader_s=glsl, width=clip.width, height=clip.height, matrix=1)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How Hybrid calls it ==&lt;br /&gt;
* The clip is converted to YUV 4:4:4 16 bit, the only format the shader filter accepts; the output stays in that format and size.&lt;br /&gt;
* Hybrid loads the shader file of the chosen Speed, writes Strength and Iterations into the shader text and runs it with the input width and height and the clip&amp;#039;s color matrix.&lt;br /&gt;
* Both values are always written. They are not scaled to the bit depth.&lt;br /&gt;
* Thin (GLSL-A4K) also offers the [[Vapoursynth common filter options|common options]] (Masked, ApplyOnlyTo, Merge, OnRegion, Gimmick).&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
=== Anime4K ===&lt;br /&gt;
Anime4K by bloc97 is an open-source (MIT) collection of real-time shaders for anime, written mainly for mpv; Hybrid uses the v3.2 &amp;#039;&amp;#039;Thin&amp;#039;&amp;#039; shaders. The project lists Thin as an experimental shader, based on the idea that thinner lines look sharper. Related shaders: [[Vapoursynth Darken (GLSL-A4K)|Darken (GLSL-A4K)]] and [[Vapoursynth Deblur (GLSL-A4K)|Deblur (GLSL-A4K)]].&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* [https://github.com/bloc97/Anime4K Anime4K]&lt;br /&gt;
* [https://github.com/sgt0/vs-placebo vs-placebo README]&lt;br /&gt;
* Hybrid&amp;#039;s tooltips&lt;br /&gt;
&lt;br /&gt;
[[Category:Vapoursynth Filters]]&lt;/div&gt;</summary>
		<author><name>Selur</name></author>
	</entry>
</feed>