POV-Ray : Newsgroups : povray.pov4.discussion.general : Feature proposition: syntax for custom reflections : Re: Feature proposition: syntax for custom reflections Server Time
12 May 2024 08:22:11 EDT (-0400)
  Re: Feature proposition: syntax for custom reflections  
From: John VanSickle
Date: 4 Mar 2008 16:31:25
Message: <47cdbfad$1@news.povray.org>
Warp wrote:
>   Of course this doesn't stop POV-Ray from having a library of shaders
> which imitate what the current hard-coded lighting models and textures do.
> (In some cases perhaps some hard-coded versions may be necessary for
> speed reasons.)

And in point of fact, hard-coding the common algorithms is something 
that ought to be considered for version of POV-Ray beyond v4.

I know that there will be trade-off considerations.  Code that is 
simple, small, and very commonly used will be hard-coded first.

The way POV-Ray currently does macros allows something to be done with 
macros at the start, then implemented in binary later, and the only 
thing that has to be done to make the scene code work is to comment out 
the macro.

Giving the SDL the capability to detect whether a keyword is part of the 
SDL may be the simplest way to support this.  #ifndef makes semantic 
sense in this regard:

#ifndef(function_name)
   // SDL code to define function_name()
#end

Until function_name is hard coded, the code block defines the function 
and its behavior, but one it's defined, the SDL version is no longer 
needed and is no longer parsed.  If done right, the effect should be 
transparent to later users of the code.

Regards,
John


Post a reply to this message

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