END_SHADER_PARAMS SHADER_INIT_PARAMS() { INIT_FLOAT_PARM( MAXDISTANCE, 100000.0); INIT_FLOAT_PARM( FARFADEINTERVAL, 400.0); INIT_FLOAT_PARM( MAXSIZE, 20.0 ); INIT_FLOAT_PARM( ENDFADESIZE, 20.0 ); INIT_FLOAT_PARM( STARTFADESIZE, 10.0 ); INIT_FLOAT_PARM( DEPTHBLENDSCALE, 50.0 ); INIT_FLOAT_PARM( OVERBRIGHTFACTOR, 1.0 ); INIT_FLOAT_PARM( ADDBASETEXTURE2, 0.0 ); INIT_FLOAT_PARM( ADDSELF, 0.0 ); INIT_FLOAT_PARM( ZOOMANIMATESEQ2, 0.0 ); if ( !params[DEPTHBLEND]->IsDefined() ) { params[ DEPTHBLEND ]->SetIntValue( GetDefaultDepthFeatheringValue() ); } if ( !g_pHardwareConfig->SupportsPixelShaders_2_b() ) { params[ DEPTHBLEND ]->SetIntValue( 0 ); } if ( !params[DUALSEQUENCE]->IsDefined() ) { params[DUALSEQUENCE]->SetIntValue( 0 ); } if ( !params[MAXLUMFRAMEBLEND1]->IsDefined() ) { params[MAXLUMFRAMEBLEND1]->SetIntValue( 0 ); } if ( !params[MAXLUMFRAMEBLEND2]->IsDefined() ) { params[MAXLUMFRAMEBLEND2]->SetIntValue( 0 ); } if ( !params[EXTRACTGREENALPHA]->IsDefined() ) { params[EXTRACTGREENALPHA]->SetIntValue( 0 ); } if ( !params[ADDOVERBLEND]->IsDefined() ) { params[ADDOVERBLEND]->SetIntValue( 0 ); } if ( !params[BLENDFRAMES]->IsDefined() ) { params[ BLENDFRAMES ]->SetIntValue( 1 ); } if ( !params[USEINSTANCING]->IsDefined() ) { params[ USEINSTANCING ]->SetIntValue( IsX360() ? 1 : 0 ); } SET_FLAGS2( MATERIAL_VAR2_IS_SPRITECARD ); }
END_SHADER_PARAMS SHADER_INIT_PARAMS() { INIT_FLOAT_PARM( MAXDISTANCE, 100000.0 ); INIT_FLOAT_PARM( FARFADEINTERVAL, 400.0 ); INIT_FLOAT_PARM( MAXSIZE, 20.0 ); INIT_FLOAT_PARM( ENDFADESIZE, 20.0 ); INIT_FLOAT_PARM( STARTFADESIZE, 10.0 ); INIT_FLOAT_PARM( DEPTHBLENDSCALE, 50.0 ); INIT_FLOAT_PARM( OVERBRIGHTFACTOR, 1.0 ); INIT_FLOAT_PARM( ADDBASETEXTURE2, 0.0 ); INIT_FLOAT_PARM( ADDSELF, 0.0 ); INIT_FLOAT_PARM( ZOOMANIMATESEQ2, 0.0 ); INIT_FLOAT_PARM( ALPHATRAILFADE, 1. ); INIT_FLOAT_PARM( RADIUSTRAILFADE, 1. ); INIT_FLOAT_PARM( VERTEXFOGAMOUNT, 0.0f ); INIT_FLOAT_PARM( OUTLINEALPHA, 1.0 ); if ( !params[ORIENTATIONMATRIX]->IsDefined() ) { VMatrix mat; MatrixSetIdentity( mat ); params[ORIENTATIONMATRIX]->SetMatrixValue( mat ); } if ( !params[CROPFACTOR]->IsDefined() ) { params[CROPFACTOR]->SetVecValue( 1.0f, 1.0f ); } if ( !params[DEPTHBLEND]->IsDefined() ) { params[ DEPTHBLEND ]->SetIntValue( GetDefaultDepthFeatheringValue() ); } if ( !g_pHardwareConfig->SupportsPixelShaders_2_b() ) { params[ DEPTHBLEND ]->SetIntValue( 0 ); } InitIntParam( DUALSEQUENCE, params, 0 ); InitIntParam( MAXLUMFRAMEBLEND1, params, 0 ); InitIntParam( MAXLUMFRAMEBLEND2, params, 0 ); InitIntParam( EXTRACTGREENALPHA, params, 0 ); InitIntParam( ADDOVERBLEND, params, 0 ); InitIntParam( BLENDFRAMES, params, 1 ); InitIntParam( DISTANCEALPHA, params, 0 ); InitIntParam( OUTLINE, params, 0 ); InitIntParam( SOFTEDGES, params, 0 ); InitIntParam( PERPARTICLEOUTLINE, params, 0 ); if ( !params[USEINSTANCING]->IsDefined() ) { params[ USEINSTANCING ]->SetIntValue( IsX360() ? 1 : 0 ); } // srgb read 360 InitIntParam( SHADERSRGBREAD360, params, 0 ); // default to being translucent since that's what we always were for historical reasons. InitIntParam( OPAQUE, params, 0 ); InitIntParam( VERTEXCOLORLERP, params, 0 ); if ( !params[LERPCOLOR1]->IsDefined() ) { params[LERPCOLOR1]->SetVecValue( 1.0f, 0.0f, 0.0f ); } if ( !params[LERPCOLOR2]->IsDefined() ) { params[LERPCOLOR2]->SetVecValue( 0.0f, 1.0f, 0.0f ); } if ( params[OPAQUE]->GetIntValue() != 0 ) { // none of these make sense if we have $opaque 1: params[ADDBASETEXTURE2]->SetFloatValue( 0.0f ); params[DUALSEQUENCE]->SetIntValue( 0 ); params[SEQUENCE_BLEND_MODE]->SetIntValue( 0 ); params[MAXLUMFRAMEBLEND1]->SetIntValue( 0 ); params[MAXLUMFRAMEBLEND2]->SetIntValue( 0 ); params[EXTRACTGREENALPHA]->SetIntValue( 0 ); params[RAMPTEXTURE]->SetUndefined(); params[ZOOMANIMATESEQ2]->SetIntValue( 0 ); params[ADDOVERBLEND]->SetIntValue( 0 ); params[ADDSELF]->SetIntValue( 0 ); params[BLENDFRAMES]->SetIntValue( 0 ); params[DEPTHBLEND]->SetIntValue( 0 ); params[INVERSEDEPTHBLEND]->SetIntValue( 0 ); } SET_FLAGS2( MATERIAL_VAR2_IS_SPRITECARD ); }