mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
Overlay the user Shaders/ over the shared one to avoid copying files
This commit is contained in:
22
Data/Sys/Shaders/auto_toon.glsl
Normal file
22
Data/Sys/Shaders/auto_toon.glsl
Normal file
@ -0,0 +1,22 @@
|
||||
uniform sampler2D samp9;
|
||||
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 to_gray = vec4(0.3,0.59,0.11,0);
|
||||
|
||||
float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw));
|
||||
float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw));
|
||||
float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw));
|
||||
float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw));
|
||||
|
||||
float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2);
|
||||
|
||||
float4 color = texture(samp9, uv0).rgba;
|
||||
|
||||
ocol0 = color - vec4(edge, edge, edge, edge) * 12.0;
|
||||
}
|
Reference in New Issue
Block a user