Jump to content

Shaders help


Anubhav

Recommended Posts

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

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...