Hello everyone!
I'm making a skin shader ,it works but the problem is:
I'm replacing CJ parts, it doesn't do it properly.
It only replaces one and applies it to all
Fx file
//-- Declare the texture. These are set using dxSetShaderValue( shader, "Tex0", texture )
texture Tex0;
texture Tex1;
texture Tex2;
technique simple
{
pass P0
{
//-- Set up texture stage 0
Texture[0] = Tex0;
Texture[1] = Tex1;
Texture[2] = Tex2;
//-- Leave the rest of the states to the default settings
}
}
LUA
This is only a part where I set value.
dxSetShaderValue( shader, "Tex0", dxCreateTexture ( "tshirtilovels.png") )
dxSetShaderValue( shader, "Tex1", dxCreateTexture ("bbshortred.png"))
dxSetShaderValue( shader, "Tex2", dxCreateTexture( 'sneakerbincblue.png' ) )
function givePlayerVIP( player )
for i, v in ipairs( t2 ) do
engineApplyShaderToWorldTexture( shader, v, player )
end
end
addEvent( "addClothesVIP", true )
addEventHandler( "addClothesVIP", root, givePlayerVIP )
part where i apply