I see many example in shadertoy use
texture, but in the cocos2d-x, only
texture use normalized coordinate and
Because when I use
texture2d, it returns wrong result.
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It only takes a minute to sign up.Sign up to join this community
texture2D is the same as
texture, but it's used in the older versions of glsl.
Between glsl 120 and 130 they changed the function to
texture and made it accept every kind of samplers, not just a
There's no difference between them, so the problem is probably in your code.