kokoko3k / koko-aio-slang

Multi purpose crt shader for retroarch
GNU General Public License v3.0
70 stars 3 forks source link

Quick question: Are backdrops a possibility? #2

Closed estefan3112 closed 1 year ago

estefan3112 commented 1 year ago

Hi again, as this shader rocks so much: Do you see a possibility to implement backdrops, like it used to be in very old games, such as Asteroid Deluxe, Boot Hill (see below), or Tron? The obvious point is that these backdrops lie behind the very scarce screen gfx. If not, not so much of an issue, but apparently these very old games only make sense with backdrops. Cheers!

Bildschirm­foto 2023-01-31 um 17 07 56
kokoko3k commented 1 year ago

Uhm, I think it is doable, I'll think about it.

estefan3112 commented 1 year ago

Many thanks! Some further context maybe about the existing MAME backdrop support in RetroArch: https://github.com/libretro/RetroArch/issues/7419 https://forums.libretro.com/t/470-support-mame-style-backdrop-screen-bezel-overlay-artwork/18537/56

However, any of my attempts to have the boothill layout running on Mac RetroArch causes an immediate crash (vulkan, glcore and gl, and no shaders). Frankly I never got this running in RetroArch, whereas I am a heavy user of the lay file under regular MAME. That's why I thought of whether an implementation directly in the shader could work.

kokoko3k commented 1 year ago

Wait, so this feature is already supported at core level or within retroarch itself?

estefan3112 commented 1 year ago

It is a function within RetroArch, but never got it running. a And if I am not mistaken, quite incompatible with shaders. It is the same as overlays, which were also previously used for background artwork, but the implementation of artwork into shaders is much more powerful (no scaling issues etc).

kokoko3k commented 1 year ago

Ok, the feature per se should be simple to implement; but since the games that will use it will be not so much, i think i'll leave it disabled by default and require a static value to be switched manually in config.inc file. This will avoid this function to impact shader performance when not used, but will require that the shader code itself would be different (static parameter in config.inc changes). This should not be an issue for you, since you ship the whole koko-aio shader code. Does it sounds fine for you?

Edit: done, check Master and docs.md for instructions:

Screenshot_20230201_192718

estefan3112 commented 1 year ago

You are a wizard! So that I understand this correctly: I need to remove the static option, and then I can switch it on and off per game, right? Will immediately check it in my fork, that is very nice!!!

kokoko3k commented 1 year ago

You have to uncomment the option by removing the leading: "//" When you do this, the image will be shown.

estefan3112 commented 1 year ago

Oh, latest github does not work for me. The logfile says: "undeclared identifier"

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/ntsc_pass.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #0. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/first_pass.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #1. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/fxaa.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #2. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/shift_and_bleed.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #3. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/in_glow_x.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #4. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/in_glow_y.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #5. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/halo_x.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #6. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/halo_y.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #7. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/avglum_pass.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #8. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/reflection_blur_x.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #9. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/reflection_blur_y.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #10. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_1.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #11. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_2.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #12. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_3.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #13. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_4.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #14. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/ambi_push_pass.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #15. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/ambi_pre_pass.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #16. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/isrotated.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output #17. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/final_pass.slang". [ERROR] ERROR: final_pass.slang:461: 'backdrop' : undeclared identifier ERROR: final_pass.slang:461: '' : compilation terminated ERROR: 2 compilation errors. No code generated.

[ERROR] [ERROR] [slang]: Failed to compile fragment shader stage. [ERROR] [Vulkan]: Failed to compile shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/final_pass.slang". [ERROR] [Vulkan]: Failed to create preset: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp". [ERROR] [Vulkan]: Failed to create filter chain: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp". Falling back to stock.

kokoko3k commented 1 year ago

Yeah, you're right, it was working only when the setting was uncommented, now it is fixed.

Il giorno mer 1 feb 2023 alle ore 21:05 estefan3112 < @.***> ha scritto:

Oh, latest github does not work for me. The logfile says: "undeclared identifier"

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/ntsc_pass.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

0.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/first_pass.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

1 https://github.com/kokoko3k/koko-aio-slang/issues/1.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/fxaa.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

2 https://github.com/kokoko3k/koko-aio-slang/issues/2.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/shift_and_bleed.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

3.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/in_glow_x.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #4. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/in_glow_y.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #5. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/halo_x.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #6. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/halo_y.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #7. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/avglum_pass.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

8.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/reflection_blur_x.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

9.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/reflection_blur_y.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

10.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_1.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #11. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_2.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

12.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_3.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

13.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/bloom_pass_4.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

14.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/ambi_push_pass.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #15. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/ambi_pre_pass.slang". [INFO] [slang]: Using render target format R16G16B16A16_SFLOAT for pass output #16. [INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/isrotated.slang". [INFO] [slang]: Using render target format R8G8B8A8_UNORM for pass output

17.

[INFO] [slang]: Compiling shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/final_pass.slang". [ERROR] ERROR: final_pass.slang:461: 'backdrop' : undeclared identifier ERROR: final_pass.slang:461: '' : compilation terminated ERROR: 2 compilation errors. No code generated.

[ERROR] [ERROR] [slang]: Failed to compile fragment shader stage. [ERROR] [Vulkan]: Failed to compile shader: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/shaders/final_pass.slang". [ERROR] [Vulkan]: Failed to create preset: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp". [ERROR] [Vulkan]: Failed to create filter chain: "/Users/stefanstockinger/Library/Application Support/RetroArch/shaders/shaders_slang/bezel/koko-aio/monitor-slotmask-bloom-bezel.slangp". Falling back to stock.

— Reply to this email directly, view it on GitHub https://github.com/kokoko3k/koko-aio-slang/issues/2#issuecomment-1412652872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMPBUZ5W74DFOXLDRM7D3WVK6ZNANCNFSM6AAAAAAUMUIUWQ . You are receiving this because you commented.Message ID: @.***>

estefan3112 commented 1 year ago

One more thing: After having activated the backdrop option in config.inc, I apparently need to set the standard backdrop value in koko-aio.slangp to "False" -> as I want to activate the backdrop only for very few games. Right now, if I activate it in config.inc, all games get a backdrop, which is of course not desired. Is there already the possibility to set the standard value in koko-aio.slangp to "False" or whatever? Many thanks!

kokoko3k commented 1 year ago

Since the feature activation is static, due to how retroarch preprocessor work, that is not possible. You have to provide 2 different koko-aio(s); One specific for the games without the backdrop, sorry.

estefan3112 commented 1 year ago

Understood. So this will become a koko-aio-bd edition specifically for these games, probably an otherwise slimmed-down package. Not that bad, as the majority of games do not suffer performance-wise, as you wrote!

kokoko3k commented 1 year ago

Is it working? Can i close this?

estefan3112 commented 1 year ago

Thank you very much ... work in progress:

Bildschirm­foto 2023-02-03 um 22 02 29 Bildschirm­foto 2023-02-03 um 22 36 24