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>2003-12-22 00:52:51 +0300
committerTon Roosendaal <ton@blender.org>2003-12-22 00:52:51 +0300
commitec99255c2729b555f34d75c0a2c59f141e327924 (patch)
tree9b8b03fca39f16c2dfc8b05627bda786786fc140 /source/blender/render/intern/include/pixelshading.h
parent16eec383fda747ff97b44e3f93cfc7e0b1033174 (diff)
Phew, a lot of work, and no new features...
Main target was to make the inner rendering loop using no globals anymore. This is essential for proper usage while raytracing, it caused a lot of hacks in the raycode as well, which even didn't work correctly for all situations (textures especially). Done this by creating a new local struct RenderInput, which replaces usage of the global struct Render R. The latter now only is used to denote image size, viewmatrix, and the like. Making the inner render loops using no globals caused 1000s of vars to be changed... but the result definitely is much nicer code, which enables making 'real' shaders in a next stage. It also enabled me to remove the hacks from ray.c Then i went to the task of removing redundant code. Especially the calculus of texture coords took place (identical) in three locations. Most obvious is the change in the unified render part, which is much less code now; it uses the same rendering routines as normal render now. (Note; not for halos yet!) I also removed 6 files called 'shadowbuffer' something. This was experimen- tal stuff from NaN days. And again saved a lot of double used code. Finally I went over the blenkernel and blender/src calls to render stuff. Here the same local data is used now, resulting in less dependency. I also moved render-texture to the render module, this was still in Kernel. (new file: texture.c) So! After this commit I will check on the autofiles, to try to fix that. MSVC people have to do it themselves. This commit will need quite some testing help, but I'm around!
Diffstat (limited to 'source/blender/render/intern/include/pixelshading.h')
-rw-r--r--source/blender/render/intern/include/pixelshading.h59
1 files changed, 11 insertions, 48 deletions
diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h
index 3df3067f0a5..dd429f9ff61 100644
--- a/source/blender/render/intern/include/pixelshading.h
+++ b/source/blender/render/intern/include/pixelshading.h
@@ -48,19 +48,19 @@
* t[2] - jitter mask
* t[3] - type ZB_POLY or ZB_HALO
* t[4] - max. distance
+ * mask is pixel coverage in bits
* @return pointer to the object
*/
-void *renderPixel(float x, float y, int *t);
+void *renderPixel(float x, float y, int *t, int mask);
+
+void *renderHaloPixel(float x, float y, int haloNr) ;
-/**
- * Spothalos on otherwise empty pixels.
- */
-void renderSpotHaloPixel(float x, float y, float* colbuf);
-/**
- * Set the sky blending to the indicated type.
- */
void setSkyBlendingMode(enum RE_SkyAlphaBlendingType mode);
+void shadeHaloFloat(HaloRen *har,
+ float *col, unsigned int zz,
+ float dist, float xn,
+ float yn, short flarec);
/**
* Get the sky blending mode.
@@ -71,47 +71,10 @@ enum RE_SkyAlphaBlendingType getSkyBlendingMode(void);
*/
void renderSkyPixelFloat(float x, float y);
-/* ------------------------------------------------------------------------- */
-/* All these are supposed to be internal. I should move these to a separate */
-/* header. */
-
-/**
- * Determine colour for pixel at SCS x,y for face <vlaknr>. Result end up in
- * <collector>
- * @return pointer to this object's VlakRen
- */
-void *renderFacePixel(float x, float y, int vlaknr);
-
-/**
- * Render this pixel for halo haloNr. Leave result in <collector>.
- * @return pointer to this object's HaloRen
- */
-void *renderHaloPixel(float x, float y, int haloNr);
-
-/**
- * Shade the halo at the given location
- */
-void shadeHaloFloat(HaloRen *har, float *col, unsigned int zz,
- float dist, float xn, float yn, short flarec);
-
-/**
- * Shade a sky pixel on a certain line, into collector[4]
- * The x-coordinate (y as well, actually) are communicated through
- * R.view[3]
- */
-void shadeSkyPixel(float x, float y);
-
-void shadeSpotHaloPixelFloat(float *col);
-void spotHaloFloat(struct LampRen *lar, float *view, float *intens);
-void shadeLampLusFloat(void);
-
-/* this should be replaced by shadeSpotHaloPixelFloat(), but there's */
-/* something completely fucked up here with the arith. */
-/* void renderspothaloFix(unsigned short *col); */
-void renderspothaloFix(float *col);
-
/* used by shadeSkyPixel: */
-void shadeSkyPixelFloat(float y);
+void shadeSkyPixelFloat(float y, float *view);
+void renderSpotHaloPixel(float x, float y, float *target);
+void shadeSkyPixel(float fx, float fy);
void fillBackgroundImage(float x, float y);
/* ------------------------------------------------------------------------- */