Jump to content

Apply shader over previosly applied shader on same texture


JeViCo

Recommended Posts

Hello guys! I've recently found out that i can't use 2+ different shaders on same texture. I tried to work around layered argument in dxCreateShader function and DepthBias variable in shader and got nothing. Only one shader can exist at the time.
I tried to apply one shader over another one so I used gTexture0 variable (defined in mta-helper.fx) to get material and draw my own texture over it. What am i missing?

shader pseudo-code:

// Fix by JeViCo
// Link: https://vk.com/jevico

texture gTexture0 < string textureState="0,Texture"; >;

texture tex;

technique Draw {
    pass P0 {
        Texture[0] = gTexture0;
        AlphaBlendEnable = true;
    }
    
    pass P1 {
        Texture[0] = tex;
    }
}

Of course i can make single-file shader however this is not what i'm trying to achieve

Edited by JeViCo
details added
  • Confused 1
Link to comment
  • 4 weeks later...
  • Scripting Moderators
11 hours ago, JeViCo said:

solved

Can you share your solution so others might find it and do not create other topics for that?

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