RenderPathForward.hx 804 B

123456789101112131415161718192021222324252627282930313233343536
  1. package arm.render;
  2. import iron.RenderPath;
  3. class RenderPathForward {
  4. public static var path: RenderPath;
  5. public static function init(_path: RenderPath) {
  6. path = _path;
  7. }
  8. public static function commands() {
  9. #if is_paint
  10. RenderPathPaint.liveBrushDirty();
  11. #end
  12. RenderPathBase.commands(drawForward);
  13. }
  14. public static function drawForward() {
  15. path.setDepthFrom("gbuffer1", "gbuffer0");
  16. path.setTarget("gbuffer1");
  17. path.drawSkydome("shader_datas/world_pass/world_pass");
  18. path.setDepthFrom("gbuffer1", "gbuffer2");
  19. path.setTarget("buf");
  20. path.bindTarget("gbuffer1", "tex");
  21. path.drawShader("shader_datas/compositor_pass/compositor_pass");
  22. path.setTarget("buf");
  23. RenderPathBase.drawCompass(path.currentG);
  24. path.drawMeshes("overlay");
  25. RenderPathBase.drawTAA();
  26. }
  27. }