Open gusandrianos opened 4 years ago
@KostasAndrianos can you cherry-pick these 7 commits? https://github.com/garbear/xbmc/compare/327d99748e5cfdd98db2f6c27419c2fbb723afa8~7...327d99748e5cfdd98db2f6c27419c2fbb723afa8
@gusandrianos Hi there. It's been years, but I thought you might be interested to see our fixes to your code. Also any comments would be welcome. Since the code seems well-structured, the changes are mostly small. I've written summary of the fixes here: https://forum.kodi.tv/showthread.php?tid=173361&pid=3189974#pid3189974 The code is available here: https://github.com/KOPRajs/xbmc/commits/video-shaders-v2/
If you've got any comments on the fixes, you can write it here or in the forum. Thank you.
@KOPRajs Thanks a lot for taking the time to do these changes! I am extremely rusty on my C++ and OpenGL but the changes look good as far as I can tell. Feel free to go whichever way you like with this as I have extremely little time these days and I also don't have a personal machine with me because I relocated to another country.
Description
This PR extends the functionality #86 brought to RetroPlayer by introducing support for other platforms through an OpenGL implementation. The code in this PR is part of this GSoC project
In short, this code adds support for multi-pass shader presets, as defined in the libretro spec, which opens a whole new world of customization to the look and feel of games, through the massive amount of presets available in this format.
While the spec is written with cg shaders in mind, it is also extended to GLSL and slang shaders.
You can read more about the current state of my solution, what works and what doesn't(yet), here.
Motivation and Context
Shaders can be used to:
Of course, the list goes on. Most importantly, shaders can be used to elevate the gameplay experience and make it more immersive. A game can either look like it's being displayed on a CRT or a Gameboy or an LCD monitor or be upscaled and viewed on a 4K monitor, the possibilities are endless.
Regarding the commits in this PR.
I should mention that the last commit that falls under the GSoC umbrella is this one. Anything that follows it should not be considered as part of the GSoC project.
Let's give you some context about each commit. The first three commits are setting up the relevant parts of code for usage in the next commit. The fourth commit contains all the work that involves the processing and rendering of the shader presets. The fifth commit connects the code to RetroPlayer.
How Has This Been Tested?
I took a brute force approach by testing almost every preset in the glsl-shaders repo. It has only been tested on Linux and it is unknown if it works on other platforms that use OpenGL.
To test this code yourself
game.shader.presets
binary add-on/your/kodi/directory/addons/game.shader.presets/resources/libretro/glsl
ShaderPresetsDefault.xml
in the resources directory with this file. This is a temporary workaround, I will update the add-on to choose the correct file depending on the situation.Screenshots (if appropriate):
Here's a video that demonstrates what these changes do.![YouTube Demo](https://github.com/KostasAndrianos/RetroPlayerShaders-GSoC19-Summary/blob/master/resources/preview.png?raw=true)
Types of change
Checklist: