ppedepthoffield.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. //!DepthOfField - PostProcessEffectType.DepthOfField
  2. //TODO - may be just a dummy, since CGame.OverrideDOF function handles script overrides?
  3. class PPEDepthOfField: PPEClassBase
  4. {
  5. static const int PARAM_DOFLQ = 0;
  6. static const int PARAM_FOCALDISTANCE = 1;
  7. static const int PARAM_HYPERFOCAL = 2;
  8. static const int PARAM_FOCALOFFSET = 3;
  9. static const int PARAM_BLURFACTOR = 4;
  10. static const int PARAM_SIMPLEDOF = 5;
  11. static const int PARAM_SIMPLEHFNEAR = 6;
  12. static const int PARAM_SIMPLEDOFSIZE = 7;
  13. static const int PARAM_SIMPLEDOFGAUSS = 8;
  14. override int GetPostProcessEffectID()
  15. {
  16. return PostProcessEffectType.DepthOfField;
  17. }
  18. override string GetDefaultMaterialPath()
  19. {
  20. string ret = "Graphics/Materials/postprocess/depthoffieldTest2";
  21. /*
  22. GameOptions m_Options = new GameOptions();
  23. ListOptionsAccess loa = ListOptionsAccess.Cast( m_Options.GetOptionByType( AT_POSTPROCESS_EFFECTS ) );
  24. switch (loa.GetIndex())
  25. {
  26. case POSTPROCESS_OPTION_VALUE_LOW:
  27. ret = "Graphics/Materials/postprocess/hbao_low";
  28. break;
  29. case POSTPROCESS_OPTION_VALUE_MEDIUM:
  30. ret = "Graphics/Materials/postprocess/hbao_medium";
  31. break;
  32. case POSTPROCESS_OPTION_VALUE_HIGH:
  33. ret = "Graphics/Materials/postprocess/hbao_high";
  34. break;
  35. case POSTPROCESS_OPTION_VALUE_HIGHEST:
  36. ret = "Graphics/Materials/postprocess/hbao_highest";
  37. break;
  38. }
  39. */
  40. return ret;
  41. }
  42. override void RegisterMaterialParameters()
  43. {
  44. RegisterParameterScalarBool(PARAM_DOFLQ,"DOFLowQuality",false);
  45. RegisterParameterScalarFloat(PARAM_FOCALDISTANCE,"FocalDistance",0.1,0.0,1.0);
  46. RegisterParameterScalarFloat(PARAM_HYPERFOCAL,"HyperFocal",0.85,0.1,100.0);
  47. RegisterParameterScalarFloat(PARAM_FOCALOFFSET,"FocalOffset",0.0,0.0,1.0);
  48. RegisterParameterScalarFloat(PARAM_BLURFACTOR,"BlurFactor",4.0,0.0,10.0);
  49. RegisterParameterScalarBool(PARAM_SIMPLEDOF,"SimpleDOF",false);
  50. RegisterParameterScalarFloat(PARAM_SIMPLEHFNEAR,"SimpleHyperFocalNear",0.7,0.1,100.0);
  51. RegisterParameterScalarInt(PARAM_SIMPLEDOFSIZE,"SimpleDOFSize",2.0,1.0,4.0);
  52. RegisterParameterScalarInt(PARAM_SIMPLEDOFGAUSS,"SimpleDOFGauss",1.0,0.0,4.0);
  53. }
  54. };