system
1
Hello everyone,
i’d like to know if it possible to create a Pass where i multiply the texture alpha with a loaded constant color
SetTexture [_MainTex] {
constantColor [_Ccolor]
combine texture.a * constant
}
does anyone know how this is achievable?
thanks!
There is a second form of combine
which calculates the alpha separately from the color, like this:
combine color, alpha
So you probably want something like this:
combine texture, texture * constant
Note: untested code! Let me know if that doesn’t work, I can investigate further…
system
3
Hi Graham, i am not very familiar with the unity shader system, any help is appreciated
if i had to write GLSL it would be something like this
{
float4 color = tex2D(diffuseTextureSampler, in.UV);
color.RGB = materialConstantColor.RGB;
}
so basically my final pixel will be (texture.ALPHA + constant.RGB)
any ideas?