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/src/toets.c
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/src/toets.c')
-rw-r--r--source/blender/src/toets.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index 62f31f7f585..8eba2c0acd8 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -217,8 +217,8 @@ void schrijfplaatje(char *name)
ibuf->ftype |= (R.r.quality & OPENEXR_COMPRESS);
- if(R.rectz && (R.r.subimtype & R_OPENEXR_ZBUF))
- ibuf->zbuf = (int *)R.rectz;
+ if(R.rectzf && (R.r.subimtype & R_OPENEXR_ZBUF))
+ ibuf->zbuf_float = R.rectzf;
}
#endif
else if((R.r.imtype==R_TARGA) || (R.r.imtype==R_PNG)) {
@@ -241,7 +241,7 @@ void schrijfplaatje(char *name)
RE_make_existing_file(name);
- if(IMB_saveiff(ibuf, name, IB_rect | IB_zbuf)==0) {
+ if(IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat)==0) {
perror(name);
G.afbreek= 1;
}