From ac82b483807ac5d6b68d8f03dc955c03643c8a18 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 7 Jan 2005 15:40:57 +0000 Subject: Fixed signed/unsigned conversion for zbuffer (note; zbuf is signed int!) --- source/blender/yafray/intern/export_Plugin.cpp | 6 +++--- 1 file 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) -- cgit v1.2.3