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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With