POV-Ray : Newsgroups : povray.binaries.images : Function-Based Shader Macro : Re: Function-Based Shader Macro Server Time
15 Aug 2024 02:24:39 EDT (-0400)
  Re: Function-Based Shader Macro  
From: Christoph Hormann
Date: 18 Aug 2002 04:49:09
Message: <3D5F5F85.A63CB5A@gmx.de>
Christopher James Huff wrote:
> 
> [...]
> 
> One possibility would be to allow you to specify a function for any
> float, color, or vector value in the finish...would that satisfy you? ;-)

This has already been done in mlpov (a french patch):



Dans la partie finish d'une texture, au lieu d'un float ou d'une couleur

fonction. Attention il faut que la fonction retourne une valeur/une



finish {
    [uv_mapping]
    ambient COLOR | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
    diffuse Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    brilliance Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    phong Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    phong_size Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    specular Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    roughness Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION (Cf. warning)
    reflection COLOR | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
    reflection { 
      Color_Reflection_Min | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
      ,
      Color_Reflection_Max | VECTOR_FUNCTION_IDENT | VECTOR_FUNCTION
      falloff FLOAT_FALLOFF | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
      exponent FLOAT_EXPONENT | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION (Cf.
warning)
    }
    irid { 
      Irid_Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
      thickness Amount | FLOAT_FUNCTION_IDENT | FLOAT_FUNCTION
    }   
}

See: news://news.zoo-logique.org/aj8g57%241i8%241%40hebus.grizzlydev.com

I have not tried it yet, but it seems to work.  It would of course be good
if the functions would also take into account the other intersection
information (i.e. normal, ray direction).

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

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