Tag Info

Hot answers tagged

6

This is going to be one of those "it depends" answers, so let's get that over with first: "it depends". The objective here is not to reduce workload in one stage but to balance workload across all stages. That's what keeps your pipeline pumping nicely without each stage needing to go idle while waiting on the previous stage to complete. So - with specific ...


4

Usually shader languages come with special types that hold multiple values. For example GLSL has vec2, vec3, and vec4 types which hold 2, 3 or 4 float values... these types are ideal for something like RGB or RGBA values. I don't know which shader language you use, but from your other question I'm guessing it's AGAL (Flash shader). There you use register ...


3

No, you can't. Floating-point numbers have a floating decimal point. So while you may write them as "255.000255", the float is stored exponentially: "2.55000255x102". As you may know, 32-bit floats only store 6-7 decimal digits of precision. 2.55000255 has nine digits. So you can kiss the last 255 goodbye. Now, you can store it as an integer. In ...


2

Of course, this highly depends where your bottlenecks are. If your application is geometry-limited, offloading work to the fragment shader (or doing additional work at effectively no cost) might be a good idea, if it is fill-limited offloading work to the vertex shader is a good idea. If it is CPU-limited, it might even be an idea to move some work from CPU ...


1

You should only render to the area needed as in your example. To speed up rendering, look at using a scissor rectangle.



Only top voted, non community-wiki answers of a minimum length are eligible