|
![](/i/fill.gif) |
Mark Wagner wrote:
>
> When a shader is used as the pigment for a sky_sphere, POV-Man for Windows
> crashes with an invalid page fault.
>
As I suspected, the problem was in the fact, that sky_sphere is not
usual object, but something else: in this case intersection information
is not available (NULL pointer is passed instead), but shader relies
heavily on intersection information and uses passed pointer without
checking. This is omission from my part, as there is number of places,
where instead of pointer to intersection NULL pointer is passed along.
First I thought, that I should disable shader use in such cases, as only
information, which is available, is pigment evaluation point and pigment
itself: shader would have very limited use.
But then I imagined, that shader might come in handy even in these cases
and provide possibility to customize sky_sphere, media density etc.
calculation. So I made it work with such semi-objects: warning from
renderer is issued cases:
"shader is used with non-object, intersection information incomplete"
but shading calculation is performed anyway.
(I try to enhance this warning displaying and display it only in such
cases, when information, which is not available, such as normal or uv
coordinates, is really used in shader. But this may be difficult to
implement it in this manner, that all such cases are caught, so perhaps
I stick with easy solution and issue warning just every time).
Hopefully within couple of days new patch will be available.
P.S. Mark, out of curiosity, what was the reason to try anisotropic
shader with sky_sphere? Was it attempt to break things or attempt to
perform something nice? Sky sphere is not usual object and its shading
calculation lacks number of parameters (most notably normal of surface),
which are needed for anisotropic shader.
If first reason was real one, then you succeeded :o) and I failed :o(
On second case, if you have some idea in mind and haven't succeeded in
its implementation, then perhaps you could describe it and i'll try to
help.
Post a reply to this message
|
![](/i/fill.gif) |