Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GSoC 2017] Retroplayer: Video Shaders #86

Open
wants to merge 4 commits into
base: feature_shaders
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ cmake_install.cmake
/addons/kodi.binary.instance.inputstream/addon.xml
/addons/kodi.binary.instance.peripheral/addon.xml
/addons/kodi.binary.instance.pvr/addon.xml
/addons/kodi.binary.instance.shaderpreset/addon.xml
/addons/kodi.binary.instance.screensaver/addon.xml
/addons/kodi.binary.instance.vfs/addon.xml
/addons/kodi.binary.instance.videocodec/addon.xml
Expand Down
7 changes: 7 additions & 0 deletions addons/kodi.binary.instance.shaderpreset/addon.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="kodi.binary.instance.shaderpreset" version="@ADDON_INSTANCE_VERSION_SHADERPRESET@" provider-name="Team Kodi">
<backwards-compatibility abi="@ADDON_INSTANCE_VERSION_SHADERPRESET_MIN@"/>
<requires>
<import addon="xbmc.core" version="0.1.0"/>
</requires>
</addon>
154 changes: 153 additions & 1 deletion addons/resource.language.en_gb/resources/strings.po
Original file line number Diff line number Diff line change
Expand Up @@ -17587,7 +17587,159 @@ msgctxt "#35259"
msgid "Saved"
msgstr ""

#empty strings from id 35260 to 35504
#empty strings from id 35260 to 35401

msgctxt "#35402"
msgid "Replicates the 2.6-inch dot matrix screen of the Game Boy. Features the ghosting problems of the original handheld."
msgstr ""

msgctxt "#35403"
msgid "4xBR Hybrid"
msgstr ""

msgctxt "#35404"
msgid "CRT Display"
msgstr ""

msgctxt "#35405"
msgid "Emulates a CRT display. Features scan-lines, color correction, gamma correction and sharpening."
msgstr ""

msgctxt "#35406"
msgid "Hylian"
msgstr ""

msgctxt "#35407"
msgid "Emulates a CRT display. Features scan-lines, color correction, gamma correction, sharpening, CRT phosphor and CRT beam effects."
msgstr ""

msgctxt "#35408"
msgid "Royale"
msgstr ""

msgctxt "#35409"
msgid "Emulates a CRT display. Resource intensive. Features scan-lines, color correction, gamma correction, sharpening, CRT phosphor emulation, halation, refractive diffusion, curvature and anti-aliasing."
msgstr ""

msgctxt "#35410"
msgid "CRT Geom"
msgstr ""

msgctxt "#35411"
msgid "NTSC RF"
msgstr ""

msgctxt "#35412"
msgid "Replicates an analog signal through a coaxial RF connector. Features color distortion, blurring, NTSC color artifacts and dot crawl."
msgstr ""

msgctxt "#35413"
msgid "TV-out"
msgstr ""

msgctxt "#35414"
msgid "NTSC Composite"
msgstr ""

msgctxt "#35415"
msgid "Replicates an analog signal through an S-Video connector. Features color distortion, blurring, NTSC color artifacts."
msgstr ""

msgctxt "#35416"
msgid "Replicates an analog signal through a composite connector. Features color distortion, blurring, NTSC color artifacts."
msgstr ""

#empty string with id 35417

msgctxt "#35418"
msgid "Scaling Shader"
msgstr ""

msgctxt "#35419"
msgid "xBR-lv2 (fast)"
msgstr ""

msgctxt "#35420"
msgid "Smooths and rounds edges to reduce pixelation. Written by Hyllian."
msgstr ""

msgctxt "#35421"
msgid "xBR-mlv4"
msgstr ""

msgctxt "#35422"
msgid "Smooths and rounds edges to reduce pixelation. Image is smoother than other versions. Written by Hyllian."
msgstr ""

msgctxt "#35424"
msgid "Super Eagle"
msgstr ""

msgctxt "#35425"
msgid "Smooths and rounds edges to reduce pixelation. Written by Derek Liauw Kie Fa."
msgstr ""

msgctxt "#35426"
msgid "Game Boy Advance"
msgstr ""

msgctxt "#35427"
msgid "Nintendo DS"
msgstr ""

msgctxt "#35428"
msgid "PlayStation Portable"
msgstr ""

msgctxt "#35429"
msgid "Replicates the 4.3-inch LCD screen of the PlayStation Portable."
msgstr ""

msgctxt "#35430"
msgid "Replicates the 3-inch LCD screen of the Nintendo DS."
msgstr ""

msgctxt "#35431"
msgid "Replicates the 2.9-inch color LCD screen of the Game Boy Advance."
msgstr ""

