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:
authorJeroen Bakker <jeroen@blender.org>2022-11-09 15:18:12 +0300
committerJeroen Bakker <jeroen@blender.org>2022-11-09 15:18:12 +0300
commit0a01bec40061cea4070c9d21b93f6123c7c1a356 (patch)
treee848f693a2c958702825ea6b6e6c52f4509fee9d /source/blender/gpu/intern/gpu_codegen.cc
parentd63d2c8b9ea151750d38a391dc1083992b5d53c8 (diff)
Fixed using correct texture.
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.cc')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc
index aa0f86d46e4..da00f9850c8 100644
--- a/source/blender/gpu/intern/gpu_codegen.cc
+++ b/source/blender/gpu/intern/gpu_codegen.cc
@@ -392,9 +392,9 @@ void GPUCodegen::generate_resources()
const char *name = info.name_buffer.append_sampler_name(tex->sampler_name);
info.sampler(0, ImageType::FLOAT_2D_ARRAY, name, Frequency::BATCH);
}
- else if (tex->camera) {
+ else if (tex->camera && tex->camera[0]) {
const char *name = info.name_buffer.append_sampler_name(tex->sampler_name);
- info.sampler(0, ImageType::FLOAT_2D, name, Frequency::BATCH);
+ info.sampler(slot++, ImageType::FLOAT_2D, name, Frequency::BATCH);
}
else if (tex->tiled_mapping_name[0] != '\0') {
const char *name = info.name_buffer.append_sampler_name(tex->sampler_name);