Amplifying your potential.

Screen space masking

Node-based Shader Editor
2 posts • Page 1 of 1

Screen space masking

Postby BaaBaa » Thu Apr 04, 2019 4:30 am

Hi, I'm bit of a shader noob and I'm sure what I'm trying to achieve is simple but I just can't seem to find the right nodes. Here's what I'm trying to do:
I want to define an arbitrary point in object space, convert that into screen space coordinates, and then take the distance between that screen space point and the screen space coordinates of a fragment to decide whether I should keep or discard it with an opacity mask. I'm really struggling with the first part, as there does not appear to be an object to screen node.

Would also like to know if there is an easy way to get renderer bounds information (e.g. size) into ASE.

Any help would be appreciated.
BaaBaa
 
Posts: 1
Joined: Thu Apr 04, 2019 4:25 am

Re: Screen space masking

Postby Amplify_Borba » Wed Apr 10, 2019 4:06 pm

Hey there!

You can use the Transform Position node to pass coordinates from Object to Clip, then use the resulting data in the Comput Screen Pos node, as it converts a position in clip space into screen space coordinates.

We're hoping to add this conversion to the Transform Position node later on, but for now this is how you can achieve the intended results.

To pass renderer bounds information into ASE you'll have to do so through scripting, our Smear and ForceShield examples show examples of how you can use scripting together with our editor.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


2 posts • Page 1 of 1

Return to Amplify Shader Editor

Who is online

Users browsing this forum: Google [Bot] and 2 guests