Cleanup: add comment explaining reason for volume texture swizzling

This commit is contained in:
2020-03-11 14:52:55 +01:00
parent c4beb518de
commit e1e772a802

View File

@@ -124,6 +124,8 @@ static GPUTexture *create_transfer_function(int type, const struct ColorBand *co
static void swizzle_texture_channel_single(GPUTexture *tex)
{
/* Swizzle texture channels so that we get useful RGBA values when sampling
* a texture with fewer channels, e.g. when using density as color. */
GPU_texture_bind(tex, 0);
GPU_texture_swizzle_channel_auto(tex, 1);
GPU_texture_unbind(tex);