Jump to content

shader bug


BorderLine

Recommended Posts

Hi everyone

well lastnight i was mading a shader for cars

change the vehicle.txd

i was reading some post and one guy say download the moonshader

and aply the world texture

so i did this

but dont work :S the textures showing in others side

i mean, i put other lights

and when i start the shader, the light showing in the body of car

chek this

mtascreen20120129133747.png

mtascreen20120129133740.png

mtascreen20120129133704.png

mtascreen20120129133635.png

this is the shader

  
texture myTex; 
texture myTex2; 
texture myTex3; 
texture myTex4; 
texture myTex5; 
texture myTex6; 
technique moon { 
  pass P0 { 
    Texture[0] = myTex;   
    Texture[1] = myTex2; 
    Texture[2] = myTex3; 
    Texture[3] = myTex4; 
    Texture[4] = myTex5; 
    Texture[5] = myTex6; 
  } 
} 
  

and the script

  
addEventHandler("onClientResourceStart", resourceRoot, function() 
  local moon = dxCreateShader("shaders/rendervehicle.fx") 
  if moon then 
    dxSetShaderValue(moon, "myTex", dxCreateTexture("render/vehiclelightson128.png")) 
    engineApplyShaderToWorldTexture(moon, "vehiclelightson128") 
    dxSetShaderValue(moon, "myTex2", dxCreateTexture("render/vehiclelights128.png")) 
    engineApplyShaderToWorldTexture(moon, "vehiclelights128") 
    dxSetShaderValue(moon, "myTex3", dxCreateTexture("render/vehicleshatter128.png")) 
    engineApplyShaderToWorldTexture(moon, "vehicleshatter128") 
    dxSetShaderValue(moon, "myTex4", dxCreateTexture("render/vehicletyres128.png")) 
    engineApplyShaderToWorldTexture(moon, "vehicletyres128") 
    dxSetShaderValue(moon, "myTex5", dxCreateTexture("render/vehiclegrunge256.png")) 
    engineApplyShaderToWorldTexture(moon, "vehiclegrunge256") 
    dxSetShaderValue(moon, "myTex6", dxCreateTexture("render/vehiclegeneric256.png")) 
    engineApplyShaderToWorldTexture(moon, "vehiclegeneric256") 
  end 
end) 
  

both client side

if someone know about shaders, can helpme please :)

thanks a loot

and thanks for your atention

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