POV-Ray : Newsgroups : povray.pov4.discussion.general : Reviving some pov4 discussion : Re: Reviving some pov4 discussion Server Time
26 Apr 2024 08:57:40 EDT (-0400)
  Re: Reviving some pov4 discussion  
From: clipka
Date: 5 Aug 2015 02:42:41
Message: <55c1b061$1@news.povray.org>
Am 05.08.2015 um 03:04 schrieb Anthony D. Baye:

>> why not simply add a shader option to the texture block, and use something like
>> OSL for the shader language?
>>
>> http://code.google.com/p/openshadinglanguage/

Uh... "simply"?

Maybe because we'd need to...

- design the new SDL in such a way that the OSL can be embedded therein 
without conflict;

- design the new SDL parser in such a way that the OSL can be plugged 
into it;

- design a layer that provides the exact features exposed to the user by 
the OSL;

- prepare for a never-ending struggle to explain to users why feature X 
is part of OSL but not supported by POV-Ray; and

- prepare for a never-ending struggle to explain to users why syntax Y 
in the SDL doesn't do the same as in the OSL.


Thanks, but no thanks.

/Maybe/ OSL will be supported by some POV-Ray 4.5, as an /alternative/ 
to the native shader definition syntax. But not in POV-Ray 4.0, and 
certainly not as the primary language for user-defined extensions.


> Then too, if we end up with an OO SDL, would the shader become an object?
> Perhaps a subclass of texture... or maybe a superclass... sibling?

Exactly that.


> At any rate, my point is why make the job more difficult by designing two
> complete languages, when we can use one that's already made.

Because (A) one of those two languages needs to be designed from scratch 
anyway, in order to be suitable as a Scene Description Language for 
users who don't want to be programmers.

I don't want users to have to write

      MySphere = new sphere;
      MySphere.center.x = 2.0;
      MySphere.center.y = 1.0;
      MySphere.center.z = 5.0;
      MySphere.radius = 0.5;
      MyScene.add(MySphere);

when a specially-designed language could make it a one-liner, like it is 
in the current SDL. I've yet to see a language other than SDL 3.x that 
fits the bill; but I know that a language can be designed to achieve 
that goal.

And (B) because the two complete languages will be just one. With a 
different set of objects to manipulate, but the same underlying language 
nonetheless.


Post a reply to this message

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