glsl-util/polar.glsl

9 lines
228 B
Plaintext
Raw Normal View History

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