Jump to content

Little question about tiling a texture with a shader


Einheit-101

Recommended Posts

Hello! I managed to create a little shader which applies a texture over a existing vehicle texture. The only issue i have is the fact, that i want this texture to be applied multiple times to the vehicle in a row, lets say for example 4-8x tiling, since its a detail texture.

Also, is there a way to manipulate the alpha of the sDetailTexture so i can manipulate its strength with Lua?

Shader code:

texture sDetailTexture;

sampler SamplerDetail = sampler_state
{
    Texture = (sDetailTexture);
	AddressU = Clamp;
	AddressV = Clamp;
};

technique simple
{
    pass P0
    {
        Texture[0] = sDetailTexture;
		AlphaBlendEnable = TRUE;
		DepthBias = -0.0003;
		AlphaRef = 1;
    }
}

 

Edited by Einheit-101
Link to comment

Its only one texture Layer that should be Tiled several times. My goal is to reduce texture size because its more efficient to use 4x 512x512 texture instead of 1x 2048x2048. And after all I want to set the alpha of that texture to make the effect less strong, it's basically a single dirt texture that gets more dirty after some seconds.

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