@@ -2313,17 +2313,21 @@ void Parser::Parse_Finish (FINISH **Finish_Ptr)
23132313 mExperimentalFlags .backsideIllumination = true ;
23142314 END_CASE
23152315
2316+ #if POV_EXPERIMENTAL_LOMMEL_SEELIGER
23162317 CASE (LOMMEL_SEELIGER_TOKEN)
23172318 New->LommelSeeligerWeight = Parse_Float ();
23182319 mExperimentalFlags .lommelSeeliger = true ;
23192320 END_CASE
2321+ #endif
23202322
2323+ #if POV_EXPERIMENTAL_OREN_NAYAR
23212324 CASE (OREN_NAYAR_TOKEN)
23222325 New->SetOrenNayarSigma (Parse_Float ());
23232326 mExperimentalFlags .orenNayar = true ;
23242327 PossibleError (" Parameterization of the Oren-Nayar diffuse model has not been finalized yet."
23252328 " Expect future versions of POV-Ray to render this scene differently without warning." );
23262329 END_CASE
2330+ #endif
23272331
23282332 CASE (REFLECTION_TOKEN)
23292333 {
@@ -2542,21 +2546,25 @@ void Parser::Parse_Finish (FINISH **Finish_Ptr)
25422546 END_EXPECT /* End of finish_mods */
25432547#endif
25442548
2545- if ((New->OrenNayarA != 1.0 ) || (New->OrenNayarB != 0.0 ))
2549+ #if POV_EXPERIMENTAL_LOMMEL_SEELIGER
2550+ if (New->LommelSeeligerWeight != 0.0 )
25462551 {
25472552 if (New->Fresnel )
2548- PossibleError (" Finish-level 'fresnel' keyword found in combination with the Oren-Nayar diffuse model."
2553+ PossibleError (" Finish-level 'fresnel' keyword found in combination with the Lommel-Seeliger diffuse model."
25492554 " The interaction of these features has not been finalized yet, and is known to be bogus."
25502555 " Expect future versions of POV-Ray to render this scene differently without warning." );
25512556 }
2557+ #endif
25522558
2553- if (New->LommelSeeligerWeight != 0.0 )
2559+ #if POV_EXPERIMENTAL_OREN_NAYAR
2560+ if ((New->OrenNayarA != 1.0 ) || (New->OrenNayarB != 0.0 ))
25542561 {
25552562 if (New->Fresnel )
2556- PossibleError (" Finish-level 'fresnel' keyword found in combination with the Lommel-Seeliger diffuse model."
2563+ PossibleError (" Finish-level 'fresnel' keyword found in combination with the Oren-Nayar diffuse model."
25572564 " The interaction of these features has not been finalized yet, and is known to be bogus."
25582565 " Expect future versions of POV-Ray to render this scene differently without warning." );
25592566 }
2567+ #endif
25602568
25612569 if ((sceneData->EffectiveLanguageVersion () >= 370 ) && ambientSet)
25622570 {
@@ -2584,15 +2592,19 @@ void Parser::Parse_Finish (FINISH **Finish_Ptr)
25842592 // so that a user-specified value of 1.0 corresponds to a
25852593 // backscattering of 100% of the incoming light
25862594 double EffectiveBihemisphericalReflectance = 2.0 / (New->Brilliance + 1.0 );
2595+ #if POV_EXPERIMENTAL_OREN_NAYAR
25872596 if (New->OrenNayarA != 1.0 )
25882597 EffectiveBihemisphericalReflectance *= New->OrenNayarA ;
25892598 if (New->OrenNayarB != 0.0 )
25902599 EffectiveBihemisphericalReflectance += New->OrenNayarB * (2.0 /3.0 - (64.0 /45.0 )*(1.0 /M_PI));
2600+ #endif
2601+ #if POV_EXPERIMENTAL_LOMMEL_SEELIGER
25912602 if (New->LommelSeeligerWeight != 0.0 )
25922603 {
25932604 EffectiveBihemisphericalReflectance *= (1.0 - New->LommelSeeligerWeight );
25942605 EffectiveBihemisphericalReflectance += New->LommelSeeligerWeight * ((8.0 * (1.0 -log (2.0 ))) / 3.0 );
25952606 }
2607+ #endif
25962608 if (diffuseAdjust)
25972609 {
25982610 New->DiffuseAlbedoAdjust = 1.0 / EffectiveBihemisphericalReflectance;
0 commit comments