Alpha - GSoC Proposal - RetroPlayer Shaders

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
RockerC Offline
Posting Freak
Posts: 1,485
Joined: May 2011
Reputation: 28
Post: #16
Oh, posted wrong version by in my previous post, thus need to correct this (and I have updated my previous post with the correct information):

You actually should want to Kodi / RetroPlayer shaders to conform with GLSL ES 1.0 / WebGL shader specification (and not with GLSL ES 2.0) if you want to be compatible with the standard used by RetroArch shaders/renderer today.

https://github.com/Themaister/RetroArch/...SL-shaders

So best would be to have Kodi use GLSL ES 1.0 shaders as its main standard. And as most graphics controllers/adapters are backwards compatible they will support all of those.


Another tip with this link to RetroArch GLSL shader viewer (with online runtime compiler):

http://themaister.net/glslview/

RetroArch developer themaister have written this WebGL application to test your shaders against various images from your harddrive.

"Shaders need to conform to the GLSL shader format that RetroArch uses. You can find out more about this format here. This implementation is limited to two passes for now. GLSL presets are not currently supported either.

With the cg2glsl tool you can convert Cg shaders (Wiki, shader collection) to the RetroArch GLSL format.

The shaders should conform to GLSL ES 1.0/WebGL shader spec. The shaders converted with cg2glsl will ensure this
"
(This post was last modified: 2017-03-29 14:13 by RockerC.)
find quote
da-anda Offline
Team-Kodi Member
Posts: 5,777
Joined: Jun 2009
Reputation: 77
Location: germany
Post: #17
(2017-03-28 16:40)wisler Wrote:  
(2017-03-28 12:05)da-anda Wrote:  I hope the shader support would not be limited to just retroplayer but could be used by skins as well (at least abstracted in a way so that they can be applied to GUI later on)

I guess this is to much for a gsoc project. But if they are nicely integrated behind and API, I guess we will find a dev that could make it possible to use them in the UI.

So please let the guys focus on RetroPlayer, because it is a big project. Adding stuff could be done afterwards or if some time is available.
Sure, I didn't demand them to be integrated for GUI as well, just something to keep in mind when creating the API for shaders.

@RockerC
what about Windows? No GLSL shaders there, as Windows is DirectX only. Shader support for Kodi would have to work on all platforms.
(This post was last modified: 2017-03-29 17:02 by da-anda.)
find quote
Vel0cityX Offline
Junior Member
Posts: 22
Joined: Mar 2017
Reputation: 0
Sad  RE: GSoC Proposal - RetroPlayer Shaders
Post: #18
I'd love to have started working on this but I'm having dev env issues...

GSoC 2017 student working on shader support for Retroplayer
(This post was last modified: 2017-03-29 19:33 by Vel0cityX.)
find quote
RockerC Offline
Posting Freak
Posts: 1,485
Joined: May 2011
Reputation: 28
Post: #19
(2017-03-29 17:01)da-anda Wrote:  @RockerC, what about Windows? No GLSL shaders there, as Windows is DirectX only. Shader support for Kodi would have to work on all platforms.
You are correct that Windows requires HLSL shaders instead of GLSL shaders, but the GLSL ES 1.0 specification use quite portable code which means that your GLSL ES 1.0 shaders once created and tested on all other platforms can then with relativly little effort be ported/converted to HLSL shaders as the very a last step.

So what I meant was that I think you would probably want to initially write all Kodi/RetroPlayer shaders in GLSL ES 1.0 format as your primary source shaders and always keep maintaining the sharders in that GLSL ES 1.0 format, so that you always make any changes to those in that format first.

The idea is then that you countinuesly port/convert those shaders from GLSL ES 1.0 format to HLSL format for Windows only. That porting/conterting from GLSL to HLSL could either be done manually (as an option to also always maintain HLSL shaders too) or you could alternativly do the porting/converting automatically through a script that is run each time on build.

That is, it would would really not be recommended to first write a HLSL shader to use and maintain as your primary source in Kodi/RetroPlayer. You could still have developers write new shaders in HLSL if they want, but then you would want port/covert it to GLSL ES 1.0 format as soon as possible to keep it it there as the primary source which from then on will be maintained first.

As I wrote in my first post:
(2017-03-28 10:40)RockerC Wrote:  Shaders written for the GLSL ES 1.0 specifications should be compatible with all Kodi platforms but Windows, then only have to port to HLSL for Windows.
(2017-03-28 10:40)RockerC Wrote:  Three most common types of shaders are written for GLSL, HLSL, Cg runtime compilers, of which GLSL ES 1.0 is probably the main standard for which you want to go with.
(2017-03-28 10:40)RockerC Wrote:  HLSL (High-Level Shading Language) is a proprietary shading language developed by Microsoft for Direct3D and it is for Windows only, so only needed in Kodi for Windows.
(2017-03-28 10:40)RockerC Wrote:  Benefit of using GLSL ES 1.0 is that it is very portable code and there are even tools to help convert one code format to the other and vice versa, back and forth to GLSL.
(This post was last modified: 2017-03-30 13:07 by RockerC.)
find quote
Vel0cityX Offline
Junior Member
Posts: 22
Joined: Mar 2017
Reputation: 0
Post: #20
To anyone here interested, I opened a thread about RetroPlayer's OSD redesign and how the UI for shaders will work:
http://forum.kodi.tv/showthread.php?tid=315263

GSoC 2017 student working on shader support for Retroplayer
(This post was last modified: 2017-05-29 03:10 by Vel0cityX.)
find quote
Post Reply