Jump to content

Duda


Sticmy

Recommended Posts

Hay unas texturas que son smoke3, smoke4 y smoke5 creo. Deberias ir probando a aplicarles shaders. Sobre el shader de color en nada te lo dejo abajo que estoy en el móvil.

Shader.fx:

float r;
float g;
float b;
float a;

technique tec0
{
    pass P0
    {
        MaterialAmbient = float4(r, g, b, a);
        MaterialDiffuse = float4(r, g, b, a);
        MaterialEmissive = float4(r, g, b, a);
        MaterialSpecular = float4(r, g, b, a);

        AmbientMaterialSource = Material;
        DiffuseMaterialSource = Material;
        EmissiveMaterialSource = Material;
        SpecularMaterialSource = Material;

        ColorOp[0] = SELECTARG1;
        ColorArg1[0] = Diffuse;

        Lighting = true;
    }
}

Script de prueba que hice para que veas mas o menos como usarlo, aunque tampoco es tan complicado.

addCommandHandler( "test",
	function( cmd )
		local shader = dxCreateShader( "shader.fx", 0, 0, true, "ped" )
		setElementModel( localPlayer, 0 )
		engineApplyShaderToWorldTexture( shader, "cj_ped_head", localPlayer )
		dxSetShaderValue( shader, "r", 255 ) 
		dxSetShaderValue( shader, "g", 0 ) 
		dxSetShaderValue( shader, "b", 0 ) 
		dxSetShaderValue( shader, "a", 0.06 )
		outputChatBox( "Color de cabeza cambiado." )
	end
)

 

Edited by aka Blue
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...