| 80 | } |
| 81 | // Now do the lighting pass |
| 82 | // NB we don't do decal texture here because this is repeated per light |
| 83 | pass perlight |
| 84 | { |
| 85 | |
| 86 | // do this for each light |
| 87 | iteration once_per_light |
| 88 | scene_blend add |
| 89 | depth_write on |
| 90 | depth_bias 1 |
| 91 | |
| 92 | // base colours, not needed for rendering, but as information |
| 93 | // to lighting pass categorisation routine |
| 94 | ambient 0 0 0 |
| 95 | |
| 96 | // Vertex program reference |
| 97 | vertex_program_ref BumpMapping/BumpMapVP |
| 98 | { |
| 99 | param_named_auto lightPosition light_position_object_space 0 |
| 100 | param_named_auto worldViewProj worldviewproj_matrix |
| 101 | } |
| 102 | |
| 103 | // Fragment program |
| 104 | fragment_program_ref BumpMapping/BumpMapFP |
| 105 | { |
| 106 | param_named_auto lightDiffuse light_diffuse_colour 0 |
| 107 | } |
| 108 | |
| 109 | // texture shadow receiver program |
| 110 | shadow_receiver_vertex_program_ref BumpMapping/BumpMapVPShadowRcv |
| 111 | { |
| 112 | param_named_auto lightPosition light_position_object_space 0 |
| 113 | param_named_auto worldViewProj worldviewproj_matrix |
| 114 | param_named_auto worldMatrix world_matrix |
| 115 | param_named_auto texViewProj texture_viewproj_matrix |
| 116 | } |
| 117 | // Additive texture shadow receiver program |
| 118 | shadow_receiver_fragment_program_ref BumpMapping/BumpMapFPShadowRcv |
| 119 | { |
| 120 | param_named_auto lightDiffuse light_diffuse_colour 0 |
| 121 | } |
| 122 | |
| 123 | // Vertex program reference |
| 124 | vertex_program_ref BumpMapping/BumpMapVPSpecular |
| 125 | { |
| 126 | param_named_auto lightPosition light_position_object_space 0 |
| 127 | param_named_auto eyePosition camera_position_object_space |
| 128 | param_named_auto worldViewProj worldviewproj_matrix |
| 129 | } |
| 130 | |
| 131 | // Fragment program |
| 132 | fragment_program_ref BumpMapping/BumpMapFPSpecular |
| 133 | { |
| 134 | param_named_auto lightDiffuse light_diffuse_colour 0 |
| 135 | param_named_auto lightSpecular light_specular_colour 0 |
| 136 | } |
| 137 | |
| 138 | |
| 139 | // Base bump map |
| 140 | texture_unit normalmap |
| 141 | { |
| 142 | texture Cube_Lava_NORM.jpg |
| 143 | colour_op replace |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | // Decal pass |
| 148 | pass decal |
| 149 | { |
| 150 | // base colours, not needed for rendering, but as information |
| 151 | // to lighting pass categorisation routine |
| 152 | lighting off |
| 153 | depth_write on |
| 154 | depth_bias 2 |
| 155 | |
| 156 | scene_blend dest_colour zero |
| 157 | texture_unit decalmap |
| 158 | { |
| 159 | texture Cube_Lava_COLOR.jpg |
| 160 | } |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | }}} |
| 165 | [[CollapsibleEnd]] |