Is it possible to use the Alpha from my Vertices Diffuse Color and the alpha in the Texture? Currently I have a particle system that changes the alpha values of the vertex diffuse color over time and the texture has a transparent background. Is it possible to use both? Currently the alpha in the diffuse color has no affect on the final color. In my shader I want to use both. Is this possible?
5 replies to this topic
Sponsor:
#3 Members - Reputation: 199
Posted 09 April 2012 - 01:52 PM
I don't think the issue is in the shader:
The "IN.color" is my vertex color. The color is recognized but not the alpha.
I tried the following to test:
Still, the alpha is not recognized. I checked the vertex data before it's getting sent over and the diffuse color's alpha is set correctly.
float4 diffuse = tex2D(diffuseSampler, IN.texcoord) * IN.color; return diffuse;
The "IN.color" is my vertex color. The color is recognized but not the alpha.
I tried the following to test:
float4 diffuse = tex2D(diffuseSampler, IN.texcoord); diffuse.w = IN.color.w; return diffuse;
Still, the alpha is not recognized. I checked the vertex data before it's getting sent over and the diffuse color's alpha is set correctly.






