Jump to content

How to make a transparent texture? [Shader]


Recommended Posts

Hello guys, I tried to make a shader to standard texture become transparent

here it is:98b05bedf571.jpg

I searching for something in Shader_examples

This is code give me Kernell:

struct PSInput 
{ 
    float4 Diffuse      : COLOR0; 
}; 
  
float4 PixelShaderFunction( PSInput PS ) : COLOR0 
{ 
    float4 color = PS.Diffuse; 
     
    color.a = 0.5; 
     
    return color; 
} 
  
technique 
{ 
    pass p0 
    { 
        PixelShader     = compile ps_2_0 PixelShaderFunction(); 
    } 
} 
  

but turned:

a8444ab45685.png

71be980dd73d.png

but still some simple texture become transparent such as the leaves of trees and some vegetation and shadow peds:

a515edb066a0.png

Help make it, sorry for my bad English.

Link to comment
  • 5 years later...
On 14/01/2015 at 15:32, FranklinRoosevelt said:

Hello guys, I tried to make a shader to standard texture become transparent

  Reveal hidden contents

here it is:98b05bedf571.jpg

I searching for something in Shader_examples

This is code give me Kernell:

but turned:

  Reveal hidden contents

a8444ab45685.png

71be980dd73d.png

but still some simple texture become transparent such as the leaves of trees and some vegetation and shadow peds:

  Hide contents

a515edb066a0.png

Help make it, sorry for my bad English.

Wow, do you have this texture to give me? Does it work on mta servers?

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