POV-Ray : Newsgroups : povray.general : Status of Moray? : Re: New SDL for POVRay Server Time
14 Jul 2025 22:57:55 EDT (-0400)
  Re: New SDL for POVRay  
From: Shay
Date: 27 Sep 2007 19:33:02
Message: <46fc3dae$1@news.povray.org>
Warp wrote:
> Jim Charter <jrc### [at] msncom> wrote:
>> I hit a bump, conceptually, when I see the term 'shader language'.
> 
>   The idea of shaders is that instead of having a limited set of
> hard-coded algorithms for calculating surface texturing <snip>
> the engine offers an efficient language which can be used to
> add new algorithms used to determine the color of the surface.

Just to add a bit to what Warp has said.

A shader language would allow a user of SDL access to more of what 
POV-Ray knows abut a surface, light_source, etc.

An example is the calculation of a specular highlight which requires 
knowledge of the angle of incidence of a light_source to a surface. 
Bringing that information to the user on a ray by ray basis would allow 
for things like:

#if AOI > SomeNumber color_it_this_way #else color_it_another_way

or

pigment { AOI * Something + SomethingElse color_map { ...

A possibly more exciting example to a traditional media artist like 
yourself: You'll be familiar with the concept of shading and tinting 
paint. POV-Ray (effectively) shades colors as they darken, with access 
to the illumination of a ray intersection, you could instead tint colors 
as they lighten.

  -Shay


Post a reply to this message

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