Hi,
I would like to create a material that reveals a second texture only when you are shining a flashlight on it. The light is held by player and moves around.
material only visible when lit
-
- Posts: 2
- Joined: Fri Jun 09, 2017 10:41 am
Re: material only visible when lit
I found the example but am still not sure how to feed the transform and rotation values to the shader. Second question is once I have the transform and rotation, how do I get it to reveal only where the light is hitting?
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: material only visible when lit
Hello,DaLiberator wrote:I found the example but am still not sure how to feed the transform and rotation values to the shader. Second question is once I have the transform and rotation, how do I get it to reveal only where the light is hitting?
I think that we might be able to provide a sample that simply reacts to a specific light value. I will get back to you as soon as possible.
Check the Smear sample included in the main package, it demonstrates a simple way to use external values to control specific actions in your shader.
Thanks!
Sales & 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!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: material only visible when lit
Hello,DaLiberator wrote:I found the example but am still not sure how to feed the transform and rotation values to the shader. Second question is once I have the transform and rotation, how do I get it to reveal only where the light is hitting?
We made a sample that generates the effect that you want to achieve, please examine the attached package and let us know if you have any questions. Use the Color to be Filtered property to define which light color will drive the blending effect.
Thanks!
- Attachments
-
- UV light Example.unitypackage
- (21.4 KiB) Downloaded 338 times
Sales & 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!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!