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:
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c4
-rw-r--r--source/blender/gpu/intern/gpu_texture.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 85543ca29b2..38e847da967 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -1294,7 +1294,7 @@ void GPU_pbvh_grid_buffers_update(
diffuse_color, vd->color);
}
else {
- F3TOCHAR3(diffuse_color, vd->color);
+ unit_float_to_uchar_clamp_v3(vd->color, diffuse_color);
}
}
}
@@ -1336,7 +1336,7 @@ void GPU_pbvh_grid_buffers_update(
vd->color);
}
else {
- F3TOCHAR3(diffuse_color, vd->color);
+ unit_float_to_uchar_clamp_v3(vd->color, diffuse_color);
}
}
}
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 1c97c2ce811..f50465189b2 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -74,7 +74,7 @@ static unsigned char *GPU_texture_convert_pixels(int length, const float *fpixel
p = pixels = MEM_callocN(sizeof(unsigned char) * len, "GPUTexturePixels");
for (int a = 0; a < len; a++, p++, fp++)
- *p = FTOCHAR((*fp));
+ *p = unit_float_to_uchar_clamp((*fp));
return pixels;
}