mipmap my cubetexture and my nonsquare one too kthx

I'm using AGAL to learn about GPUs. It's pretty fun, but every new thing I try is several hours of, "oh, nothing is rendering. hm.."

It was not obvious to me (or documented) that Cube Textures in AGAL need to be uploaded with all mipmap levels.

It was also not obvious to me (or documented) that if you want any mipmapping, you need to upload all mipmap levels.

It was also not obvious to me (or documented) that if you have a non-sqaure texture, you still need to mipmap all the way down to 1x1.

Where should I go to learn stuff like this? Are there better places to start? Otherwise I will slowly de-noobify myself. But gosh golly this seems like basic stuff that should be in the API documentation.

The other side of it is, the tools for debugging stage3D are really pretty bad. So when something is not showing up, I can't debug into the shader or ask the gpu what it thinks, very easily. (maybe I should make some tools here.?) Instead I'm left to cobble together my own checklists like:

  • check your math
  • short circuit to a known working texture/shader
  • think harder
  • add shader instructions back in to see if one of them mysteriously breaks something
  • google related keywords
  • try to think of a way to check intermediate/simpler results
  • check your math
I don't mean to complain too much. I am having a good time. Half the time when nothing shows up it's because my math is wrong, and it's hard to get too upset* about that. But, if this is what it's like to be a graphics programmer, then, graphics programmers need some serious tool loving.

*But I'll try. Friggin mathematicians and their badly named variables. Effing half the variable names used in math are NON PRINTABLE CHARACTERS on a standard keyboard. why don't you call it Math.ratioOfCircumferenceToDiameter or something sensible like that. GAAH.

No comments:

Post a Comment