[http://nightly.mtasa.com/files/shaders/shader_ped_morph.zip Download shader_ped_morph.zip] ''Requires Shader Model 2 graphics card''
<br><br>
This resource uses a vertex shader to modify the geometry of a ped model as it is rendered.
<br><br>
When the resource has started, use the 'k' and 'l' keys to change morph size. If you change your player's skin, restart the resource to modify the new model.
'''**** UPDATE: Due to performance issues, applying shaders to peds has been disabled for 1.1 ****'''
[http://nightly.mtasa.com/files/shaders/shader_ped_shell.zip Download shader_ped_shell.zip] ''Requires Shader Model 2 graphics card''
<br><br>
This resource draws a translucent effect in a second render pass. The first pass is done by GTA, and the vertex shader is only applied in the second to add the effect 'on top' of the standard output.
<br><br>
When the resource has started, use the 'k' key to see the shell effect. If you change your player's skin, restart the resource to see the effect applied to the new model.
'''**** UPDATE: Due to performance issues, applying shaders to peds has been disabled for 1.1 ****'''
[http://nightly.mtasa.com/files/shaders/shader_ped_shell.zip Download shader_ped_shell.zip] ''Requires Shader Model 2 graphics card''
<br><br>
This resource draws a translucent effect as a shader layer. The first pass is done by GTA, and the vertex shader is only applied in the second to add the effect 'on top' of the standard output.
<br><br>
When the resource has started, use the 'm' key to see the shell effect.
</td></tr></table>
</td></tr></table>
Revision as of 14:05, 24 January 2013
This page contains some example shader resources to try. If you are looking to make your own, please be sure to read about the shader element as well.
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.
Bit more complicated than the first Road shine, as it tracks the sun or moon to calculate the position of the highlight.
The effect can be hard to see depending on the time of day.
Best used with the play resource as the model it modifies is near the initial spawn point.
This resource applies a shader to the GTA world water. The Lua script shows how to use a timer to transfer the conventional water color setting to the shader.
This resource shows you how 'bounce' full screen effects using a render target pool. It also uses the new onClientHUDRender event to exclude the HUD from the effect.
This resource is only a tool, and doesn't do anything pretty. It shows a list of the current visible texture names, and highlights the selected texture. Ideal for finding a texture name to use with engineApplyShaderToWorldTexture.
num_8 shows/hides the texture list, num_7 and num_9 step through the list, and 'k' copies the current texture name to the clipboard.
This resource shows you how to do multiple passes in a shader, and input different variables to the vertex shader for each pass.
Use the command /skidmarks 1-4 to see the different effects. (You have skid a car to see it!)
This resource applies a 'High Dynamic Range' contrast effect. It uses a 1 pixel render target to sample the whole scene, and then uses that to brighten or darken the next frame.
So going into somewhere dark will automatically brighten the scene, and visa versa
This resource sort of looks a little bit like the GTAIV motion blur you get when you move the mouse quickly, or drive a fast car. The fast car effect is a bit more subtle than the screen shot would suggest, as it leaves the center of the screen nice and clear so you can see where you are going.
It also has the option of suspending the effect during times of low FPS. Check the two settings at the top of c_radial_blur.lua.
The file c_switch.lua contains information on how to toggle the effect from another resource using events.
This resource draws a translucent effect as a shader layer. The first pass is done by GTA, and the vertex shader is only applied in the second to add the effect 'on top' of the standard output.
When the resource has started, use the 'm' key to see the shell effect.