Musings, ramblings, rantings about technology, games, puzzles, and whatever else catches my attention.
Tuesday, July 2, 2013
They're Boxy But They're Good.
So, what you see here is two separate programs, for no really good reason, with 5 different batches of vertices - one for the triangle, and then four faces of a cube.
Along the way, I migrated to glMatrix.js v2.2.0, which is a comfort. Not a lot necessary at this point to do the migration, so I'm glad I did it when that was true, rather than later, when it would have been a lot of annoying teasing out of weird errors.
Next up, I think, is to pass in the vertex colors into the fragment shaders, as demonstrated in the Learning WebGL Lesson 4. I get what it's doing, so it's just a matter of copying and pasting to get it in, and then tinkering to get it right.
I still intend to break the "model-view matrix" into a "model->world" matrix and "world->camera" matrix. That, too, should be pretty easy.
I've skimmed Lesson 4, and I think I get what's going on. If I understand it, though, it's transforming 3x the vertices necessary and moving down 3x the color information. I'll see if I can get it to run, and then see if I can fix it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment