Does any one know a way to program a fast simulator library for a vertex shader?
Posted on 2002-12-22 04:58:32 by amr
Actually ANY engine for software render can do both vertex and pixel shaders and much more with extreme ease... hmmm but not at the same speed as hardware ...

Consider understanding what vertex and pixel shaders are:

Until curently one could not change the way shading a triangle worked, because it was fixed to some (a few) standard models inside hardware. Vertex added the ability to somehow modify this at every vertex in a mesh while the latest "pixel shaders" allow you to change (programatically) the aspect of every pixel in a texture (without reloading it from system ram that is)

So ANY software renderer is able to modify programatically each pixel of a texture before rendering it on screen :)

I guess hard part is that you will just have to emulate the special language used to program the video board CPU into doing that. You will loose some extra speed here...

To make this fast you will have to write a special (somehow simple?) compiler that will have as input the pixel shader language (the DirectX one?) and output a CPU optimized routine that must be called for every pixel...


The whole ideea of adding those operations to video board is to mantain speed while adding some (just some) flexibility. But IMHO software renderes have much more flexibility ... hellas they do not yet have the same speed :(
Posted on 2002-12-22 15:49:11 by BogdanOntanu
I do know that ANY software engine can do so, but the idea is that I want to make my own engine that makes much faster than that used by Opengl or
DirectX, They are so slow.

There must be a way to give a higher performence.

thanks
amr
Posted on 2002-12-23 04:53:30 by amr
I wrote a dynamic code generator for this kind of task: SoftWire. Currently I am focusing on using it for vertex and pixel shader emulation for my software renderer. You might also be interested in this thread: Automatic Register Allocation which discusses the future of this project.
Posted on 2002-12-25 15:27:59 by C0D1F1ED