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:
authorTon Roosendaal <ton@blender.org>2006-01-12 01:36:31 +0300
committerTon Roosendaal <ton@blender.org>2006-01-12 01:36:31 +0300
commit0665f0d64799e6a38c4ca0930df73271f246e422 (patch)
treefa488d33452f0bfc6ec91e5bbbec726afcbcb9f3 /source/blender/imbuf/IMB_imbuf_types.h
parentb92fa4151645d50e40faa8f4aaea4b7f6149947c (diff)
Orange;
Until now, the zbuffer was written straight from the internal zbuffer, which has values that are inverse-proportional (like 1.0/z) which makes it very hard to use it for postprocess, like zblur or other composit effects that require Z. Based on info from ILM, the values stored for Z in exr files is the actual distance from a camera. I think that's about time to migrate to that convention! By default now, after render, the z values are converted to floats. This saves in exr files now, but not in the Iris Z files. That latter was a blender-only anyway, so might be not a real hassle to drop. :) You can see the difference in the image window, but notice the range now is linear mapped from camera clipstart to clipend. Note; I just discover that ortho Z values need a different correction...
Diffstat (limited to 'source/blender/imbuf/IMB_imbuf_types.h')
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 652c15afdd3..ef1aa631fc6 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -88,7 +88,8 @@ typedef struct ImBuf{
char name[1023]; /**< The file name assocated with this image */
char namenull; /**< Unused don't want to remove it thought messes things up */
int userflags; /**< Used to set imbuf to Dirty and other stuff */
- int *zbuf; /**< z buffer data */
+ int *zbuf; /**< z buffer data, original zbuffer */
+ float *zbuf_float; /**< z buffer data, camera coordinates */
void *userdata;
unsigned char *encodedbuffer; /**< Compressed image only used with png currently */
unsigned int encodedsize; /**< Size of data written to encodedbuffer */
@@ -133,6 +134,7 @@ typedef enum {
#define IB_mem (1 << 14)
#define IB_rectfloat (1 << 15)
+#define IB_zbuffloat (1 << 16)
/*
* The bit flag is stored in the ImBuf.ftype variable.