GLSL -- texture1D is deprecated, what to use instead?
Asked Answered
A

1

13

I'm writing a GLSL shader to #version 130 (OpenGL 3.0)

It gives a warning that "global function texture1D is deprecated after version 120"

I've googled but can't find much. If it's deprecated, then what should I be using that provides similar functionality?

Awaken answered 10/6, 2013 at 7:45 Comment(1)
https://mcmap.net/q/906427/-glsl-versions-change-log will probably be helpfulMonostrophe
C
16

In modern GLSL the deprecated texture1D/2D/3D/Shadow functions have been replaced by a general texture function (and likewise for the ...Proj versions and the like) overloaded for all possible sampler types, whose actual dimensionality and type is just determined by the sampler argument. So just leave away the 1D and you're done.

Combustor answered 10/6, 2013 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.