Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6822

Hlsl Atan2

$
0
0

@willmotil wrote:

Does anyone know what the differences are if any between Hlsl atan2(x,y) and our c# Math.Atan2(x,y)
Im getting some weird results in a shader.

It seems like i get results in the negative -Pi / 2 to Pi / 2 range which sort of makes no sense but the hlsl page is a little crypic on the return value when it states the following...

The signs of the x and y parameters are used to determine the quadrant of the return values within the range of -? to ?.

I might as well ask another question when you are writing the depth to a rendertarget does the depth buffer internally use just the z value of the position or is the w coming into play as well ?

Posts: 4

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 6822

Trending Articles