Cleanup: strip trailing space for cycles

This commit is contained in:
Campbell Barton
2018-07-06 10:17:58 +02:00
parent 62fbb7d4a1
commit 1daa20ad9f
257 changed files with 373 additions and 616 deletions

View File

@@ -131,7 +131,7 @@ color hsv_to_rgb(color hsv)
else {
if (h == 1.0)
h = 0.0;
h *= 6.0;
i = floor(h);
f = h - i;
@@ -150,4 +150,3 @@ color hsv_to_rgb(color hsv)
return rgb;
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
float fresnel_dielectric_cos(float cosi, float eta)
{
/* compute fresnel reflectance without explicitly computing
@@ -46,4 +46,3 @@ color fresnel_conductor(float cosi, color eta, color k)
(tmp_f + (2.0 * eta * cosi) + cosi2);
return (Rparl2 + Rperp2) * 0.5;
}

View File

@@ -84,6 +84,6 @@ float rgb_ramp_lookup(float ramp[], float at, int interpolate, int extrapolate)
if (interpolate && t > 0.0)
result = (1.0 - t) * result + t * ramp[i + 1];
return result;
}

View File

@@ -90,11 +90,11 @@ void voronoi(point p, float e, float da[4], point pa[4])
float safe_noise(point p, string type)
{
float f = 0.0;
/* Perlin noise in range -1..1 */
if (type == "signed")
f = noise("perlin", p);
/* Perlin noise in range 0..1 */
else
f = noise(p);
@@ -102,7 +102,7 @@ float safe_noise(point p, string type)
/* can happen for big coordinates, things even out to 0.5 then anyway */
if (!isfinite(f))
return 0.5;
return f;
}
@@ -114,7 +114,7 @@ float noise_turbulence(point p, float details, int hard)
float amp = 1.0;
float sum = 0.0;
int i, n;
float octaves = clamp(details, 0.0, 16.0);
n = (int)octaves;
@@ -128,7 +128,7 @@ float noise_turbulence(point p, float details, int hard)
amp *= 0.5;
fscale *= 2.0;
}
float rmd = octaves - floor(octaves);
if (rmd != 0.0) {
@@ -160,7 +160,6 @@ float nonzero(float f, float eps)
r = sign(f) * eps;
else
r = f;
return r;
}

View File

@@ -213,7 +213,7 @@ void fresnel (vector I, normal N, float eta,
F *= sqr (beta / (g+c));
Kr = F;
Kt = (1.0 - Kr) * eta*eta;
// OPT: the following recomputes some of the above values, but it
// OPT: the following recomputes some of the above values, but it
// gives us the same result as if the shader-writer called refract()
T = refract(I, N, eta);
} else {
@@ -415,7 +415,7 @@ color transformc (string from, string to, color x)
return transformc (to, r);
}
// Matrix functions