Polar Cooridiantes

Id like to a cartesian to polar distortion, only formular I’ve found is from filter factor,
radius=sqrt(xx+yy)
angle=atan(y/x)
then rgb = rad(angle,(max radius-radius),z)
So is there a function like rad in hlsl?
Im not at home at the moment so havent got my reference books!
Its not urgent though, just wondered if any one had tried it yet!
Cheers

Cat

i send you the source code of the polar node and a polar vertexshader, which does the polar transformation instead of the perspective transformation of the camera.

seb

polar.zip (3.2 kB)

Cheers Seb,

Thats pretty freaky!
I’ll have fun with that!

Cat