He looks a bit flat right now because we haven't implemented any lighting models in our shaders.
At this point, our model loading is very elementary. For one, we can't import any textures, only light. Right now, we don't really process much of the information about the lighting either. We only take the diffuse light color and pass that to our fragment shader. As we develop our fragment shader, we might improve this. Another problem with our model loading is that we only can accept obj files where all faces are triangular. If we export our pig without that setting, most faces in our piglet model are rectangular. Then, only the first three vertices of each face are parsed, and the result looks like this:
We might work on this later, or we might not. As long as model loading (sort of) works, it is not something we want to spend too much time on in this project. Besides, if we wanted better model loading we should probably just import Assimp.
Inga kommentarer:
Skicka en kommentar