garbear / xbmc

XBMC Main Repository
http://xbmc.org
Other
134 stars 53 forks source link

[GSoC 2017] Retroplayer: Video Shaders #86

Open VelocityRa opened 7 years ago

VelocityRa commented 7 years ago

Description

This PR adds support for rendering multi-pass shader presets, as defined in this libretro spec. The spec essentially introduces shader “preset” files: a standardized file format which allow for multi-pass shader configurations to achieve advanced filtering, without manually copying and pasting shader code all over the place.

They have other features too, but this is their core functionality and reason of existence. The biggest advantage of implementing this would be the vast library of pre-existing shaders written in this format, both for OpenGL (ES), and Direct3D.

Not all can be used yet because they porting to HLSL (thankfully the libretro/RetroArch team is on board with helping us port them), but there are hundreds of presets available.

Here's RetroArch's page on shader presets.

Here's a few other examples.

Motivation and Context

Shaders can be used to:

Adjust everything about the colour of the image in a robust way without changing application-wide settings. These including gamma, luminance, contrast, saturation. These are just a few examples, there can be more applications that I haven’t thought of. If I end up not implementing support for libretro’s shaders, I aim to develop/port a few shaders that will be provided by default, but shader developers can extend this by providing more.

How Has This Been Tested?

TODO

Screenshots Video:

Link RetroPlayer Shaders (WIP)

Types of change

Checklist:

TODO

garbear commented 4 years ago

@VelocityRa I rebased this branch on 18.6 (for safety, old commit was e3ddbc4dacd4327b812285c0e81aa8f03ad2cc5e). Ready for you to squash against it

Hedda commented 4 years ago

Are these Video Shaders for RetroPlayer gaming still on the roadmap?

VelocityRa commented 4 years ago

The code is probably PR-ready but I still haven't gotten around to resolving the distribution issue for shaders/presets.

Hedda commented 4 years ago

The code is probably PR-ready but I still haven't gotten around to resolving the distribution issue for shaders/presets.

Are you thinking about distributing them as Add-ons for Kodi so that the user can install only if they really want to have them?

VelocityRa commented 4 years ago

I'm not sure. I don't plan on working on it for the foreseeable future, sorry.