glsl-polar-decart

Polar to Decart and Decart to polar transformations.

Usage no npm install needed!

<script type="module">
  import glslPolarDecart from 'https://cdn.skypack.dev/glsl-polar-decart';
</script>

README

glsl-polar-decart

A stackgl library.

Converts coordinates from decart to polar or back.

Usage

vec2 uv = gl_FragCoord.xy / u_resolution;
vec2 polar = decartToPolar(uv);
gl_FragColor.rg += polar.x;
gl_FragColor.b += polar.y;
gl_FragColor.a = 1.;

License

MIT. See LICENSE.md for details.