Skip to content

Instantly share code, notes, and snippets.

@Fewes
Fewes / PolarCoordinates.hlsl
Created February 6, 2024 07:17
Polar/spherical coordinates conversion functions
#ifndef POLAR_INCLUDED
#define POLAR_INCLUDED
#define PI 3.14159265359
float2 UVToPolar(float2 uv)
{
return float2(uv.x * (2 * PI), (uv.y - 0.5) * PI);
}