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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-10 21:09:36 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-05-10 21:09:36 +0400
commit072a882d035936c7eeca6abeb8781a330ebd07d5 (patch)
treed9b2c0b51f409ad6706ad38add5ea651e8acd836 /intern
parent591a0910037d3ca2de511c6e2790d5585a3991fc (diff)
Fix #31379: cycles not recognizing 16 bit tiff as float image.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/render/image.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/intern/cycles/render/image.cpp b/intern/cycles/render/image.cpp
index 856363491ca..b9e02467450 100644
--- a/intern/cycles/render/image.cpp
+++ b/intern/cycles/render/image.cpp
@@ -60,19 +60,13 @@ static bool is_float_image(const string& filename)
if(in->open(filename, spec)) {
/* check the main format, and channel formats;
- if any are non-integer, we'll need a float texture slot */
- if(spec.format == TypeDesc::HALF ||
- spec.format == TypeDesc::FLOAT ||
- spec.format == TypeDesc::DOUBLE) {
+ if any take up more than one byte, we'll need a float texture slot */
+ if(spec.format.basesize() > 1)
is_float = true;
- }
for(size_t channel = 0; channel < spec.channelformats.size(); channel++) {
- if(spec.channelformats[channel] == TypeDesc::HALF ||
- spec.channelformats[channel] == TypeDesc::FLOAT ||
- spec.channelformats[channel] == TypeDesc::DOUBLE) {
+ if(spec.channelformats[channel].basesize() > 1)
is_float = true;
- }
}
in->close();