POV-Ray : Newsgroups : povray.windows : The question about depth image generation : Re: The question about depth image generation Server Time
19 Apr 2024 01:01:01 EDT (-0400)
  Re: The question about depth image generation  
From: clipka
Date: 16 Feb 2018 11:37:06
Message: <5a8708b2$1@news.povray.org>
Am 16.02.2018 um 05:57 schrieb Kenneth:

> The "colors.inc" file has this at the top:
> #ifndef(Colors_Inc_Temp)
> #declare Colors_Inc_Temp = version;
> #version 3.5;
> ......
> 
> This changes your scene's version number to 3.5, *if* you leave out a #version
> directive in your scene. It looks like v3.5 of POV-ray used a different default
> 'gamma' value to apply to a scene's colors.

Actually pretty much the very opposite happens.

The standard include files (including `colors.inc`) have the following
structure:

    #ifndef(Foo_Inc_Temp)
    #declare Foo_Inc_Temp = version;
    #version 3.5; // typical; value may differ
    ...
    #version Foo_Inc_Temp;
    #end

This structure is designed to reset the effective language version back
to whatever it was before the include file.


There is a problem with this construct however: In v3.7.0, the effective
language version defaults to v3.6.2 for backwards compatibility, but the
`version` keyword, when used as an expression, defaults to the actual
software version, i.e. 3.7.

Thus, when a scene has no `#version` statement of its own and includes
one of the standard include files, the last `#version` statement in that
file does not reset the effective language version back to the default
of v3.6.2, but rather sets it to the actual software version, which is
v3.7.0 in that case.


This behaviour has been changed in later versions.


Post a reply to this message

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