Market Squad Recruitment Drive
Original Post
A guide to making shaders :D
In this tutorial i will be explaining all of the currently editable shader values. ( as of 7th May 08 )
Before we get to see a shader code let me explain 2 key things:
  1. The colours used arnt all in R,G,B some are in BGR.
  2. The colours arnt in 255,255,255 format, they are in 1 1 1 format (to change from 255 to 1 you simply divide the numbers by 255 )
Here is a demo of a rather ugly looking shader, that is all blue, with mostly white text:
background_color 0.00 0.00 1.00
mirror_color 0.00 0.00 1.00
floor_color 0.00 0.00 1.00
sunshine_color 0.00 0.00 1.00
ambient_color 0.60 0.60 1.00
fog_distance 87.40
sharp_shadow 1
sky_on 1
ambient_light_dir 0.59 0.57 0.57
sun_light_dir 0.19 0.95 0.23
sunbeam_color 1.00 0.00 0.00
sun_color 1.00 0.00 0.00
sky_color 1.00 0.00 0.00
polar_light_color 1.00 0.00 0.00
polar_light_dir 0.42 0.43 0.80
sky_blend_power 0.98
text 1.00 1.00 1.00
text_bg 0.50 0.50 0.50
text_sel 0.70 0.70 1.00
text_disabled 0.50 0.50 0.50
menu_text 1.00 1.00 1.00
menu_text_bg 0.00 0.00 1.00
menu_text_sel 0.70 0.70 1.00
menu_text_disabled 0.50 0.50 0.50
msg_notype 0.83 0.61 0.31
msg_whisper 1.00 0.00 0.00
msg_server 0.69 0.40 0.99
msg_urlserver 1.00 1.00 1.00
msg_ingame 1.00 1.00 1.00
msg_gamurl 1.00 1.00 0.00
msg_user 1.00 1.00 1.00
msg_player 1.00 0.00 1.00
msg_url 1.00 0.00 1.00
msg_urlsel 1.00 0.00 1.00
Now you may be thinking OMGWTFBBQ?!?!
But let me break it down for you:

background_color R G B
This changes the fog colour of the shader or the sky colour of the shader (depending if sky_on is 1 or not).

mirror_color R G B
This changes the reflection colour, and also slightly changes the floor colour (seeing as the floor reflects the sky).

floor_color R G B
This will change the floor colour before reflection is added. This and mirror_color combine to edit the overall floor colour.

sunshine_color R G B
This changes the colour around the sun.

ambient_color R G B
This will change the general colour of the toris.

fog_distance A
The further away the fog, the less of the background_color you see. Changing A to a negative number can make snazzy effects.

sharp_shadow 0/1
0 = off, 1 = on.
if sharp shadow is on, the sunlight will have no effect, and there will be no big definitive shadow on the floor, only the soft shadow. This imo looks better, but sometimes you need to have the sunlight effecting the joints looks.

sky_on 0/1
again 0 = off, 1 = on.
Now if the sky is off, the background colour will be the sky colour, the sun will not be shown, and the sunlight will not effect the joints (as it doesnt exist :P)

ambient_light_dir A B C
this effects the direction of the ambient light, this has little effect, but sometimes can make a shader look that much better.

sun_light_dir A B C
This changes the position of the sun, therefore changing the place the sunlight hits the joint. This changes a shader GREATLY.

sunbeam_color B G R
Changes the colour of the joints where the sun hits.

sun_color B G R
This changes the colour of the actual sun and nothing else.

sky_color B G R
This changes the colour of sky. This and the background colour must be similar, else the shader will look horrible :P

polar_light_color B G R
The colour of the polar light. (no clue what polar light is in this case >.>. Someone needs to tell me )

polar_light_dir A B C
Changes the position of the polar light.

sky_blend_power A
Changes how well the fog and the sky blend in together.
put this to 0 for a crisp horizon, and 50 for a gradient-like horizon

text R G B
text_bg R G B
text_sel R G B
text_disabled R G B
text = Changes the colour of the escape menu text, aswell as the text that shows on match ending and the "tip" text that shows at the bottom.
text_bg = the shadow on the menu text.
text_sel = the colour of the selected menu item.
text_disabled = any disabled menu items will be this colour (there is none at the moment, as all options are available to everyone).

menu_text R G B
menu_text_bg R G B
menu_text_sel R G B
menu_text_disabled R G B
menu_text = The colour of the server menu's text.
menu_text_bg = The colour of the background of the server menu.
menu_text_sel = The colour of the selected server in the server menu.
menu_text_disabled = Any disabled servers will be this colour.

msg_notype R G B
Not too sure :P

msg_whisper R G B
No known effect.

msg_server R G B
Messages from the server will be this colour.
Example: Whispers/message of the day

msg_urlserver R G B
Url colour in server text. (like whispers n such :P)

msg_ingame R G B
echo colours. (an echo is like a notification from toribash itself, that shows in the text box. An example is when you go "/set" all of the text displayed there is echo text)

msg_user R G B
Chat text colour.

msg_player R G B
The chat colour of the person using the shader.

msg_url R G B
Chat URL colour.

msg_urlsel R G B
Colour of a URL that has been clicked.

----------------


Any questions/better descriptions/corrections post here
Last edited by WorldEater; Nov 2, 2017 at 08:55 PM.
:D
Nice one, too long for me *cough* that's what she said *cough* but anyway, if I was interested at all in making shaders this would probably help a lot
Since when did I become Asian?
fyi, the only thing you had to figure out were the text colors, jam already made one like this for the different things :P
yeah but this is better and more descriptive :P
:D
Very Nice Tut Blammy,You win nao :]
Some info :[clan] Look : IvoryStripe Click 8th Dan :p [I maek Art :D] -GATA-

Links to satisfy curiosity :
*UPDATED* GALLERY/ART/SKETCHES AND TAG REQUEST THREAD. :D <-- Check it out. :)
ToriART B&B GALLERY. <-- THE CLASSICS.
:o
this is great (b' ')b
<hanz0> Once upon a time... NUCLEAR WINTER!
<Iburnaga> I would suck to get anally raped. XD