Shading+blending 3d texture

hi,

I am using this simple shader to color a 3d texture using a 1d texture as a color palette.

uniform sampler3D oTexture;
uniform sampler1D oPalette;
void main()
{
gl_FragColor = texture1D(oPalette, texture3D(oTexture, gl_TexCoord[0].xyz));
}’;

When I enable blending using:

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

the appearance of the texture becomes so dimmed… hardly visible… colored though… any ideas?

Thanks :slight_smile:

Well, the obvious solution would be to boost the alpha a bit in your lookup table.

The alpha lookup table I am using is linear against the color index with slope=1. I boosted the alpha values… but there was no change in the output :confused:

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.