Skip to main content
Clarifying, embedding example
Source Link
DMGregory
  • 141k
  • 23
  • 258
  • 401

Understanding Screen Position Node in 3D game developmentUnity Shader Graph

I'm struggling to understand what exactly the Screen Position node outputs in Unity's Shader Graph.

I'm using the screen position with scene depth to calculate the distance between two objects.

Every tutorieltutorial I saw (like Brackey's forcefield one) is using the alpha channel of the Screen Position output.:

Screengrab from Brackey's tutorial showing how Screen Position node is used

I read that the Screen Position node outputs the mesh vertex screen positions.

  • doesDoes it means the 2D position on the screen projection?
  • orOr the vertex 3D position from the eye space?
  • andAnd more importantly, what is exactly the apha channel of this output? (I have the feeling this is related to the "clip space W component" in the documentation)

Understanding Screen Position in 3D game development

I'm struggling to understand what exactly Screen Position node outputs in Unity's Shader Graph.

I'm using the screen position with scene depth to calculate the distance between two objects.

Every tutoriel I saw (like Brackey's forcefield one) is using the alpha channel of the Screen Position output.

I read that the Screen Position node outputs the mesh vertex screen positions.

  • does it means the 2D position on the screen projection?
  • or the vertex 3D position from the eye space?
  • and more importantly, what is exactly the apha channel of this output? (I have the feeling this is related to the "clip space W component" in the documentation)

Understanding Screen Position Node in Unity Shader Graph

I'm struggling to understand what exactly the Screen Position node outputs in Unity's Shader Graph.

I'm using the screen position with scene depth to calculate the distance between two objects.

Every tutorial I saw (like Brackey's forcefield one) is using the alpha channel of the Screen Position output:

Screengrab from Brackey's tutorial showing how Screen Position node is used

I read that the Screen Position node outputs the mesh vertex screen positions.

  • Does it means the 2D position on the screen projection?
  • Or the vertex 3D position from the eye space?
  • And more importantly, what is exactly the apha channel of this output? (I have the feeling this is related to the "clip space W component" in the documentation)
Source Link
Martin
  • 163
  • 1
  • 2
  • 9

Understanding Screen Position in 3D game development

I'm struggling to understand what exactly Screen Position node outputs in Unity's Shader Graph.

I'm using the screen position with scene depth to calculate the distance between two objects.

Every tutoriel I saw (like Brackey's forcefield one) is using the alpha channel of the Screen Position output.

I read that the Screen Position node outputs the mesh vertex screen positions.

  • does it means the 2D position on the screen projection?
  • or the vertex 3D position from the eye space?
  • and more importantly, what is exactly the apha channel of this output? (I have the feeling this is related to the "clip space W component" in the documentation)