|
 |
Michael Andrews wrote:
>
> Hi Vahur,
>
> I had a look at the code over the weekend as well.
>
> The problem is that although the three calls to Compute_Pigment in
> lighting.c were changed to call Compute_Pigment2, complex pigments,
> rainbows, skyspheres, fog, isosurface pigment function, media and
> displace_warp (whew! I think that's all - this is from memory) still
> call Compute_Pigment.
>
In POVMan there is 2 functions for pigment calculation: Compute_Pigment
and Compute_Pigment2. Second is for true pigments, first one is for
other (non-objects) and provides default values of missing parts for
shader. This way the number of source code modifications was kept
minimum.
The real problem is that when I merged POVMan with MegaPOV 0.7, I missed
shader call in Compute_Pigment for shader pigments: it was there, but as
with version 0.7 pigment.c file was considerably changed (mostly
different indentation, which resulted in diff file over 700 lines) and I
had little time, I made this omission.
Here is required addition to POVMan 0.7x in order to make it work again:
following lines should be added to function Compute_Pigment, after
BITMAP_PATTERN case:
#ifdef ShaderPatch
case SHADER_PATTERN:
if (Intersection != NULL){
Exec_Shader(Pigment, Intersection, NULL,
Intersection->INormal, Colour, EPoint, 0);
}
else{
Exec_Shader(Pigment, NULL, NULL, NULL, Colour, EPoint,
0);
}
Colour_Found = TRUE;
break;
#endif
Of course better would be to modify source code, as You did it, but I'd
like to keep changes minimal so far, as MegaPov is in constant changing
state. If POV-Ray 3.5 is released, then perhaps I'll do it.
I hope, that new version of POVMan with this correction will be soon
released (if Bouf agrees, then he will do it, otherwise I'll do it on
weekend).
Post a reply to this message
|
 |