Ghogiel,
Should the sf_zbuffer_test flag be enabled only for transparent objects? Or is there wider use?
Miax
well in theory- yeah, only on meshes with alpha transparency.
but, bethesda also uses it on many other things that do not have alpha. but it's not unknown for them to do unnecessary things similar to that.
I actually had an issue reported on my cybermen armor the other day... basically the knees would disappear. i have no idea wtf. my theory is that the meat caps, which have alpha, and are actually even disabled from rendering, somehow are glitching. I never seen it, but basically my attempted solution was to copy the shader setup verbatim to what bethesda did on the meat caps and the armor mesh, incluing the aparently useless shader flag set up. hopefully fixing it for that one user. but i haven't reproduced the glitch, or actually seen a screen shot or anything, and haven't had a report back from the user about whether or not that did anything. so perhaps because there is a transparent mesh involved at all, ie the meat caps, you may want the zbuffer test shader on basically everything in the nif, ie the rest of the armor, even it that trishape doesn't have alpha on it itself. if you see what i mean.
< actually i just thought of another possible solution for me to try if that fails... here is something for you to note down, not many people know about when dealing with alpha, it is one of my ninja techniques for solving a particular type of alpha sorting issue
Nif block order actually is the order in which the drawcalls of the mesh objects are made on screen. this means that for example in a nf, you had 2 semi transparent mesh objects. say 2 cylinders, one has a slightly smaller radius, and is inside the other, the nitrishape/strip that is inner most will want to be the first, or have a lower block number of the 2 for it to render correctly. the theory is, that the first shape in the list is drawn first, but when alpha sorting is taken into account, you need the ones that will be further away in the z-buffer to be drawn first then the ones closer to the camera can be drawn on top of that..
to reorder blocks in nifskope select the block, and use the ctrl+arrow keys to move it up or down in the block list.
an example where i did this is in my lava lamps i made a couple weeks ago.