Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-03-11 16:52:55 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-03-11 16:52:55 +0300
commite1e772a80243f3c279fcd076c8311301e8885d41 (patch)
treeaef8e3355b271e96a82428ba764a97dac83edca1 /source/blender/gpu
parentc4beb518de5382a23a2d1cd7b7688f24b5f36c4d (diff)
Cleanup: add comment explaining reason for volume texture swizzling
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_draw_smoke.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_draw_smoke.c b/source/blender/gpu/intern/gpu_draw_smoke.c
index aa7789b3342..546faadbda4 100644
--- a/source/blender/gpu/intern/gpu_draw_smoke.c
+++ b/source/blender/gpu/intern/gpu_draw_smoke.c
@@ -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);