From 4f7bdc59d31e94bc97955c1efeef2a8fce0c8ecd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Mar 2012 00:41:09 +0000 Subject: style cleanup: spelling. also remove large, duplicate comments from sunsky.h --- source/blender/render/intern/include/sunsky.h | 80 +++------------------------ 1 file changed, 8 insertions(+), 72 deletions(-) (limited to 'source/blender/render/intern/include/sunsky.h') 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__*/ -- cgit v1.2.3