Tomy
03-24-2005, 05:52 AM
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 :)
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 :)