Advertisement

glsl question

Started by May 03, 2013 06:35 PM
1 comment, last by pressgreen 11 years, 4 months ago

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?

J-GREEN

Greenpanoply

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.

Advertisement

Thank you very much this chapter is very helpful.

J-GREEN

Greenpanoply

This topic is closed to new replies.

Advertisement