Shader examples

From Multi Theft Auto: Wiki
Revision as of 03:32, 5 July 2011 by Ccw (talk | contribs)
Jump to navigation Jump to search

Here are some example shader resources to try in 1.1. If you are looking to make your own, please be sure to read about the shader element as well.

Road shine

Road shine

Download shader_roadshine.zip (Requires Shader Model 2 graphics card)

This resource creates a light reflection effect on the ground (looks best when moving). It uses a custom flag in the effect file to generate surface normals for the ground model:

int CUSTOMFLAGS
<
    string createNormals = "yes";
>;

Surface normals are not usually present in the ground and building models, but are useful for creating lighting effects such as these.

UV scroll

Road shine

Download shader_uv_scroll.zip

This resource scrolls a texture from left to right. It doesn't use vertex or pixels shaders, so it should work on all hardware.