|
![](/i/fill.gif) |
In article <41dc85a1$1@news.povray.org>, Darren New <dne### [at] san rr com>
wrote:
> > And, if it's not designed for it from the start, making the VM
> > high-performance for things like shaders would probably be quite
> > difficult.
>
> Errr, well, I'd expect there's be a call that says "Trace." :-) Tcl's
> all in C, and it's designed to call C routines pretty seemlessly. I
> wouldn't think you'd implement the shaders in Tcl, but in C.
C is impractical for other reasons...you'd need a C compiler, obviously.
This is a bigger problem than you'd think. The compiler must exist for
all the platforms POV is likely to run on, and is an obstacle to porting
to new platforms.
Then you need to run this external compiler with the shader code and
link in the result. A C development environment is a bit heavy to
include along with the raytracer, and is likely to be a huge source of
problems on different configurations. Plus there's the security risks of
using such a low level language...you'd pretty much have to disable
programmable shaders for a web-driven application, for example.
Also, with no support for vector/color math or operator overloading, C
shaders would get pretty ugly...though if you can solve the compiler
problem, I suppose you could translate from a customized language into
C, as was done for early C++ and Objective C compilers.
--
Christopher James Huff <cja### [at] earthlink net>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tag povray org>
http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |