I am looking at some examples of glsl frag shaders that use gl_FragData[0].
If I wanted to update this because its deprecated in version 130 and above how would I go about rewriting that?
I am looking at some examples of glsl frag shaders that use gl_FragData[0].
If I wanted to update this because its deprecated in version 130 and above how would I go about rewriting that?
In short, you declare your own output variables in your shader using the "out" prefix. Then in your code, you map the outputs using glBindFragDataLocation. See here for some examples.