VolumeRendering
3D Texture Parameters
← 3D Texture Example | ● | Marble Example →
3D texture interpolation mode:
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
filter type | filter effect |
---|---|
GL_LINEAR | trilinear interpolation |
GL_NEAREST | nearest neighbor (no interpolation) |
GL_LINEAR_MIPMAP_LINEAR | trilinear interpolation with mipmapping |
GL_NEAREST_MIPMAP_NEAREST | nearest neighbor with mipmapping |
3D texture clamping:
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_S,GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_R,GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_T,GL_CLAMP);
glTexParameteri(GL_TEXTURE_3D,GL_TEXTURE_WRAP_R,GL_CLAMP);
coordinate mapping | mapping effect |
---|---|
GL_CLAMP | nearest border color is extended to outside |
GL_REPEAT | inside color is repeated as tile pattern |
Texturing mode for all 2D and 3D textures:
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
texturing mode | vertex color is modified by texture color via |
---|---|
GL_DECAL | linear interpolation with texture alpha |
GL_MODULATE | componentwise multiplication |
GL_BLEND | componentwise linear interpolation |
GL_REPLACE | replace vertex color with texture color |
Initially, 3D texturing is off. 3D texturing with the actually bound object is enabled via:
glEnable(GL_TEXTURE_3D);
Even if texturing is off, the state of the texture objectes is retained.
← 3D Texture Example | ● | Marble Example →