diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling.md b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling.md new file mode 100644 index 0000000..6f2e443 --- /dev/null +++ b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling.md @@ -0,0 +1,57 @@ +# IIDX 24 GFX upscaling notes + +Date: 2023-04-15 +Author: icex2 + +Notes about my work on fixing the upscaling/downscaling feature of bemanitools for IIDX 20 to 26. +I realized that the render backend changed significantly that the old method that worked fine +doesn't work anymore. + +The tool used in the screenshots is [apitrace](https://github.com/apitrace/apitrace). + +## IIDX 24 + +The GFX engine in IIDX from 20 to 26 has a changed render loop that includes built-in scaling to +implement the SD and HD/HD* screen settings that are selectable in the operator menu + +### Frame 0 - GFX init part + +Setting up the context and device, as well as the frame buffer. This also creates the intermediate +texture that is configured as the render target once it begins drawing the scene. + +![](2023-04-13-iidx-24-gfx-upscaling/init.png) + +### Frame 1 - A clean main render path + +Start the scene and set the render target to the intermediate texture. + +![](2023-04-13-iidx-24-gfx-upscaling/beginscene.png) + +After done drawing the scene, the intermediate texture is blended to the framebuffer. With a target +2D plane having the size of the target resolution, the blending applies linear scaling to either +up- or downscale the final image. + +![](2023-04-13-iidx-24-gfx-upscaling/scaling.png) + +## IIDX 10 + +A recap of the old stuff, see also [my previous notes](2019-10-07-iidx-gfx-rendering-loops.md), +as I had to look at everything again to properly understand the differences. + +### Frame 0 - GFX init part + +Setting up the context and device, as well as the frame buffer. Renders directly to the frame +buffer. + +![](2023-04-13-iidx-24-gfx-upscaling/init10.png) + +### Frame 1 - A clean main render path + +Beginning the scene excerpt. The viewport needs to match the target resolution to display the +final image correctly. + +![](2023-04-13-iidx-24-gfx-upscaling/beginscene10.png) + +Ending the scene excerpt, nothing fancy here, just swapping the back buffer. + +![](2023-04-13-iidx-24-gfx-upscaling/endscene10.png) \ No newline at end of file diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/beginscene.png b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/beginscene.png new file mode 100644 index 0000000..40bf4ea Binary files /dev/null and b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/beginscene.png differ diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/beginscene10.png b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/beginscene10.png new file mode 100644 index 0000000..0d79fe5 Binary files /dev/null and b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/beginscene10.png differ diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/endscene10.png b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/endscene10.png new file mode 100644 index 0000000..d7e0fb4 Binary files /dev/null and b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/endscene10.png differ diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/init.png b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/init.png new file mode 100644 index 0000000..6e5939f Binary files /dev/null and b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/init.png differ diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/init10.png b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/init10.png new file mode 100644 index 0000000..96951bf Binary files /dev/null and b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/init10.png differ diff --git a/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/scaling.png b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/scaling.png new file mode 100644 index 0000000..846bcb5 Binary files /dev/null and b/doc/dev/journal/2023-04-13-iidx-24-gfx-upscaling/scaling.png differ