Jump to content

Change a parameter of a shader


Matt'.

Recommended Posts

Hi, I want just to change the value of DepthBias by Lua

So here, I have defined a parameter which I named parameter1, and the rest is just for replace.fx

texture gTexture;
float parameter1;

technique TexReplace
{
    pass P0
    {
		DepthBias =	parameter1;
        Texture[0] = gTexture;
    }
}

And now, we gonna go to Lua File : (the shader is working etc...)

dxSetShaderValue(shader, "parameter1", -0.0006)

So here, it doesn't work, DepthBias doesn't take the value of parameter1 as I wrote in the .fx file :( !

Any help please?

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