Original Post
hello, I use transparency in a way that in my shader, after a sample from my texture, I check wheather sampled pixel is pink (having value 255,0,255) and if so, I set pixels alpha value to 0. 1st question: is it a performance kill? I mean this code in my shader: 2nd question: this way I get very sharp edges of my opaque part,... how can I achieve smooth edges of my opaque part?
vec4 fvDiffuse = texture2D( baseMap, Texcoord );
if (fvDiffuse.r>0.9)
{
if (fvDiffuse.b>0.9)
if (fvDiffuse.g<0.1)
fvTotalDiffuse.w = 0.0;
}
else
fvTotalDiffuse.w = 1.0;