--Chapter 3: Starting from the 3D Basics—

I just wanted to give you some insight on what happens behind the scenes. One thing about any 3D program, engine, and library is that most (if not all of them) use triangles as their primitives. Every shape is made out of them, but that doesn’t necessarily mean that you have to create every triangle yourself. The convenience of this is that you can just create a set of vertices and be done with it. The GPU generates the triangles itself by just looking at the coordinates for the vertices. The coordinate system in Citro3D is X going horizontal (left and right), Y is going vertical (up and down), and Z is going forwards and backwards. Everything is using Hardware Rendering instead of Software Rendering. Hardware Rendering means to render on the GPU while Software Rendering is to render on the CPU which rendering on the GPU is a huge speedup as more effects are rendered faster and better. Software Rendering on the other hand, is much slower and not recommended for Citro3D homebrew. Luckily, Citro3D uses Hardware Rendering by default so there’s nothing to worry about.

Next, there’s the vertex shader and the geometery shader. The vertex shader defines things such as color, initializes the position, creates the X, Y, Z, and W coordinates, etc. Geometery shaders on the other hand are really just themes that can change the look of your homebrew. In Citro3D homebrew, since the 3DS’s framebuffers are rotated 90 degrees, the vertex positioning is different also. If you look at it normally (just regularly without rotating the 3DS yourself) X is going up and down instead of left and right, and Y is going left and right instead of going up and down.

results matching ""

    No results matching ""