- Home /
Send data from a inner CG variable back to a Shaderlab property, is it possible?
I know that you can get data from a Shaderlab property to a CG inner program, is there a way to get a variable value back to a Shaderlab property from the inner CG program?
Comment
Best Answer
Answer by Murcho · Jan 28, 2010 at 10:46 PM
The short answer is no, the long answer is yes but only if you are able to write the data to a texture and then read the texture in a script, which can be a slow process and quite often negates the purpose of the shader in the first place.
Hi $$anonymous$$urcho. Can you please post a small snippet as to how to do that? Wont it be efficient if the texture being written to is very small?
Your answer
![](https://koobas.hobune.stream/wayback/20220612035037im_/https://answers.unity.com/themes/thub/images/avi.jpg)