diff options
author | Ton Roosendaal <ton@blender.org> | 2005-01-07 18:40:57 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-01-07 18:40:57 +0300 |
commit | ac82b483807ac5d6b68d8f03dc955c03643c8a18 (patch) | |
tree | bac5dac5e5d5585c15533a85ed6ee3dd422efc9c /source/blender/yafray/intern/export_Plugin.cpp | |
parent | 511b3096111b142b6431597bc5ea4965531b4637 (diff) |
Fixed signed/unsigned conversion for zbuffer (note; zbuf is signed int!)
Diffstat (limited to 'source/blender/yafray/intern/export_Plugin.cpp')
-rw-r--r-- | source/blender/yafray/intern/export_Plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/yafray/intern/export_Plugin.cpp b/source/blender/yafray/intern/export_Plugin.cpp index 79286429b7a..f0b85f8aa27 100644 --- a/source/blender/yafray/intern/export_Plugin.cpp +++ b/source/blender/yafray/intern/export_Plugin.cpp @@ -194,7 +194,7 @@ bool yafrayPluginRender_t::initExport() while (--count) bpt[count] = 0xff800000; cout << "Image initialized" << endl; - unsigned int *zbuf=R.rectz; + int *zbuf=R.rectz; count = R.rectx*R.recty; while (--count) zbuf[count] = 0x7fffffff; cout << "Zbuffer initialized" << endl; @@ -1717,12 +1717,12 @@ bool blenderYafrayOutput_t::putPixel(int x, int y, const yafray::color_t &c, } // depth values - unsigned int* zbuf = R.rectz + px; + int* zbuf = R.rectz + px; depth -= R.near; float mz = R.far - R.near; if (depth<0) depth=0; else if (depth>mz) depth=mz; if (mz!=0.f) mz = 2147483647.f/mz; - zbuf[x] = (unsigned int)(depth*mz); + zbuf[x] = (int)(depth*mz); out++; if(out==4096) |