New RenderQueue structure working, vertex / fragment programs now independent

· by Steve · Read in about 2 min · (233 Words)

The split of vertex programs and fragment programs is done, they are now totally independent. I also fixed the remaining problems with the BSP demo (caused by some Q3A shader scripts including duplicate names, the swines), and completed the optimisation of the new Pass structure in the render queues that I mentioned before I went on holiday. I had a few problems with the cube mapping on the water demo again, there are some odd dependencies when using cube mapping in conjunction with non-identity world matrices that means you have to reissue the texgen / texmatrix calls after updating the world/view matrices to avoid some very odd artefacts, like the cubemap spinning around with the ogre head, or the reflection flipping over depending whether the ogrehead is in view or not. This happens with both D3D and GL in slightly different ways, I’ve got around it by detecting the presence of texgen types which cause this problem and reissuing the texture options after the other matrices are in place.

Next on my list is setting up D3D to populate the list of accepted syntax codes correctly based on the detected vertex and fragment program versions, then the material compilation should correctly take this into account. After that, it’s on to writing the new .material parser, although before doing this I’ll probably play with some hand-crafted programmable materials to make sure everything is ok.