protected static bool ParseFragmentProgramRef( string parameters, MaterialScriptContext context )
{
// update section
context.section = MaterialScriptSection.ProgramRef;
context.program = GpuProgramManager.Instance.GetByName( parameters );
if ( context.program == null )
{
// unknown program
LogParseError( context, "Invalid fragment_program_ref entry - fragment program {0} has not been defined.", parameters );
return true;
}
context.isProgramShadowCaster = false;
context.isProgramShadowReceiver = false;
// set the vertex program for this pass
context.pass.SetFragmentProgram( parameters );
// create params? skip this if program is not supported
if ( context.program.IsSupported )
{
context.programParams = context.pass.FragmentProgramParameters;
}
// Return TRUE because this must be followed by a {
return true;
}