Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Changing outline colour of toon shader?

Author
Message
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Dec 2011 20:49
How can I change the colour of the outline in this toon shader to something variable? Here's the shader:



Evolved's example is attached if you need it.


Thanks,

TheComet

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th Dec 2011 22:56 Edited at: 20th Dec 2011 22:58
Change this



to use whatever colour you want. For example to get full red use:




and add the declaration of EdgeColour to the tweaks:



You can then change the edge colour in the usual way using



Remember that the colour values need to be floats in the range 0 to 1.

[Health warning: untested. ]
Southside Games
16
Years of Service
User Offline
Joined: 1st Jan 2010
Location: Don\'t tell me what to do!
Posted: 20th Dec 2011 23:45
I have a question, I want to change the line color from object to object, can I do that?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 20th Dec 2011 23:53
Thanks a lot! Wow shader code is still boggling my mind... I'm having a hard time wrapping my head around it.

TheComet

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Dec 2011 00:01
Sorry for the double post, but this here is still black for me... Where did my logic go wrong?



TheComet

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 21st Dec 2011 02:05
Looks OK to me. I can't see what I did wrong - unless it's something to do with the alpha component. That rings a bell for some reason. I'll check it carefully when I'm awake tomorrow and report back.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 21st Dec 2011 14:41
Alright I await your response

ZIIIIIM

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 23rd Dec 2011 19:48
My apologies.

I forgot about this in the run-up to Xmas and am now away from a decent computer till 27th Dec. This means I can't test anything I suggest or even test Evolved's original demo. I'm sure there's a simple fix once I have a proper look at his demo and code.

I vaguely recall a similar issue coming up some time back so it might be worth doing a search.

If you're lucky someone else might put you out of your misery.

Hope you enjoy the pony steaks while you wait.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 23rd Dec 2011 21:59
Interesting... I stall keep posted here on this topic...

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Dec 2011 01:37 Edited at: 29th Dec 2011 01:37
TheComet

Is this any better? You may want to change the "shade.bmp" image as well to make it match the edge colour.

Here's the revised shader:



Here's a screenshot using the default red edge colour used in the shader.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 29th Dec 2011 01:44
Like WOAH...

Login to post a reply

Server time is: 2026-07-11 12:01:22
Your offset time is: 2026-07-11 12:01:22