Jump to content

Applying colour tinting over texture shader


Recommended Posts

Hello. I'm a complete idiot in terms of making shaders, so i'll ask here.

I've got this shader:

texture TXT; 
  
technique tech 
{ 
    pass p0 
    { 
        Texture[0] = TXT; 
    } 
} 

And i put a texture inside the shader this way:

dxSetShaderValue(shader,"TXT",myTextureOrTarget) 

So my question is: how can apply colour tinting to myTextureOrTarget in the shader? I'd like it to work this way:

dxSetShaderValue(shader,"r",255) 
dxSetShaderValue(shader,"g",0) 
dxSetShaderValue(shader,"b",255) 

And when i draw the shader, the myTextureOrTarget becomes pink (as in this example), the same way as if i drew it with tocolor(255,0,255,255) argument outside of the shader

Any suggestion is appreciated. Thanks

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