msgctxt "#35432"
msgid "LCD Screen"
msgstr ""

msgctxt "#35433"
msgid "LCD3x"
msgstr ""

msgctxt "#35434"
msgid "Simulates an LCD screen. Written by Gigaherz."
msgstr ""

msgctxt "#35435"
msgid "NTSC S-video"
msgstr ""

msgctxt "#35436"
msgid "Emulates a CRT display. Features scan-lines, color correction, gamma correction, sharpening, curvature, interlacing, phosphor and halation."
msgstr ""

msgctxt "#35437"
msgid "xBR-lv3"
msgstr ""

msgctxt "#35438"
msgid "xBR-lv3 (no blend)"
msgstr ""

msgctxt "#35439"
msgid "Smooths and rounds edges to reduce pixelation. Smoother than the no-blend version. Written by Hyllian."
msgstr ""

msgctxt "#35440"
msgid "Smooths and rounds edges to reduce pixelation. Pixel colors are not blended together. Written by Hyllian."
msgstr ""

#empty strings from id 35441 to 35504

#. connection state "host unreachable"
#: xbmc/pvr/addons/PVRClients.cpp
Expand Down
2 changes: 1 addition & 1 deletion cmake/treedata/common/retroplayer.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ xbmc/cores/RetroPlayer/playback cores/RetroPlaye
xbmc/cores/RetroPlayer/process cores/RetroPlayer/process
xbmc/cores/RetroPlayer/rendering cores/RetroPlayer/rendering
xbmc/cores/RetroPlayer/rendering/VideoRenderers cores/RetroPlayer/rendering/VideoRenderers
xbmc/cores/RetroPlayer/rendering/VideoShaders cores/RetroPlayer/rendering/VideoShaders
xbmc/cores/RetroPlayer/savestates cores/RetroPlayer/savestates
xbmc/cores/RetroPlayer/shaders cores/RetroPlayer/shaders
xbmc/cores/RetroPlayer/streams cores/RetroPlayer/streams
xbmc/cores/RetroPlayer/streams/memory cores/RetroPlayer/streams/memory
2 changes: 1 addition & 1 deletion cmake/treedata/windows/subdirs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ xbmc/rendering/dx rendering/dx
xbmc/threads/platform/win threads/win
xbmc/windowing/windows windowing/windows
xbmc/cores/RetroPlayer/process/windows cores/RetroPlayer/process/windows
xbmc/cores/RetroPlayer/rendering/VideoShaders/windows cores/RetroPlayer/rendering/VideoShaders/windows
xbmc/cores/RetroPlayer/shaders/windows cores/RetroPlayer/shaders/windows
xbmc/cores/VideoPlayer/Process/windows cores/VideoPlayer/Process/windows
10 changes: 10 additions & 0 deletions project/Win32BuildSetup/genNsisIncludes.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ IF EXIST BUILD_WIN32\addons\game.libretro.* (
SET /A Counter = !Counter! + 1
)
)
FOR /F "tokens=*" %%P IN ('dir /B /AD BUILD_WIN32\addons\game.shader.*') DO (
FOR /f "delims=<" %%N in ('powershell.exe -ExecutionPolicy Unrestricted -command "& {[xml]$a = get-content BUILD_WIN32\addons\%%P\addon.xml;$a.addon.name}"') do (
ECHO Section "%%N" SecGameAddons!Counter! >> game-addons.nsi
ECHO SectionIn 1 2 >> game-addons.nsi
ECHO SetOutPath "$INSTDIR\addons\%%P" >> game-addons.nsi
ECHO File /r "${app_root}\addons\%%P\*.*" >> game-addons.nsi
ECHO SectionEnd >> game-addons.nsi
SET /A Counter = !Counter! + 1
)
)
ECHO SectionGroupEnd >> game-addons.nsi
)

Expand Down
2 changes: 2 additions & 0 deletions system/addon-manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<addon>audioencoder.kodi.builtin.wma</addon>
<addon>game.controller.default</addon>
<addon>game.controller.snes</addon>
<addon optional="true">game.shader.presets</addon>
<addon>kodi.binary.global.audioengine</addon>
<addon>kodi.binary.global.main</addon>
<addon>kodi.binary.global.general</addon>
Expand All @@ -17,6 +18,7 @@
<addon>kodi.binary.instance.peripheral</addon>
<addon>kodi.binary.instance.pvr</addon>
<addon>kodi.binary.instance.screensaver</addon>
<addon>kodi.binary.instance.shaderpreset</addon>
<addon>kodi.binary.instance.vfs</addon>
<addon>kodi.binary.instance.videocodec</addon>
<addon>kodi.binary.instance.visualization</addon>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
shaders = "4"

