[390] | 1 | vertex_program HLSL/OceanVS hlsl |
---|
| 2 | { |
---|
| 3 | source oceanHLSL_Cg.vert |
---|
| 4 | entry_point main |
---|
| 5 | target 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 | |
---|
| 17 | fragment_program HLSL/OceanFS hlsl |
---|
| 18 | { |
---|
| 19 | source oceanHLSL_Cg.frag |
---|
| 20 | entry_point main |
---|
| 21 | target ps_2_0 |
---|
| 22 | |
---|
| 23 | } |
---|
| 24 | |
---|
| 25 | vertex_program GLSL/OceanVS glsl |
---|
| 26 | { |
---|
| 27 | source oceanGLSL.vert |
---|
| 28 | |
---|
| 29 | default_params |
---|
| 30 | { |
---|
| 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 | |
---|
| 37 | fragment_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 | |
---|
| 48 | material OceanHLSL_GLSL |
---|
| 49 | { |
---|
| 50 | technique |
---|
| 51 | { |
---|
| 52 | pass |
---|
| 53 | { |
---|
| 54 | vertex_program_ref HLSL/OceanVS |
---|
| 55 | { |
---|
| 56 | param_named waveSpeed float2 0.0 0.168 |
---|
| 57 | param_named noiseSpeed float 0.155 |
---|
| 58 | } |
---|
| 59 | |
---|
| 60 | fragment_program_ref HLSL/OceanFS |
---|
| 61 | { |
---|
| 62 | param_named fadeBias float 0.336 |
---|
| 63 | param_named fadeExp float 5.546 |
---|
| 64 | param_named waterColor float4 0.0 0.244 0.395 1.0 |
---|
| 65 | } |
---|
| 66 | |
---|
| 67 | texture_unit |
---|
| 68 | { |
---|
| 69 | texture NoiseVolume.dds 3d |
---|
| 70 | tex_coord_set 0 |
---|
| 71 | filtering linear linear none |
---|
| 72 | } |
---|
| 73 | |
---|
| 74 | texture_unit |
---|
| 75 | { |
---|
| 76 | cubic_texture morning.jpg combinedUVW |
---|
| 77 | tex_address_mode clamp |
---|
| 78 | tex_coord_set 1 |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | } |
---|
| 82 | |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | technique |
---|
| 86 | { |
---|
| 87 | pass |
---|
| 88 | { |
---|
| 89 | vertex_program_ref GLSL/OceanVS |
---|
| 90 | { |
---|
| 91 | param_named waveSpeed float2 0.0 0.168 |
---|
| 92 | param_named noiseSpeed float 0.155 |
---|
| 93 | } |
---|
| 94 | |
---|
| 95 | fragment_program_ref GLSL/OceanFS |
---|
| 96 | { |
---|
| 97 | param_named fadeBias float 0.336 |
---|
| 98 | param_named fadeExp float 5.546 |
---|
| 99 | param_named waterColor float4 0.0 0.244 0.395 1.0 |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | texture_unit |
---|
| 103 | { |
---|
| 104 | texture NoiseVolume.dds 3d |
---|
| 105 | tex_coord_set 0 |
---|
| 106 | filtering linear linear none |
---|
| 107 | tex_address_mode wrap |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | texture_unit |
---|
| 111 | { |
---|
| 112 | cubic_texture morning.jpg combinedUVW |
---|
| 113 | tex_address_mode clamp |
---|
| 114 | tex_coord_set 1 |
---|
| 115 | } |
---|
| 116 | |
---|
| 117 | } |
---|
| 118 | |
---|
| 119 | } |
---|
| 120 | |
---|
| 121 | } |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | vertex_program Cg/OceanVS cg |
---|
| 125 | { |
---|
| 126 | source oceanHLSL_Cg.vert |
---|
| 127 | entry_point main |
---|
| 128 | profiles vs_1_1 arbvp1 |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | default_params |
---|
| 132 | { |
---|
| 133 | param_named_auto worldViewProj_matrix worldviewproj_matrix |
---|
| 134 | param_named_auto eyePosition camera_position_object_space |
---|
| 135 | param_named scale float3 0.012 0.005 0.03 |
---|
| 136 | param_named_auto time_0_X time_0_x 100.0 |
---|
| 137 | } |
---|
| 138 | } |
---|
| 139 | |
---|
| 140 | fragment_program Cg/OceanFS cg |
---|
| 141 | { |
---|
| 142 | source oceanHLSL_Cg.frag |
---|
| 143 | entry_point main |
---|
| 144 | profiles ps_2_0 arbfp1 |
---|
| 145 | |
---|
| 146 | } |
---|
| 147 | |
---|
| 148 | material OceanCg |
---|
| 149 | { |
---|
| 150 | technique |
---|
| 151 | { |
---|
| 152 | pass |
---|
| 153 | { |
---|
| 154 | vertex_program_ref Cg/OceanVS |
---|
| 155 | { |
---|
| 156 | param_named waveSpeed float2 0.0 0.168 |
---|
| 157 | param_named noiseSpeed float 0.155 |
---|
| 158 | } |
---|
| 159 | |
---|
| 160 | fragment_program_ref Cg/OceanFS |
---|
| 161 | { |
---|
| 162 | param_named fadeBias float 0.336 |
---|
| 163 | param_named fadeExp float 5.546 |
---|
| 164 | param_named waterColor float4 0.0 0.244 0.395 1.0 |
---|
| 165 | } |
---|
| 166 | |
---|
| 167 | texture_unit |
---|
| 168 | { |
---|
| 169 | texture NoiseVolume.dds 3d |
---|
| 170 | tex_coord_set 0 |
---|
| 171 | filtering linear linear none |
---|
| 172 | } |
---|
| 173 | |
---|
| 174 | texture_unit |
---|
| 175 | { |
---|
| 176 | cubic_texture morning.jpg combinedUVW |
---|
| 177 | tex_address_mode clamp |
---|
| 178 | tex_coord_set 1 |
---|
| 179 | } |
---|
| 180 | |
---|
| 181 | } |
---|
| 182 | |
---|
| 183 | } |
---|
| 184 | } |
---|
| 185 | |
---|
| 186 | |
---|
| 187 | vertex_program Cg/Ocean2VS cg |
---|
| 188 | { |
---|
| 189 | source Ocean2HLSL_Cg.vert |
---|
| 190 | entry_point main |
---|
| 191 | profiles vs_1_1 arbvp1 |
---|
| 192 | |
---|
| 193 | |
---|
| 194 | default_params |
---|
| 195 | { |
---|
| 196 | param_named_auto WorldViewProj worldviewproj_matrix |
---|
| 197 | param_named_auto eyePosition camera_position_object_space |
---|
| 198 | } |
---|
| 199 | } |
---|
| 200 | |
---|
| 201 | fragment_program Cg/Ocean2FS cg |
---|
| 202 | { |
---|
| 203 | source Ocean2HLSL_Cg.frag |
---|
| 204 | entry_point main |
---|
| 205 | profiles ps_2_0 arbfp1 |
---|
| 206 | |
---|
| 207 | } |
---|
| 208 | |
---|
| 209 | material Ocean2_Cg |
---|
| 210 | { |
---|
| 211 | technique |
---|
| 212 | { |
---|
| 213 | pass |
---|
| 214 | { |
---|
| 215 | vertex_program_ref Cg/Ocean2VS |
---|
| 216 | { |
---|
| 217 | param_named BumpScale float 0.2 |
---|
| 218 | param_named textureScale float2 25 26 |
---|
| 219 | param_named bumpSpeed float2 0.015 0.005 |
---|
| 220 | param_named_auto time time_0_x 100.0 |
---|
| 221 | param_named waveFreq float 0.028 |
---|
| 222 | param_named waveAmp float 1.8 |
---|
| 223 | } |
---|
| 224 | |
---|
| 225 | fragment_program_ref Cg/Ocean2FS |
---|
| 226 | { |
---|
| 227 | param_named deepColor float4 0 0.3 0.5 1.0 |
---|
| 228 | param_named shallowColor float4 0 1 1 1.0 |
---|
| 229 | param_named reflectionColor float4 0.95 1 1 1.0 |
---|
| 230 | param_named reflectionAmount float 1.0 |
---|
| 231 | param_named reflectionBlur float 0.0 |
---|
| 232 | param_named waterAmount float 0.3 |
---|
| 233 | param_named fresnelPower float 5.0 |
---|
| 234 | param_named fresnelBias float 0.328 |
---|
| 235 | param_named hdrMultiplier float 0.471 |
---|
| 236 | } |
---|
| 237 | |
---|
| 238 | texture_unit |
---|
| 239 | { |
---|
| 240 | texture waves2.dds |
---|
| 241 | tex_coord_set 0 |
---|
| 242 | filtering linear linear linear |
---|
| 243 | } |
---|
| 244 | |
---|
| 245 | texture_unit |
---|
| 246 | { |
---|
| 247 | cubic_texture morning.jpg combinedUVW |
---|
| 248 | tex_address_mode clamp |
---|
| 249 | tex_coord_set 1 |
---|
| 250 | filtering linear linear linear |
---|
| 251 | } |
---|
| 252 | |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | } |
---|
| 256 | } |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | vertex_program HLSL/Ocean2VS hlsl |
---|
| 260 | { |
---|
| 261 | source Ocean2HLSL_Cg.vert |
---|
| 262 | entry_point main |
---|
| 263 | target vs_1_1 |
---|
| 264 | |
---|
| 265 | |
---|
| 266 | default_params |
---|
| 267 | { |
---|
| 268 | param_named_auto WorldViewProj worldviewproj_matrix |
---|
| 269 | param_named_auto eyePosition camera_position_object_space |
---|
| 270 | } |
---|
| 271 | } |
---|
| 272 | |
---|
| 273 | fragment_program HLSL/Ocean2FS hlsl |
---|
| 274 | { |
---|
| 275 | source Ocean2HLSL_Cg.frag |
---|
| 276 | entry_point main |
---|
| 277 | target ps_2_0 |
---|
| 278 | |
---|
| 279 | } |
---|
| 280 | |
---|
| 281 | vertex_program GLSL/Ocean2VS glsl |
---|
| 282 | { |
---|
| 283 | source Ocean2GLSL.vert |
---|
| 284 | |
---|
| 285 | } |
---|
| 286 | |
---|
| 287 | fragment_program GLSL/Ocean2FS glsl |
---|
| 288 | { |
---|
| 289 | source Ocean2GLSL.frag |
---|
| 290 | } |
---|
| 291 | |
---|
| 292 | material Ocean2_HLSL_GLSL |
---|
| 293 | { |
---|
| 294 | technique HLSL |
---|
| 295 | { |
---|
| 296 | pass |
---|
| 297 | { |
---|
| 298 | vertex_program_ref HLSL/Ocean2VS |
---|
| 299 | { |
---|
| 300 | param_named BumpScale float 0.2 |
---|
| 301 | param_named textureScale float2 25 26 |
---|
| 302 | param_named bumpSpeed float2 0.015 0.005 |
---|
| 303 | param_named_auto time time_0_x 100.0 |
---|
| 304 | param_named waveFreq float 0.028 |
---|
| 305 | param_named waveAmp float 1.8 |
---|
| 306 | } |
---|
| 307 | |
---|
| 308 | fragment_program_ref HLSL/Ocean2FS |
---|
| 309 | { |
---|
| 310 | param_named deepColor float4 0 0.3 0.5 1.0 |
---|
| 311 | param_named shallowColor float4 0 1 1 1.0 |
---|
| 312 | param_named reflectionColor float4 0.95 1 1 1.0 |
---|
| 313 | param_named reflectionAmount float 1.0 |
---|
| 314 | param_named reflectionBlur float 0.0 |
---|
| 315 | param_named waterAmount float 0.3 |
---|
| 316 | param_named fresnelPower float 5.0 |
---|
| 317 | param_named fresnelBias float 0.328 |
---|
| 318 | param_named hdrMultiplier float 0.471 |
---|
| 319 | } |
---|
| 320 | |
---|
| 321 | texture_unit |
---|
| 322 | { |
---|
| 323 | texture waves2.dds |
---|
| 324 | tex_coord_set 0 |
---|
| 325 | filtering linear linear linear |
---|
| 326 | } |
---|
| 327 | |
---|
| 328 | texture_unit |
---|
| 329 | { |
---|
| 330 | cubic_texture morning.jpg combinedUVW |
---|
| 331 | tex_address_mode clamp |
---|
| 332 | filtering linear linear linear |
---|
| 333 | tex_coord_set 1 |
---|
| 334 | } |
---|
| 335 | |
---|
| 336 | } |
---|
| 337 | |
---|
| 338 | } |
---|
| 339 | |
---|
| 340 | technique GLSL |
---|
| 341 | { |
---|
| 342 | pass |
---|
| 343 | { |
---|
| 344 | vertex_program_ref GLSL/Ocean2VS |
---|
| 345 | { |
---|
| 346 | param_named_auto eyePosition camera_position_object_space |
---|
| 347 | param_named_auto time time_0_x 100.0 |
---|
| 348 | param_named BumpScale float 0.2 |
---|
| 349 | param_named textureScale float2 25 26 |
---|
| 350 | param_named bumpSpeed float2 0.015 0.005 |
---|
| 351 | param_named waveFreq float 0.028 |
---|
| 352 | param_named waveAmp float 1.8 |
---|
| 353 | } |
---|
| 354 | |
---|
| 355 | fragment_program_ref GLSL/Ocean2FS |
---|
| 356 | { |
---|
| 357 | param_named deepColor float4 0 0.3 0.5 1.0 |
---|
| 358 | param_named shallowColor float4 0 1 1 1.0 |
---|
| 359 | param_named reflectionColor float4 0.95 1 1 1.0 |
---|
| 360 | param_named reflectionAmount float 1.0 |
---|
| 361 | param_named reflectionBlur float 0.0 |
---|
| 362 | param_named waterAmount float 0.3 |
---|
| 363 | param_named fresnelPower float 5.0 |
---|
| 364 | param_named fresnelBias float 0.328 |
---|
| 365 | param_named hdrMultiplier float 0.471 |
---|
| 366 | param_named NormalMap int 0 |
---|
| 367 | param_named EnvironmentMap int 1 |
---|
| 368 | } |
---|
| 369 | |
---|
| 370 | texture_unit |
---|
| 371 | { |
---|
| 372 | texture waves2.dds |
---|
| 373 | tex_coord_set 0 |
---|
| 374 | filtering linear linear linear |
---|
| 375 | } |
---|
| 376 | |
---|
| 377 | texture_unit |
---|
| 378 | { |
---|
| 379 | cubic_texture morning.jpg combinedUVW |
---|
| 380 | tex_address_mode clamp |
---|
| 381 | tex_coord_set 1 |
---|
| 382 | filtering linear linear linear |
---|
| 383 | } |
---|
| 384 | |
---|
| 385 | } |
---|
| 386 | |
---|
| 387 | } |
---|
| 388 | } |
---|
| 389 | |
---|
| 390 | material SkyBox |
---|
| 391 | { |
---|
| 392 | technique |
---|
| 393 | { |
---|
| 394 | pass |
---|
| 395 | { |
---|
| 396 | lighting off |
---|
| 397 | depth_write off |
---|
| 398 | depth_check off |
---|
| 399 | |
---|
| 400 | texture_unit |
---|
| 401 | { |
---|
| 402 | cubic_texture morning.jpg separateUV |
---|
| 403 | tex_address_mode clamp |
---|
| 404 | } |
---|
| 405 | } |
---|
| 406 | } |
---|
| 407 | } |
---|
| 408 | |
---|
| 409 | material LightFlare |
---|
| 410 | { |
---|
| 411 | technique |
---|
| 412 | { |
---|
| 413 | pass |
---|
| 414 | { |
---|
| 415 | lighting off |
---|
| 416 | scene_blend add |
---|
| 417 | depth_write off |
---|
| 418 | |
---|
| 419 | texture_unit |
---|
| 420 | { |
---|
| 421 | texture flare.png |
---|
| 422 | } |
---|
| 423 | } |
---|
| 424 | } |
---|
| 425 | } |
---|
| 426 | |
---|
| 427 | |
---|