15 static const float mie_G = 0.76f;
27 1.45756829855592995315f, 1.56596305559738380175f, 1.65148449067670455293f,
28 1.71496242737209314555f, 1.75797983805020541226f, 1.78256407885924539336f,
29 1.79095108475838560302f, 1.78541550133410664714f, 1.76815554864306845317f,
30 1.74122069647250410362f, 1.70647127164943679389f, 1.66556087452739887134f,
31 1.61993437242451854274f, 1.57083597368892080581f, 1.51932335059305478886f,
32 1.46628494965214395407f, 1.41245852740172450623f, 1.35844961970384092709f,
33 1.30474913844739281998f, 1.25174963272610817455f, 1.19975998755420620867f};
36 0.00005424820087636473f, 0.00004418549866505454f, 0.00003635151910165377f,
37 0.00003017929012024763f, 0.00002526320226989157f, 0.00002130859310621843f,
38 0.00001809838025320633f, 0.00001547057129129042f, 0.00001330284977336850f,
39 0.00001150184784075764f, 0.00000999557429990163f, 0.00000872799973630707f,
40 0.00000765513700977967f, 0.00000674217203751443f, 0.00000596134125832052f,
41 0.00000529034598065810f, 0.00000471115687557433f, 0.00000420910481110487f,
42 0.00000377218381260133f, 0.00000339051255477280f, 0.00000305591531679811f};
45 0.00000000325126849861f, 0.00000000585395365047f, 0.00000001977191155085f,
46 0.00000007309568762914f, 0.00000020084561514287f, 0.00000040383958096161f,
47 0.00000063551335912363f, 0.00000096707041180970f, 0.00000154797400424410f,
48 0.00000209038647223331f, 0.00000246128056164565f, 0.00000273551299461512f,
49 0.00000215125863128643f, 0.00000159051840791988f, 0.00000112356197979857f,
50 0.00000073527551487574f, 0.00000046450130357806f, 0.00000033096079921048f,
51 0.00000022512612292678f, 0.00000014879129266490f, 0.00000016828623364192f};
53 static const float cmf_xyz[][3] = {{0.00136800000f, 0.00003900000f, 0.00645000100f},
54 {0.01431000000f, 0.00039600000f, 0.06785001000f},
55 {0.13438000000f, 0.00400000000f, 0.64560000000f},
56 {0.34828000000f, 0.02300000000f, 1.74706000000f},
57 {0.29080000000f, 0.06000000000f, 1.66920000000f},
58 {0.09564000000f, 0.13902000000f, 0.81295010000f},
59 {0.00490000000f, 0.32300000000f, 0.27200000000f},
60 {0.06327000000f, 0.71000000000f, 0.07824999000f},
61 {0.29040000000f, 0.95400000000f, 0.02030000000f},
62 {0.59450000000f, 0.99500000000f, 0.00390000000f},
63 {0.91630000000f, 0.87000000000f, 0.00165000100f},
64 {1.06220000000f, 0.63100000000f, 0.00080000000f},
65 {0.85444990000f, 0.38100000000f, 0.00019000000f},
66 {0.44790000000f, 0.17500000000f, 0.00002000000f},
67 {0.16490000000f, 0.06100000000f, 0.00000000000f},
68 {0.04677000000f, 0.01700000000f, 0.00000000000f},
69 {0.01135916000f, 0.00410200000f, 0.00000000000f},
70 {0.00289932700f, 0.00104700000f, 0.00000000000f},
71 {0.00069007860f, 0.00024920000f, 0.00000000000f},
72 {0.00016615050f, 0.00006000000f, 0.00000000000f},
73 {0.00004150994f, 0.00001499000f, 0.00000000000f}};
112 xyz.
x +=
cmf_xyz[i][0] * spectrum[i];
113 xyz.
y +=
cmf_xyz[i][1] * spectrum[i];
114 xyz.
z +=
cmf_xyz[i][2] * spectrum[i];
134 den = 1.0f / 15000.0f *
height - 2.0f / 3.0f;
137 den = -(1.0f / 15000.0f *
height - 8.0f / 3.0f);
144 return 3.0f / (16.0f *
M_PI_F) * (1.0f +
sqr(mu));
149 return (3.0f * (1.0f -
sqr_G) * (1.0f +
sqr(mu))) /
159 float b = -2.0f *
dot(dir, -
pos);
161 float t =
b *
b - 4.0f *
c;
170 float b = -2.0f *
dot(dir, -
pos);
172 float t = (-
b +
sqrtf(
b *
b - 4.0f *
c)) / 2.0f;
188 float ray_length =
distance(ray_origin, ray_end);
209 return optical_depth * ray_length;
222 float ray_length =
distance(ray_origin, ray_end);
226 float segment_length = ray_length /
steps;
237 r_spectrum[wl] = 0.0f;
241 float mu =
dot(ray_dir, sun_dir);
248 for (
int i = 0; i <
steps; i++) {
256 optical_depth += segment_length *
density;
261 float3 total_optical_depth = optical_depth + light_optical_depth;
285 r_spectrum[wl] += attenuation *
reduce_add(phase_function * scattering_density) *
309 int half_width =
width / 2;
315 float half_lat_step = latitude_step / 2.0f;
317 for (
int y = start_y;
y < end_y;
y++) {
322 for (
int x = 0;
x < half_width;
x++) {
323 float longitude = longitude_step *
x -
M_PI_F;
326 single_scattering(dir, sun_dir, cam_pos, air_density, dust_density, ozone_density, spectrum);
331 pixel_row[pos_x] = xyz.
x;
332 pixel_row[pos_x + 1] = xyz.
y;
333 pixel_row[pos_x + 2] = xyz.
z;
336 pixel_row[mirror_x] = xyz.
x;
337 pixel_row[mirror_x + 1] = xyz.
y;
338 pixel_row[mirror_x + 2] = xyz.
z;
357 float transmittance =
rayleigh_coeff[i] * optical_depth.
x * air_density +
358 1.11f *
mie_coeff * optical_depth.
y * dust_density;
359 r_spectrum[i] =
irradiance[i] *
expf(-transmittance) / solid_angle;
364 float angular_diameter,
368 float *r_pixel_bottom,
372 float half_angular = angular_diameter / 2.0f;
373 float solid_angle =
M_2PI_F * (1.0f -
cosf(half_angular));
375 float bottom = sun_elevation - half_angular;
376 float top = sun_elevation + half_angular;
377 float elevation_bottom, elevation_top;
378 float3 pix_bottom, pix_top, sun_dir;
382 elevation_top = (
top > 0.0f) ?
top : 0.0f;
384 sun_radiation(sun_dir, altitude, air_density, dust_density, solid_angle, spectrum);
387 sun_radiation(sun_dir, altitude, air_density, dust_density, solid_angle, spectrum);
391 r_pixel_bottom[0] = pix_bottom.
x;
392 r_pixel_bottom[1] = pix_bottom.
y;
393 r_pixel_bottom[2] = pix_bottom.
z;
394 r_pixel_top[0] = pix_top.
x;
395 r_pixel_top[1] = pix_top.
y;
396 r_pixel_top[2] = pix_top.
z;
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble y2 _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat y2 _GL_VOID_RET _GL_VOID GLint GLint GLint y2 _GL_VOID_RET _GL_VOID GLshort GLshort GLshort y2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLuint *buffer _GL_VOID_RET _GL_VOID GLdouble t _GL_VOID_RET _GL_VOID GLfloat t _GL_VOID_RET _GL_VOID GLint t _GL_VOID_RET _GL_VOID GLshort t _GL_VOID_RET _GL_VOID GLdouble t
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble bottom
__forceinline int reduce_add(const avxi &v)
ccl_device_inline float len_squared(const float3 a)
Segment< FEdge *, Vec3r > segment
T dot(const vec_base< T, Size > &a, const vec_base< T, Size > &b)
T distance(const T &a, const T &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken density("density", pxr::TfToken::Immortal)
static const int num_wavelengths
static float3 ray_optical_depth(float3 ray_origin, float3 ray_dir)
static float3 spec_to_xyz(const float *spectrum)
static const float rayleigh_coeff[]
static float phase_rayleigh(float mu)
static const float mie_coeff
static const int quadrature_steps
static void single_scattering(float3 ray_dir, float3 sun_dir, float3 ray_origin, float air_density, float dust_density, float ozone_density, float *r_spectrum)
static const float earth_radius
static float3 geographical_to_direction(float lat, float lon)
static const float irradiance[]
static float phase_mie(float mu)
static void sun_radiation(float3 cam_dir, float altitude, float air_density, float dust_density, float solid_angle, float *r_spectrum)
static const float atmosphere_radius
static float density_mie(float height)
static bool surface_intersection(float3 pos, float3 dir)
static const float ozone_coeff[]
static float density_rayleigh(float height)
static const float rayleigh_scale
static const float quadrature_nodes[]
static const float step_lambda
void SKY_nishita_skymodel_precompute_sun(float sun_elevation, float angular_diameter, float altitude, float air_density, float dust_density, float *r_pixel_bottom, float *r_pixel_top)
static float3 atmosphere_intersection(float3 pos, float3 dir)
static const float cmf_xyz[][3]
static float density_ozone(float height)
static const int min_wavelength
static const int max_wavelength
static const float quadrature_weights[]
static const float mie_scale
void SKY_nishita_skymodel_precompute_texture(float *pixels, int stride, int start_y, int end_y, int width, int height, float sun_elevation, float altitude, float air_density, float dust_density, float ozone_density)
ccl_device_inline float sqr(float a)