0

Add optional World Position Inputs to Screen Pos Node

sugarchap 8 years ago 0

Hi!


I'm using Shader Forge to add a cool, screen spaced effect to our shaders (great package!).


Something I've had trouble with in the past is how to calculate the offset (in screen space) of one point from another. i.e. How far right and up is this point of a mesh in screen space from it's origin.


I've had a big adventure constructing this in nodes, but ended up re-approximating the Screen Pos node out of lots more nodes, and it got very complicated indeed. The adventure in full, is here:


http://neatcorporation.com/forums/viewtopic.php?f=4&t=40&e=1&view=unread#unread


My current solution is to hand edit the resultant shaders, but our workflow is beginning to creak.


A simple solution for me would be the ability to pass in a world coordinate to the Screen Pos. node, which is then outputted as normal.


Any help towards this would really help our pipeline and quality.


All the best,


Ad.