-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspectral.inc
63 lines (41 loc) · 1.61 KB
/
spectral.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//================================================================================
// POV-Ray spectral rendering main include file V0.22
//================================================================================
//
// Notes:
//
// If no animation is used (i.e. the value of "clock" is zero) the system will
// switch to rgb preview mode without spectral rendering.
//
// But if in this case "SpectralWavelength" is declared before this file is
// included, the *one* file for the specified wavelength will be rendered.
//
// - Ive, April 2014
//
//================================================================================
#ifdef (SpectralWavelength)
#if ((SpectralWavelength < 380) | (SpectralWavelength > 730))
#error "\nSpectral rendering: Wavelength out of range [380-730]\n"
#end
#declare WavelengthIndex = (SpectralWavelength -380) / 10;
#else
#declare WavelengthIndex = clock - 1;
#end
#if (WavelengthIndex >= 0)
#declare SpectralMode = on;
#debug "\nSpectral rendering: wavelength "
#debug concat(str(380 + WavelengthIndex*10,3,0), "nm\n\n")
#else
#declare SpectralMode = off;
#declare WavelengthIndex = 17; // 550nm for the preview mode
#debug "\nRGB preview rendering.\n\n"
#end
//================================================================================
#include "CIE.inc"
#include "espd_lightsys.inc"
#include "spectral_materials.inc"
#include "spectral_lights.inc"
#include "spectral_glasses.inc"
#include "spectral_metals.inc"
#include "spectral_minerals.inc"
//================================================================================