2018-01-11 16:16:47 +08:00
|
|
|
vec3 spherical(float radian1, float radian2, float radius) {
|
2017-01-26 13:44:10 +08:00
|
|
|
return vec3(
|
|
|
|
cos(radian1) * cos(radian2) * radius,
|
|
|
|
sin(radian1) * radius,
|
2017-01-28 13:00:44 +08:00
|
|
|
cos(radian1) * sin(radian2) * radius
|
|
|
|
);
|
2017-01-26 13:44:10 +08:00
|
|
|
}
|
2018-01-11 16:16:47 +08:00
|
|
|
#pragma glslify: export(spherical)
|