Cleanup: make format

This commit is contained in:
Aaron Carlisle 2020-11-04 02:14:48 -05:00
parent 029e1f066e
commit 9af147b5d3
5 changed files with 99 additions and 96 deletions

View File

@ -39,36 +39,37 @@ float BLI_gNoise(float noisesize, float x, float y, float z, int hard, int noise
float BLI_gTurbulence(
float noisesize, float x, float y, float z, int oct, int hard, int noisebasis);
/* newnoise: musgrave functions */
float BLI_mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis);
float BLI_mg_fBm(
float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis);
float BLI_mg_MultiFractal(
float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis);
float BLI_mg_VLNoise(float x, float y, float z, float distortion, int nbas1, int nbas2);
float BLI_mg_HeteroTerrain(float x,
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
int noisebasis);
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
int noisebasis);
float BLI_mg_HybridMultiFractal(float x,
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis);
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis);
float BLI_mg_RidgedMultiFractal(float x,
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis);
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis);
/* newnoise: voronoi */
void BLI_voronoi(float x, float y, float z, float *da, float *pa, float me, int dtype);
/* newnoise: BLI_cellNoise & BLI_cellNoiseV (for vector/point/color) */

View File

@ -1319,7 +1319,8 @@ float BLI_gTurbulence(
* ``lacunarity'' is the gap between successive frequencies
* ``octaves'' is the number of frequencies in the fBm
*/
float BLI_mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis)
float BLI_mg_fBm(
float x, float y, float z, float H, float lacunarity, float octaves, int noisebasis)
{
float rmd, value = 0.0, pwr = 1.0, pwHL = powf(lacunarity, -H);
int i;
@ -1460,13 +1461,13 @@ float BLI_mg_MultiFractal(
* ``offset'' raises the terrain from `sea level'
*/
float BLI_mg_HeteroTerrain(float x,
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
int noisebasis)
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
int noisebasis)
{
float value, increment, rmd;
int i;
@ -1540,14 +1541,14 @@ float BLI_mg_HeteroTerrain(float x,
* offset: 0.7
*/
float BLI_mg_HybridMultiFractal(float x,
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis)
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis)
{
float result, signal, weight, rmd;
int i;
@ -1627,14 +1628,14 @@ float BLI_mg_HybridMultiFractal(float x,
* gain: 2.0
*/
float BLI_mg_RidgedMultiFractal(float x,
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis)
float y,
float z,
float H,
float lacunarity,
float octaves,
float offset,
float gain,
int noisebasis)
{
float result, signal, weight;
int i;

View File

@ -1,4 +1,5 @@
void node_attribute(vec4 attr, out vec4 outcol, out vec3 outvec, out float outf, out float outalpha)
void node_attribute(
vec4 attr, out vec4 outcol, out vec3 outvec, out float outf, out float outalpha)
{
outcol = vec4(attr.xyz, 1.0);
outvec = attr.xyz;

View File

@ -306,10 +306,10 @@ typedef enum eSpaceOutliner_Filter {
SO_FILTER_NO_OB_OTHERS = (1 << 11),
SO_FILTER_OB_STATE_SELECTABLE = (1 << 12), /* Not set via DNA. */
SO_FILTER_OB_STATE_VISIBLE = (1 << 13), /* Not set via DNA. */
SO_FILTER_OB_STATE_HIDDEN = (1 << 14), /* Not set via DNA. */
SO_FILTER_OB_STATE_SELECTED = (1 << 15), /* Not set via DNA. */
SO_FILTER_OB_STATE_ACTIVE = (1 << 16), /* Not set via DNA. */
SO_FILTER_OB_STATE_VISIBLE = (1 << 13), /* Not set via DNA. */
SO_FILTER_OB_STATE_HIDDEN = (1 << 14), /* Not set via DNA. */
SO_FILTER_OB_STATE_SELECTED = (1 << 15), /* Not set via DNA. */
SO_FILTER_OB_STATE_ACTIVE = (1 << 16), /* Not set via DNA. */
SO_FILTER_NO_COLLECTION = (1 << 17),
SO_FILTER_ID_TYPE = (1 << 18),

View File

@ -656,42 +656,42 @@ static int mg_HTerrainTex(const Tex *tex, const float texvec[3], TexResult *texr
int rv = TEX_INT;
texres->tin = tex->ns_outscale * BLI_mg_HeteroTerrain(texvec[0],
texvec[1],
texvec[2],
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
texvec[1],
texvec[2],
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
if (texres->nor != NULL) {
float offs = tex->nabla / tex->noisesize; /* also scaling of texvec */
/* calculate bumpnormal */
texres->nor[0] = tex->ns_outscale * BLI_mg_HeteroTerrain(texvec[0] + offs,
texvec[1],
texvec[2],
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
texvec[1],
texvec[2],
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
texres->nor[1] = tex->ns_outscale * BLI_mg_HeteroTerrain(texvec[0],
texvec[1] + offs,
texvec[2],
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
texvec[1] + offs,
texvec[2],
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
texres->nor[2] = tex->ns_outscale * BLI_mg_HeteroTerrain(texvec[0],
texvec[1],
texvec[2] + offs,
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
texvec[1],
texvec[2] + offs,
tex->mg_H,
tex->mg_lacunarity,
tex->mg_octaves,
tex->mg_offset,
tex->noisebasis);
tex_normal_derivate(tex, texres);
rv |= TEX_NOR;
@ -714,23 +714,23 @@ static int mg_distNoiseTex(const Tex *tex, const float texvec[3], TexResult *tex
/* calculate bumpnormal */
texres->nor[0] = BLI_mg_VLNoise(texvec[0] + offs,
texvec[1],
texvec[2],
tex->dist_amount,
tex->noisebasis,
tex->noisebasis2);
texvec[1],
texvec[2],
tex->dist_amount,
tex->noisebasis,
tex->noisebasis2);
texres->nor[1] = BLI_mg_VLNoise(texvec[0],
texvec[1] + offs,
texvec[2],
tex->dist_amount,
tex->noisebasis,
tex->noisebasis2);
texvec[1] + offs,
texvec[2],
tex->dist_amount,
tex->noisebasis,
tex->noisebasis2);
texres->nor[2] = BLI_mg_VLNoise(texvec[0],
texvec[1],
texvec[2] + offs,
tex->dist_amount,
tex->noisebasis,
tex->noisebasis2);
texvec[1],
texvec[2] + offs,
tex->dist_amount,
tex->noisebasis,
tex->noisebasis2);
tex_normal_derivate(tex, texres);
rv |= TEX_NOR;