- Home /
 
               Question by 
               Setzer22 · Aug 09, 2014 at 10:46 AM · 
                shadertextureshader programmingpixel  
              
 
              Get the color value of a pixel in a texture or send data array
How can I, from a CG program in the fragment shader, get the color of the pixel (x,y) for a given texture?
My real question is actually how to pass an array of custom data to a shader, but I just read that unfortunately this is impossible with unity. If I'm wrong or there's another easier or more efficient workaround to do what I want that passing in a texture, please I'd like to know that as well.
Thank you very much!
               Comment
              
 
               
              I'd also like to clarify that I'd like to retrieve the color of a pixel at coordinates x,y in pixels, not in floats. Is that possible?
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                