- Home /
How to save a variable from the shader?
Hey.
I need to run the facility two shader. The first is to determine the minimum and maximum the luminances of pixels, and then pass it to the script, the second shader. How to pass variables to the shader I understood, but to get the variable shader I can not. Problem is that I just can not get an "end" to the desired variable - as you know, I have to take two variables, which are compared with all of the pixels on the texture. Only when comparing the end, I have to get the variable you want the script to change the shader on the material and put it in the parameters obtained earlier variables.
Can anyone explain or show how to do it? Desirable, on a simple example in the form of a control script in C # and most shader.
Thanks in advance.
Your answer
Follow this Question
Related Questions
Flat Shading / No Vertex Interpolation 2 Answers
Can a CG shader fail to work on hardware? 1 Answer
How to access another sprite's texture from a 2D shader 0 Answers
Need help with a shader. 3 Answers
Simple Cg shader not compiling 1 Answer