Home > other >  Ask a shader
Ask a shader

Time:04-21

If I want to a by four vertices, consisting of a rectangular, at the time of rendering into arch (that is, two arms bend) up and down, I should be in the vertex shader to do offset, or in the fragment shader to do?

CodePudding user response:

Just tried it on vertex shaders, suddenly realized, can do the offset, but offset is for the whole of the vertices, so the effect will be held throughout the tilt, but not between vertex bending,

But on the fragment shader, does not have a place where they set the vertex positions,

Before the cocos creator tutorial, one is by using a 2 d rectangular bending, presents a pseudo 3 d perspective effect, and does not generate additional vertices, now want to try but don't know where to begin,

Still hope bosses can teach the 3 d engine
  • Related