Trivial shaders

Posted By: Excessus

Trivial shaders - 07/26/06 20:16

I have created a normalmapping shader with diffuse + specular lighting based on the sun. As a LOD2 technique (beta feature) I have a shader that does normalmapping without specular and as the lowest LOD, LOD3 I have a shader that does just per vertex diffuse lighting and fogging. This last shader is very fast , but I wonder if it is smart to use a shader for this at all.. Would an FFP effect be faster in this case? I heard many hardware vendors nowadays emulate the fixed function pipeline with shaders, but those shaders might be more optimized..

Does anyone know more about this? I guess that FFP is faster on old cards, and that for modern cards I'm better of writing a simple shader that does exactly and only what I want it to. Can someone confirm that?

Also, where can I learn more about writing FFP effects?
Posted By: Rhuarc

Re: Trivial shaders - 07/30/06 06:24

Technically, using a pixel/vertex shader can be faster and more efficient, because it customizes the rendering pipeline, overriding the actual FFP processing. For example, int this way you can prevent the device from calculating dynamic lighting (static sunlight only, or fewer than 8 lights in your shader would be a speed increase over basic FFP). This is in general, I'm sure there are some inconsistencies with older cards due to the nature of the first pixelshader architectures paired with slower card processing speeds.

It's really up to you, I'd try both, and see what works best on a wide range of systems...

-Rhuarc
© 2024 lite-C Forums