GLSL reusable/shared functions, shared constants (OpenGL ES 2.0)?
问题 Short: Can I define a function that every shader can use? Or I have to define it per shader? The whole story: I want to create numerous shaders intended to colorize the input fragments with predefined gradient ramps (something like this - http://www.thinkboxsoftware.com/storage/krakatoa-support-images/krakatoa15_kcm_densitybyage_gradientrampmap.png). I want to define a gradient ramp constant for each shader (an array of vec4 color samples, where the alpha value holds the gradient position,