Post tutorial RSS Studio Shader Usage

The script system is very similar like other and easy to use.

Posted by on - Basic Other

Let start to the basic :

How to create a new studio shader ?

Go to the mod folder and open Materials folder and now u found this files :

studioshader.txt
studio.shader

Ok first u need create a new shader file and named test.shader or something
Don't forget add this shader file to the studioshader.txt list.

How create a script :

{ "Medkit.bmp" // This is the texture name in the mdl file
{
texture "materials/models/Medkit.tga" // This line call the shader upload func
blend GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA // Special func not need to use
}
}

Result in the game :

Typo or missing textures

{ "Medkit.bmp"
{
texture "materials/models/Medkit2.tga" // Opps texture is missing
blend GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
}

Result in the game :

How create shader passes :
"Every model allow to use max 8 pass"

{ "Medkit.bmp"
{
texture "materials/models/Medkit.tga"
blend GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
// Pass 1
{
texture "materials/Cubemap.tga"
blend saturate
}
}

Result in the game :

When not use the scripting system the engine use the default textures.
" Stored into the mdl data "

Comments
DJShark23 Author
DJShark23

This Feature is removed !

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.