{"id":48175,"date":"2020-02-11T13:40:22","date_gmt":"2020-02-11T13:40:22","guid":{"rendered":"https:\/\/www.libretro.com\/?p=48175"},"modified":"2020-05-27T03:08:05","modified_gmt":"2020-05-27T03:08:05","slug":"flycast-progress-report-mip-mapping-properly-working-now-on-both-vulkan-and-opengl","status":"publish","type":"post","link":"https:\/\/www.libretro.com\/index.php\/flycast-progress-report-mip-mapping-properly-working-now-on-both-vulkan-and-opengl\/","title":{"rendered":"Flycast Progress Report &#8211; Mip-mapping properly implemented now on both Vulkan and OpenGL"},"content":{"rendered":"<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/FLYCAST_a.png\" alt=\"\" width=\"413\" height=\"413\" class=\"aligncenter size-full wp-image-47690\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/FLYCAST_a.png 413w, https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/FLYCAST_a-150x150.png 150w, https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/FLYCAST_a-300x300.png 300w\" sizes=\"(max-width: 413px) 100vw, 413px\" \/><br \/>\n<iframe loading=\"lazy\" width=\"750\" height=\"422\" src=\"https:\/\/www.youtube.com\/embed\/sSDtrO95-zU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><br \/>\nSome significant improvements have been made to the Dreamcast emulator core Flycast by flyinghead that serve to increase the graphics accuracy.<\/p>\n<p>For one, the OpenGL renderer has mip-mapping support now for the first time. Second, all texture mipmap levels are now uploaded to the GPU. The Vulkan renderer no longer auto-generates mip-maps and instead uses the proper mipmap levels. What happened before is that these auto-generated mipmaps would &#8216;bleed&#8217;, whereas the ones provided by the game do not.<\/p>\n<p>This caused issues with games like Railroad Tycoon 2 where the beach texture was not properly displayed. <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/railroad-1024x768.jpg\" alt=\"\" width=\"750\" height=\"563\" class=\"aligncenter size-large wp-image-48201\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/railroad.jpg 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/railroad-300x225.jpg 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/railroad-768x576.jpg 768w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/p>\n<p>Before the fix, you&#8217;d have weird magenta colors on the beaches with the Vulkan renderer. This has now been resolved.<\/p>\n<p>To learn more about texture bleeding, you can read this StackExchange article <a href=\"https:\/\/gamedev.stackexchange.com\/questions\/46963\/how-to-avoid-texture-bleeding-in-a-texture-atlas?newreg=0dbdf79fa0214a718ac7cd38488c56df\">here<\/a>.<\/p>\n<p>Another example of what texture bleeding looks like can be seen down below (and note that this is now also fixed) &#8211; previously texture bleeding would regularly occur at upscaled resolutions &#8211; <\/p>\n<figure id=\"attachment_48192\" aria-describedby=\"caption-attachment-48192\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182504-1024x768.png\" alt=\"NFL 2K2 - texture bleeding issue when upscaling - how it looked before\" width=\"750\" height=\"563\" class=\"size-large wp-image-48192\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182504-1024x768.png 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182504-300x225.png 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182504-768x576.png 768w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182504.png 1280w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-48192\" class=\"wp-caption-text\">NFL 2K2 &#8211; texture bleeding issue when upscaling &#8211; how it looked before<\/figcaption><\/figure>\n<p>Many of these issues have now been fixed. See the picture down below how the title screen above for instance looks like now &#8211;<\/p>\n<figure id=\"attachment_48193\" aria-describedby=\"caption-attachment-48193\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182553-1024x768.png\" alt=\"NFL 2K2 - texture bleeding issues fixed\" width=\"750\" height=\"563\" class=\"size-large wp-image-48193\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182553-1024x768.png 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182553-300x225.png 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182553-768x576.png 768w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/NFL_2K2_v1.004_2001SegaNTSCUS2S_51168-200202-182553.png 1280w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-48193\" class=\"wp-caption-text\">NFL 2K2 &#8211; texture bleeding issues fixed<\/figcaption><\/figure>\n<h2>How mip-mapping looks like on Dreamcast<\/h2>\n<p>To best illustrate the effect mip-mapping has on the video output quality, let us show some comparison pictures at the Dreamcast&#8217;s native 640&#215;480 resolution.<\/p>\n<p>The picture down below shows Soul Calibur running with mip-mapping disabled:<\/p>\n<figure id=\"attachment_48185\" aria-describedby=\"caption-attachment-48185\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-off-1024x625.jpg\" alt=\"Soul Calibur on Dreamcast with mip-mapping disabled\" width=\"750\" height=\"458\" class=\"size-large wp-image-48185\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-off-1024x625.jpg 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-off-300x183.jpg 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-off-768x468.jpg 768w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-48185\" class=\"wp-caption-text\">Soul Calibur on Dreamcast with mip-mapping disabled<\/figcaption><\/figure>\n<p>The picture down below shows Soul Calibur running with mip-mapping enabled:<\/p>\n<figure id=\"attachment_48182\" aria-describedby=\"caption-attachment-48182\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmap-on-1024x620.png\" alt=\"Soul Calibur on Dreamcast with mip-mapping enabled\" width=\"750\" height=\"454\" class=\"size-large wp-image-48182\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmap-on-1024x620.png 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmap-on-300x182.png 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmap-on-768x465.png 768w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-48182\" class=\"wp-caption-text\">Soul Calibur on Dreamcast with mip-mapping enabled<\/figcaption><\/figure>\n<p>At higher resolutions you will notice the blurriness starting to gradually disappear.<\/p>\n<h2>Combining mip-mapping with anisotropic filtering<\/h2>\n<p>The Vulkan renderer allows you to apply Anisotropic filtering (AF) to the textures (to learn more about it, read the Wikipedia page <a href=\"https:\/\/en.wikipedia.org\/wiki\/Anisotropic_filtering\">here<\/a>).<\/p>\n<figure id=\"attachment_48187\" aria-describedby=\"caption-attachment-48187\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-1024x625.jpg\" alt=\"Soul Calibur on Dreamcast with mip-mapping enabled and 16 x AF filtering\" width=\"750\" height=\"458\" class=\"size-large wp-image-48187\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-1024x625.jpg 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-300x183.jpg 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-768x468.jpg 768w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-48187\" class=\"wp-caption-text\">Soul Calibur on Dreamcast with mip-mapping enabled and 16 x AF filtering<\/figcaption><\/figure>\n<p>While you can still make out some of the far textures in the distance being slightly blurry as a result of the mip-mapping, overall the blurriness factor is significantly reduced as a result of the agressive 16x AF filtering being applied here, even at a very low resolution of 640&#215;480.<\/p>\n<h2>Even further tweaking possible with PowerVR postprocessing filter<\/h2>\n<p>You don&#8217;t have to stop at mipmapping and AF filtering of course. You can also take advantage of leilei&#8217;s PowerVR post processing filters on top to further enhance the authenticity of the picture.<\/p>\n<p>NOTE: For now, the PowerVR postprocessing filters only work with OpenGL. Vulkan support will arrive later.<\/p>\n<figure id=\"attachment_48195\" aria-describedby=\"caption-attachment-48195\" style=\"width: 750px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-powervr-1024x625.jpg\" alt=\"Soul Calibur on Dreamcast with mip-mapping enabled and PowerVR postprocessing filter\" width=\"750\" height=\"458\" class=\"size-large wp-image-48195\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-powervr-1024x625.jpg 1024w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-powervr-300x183.jpg 300w, https:\/\/www.libretro.com\/wp-content\/uploads\/2020\/02\/soulcalibur-mipmapping-on-aa16x-powervr-768x468.jpg 768w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><figcaption id=\"caption-attachment-48195\" class=\"wp-caption-text\">Soul Calibur on Dreamcast with mip-mapping enabled and PowerVR postprocessing filter<\/figcaption><\/figure>\n<p>Here we have mip-mapping enabled and PowerVR 2 Postprocessing filter enabled. NOTE: Because this is the OpenGL renderer, anisotropic filtering right now is not available, so we cannot show you a picture of how the PVR2 postprocessing looks like in conjunction with 16x AF. Neither can we show a similar picture on Vulkan right now because the aforementioned PVR2 postprocessing filters are not available there. Hopefully both renderers can be at feature parity soon in these departments.<\/p>\n<h2>How to get it<\/h2>\n<p>There are two ways to update your Flycast core. Start up RetroArch first &#8211;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/update-installed-cores.png\" alt=\"\" width=\"638\" height=\"566\" class=\"aligncenter size-full wp-image-47727\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/update-installed-cores.png 638w, https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/12\/update-installed-cores-300x266.png 300w\" sizes=\"(max-width: 638px) 100vw, 638px\" \/><\/p>\n<p>a &#8211; If you have already installed the core before, you can go to Online Updater and select &#8216;Update Installed Cores&#8217;.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/07\/play-2.jpg\" alt=\"\" width=\"762\" height=\"267\" class=\"aligncenter size-full wp-image-47290\" srcset=\"https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/07\/play-2.jpg 762w, https:\/\/www.libretro.com\/wp-content\/uploads\/2019\/07\/play-2-300x105.jpg 300w\" sizes=\"(max-width: 762px) 100vw, 762px\" \/><\/p>\n<p>b &#8211; If you haven&#8217;t installed the core yet, go to Online Updater, &#8216;Core Updater&#8217;, and select &#8216;Flycast&#8217; from the list. It will then download and install this core.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some significant improvements have been made to the Dreamcast emulator core Flycast by flyinghead that serve to increase the graphics accuracy. For one, the OpenGL renderer has mip-mapping support now for the first time. Second, all texture mipmap levels are now uploaded to the GPU. The Vulkan renderer no longer auto-generates mip-maps and instead uses [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[28,206,260,5],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts\/48175"}],"collection":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/comments?post=48175"}],"version-history":[{"count":20,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts\/48175\/revisions"}],"predecessor-version":[{"id":48203,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/posts\/48175\/revisions\/48203"}],"wp:attachment":[{"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/media?parent=48175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/categories?post=48175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.libretro.com\/index.php\/wp-json\/wp\/v2\/tags?post=48175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}