| 173 | } |
| 174 | |
| 175 | void ShadowMaterialHook::_overrideFeatures( ProcessedMaterial *mat, |
| 176 | U32 stageNum, |
| 177 | MaterialFeatureData &fd, |
| 178 | const FeatureSet &features ) |
| 179 | { |
| 180 | if ( stageNum != 0 ) |
| 181 | { |
| 182 | fd.features.clear(); |
| 183 | return; |
| 184 | } |
| 185 | |
| 186 | // Disable the base texture if we don't |
| 187 | // have alpha test enabled. |
| 188 | if ( !fd.features[ MFT_AlphaTest ] ) |
| 189 | { |
| 190 | fd.features.removeFeature( MFT_TexAnim ); |
| 191 | fd.features.removeFeature( MFT_DiffuseMap ); |
| 192 | } |
| 193 | |
| 194 | // HACK: Need to figure out how to enable these |
| 195 | // suckers without this override call! |
| 196 | |
| 197 | fd.features.setFeature( MFT_ParaboloidVertTransform, |
| 198 | features.hasFeature( MFT_ParaboloidVertTransform ) ); |
| 199 | fd.features.setFeature( MFT_IsSinglePassParaboloid, |
| 200 | features.hasFeature( MFT_IsSinglePassParaboloid ) ); |
| 201 | |
| 202 | // The paraboloid transform outputs linear depth, so |
| 203 | // it needs to use the plain depth out feature. |
| 204 | if ( fd.features.hasFeature( MFT_ParaboloidVertTransform ) ) |
| 205 | fd.features.addFeature( MFT_DepthOut ); |
| 206 | else |
| 207 | fd.features.addFeature( MFT_EyeSpaceDepthOut ); |
| 208 | } |
| 209 | |
| 210 | ShadowMatInstance::ShadowMatInstance( Material *mat ) |
| 211 | : MatInstance( *mat ) |
nothing calls this directly
no test coverage detected