Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/environment/materials/Godrays.material @ 8359

Last change on this file since 8359 was 8359, checked in by marwegma, 14 years ago

Godrays: Fixed some syntax stuff with the compositor-material interface.

File size: 1.7 KB
RevLine 
[8346]1/**
[8357]2*
[8346]3* \author Markus Wegmann
4*
5**/
6
7
8material Godrays/Raw/Sun // Renders the sun as a single colored sphere. Z-buffering is enabled.
9{
10    technique
11    {
12        pass
13        {
14            ambient 1.0 1.0 1.0 1.0
15            lightning off
16        }
17    }
18}
19
20material Godrays/Raw/Obstacle // Renders the sun as a single colored sphere. Z-buffering is enabled.
21{
22    technique
23    {
24        pass
25        {
26            ambient 0.0 0.0 0.0 1.0
27            lightning off
28        }
29    }
30}
31
32
[8357]33fragment_program GodraysBlurFragmentProgram cg
[8346]34{
35    source Godrays_blur.cg
[8357]36    entry_point godrays_blur
[8359]37    profiles fp30 ps_3_0
[8346]38}
39
40
[8357]41
42material Godrays/Blur
[8346]43{
44    technique
45    {
[8359]46        texture_unit raw_decal
47        {
48            tex_address_mode border
49            tex_border_colour 0.0 0.0 0.0 1.0 // Set manually to sky color by api.
50
51            content_type compositor Godrays rt_raw
52        }
53
[8346]54        pass
55        {
[8357]56            fragment_program_ref GodraysBlurFragmentProgram
[8346]57            {
58                param_indexed 0 float2 0.0 0.0
59                param_indexed 1 float 1.0
60                param_indexed 2 float 0.1
61                param_indexed 3 float 0.7
62            }
63        }
64    }
65}
[8357]66
67fragment_program GodraysCombineFragmentProgram cg
68{
69    source Godrays_blur.cg
70    entry_point godrays_combine
[8359]71    profiles fp30 ps_3_0
[8357]72}
73
74material Godrays/Combine
75{
76    technique
77    {
[8359]78        texture_unit scene_decal
79        {
80            content_type compositor Godrays rt_scene
81        }
82        texture_unit blur_decal
83        {
84            content_type compositor Godrays rt_blur
85        }
86
[8357]87        pass
88        { 
89            fragment_program_ref GodraysCombineFragmentProgram { }
90        }
91    }
92}
Note: See TracBrowser for help on using the repository browser.