diff options
author | Ton Roosendaal <ton@blender.org> | 2005-01-07 17:11:00 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-01-07 17:11:00 +0300 |
commit | 326c0a08a44f2922cf297090bf99a1ba5756eba5 (patch) | |
tree | 6979f04fb6f0478670b69cd75240743db5f016ad /source/blender/render/intern/include | |
parent | aa3656dc452f5c3395ba507347d63613e221668f (diff) |
Another round of cleanups for render code;
- removed ugly pointerhack from OSA render (negative indices denoted
pointers). this should solve memory errors when using >1.5 gig mem
- cleaned up usage of zbuffer values. These are signed in Blender, and
treated as unsigned all over, giving confusing code
- fixed incorrect gamma-adding for halos (caused in after xmas commit)
And bugfix #2101; wire render didn't give correct rendering for mist.
This caused by fact wires are 2D pixel lines, and not correctly filled
in faces. Retrieving the 3d coordinate while render cannot use a face-
equation then. Solved by retrieving 3D coordinate based on zbuffer value.
Still todo here: calculating correct texture coordinates for wire-edges
that are no faces.
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r-- | source/blender/render/intern/include/pixelshading.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/include/rendercore.h | 16 | ||||
-rw-r--r-- | source/blender/render/intern/include/zbuf.h | 2 |
3 files changed, 5 insertions, 15 deletions
diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h index 2f888cf05cf..8a1b6b7007c 100644 --- a/source/blender/render/intern/include/pixelshading.h +++ b/source/blender/render/intern/include/pixelshading.h @@ -59,7 +59,7 @@ void *renderHaloPixel(RE_COLBUFTYPE *collector, float x, float y, int haloNr) ; void setSkyBlendingMode(enum RE_SkyAlphaBlendingType mode); void shadeHaloFloat(HaloRen *har, - float *col, unsigned int zz, + float *col, int zz, float dist, float xn, float yn, short flarec); diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h index 44aedf5392a..158977cef5a 100644 --- a/source/blender/render/intern/include/rendercore.h +++ b/source/blender/render/intern/include/rendercore.h @@ -57,10 +57,8 @@ typedef struct ShadeResult typedef struct PixStr { struct PixStr *next; - int vlak0, vlak; - unsigned int z; - unsigned int mask; - short aantal, ronde; + int facenr, z; + unsigned short mask, amount; } PixStr; /* ------------------------------------------------------------------------- */ @@ -104,7 +102,7 @@ void zbufshadeDA(void); /* Delta Accum Pixel Struct */ /** * Also called in: zbuf.c */ -void *shadepixel(float x, float y, int vlaknr, int mask, float *col); +void *shadepixel(float x, float y, int z, int facenr, int mask, float *col); /** * A cryptic but very efficient way of counting the number of bits that @@ -112,13 +110,5 @@ void *shadepixel(float x, float y, int vlaknr, int mask, float *col); */ int count_mask(unsigned short mask); -/* These defines are only used internally :) */ -/* dirty hack: pointers are negative, indices positive */ -/* pointers should be converted to positive numbers */ - -#define IS_A_POINTER_CODE(a) ((a)<0) -#define POINTER_FROM_CODE(a) ((void *)(-(a))) -#define POINTER_TO_CODE(a) (-(long)(a)) - #endif /* RENDER_EXT_H */ diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index 73f6644650f..003342ee9f1 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -67,7 +67,7 @@ struct VlakRen; * @param y The height of the rectangle * @param val The value used to fill the rectangle. */ -void fillrect(unsigned int *rect, int x, int y, unsigned int val); +void fillrect(int *rect, int x, int y, int val); /** * Converts a world coordinate into a homogenous coordinate in view |