semanticals!
public text v1 · immutableforeach (EffectParameter p in e.Parameters)
{
if (p != null && p.Semantic != null)
{
switch (p.Semantic.ToUpper())
{
case "WORLD":
p.SetValue(world);
break;
case "VIEW":
p.SetValue(view);
break;
case "PROJECTION":
p.SetValue(projection);
break;
case "VIEWPROJECTION":
p.SetValue(view * projection);
break;
case "WORLDVIEWPROJECTION":
p.SetValue(world * view * projection);
break;
case "WORLDINVERSE":
p.SetValue(Matrix.Invert(world));
break;
case "VIEWINVERSE":
p.SetValue(Matrix.Invert(view));
break;
case "PROJECTIONINVERSE":
p.SetValue(Matrix.Invert(projection));
break;
case "TOTALGAMETIME":
p.SetValue((float)totalSeconds);
break;
case "CAMERAUP":
p.SetValue(cameraUp);
break;
case "CAMERATARGET":
p.SetValue(cameraTarget);
break;
case "TEXTURESTAGE0":
p.SetValue(tex0);
break;
}
}
}