bool CNodeBumpBasis::CreateSolvers(GenericShaderData *ShaderData)
{
	for ( int i = 0; i < GetNumJacks_Out(); i++ )
	{
		CJack *pJCur = GetJack_Out(i);
		if ( !pJCur->GetNumBridgesConnected() && i != 0 )
			continue;

		const int res = pJCur->GetResourceType();

		CHLSL_Var *tg = pJCur->AllocateVarFromSmartType();
		tg->MakeConstantOnly();

		CHLSL_Solver_BumpBasis *solver = new CHLSL_Solver_BumpBasis( GetUniqueIndex() );
		solver->SetResourceType( res );
		solver->AddTargetVar( tg );
		solver->SetState( i );
		AddSolver( solver );
	}

	return !!GetNumSolvers();
}
Ejemplo n.º 2
0
bool CNodeVSInput::CreateSolvers(GenericShaderData *ShaderData)
{
	for ( int i = 0; i < GetNumJacks_Out(); i++ )
	{
		CJack *pJ = GetJack_Out( i );
		if ( !pJ->GetNumBridgesConnected() )
			continue;

		const int res = pJ->GetResourceType();
		CHLSL_Var *var = pJ->AllocateVarFromSmartType();
		var->MakeConstantOnly();

		CHLSL_Solver_ReadSemantics *solver = new CHLSL_Solver_ReadSemantics( GetUniqueIndex() );
		solver->SendVSSetup( curSetup );
		solver->SetResourceType( res );
		solver->AddTargetVar( var );
		AddSolver( solver );
	}

	SmartCreateDummySolver();
	return true;
}
Ejemplo n.º 3
0
bool CNodePSOutput::CreateSolvers(GenericShaderData *ShaderData)
{
	for ( int i = 0; i < GetNumJacks_In(); i++ )
	{
		CJack *pJ = GetJack_In( i );
		if ( !pJ->GetNumBridgesConnected() )
			continue;

		CJack *sourceJack = pJ->GetBridge( 0 )->GetInputJack();
		CHLSL_Var *src = sourceJack->GetTemporaryVarTarget();
		const int res = pJ->GetResourceType();

		CHLSL_Solver_WriteSemantics *solver = new CHLSL_Solver_WriteSemantics( GetUniqueIndex() );
		solver->SetResourceType( res );
		solver->AddSourceVar( src );

		AddSolver( solver );
	}

	SmartCreateDummySolver();
	return true;
}