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:
authorCampbell Barton <ideasman42@gmail.com>2012-03-09 04:41:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-09 04:41:09 +0400
commit4f7bdc59d31e94bc97955c1efeef2a8fce0c8ecd (patch)
tree7e0a36829cf52ff260821ce02716727052b95d32 /source/blender/render
parent27d43f3fd3a6fbda95cdb87e4672fe34f19c2205 (diff)
style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/include/sunsky.h80
-rw-r--r--source/blender/render/intern/source/convertblender.c2
-rw-r--r--source/blender/render/intern/source/pipeline.c2
-rw-r--r--source/blender/render/intern/source/render_texture.c2
-rw-r--r--source/blender/render/intern/source/sunsky.c8
-rw-r--r--source/blender/render/intern/source/volume_precache.c2
6 files changed, 18 insertions, 78 deletions
diff --git a/source/blender/render/intern/include/sunsky.h b/source/blender/render/intern/include/sunsky.h
index 5076a1541af..62b68484629 100644
--- a/source/blender/render/intern/include/sunsky.h
+++ b/source/blender/render/intern/include/sunsky.h
@@ -24,11 +24,6 @@
* \ingroup render
*/
-/**
- * This feature comes from Preetham paper on "A Practical Analytic Model for Daylight"
- * and example code from Brian Smits, another author of that paper in
- * http://www.cs.utah.edu/vissim/papers/sunsky/code/
- * */
#ifndef __SUNSKY_H__
#define __SUNSKY_H__
@@ -41,14 +36,14 @@ typedef struct SunSky
short effect_type, skyblendtype, sky_colorspace;
float turbidity;
float theta, phi;
-
+
float toSun[3];
/*float sunSpectralRaddata[SPECTRUM_MAX_COMPONENTS];*/
float sunSolidAngle;
float zenith_Y, zenith_x, zenith_y;
-
+
float perez_Y[5], perez_x[5], perez_y[5];
/* suggested by glome in
@@ -75,75 +70,16 @@ typedef struct SunSky
float atm_BetaMie[3];
float atm_BetaDashMie[3];
float atm_BetaRM[3];
-}SunSky;
+} SunSky;
-/**
- * InitSunSky:
- * this function compute some sun,sky parameters according to input parameters and also initiate some other sun, sky parameters
- * parameters:
- * sunSky, is a structure that contains informtion about sun, sky and atmosphere, in this function, most of its values initiated
- * turb, is atmosphere turbidity
- * toSun, contains sun direction
- * horizon_brighness, controls the brightness of the horizon colors
- * spread, controls colors spreed at horizon
- * sun_brightness, controls sun's brightness
- * sun_size, controls sun's size
- * back_scatter, controls back scatter light
- * */
void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_brightness,
- float spread,float sun_brightness, float sun_size, float back_scatter,
- float skyblendfac, short skyblendtype, float sky_exposure, float sky_colorspace);
-
-/**
- * GetSkyXYZRadiance:
- * this function compute sky radiance according to a view parameters `theta' and `phi'and sunSky values
- * parameters:
- * sunSky, sontains sun and sky parameters
- * theta, is sun's theta
- * phi, is sun's phi
- * color_out, is computed color that shows sky radiance in XYZ color format
- * */
-void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float color_out[3]);
+ float spread,float sun_brightness, float sun_size, float back_scatter,
+ float skyblendfac, short skyblendtype, float sky_exposure, float sky_colorspace);
-/**
- * GetSkyXYZRadiancef:
- * this function compute sky radiance according to a view direction `varg' and sunSky values
- * parameters:
- * sunSky, sontains sun and sky parameters
- * varg, shows direction
- * color_out, is computed color that shows sky radiance in XYZ color format
- * */
-void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_out[3]);
-
-/**
- * InitAtmosphere:
- * this function intiate sunSky structure with user input parameters.
- * parameters:
- * sunSky, contains information about sun, and in this function some atmosphere parameters will initiated
- * sun_intens, shows sun intensity value
- * mief, Mie scattering factor this factor currently call with 1.0
- * rayf, Rayleigh scattering factor, this factor currently call with 1.0
- * inscattf, inscatter light factor that range from 0.0 to 1.0, 0.0 means no inscatter light and 1.0 means full inscatter light
- * extincf, extinction light factor that range from 0.0 to 1.0, 0.0 means no extinction and 1.0 means full extinction
- * disf, is distance factor, multiplyed to pixle's z value to compute each pixle's distance to camera,
- * */
+void GetSkyXYZRadiance(struct SunSky *sunsky, float theta, float phi, float color_out[3]);
+void GetSkyXYZRadiancef(struct SunSky *sunsky, const float varg[3], float color_out[3]);
void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float rayf, float inscattf, float extincf, float disf);
-
-/**
- * AtmospherePixleShader:
- * this function apply atmosphere effect on a pixle color `rgb' at distance `s'
- * parameters:
- * sunSky, contains information about sun parameters and user values
- * view, is camera view vector
- * s, is distance
- * rgb, contains rendered color value for a pixle
- * */
-void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float rgb[3]);
-
-/**
- * ClipColor:
- * clip a color to range [0,1];
- * */
+void AtmospherePixleShader( struct SunSky *sunSky, float view[3], float s, float rgb[3]);
void ClipColor(float c[3]);
#endif /*__SUNSKY_H__*/
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 4f891ea17c2..89e10cf37eb 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -5052,7 +5052,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
/* if no camera, viewmat should have been set! */
if(use_camera_view && camera) {
- /* called before but need to call again incase of lens animation from the
+ /* called before but need to call again in case of lens animation from the
* above call to scene_update_for_newframe, fixes bug. [#22702].
* following calls dont depend on 'RE_SetCamera' */
RE_SetCamera(re, camera);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index dfa5acc81e7..d06df07f6b0 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2008,7 +2008,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
if(write_still && !G.afbreek) {
if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
- /* operator checks this but incase its called from elsewhere */
+ /* operator checks this but in case its called from elsewhere */
printf("Error: cant write single images with a movie format!\n");
}
else {
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 5dbb98d20c2..76b9537116b 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -651,7 +651,7 @@ static float mg_distNoiseTex(Tex *tex, float *texvec, TexResult *texres)
static float voronoiTex(Tex *tex, float *texvec, TexResult *texres)
{
int rv = TEX_INT;
- float da[4], pa[12]; /* distance and point coordinate arrays of 4 nearest neighbours */
+ float da[4], pa[12]; /* distance and point coordinate arrays of 4 nearest neighbors */
float aw1 = fabs(tex->vn_w1);
float aw2 = fabs(tex->vn_w2);
float aw3 = fabs(tex->vn_w3);
diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c
index 71ca2e056ac..1ecf197f694 100644
--- a/source/blender/render/intern/source/sunsky.c
+++ b/source/blender/render/intern/source/sunsky.c
@@ -20,6 +20,10 @@
/** \file blender/render/intern/source/sunsky.c
* \ingroup render
+ *
+ * This feature comes from Preetham paper on "A Practical Analytic Model for Daylight"
+ * and example code from Brian Smits, another author of that paper in
+ * http://www.cs.utah.edu/vissim/papers/sunsky/code/
*/
@@ -129,7 +133,7 @@ static float PerezFunction(struct SunSky *sunsky, const float *lam, float theta,
* InitSunSky:
* this function compute some sun,sky parameters according to input parameters and also initiate some other sun, sky parameters
* parameters:
- * sunSky, is a structure that contains informtion about sun, sky and atmosphere, in this function, most of its values initiated
+ * sunSky, is a structure that contains information about sun, sky and atmosphere, in this function, most of its values initiated
* turb, is atmosphere turbidity
* toSun, contains sun direction
* horizon_brighness, controls the brightness of the horizon colors
@@ -345,7 +349,7 @@ static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
/**
* InitAtmosphere:
- * this function intiate sunSky structure with user input parameters.
+ * this function initiate sunSky structure with user input parameters.
* parameters:
* sunSky, contains information about sun, and in this function some atmosphere parameters will initiated
* sun_intens, shows sun intensity value
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index 7ca67abe3a1..f99eb0298bf 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -437,7 +437,7 @@ static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Materi
if (re->test_break(re->tbh)) break;
}
- /* normalisation factor to conserve energy */
+ /* normalization factor to conserve energy */
energy_ms = total_ms_energy(re, do_test_break, sr, sg, sb, n);
fac *= (energy_ss / energy_ms);