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
102
points ]
 (12 votes)
Created 2011-05-17 17:36
9 years 7 weeks ago
Getridou
30
points ]
 (3 votes)
Created 2020-07-02 18:52
3 days 19 hours ago
LURKing
20
points ]
 (2 votes)
Created 2020-07-01 13:16
5 days 1 hour ago
70
points ]
 (7 votes)
Created 2020-01-24 22:26
23 weeks 2 days ago
TheMisterCat
16
points ]
 (2 votes)
Created 2007-02-21 18:06
13 years 19 weeks ago
Created 2020-05-14 12:56
7 weeks 4 days ago
18
points ]
 (2 votes)
Created 2020-06-01 20:40
4 weeks 6 days ago
30
points ]
 (3 votes)
Created 2018-09-17 02:06
1 year 41 weeks ago
26
points ]
 (3 votes)
Created 2020-06-27 11:13
1 week 2 days ago
LURKing
40
points ]
 (5 votes)
Created 2020-05-09 17:56
8 weeks 1 day ago
30
points ]
 (3 votes)
Created 2020-06-13 21:05
3 weeks 1 day ago
7YearBitch
8
points ]
 (1 vote)
Created 2020-06-14 17:58
3 weeks 20 hours ago
7YearBitch
44
points ]
 (5 votes)
Created 2020-06-02 09:43
4 weeks 6 days ago
LURKing
25
points ]
 (3 votes)
Created 2020-06-12 18:25
3 weeks 2 days ago
7YearBitch
15
points ]
 (2 votes)
Created 2020-06-07 14:58
4 weeks 23 hours ago
7YearBitch
15
points ]
 (2 votes)
Created 2020-06-07 14:48
4 weeks 23 hours ago
19
points ]
 (2 votes)
Created 2020-05-31 16:27
5 weeks 22 hours ago
38
points ]
 (4 votes)
Created 2020-05-16 23:15
7 weeks 1 day ago
224
points ]
 (23 votes)
Created 2012-10-20 09:56
7 years 37 weeks ago
Gangler
10
points ]
 (1 vote)
Created 2020-05-12 22:59
7 weeks 5 days ago
Who's new
  • Getridou
  • Spr1te
  • Akari
  • LURKing
  • Antknee55