Even if you fail, the solution will make more sense if you tried on you own.Ĭurrently, we only have one plane on the scene with a ShaderMaterial as a PlaneGeometry. If you want to get better at this, pause the lesson on each pattern and try to do it yourself. It's the perfect occasion to discover classic techniques and use built-in functions.įor each pattern, we first study the result then, we try to reproduce it. We will start very thoroughly, and things will get more challenging with time. In this lesson, we will try to draw various patterns on a plane. It's one of the most frustrating parts for some people but fear not even if you are doing poorly with maths, you'll find a solution. Yes, there will be some maths in this lesson. It's much more complicated than drawing with other APIs like canvas because the code is the same for every fragment, and all we have are coordinates and our mathematical skills. We could use textures but drawing the shape gives us more control we can animate the shape parameters, and there is no texture to load. It can help to effectively see those pattern on a geometry or it can be to move the vertices just like we did with the flag in the previous lesson. Often, while creating shaders, we need to draw specific patterns like stars, circles, light lenses, waves, etc.
0 Comments
Leave a Reply. |