|
![](/i/fill.gif) |
Warp wrote:
>
> It would have been interesting if you had provided some benchmark results
> (eg. how much time does it take to render a shader compared to a regular and
> similar texture, etc).
>
Of course, but I've developed it on 486/DX2 66MHz and this is not just
best box for benchmarks.
Now when I have Windows version, I try to perform tests on my working
machine (PII 350Mhz).
But results of some tests (this was on performed on Linux with debug
version):
Pure shader call (well, almost, it assigned red to surface color)
increased execution time 33 % (pure POV-Ray executed scene 15 seconds,
with shader it took time 20 seconds). Main overhead comes from memory
management (separate shader instance is allocated each time in order to
be reentrant), if I tried it without allocation, then time was almost
same (16.xx sec). So there is area for improvement (one possibility it
to preallocate shader instances).
When shader has more code, then difference will be bigger: e.g. povshad
scene, which renders one sphere with POV-Ray shading, other with shader
language, has following results:
Pure POV-Ray sphere: 12 seconds
Shader sphere : 38 seconds
Here probably illuminance loop, which is executed for shading, incurs
such an overhead. Alas, this is the price for flexibility.
However, I consider it as beta version and with this release I wanted to
test, whether there is enough interest for such patch. So far I've tried
to make it correct, performance has not been my major concern. In future
I will tinker with performance buttons and knobs more.
Post a reply to this message
|
![](/i/fill.gif) |