1vertex_program HLSL4/OceanVS hlsl
2{
3	source oceanHLSL_Cg.vert
4	entry_point main
5	target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1
6
7
8	default_params
9	{
10		param_named_auto worldViewProj_matrix worldviewproj_matrix
11		param_named_auto eyePosition camera_position_object_space
12		param_named scale float3 0.012 0.005 0.03
13		param_named_auto time_0_X time_0_x 100.0
14	}
15}
16
17fragment_program HLSL4/OceanFS hlsl
18{
19	source oceanHLSL_Cg.frag
20	entry_point main
21	target ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_2_0
22}
23
24vertex_program GLSL/OceanVS glsl
25{
26	source oceanGLSL.vert
27
28	default_params
29	{
30        param_named_auto worldViewProj worldviewproj_matrix
31		param_named_auto eyePosition camera_position_object_space
32		param_named scale float3 0.012 0.005 0.03
33		param_named_auto time_0_X time_0_x 100.0
34	}
35}
36
37fragment_program GLSL/OceanFS glsl
38{
39	source oceanGLSL.frag
40
41	default_params
42	{
43		param_named Noise int 0
44		param_named skyBox int 1
45	}
46}
47
48vertex_program Cg/OceanVS cg
49{
50	source oceanHLSL_Cg.vert
51	entry_point main
52	profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
53
54	default_params
55	{
56		param_named_auto worldViewProj_matrix worldviewproj_matrix
57		param_named_auto eyePosition camera_position_object_space
58		param_named scale float3 0.012 0.005 0.03
59		param_named_auto time_0_X time_0_x 100.0
60	}
61}
62
63fragment_program Cg/OceanFS cg
64{
65	source oceanHLSL_Cg.frag
66	entry_point main
67	profiles ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_2_0 arbfp1
68
69}
70
71vertex_program Ogre/OceanVS unified
72{
73	delegate HLSL4/OceanVS
74	delegate GLSL/OceanVS
75	delegate Cg/OceanVS
76}
77
78fragment_program Ogre/OceanFS unified
79{
80	delegate HLSL4/OceanFS
81	delegate GLSL/OceanFS
82	delegate Cg/OceanFS
83}
84
85
86material OceanHLSL_GLSL
87{
88	technique
89	{
90		pass
91		{
92			vertex_program_ref Ogre/OceanVS
93			{
94				param_named waveSpeed float2 0.0 0.168
95				param_named noiseSpeed float 0.155
96			}
97
98			fragment_program_ref Ogre/OceanFS
99			{
100				param_named fadeBias float 0.336
101				param_named fadeExp float 5.546
102				param_named waterColor float4 0.0 0.244 0.395 1.0
103			}
104
105			texture_unit
106			{
107				texture NoiseVolume.dds 3d
108				tex_coord_set 0
109				filtering linear linear none
110			}
111
112			texture_unit
113			{
114				texture morning.jpg cubic
115				tex_address_mode clamp
116				tex_coord_set 1
117			}
118
119		}
120
121	}
122}
123
124vertex_program Cg/Ocean2VS cg
125{
126	source Ocean2HLSL_Cg.vert
127	entry_point main
128	profiles vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1 arbvp1
129
130
131	default_params
132	{
133		param_named_auto WorldViewProj worldviewproj_matrix
134		param_named_auto eyePosition camera_position_object_space
135	}
136}
137
138fragment_program Cg/Ocean2FS cg
139{
140	source Ocean2HLSL_Cg.frag
141	entry_point main
142	profiles ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_2_0 arbfp1
143
144}
145
146vertex_program HLSL4/Ocean2VS hlsl
147{
148	source Ocean2HLSL_Cg.vert
149	entry_point main
150	target vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_1_1
151
152	default_params
153	{
154		param_named_auto WorldViewProj worldviewproj_matrix
155	}
156}
157
158fragment_program HLSL4/Ocean2FS hlsl
159{
160	source Ocean2HLSL_Cg.frag
161	entry_point main
162	target ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_2_0
163}
164
165vertex_program GLSL/Ocean2VS glsl
166{
167	source Ocean2GLSL.vert
168	default_params
169	{
170		param_named_auto worldViewProj worldviewproj_matrix
171	}
172}
173
174fragment_program GLSL/Ocean2FS glsl
175{
176	source Ocean2GLSL.frag
177	default_params
178   	{
179   		param_named NormalMap int 0
180   		param_named EnvironmentMap int 1
181   	}
182}
183
184vertex_program GLSLES/Ocean2VS glsles
185{
186	source Ocean2GLSLES.vert
187	default_params
188	{
189		param_named_auto worldViewProj worldviewproj_matrix
190	}
191}
192
193fragment_program GLSLES/Ocean2FS glsles
194{
195   	source Ocean2GLSLES.frag
196   	default_params
197   	{
198   		param_named NormalMap int 0
199   		param_named EnvironmentMap int 1
200   	}
201}
202
203vertex_program Ogre/Ocean2VS unified
204{
205	delegate HLSL4/Ocean2VS
206	delegate GLSL/Ocean2VS
207	delegate GLSLES/Ocean2VS
208	delegate Cg/Ocean2VS
209}
210
211fragment_program Ogre/Ocean2FS unified
212{
213	delegate HLSL4/Ocean2FS
214	delegate GLSL/Ocean2FS
215	delegate GLSLES/Ocean2FS
216	delegate Cg/Ocean2FS
217}
218
219material Ocean2_HLSL_GLSL
220{
221	technique
222	{
223		pass
224		{
225			vertex_program_ref Ogre/Ocean2VS
226			{
227				param_named_auto eyePosition camera_position_object_space
228				param_named BumpScale float 0.2
229				param_named textureScale float2 25 26
230				param_named bumpSpeed float2 0.015 0.005
231				param_named_auto time time_0_x 100.0
232				param_named waveFreq float 0.028
233				param_named waveAmp float 1.8
234			}
235
236			fragment_program_ref Ogre/Ocean2FS
237			{
238				param_named deepColor float4 0 0.3 0.5 1.0
239				param_named shallowColor float4 0 1 1 1.0
240				param_named reflectionColor float4 0.95 1 1 1.0
241				param_named reflectionAmount float 1.0
242				param_named reflectionBlur float 0.0
243				param_named waterAmount float 0.3
244				param_named fresnelPower float 5.0
245				param_named fresnelBias float 0.328
246				param_named hdrMultiplier float 0.471
247			}
248
249			texture_unit
250			{
251				texture waves2.dds
252				tex_coord_set 0
253				filtering linear linear linear
254			}
255
256			texture_unit
257			{
258				texture morning.jpg cubic
259				tex_address_mode clamp
260				filtering linear linear linear
261				tex_coord_set 1
262			}
263
264		}
265
266	}
267}
268
269material SkyBox
270{
271	technique
272	{
273		pass
274		{
275			lighting off
276			depth_write off
277			depth_check off
278
279			texture_unit
280			{
281				texture morning.jpg cubic
282				tex_address_mode clamp
283			}
284		}
285	}
286}
287
288material LightFlare
289{
290	technique
291	{
292		pass
293		{
294			lighting off
295			scene_blend add
296			depth_write off
297
298			texture_unit
299			{
300				texture flare.png
301			}
302		}
303	}
304}