Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/materials/Cube_Lava_Normal.material @ 12091

Last change on this file since 12091 was 12091, checked in by wiesep, 5 years ago

Updated programs and adjusted Material to work with GLSL>150

File size: 2.2 KB
Line 
1// Any number of lights, diffuse
2material Cube_Lava_Normal
3{
4    technique
5    {
6        // Base ambient pass
7        pass ambient
8        {
9            // base colours, not needed for rendering, but as information
10            // to lighting pass categorisation routine
11            diffuse 0 0 0
12        }
13        // Now do the lighting pass
14        // NB we don't do decal texture here because this is repeated per light
15        pass perlight
16        {
17            // do this for each light
18            iteration once_per_light
19            scene_blend add
20
21            // base colours, not needed for rendering, but as information
22            // to lighting pass categorisation routine
23            ambient 0 0 0
24
25            // Vertex program reference
26            vertex_program_ref Examples/BumpMapVP
27            {
28                param_named_auto lightPosition light_position_object_space 0
29                param_named_auto worldViewProj worldviewproj_matrix
30            }
31
32            // Fragment program
33            fragment_program_ref Examples/BumpMapFP
34            {
35                param_named_auto lightDiffuse light_diffuse_colour 0
36            }
37
38            // texture shadow receiver program
39            shadow_receiver_vertex_program_ref Examples/BumpMapVPShadowRcv
40            {
41                param_named_auto lightPosition light_position_object_space 0
42                param_named_auto worldViewProj worldviewproj_matrix
43                param_named_auto worldMatrix world_matrix
44                param_named_auto texViewProj texture_viewproj_matrix
45            }
46            // Additive texture shadow receiver program
47            shadow_receiver_fragment_program_ref Examples/BumpMapFPShadowRcv
48            {
49                param_named_auto lightDiffuse light_diffuse_colour 0
50            }
51           
52            // Base bump map
53            texture_unit normalmap
54            {
55                texture Cube_Lava_NORM.jpg
56                colour_op replace
57            }
58        }
59       
60        // Decal pass
61        pass decal
62        {
63            // hint to pass categorisation routine, that this is decal only
64            lighting off
65            scene_blend dest_colour zero
66            ambient 0.5 0.5 0.5 1
67        }
68    }
69}
Note: See TracBrowser for help on using the repository browser.