POV-Ray : Newsgroups : povray.advanced-users : POVRay and XML : Re: POVRay and XML Server Time
28 Jul 2024 22:27:09 EDT (-0400)
  Re: POVRay and XML  
From: Christopher James Huff
Date: 5 Jan 2005 20:44:25
Message: <cjameshuff-D06490.20442405012005@news.povray.org>
In article <41dc85a1$1@news.povray.org>, Darren New <dne### [at] sanrrcom> 
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] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.