Jump to content

[SOLVED] How to replace textures using shaders?


Recommended Posts

as the title says, how can i replace textures using shaders? i've got some model names from engineGetModelNameFromID and i want to replace them with pictures that i have.

(Models such as radar, crosshair, etc..)

i have this code which i don't know what it does... :

  
texture Tex0; 
  
technique simple 
{ 
    pass P0 
    { 
        Texture[0] = Tex0; 
        ColorOp[0] = SelectArg1; 
        ColorArg1[0] = Texture; 
        AlphaOp[0] = SelectArg1; 
        AlphaArg1[0] = Texture; 
  
        ColorOp[1] = Disable; 
        AlphaOp[1] = Disable; 
    } 
} 
  

Edited by Guest
Link to comment
as the title says, how can i replace textures using shaders? i've got some model names from engineGetModelNameFromID and i want to replace them with pictures that i have.

(Models such as radar, crosshair, etc..)

i have this code which i don't know what it does... :

  
texture Tex0; 
  
technique simple 
{ 
    pass P0 
    { 
        Texture[0] = Tex0; 
        ColorOp[0] = SelectArg1; 
        ColorArg1[0] = Texture; 
        AlphaOp[0] = SelectArg1; 
        AlphaArg1[0] = Texture; 
  
        ColorOp[1] = Disable; 
        AlphaOp[1] = Disable; 
    } 
} 
  

Do you mean this ?

But it moving,You can change the images and the model

Link to comment

I love you :D

as the title says, how can i replace textures using shaders? i've got some model names from engineGetModelNameFromID and i want to replace them with pictures that i have.

(Models such as radar, crosshair, etc..)

i have this code which i don't know what it does... :

  
texture Tex0; 
  
technique simple 
{ 
    pass P0 
    { 
        Texture[0] = Tex0; 
        ColorOp[0] = SelectArg1; 
        ColorArg1[0] = Texture; 
        AlphaOp[0] = SelectArg1; 
        AlphaArg1[0] = Texture; 
  
        ColorOp[1] = Disable; 
        AlphaOp[1] = Disable; 
    } 
} 
  

Do you mean this ?

But it moving,You can change the images and the model

Not really :/

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