- Posts: 111
Paint and Outline
- JPulowski
-
Topic Author
- Offline
Hi JPulowski, is it possible to change the color of cel shading to like white or something? if so can you explain how? Love the Effects.
I would also like to see the Cel expanded with opacity and color value if it's possible. Fade with distance and outline width would be most welcome also.The original algorithm belongs to kingeric1992, but I'll see what I can do.

Please Log in or Create an account to join the conversation.
- kingeric1992
-
- Offline
- Posts: 177
haven't tested yet, but try this:
// replace this line
// color -= step(1, sqrt( dot(dotx, dotx) + dot(doty, doty))); // original color -1 when weight over 1
// to this
color.rpg = lerp(color.rpg, Cel_Color, step(Cel_Threshold, sqrt( dot(dotx, dotx) + dot(doty, doty)))); // return custom color when weight over threshold
// needs to add these in config file
// #define Cel_Color float3( 0.0, 0.0, 0.0) //[0,1] color
// #define Cel_Threshold 1 // ignore soft edges( less sharp corner) when increased
also if you replace buffer color input to custom background color, it should looks like some cool skeleton looks.
@Wicked Sick
Blame!!!!
I love it!!! (✪ω✪)
Including other series by the author, gives some sort of post-bio-apocalypse feels.
東亜重工 rules!!
Should add a cross-hatching shader, with dot pattern, it recreate comic/manga process where you apply doted sheet for greyscale.
Please Log in or Create an account to join the conversation.
- TrophiHunter
-
- Offline
- Posts: 17
Please Log in or Create an account to join the conversation.
- NattyDread
-
- Offline
- Posts: 95
Please Log in or Create an account to join the conversation.
- Sh1nRa358
-
- Offline
- Posts: 174
Before: lh3.ggpht.com/-GgLJW50a1NY/U4TQeAN-OHI/A...a2d8c6ec672b30f1.jpg
After: oi59.tinypic.com/24pvs55.jpg
Like instead of paint, have some bilinear filtering cover the areas in depth instead?
Please Log in or Create an account to join the conversation.
- NattyDread
-
- Offline
- Posts: 95
Please Log in or Create an account to join the conversation.
- Nerd
-
- Offline
- Posts: 44
imgur.com/a/gmBHM
Please Log in or Create an account to join the conversation.
- jas01
-
- Offline
- Posts: 157
One more with all kinds off goodies on it (Cel, Paint, LUT, DoF and AO)Woah.... Nice. Mind sharing your preset?

