void CHLSL_Solver_Clip::OnWriteFXC( bool bIsPixelShader, WriteContext_FXC &context ) { CHLSL_Var *pvar = GetSourceVar( 0 ); char tmp[MAXTARGC]; Q_snprintf( tmp, sizeof( tmp ), "clip( %s );\n", pvar->GetName() ); context.buf_code.PutString( tmp ); }
void CHLSL_Solver_Invert::OnWriteFXC( bool bIsPixelShader, WriteContext_FXC &context ) { CHLSL_Var *tg = GetTargetVar( 0 ); tg->DeclareMe(context); CHLSL_Var *src1 = GetSourceVar( 0 ); char tmp[MAXTARGC]; Q_snprintf( tmp, MAXTARGC, "%s = 1.0f - %s;\n", tg->GetName(),src1->GetName() ); context.buf_code.PutString( tmp ); }
void CHLSL_Solver_VectorRefract::OnWriteFXC( bool bIsPixelShader, WriteContext_FXC &context ) { CHLSL_Var *tg = GetTargetVar( 0 ); tg->DeclareMe(context); CHLSL_Var *src1 = GetSourceVar( 0 ); CHLSL_Var *src2 = GetSourceVar( 1 ); CHLSL_Var *src3 = GetSourceVar( 2 ); char tmp[MAXTARGC]; Q_snprintf( tmp, MAXTARGC, "%s = refract( %s, %s, %s );\n", tg->GetName(),src1->GetName(),src2->GetName(),src3->GetName() ); context.buf_code.PutString( tmp ); }