Currently the concepts pretty much still apply.
Technology certainly does 'evolve' just not by random mutation!

kevinsbro wrote:Ok, some good advice here.
So I know now to stay away from "if's" but do you guys know how performance behaves on computers with integrated graphics on their CPU? (No actual graphics card)
And then the only way I know to stay away from "if's" is to create a bunch of different shaders, which means a bunch of irrlicht materials. Is there any drawback from having so many? It doesn't eat at my GPU memory, does it?
And if the vertex shader runs per vertex and the pixel shader runs per pixel on screen, how does the vertex know which pixel to send the TEXCOORD(or whatever) data to?

kevinsbro wrote:Well here's another thought. Does it cost memory or performance to pass a texture to the shader?
Radikalizm wrote:kevinsbro wrote:Well here's another thought. Does it cost memory or performance to pass a texture to the shader?
Of course it costs memory and performance, you do an upload to video memory when you bind a texture. These uploads have to go through the driver, and driver calls are pretty slow in most cases (hence the reason why should keep state switches to an absolute minimum while rendering). Texture samples in shaders could be costly too, so that's another point to be aware of.
For memory usage you can do the math yourself: Say you have a 1024x1024 texture in an RGBA format, this means you'll have 8 bits per channel or 32 bits per pixel, which comes down to 4 bytes per pixel. Multiply this by your resolution and you get 4 * 1024^2 = 4194304 bytes, or 4096 kb or 4Mb used in video memory
On current-gen cards this doesn't sound like much, but it doesn't mean you should not keep your texture usage in mind

REDDemon wrote:shouldn't mipmaps add 1,33 of the total size to texture size? so that 4MB becomes 5,33MB?

Users browsing this forum: No registered users and 0 guests