Hey guys, that presentation of the zombie baseball team inspired me to use my textures more efficiently, and I would like to put my gloss and specular in the alpha channels of my diffuses and normals (if they have no transparency of course)
Edit: Found it out, copy paste in photoshop is just confusing to me, gotta select all then paste
Is there any drawback into just pasting my gloss and spec into my normal and diffuse textures ? This seems to be too good to be true, that would cut my texture-sample usage in half if I use a black/white specular, or do i miss something crucial there ?
Replies
But it's pretty much the same memory cost as a new RGB texture for the spec/gloss (16 bits for adding 2 uncompressed alpha channels to existing textures, 16 bits for compressed 5/6/5 bit R/G/B texture).
But you're right in that it'll save you texture calls if you keep the spec/gloss in the alpha channels.
1 32bit image (RGB+A) = same size compressed as 2 24 bit images (RGB, RGB)
So you lose out on specular color for no gain. Its better to use Full color spec with gloss in the alpha, which is the same memory cost.
Unless you can pack a 3rd texture, then put spec in R, gloss in G, and something else in B (height/displacement map, ao, alpha for transparency, etc).
Depending in the hardware I think it's 8 or 16 textures? Possibly more on modern hardware.
That and it can be helpful for organisational purposes to keep the number of textures down.
Were draw calls calculated per material or per texture sample ? else you could save on draw calls aswell
Texture samples are just standard shader operations, they simply add to the cost of the shader (and there's a bunch of factors that can make them faster/slower). Texture calls are essentially the number of different textures that a shader samples.
e.g. You could sample one texture 50 times, but you couldn't sample 50 textures one time.