people playing: 97, servers online: 37, games played: 145,114,126 Top Player: Velordrel

  Toribash Community » Help » Tutorials
Register FAQ General Rules Community
Reply
 
Thread Tools Display Modes
Old Dec 4, 2007   #1
Jam0864
ub3r
 
2nd Dan Black Belt
Join Date: Apr 2007
Posts: 3,065



How to make a shader. All the different functions explained!
Please +rep for this, took lots of work to do.

(rgb=red green blue, bgr=blue green red)

STEP 1.
Open a shader file, read what each line does from my tutorial below, and edit numbers to suit your liking. then load the shader (/lws shadername.inc) and see what it looks like =p

background_color 1.10 1.00 1.00
~ If you make this dark it will darken whole landscape, if it's light it will lighten landscape. (rgb) it seems to determine fog colour too.

mirror_color 0.50 0.15 0.15
~ Reflections colour (rgb, except the colours are sometimes modified by

floor_color 0 1 0

~ Floor colour. (rgb)

sunshine_color 2 1.2 1.2
~ Light colour. (rgb)

ambient_color 0.4 0.4 0.4
~ Colour of the things that aren't getting any light. (dark areas =p) (rgb)

fog_distance 20
~ How far away the fog is (most of the time it's on horizon)

sharp_shadow 1
~ If you can see the tori's shadow. (if your shader is slow consider disabling this)
Originally Posted by Pirate
If sharp shadow is off the sun will be pixelated. If it is on, it will be a perfect cirlce and shaded well.


sky_on 1

~ If a sky hemisphere is drawn or not.

ambient_light_dir 0 0 1
~ (ty to pirate for figuring this function out) It seems to set how dark/light the shadows are.

sun_light_dir -23.5 -32.5 5

~ Where the sun is. (xyz axis)

sunbeam_color 0 0 1
~ The colours you find around the sun. (bgr)

sun_color 0 1 3
~ Colour of sun (bgr)

sky_color 0 0 1
~ Colour of sky (bgr)

polar_light_color -0.30 -0.20 -0.40
~ Polar lights look smexy, this is the colour of them. (brg)

polar_light_dir -0.69 0.69 0.21
~ This is the positon of the polar light. (xyz axis)

sky_blend_power 10.00
~ Play around with this, it seems to be how smoothly the different sky colours (the sun, normal colour and polar colour) mix togethor.

STEP 2. enjoy your shader and send me a copy! I want to see your shaders! (Don't send to me if you don't want your shader in a video, as if it's good I WILL use it)

Last edited by Jam0864; Dec 5, 2007 at 04:58 AM..
Jam0864 is offline   Reply With Quote
Old Dec 4, 2007   #2
Hawkinz
Senior Member
 
7th Dan Black Belt
Join Date: Mar 2007
Posts: 1,046



Lol nice tutorial mate, seems logical. My graphics card is the computer equivalent of a piece of shit .. so my shaders don't work

Nice work mate, you deserve + rep for this
Here you go! *+ rep*

Come on guys, + rep Jam
<@veb> HEY WHO CHANGED YOUR TITLE
<@veb> IT SAYS SENIOR MEMBER
Don't change my title you asshole
Hawkinz is offline   Reply With Quote
Old Dec 4, 2007   #3
macturtle
Member
 
2nd Dan Black Belt
Join Date: Aug 2007
Posts: 468



nice tutorial jam +rep for you
macturtle is offline   Reply With Quote
Old Dec 4, 2007   #4
Pirate_old
I LIKE DICKS
 
Modest Belt
Join Date: Aug 2007
Posts: 4,687



+ karma
Pirate_old is offline   Reply With Quote
Old Dec 4, 2007   #5
parkermauney
gay4veb
 
3rd Dan Black Belt
Join Date: Mar 2007
Posts: 2,469



Wow, now I might actually try and make a shader now that I know what all this stuff does. +rep
凸[◣_◢]凸 PRAISE LID 凸[◣_◢]凸 FUCK THA HATERS 凸[◣_◢]凸 PUT THIS IN YO SIG IF U DOWN 凸[◣_◢]凸
parkermauney is offline   Reply With Quote
Old Dec 4, 2007   #6
Fyerrblad
Elitist
 
Master Belt
Join Date: Jun 2007
Posts: 6,010



very nice tutorial man ! +rep !
Gone
Fyerrblad is offline   Reply With Quote
Old Dec 4, 2007   #7
Pirate_old
I LIKE DICKS
 
Modest Belt
Join Date: Aug 2007
Posts: 4,687



Jam, i forgot to mention, shard shadow also makes the sun look pretty.

If sharp shadow is off the sun will be pixelated. If it is on, it will be a perfect cirlce and shaded well.

kbai.
Pirate_old is offline   Reply With Quote
Old Dec 4, 2007   #8
elfman
Member
 
Blue Belt
Join Date: Nov 2007
Posts: 31



I wish i could give u more reps. oh well. PIE IS AWSOME!
elfman is offline   Reply With Quote
Old Dec 4, 2007   #9
Pirate_old
I LIKE DICKS
 
Modest Belt
Join Date: Aug 2007
Posts: 4,687



Jam use mine in your video!

the one that hyperviper used in his screenshot.

very smexy. BTW, I'm working on a shader now, I'm messing around with the ambient light. I'll let you know wha ig et out of it...

THINK I GOT IT. It might reduce the ammount of sunlight put out! Look at the screenies and compare. It's very subtle, but there is a diffrence.

in the original blackholesun.inc shader it looks like this...


see how you can easily see where ukes pec joints are?

well now take a look at this one..



A-HA!

It to me seems that

the lower the number, the more prominent the shadow.
Code:
ambient_light_dir 0.71 0.00 0.71
^ blackhole
Code:
ambient_light_dir 0.00
^edited version of blackhole with ambient_light_dir changed to 0



If you doubt me, look VERY, VERY, VERY closely. The pecs are definately diffrent shades.

woot!

:P


once again....(next post.)

Last edited by Pirate_old; Dec 4, 2007 at 11:22 PM..
Pirate_old is offline   Reply With Quote
Old Dec 4, 2007   #10
Pirate_old
I LIKE DICKS
 
Modest Belt
Join Date: Aug 2007
Posts: 4,687



Sorry for souble post, it wouldn't fit. Also, links would be a hassle...

I think they would at least.



^NORMAL (blackholesun)



MY EDIT^(ambient on 0)

Last edited by Pirate_old; Dec 4, 2007 at 11:25 PM..
Pirate_old is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:31 AM.




Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
ragdoll fighting game physics fighting game ragdoll fighting physics funmotion joints martial arts karate pc mac free game turn based game