Shader examples: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 18: Line 18:


==UV scroll==
==UV scroll==
[[Image:UVScollScreen.jpg|200px|thumb|left|Road shine]]
[[Image:UVScollScreen.jpg|200px|thumb|left|UV scroll]]
<table border=0><tr><td valign=top height=170>
<table border=0><tr><td valign=top height=170>
[http://nightly.mtasa.com/files/shaders/shader_uv_scroll.zip Download  shader_uv_scroll.zip]
[http://nightly.mtasa.com/files/shaders/shader_uv_scroll.zip Download  shader_uv_scroll.zip]

Revision as of 03:34, 5 July 2011

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

UV scroll

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.