Axiom.Serialization.MaterialSerializer.ParseShadowReceiverFragmentProgramRef C# (CSharp) Метод

ParseShadowReceiverFragmentProgramRef() приватный Метод

private ParseShadowReceiverFragmentProgramRef ( string parameters, MaterialScriptContext context ) : bool
parameters string
context MaterialScriptContext
Результат bool
		protected static bool ParseShadowReceiverFragmentProgramRef( 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 shadow_receiver_fragment_program_ref entry - fragment program {0} has not been defined.", parameters );
				return true;
			}

			context.isProgramShadowCaster = false;
			context.isProgramShadowReceiver = true;

			// set the vertex program for this pass
			context.pass.SetShadowReceiverFragmentProgram( parameters );

			// create params?  skip this if program is not supported
			if ( context.program.IsSupported )
			{
				context.programParams = context.pass.ShadowReceiverFragmentProgramParameters;
			}

			// Return TRUE because this must be followed by a {
			return true;
		}