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>2007-04-04 17:18:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-04 17:18:41 +0400
commitafdd54fa3720c267f30e48ed45c449d80449bac0 (patch)
tree3192044fa53f6e1fd3d1b0256963c2d4c090d700 /source/blender/render
parent203e6ed82b444786d7999e88cebef84d6d429765 (diff)
moved source and text to american spelling
* colour -> color * centre -> center * normalise -> normalize * modelling -> modeling
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/include/pixelshading.h2
-rw-r--r--source/blender/render/intern/source/convertblender.c72
-rw-r--r--source/blender/render/intern/source/envmap.c4
-rw-r--r--source/blender/render/intern/source/gammaCorrectionTables.c34
-rw-r--r--source/blender/render/intern/source/pixelblending.c32
-rw-r--r--source/blender/render/intern/source/pixelshading.c12
-rw-r--r--source/blender/render/intern/source/ray.c8
-rw-r--r--source/blender/render/intern/source/rendercore.c2
-rw-r--r--source/blender/render/intern/source/renderdatabase.c2
-rw-r--r--source/blender/render/intern/source/shadbuf.c2
-rw-r--r--source/blender/render/intern/source/shadeinput.c12
-rw-r--r--source/blender/render/intern/source/shadeoutput.c36
-rw-r--r--source/blender/render/intern/source/texture.c8
-rw-r--r--source/blender/render/intern/source/zbuf.c4
14 files changed, 115 insertions, 115 deletions
diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h
index 88c93a147fc..d2235784a59 100644
--- a/source/blender/render/intern/include/pixelshading.h
+++ b/source/blender/render/intern/include/pixelshading.h
@@ -27,7 +27,7 @@
/* pixelshading.h
*
-* These functions determine what actual colour a pixel will have.
+* These functions determine what actual color a pixel will have.
*/
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index e5bfedafc97..81e78e44cc5 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -549,12 +549,12 @@ static void calc_vertexnormals(Render *re, int startvert, int startvlak, int do_
vlr->flag |= R_NOPUNOFLIP;
VecSubf(n1, v2->co, v1->co);
- Normalise(n1);
+ Normalize(n1);
VecSubf(n2, v3->co, v2->co);
- Normalise(n2);
+ Normalize(n2);
if(v4==NULL) {
VecSubf(n3, v1->co, v3->co);
- Normalise(n3);
+ Normalize(n3);
fac1= saacos(-n1[0]*n3[0]-n1[1]*n3[1]-n1[2]*n3[2]);
fac2= saacos(-n1[0]*n2[0]-n1[1]*n2[1]-n1[2]*n2[2]);
@@ -562,9 +562,9 @@ static void calc_vertexnormals(Render *re, int startvert, int startvlak, int do_
}
else {
VecSubf(n3, v4->co, v3->co);
- Normalise(n3);
+ Normalize(n3);
VecSubf(n4, v1->co, v4->co);
- Normalise(n4);
+ Normalize(n4);
fac1= saacos(-n4[0]*n1[0]-n4[1]*n1[1]-n4[2]*n1[2]);
fac2= saacos(-n1[0]*n2[0]-n1[1]*n2[1]-n1[2]*n2[2]);
@@ -623,10 +623,10 @@ static void calc_vertexnormals(Render *re, int startvert, int startvlak, int do_
}
}
- /* normalise vertex normals */
+ /* normalize vertex normals */
for(a=startvert; a<re->totvert; a++) {
VertRen *ver= RE_findOrAddVert(re, a);
- Normalise(ver->n);
+ Normalize(ver->n);
if(do_tangent) {
float *tav= RE_vertren_get_tangent(re, ver, 0);
if (tav) {
@@ -635,7 +635,7 @@ static void calc_vertexnormals(Render *re, int startvert, int startvlak, int do_
tav[0] -= ver->n[0]*tdn;
tav[1] -= ver->n[1]*tdn;
tav[2] -= ver->n[2]*tdn;
- Normalise(tav);
+ Normalize(tav);
}
}
}
@@ -685,21 +685,21 @@ static void calc_fluidsimnormals(Render *re, int startvert, int startvlak, int d
vlr->flag |= R_NOPUNOFLIP;
VecSubf(n1, v2->co, v1->co);
- Normalise(n1);
+ Normalize(n1);
VecSubf(n2, v3->co, v2->co);
- Normalise(n2);
+ Normalize(n2);
if(v4==NULL) {
VecSubf(n3, v1->co, v3->co);
- Normalise(n3);
+ Normalize(n3);
fac1= saacos(-n1[0]*n3[0]-n1[1]*n3[1]-n1[2]*n3[2]);
fac2= saacos(-n1[0]*n2[0]-n1[1]*n2[1]-n1[2]*n2[2]);
fac3= saacos(-n2[0]*n3[0]-n2[1]*n3[1]-n2[2]*n3[2]);
}
else {
VecSubf(n3, v4->co, v3->co);
- Normalise(n3);
+ Normalize(n3);
VecSubf(n4, v1->co, v4->co);
- Normalise(n4);
+ Normalize(n4);
fac1= saacos(-n4[0]*n1[0]-n4[1]*n1[1]-n4[2]*n1[2]);
fac2= saacos(-n1[0]*n2[0]-n1[1]*n2[1]-n1[2]*n2[2]);
@@ -738,13 +738,13 @@ static void calc_fluidsimnormals(Render *re, int startvert, int startvlak, int d
}
}
- /* normalise vertex normals */
+ /* normalize vertex normals */
for(a=startvert; a<re->totvert; a++) {
VertRen *ver= RE_findOrAddVert(re, a);
- Normalise(ver->n);
+ Normalize(ver->n);
if(do_tangent) {
float *tav= RE_vertren_get_tangent(re, ver, 0);
- if(tav) Normalise(tav);
+ if(tav) Normalize(tav);
}
}
@@ -1025,10 +1025,10 @@ static void make_render_halos(Render *re, Object *ob, Mesh *me, int totvert, MVe
nor[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
nor[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
nor[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
- Normalise(nor);
+ Normalize(nor);
VECCOPY(view, vec);
- Normalise(view);
+ Normalize(view);
zn= nor[0]*view[0]+nor[1]*view[1]+nor[2]*view[2];
if(zn>=0.0) hasize= 0.0;
@@ -1180,10 +1180,10 @@ static void render_particle_system(Render *re, Object *ob, Object *par, PartEff
nor[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
nor[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
nor[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
- Normalise(nor);
+ Normalize(nor);
VECCOPY(view, vec);
- Normalise(view);
+ Normalize(view);
zn= nor[0]*view[0]+nor[1]*view[1]+nor[2]*view[2];
if(zn>=0.0) hasize= 0.0;
@@ -1195,7 +1195,7 @@ static void render_particle_system(Render *re, Object *ob, Object *par, PartEff
har= RE_inithalo(re, ma, vec, NULL, pa->co, hasize, 0.0, seed);
if(har && ma->mode & MA_HALO_SHADE) {
VecSubf(har->no, vec, vec1);
- Normalise(har->no);
+ Normalize(har->no);
}
}
if(har) har->lay= ob->lay;
@@ -1227,7 +1227,7 @@ static void static_particle_strand(Render *re, Object *ob, Material *ma, float *
int flag;
VecSubf(nor, vec, vec1);
- Normalise(nor); // nor needed as tangent
+ Normalize(nor); // nor needed as tangent
Crossf(cross, vec, nor);
/* turn cross in pixelsize */
@@ -1405,7 +1405,7 @@ static void render_static_particle_system(Render *re, Object *ob, PartEff *paf)
VECCOPY(v1->co, vec);
VecSubf(vlr->n, vec, vec1);
- Normalise(vlr->n);
+ Normalize(vlr->n);
VECCOPY(v1->n, vlr->n);
vlr->mat= ma;
@@ -1433,10 +1433,10 @@ static void render_static_particle_system(Render *re, Object *ob, PartEff *paf)
nor[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
nor[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
nor[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
- Normalise(nor);
+ Normalize(nor);
VECCOPY(view, vec);
- Normalise(view);
+ Normalize(view);
zn= nor[0]*view[0]+nor[1]*view[1]+nor[2]*view[2];
if(zn>=0.0) hasize= 0.0;
@@ -1448,7 +1448,7 @@ static void render_static_particle_system(Render *re, Object *ob, PartEff *paf)
har= RE_inithalo(re, ma, vec, NULL, pa->co, hasize, 0.0, seed);
if(har && (ma->mode & MA_HALO_SHADE)) {
VecSubf(har->no, vec, vec1);
- Normalise(har->no);
+ Normalize(har->no);
har->lay= ob->lay;
}
}
@@ -1583,7 +1583,7 @@ static void init_render_mball(Render *re, Object *ob)
ver->n[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
ver->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
ver->n[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
- Normalise(ver->n);
+ Normalize(ver->n);
//if(ob->transflag & OB_NEG_SCALE) VecMulf(ver->n. -1.0);
if(need_orco) ver->orco= data;
@@ -2045,7 +2045,7 @@ static void init_render_mesh(Render *re, Object *ob, Object *par, int only_verts
vlr->n[0]= imat[0][0]*xn+imat[0][1]*yn+imat[0][2]*zn;
vlr->n[1]= imat[1][0]*xn+imat[1][1]*yn+imat[1][2]*zn;
vlr->n[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
- Normalise(vlr->n);
+ Normalize(vlr->n);
vlr->mat= ma;
vlr->flag= 0;
@@ -2222,7 +2222,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
lar->vec[0]= -mat[2][0];
lar->vec[1]= -mat[2][1];
lar->vec[2]= -mat[2][2];
- Normalise(lar->vec);
+ Normalize(lar->vec);
lar->co[0]= mat[3][0];
lar->co[1]= mat[3][1];
lar->co[2]= mat[3][2];
@@ -2304,9 +2304,9 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
if(lar->type==LA_SPOT) {
- Normalise(lar->imat[0]);
- Normalise(lar->imat[1]);
- Normalise(lar->imat[2]);
+ Normalize(lar->imat[0]);
+ Normalize(lar->imat[1]);
+ Normalize(lar->imat[2]);
xn= saacos(lar->spotsi);
xn= sin(xn)/cos(xn);
@@ -2556,7 +2556,7 @@ static int dl_surf_to_renderdata(Render *re, Object *ob, DispList *dl, Material
}
for(a = startvert; a < re->totvert; a++) {
ver= RE_findOrAddVert(re, a);
- Normalise(ver->n);
+ Normalize(ver->n);
}
@@ -2663,7 +2663,7 @@ static void init_render_curve(Render *re, Object *ob, int only_verts)
n[0]= ob->imat[0][2];
n[1]= ob->imat[1][2];
n[2]= ob->imat[2][2];
- Normalise(n);
+ Normalize(n);
for(a=0; a<dl->nr; a++, data+=3) {
ver= RE_findOrAddVert(re, re->totvert++);
@@ -2804,7 +2804,7 @@ static void init_render_curve(Render *re, Object *ob, int only_verts)
}
for(a=startvert; a<re->totvert; a++) {
ver= RE_findOrAddVert(re, a);
- len= Normalise(ver->n);
+ len= Normalize(ver->n);
if(len==0.0) ver->flag= 1; /* flag abuse, its only used in zbuf now */
else ver->flag= 0;
}
@@ -3207,7 +3207,7 @@ void init_render_world(Render *re)
cp[3]= 1;
VECCOPY(re->grvec, re->viewmat[2]);
- Normalise(re->grvec);
+ Normalize(re->grvec);
Mat3CpyMat4(re->imat, re->viewinv);
for(a=0; a<MAX_MTEX; a++)
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index b2e4f33c035..c1f756894fe 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -249,7 +249,7 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode)
ver->n[0]= imat[0][0]*xn+imat[1][0]*yn+imat[2][0]*zn;
ver->n[1]= imat[0][1]*xn+imat[1][1]*yn+imat[2][1]*zn;
ver->n[2]= imat[0][2]*xn+imat[1][2]*yn+imat[2][2]*zn;
- Normalise(ver->n);
+ Normalize(ver->n);
}
for(a=0; a<re->tothalo; a++) {
@@ -270,7 +270,7 @@ static void env_rotate_scene(Render *re, float mat[][4], int mode)
vlr->n[0]= imat[0][0]*xn+imat[1][0]*yn+imat[2][0]*zn;
vlr->n[1]= imat[0][1]*xn+imat[1][1]*yn+imat[2][1]*zn;
vlr->n[2]= imat[0][2]*xn+imat[1][2]*yn+imat[2][2]*zn;
- Normalise(vlr->n);
+ Normalize(vlr->n);
}
set_normalflags(re);
diff --git a/source/blender/render/intern/source/gammaCorrectionTables.c b/source/blender/render/intern/source/gammaCorrectionTables.c
index 812feabede7..ae54d061eda 100644
--- a/source/blender/render/intern/source/gammaCorrectionTables.c
+++ b/source/blender/render/intern/source/gammaCorrectionTables.c
@@ -57,9 +57,9 @@ static float gamma_range_table[RE_GAMMA_TABLE_SIZE + 1];
static float gamfactor_table[RE_GAMMA_TABLE_SIZE];
static float inv_gamma_range_table[RE_GAMMA_TABLE_SIZE + 1];
static float inv_gamfactor_table[RE_GAMMA_TABLE_SIZE];
-static float colour_domain_table[RE_GAMMA_TABLE_SIZE + 1];
-static float colour_step;
-static float inv_colour_step;
+static float color_domain_table[RE_GAMMA_TABLE_SIZE + 1];
+static float color_step;
+static float inv_color_step;
static float valid_gamma;
static float valid_inv_gamma;
@@ -70,15 +70,15 @@ float gammaCorrect(float c)
int i;
float res = 0.0;
- i = floor(c * inv_colour_step);
+ i = floor(c * inv_color_step);
/* Clip to range [0,1]: outside, just do the complete calculation. */
/* We may have some performance problems here. Stretching up the LUT */
/* may help solve that, by exchanging LUT size for the interpolation. */
- /* Negative colours are explicitly handled. */
+ /* Negative colors are explicitly handled. */
if (i < 0) res = -pow(abs(c), valid_gamma);
else if (i >= RE_GAMMA_TABLE_SIZE ) res = pow(c, valid_gamma);
else res = gamma_range_table[i] +
- ( (c - colour_domain_table[i]) * gamfactor_table[i]);
+ ( (c - color_domain_table[i]) * gamfactor_table[i]);
return res;
} /* end of float gammaCorrect(float col) */
@@ -90,12 +90,12 @@ float invGammaCorrect(float col)
int i;
float res = 0.0;
- i = floor(col*inv_colour_step);
- /* Negative colours are explicitly handled. */
+ i = floor(col*inv_color_step);
+ /* Negative colors are explicitly handled. */
if (i < 0) res = -pow(abs(col), valid_inv_gamma);
else if (i >= RE_GAMMA_TABLE_SIZE) res = pow(col, valid_inv_gamma);
else res = inv_gamma_range_table[i] +
- ( (col - colour_domain_table[i]) * inv_gamfactor_table[i]);
+ ( (col - color_domain_table[i]) * inv_gamfactor_table[i]);
return res;
} /* end of float invGammaCorrect(float col) */
@@ -110,15 +110,15 @@ void makeGammaTables(float gamma)
valid_gamma = gamma;
valid_inv_gamma = 1.0 / gamma;
- colour_step = 1.0 / RE_GAMMA_TABLE_SIZE;
- inv_colour_step = (float) RE_GAMMA_TABLE_SIZE;
+ color_step = 1.0 / RE_GAMMA_TABLE_SIZE;
+ inv_color_step = (float) RE_GAMMA_TABLE_SIZE;
/* We could squeeze out the two range tables to gain some memory. */
for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++) {
- colour_domain_table[i] = i * colour_step;
- gamma_range_table[i] = pow(colour_domain_table[i],
+ color_domain_table[i] = i * color_step;
+ gamma_range_table[i] = pow(color_domain_table[i],
valid_gamma);
- inv_gamma_range_table[i] = pow(colour_domain_table[i],
+ inv_gamma_range_table[i] = pow(color_domain_table[i],
valid_inv_gamma);
}
@@ -126,16 +126,16 @@ void makeGammaTables(float gamma)
/* rounding errors, we just set this explicitly. The last segment may */
/* have a different lenght than the other segments, but our */
/* interpolation is insensitive to that. */
- colour_domain_table[RE_GAMMA_TABLE_SIZE] = 1.0;
+ color_domain_table[RE_GAMMA_TABLE_SIZE] = 1.0;
gamma_range_table[RE_GAMMA_TABLE_SIZE] = 1.0;
inv_gamma_range_table[RE_GAMMA_TABLE_SIZE] = 1.0;
/* To speed up calculations, we make these calc factor tables. They are */
/* multiplication factors used in scaling the interpolation. */
for (i = 0; i < RE_GAMMA_TABLE_SIZE; i++ ) {
- gamfactor_table[i] = inv_colour_step
+ gamfactor_table[i] = inv_color_step
* (gamma_range_table[i + 1] - gamma_range_table[i]) ;
- inv_gamfactor_table[i] = inv_colour_step
+ inv_gamfactor_table[i] = inv_color_step
* (inv_gamma_range_table[i + 1] - inv_gamma_range_table[i]) ;
}
diff --git a/source/blender/render/intern/source/pixelblending.c b/source/blender/render/intern/source/pixelblending.c
index 136709b3ed5..119cceaf3c2 100644
--- a/source/blender/render/intern/source/pixelblending.c
+++ b/source/blender/render/intern/source/pixelblending.c
@@ -51,8 +51,8 @@ extern struct Render R;
/* ------------------------------------------------------------------------- */
/* Debug/behaviour defines */
-/* if defined: alpha blending with floats clips colour, as with shorts */
-/* #define RE_FLOAT_COLOUR_CLIPPING */
+/* if defined: alpha blending with floats clips color, as with shorts */
+/* #define RE_FLOAT_COLOR_CLIPPING */
/* if defined: alpha values are clipped */
/* For now, we just keep alpha clipping. We run into thresholding and */
/* blending difficulties otherwise. Be careful here. */
@@ -62,11 +62,11 @@ extern struct Render R;
/* Threshold for a 'full' pixel: pixels with alpha above this level are */
/* considered opaque This is the decimal value for 0xFFF0 / 0xFFFF */
-#define RE_FULL_COLOUR_FLOAT 0.9998
+#define RE_FULL_COLOR_FLOAT 0.9998
/* Threshold for an 'empty' pixel: pixels with alpha above this level are */
/* considered completely transparent. This is the decimal value */
/* for 0x000F / 0xFFFF */
-#define RE_EMPTY_COLOUR_FLOAT 0.0002
+#define RE_EMPTY_COLOR_FLOAT 0.0002
/* ------------------------------------------------------------------------- */
@@ -92,8 +92,8 @@ void addAlphaUnderFloat(float *dest, float *source)
{
float mul;
- if( (-RE_EMPTY_COLOUR_FLOAT < dest[3])
- && (dest[3] < RE_EMPTY_COLOUR_FLOAT) ) {
+ if( (-RE_EMPTY_COLOR_FLOAT < dest[3])
+ && (dest[3] < RE_EMPTY_COLOR_FLOAT) ) {
dest[0] = source[0];
dest[1] = source[1];
dest[2] = source[2];
@@ -114,37 +114,37 @@ void addAlphaUnderFloat(float *dest, float *source)
void addalphaAddfacFloat(float *dest, float *source, char addfac)
{
float m; /* weiging factor of destination */
- float c; /* intermediate colour */
+ float c; /* intermediate color */
/* Addfac is a number between 0 and 1: rescale */
/* final target is to diminish the influence of dest when addfac rises */
m = 1.0 - ( source[3] * ((255.0 - addfac) / 255.0));
- /* blend colours*/
+ /* blend colors*/
c= (m * dest[0]) + source[0];
-#ifdef RE_FLOAT_COLOUR_CLIPPING
- if(c >= RE_FULL_COLOUR_FLOAT) dest[0] = RE_FULL_COLOUR_FLOAT;
+#ifdef RE_FLOAT_COLOR_CLIPPING
+ if(c >= RE_FULL_COLOR_FLOAT) dest[0] = RE_FULL_COLOR_FLOAT;
else
#endif
dest[0]= c;
c= (m * dest[1]) + source[1];
-#ifdef RE_FLOAT_COLOUR_CLIPPING
- if(c >= RE_FULL_COLOUR_FLOAT) dest[1] = RE_FULL_COLOUR_FLOAT;
+#ifdef RE_FLOAT_COLOR_CLIPPING
+ if(c >= RE_FULL_COLOR_FLOAT) dest[1] = RE_FULL_COLOR_FLOAT;
else
#endif
dest[1]= c;
c= (m * dest[2]) + source[2];
-#ifdef RE_FLOAT_COLOUR_CLIPPING
- if(c >= RE_FULL_COLOUR_FLOAT) dest[2] = RE_FULL_COLOUR_FLOAT;
+#ifdef RE_FLOAT_COLOR_CLIPPING
+ if(c >= RE_FULL_COLOR_FLOAT) dest[2] = RE_FULL_COLOR_FLOAT;
else
#endif
dest[2]= c;
c= (m * dest[3]) + source[3];
#ifdef RE_ALPHA_CLIPPING
- if(c >= RE_FULL_COLOUR_FLOAT) dest[3] = RE_FULL_COLOUR_FLOAT;
+ if(c >= RE_FULL_COLOR_FLOAT) dest[3] = RE_FULL_COLOR_FLOAT;
else
#endif
dest[3]= c;
@@ -263,7 +263,7 @@ void addalphaAddFloat(float *dest, float *source)
{
/* Makes me wonder whether this is required... */
- if( dest[3] < RE_EMPTY_COLOUR_FLOAT) {
+ if( dest[3] < RE_EMPTY_COLOR_FLOAT) {
dest[0] = source[0];
dest[1] = source[1];
dest[2] = source[2];
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 4955c65f55c..cffed99c738 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -379,7 +379,7 @@ void shadeHaloFloat(HaloRen *har, float *col, int zz,
ringf*= dist;
linef*= alpha;
- /* The colour is either the rgb spec-ed by the user, or extracted from */
+ /* The color is either the rgb spec-ed by the user, or extracted from */
/* the texture */
if(har->tex) {
col[0]= har->r;
@@ -483,7 +483,7 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview)
zen[0]= R.wrld.zenr; zen[1]= R.wrld.zeng; zen[2]= R.wrld.zenb;
/* Careful: SKYTEX and SKYBLEND are NOT mutually exclusive! If */
- /* SKYBLEND is active, the texture and colour blend are added. */
+ /* SKYBLEND is active, the texture and color blend are added. */
if(R.wrld.skytype & WO_SKYTEX) {
VECCOPY(lo, view);
if(R.wrld.skytype & WO_SKYREAL) {
@@ -513,7 +513,7 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview)
}
/*
- Stuff the sky colour into the collector.
+ Stuff the sky color into the collector.
*/
void shadeSkyPixel(float *collector, float fx, float fy)
{
@@ -522,7 +522,7 @@ void shadeSkyPixel(float *collector, float fx, float fy)
/*
The rules for sky:
1. Draw an image, if a background image was provided. Stop
- 2. get texture and colour blend, and combine these.
+ 2. get texture and color blend, and combine these.
*/
float fac;
@@ -553,7 +553,7 @@ void shadeSkyPixel(float *collector, float fx, float fy)
}
else {
calc_view_vector(view, fx, fy);
- fac= Normalise(view);
+ fac= Normalize(view);
if(R.wrld.skytype & WO_SKYTEX) {
dxyview[0]= -R.viewdx/fac;
@@ -561,7 +561,7 @@ void shadeSkyPixel(float *collector, float fx, float fy)
}
}
- /* get sky colour in the collector */
+ /* get sky color in the collector */
shadeSkyView(collector, NULL, view, dxyview);
collector[3] = 0.0f;
}
diff --git a/source/blender/render/intern/source/ray.c b/source/blender/render/intern/source/ray.c
index 12de6b64023..128a4a900ec 100644
--- a/source/blender/render/intern/source/ray.c
+++ b/source/blender/render/intern/source/ray.c
@@ -1414,7 +1414,7 @@ static void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
shi->co[1]= is->start[1]+is->labda*(shi->view[1]);
shi->co[2]= is->start[2]+is->labda*(shi->view[2]);
- Normalise(shi->view);
+ Normalize(shi->view);
shi->vlr= vlr;
shi->mat= vlr->mat;
@@ -1714,7 +1714,7 @@ static void traceray(ShadeInput *origshi, short depth, float *start, float *vec,
}
else { /* sky */
VECCOPY(shi.view, vec);
- Normalise(shi.view);
+ Normalize(shi.view);
shadeSkyView(col, isec.start, shi.view, NULL);
}
@@ -2078,7 +2078,7 @@ static void DS_energy(float *sphere, int tot, float *vec)
VecMulf(res, 0.5);
VecAddf(vec, vec, res);
- Normalise(vec);
+ Normalize(vec);
}
@@ -2257,7 +2257,7 @@ void ray_ao(ShadeInput *shi, float *shadfac)
view[0]= -vec[0];
view[1]= -vec[1];
view[2]= -vec[2];
- Normalise(view);
+ Normalize(view);
if(aocolor==WO_AOSKYCOL) {
fac= 0.5*(1.0f+view[0]*R.grvec[0]+ view[1]*R.grvec[1]+ view[2]*R.grvec[2]);
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index efd848e4002..10201087f2d 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -1373,7 +1373,7 @@ static void do_bake_shade(void *handle, int x, int y, float u, float v)
/* set up view vector */
VECCOPY(shi->view, shi->co);
- Normalise(shi->view);
+ Normalize(shi->view);
/* no face normal flip */
shi->puno= 0;
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index cc4ec037ab5..902d55adb97 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -660,7 +660,7 @@ HaloRen *RE_inithalo(Render *re, Material *ma, float *vec, float *vec1,
har->hasize= vectsize*zn + (1.0-vectsize)*hasize;
VecSubf(har->no, vec, vec1);
- Normalise(har->no);
+ Normalize(har->no);
}
if(ma->mode & MA_HALO_XALPHA) har->type |= HA_XALPHA;
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index e96821f08e4..4a5986591d4 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -335,7 +335,7 @@ static void shadowbuf_autoclip(Render *re, LampRen *lar)
/* since vec is rotated in lampspace, this is how to get the cosine of angle */
/* precision is set 20% larger */
vec[2]*= 1.2f;
- Normalise(vec);
+ Normalize(vec);
inpr= - vec[2];
if(inpr>=lar->spotsi) {
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 7f97653eb6f..d9126a3cdb2 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -391,8 +391,8 @@ void shade_input_set_viewco(ShadeInput *shi, float x, float y, float z)
}
}
- /* cannot normalise earlier, code above needs it at viewplane level */
- Normalise(shi->view);
+ /* cannot normalize earlier, code above needs it at viewplane level */
+ Normalize(shi->view);
}
/* calculate U and V, for scanline (silly render face u and v are in range -1 to 0) */
@@ -496,7 +496,7 @@ void shade_input_set_normals(ShadeInput *shi)
shi->vn[1]= l*n3[1]-u*n1[1]-v*n2[1];
shi->vn[2]= l*n3[2]-u*n1[2]-v*n2[2];
- Normalise(shi->vn);
+ Normalize(shi->vn);
}
else {
VECCOPY(shi->vn, shi->facenor);
@@ -544,7 +544,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
shi->tang[1]= (l*s3[1] - u*s1[1] - v*s2[1]);
shi->tang[2]= (l*s3[2] - u*s1[2] - v*s2[2]);
/* qdn: normalize just in case */
- Normalise(shi->tang);
+ Normalize(shi->tang);
}
else shi->tang[0]= shi->tang[1]= shi->tang[2]= 0.0f;
}
@@ -561,7 +561,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
shi->tang[0] = (s1[0] + s2[0] + s3[0]);
shi->tang[1] = (s1[1] + s2[1] + s3[1]);
shi->tang[2] = (s1[2] + s2[2] + s3[2]);
- Normalise(shi->tang);
+ Normalize(shi->tang);
}
}
}
@@ -765,7 +765,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
}
if(texco & TEXCO_REFL) {
- /* mirror reflection colour textures (and envmap) */
+ /* mirror reflection color textures (and envmap) */
calc_R_ref(shi); /* wrong location for normal maps! XXXXXXXXXXXXXX */
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 992e2619ccd..c2aeee6aab6 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -370,7 +370,7 @@ void renderspothalo(ShadeInput *shi, float *col, float alpha)
/* ---------------- shaders ----------------------- */
-static double Normalise_d(double *n)
+static double Normalize_d(double *n)
{
double d;
@@ -427,10 +427,10 @@ static float area_lamp_energy(float *co, float *vn, LampRen *lar)
VECSUB(vec[2], co, lar->area[2]);
VECSUB(vec[3], co, lar->area[3]);
- Normalise_d(vec[0]);
- Normalise_d(vec[1]);
- Normalise_d(vec[2]);
- Normalise_d(vec[3]);
+ Normalize_d(vec[0]);
+ Normalize_d(vec[1]);
+ Normalize_d(vec[2]);
+ Normalize_d(vec[3]);
/* cross product */
CROSS(cross[0], vec[0], vec[1]);
@@ -438,10 +438,10 @@ static float area_lamp_energy(float *co, float *vn, LampRen *lar)
CROSS(cross[2], vec[2], vec[3]);
CROSS(cross[3], vec[3], vec[0]);
- Normalise_d(cross[0]);
- Normalise_d(cross[1]);
- Normalise_d(cross[2]);
- Normalise_d(cross[3]);
+ Normalize_d(cross[0]);
+ Normalize_d(cross[1]);
+ Normalize_d(cross[2]);
+ Normalize_d(cross[3]);
/* angles */
rad[0]= vec[0][0]*vec[1][0]+ vec[0][1]*vec[1][1]+ vec[0][2]*vec[1][2];
@@ -512,7 +512,7 @@ static float Phong_Spec( float *n, float *l, float *v, int hard, int tangent )
h[0] = l[0] + v[0];
h[1] = l[1] + v[1];
h[2] = l[2] + v[2];
- Normalise(h);
+ Normalize(h);
rslt = h[0]*n[0] + h[1]*n[1] + h[2]*n[2];
if(tangent) rslt= sasqrt(1.0f - rslt*rslt);
@@ -532,7 +532,7 @@ static float CookTorr_Spec(float *n, float *l, float *v, int hard, int tangent)
h[0]= v[0]+l[0];
h[1]= v[1]+l[1];
h[2]= v[2]+l[2];
- Normalise(h);
+ Normalize(h);
nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2];
if(tangent) nh= sasqrt(1.0f - nh*nh);
@@ -565,7 +565,7 @@ static float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_p
h[0]= v[0]+l[0];
h[1]= v[1]+l[1];
h[2]= v[2]+l[2];
- Normalise(h);
+ Normalize(h);
nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2]; /* Dot product between surface normal and half-way vector */
if(tangent) nh= sasqrt(1.0f - nh*nh);
@@ -612,7 +612,7 @@ static float Toon_Spec( float *n, float *l, float *v, float size, float smooth,
h[0] = l[0] + v[0];
h[1] = l[1] + v[1];
h[2] = l[2] + v[2];
- Normalise(h);
+ Normalize(h);
rslt = h[0]*n[0] + h[1]*n[1] + h[2]*n[2];
if(tangent) rslt = sasqrt(1.0f - rslt*rslt);
@@ -636,7 +636,7 @@ static float WardIso_Spec( float *n, float *l, float *v, float rms, int tangent)
h[0] = l[0] + v[0];
h[1] = l[1] + v[1];
h[2] = l[2] + v[2];
- Normalise(h);
+ Normalize(h);
nh = n[0]*h[0]+n[1]*h[1]+n[2]*h[2]; /* Dot product between surface normal and half-way vector */
if(tangent) nh = sasqrt(1.0f - nh*nh);
@@ -687,7 +687,7 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough
h[0]= v[0]+l[0];
h[1]= v[1]+l[1];
h[2]= v[2]+l[2];
- Normalise(h);
+ Normalize(h);
nh= n[0]*h[0]+n[1]*h[1]+n[2]*h[2]; /* Dot product between surface normal and half-way vector */
if(nh<0.0f) nh = 0.0f;
@@ -708,12 +708,12 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough
Lit_B[0] = l[0] - (realnl * n[0]);
Lit_B[1] = l[1] - (realnl * n[1]);
Lit_B[2] = l[2] - (realnl * n[2]);
- Normalise( Lit_B );
+ Normalize( Lit_B );
View_B[0] = v[0] - (nv * n[0]);
View_B[1] = v[1] - (nv * n[1]);
View_B[2] = v[2] - (nv * n[2]);
- Normalise( View_B );
+ Normalize( View_B );
t = Lit_B[0]*View_B[0] + Lit_B[1]*View_B[1] + Lit_B[2]*View_B[2];
if( t < 0 ) t = 0;
@@ -1290,7 +1290,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
lv[1]+= view[1];
lv[2]+= view[2];
- Normalise(lv);
+ Normalize(lv);
t= vn[0]*lv[0]+vn[1]*lv[1]+vn[2]*lv[2];
diff --git a/source/blender/render/intern/source/texture.c b/source/blender/render/intern/source/texture.c
index 20ba66d2d1c..1e6a98d482d 100644
--- a/source/blender/render/intern/source/texture.c
+++ b/source/blender/render/intern/source/texture.c
@@ -1652,11 +1652,11 @@ void do_material_tex(ShadeInput *shi)
// rotate to global coords
if(mtex->texco==TEXCO_ORCO || mtex->texco==TEXCO_UV) {
if(shi->vlr && shi->vlr->ob) {
- float len= Normalise(texres.nor);
+ float len= Normalize(texres.nor);
// can be optimized... (ton)
Mat4Mul3Vecfl(shi->vlr->ob->obmat, texres.nor);
Mat4Mul3Vecfl(R.viewmat, texres.nor);
- Normalise(texres.nor);
+ Normalize(texres.nor);
VecMulf(texres.nor, len);
}
}
@@ -1762,7 +1762,7 @@ void do_material_tex(ShadeInput *shi)
shi->vn[2]+= dot*nor[2];
}
}
- Normalise(shi->vn);
+ Normalize(shi->vn);
/* this makes sure the bump is passed on to the next texture */
shi->orn[0]= -shi->vn[0];
@@ -2157,7 +2157,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
else texres.tin*= stencilTin;
}
- /* colour mapping */
+ /* color mapping */
if(mtex->mapto & (WOMAP_HORIZ+WOMAP_ZENUP+WOMAP_ZENDOWN)) {
float tcol[3];
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 35300d539f2..ee24b15029c 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -1740,7 +1740,7 @@ void zbuffer_solid(RenderPart *pa, unsigned int lay, short layflag)
zspan.zofsx= -pa->disprect.xmin;
zspan.zofsy= -pa->disprect.ymin;
}
- /* to centre the sample position */
+ /* to center the sample position */
zspan.zofsx -= 0.5f;
zspan.zofsy -= 0.5f;
@@ -2579,7 +2579,7 @@ static int zbuffer_abuf(RenderPart *pa, APixstr *APixbuf, ListBase *apsmbase, un
zspan.zofsx= -pa->disprect.xmin;
zspan.zofsy= -pa->disprect.ymin;
}
- /* to centre the sample position */
+ /* to center the sample position */
zspan.zofsx -= 0.5f;
zspan.zofsy -= 0.5f;