Chasester_aka_you | 2014-01-21 19:32
Comic book shader - (outline and cel shading)
17
points ]
 (2 votes)
A simple shader

Pretty selexplainitory, it looks like a comic book.

Some side notes (if you cant read shader code):
- Only effects models (maybe do textures, etc later)
- This is just a simple edge detection formula, (all credit goes to the four or five wiki pages i referenced)
- Effects all models(mesh, not always the entire model) that have evnmap(md5envmap), mask(md5mask), and normals(md5bumpmap). If you do not have all of these set then the model will not use the code :)
- I had to add md5env maps to inky and captaincannon, if you dont put these new md5.cfgs in, then they will not render (see note above)
- Doesnt work for orgo (hes too old, and lacks the maps needed)
- This formula can be simply modified to make a vary of effects :) the general formula is:
if( dot(camdir, normal) (less than) mix(minedge, maxedge, max(camdir, normal){
colorout *= newcolor; //usually a percentage
}

doing this multiple times causes cel shading, setting newcolor to 0.0 makes an outline :) petty simple. You could add rim lighting with this as well.

chasester

Ps: this may be in the new sauerx release

we realy need to fix the tag error, cuz its the same as the greaterthan sign :)

see code on lines:1164-1181 of glsl.cfg :)

cartoonshader.zip (13.67 KB)
17
points
 (2 votes)
User login
Users on Quadropolis
1 guest & no users online
10
points ]
 (1 vote)
Created 2019-10-16 01:26
1 year 40 weeks ago
9
points ]
 (1 vote)
Created 2021-06-17 22:42
5 weeks 6 days ago
30
points ]
 (3 votes)
Created 2020-11-30 04:00
34 weeks 2 days ago
10
points ]
 (1 vote)
Created 2021-05-24 00:01
9 weeks 2 days ago
MisanthropX
83
points ]
 (9 votes)
Created 2019-12-05 20:57
1 year 33 weeks ago
20
points ]
 (2 votes)
Created 2020-12-20 03:04
31 weeks 3 days ago
29
points ]
 (3 votes)
Created 2020-12-10 12:49
32 weeks 6 days ago
30
points ]
 (3 votes)
Created 2020-12-04 12:05
33 weeks 5 days ago
20
points ]
 (2 votes)
Created 2020-12-03 17:12
33 weeks 6 days ago
30
points ]
 (3 votes)
Created 2020-06-13 21:05
1 year 6 weeks ago
50
points ]
 (5 votes)
Created 2020-01-23 12:57
1 year 26 weeks ago
68
points ]
 (7 votes)
Created 2020-10-11 13:46
41 weeks 3 days ago
64
points ]
 (7 votes)
Created 2018-12-04 15:12
2 years 33 weeks ago
Gangler
36
points ]
 (4 votes)
Created 2020-10-22 00:50
39 weeks 6 days ago
LURKing
13
points ]
 (2 votes)
Created 2020-11-22 21:21
35 weeks 3 days ago
LURKing
37
points ]
 (4 votes)
Created 2020-11-18 21:08
36 weeks 2 hours ago
Shuzomi
30
points ]
 (3 votes)
Created 2020-11-15 18:16
36 weeks 3 days ago
Im_Percynator
Created 2020-11-15 07:21
36 weeks 3 days ago
micai
24
points ]
 (3 votes)
Created 2020-11-11 18:27
37 weeks 5 hours ago
afroninja
56
points ]
 (6 votes)
Created 2020-01-15 07:47
1 year 27 weeks ago
Who's new
  • letic86
  • BATMAN
  • WASP
  • Im_Percynator
  • micai