Please Log in or Create an account to join the conversation.
- JPulowski
-
Topic Author
- Offline
- Posts: 111
I've been playing around with 3dsmax lately and I found a menu with a bunch of "stylized" shaders. Would any of you be able to port them to Reshade?Sure. As long as one has access to the source code.
imgur.com/a/gmBHM
Please Log in or Create an account to join the conversation.
- JPulowski
-
Topic Author
- Offline
- Posts: 111
Updated Cel shader (Now "Outline" shader) and added kingeric1992's suggestions and few other requested features except width modifier which will require some work. Here is the changelog:
1.2 - Changed the name to "Outline" since technically this is not Cel shading (See https://en.wikipedia.org/wiki/Cel_shading)
Added custom outline and background color support
Added a threshold and opacity modifier

Please Log in or Create an account to join the conversation.
- speaker60
-
- Offline
- Posts: 5
Im using for fallout 4
Im fairly new at this so i dont know how i would go about doing this if it works that it?
Please Log in or Create an account to join the conversation.
- toomighty
-
- Offline
- Posts: 8
I'm trying to find the shaders but noluck for the paint shader. It seems that the cell shader was deleted from repository but I managed somehow to get the file
raw.githubusercontent.com/crosire/reshad...0/Shaders/Outline.fx (for reshade 3)
So now I'm looking for the paint shader but I can't find it on reshade 3 options... Any suggestion?
On the other hand I was wondering about if the following images are achievable?
imgur.com/a/1wHhe#0
Regards
JPulowski
crosire
OtisInf
Marty McFly
kingeric1992
NattyDread
Please Log in or Create an account to join the conversation.
- toomighty
-
- Offline
- Posts: 8
Please Log in or Create an account to join the conversation.
- One3rd
-
- Offline
- Posts: 14
I'm trying to find the shaders but noluck for the paint shader. It seems that the cell shader was deleted from repository but I managed somehow to get the fileThanks for this, I've been looking for that Outline shader for v3 but hadn't been able to find it. It works like before except the EdgeDetectionMode selection seems to be inversed; color edge detection is depth edge detection and vice versa.
raw.githubusercontent.com/crosire/reshad...0/Shaders/Outline.fx (for reshade 3)
So now I'm looking for the paint shader but I can't find it on reshade 3 options... Any suggestion?
I too would like to know if there is a version of the paint shader that works with Reshade v3. Are the results in those images you posted from the paint shader in Reshade v2 or an external filter?
Please Log in or Create an account to join the conversation.
- xley
-
- Offline
- Posts: 7
Was wondering if there are any plans to release the cel and paint shader now that the new reshade version is out.
i got the outline fx to run but no luck with the paint shader sofar.
Please Log in or Create an account to join the conversation.
- toomighty
-
- Offline
- Posts: 8
I'm trying to find the shaders but noluck for the paint shader. It seems that the cell shader was deleted from repository but I managed somehow to get the file
raw.githubusercontent.com/crosire/reshad...0/Shaders/Outline.fx (for reshade 3)
So now I'm looking for the paint shader but I can't find it on reshade 3 options... Any suggestion?
I too would like to know if there is a version of the paint shader that works with Reshade v3. Are the results in those images you posted from the paint shader in Reshade v2 or an external filter?
Those images are the result from photoshop filter. I'm trying to support modders to eventually make a better paint shader than the basic one which is right now avalaible. Regards
Please Log in or Create an account to join the conversation.
- xley
-
- Offline
- Posts: 7
Please Log in or Create an account to join the conversation.
- JPulowski
-
Topic Author
- Offline
- Posts: 111
Yo'allJust drop Outline.fx into ../reshade-shaders/Shaders/ folder and it should be good to go. As for the paint shader i believe Crosire chose not to include it in the repository due to its performance-heavy nature since it is not that well suited for real-time tweaking. But I'll do a port for those who would like to use it. I'll submit it here after I am done.
I'm trying to find the shaders but noluck for the paint shader. It seems that the cell shader was deleted from repository but I managed somehow to get the file
raw.githubusercontent.com/crosire/reshad...0/Shaders/Outline.fx (for reshade 3)
So now I'm looking for the paint shader but I can't find it on reshade 3 options... Any suggestion?
On the other hand I was wondering about if the following images are achievable?
imgur.com/a/1wHhe#0
RegardsJPulowski
crosire
OtisInf
Marty McFly
kingeric1992
NattyDread
Update: Here it is. Just save it as Paint.fx and drop it into ../reshade-shaders/Shaders/.
/**
* Basic kuwahara filtering by Jan Eric Kyprianidis <www.kyprianidis.com>
* https://code.google.com/p/gpuakf/source/browse/glsl/kuwahara.glsl
*
* Copyright (C) 2009-2011 Computer Graphics Systems Group at the
* Hasso-Plattner-Institut, Potsdam, Germany <www.hpi3d.de>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Paint effect shader for ENB by kingeric1992
* http://enbseries.enbdev.com/forum/viewtopic.php?f=7&t=3244#p53168
*
* Modified and optimized for ReShade by JPulowski
* https://reshade.me/forum/shader-presentation/261
*
* Do not distribute without giving credit to the original author(s).
*
* 1.0 - Initial release/port
* 1.0a - Modified the code to make it compatible with SweetFX 2.0 Preview 7 and new Operation Piggyback which should give some performance increase
* 1.1 - Removed SweetFX Operation Piggyback compatibility
* Added Framework compatibility
* 1.2 - Rewritten and optimized some parts of the code
* 1.3 - Port to ReShade 3.x
*/
uniform int PaintRadius <
ui_type = "drag";
ui_min = 0; ui_max = 20;
ui_tooltip = "Amount of effect. Higher values require more performance.";
> = 2;
#include "ReShade.fxh"
float3 PS_ModePaint(float4 vpos : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float4 col;
float3 lumcoeff = float3(0.2126, 0.7152, 0.0722) * 9.0; // Multiplied by total number of available intensity levels
float4 col0 = 0.0; float4 col1 = 0.0; float4 col2 = 0.0; float4 col3 = 0.0; float4 col4 = 0.0;
float4 col5 = 0.0; float4 col6 = 0.0; float4 col7 = 0.0; float4 col8 = 0.0; float4 col9 = 0.0;
for (int i = -PaintRadius; i <= PaintRadius; i++) {
for (int j = -PaintRadius; j <= PaintRadius; j++) {
col.rgb = tex2D(ReShade::BackBuffer, texcoord + ReShade::PixelSize * float2(i, j)).rgb;
col.a = round(dot(col.rgb, lumcoeff)) + 1.0; // Store intensity in alpha channel and increase it by 1, so we can count
// values between 0.0 - 1.0
col0 += col.a == 1.0 ? col : 0.0;
col1 += col.a == 2.0 ? col : 0.0;
col2 += col.a == 3.0 ? col : 0.0;
col3 += col.a == 4.0 ? col : 0.0;
col4 += col.a == 5.0 ? col : 0.0;
col5 += col.a == 6.0 ? col : 0.0;
col6 += col.a == 7.0 ? col : 0.0;
col7 += col.a == 8.0 ? col : 0.0;
col8 += col.a == 9.0 ? col : 0.0;
col9 += col.a == 10.0 ? col : 0.0;
}
}
// Calculate intensity count
col1.a /= 2.0;
col2.a /= 3.0;
col3.a /= 4.0;
col4.a /= 5.0;
col5.a /= 6.0;
col6.a /= 7.0;
col7.a /= 8.0;
col8.a /= 9.0;
col9.a /= 10.0;
col.a = 0.0;
// Calculate mode
col = col0.a > col.a ? col0 : col;
col = col1.a > col.a ? col1 : col;
col = col2.a > col.a ? col2 : col;
col = col3.a > col.a ? col3 : col;
col = col4.a > col.a ? col4 : col;
col = col5.a > col.a ? col5 : col;
col = col6.a > col.a ? col6 : col;
col = col7.a > col.a ? col7 : col;
col = col8.a > col.a ? col8 : col;
col = col9.a > col.a ? col9 : col;
return col.rgb / col.a;
}
float3 PS_Kuwahara(float4 vpos : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float n = pow(PaintRadius, -2.0);
float4 col = 1.0;
// Using vectors instead of arrays, otherwise temp register index gets exceeded very quickly
float4 m0 = 0.0, m1 = 0.0, m2 = 0.0, m3 = 0.0;
float3 s1 = 0.0, s2 = 0.0, s3 = 0.0, s4 = 0.0;
for (int i = 0; i < PaintRadius; i++) {
for (int j = 0; j < PaintRadius; j++) {
col.rgb = tex2D(ReShade::BackBuffer, texcoord + float2(-i, -j) * ReShade::PixelSize).rgb;
m0.rgb += col.rgb;
s1 += col.rgb * col.rgb;
col.rgb = tex2D(ReShade::BackBuffer, texcoord + float2( i, -j) * ReShade::PixelSize).rgb;
m1.rgb += col.rgb;
s2 += col.rgb * col.rgb;
col.rgb = tex2D(ReShade::BackBuffer, texcoord + float2( i, j) * ReShade::PixelSize).rgb;
m2.rgb += col.rgb;
s3 += col.rgb * col.rgb;
col.rgb = tex2D(ReShade::BackBuffer, texcoord + float2(-i, j) * ReShade::PixelSize).rgb;
m3.rgb += col.rgb;
s4 += col.rgb * col.rgb;
}
}
m0.rgb *= n; m1.rgb *= n;
m2.rgb *= n; m3.rgb *= n;
// Sigma2
m0.a = dot(distance(s1.rgb * n, m0.rgb * m0.rgb), 1.0);
m1.a = dot(distance(s2.rgb * n, m1.rgb * m1.rgb), 1.0);
m2.a = dot(distance(s3.rgb * n, m2.rgb * m2.rgb), 1.0);
m3.a = dot(distance(s4.rgb * n, m3.rgb * m3.rgb), 1.0);
col = m0.a < col.a ? m0 : col;
col = m1.a < col.a ? m1 : col;
col = m2.a < col.a ? m2 : col;
col = m3.a < col.a ? m3 : col;
return col.rgb;
}
technique Kuwahara
{
pass Kuwahara
{
VertexShader = PostProcessVS;
PixelShader = PS_Kuwahara;
}
}
technique kingeric1992
{
pass kingericPaint
{
VertexShader = PostProcessVS;
PixelShader = PS_ModePaint;
}
}
Please Log in or Create an account to join the conversation.
- hunt1hunt
-
- Offline
- Posts: 43
thank you for Paint.fx ! but why it can not be loaded by reshade3.06?
Please Log in or Create an account to join the conversation.
- JPulowski
-
Topic Author
- Offline
- Posts: 111
Update: Here it is. Just save it as Paint.fx and drop it into ../reshade-shaders/Shaders/.Can you describe the issue more in detail? Is there any error messages? Or does it simply not show up in the UI? For the latter make sure that you have dropped the shader in the correct folder, even though there was something wrong ReShade always loads .fx files automatically, so any errors or whatsoever would trigger a message in the UI.
thank you for Paint.fx ! but why it can not be loaded by reshade3.06?
Please Log in or Create an account to join the conversation.