POV-Ray : Newsgroups : povray.unofficial.patches : POVMan Q: Coordinate transforms in shaders. : Re: POVMan Q: Coordinate transforms in shaders. Server Time
6 Oct 2024 11:06:50 EDT (-0400)
  Re: POVMan Q: Coordinate transforms in shaders.  
From: Vahur Krouverk
Date: 11 Jul 2001 16:34:33
Message: <3B4CB8FA.62571B79@comtrade.ee>
I just started to think, that maybe shader transformations do not apply
to warp at all and after tests this seems to be the case: I printed out
value of P and all transformations for it return same value. P's value
on input is in shader space. So it seems to be an explanation, why
transformations do not work correctly: direction vector Dir is in world
space, but P is in shader space and transformations from one space to
other do not work. 
One possibility is to calculate direction vector in POV-Ray beforehand
and supply to shader (note that translations should not be applied to
calculate vector transformation, only rotations and scales). But with
bigger number of objects it gets messy... 
Other option is to rewrite texture as 'true' surface shader.

I have to admit, that I'm not very much learned this warping code and
can't say right now, whether it is possible to make it working as normal
shaders (i.e. transformation matrices will be available). Time
permitting, I try to explore it better and improve shader support or
write better documentation for it.

Vahur


Post a reply to this message

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