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>2004-12-27 22:28:52 +0300
committerTon Roosendaal <ton@blender.org>2004-12-27 22:28:52 +0300
commit610cec55c7134c3dada168530ee833276677bae7 (patch)
tree428e061d0d42b79b9332688951baa3f189a3a985 /source/blender/render/intern/include/rendercore.h
parentc43c38140d59e9204d55a62c87e0b701f50f2538 (diff)
Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render: - New; support for dual CPU render (SDL thread) Currently only works with alternating scanlines, but gives excellent performance. For both normal render as unified implemented. Note the "mutex" locks on z-transp buffer render and imbuf loads. - This has been made possible by major cleanups in render code, especially getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct OSA or using Materials or Texture data to write to. - Made normal render fully 4x32 floats too, and removed all old optimizes with chars or shorts. - Made normal render and unified render use same code for sky and halo render, giving equal (and better) results for halo render. Old render now also uses PostProcess options (brightness, mul, gamma) - Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer after render. Using PostProcess menu you will note an immediate re- display of image too (32 bits RGBA) - Added "Hue" and "Saturation" sliders to PostProcess options - Render module is still not having a "nice" API, but amount of dependencies went down a lot. Next todo: remove abusive "previewrender" code. The last main global in Render (struct Render) now can be re-used for fully controlling a render, to allow multiple "instances" of render to open. - Renderwindow now displays a smal bar on top with the stats, and keeps the stats after render too. Including "spare" page support. Not only easier visible that way, but also to remove the awkward code that was drawing stats in the Info header (extreme slow on some ATIs too) - Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping defines. - I might have forgotten stuff... and will write a nice doc on the architecture!
Diffstat (limited to 'source/blender/render/intern/include/rendercore.h')
-rw-r--r--source/blender/render/intern/include/rendercore.h78
1 files changed, 28 insertions, 50 deletions
diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h
index 964300ad27b..e66e405d383 100644
--- a/source/blender/render/intern/include/rendercore.h
+++ b/source/blender/render/intern/include/rendercore.h
@@ -54,20 +54,36 @@ typedef struct ShadeResult
} ShadeResult;
-float mistfactor(float *co); /* dist en hoogte, return alpha */
+typedef struct PixStr
+{
+ struct PixStr *next;
+ int vlak0, vlak;
+ unsigned int z;
+ unsigned int mask;
+ short aantal, ronde;
+} PixStr;
+
+/* ------------------------------------------------------------------------- */
+
+typedef struct PixStrMain
+{
+ struct PixStr *ps;
+ struct PixStrMain *next;
+} PixStrMain;
+
+
+float mistfactor(float *co); /* dist and height, return alpha */
-void render_lighting_halo(struct HaloRen *har, float *colf);
-unsigned int calchalo_z(struct HaloRen *har, unsigned int zz);
-void add_halo_flare(void);
+void add_halo_flare(void);
-void shade_input_set_coords(ShadeInput *shi, float u, float v, int i1, int i2, int i3);
+void shade_input_set_coords(ShadeInput *shi, float u, float v, int i1, int i2, int i3);
-void shade_color(struct ShadeInput *shi, ShadeResult *shr);
-void shade_lamp_loop(struct ShadeInput *shi, ShadeResult *shr);
+void shade_color(struct ShadeInput *shi, ShadeResult *shr);
+void shade_lamp_loop(struct ShadeInput *shi, ShadeResult *shr);
-float fresnel_fac(float *view, float *vn, float fresnel, float fac);
-void calc_R_ref(struct ShadeInput *shi);
-float spec(float inp, int hard);
+float fresnel_fac(float *view, float *vn, float fresnel, float fac);
+void calc_R_ref(struct ShadeInput *shi);
+float spec(float inp, int hard);
/* -------- ray.c ------- */
@@ -76,36 +92,12 @@ extern void ray_trace(ShadeInput *, ShadeResult *);
extern void ray_ao(ShadeInput *, World *, float *);
/**
- * Apply the background (sky). Depending on the active alphamode and
- * worldmode, different filling strategies are applied.
- * Active alphamode = R.r.alphamode
- * Active worldmode = R.wrld.mode
- * <LI>
- * <IT> R_ALPHAPREMUL - do not fill sky, but apply alpha to colours
- * <IT> R_ALPHAKEY - do not fill sky, do not apply alpha to colours
- * <IT> R_ADDSKY - fill skycolour in the background, blend
- * transparent colours with the background
- * (there's also a world dependency here?
- * <LI>
- * <IT> R.wrld.mode == WO_MIST
- * <IT> R.r.bufflag == 1, R.flag == R_SEC_FIELD
- * <IT> R.wrld.skytype == ( WO_SKYBLEND ^ WO_SKYTEX)
- * <IT> R.wrld.skytype == WO_SKYPAPER
- * <IT> R.r.mode == R_PANORAMA )
- * </LI>
- * </LI>
- * @param rect
- * @param y
- */
-void scanlinesky(char *rect, int y);
-
-/**
- * Do z buffer stuff.
+ * Do z buffer and shade
*/
void zbufshade(void);
/**
- * Insert transparent faces into the z buffer?
+ * zbuffer and shade, anti aliased
*/
void zbufshadeDA(void); /* Delta Accum Pixel Struct */
@@ -113,20 +105,6 @@ 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_short(float x, float y, int vlaknr, int mask, unsigned short *shortcol);
-
-/**
- * Shade the pixel at xn, yn for halo har, and write the result to col.
- * Also called in: previewrender.c
- * @param har The halo to be rendered on this location
- * @param col [unsigned int 3] The destination colour vector
- * @param zz Some kind of distance
- * @param dist Square of the distance of this coordinate to the halo's center
- * @param x [f] Pixel x relative to center
- * @param y [f] Pixel y relative to center
- * @param flarec Flare counter? Always har->flarec...
- */
-/* void shadehalo(struct HaloRen *har, char *col, unsigned int zz, float dist, float x, float y, short flarec); */
/**
* A cryptic but very efficient way of counting the number of bits that