Einheit-101 Posted January 30, 2017 Share Posted January 30, 2017 (edited) 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 January 30, 2017 by Einheit-101 Link to comment
Einheit-101 Posted February 3, 2017 Author Share Posted February 3, 2017 @Ren_712 maybe you? Thx in advance! Link to comment
Ren_712 Posted February 5, 2017 Share Posted February 5, 2017 How many textures do You need ? Blending them in one layer would be much more efficient. Apply a single renderTarget instead of many textures. Link to comment
Einheit-101 Posted February 5, 2017 Author Share Posted February 5, 2017 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
Ren_712 Posted February 5, 2017 Share Posted February 5, 2017 myRT = Create RT (with alpha channel) Set RT (MyRT) Draw do said RT - image1 (r,g,b,a) Draw do said RT - image2 (r,g,b,a) Draw do said RT - image3 (r,g,b,a) SetRT() dxSetShaderValue (myShader, "sDetailTex", myRT) Link to comment
Einheit-101 Posted February 6, 2017 Author Share Posted February 6, 2017 Thank you, i will try and report back when i have time. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now