Leadwerks Game Engine

Leadwerks Game Engine

Not enough ratings
Cartoon Shader
   
Award
Favorite
Favorited
Unfavorite
Type: Shader
File Size
Posted
Updated
1.252 KB
13 Feb, 2016 @ 12:53pm
20 Feb, 2016 @ 12:18pm
4 Change Notes ( view )

Subscribe to download
Cartoon Shader

Description
A single-pass cartoon shader

How to use:
-Go to the Scene tab, click Root, then click Add under Post Effects
-You may want to change the Ambient Light. I increased it a bit, but you should fine-tune it.

Notes:
-I haven't really tested it with other post effects, but it should be compatible with everything, just realize that it may look weird.
-There is a noise issue with flat surfaces, so avoid very flat terrain. I don't have a great idea at this time as to how to make a better thresholding function.

Thanks to everyone who made shaders in the Workshop! It really helped me learn how to be a better shader developer.
Popular Discussions View All (1)
0
18 Jun, 2017 @ 2:47pm
My Mod
Josh
13 Comments
nick.ace  [author] 10 Mar, 2017 @ 7:14pm 
The saturation should be applied everywhere, so I'm guessing you're talking about the outline. There's probably a way to make it work for longer distances, but you would need to change the thresholding function. When I stopped working on it, this way the biggest challenge I had. Do you have a screenshot of the issue though? If you have a specific edge case, then I can see if I can fix it.
Храбар детектив 5 Mar, 2017 @ 12:31pm 
Hi.Nice work.Amazing shader,but is there any way i can make it work farther?I have quite a big map,and all distant objects don`t look cartoon at all.
nick.ace  [author] 20 Feb, 2016 @ 12:01pm 
lol, what's with all these reserved words? Anyway, I'll fix that. Thanks again for the posting the error message!
extenz 20 Feb, 2016 @ 11:35am 
Now the word "output" is reserved

ERROR: 0:22: error(#133) Reserved word: output
ERROR: 0:22: error(#132) Syntax error: "output" parse error
ERROR: error(#273) 2 compilation errors. No code generated
Error: Failed to compile fragment shader.

I replaced the word "output" on lines 22 - 27 with "op" and it seems to be working. :steamhappy:
nick.ace  [author] 20 Feb, 2016 @ 11:05am 
Ok, the AMD problem should be fixed. I didn't know this, but apparently the variable name "input" is actually a reserved word according to AMD drivers. Unfortunately, I was using that name for parameters to a function.
nick.ace  [author] 19 Feb, 2016 @ 5:58pm 
Thanks for posting the error message! That's extremely helpful. I'll look into it. It seems like it's just a naming convention thing with AMD.
extenz 19 Feb, 2016 @ 8:41am 
Here's a gif - http://i.imgur.com/CFr1nxK.gifv
Whenever I try to move the perspective camera it doesn't do anything. If I try to run the game it's just a black screen.

I have an APU A8 6600k ( integrated AMD Radeon HD 8750D )
extenz 19 Feb, 2016 @ 8:35am 
It doesn't work for me either.

ERROR: 0:21: error(#133) Reserved word: input
ERROR: 0:21: error(#132) Syntax error: "input" parse error
ERROR: error(#273) 2 compilation errors. No code generated
Error: Failed to compile fragment shader.

This error pops up in the console thingy below the viewports. :steamsad:
nick.ace  [author] 18 Feb, 2016 @ 5:26pm 
Would you be able to make a screenshot? I don't actually have an AMD graphics card, but it very possible some GLSL functions might have bugs on their cards. If that's the case, then I can look into it.
DylanDoThings 18 Feb, 2016 @ 3:47am 
@nick.ace AMD Radeon R4 Graphics, and no im not using any other shaders, i dont really know what it could be ive never had issues with any shaders before. If push comes to shove i can make a short video of what happens.