Categories
Tutorial Video

Controlling a Shader in Unity 3D from a script

Tutorial and example of how to control a Shader that is assigned to a material from values in a script. In this example we will drag a cube around in the 3D viewport and convert the position data into values that are then passed into the shader changing it colour.

This comes out of a project currently being worked on that requires a Shader to be controlled from an external device. The information around on the internet was sketchy so it seemed a good candidate for a Video and Tutorial.

The Code can be found on the WeirdWorkshop Git hub page https://github.com/weirdworkshop/Controlling-Shaders

Leave a Reply

Your email address will not be published. Required fields are marked *