shader0 = "../../ntsc/shaders/ntsc-pass1-composite-3phase.cg"
filter_linear0 = "false"
frame_count_mod0 = "2"
float_framebuffer0 = "true"
scale_type_x0 = "absolute"
scale_x0 = "1024"
scale_type_y0 = "source"
scale_y0 = "1.000000"

shader1 = "../../ntsc/shaders/ntsc-pass2-3phase.cg"
filter_linear1 = "false"
float_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "0.500000"
scale_type_y1 = "source"
scale_y1 = "1.000000"

shader2 = "../../crt/shaders/tvout-tweaks.cg"
filter_linear2 = "false"
float_framebuffer2 = "false"
scale_type_x2 = "viewport"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"

shader3 = "../../misc/image-adjustment.cg"
float_framebuffer3 = "false"

parameters = "TVOUT_RESOLUTION;TVOUT_COMPOSITE_CONNECTION;TVOUT_TV_COLOR_LEVELS;target_gamma;monitor_gamma;overscan_percent_x;overscan_percent_y;saturation;contrast;luminance;bright_boost;R;G;B"
TVOUT_RESOLUTION = "512.000000"
TVOUT_COMPOSITE_CONNECTION = "0.000000"
TVOUT_TV_COLOR_LEVELS = "1.000000"
target_gamma = "2.400000"
monitor_gamma = "2.200000"
overscan_percent_x = "0.000000"
overscan_percent_y = "0.000000"
saturation = "1.000000"
contrast = "1.000000"
luminance = "1.000000"
bright_boost = "0.000000"
R = "1.000000"
G = "1.000000"
B = "1.000000"
45 changes: 45 additions & 0 deletions system/shaders/presets/HLSL/cgp/tvout/tvout+ntsc-320px-svideo.cgp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
shaders = "4"

shader0 = "../../ntsc/shaders/ntsc-pass1-svideo-2phase.cg"
filter_linear0 = "false"
frame_count_mod0 = "2"
float_framebuffer0 = "true"
scale_type_x0 = "absolute"
scale_x0 = "1920"
scale_type_y0 = "source"
scale_y0 = "1.000000"

shader1 = "../../ntsc/shaders/ntsc-pass2-2phase.cg"
filter_linear1 = "false"
float_framebuffer1 = "false"
scale_type_x1 = "source"
scale_x1 = "0.500000"
scale_type_y1 = "source"
scale_y1 = "1.000000"

shader2 = "../../crt/shaders/tvout-tweaks.cg"
filter_linear2 = "false"
float_framebuffer2 = "false"
scale_type_x2 = "viewport"
scale_x2 = "1.000000"
scale_type_y2 = "source"
scale_y2 = "1.000000"

shader3 = "../../misc/image-adjustment.cg"
float_framebuffer3 = "false"

parameters = "TVOUT_RESOLUTION;TVOUT_COMPOSITE_CONNECTION;TVOUT_TV_COLOR_LEVELS;target_gamma;monitor_gamma;overscan_percent_x;overscan_percent_y;saturation;contrast;luminance;bright_boost;R;G;B"
TVOUT_RESOLUTION = "512.000000"
TVOUT_COMPOSITE_CONNECTION = "0.000000"
TVOUT_TV_COLOR_LEVELS = "1.000000"
target_gamma = "2.400000"
monitor_gamma = "2.200000"
overscan_percent_x = "0.000000"
overscan_percent_y = "0.000000"
saturation = "1.000000"
contrast = "1.000000"
luminance = "1.000000"
bright_boost = "0.000000"
R = "1.000000"
G = "1.000000"
B = "1.000000"
5 changes: 5 additions & 0 deletions system/shaders/presets/HLSL/compat_includes.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "include/compat_input_struct.inc"
#include "include/compat_macros.inc"
#include "include/compat_orig_struct.inc"
#include "include/compat_prev_struct.inc"
#include "include/compat_vertex_in_out.inc"
11 changes: 11 additions & 0 deletions system/shaders/presets/HLSL/crt/4xbr-hybrid-crt-b.cgp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
shaders = 2

shader0 = shaders/4xbr-hybrid-crt-b.cg
filter_linear0 = false
scale_type0 = source
scale_x0 = 4.0
scale_y0 = 4.0

shader1 = ../stock.cg
filter_linear1 = true
scale_type_1 = source
5 changes: 5 additions & 0 deletions system/shaders/presets/HLSL/crt/crt-geom.cgp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
shaders = 1

shader0 = shaders/crt-geom.cg
filter_linear0 = false
scale_type_0 = source
Loading