Advertisement
feos

hawk shaders

Jan 19th, 2021
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.87 KB | None | 0 0
  1. 08-09-2018
  2.  
  3. <feos> zeromus: can you briefly tell what prevents retroarch shaders support? the way they do it currently, there are preset files and then actual shaders loaded by them. it's been working for them, why won't it work for us?
  4. <feos> for us, shaders add a huge benefit because we can dump avi of any tas with them
  5. <feos> I remember you said they're not following their own specs https://docs.libretro.com/specs/shader/
  6. <feos> is that really true?
  7. <zeromus> feos, we DO support retroarch shaders, and we DO support preset files. yes, theyre not following their own specs.
  8. <zeromus> however, we DO NOT support all the features of the specs
  9. <zeromus> feos, the "theyre not compatible with their own specs" i believe is mitigated if you use a newer technique for handling the shader porting. they stopped using CGC I think. youre supposed to process their files as HLSL directly, and additionally have a totally separate GLSL archive, I think. right? I cant remember
  10. <feos> they have CG and HLSL shaders, and presets for each, everything in its own folder. and a couple more... formats?
  11. <zeromus> also, I will not work on shader support so that you can dump avis with them. that's absurd. shade in postprocessing.
  12. <zeromus> i am embarassed that the bizhawk shader support is so crusty though
  13. <zeromus> however thats not a task i'm willing to undertake right now. i have too much other stuff going on
  14. <feos> on postprocessing it's terrible to set up
  15. <feos> requires handing avis to retroarch's ffmpeg core
  16. <zeromus> one thing you could do though would be to change the code to not use cgc, and to throw errors when loading hlsl or glsl when the wrong display method is picked.
  17. <zeromus> then you would have a hope of more shaders magically working
  18. <zeromus> but i bet they still dont follow their own specs
  19. <zeromus> so you have to fork their shaders repository, fix them one by one, and send them PRs.
  20. <zeromus> the only reason they dont follow their own specs is because their parser and processor is too lenient. its not really on purpose
  21. <zeromus> also their specs are shit
  22. <zeromus> and you can quote me on that
  23. <feos> hmm, so they manually convert CG ones https://github.com/libretro/glsl-shaders/tree/master/pal
  24. <feos> "This repo is for glsl shaders converted by hand from libretro's common-shaders repo, since some don't play nicely with the cg2glsl script. "
  25. <zeromus> when does cg2glsl run?
  26. <feos> no idea
  27. <zeromus> i think last time i gave up working on shaders, i asked that question and never got a coherent answer
  28. <zeromus> maybe their buildbot runs cg2glsl on the hlsl shaders, and then patches the results with these
  29. <zeromus> that would mean you cant just check out the repository and get what the retroarch user gets
  30. <feos> yeah
  31. <zeromus> 1. please confirm that by downloading both shader sets in retroarch and analyzing them
  32. <zeromus> or by asking
  33. <zeromus> 2. if so, i suggest we commit all those shaders combined into one repository. basically commit their build output
  34. <zeromus> well. im not sure how we want to present this to users.
  35. <zeromus> i dont really want to tell people to install retroarch and download the shaders there and then use them from bizhawk
  36. <zeromus> its possible we could build the shaders actually using their cg2glsl and merge the stuff JUST AS THEY DO
  37. <zeromus> but someone needs to ask them HOW DO THEY DO
  38. <zeromus> ok, how about that
  39. <zeromus> find out HOW DO THEY DO and if it's suitable for build scripting, i'll script it in our build process
  40. <zeromus> then we could package all the shaders (even though a bunch of them won't work) and at least have it automated.
  41. <zeromus> by the way, we lack some of the features required for some of the shaders to work. a few features arent hard. some of the features are really hard. neither of those I have any intention of working on right now
  42. <feos> I think if we only want glsl, we can just only use the glsl repo
  43. <zeromus> that will be missing some shaders
  44. <feos> then we need to support CG?
  45. <zeromus> because they do not deliver the contents of their glsl repo
  46. <zeromus> oh my god
  47. <zeromus> i will write the entire thing again
  48. <zeromus> i think they must automate running cg2glsl on the contents of their CG repo, then overwrite the results with the contents of the glsl repo, which is shaders which have been fixed since cg2glsl messes them up
  49. <zeromus> the result is what they deliver to users
  50. <zeromus> therefore if we deliver the contents of the glsl repo, we are not delivering what they deliver to their users
  51. <feos> so the main question is, where they grab glsl shaders for shipping with RA?
  52. <zeromus> yes
  53. <feos> my take is that cg2glsl is ran on CG shaders, and then fixed by hand, and then committed to glsl-shaders
  54. <zeromus> nope
  55. <zeromus> look for bicubic in the glsl-shaders top level
  56. <zeromus> its missing
  57. <zeromus> they must be merged
  58. <zeromus> you need to go ask them to be sure
  59. <feos> I definitely will
  60. <feos> this has been bugging me for years
  61. <zeromus> one other thing i wasnt clear about: we need to STOP running cgc manually. we should pass the .cg to directx directly. (will any of them work in d3d9?) and error if the user is running d3d display method and chooses glsl shaders.
  62. <feos> and with some computer cores, raw emulator output just doesn't represent the quirks of the device, so we'll need them shaders to make it better (optionally)
  63. <zeromus> also FYI, technology for transpiling shaders has improved since retroarch set that up
  64. <zeromus> https://github.com/aras-p/hlsl2glslfork this for instance, or one of the things the "status" section links to.
  65. <zeromus> i believe, I would try this before committing to using separate glsl/hlsl repositories. but the advantage to separate glsl/hlsl repositories is it's easier to blame things on retroarch since we haven't improvised our own solution
  66. <zeromus> also ask them why they have separate extensions .cgp and .glslp
  67. <zeromus> ok im done with this, i have work to do
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement