changed: gcc8 base update
[opensg.git] / Examples / CSM / Shader / Earth / scene.osg
blob31d0330fe9b842d827f5198cc7d2c2442304aac5
1 #OSG V1.0 
3 Node
5   core MaterialGroup
6   {
7     material ChunkMaterial
8     {
9       chunks
10       [
11         TextureObjChunk
12         {
13           image ImageFile
14           {
15             url "../../Models/Textures/Earth.jpg"
16           }
18           minFilter GL_LINEAR_MIPMAP_LINEAR
19           magFilter GL_LINEAR
20           wrapS     GL_REPEAT
21           wrapT     GL_REPEAT
22         }
24         TextureEnvChunk
25         {
26           envMode GL_MODULATE
27         }
30         TextureObjChunk
31         {
32           image ImageFile
33           {
34             url "../../Models/Textures/EarthNight.jpg"
35           }
37           minFilter GL_LINEAR_MIPMAP_LINEAR
38           magFilter GL_LINEAR
39           wrapS     GL_REPEAT
40           wrapT     GL_REPEAT
41         }
43         TextureEnvChunk
44         {
45           envMode GL_MODULATE
46         }
49         TextureObjChunk
50         {
51           image ImageFile
52           {
53             url "../../Models/Textures/EarthClouds.jpg"
54           }
56           minFilter GL_LINEAR_MIPMAP_LINEAR
57           magFilter GL_LINEAR
58           wrapS     GL_REPEAT
59           wrapT     GL_REPEAT
60         }
62         TextureEnvChunk
63         {
64           envMode GL_MODULATE
65         }
69         SimpleSHLChunk
70         {
71           variables ShaderProgramVariables
72           {
73             variables
74             [
75               ShaderVariableInt
76               {
77                 name "EarthDay"
78                 value 0
79               }
80               ShaderVariableInt
81               {
82                 name "EarthNight"
83                 value 1
84               }
85               ShaderVariableInt
86               {
87                 name "EarthCloudGloss"
88                 value 2
89               }
91               DEF Season ShaderVariableReal
92               {
93                 name "season"
94                 value 0.0
95               }
96               DEF COS ShaderVariableReal
97               {
98                 name "cos_time_0_2PI"
99                 value -0.406652
100               }
101               DEF SIN ShaderVariableReal
102               {
103                 name "sin_time_0_2PI"
104                 value -0.913583
105               }
106             ]
107           }
109           vertexShader 
110           [
111             ShaderProgramFile
112             {
113               shaderType GL_VERTEX_SHADER
115               programUrl "Earth.vp"
116             }
117           ]
119           fragmentShader 
120           [
121             ShaderProgramFile
122             {
123               shaderType GL_FRAGMENT_SHADER
125               programUrl "Earth.fp"
126             }
127           ]
128         }
129       ]
130     }
131   }
133   children
134   [
135     Node
136     {
137       core Inline
138       {
139         url "../../Models/sphere.wrl"
140       }
141     }
142   ]
145 ROUTE CUp  .signalPressed  TO LR32Counter.incTrigger
146 ROUTE CDown.signalReleased TO LR32Counter.decTrigger
148 ROUTE LR32Counter.value    TO Season.value
150 ROUTE SceneTimer.fraction TO RotSin.inValue
151 ROUTE SceneTimer.fraction TO RotCos.inValue
152 ROUTE RotCos    .outValue TO COS.value
153 ROUTE RotSin    .outValue TO SIN.value