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 / help plz: no outline with Cartoon.fx shader from ultim.shader pack1.0?

Author
Message
Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 22nd Apr 2007 00:14
could somone help me to take away the outline pass in this:
shader?

It's from the ultimate shader pack

I tried many times, but had no result.

Thanks for help!
DSG
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Hampshire, England
Posted: 22nd Apr 2007 01:09
Just comment out the 'pass P1' code block to temporary remove the outline effect. From there you permanently remove the effect by deleting the vertex and pixel shader associated with that pass.

Danny Gregory BSc
Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 22nd Apr 2007 01:14
oh, it was so easy

ok thank you very much
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 22nd Apr 2007 02:32
...Alternitively you could use a null edge image or an edge image with only 1 pixel.

DSG
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Hampshire, England
Posted: 22nd Apr 2007 02:40
There is no 'edge image', the outline is created by modifying vertex data.

An alternative would be to modify the shader to allow the you to specify the thickness of the outline (it's currently hardcoded) and simply set the thickness to zero. However, if you don't need the outline at all, you'll make the shader run faster by just getting rid of the code completely.

Danny Gregory BSc
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 22nd Apr 2007 02:46
There definitely is an edge image... Ive used the toon shader countless times, the edge image determines the size of the edge drawn, and the shade image determines what colours are used to texture the object (unless you bypass it with a texture image).

Search "Cartoon Shader" in the search box and click my thread on it, scroll down and you'll see how you can alter the thickness of the edge.

DSG
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Hampshire, England
Posted: 22nd Apr 2007 02:49
I can see exactly what the shader is doing by reading the code. Only two images are used; the first is the colour texture of the model being rendered, the second is a 1D lookup texture for lighting calculations.

You are referring to a different shader.

Danny Gregory BSc
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 22nd Apr 2007 02:52
I was going by him saying he used the toon shader from the ultimate shader pack (the working one Im assuming), as thats the one I altered in my thread I mentioned to work properly. I didnt bother looking at his code, since he specifically said it was from the pack.

Master Xilo
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 22nd Apr 2007 03:30
yea it is the working one, the one without edge image. I only wanted the outline to be removed because it doubles the polycount.

Login to post a reply

Server time is: 2024-04-26 02:17:11
Your offset time is: 2024-04-26 02:17:11