Jump to content

How can I rotate the texture on CJ's face?


kajahun

Recommended Posts

Posted

Hey guys! I want to replace CJ's face. But the textures rotation is off. How can I align properly?

Code: 
 

 local shader2 = dxCreateShader( "shaders/shader.fx", 0, 0, false, "ped" )
 local face = dxCreateTexture ( "files/faces/1.jpg" )--path of face.png
 engineApplyShaderToWorldTexture ( shader2, "cj_ped_head", localPlayer, true )--body part of cj(head)
 dxSetShaderValue ( shader2, "gTexture", face )

Shader.fx:

texture gTexture; 
technique replace 
{ 
    pass P0 
    { 
        Texture[0] = gTexture; 
    } 
} 

spacer.png 

 

Texture: 

spacer.png

Posted

this is due to texture mapping and not code. download the default CJ skin file and paste the face over that file where CJs face is, then upload.

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