Skip to content

Instantly share code, notes, and snippets.

@CartBlanche
Created August 2, 2011 20:42
Show Gist options
  • Save CartBlanche/1121175 to your computer and use it in GitHub Desktop.
Save CartBlanche/1121175 to your computer and use it in GitHub Desktop.
Effect Files
if (!string.IsNullOrEmpty(filename))
{
StreamReader streamReader = new StreamReader (filename);
string text = streamReader.ReadToEnd ();
streamReader.Close ();
if ( filename.ToLower().Contains("fsh") )
{
CreateFragmentShaderFromSource(text);
}
else
{
CreateVertexShaderFromSource(text);
}
DefineTechnique ("Technique1", "Pass1", 0, 0);
CurrentTechnique = Techniques ["Technique1"];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment