Hello forums,
I've recently been into rendering. I wanted to have some fun with the tessellator and rendering random 3D shapes, like this triangular prism:
I currently have the two slanted sides, and the two triangular bits rendering. I want to know how to figure out what 'direction' a group of vertices faces. For example, this code renders the image below:
tessellator.addVertexWithUV(0.0F, 0, 0, 1, 0);
tessellator.addVertexWithUV(0.5F, 1, 0, 1, 1);
tessellator.addVertexWithUV(1.0F, 0, 0, 0, 0);
tessellator.addVertexWithUV(0.5F, 0, 0, 0, 1);
But, by simply changing a couple of numbers(i.e. the first parameter) and switching some around, I can make it face the opposite direction. What about the new code makes it so that it faces another direction? I only have about 2 days worth of experience on this topic, so sorry if the answer is obvious. Any help is appreciated.
EDIT: TheGreyGhost saves the day, once again. Thank you! <3