├── .github └── workflows │ ├── build.yml │ └── sync-addon-metadata-translations.yml ├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── FindJsonCpp.cmake ├── FindOpenGLES.cmake ├── FindOpenGl.cmake ├── Findglm.cmake ├── Jenkinsfile ├── LICENSE.md ├── README.md ├── appveyor.yml ├── azure-pipelines.yml ├── debian ├── changelog.in ├── compat ├── control ├── copyright ├── kodi-visualization-shadertoy.install ├── rules └── source │ └── format ├── depends ├── common │ ├── glm │ │ ├── flags.txt │ │ ├── glm.sha256 │ │ └── glm.txt │ └── jsoncpp │ │ ├── flags.txt │ │ ├── jsoncpp.sha256 │ │ └── jsoncpp.txt ├── osx │ └── glm │ │ ├── flags-arm64.txt │ │ ├── flags-x86_64.txt │ │ ├── flags.txt │ │ ├── glm.sha256 │ │ └── glm.txt └── windows │ └── angle │ ├── 0001-fix-uwp.patch │ ├── CMakeLists.txt │ ├── angle.sha256 │ ├── angle.txt │ └── flags.txt ├── lib ├── kissfft │ ├── CMakeLists.txt │ ├── COPYING │ ├── LICENSES │ │ ├── BSD-3-Clause │ │ └── Unlicense │ ├── _kiss_fft_guts.h │ ├── kiss_fft.c │ ├── kiss_fft.h │ └── kiss_fft_log.h └── kodi-kissfft-note.txt ├── src ├── PresetsLoader.cpp ├── PresetsLoader.h ├── lodepng.cpp ├── lodepng.h ├── main.cpp └── main.h └── visualization.shadertoy ├── addon.xml.in ├── changelog.txt ├── help-view.py └── resources ├── fanart.jpg ├── icon.png ├── language ├── resource.language.af_za │ └── strings.po ├── resource.language.am_et │ └── strings.po ├── resource.language.ar_sa │ └── strings.po ├── resource.language.az_az │ └── strings.po ├── resource.language.be_by │ └── strings.po ├── resource.language.bg_bg │ └── strings.po ├── resource.language.bs_ba │ └── strings.po ├── resource.language.ca_es │ └── strings.po ├── resource.language.cs_cz │ └── strings.po ├── resource.language.cy_gb │ └── strings.po ├── resource.language.da_dk │ └── strings.po ├── resource.language.de_de │ └── strings.po ├── resource.language.el_gr │ └── strings.po ├── resource.language.en_au │ └── strings.po ├── resource.language.en_gb │ └── strings.po ├── resource.language.en_nz │ └── strings.po ├── resource.language.en_us │ └── strings.po ├── resource.language.eo │ └── strings.po ├── resource.language.es_ar │ └── strings.po ├── resource.language.es_es │ └── strings.po ├── resource.language.es_mx │ └── strings.po ├── resource.language.et_ee │ └── strings.po ├── resource.language.eu_es │ └── strings.po ├── resource.language.fa_af │ └── strings.po ├── resource.language.fa_ir │ └── strings.po ├── resource.language.fi_fi │ └── strings.po ├── resource.language.fo_fo │ └── strings.po ├── resource.language.fr_ca │ └── strings.po ├── resource.language.fr_fr │ └── strings.po ├── resource.language.gl_es │ └── strings.po ├── resource.language.he_il │ └── strings.po ├── resource.language.hi_in │ └── strings.po ├── resource.language.hr_hr │ └── strings.po ├── resource.language.hu_hu │ └── strings.po ├── resource.language.id_id │ └── strings.po ├── resource.language.is_is │ └── strings.po ├── resource.language.it_it │ └── strings.po ├── resource.language.ja_jp │ └── strings.po ├── resource.language.ko_kr │ └── strings.po ├── resource.language.lt_lt │ └── strings.po ├── resource.language.lv_lv │ └── strings.po ├── resource.language.mi │ └── strings.po ├── resource.language.mk_mk │ └── strings.po ├── resource.language.ms_my │ └── strings.po ├── resource.language.mt_mt │ └── strings.po ├── resource.language.my_mm │ └── strings.po ├── resource.language.nb_no │ └── strings.po ├── resource.language.nl_nl │ └── strings.po ├── resource.language.pl_pl │ └── strings.po ├── resource.language.pt_br │ └── strings.po ├── resource.language.pt_pt │ └── strings.po ├── resource.language.ro_ro │ └── strings.po ├── resource.language.ru_ru │ └── strings.po ├── resource.language.sk_sk │ └── strings.po ├── resource.language.sl_si │ └── strings.po ├── resource.language.sq_al │ └── strings.po ├── resource.language.sr_rs │ └── strings.po ├── resource.language.sr_rs@latin │ └── strings.po ├── resource.language.sv_se │ └── strings.po ├── resource.language.ta_in │ └── strings.po ├── resource.language.tg_tj │ └── strings.po ├── resource.language.th_th │ └── strings.po ├── resource.language.tr_tr │ └── strings.po ├── resource.language.uk_ua │ └── strings.po ├── resource.language.uz_uz │ └── strings.po ├── resource.language.vi_vn │ └── strings.po ├── resource.language.zh_cn │ └── strings.po └── resource.language.zh_tw │ └── strings.po ├── presets.json ├── presets.json.md ├── screenshot-01.jpg ├── screenshot-02.jpg ├── screenshot-03.jpg ├── screenshot-04.jpg ├── screenshot-05.jpg ├── screenshot-06.jpg ├── settings.xml ├── shaders ├── 2Dspectrum.frag.glsl ├── audioeclipse.frag.glsl ├── audioreaktive.frag.glsl ├── audiovisual.frag.glsl ├── beatingcircles.frag.glsl ├── bpm.frag.glsl ├── circlewave.frag.glsl ├── circuits.frag.glsl ├── coloredbars.frag.glsl ├── cubescape.frag.glsl ├── dancingmetalights.frag.glsl ├── discotunnel.frag.glsl ├── electricpulse.frag.glsl ├── fractalland.frag.glsl ├── gameboy.frag.glsl ├── input.frag.glsl ├── io.frag.glsl ├── kaleidoscopevisualizer.frag.glsl ├── ledspectrum.frag.glsl ├── main_display_GL.frag.glsl ├── main_display_GL.vert.glsl ├── main_display_GLES.frag.glsl ├── main_display_GLES.vert.glsl ├── main_shadertoy_GL.vert.glsl ├── main_shadertoy_GLES.vert.glsl ├── main_test.frag.glsl ├── nyancat.frag.glsl ├── polarbeats.frag.glsl ├── revision2015.frag.glsl ├── ribbons.frag.glsl ├── simplicitygalaxy.frag.glsl ├── soundflower.frag.glsl ├── soundsinuswave.frag.glsl ├── spectrometer.frag.glsl ├── symmetricalsound.frag.glsl ├── twistedrings.frag.glsl ├── undulantspectre.frag.glsl ├── visualizer.frag.glsl ├── volumetriclines.frag.glsl └── wavesremix.frag.glsl ├── tex00.png ├── tex01.png ├── tex02.png ├── tex03.png ├── tex04.png ├── tex05.png ├── tex06.png ├── tex07.png ├── tex08.png ├── tex09.png ├── tex10.png ├── tex11.png ├── tex12.png ├── tex14.png ├── tex15.png └── tex16.png /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build and run tests 2 | on: [push, pull_request] 3 | env: 4 | app_id: visualization.shadertoy 5 | 6 | jobs: 7 | build: 8 | runs-on: ${{ matrix.os }} 9 | strategy: 10 | fail-fast: false 11 | matrix: 12 | include: 13 | - name: "Debian package test" 14 | os: ubuntu-latest 15 | CC: gcc 16 | CXX: g++ 17 | DEBIAN_BUILD: true 18 | steps: 19 | - name: Install needed ubuntu depends 20 | env: 21 | DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }} 22 | run: | 23 | if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi 24 | if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get update; fi 25 | if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi 26 | - name: Checkout Kodi repo 27 | uses: actions/checkout@v4 28 | with: 29 | repository: xbmc/xbmc 30 | ref: master 31 | path: xbmc 32 | - name: Checkout add-on repo 33 | uses: actions/checkout@v4 34 | with: 35 | path: ${{ env.app_id }} 36 | - name: Configure 37 | env: 38 | CC: ${{ matrix.CC }} 39 | CXX: ${{ matrix.CXX }} 40 | DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }} 41 | run: | 42 | if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir -p build && cd build; fi 43 | if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=${{ github.workspace }} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/xbmc/addons -DPACKAGE_ZIP=1 ${{ github.workspace }}/xbmc/cmake/addons; fi 44 | if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi 45 | if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep ${{ github.workspace }}/${app_id}; fi 46 | - name: Build 47 | env: 48 | CC: ${{ matrix.CC }} 49 | CXX: ${{ matrix.CXX }} 50 | DEBIAN_BUILD: ${{ matrix.DEBIAN_BUILD }} 51 | run: | 52 | if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id}/build; fi 53 | if [[ $DEBIAN_BUILD != true ]]; then make; fi 54 | if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh ${{ github.workspace }}/${app_id}; fi 55 | -------------------------------------------------------------------------------- /.github/workflows/sync-addon-metadata-translations.yml: -------------------------------------------------------------------------------- 1 | name: Sync addon metadata translations 2 | 3 | on: 4 | push: 5 | branches: [ Matrix, Nexus, Omega, Piers ] 6 | paths: 7 | - '**addon.xml.in' 8 | - '**resource.language.**strings.po' 9 | 10 | jobs: 11 | default: 12 | if: github.repository == 'xbmc/visualization.shadertoy' 13 | runs-on: ubuntu-latest 14 | 15 | strategy: 16 | 17 | fail-fast: false 18 | matrix: 19 | python-version: [ 3.9 ] 20 | 21 | steps: 22 | 23 | - name: Checkout repository 24 | uses: actions/checkout@v4 25 | with: 26 | path: project 27 | 28 | - name: Checkout sync_addon_metadata_translations repository 29 | uses: actions/checkout@v4 30 | with: 31 | repository: xbmc/sync_addon_metadata_translations 32 | path: sync_addon_metadata_translations 33 | 34 | - name: Set up Python ${{ matrix.python-version }} 35 | uses: actions/setup-python@v5 36 | with: 37 | python-version: ${{ matrix.python-version }} 38 | 39 | - name: Install dependencies 40 | run: | 41 | python -m pip install --upgrade pip 42 | python -m pip install sync_addon_metadata_translations/ 43 | 44 | - name: Run sync-addon-metadata-translations 45 | run: | 46 | sync-addon-metadata-translations 47 | working-directory: ./project 48 | 49 | - name: Create PR for sync-addon-metadata-translations changes 50 | uses: peter-evans/create-pull-request@v3.10.0 51 | with: 52 | commit-message: Sync of addon metadata translations 53 | title: Sync of addon metadata translations 54 | body: Sync of addon metadata translations triggered by ${{ github.sha }} 55 | branch: amt-sync 56 | delete-branch: true 57 | path: ./project 58 | reviewers: gade01 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | build/ 3 | visualization.*/addon.xml 4 | 5 | # Debian build files 6 | debian/changelog 7 | debian/files 8 | debian/*.log 9 | debian/*.substvars 10 | debian/.debhelper/ 11 | debian/tmp/ 12 | debian/kodi-visualization-*/ 13 | obj-x86_64-linux-gnu/ 14 | 15 | # commonly used editors 16 | # vim 17 | *.swp 18 | 19 | # Eclipse 20 | *.project 21 | *.cproject 22 | .classpath 23 | *.sublime-* 24 | .settings/ 25 | 26 | # KDevelop 4 27 | *.kdev4 28 | 29 | # gedit 30 | *~ 31 | 32 | # CLion 33 | /.idea 34 | 35 | # clion 36 | .idea/ 37 | 38 | # to prevent add after a "git format-patch VALUE" and "git add ." call 39 | /*.patch 40 | 41 | # Visual Studio Code 42 | .vscode 43 | 44 | # to prevent add if project code opened by Visual Studio over CMake file 45 | .vs/ 46 | 47 | # General MacOS 48 | .DS_Store 49 | .AppleDouble 50 | .LSOverride 51 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | env: 4 | global: 5 | - app_id=visualization.shadertoy 6 | 7 | # 8 | # Define the build matrix 9 | # 10 | matrix: 11 | include: 12 | - os: linux 13 | dist: xenial 14 | sudo: required 15 | compiler: gcc 16 | - os: linux 17 | dist: xenial 18 | sudo: required 19 | compiler: clang 20 | - os: linux 21 | dist: bionic 22 | sudo: required 23 | compiler: gcc 24 | env: DEBIAN_BUILD=true 25 | - os: linux 26 | dist: focal 27 | sudo: required 28 | compiler: gcc 29 | env: DEBIAN_BUILD=true 30 | - os: osx 31 | osx_image: xcode10.2 32 | 33 | before_install: 34 | - if [[ $DEBIAN_BUILD == true ]]; then sudo add-apt-repository -y ppa:team-xbmc/xbmc-nightly; fi 35 | - if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get install fakeroot; fi 36 | - if [[ $DEBIAN_BUILD != true ]] && [[ $TRAVIS_OS_NAME == linux ]]; then sudo apt-get install -y libgl1-mesa-dev; fi 37 | 38 | # 39 | # The addon source is automatically checked out in $TRAVIS_BUILD_DIR, 40 | # we'll put the Kodi source on the same level 41 | # 42 | before_script: 43 | - if [[ $DEBIAN_BUILD != true ]]; then cd $TRAVIS_BUILD_DIR/..; fi 44 | - if [[ $DEBIAN_BUILD != true ]]; then git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git; fi 45 | - if [[ $DEBIAN_BUILD != true ]]; then cd ${app_id} && mkdir build && cd build; fi 46 | - if [[ $DEBIAN_BUILD != true ]]; then mkdir -p definition/${app_id}; fi 47 | - if [[ $DEBIAN_BUILD != true ]]; then echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt; fi 48 | - if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons; fi 49 | - if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi 50 | - if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep $TRAVIS_BUILD_DIR; fi 51 | 52 | script: 53 | - if [[ $DEBIAN_BUILD != true ]]; then make; fi 54 | - if [[ $DEBIAN_BUILD == true ]]; then ./debian-addon-package-test.sh $TRAVIS_BUILD_DIR; fi 55 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | project(visualization.shadertoy) 3 | 4 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}) 5 | 6 | find_package(Kodi REQUIRED) 7 | find_package(glm REQUIRED) 8 | find_package(JsonCpp REQUIRED) 9 | 10 | add_subdirectory(lib/kissfft) 11 | 12 | if(NOT WIN32 AND (APP_RENDER_SYSTEM STREQUAL "gl" OR NOT APP_RENDER_SYSTEM)) 13 | find_package(OpenGl REQUIRED) 14 | set(DEPLIBS ${OPENGL_LIBRARIES}) 15 | set(includes ${OPENGL_INCLUDE_DIR}) 16 | add_definitions(${OPENGL_DEFINITIONS}) 17 | else() 18 | find_package(OpenGLES REQUIRED) 19 | set(DEPLIBS ${OPENGLES_LIBRARIES}) 20 | set(includes ${OPENGLES_INCLUDE_DIR}) 21 | add_definitions(${OPENGLES_DEFINITIONS}) 22 | endif() 23 | 24 | include_directories(${GLM_INCLUDE_DIR} 25 | ${JSONCPP_INCLUDE_DIRS} 26 | ${KODI_INCLUDE_DIR}/.. # Hack way with "/..", need bigger Kodi cmake rework to match right include ways 27 | ${PROJECT_SOURCE_DIR}/lib) 28 | 29 | list(APPEND DEPLIBS ${JSONCPP_LIBRARIES}) 30 | 31 | if(CORE_SYSTEM_NAME STREQUAL osx OR 32 | CORE_SYSTEM_NAME STREQUAL ios OR 33 | CORE_SYSTEM_NAME STREQUAL darwin_embedded) 34 | list(APPEND DEPLIBS "-framework CoreVideo") 35 | endif() 36 | 37 | set(SHADERTOY_SOURCES src/PresetsLoader.cpp 38 | src/lodepng.cpp 39 | src/main.cpp) 40 | 41 | set(SHADERTOY_HEADERS src/PresetsLoader.h 42 | src/lodepng.h 43 | src/main.h) 44 | 45 | list(APPEND DEPLIBS kissfft) 46 | 47 | build_addon(visualization.shadertoy SHADERTOY DEPLIBS) 48 | 49 | include(CPack) 50 | -------------------------------------------------------------------------------- /FindJsonCpp.cmake: -------------------------------------------------------------------------------- 1 | find_package(PkgConfig) 2 | if(PKG_CONFIG_FOUND) 3 | pkg_check_modules(PC_JSONCPP jsoncpp) 4 | endif() 5 | 6 | find_path(JSONCPP_INCLUDE_DIRS json/json.h 7 | PATHS ${PC_JSONCPP_INCLUDEDIR} 8 | PATH_SUFFIXES jsoncpp) 9 | find_library(JSONCPP_LIBRARIES jsoncpp 10 | PATHS ${PC_JSONCPP_LIBDIR}) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | find_package_handle_standard_args(JsonCpp REQUIRED_VARS JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS) 14 | 15 | mark_as_advanced(JSONCPP_INCLUDE_DIRS JSONCPP_LIBRARIES) 16 | -------------------------------------------------------------------------------- /FindOpenGLES.cmake: -------------------------------------------------------------------------------- 1 | #.rst: 2 | # FindOpenGLES 3 | # ------------ 4 | # Finds the OpenGLES2 and OpenGLES3 library 5 | # 6 | # This will define the following variables: 7 | # 8 | # OPENGLES_FOUND - system has OpenGLES 9 | # OPENGLES_INCLUDE_DIRS - the OpenGLES include directory 10 | # OPENGLES_LIBRARIES - the OpenGLES libraries 11 | # OPENGLES_DEFINITIONS - the OpenGLES definitions 12 | # 13 | # Note: 14 | # On Windows with angle the *_INCLUDE_DIRS and 15 | # *_DEFINITIONS are undefined, but are set 16 | # global by the kodi-angle package. 17 | 18 | if(WIN32) 19 | # defined here and not on addon to have it free of OS related 'if' 20 | # and this file as standard for addons where need it 21 | find_package(kodi-angle REQUIRED) 22 | set(OPENGLES_LIBRARIES kodi::angle::libGLESv2 kodi::angle::libEGL) 23 | set(OPENGLES_FOUND ${kodi-angle_FOUND}) 24 | set(OPENGLES_DEFINITIONS -DHAS_GLES=3) 25 | else() 26 | if(CORE_PLATFORM_NAME_LC STREQUAL rbpi) 27 | set(_brcmprefix brcm) 28 | endif() 29 | 30 | if(PKG_CONFIG_FOUND) 31 | pkg_check_modules(PC_OPENGLES ${_brcmprefix}glesv2 QUIET) 32 | endif() 33 | 34 | if(NOT CORE_SYSTEM_NAME STREQUAL ios AND 35 | NOT CORE_SYSTEM_NAME STREQUAL darwin_embedded) 36 | find_path(OPENGLES_INCLUDE_DIR GLES2/gl2.h 37 | PATHS ${PC_OPENGLES_INCLUDEDIR}) 38 | find_library(OPENGLES_gl_LIBRARY NAMES ${_brcmprefix}GLESv2 39 | PATHS ${PC_OPENGLES_LIBDIR}) 40 | else() 41 | find_library(OPENGLES_gl_LIBRARY NAMES OpenGLES 42 | PATHS ${CMAKE_OSX_SYSROOT}/System/Library 43 | PATH_SUFFIXES Frameworks 44 | NO_DEFAULT_PATH) 45 | set(OPENGLES_INCLUDE_DIR ${OPENGLES_gl_LIBRARY}/Headers) 46 | endif() 47 | 48 | find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h) 49 | 50 | include(FindPackageHandleStandardArgs) 51 | find_package_handle_standard_args(OpenGLES 52 | REQUIRED_VARS OPENGLES_gl_LIBRARY OPENGLES_INCLUDE_DIR) 53 | 54 | find_path(OPENGLES3_INCLUDE_DIR GLES3/gl3.h 55 | PATHS ${PC_OPENGLES_INCLUDEDIR}) 56 | 57 | if(OPENGLES_FOUND) 58 | set(OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY}) 59 | if(OPENGLES3_INCLUDE_DIR) 60 | set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR} ${OPENGLES3_INCLUDE_DIR}) 61 | set(OPENGLES_DEFINITIONS -DHAS_GLES=3) 62 | mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES3_INCLUDE_DIR OPENGLES_gl_LIBRARY) 63 | else() 64 | set(OPENGLES_INCLUDE_DIRS ${OPENGLES_INCLUDE_DIR}) 65 | set(OPENGLES_DEFINITIONS -DHAS_GLES=2) 66 | mark_as_advanced(OPENGLES_INCLUDE_DIR OPENGLES_gl_LIBRARY) 67 | endif() 68 | endif() 69 | endif() 70 | -------------------------------------------------------------------------------- /FindOpenGl.cmake: -------------------------------------------------------------------------------- 1 | #.rst: 2 | # FindOpenGl 3 | # ---------- 4 | # Finds the FindOpenGl library 5 | # 6 | # This will define the following variables:: 7 | # 8 | # OPENGL_FOUND - system has OpenGl 9 | # OPENGL_INCLUDE_DIRS - the OpenGl include directory 10 | # OPENGL_LIBRARIES - the OpenGl libraries 11 | # OPENGL_DEFINITIONS - the OpenGl definitions 12 | 13 | if(PKG_CONFIG_FOUND) 14 | pkg_check_modules(PC_OPENGL gl QUIET) 15 | endif() 16 | 17 | if(NOT CORE_SYSTEM_NAME STREQUAL osx) 18 | find_path(OPENGL_INCLUDE_DIR GL/gl.h 19 | PATHS ${PC_OPENGL_gl_INCLUDEDIR}) 20 | find_library(OPENGL_gl_LIBRARY NAMES GL OpenGL 21 | PATHS ${PC_OPENGL_gl_LIBDIR}) 22 | else() 23 | find_library(OPENGL_gl_LIBRARY NAMES OpenGL 24 | PATHS ${CMAKE_OSX_SYSROOT}/System/Library 25 | PATH_SUFFIXES Frameworks 26 | NO_DEFAULT_PATH) 27 | set(OPENGL_INCLUDE_DIR ${OPENGL_gl_LIBRARY}/Headers) 28 | endif() 29 | 30 | include(FindPackageHandleStandardArgs) 31 | find_package_handle_standard_args(OpenGl 32 | REQUIRED_VARS OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR) 33 | 34 | if(OPENGL_FOUND) 35 | set(OPENGL_INCLUDE_DIRS ${OPENGL_INCLUDE_DIR}) 36 | set(OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY}) 37 | set(OPENGL_DEFINITIONS -DHAS_GL=1) 38 | endif() 39 | 40 | mark_as_advanced(OPENGL_INCLUDE_DIR OPENGL_gl_LIBRARY) 41 | 42 | -------------------------------------------------------------------------------- /Findglm.cmake: -------------------------------------------------------------------------------- 1 | #.rst: 2 | # Findglm 3 | # ------------ 4 | # Finds the OpenGL Mathematics (GLM) as a header only C++ mathematics library. 5 | # 6 | # This will define the following variables: 7 | # 8 | # GLM_FOUND - system has OpenGLES 9 | # GLM_INCLUDE_DIR - the OpenGLES include directory 10 | # 11 | # Note: Install was removed from GLM on version 0.9.9.6. 12 | 13 | find_package(PkgConfig) 14 | if(PKG_CONFIG_FOUND) 15 | pkg_check_modules(PC_GLM glm QUIET) 16 | endif() 17 | 18 | find_path(GLM_INCLUDE_DIR glm.hpp 19 | PATHS ${PC_GLM_INCLUDEDIR} 20 | PATH_SUFFIXES glm) 21 | 22 | include(FindPackageHandleStandardArgs) 23 | find_package_handle_standard_args(glm REQUIRED_VARS GLM_INCLUDE_DIR) 24 | 25 | mark_as_advanced(GLM_INCLUDE_DIR) 26 | -------------------------------------------------------------------------------- /Jenkinsfile: -------------------------------------------------------------------------------- 1 | buildPlugin(version: "Piers") 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # visualization.shadertoy addon for Kodi 2 | 3 | This is a [Kodi](https://kodi.tv) visualization addon. 4 | 5 | [![License: GPL-2.0-or-later](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](LICENSE.md) 6 | [![Build Status](https://dev.azure.com/teamkodi/binary-addons/_apis/build/status/xbmc.visualization.shadertoy?branchName=Nexus)](https://dev.azure.com/teamkodi/binary-addons/_build/latest?definitionId=34&branchName=Nexus) 7 | [![Build Status](https://jenkins.kodi.tv/view/Addons/job/xbmc/job/visualization.shadertoy/job/Nexus/badge/icon)](https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Fvisualization.shadertoy/branches/) 8 | 9 | 10 | ![screenshot](https://raw.githubusercontent.com/xbmc/visualization.shadertoy/Nexus/visualization.shadertoy/resources/screenshot-01.jpg) 11 | 12 | ## Build instructions 13 | 14 | When building the addon you have to use the correct branch depending on which version of Kodi you're building against. 15 | If you want to build the addon to be compatible with the latest kodi `master` commit, you need to checkout the branch with the current kodi codename. 16 | Also make sure you follow this README from the branch in question. 17 | 18 | If you want to use your own shaders, see [instructions for creating your own preset list](visualization.shadertoy/resources/presets.json.md). 19 | 20 | ### Linux 21 | 22 | The following instructions assume you will have built Kodi already in the `kodi-build` directory 23 | suggested by the README. 24 | 25 | 1. `git clone --branch master https://github.com/xbmc/xbmc.git` 26 | 2. `git clone --branch Nexus https://github.com/xbmc/visualization.shadertoy.git` 27 | 3. `cd visualization.shadertoy && mkdir build && cd build` 28 | 4. `cmake -DADDONS_TO_BUILD=visualization.shadertoy -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/kodi-build/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons` 29 | 5. `make` 30 | 31 | The addon files will be placed in `../../xbmc/kodi-build/addons` so if you build Kodi from source and run it directly 32 | the addon will be available as a system addon. 33 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: BuildNr.{build} 2 | 3 | image: Visual Studio 2017 4 | 5 | shallow_clone: true 6 | 7 | clone_folder: c:\projects\visualization.shadertoy 8 | 9 | environment: 10 | app_id: visualization.shadertoy 11 | 12 | matrix: 13 | - GENERATOR: "Visual Studio 15" 14 | CONFIG: Release 15 | CMAKE_DEFINES: -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 16 | - GENERATOR: "Visual Studio 15 Win64" 17 | CONFIG: Release 18 | CMAKE_DEFINES: -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 19 | - GENERATOR: "Visual Studio 15 Win64" 20 | CONFIG: Release 21 | CMAKE_DEFINES: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 22 | - GENERATOR: "Visual Studio 15 ARM" 23 | CONFIG: Release 24 | CMAKE_DEFINES: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 25 | 26 | build_script: 27 | - cd .. 28 | - git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git 29 | - cd %app_id% 30 | - mkdir build 31 | - cd build 32 | - mkdir -p definition\%app_id% 33 | - echo %app_id% %APPVEYOR_BUILD_FOLDER% %APPVEYOR_REPO_COMMIT% > definition\%app_id%\%app_id%.txt 34 | - cmake -T host=x64 -G "%GENERATOR%" %CMAKE_DEFINES% -DADDONS_TO_BUILD=%app_id% -DCMAKE_BUILD_TYPE=%CONFIG% -DADDONS_DEFINITION_DIR=%APPVEYOR_BUILD_FOLDER%/build/definition -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons 35 | - cmake --build . --config %CONFIG% --target %app_id% 36 | -------------------------------------------------------------------------------- /azure-pipelines.yml: -------------------------------------------------------------------------------- 1 | variables: 2 | app_id: 'visualization.shadertoy' 3 | 4 | trigger: 5 | branches: 6 | include: 7 | - Piers 8 | - Omega 9 | - releases/* 10 | paths: 11 | include: 12 | - '*' 13 | exclude: 14 | - 'debian/*' 15 | 16 | jobs: 17 | - job: Windows 18 | 19 | pool: 20 | vmImage: 'windows-2022' 21 | 22 | strategy: 23 | matrix: 24 | Win32: 25 | GENERATOR: "Visual Studio 17 2022" 26 | ARCHITECTURE: Win32 27 | CONFIGURATION: Release 28 | Win64: 29 | GENERATOR: "Visual Studio 17 2022" 30 | ARCHITECTURE: x64 31 | CONFIGURATION: Release 32 | Win32-UWP: 33 | GENERATOR: "Visual Studio 17 2022" 34 | ARCHITECTURE: Win32 35 | CONFIGURATION: Release 36 | WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 37 | Win64-UWP: 38 | GENERATOR: "Visual Studio 17 2022" 39 | ARCHITECTURE: x64 40 | CONFIGURATION: Release 41 | WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 42 | ARM32-UWP: 43 | GENERATOR: "Visual Studio 17 2022" 44 | ARCHITECTURE: ARM 45 | CONFIGURATION: Release 46 | WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 47 | #ARM64-UWP: 48 | # GENERATOR: "Visual Studio 17 2022" 49 | # ARCHITECTURE: ARM64 50 | # CONFIGURATION: Release 51 | # WINSTORE: -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0.17763.0" 52 | 53 | workspace: 54 | clean: all 55 | 56 | steps: 57 | 58 | - script: | 59 | cd .. 60 | git clone --branch master --depth=1 https://github.com/xbmc/xbmc.git kodi 61 | cd $(Build.SourcesDirectory) 62 | mkdir build 63 | cd build 64 | mkdir "definition/$(app_id)" 65 | echo $(app_id) . . > definition/$(app_id)/$(app_id).txt 66 | mklink /J "$(Pipeline.Workspace)/$(app_id)" "$(Build.SourcesDirectory)" 67 | 68 | - task: CMake@1 69 | inputs: 70 | workingDirectory: 'build' 71 | cmakeArgs: '-T host=x64 -G "$(GENERATOR)" -A $(ARCHITECTURE) $(WINSTORE) -DADDONS_TO_BUILD=$(app_id) -DCMAKE_BUILD_TYPE=$(CONFIGURATION) -DADDONS_DEFINITION_DIR=$(Pipeline.Workspace)/$(app_id)/build/definition -DADDON_SRC_PREFIX=../.. -DCMAKE_INSTALL_PREFIX=../../kodi/addons -DPACKAGE_ZIP=1 ../../kodi/cmake/addons' 72 | 73 | - task: CMake@1 74 | inputs: 75 | workingDirectory: 'build' 76 | cmakeArgs: '--build . --config $(CONFIGURATION) --target $(app_id)' 77 | -------------------------------------------------------------------------------- /debian/changelog.in: -------------------------------------------------------------------------------- 1 | kodi-visualization-shadertoy (#PACKAGEVERSION#-#TAGREV#~#DIST#) #DIST#; urgency=low 2 | 3 | [ xbmc ] 4 | * autogenerated dummy changelog 5 | 6 | -- nobody Sat, 23 May 2015 08:24:22 +0100 7 | 8 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: kodi-visualization-shadertoy 2 | Priority: extra 3 | Maintainer: Nobody 4 | Build-Depends: debhelper (>= 9.0.0), cmake, kodi-addon-dev, libglm-dev, 5 | libgles2-mesa-dev [arm64 armhf], libgl1-mesa-dev [i386 amd64], 6 | libjsoncpp-dev 7 | Standards-Version: 4.1.2 8 | Section: libs 9 | Homepage: https://kodi.tv 10 | 11 | Package: kodi-visualization-shadertoy 12 | Section: libs 13 | Architecture: any 14 | Depends: ${shlibs:Depends}, ${misc:Depends} 15 | Description: Shadertoy visualization for Kodi 16 | Shadertoy visualization for Kodi 17 | 18 | Package: kodi-visualization-shadertoy-dbg 19 | Section: debug 20 | Architecture: any 21 | Depends: ${shlibs:Depends}, ${misc:Depends} 22 | Description: debug symbols for Shadertoy visualization for Kodi 23 | debug symbols for Shadertoy visualization for Kodi 24 | 25 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://dep.debian.net/deps/dep5 2 | Upstream-Name: visualization.shadertoy 3 | 4 | Files: * 5 | Copyright: 2015-2021 Team Kodi 6 | License: GPL-2+ 7 | This package is free software; you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation; either version 2 of the License, or 10 | (at your option) any later version. 11 | . 12 | This package is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | . 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see 19 | . 20 | On Debian systems, the complete text of the GNU General 21 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". 22 | 23 | 24 | Files: debian/* 25 | Copyright: 2013 wsnipex 26 | License: GPL-2+ 27 | This package is free software; you can redistribute it and/or modify 28 | it under the terms of the GNU General Public License as published by 29 | the Free Software Foundation; either version 2 of the License, or 30 | (at your option) any later version. 31 | . 32 | This package is distributed in the hope that it will be useful, 33 | but WITHOUT ANY WARRANTY; without even the implied warranty of 34 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 35 | GNU General Public License for more details. 36 | . 37 | You should have received a copy of the GNU General Public License 38 | along with this program. If not, see 39 | . 40 | On Debian systems, the complete text of the GNU General 41 | Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". 42 | 43 | -------------------------------------------------------------------------------- /debian/kodi-visualization-shadertoy.install: -------------------------------------------------------------------------------- 1 | usr/lib/* 2 | usr/share/* 3 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | 15 | override_dh_auto_configure: 16 | dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=1 -DUSE_LTO=1 17 | 18 | override_dh_installdocs: 19 | dh_installdocs --link-doc=kodi-visualization-shadertoy 20 | 21 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /depends/common/glm/flags.txt: -------------------------------------------------------------------------------- 1 | -DGLM_TEST_ENABLE_CXX_11=1 -DGLM_TEST_ENABLE=0 -DGLM_TEST_ENABLE_SIMD_SSE2=0 -DCMAKE_INSTALL_LIBDIR=lib 2 | -------------------------------------------------------------------------------- /depends/common/glm/glm.sha256: -------------------------------------------------------------------------------- 1 | b7c6c746bfee6c3e346b13fc92764e1088c358fc5d18294f575806bdeb05a1d2 2 | -------------------------------------------------------------------------------- /depends/common/glm/glm.txt: -------------------------------------------------------------------------------- 1 | glm https://github.com/g-truc/glm/releases/download/0.9.9.4/glm-0.9.9.4.7z 2 | -------------------------------------------------------------------------------- /depends/common/jsoncpp/flags.txt: -------------------------------------------------------------------------------- 1 | -DJSONCPP_WITH_TESTS=0 -DJSONCPP_WITH_POST_BUILD_UNITTEST=0 -DBUILD_SHARED_LIBS=0 -DBUILD_OBJECT_LIBS=0 2 | -------------------------------------------------------------------------------- /depends/common/jsoncpp/jsoncpp.sha256: -------------------------------------------------------------------------------- 1 | e34a628a8142643b976c7233ef381457efad79468c67cb1ae0b83a33d7493999 2 | -------------------------------------------------------------------------------- /depends/common/jsoncpp/jsoncpp.txt: -------------------------------------------------------------------------------- 1 | jsoncpp https://github.com/open-source-parsers/jsoncpp/archive/refs/tags/1.9.4.tar.gz 2 | -------------------------------------------------------------------------------- /depends/osx/glm/flags-arm64.txt: -------------------------------------------------------------------------------- 1 | -DGLM_TEST_ENABLE_SIMD_SSE2=0 -------------------------------------------------------------------------------- /depends/osx/glm/flags-x86_64.txt: -------------------------------------------------------------------------------- 1 | -DGLM_TEST_ENABLE_SIMD_SSE2=1 -------------------------------------------------------------------------------- /depends/osx/glm/flags.txt: -------------------------------------------------------------------------------- 1 | -DGLM_TEST_ENABLE_CXX_11=1 -DGLM_TEST_ENABLE=0 -DCMAKE_INSTALL_LIBDIR=lib 2 | -------------------------------------------------------------------------------- /depends/osx/glm/glm.sha256: -------------------------------------------------------------------------------- 1 | b7c6c746bfee6c3e346b13fc92764e1088c358fc5d18294f575806bdeb05a1d2 2 | -------------------------------------------------------------------------------- /depends/osx/glm/glm.txt: -------------------------------------------------------------------------------- 1 | glm https://github.com/g-truc/glm/releases/download/0.9.9.4/glm-0.9.9.4.7z 2 | -------------------------------------------------------------------------------- /depends/windows/angle/angle.sha256: -------------------------------------------------------------------------------- 1 | 28836135bd7549c01d7d07ae5a0a0956096f2c63355cf243ef306b2213bd91ae 2 | -------------------------------------------------------------------------------- /depends/windows/angle/angle.txt: -------------------------------------------------------------------------------- 1 | angle https://github.com/google/angle/archive/chromium/3712.tar.gz 2 | -------------------------------------------------------------------------------- /depends/windows/angle/flags.txt: -------------------------------------------------------------------------------- 1 | -DCMAKE_SYSTEM_VERSION=10.0.17763.0 2 | -------------------------------------------------------------------------------- /lib/kissfft/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.5) 2 | project(kissfft) 3 | 4 | set(SOURCES kiss_fft.c) 5 | 6 | add_library(kissfft STATIC ${SOURCES}) 7 | set_property(TARGET kissfft PROPERTY POSITION_INDEPENDENT_CODE ON) 8 | -------------------------------------------------------------------------------- /lib/kissfft/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2003-2010 Mark Borgerding . All rights reserved. 2 | 3 | KISS FFT is provided under: 4 | 5 | SPDX-License-Identifier: BSD-3-Clause 6 | 7 | Being under the terms of the BSD 3-clause "New" or "Revised" License, 8 | according with: 9 | 10 | LICENSES/BSD-3-Clause 11 | 12 | -------------------------------------------------------------------------------- /lib/kissfft/LICENSES/BSD-3-Clause: -------------------------------------------------------------------------------- 1 | Valid-License-Identifier: BSD-3-Clause 2 | SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html 3 | Usage-Guide: 4 | To use the BSD 3-clause "New" or "Revised" License put the following SPDX 5 | tag/value pair into a comment according to the placement guidelines in 6 | the licensing rules documentation: 7 | SPDX-License-Identifier: BSD-3-Clause 8 | License-Text: 9 | 10 | Copyright (c) . All rights reserved. 11 | 12 | Redistribution and use in source and binary forms, with or without modification, 13 | are permitted provided that the following conditions are met: 14 | 15 | 1. Redistributions of source code must retain the above copyright notice, 16 | this list of conditions and the following disclaimer. 17 | 18 | 2. Redistributions in binary form must reproduce the above copyright notice, 19 | this list of conditions and the following disclaimer in the documentation 20 | and/or other materials provided with the distribution. 21 | 22 | 3. Neither the name of the copyright holder nor the names of its contributors 23 | may be used to endorse or promote products derived from this software without 24 | specific prior written permission. 25 | 26 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 27 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 30 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 32 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 33 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 34 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 35 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 | -------------------------------------------------------------------------------- /lib/kissfft/LICENSES/Unlicense: -------------------------------------------------------------------------------- 1 | Valid-License-Identifier: Unlicense 2 | SPDX-URL: https://spdx.org/licenses/Unlicense.html 3 | Usage-Guide: 4 | To use the Unlicense put the following SPDX tag/value pair into a 5 | comment according to the placement guidelines in the licensing rules 6 | documentation: 7 | SPDX-License-Identifier: Unlicense 8 | License-Text: 9 | 10 | This is free and unencumbered software released into the public domain. 11 | 12 | Anyone is free to copy, modify, publish, use, compile, sell, or distribute 13 | this software, either in source code form or as a compiled binary, for any 14 | purpose, commercial or non-commercial, and by any means. 15 | 16 | In jurisdictions that recognize copyright laws, the author or authors of this 17 | software dedicate any and all copyright interest in the software to the public 18 | domain. We make this dedication for the benefit of the public at large and 19 | to the detriment of our heirs and successors. We intend this dedication to be 20 | an overt act of relinquishment in perpetuity of all present and future rights 21 | to this software under copyright law. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 25 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 26 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 27 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 28 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 29 | 30 | For more information, please refer to 31 | -------------------------------------------------------------------------------- /lib/kissfft/_kiss_fft_guts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. 3 | * This file is part of KISS FFT - https://github.com/mborgerding/kissfft 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * See COPYING file for more information. 7 | */ 8 | 9 | /* kiss_fft.h 10 | defines kiss_fft_scalar as either short or a float type 11 | and defines 12 | typedef struct { kiss_fft_scalar r; kiss_fft_scalar i; }kiss_fft_cpx; */ 13 | 14 | #ifndef _kiss_fft_guts_h 15 | #define _kiss_fft_guts_h 16 | 17 | #include "kiss_fft.h" 18 | #include "kiss_fft_log.h" 19 | #include 20 | 21 | #define MAXFACTORS 32 22 | /* e.g. an fft of length 128 has 4 factors 23 | as far as kissfft is concerned 24 | 4*4*4*2 25 | */ 26 | 27 | struct kiss_fft_state{ 28 | int nfft; 29 | int inverse; 30 | int factors[2*MAXFACTORS]; 31 | kiss_fft_cpx twiddles[1]; 32 | }; 33 | 34 | /* 35 | Explanation of macros dealing with complex math: 36 | 37 | C_MUL(m,a,b) : m = a*b 38 | C_FIXDIV( c , div ) : if a fixed point impl., c /= div. noop otherwise 39 | C_SUB( res, a,b) : res = a - b 40 | C_SUBFROM( res , a) : res -= a 41 | C_ADDTO( res , a) : res += a 42 | * */ 43 | #ifdef FIXED_POINT 44 | #include 45 | #if (FIXED_POINT==32) 46 | # define FRACBITS 31 47 | # define SAMPPROD int64_t 48 | #define SAMP_MAX INT32_MAX 49 | #define SAMP_MIN INT32_MIN 50 | #else 51 | # define FRACBITS 15 52 | # define SAMPPROD int32_t 53 | #define SAMP_MAX INT16_MAX 54 | #define SAMP_MIN INT16_MIN 55 | #endif 56 | 57 | #if defined(CHECK_OVERFLOW) 58 | # define CHECK_OVERFLOW_OP(a,op,b) \ 59 | if ( (SAMPPROD)(a) op (SAMPPROD)(b) > SAMP_MAX || (SAMPPROD)(a) op (SAMPPROD)(b) < SAMP_MIN ) { \ 60 | KISS_FFT_WARNING("overflow (%d " #op" %d) = %ld", (a),(b),(SAMPPROD)(a) op (SAMPPROD)(b)); } 61 | #endif 62 | 63 | 64 | # define smul(a,b) ( (SAMPPROD)(a)*(b) ) 65 | # define sround( x ) (kiss_fft_scalar)( ( (x) + (1<<(FRACBITS-1)) ) >> FRACBITS ) 66 | 67 | # define S_MUL(a,b) sround( smul(a,b) ) 68 | 69 | # define C_MUL(m,a,b) \ 70 | do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \ 71 | (m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0) 72 | 73 | # define DIVSCALAR(x,k) \ 74 | (x) = sround( smul( x, SAMP_MAX/k ) ) 75 | 76 | # define C_FIXDIV(c,div) \ 77 | do { DIVSCALAR( (c).r , div); \ 78 | DIVSCALAR( (c).i , div); }while (0) 79 | 80 | # define C_MULBYSCALAR( c, s ) \ 81 | do{ (c).r = sround( smul( (c).r , s ) ) ;\ 82 | (c).i = sround( smul( (c).i , s ) ) ; }while(0) 83 | 84 | #else /* not FIXED_POINT*/ 85 | 86 | # define S_MUL(a,b) ( (a)*(b) ) 87 | #define C_MUL(m,a,b) \ 88 | do{ (m).r = (a).r*(b).r - (a).i*(b).i;\ 89 | (m).i = (a).r*(b).i + (a).i*(b).r; }while(0) 90 | # define C_FIXDIV(c,div) /* NOOP */ 91 | # define C_MULBYSCALAR( c, s ) \ 92 | do{ (c).r *= (s);\ 93 | (c).i *= (s); }while(0) 94 | #endif 95 | 96 | #ifndef CHECK_OVERFLOW_OP 97 | # define CHECK_OVERFLOW_OP(a,op,b) /* noop */ 98 | #endif 99 | 100 | #define C_ADD( res, a,b)\ 101 | do { \ 102 | CHECK_OVERFLOW_OP((a).r,+,(b).r)\ 103 | CHECK_OVERFLOW_OP((a).i,+,(b).i)\ 104 | (res).r=(a).r+(b).r; (res).i=(a).i+(b).i; \ 105 | }while(0) 106 | #define C_SUB( res, a,b)\ 107 | do { \ 108 | CHECK_OVERFLOW_OP((a).r,-,(b).r)\ 109 | CHECK_OVERFLOW_OP((a).i,-,(b).i)\ 110 | (res).r=(a).r-(b).r; (res).i=(a).i-(b).i; \ 111 | }while(0) 112 | #define C_ADDTO( res , a)\ 113 | do { \ 114 | CHECK_OVERFLOW_OP((res).r,+,(a).r)\ 115 | CHECK_OVERFLOW_OP((res).i,+,(a).i)\ 116 | (res).r += (a).r; (res).i += (a).i;\ 117 | }while(0) 118 | 119 | #define C_SUBFROM( res , a)\ 120 | do {\ 121 | CHECK_OVERFLOW_OP((res).r,-,(a).r)\ 122 | CHECK_OVERFLOW_OP((res).i,-,(a).i)\ 123 | (res).r -= (a).r; (res).i -= (a).i; \ 124 | }while(0) 125 | 126 | 127 | #ifdef FIXED_POINT 128 | # define KISS_FFT_COS(phase) floor(.5+SAMP_MAX * cos (phase)) 129 | # define KISS_FFT_SIN(phase) floor(.5+SAMP_MAX * sin (phase)) 130 | # define HALF_OF(x) ((x)>>1) 131 | #elif defined(USE_SIMD) 132 | # define KISS_FFT_COS(phase) _mm_set1_ps( cos(phase) ) 133 | # define KISS_FFT_SIN(phase) _mm_set1_ps( sin(phase) ) 134 | # define HALF_OF(x) ((x)*_mm_set1_ps(.5)) 135 | #else 136 | # define KISS_FFT_COS(phase) (kiss_fft_scalar) cos(phase) 137 | # define KISS_FFT_SIN(phase) (kiss_fft_scalar) sin(phase) 138 | # define HALF_OF(x) ((x)*((kiss_fft_scalar).5)) 139 | #endif 140 | 141 | #define kf_cexp(x,phase) \ 142 | do{ \ 143 | (x)->r = KISS_FFT_COS(phase);\ 144 | (x)->i = KISS_FFT_SIN(phase);\ 145 | }while(0) 146 | 147 | 148 | /* a debugging function */ 149 | #define pcpx(c)\ 150 | KISS_FFT_DEBUG("%g + %gi\n",(double)((c)->r),(double)((c)->i)) 151 | 152 | 153 | #ifdef KISS_FFT_USE_ALLOCA 154 | // define this to allow use of alloca instead of malloc for temporary buffers 155 | // Temporary buffers are used in two case: 156 | // 1. FFT sizes that have "bad" factors. i.e. not 2,3 and 5 157 | // 2. "in-place" FFTs. Notice the quotes, since kissfft does not really do an in-place transform. 158 | #include 159 | #define KISS_FFT_TMP_ALLOC(nbytes) alloca(nbytes) 160 | #define KISS_FFT_TMP_FREE(ptr) 161 | #else 162 | #define KISS_FFT_TMP_ALLOC(nbytes) KISS_FFT_MALLOC(nbytes) 163 | #define KISS_FFT_TMP_FREE(ptr) KISS_FFT_FREE(ptr) 164 | #endif 165 | 166 | #endif /* _kiss_fft_guts_h */ 167 | 168 | -------------------------------------------------------------------------------- /lib/kissfft/kiss_fft.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. 3 | * This file is part of KISS FFT - https://github.com/mborgerding/kissfft 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * See COPYING file for more information. 7 | */ 8 | 9 | #ifndef KISS_FFT_H 10 | #define KISS_FFT_H 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | // Define KISS_FFT_SHARED macro to properly export symbols 18 | #ifdef KISS_FFT_SHARED 19 | # ifdef _WIN32 20 | # ifdef KISS_FFT_BUILD 21 | # define KISS_FFT_API __declspec(dllexport) 22 | # else 23 | # define KISS_FFT_API __declspec(dllimport) 24 | # endif 25 | # else 26 | # define KISS_FFT_API __attribute__ ((visibility ("default"))) 27 | # endif 28 | #else 29 | # define KISS_FFT_API 30 | #endif 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | /* 37 | ATTENTION! 38 | If you would like a : 39 | -- a utility that will handle the caching of fft objects 40 | -- real-only (no imaginary time component ) FFT 41 | -- a multi-dimensional FFT 42 | -- a command-line utility to perform ffts 43 | -- a command-line utility to perform fast-convolution filtering 44 | 45 | Then see kfc.h kiss_fftr.h kiss_fftnd.h fftutil.c kiss_fastfir.c 46 | in the tools/ directory. 47 | */ 48 | 49 | /* User may override KISS_FFT_MALLOC and/or KISS_FFT_FREE. */ 50 | #ifdef USE_SIMD 51 | # include 52 | # define kiss_fft_scalar __m128 53 | # ifndef KISS_FFT_MALLOC 54 | # define KISS_FFT_MALLOC(nbytes) _mm_malloc(nbytes,16) 55 | # define KISS_FFT_ALIGN_CHECK(ptr) 56 | # define KISS_FFT_ALIGN_SIZE_UP(size) ((size + 15UL) & ~0xFUL) 57 | # endif 58 | # ifndef KISS_FFT_FREE 59 | # define KISS_FFT_FREE _mm_free 60 | # endif 61 | #else 62 | # define KISS_FFT_ALIGN_CHECK(ptr) 63 | # define KISS_FFT_ALIGN_SIZE_UP(size) (size) 64 | # ifndef KISS_FFT_MALLOC 65 | # define KISS_FFT_MALLOC malloc 66 | # endif 67 | # ifndef KISS_FFT_FREE 68 | # define KISS_FFT_FREE free 69 | # endif 70 | #endif 71 | 72 | 73 | #ifdef FIXED_POINT 74 | #include 75 | # if (FIXED_POINT == 32) 76 | # define kiss_fft_scalar int32_t 77 | # else 78 | # define kiss_fft_scalar int16_t 79 | # endif 80 | #else 81 | # ifndef kiss_fft_scalar 82 | /* default is float */ 83 | # define kiss_fft_scalar float 84 | # endif 85 | #endif 86 | 87 | typedef struct { 88 | kiss_fft_scalar r; 89 | kiss_fft_scalar i; 90 | }kiss_fft_cpx; 91 | 92 | typedef struct kiss_fft_state* kiss_fft_cfg; 93 | 94 | /* 95 | * kiss_fft_alloc 96 | * 97 | * Initialize a FFT (or IFFT) algorithm's cfg/state buffer. 98 | * 99 | * typical usage: kiss_fft_cfg mycfg=kiss_fft_alloc(1024,0,NULL,NULL); 100 | * 101 | * The return value from fft_alloc is a cfg buffer used internally 102 | * by the fft routine or NULL. 103 | * 104 | * If lenmem is NULL, then kiss_fft_alloc will allocate a cfg buffer using malloc. 105 | * The returned value should be free()d when done to avoid memory leaks. 106 | * 107 | * The state can be placed in a user supplied buffer 'mem': 108 | * If lenmem is not NULL and mem is not NULL and *lenmem is large enough, 109 | * then the function places the cfg in mem and the size used in *lenmem 110 | * and returns mem. 111 | * 112 | * If lenmem is not NULL and ( mem is NULL or *lenmem is not large enough), 113 | * then the function returns NULL and places the minimum cfg 114 | * buffer size in *lenmem. 115 | * */ 116 | 117 | kiss_fft_cfg KISS_FFT_API kiss_fft_alloc(int nfft,int inverse_fft,void * mem,size_t * lenmem); 118 | 119 | /* 120 | * kiss_fft(cfg,in_out_buf) 121 | * 122 | * Perform an FFT on a complex input buffer. 123 | * for a forward FFT, 124 | * fin should be f[0] , f[1] , ... ,f[nfft-1] 125 | * fout will be F[0] , F[1] , ... ,F[nfft-1] 126 | * Note that each element is complex and can be accessed like 127 | f[k].r and f[k].i 128 | * */ 129 | void KISS_FFT_API kiss_fft(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout); 130 | 131 | /* 132 | A more generic version of the above function. It reads its input from every Nth sample. 133 | * */ 134 | void KISS_FFT_API kiss_fft_stride(kiss_fft_cfg cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,int fin_stride); 135 | 136 | /* If kiss_fft_alloc allocated a buffer, it is one contiguous 137 | buffer and can be simply free()d when no longer needed*/ 138 | #define kiss_fft_free KISS_FFT_FREE 139 | 140 | /* 141 | Cleans up some memory that gets managed internally. Not necessary to call, but it might clean up 142 | your compiler output to call this before you exit. 143 | */ 144 | void KISS_FFT_API kiss_fft_cleanup(void); 145 | 146 | 147 | /* 148 | * Returns the smallest integer k, such that k>=n and k has only "fast" factors (2,3,5) 149 | */ 150 | int KISS_FFT_API kiss_fft_next_fast_size(int n); 151 | 152 | /* for real ffts, we need an even size */ 153 | #define kiss_fftr_next_fast_size_real(n) \ 154 | (kiss_fft_next_fast_size( ((n)+1)>>1)<<1) 155 | 156 | #ifdef __cplusplus 157 | } 158 | #endif 159 | 160 | #endif 161 | -------------------------------------------------------------------------------- /lib/kissfft/kiss_fft_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2010, Mark Borgerding. All rights reserved. 3 | * This file is part of KISS FFT - https://github.com/mborgerding/kissfft 4 | * 5 | * SPDX-License-Identifier: BSD-3-Clause 6 | * See COPYING file for more information. 7 | */ 8 | 9 | #ifndef kiss_fft_log_h 10 | #define kiss_fft_log_h 11 | 12 | #define ERROR 1 13 | #define WARNING 2 14 | #define INFO 3 15 | #define DEBUG 4 16 | 17 | #define STRINGIFY(x) #x 18 | #define TOSTRING(x) STRINGIFY(x) 19 | 20 | #if defined(NDEBUG) 21 | # define KISS_FFT_LOG_MSG(severity, ...) ((void)0) 22 | #else 23 | # define KISS_FFT_LOG_MSG(severity, ...) \ 24 | fprintf(stderr, "[" #severity "] " __FILE__ ":" TOSTRING(__LINE__) " "); \ 25 | fprintf(stderr, __VA_ARGS__); \ 26 | fprintf(stderr, "\n") 27 | #endif 28 | 29 | #define KISS_FFT_ERROR(...) KISS_FFT_LOG_MSG(ERROR, __VA_ARGS__) 30 | #define KISS_FFT_WARNING(...) KISS_FFT_LOG_MSG(WARNING, __VA_ARGS__) 31 | #define KISS_FFT_INFO(...) KISS_FFT_LOG_MSG(INFO, __VA_ARGS__) 32 | #define KISS_FFT_DEBUG(...) KISS_FFT_LOG_MSG(DEBUG, __VA_ARGS__) 33 | 34 | 35 | 36 | #endif /* kiss_fft_log_h */ -------------------------------------------------------------------------------- /lib/kodi-kissfft-note.txt: -------------------------------------------------------------------------------- 1 | kissfft from https://github.com/mborgerding/kissfft 2 | Sync to version 131.1.0 (16. Feb. 2021) 3 | -------------------------------------------------------------------------------- /src/PresetsLoader.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2021 Team Kodi (https://kodi.tv) 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | * See LICENSE.md for more information. 6 | */ 7 | 8 | #include "PresetsLoader.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | bool CPresetLoader::Load(const std::string& path) 16 | { 17 | bool ret = false; 18 | char* ptr = nullptr; 19 | 20 | try 21 | { 22 | kodi::vfs::CFile file; 23 | if (!file.OpenFile(path)) 24 | { 25 | throw kodi::tools::StringUtils::Format("Failed to open shader list file %s", path.c_str()); 26 | } 27 | 28 | ssize_t length = file.GetLength(); 29 | if (length <= 0) 30 | { 31 | throw kodi::tools::StringUtils::Format("Shader list file %s seems empty and not usable", 32 | path.c_str()); 33 | } 34 | 35 | ptr = new char[length + 1]{0}; 36 | ssize_t pos = 0; 37 | do 38 | { 39 | ssize_t ret = file.Read(ptr, length); 40 | if (ret < 0) 41 | { 42 | throw kodi::tools::StringUtils::Format("Failed to read shader list file %s", path.c_str()); 43 | } 44 | pos += ret; 45 | } while (pos < length); 46 | 47 | try 48 | { 49 | JSONCPP_STRING err; 50 | Json::Value root; 51 | Json::CharReaderBuilder builder; 52 | const std::unique_ptr reader(builder.newCharReader()); 53 | if (!reader->parse(ptr, ptr + length, &root, &err)) 54 | { 55 | throw kodi::tools::StringUtils::Format( 56 | "Failed to parse json within shader list file %s (ERROR: %s)", path.c_str(), 57 | err.c_str()); 58 | } 59 | 60 | for (unsigned int index = 0; index < root["presets"].size(); index++) 61 | { 62 | const auto& entry = root["presets"][index]; 63 | Preset preset; 64 | 65 | // Check the optional JSON value at the end of the preset, which sets 66 | // possible limits, e.g. supporting only GL ("gl_only") 67 | if (entry.size() > 6 && entry[6].isString()) 68 | { 69 | #if !defined(HAS_GL) 70 | if (kodi::tools::StringUtils::CompareNoCase(entry[6].asString(), "gl_only") == 0) 71 | continue; 72 | #endif 73 | } 74 | 75 | if (entry[0].isString()) 76 | preset.name = entry[0].asString(); 77 | else 78 | preset.name = kodi::addon::GetLocalizedString(entry[0].asInt(), "Unknown preset name " + 79 | std::to_string(index + 1)); 80 | 81 | // Check shader file included within addon or outside and set by user 82 | const std::string usedDirName = kodi::vfs::GetDirectoryName(entry[1].asString()); 83 | if (usedDirName.rfind("./", 0) == 0) 84 | preset.file = 85 | kodi::vfs::GetDirectoryName(path) + kodi::vfs::GetFileName(entry[1].asString()); 86 | else if (usedDirName.rfind("../", 0) == 0) 87 | preset.file = kodi::vfs::GetDirectoryName(path) + entry[1].asString(); 88 | else if (!usedDirName.empty()) 89 | preset.file = entry[1].asString(); 90 | else 91 | preset.file = kodi::addon::GetAddonPath("resources/shaders/" + entry[1].asString()); 92 | 93 | if (!kodi::vfs::FileExists(preset.file)) 94 | throw kodi::tools::StringUtils::Format("On %s defined GLSL shader file '%s' not found", 95 | path.c_str(), preset.file.c_str()); 96 | 97 | for (unsigned int i = 0; i < 4; ++i) 98 | { 99 | // Check shader file included within addon or outside and set by user 100 | const std::string usedDirName = kodi::vfs::GetDirectoryName(entry[i + 2].asString()); 101 | if (kodi::tools::StringUtils::CompareNoCase(entry[i + 2].asString(), "audio") == 0) 102 | preset.channel[i] = "audio"; 103 | else if (usedDirName.rfind("./", 0) == 0) 104 | preset.channel[i] = 105 | kodi::vfs::GetDirectoryName(path) + kodi::vfs::GetFileName(entry[i + 2].asString()); 106 | else if (usedDirName.rfind("../", 0) == 0) 107 | preset.channel[i] = kodi::vfs::GetDirectoryName(path) + entry[i + 2].asString(); 108 | else if (!usedDirName.empty()) 109 | preset.channel[i] = entry[i + 2].asString(); 110 | else if (!entry[i + 2].asString().empty()) 111 | preset.channel[i] = kodi::addon::GetAddonPath("resources/" + entry[i + 2].asString()); 112 | 113 | if (!preset.channel[i].empty() && preset.channel[i] != "audio") 114 | { 115 | if (!kodi::vfs::FileExists(preset.channel[i])) 116 | throw kodi::tools::StringUtils::Format("On %s defined texture image '%s' not found", 117 | path.c_str(), preset.channel[i].c_str()); 118 | } 119 | } 120 | 121 | m_presets.emplace_back(preset); 122 | } 123 | } 124 | catch (Json::LogicError err) 125 | { 126 | throw kodi::tools::StringUtils::Format("Json throwed an exception by parse of %s with '%s'", 127 | path.c_str(), err.what()); 128 | } 129 | catch (std::string err) 130 | { 131 | throw std::move(err); 132 | } 133 | catch (...) 134 | { 135 | throw kodi::tools::StringUtils::Format("Exception by parse of %s", path.c_str()); 136 | } 137 | 138 | ret = true; 139 | } 140 | catch (std::string err) 141 | { 142 | kodi::Log(ADDON_LOG_ERROR, "%s: %s", __func__, err.c_str()); 143 | } 144 | catch (...) 145 | { 146 | kodi::Log(ADDON_LOG_ERROR, "%s: Unknown exception by load of %s", __func__, path.c_str()); 147 | } 148 | 149 | if (ptr) 150 | delete[] ptr; 151 | 152 | // Inform user that maybe their own preset list is wrong 153 | if (!ret) 154 | kodi::QueueNotification(QUEUE_OWN_STYLE, kodi::addon::GetLocalizedString(30030), 155 | kodi::addon::GetLocalizedString(30031), "", 5000, true, 20000); 156 | 157 | return ret; 158 | } 159 | 160 | bool CPresetLoader::GetAvailablePresets(std::vector& presets) 161 | { 162 | for (auto preset : m_presets) 163 | presets.push_back(preset.name); 164 | return true; 165 | } 166 | 167 | int CPresetLoader::GetPresetsAmount() 168 | { 169 | return static_cast(m_presets.size()); 170 | } 171 | 172 | Preset CPresetLoader::GetPreset(int number) 173 | { 174 | if (number >= 0 && number < m_presets.size()) 175 | return m_presets[number]; 176 | 177 | static Preset empty; 178 | return empty; 179 | } 180 | -------------------------------------------------------------------------------- /src/PresetsLoader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2021 Team Kodi (https://kodi.tv) 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | * See LICENSE.md for more information. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | struct Preset 14 | { 15 | std::string name; 16 | std::string file; 17 | std::string channel[4]; 18 | }; 19 | 20 | class CPresetLoader 21 | { 22 | public: 23 | CPresetLoader() = default; 24 | ~CPresetLoader() = default; 25 | 26 | bool Load(const std::string& path); 27 | 28 | bool GetAvailablePresets(std::vector& presets); 29 | int GetPresetsAmount(); 30 | Preset GetPreset(int number); 31 | 32 | private: 33 | std::vector m_presets; 34 | }; 35 | -------------------------------------------------------------------------------- /src/main.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005-2021 Team Kodi (https://kodi.tv) 3 | * 4 | * SPDX-License-Identifier: GPL-2.0-or-later 5 | * See LICENSE.md for more information. 6 | */ 7 | 8 | #pragma once 9 | 10 | #include "PresetsLoader.h" 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #include "kissfft/kiss_fft.h" 19 | 20 | class ATTR_DLL_LOCAL CVisualizationShadertoy 21 | : public kodi::addon::CAddonBase 22 | , public kodi::addon::CInstanceVisualization 23 | { 24 | public: 25 | CVisualizationShadertoy(); 26 | ~CVisualizationShadertoy() override; 27 | 28 | bool Start(int channels, int samplesPerSec, int bitsPerSample, const std::string& songName) override; 29 | void Stop() override; 30 | void AudioData(const float* audioData, size_t audioDataLength) override; 31 | void Render() override; 32 | bool GetPresets(std::vector& presets) override; 33 | int GetActivePreset() override; 34 | bool PrevPreset() override; 35 | bool NextPreset() override; 36 | bool LoadPreset(int select) override; 37 | bool RandomPreset() override; 38 | 39 | private: 40 | void RenderTo(GLuint shader, GLuint effect_fb); 41 | void Mix(float* destination, const float* source, size_t frames, size_t channels); 42 | void WriteToBuffer(const float* input, size_t length, size_t channels); 43 | void Launch(int preset); 44 | void LoadPreset(const std::string& shaderPath); 45 | void UnloadPreset(); 46 | void UnloadTextures(); 47 | GLuint CreateTexture(GLint format, unsigned int w, unsigned int h, const GLvoid* data); 48 | GLuint CreateTexture(const GLvoid* data, GLint format, unsigned int w, unsigned int h, GLint internalFormat, GLint scaling, GLint repeat); 49 | GLuint CreateTexture(const std::string& file, GLint internalFormat, GLint scaling, GLint repeat); 50 | float BlackmanWindow(float in, size_t i, size_t length); 51 | void SmoothingOverTime(float* outputBuffer, float* lastOutputBuffer, kiss_fft_cpx* inputBuffer, size_t length, float smoothingTimeConstant, unsigned int fftSize); 52 | float LinearToDecibels(float linear); 53 | int DetermineBitsPrecision(); 54 | double MeasurePerformance(const std::string& shaderPath, int size); 55 | 56 | kiss_fft_cfg m_kissCfg; 57 | GLubyte* m_audioData; 58 | float* m_magnitudeBuffer; 59 | float* m_pcm; 60 | 61 | bool m_initialized = false; 62 | int64_t m_initialTime = 0; // in ms 63 | int m_bitsPrecision = 0; 64 | int m_currentPreset = 0; 65 | 66 | int m_samplesPerSec = 0; // Given by Start(...) 67 | bool m_needsUpload = true; // Set by AudioData(...) to mark presence of data 68 | 69 | GLint m_attrResolutionLoc = 0; 70 | GLint m_attrGlobalTimeLoc = 0; 71 | GLint m_attrChannelTimeLoc = 0; 72 | GLint m_attrMouseLoc = 0; 73 | GLint m_attrDateLoc = 0; 74 | GLint m_attrSampleRateLoc = 0; 75 | GLint m_attrChannelResolutionLoc = 0; 76 | GLint m_attrChannelLoc[4] = {0}; 77 | GLuint m_channelTextures[4] = {0}; 78 | 79 | kodi::gui::gl::CShaderProgram m_shadertoyShader; 80 | kodi::gui::gl::CShaderProgram m_displayShader; 81 | 82 | struct 83 | { 84 | GLuint vertex_buffer; 85 | GLuint attr_vertex_e; 86 | GLuint attr_vertex_r, uTexture; 87 | GLuint effect_fb; 88 | GLuint framebuffer_texture; 89 | GLuint uScale; 90 | int fbwidth, fbheight; 91 | } m_state; 92 | 93 | bool m_settingsUseOwnshader = false; 94 | std::string m_usedShaderFile; 95 | struct ShaderPath 96 | { 97 | bool audio = false; 98 | std::string texture; 99 | } m_shaderTextures[4]; 100 | 101 | std::string m_presetsJSONFile; 102 | CPresetLoader m_presets; 103 | }; 104 | -------------------------------------------------------------------------------- /visualization.shadertoy/addon.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 7 | @ADDON_DEPENDS@ 8 | 11 | 14 | 15 | @PLATFORM@ 16 | GPL-2.0-or-later 17 | https://github.com/xbmc/visualization.shadertoy 18 | 19 | resources/icon.png 20 | resources/fanart.jpg 21 | resources/screenshot-01.jpg 22 | resources/fanart.jpg 23 | resources/screenshot-02.jpg 24 | resources/screenshot-03.jpg 25 | resources/screenshot-04.jpg 26 | resources/screenshot-05.jpg 27 | resources/screenshot-06.jpg 28 | 29 | Visualiseringer fra Shadertoy 30 | Visualisierungen von Shadertoy 31 | Visualizations from Shadertoy 32 | Visualizaciones de Shadertoy 33 | Shadertoy-visualisointeja 34 | Visualisations de Shadertoy 35 | Visualizzazioni da Shadertoy 36 | Визуализации от Shadertoy 37 | 来自ShaderToy的可视化效果 38 | Denne musikvisualisering er baseret på Shadertoy-baserede GPU-programmer. 39 | Diese Musikvisualisierung basiert auf Shadertoy-basierten GPU-Programmen. 40 | This music visualization is based on Shadertoy based GPU programs. 41 | Esta visualización musical se basa en programas de GPU basados en Shadertoy. 42 | Tämä äänen visualisointi perustuu Shadertoy-pohjaisiin grafiikkasuoritinohjelmiin. 43 | Cette visualisation musicale est basée sur des programmes GPU basés sur Shadertoy. 44 | Questa visualizzazione musicale si basa sui programmi GPU basati su Shadertoy. 45 | Это музыкальная визуализация основана на графических программах, в состав которых входит Shadertoy. 46 | 次音乐可视化是基于基于Shadertoy的GPU程序。 47 | 48 | 49 | -------------------------------------------------------------------------------- /visualization.shadertoy/changelog.txt: -------------------------------------------------------------------------------- 1 | [B]20.3.0[/B] 2 | - Kodi visualization API update to version 4.0.0 3 | 4 | [B]20.2.0[/B] 5 | - Translation updates by Weblate 6 | - Kodi main API update to version 2.0.0 7 | 8 | [B]20.1.1[/B] 9 | - Fix possible compile error about missing jsoncpp include 10 | 11 | [B]20.1.0[/B] 12 | - Add new custom shader list feature: 13 | - Move existing shader list from add-on code to the default 'presets.json' file 14 | - Allow users to configure a path to their own custom preset file 15 | - Add help button with instructions on preset file JSON formatting 16 | 17 | [B]20.0.0[/B] 18 | - Change test builds to 'Kodi 20 Nexus' 19 | - Increase version to 20.0.0 20 | - With start of Kodi 20 Nexus, takes addon as major the same version number as Kodi. 21 | This done to know easier to which Kodi the addon works. 22 | - Prepared for new language translation by [Weblate](https://weblate.org/de/) 23 | - Update depend kissfft to version 131.1.0 (16. Feb. 2021) 24 | - Update depend lodepng to version from 27 Jun. 2021 25 | 26 | [B]2.3.0[/B] 27 | - Matrix API change GUI API 5.15.0 28 | 29 | [B]2.2.1[/B] 30 | - Fix standalone build with newer glm versions (>= 0.9.9.6) 31 | 32 | [B]2.2.0[/B] 33 | - Matrix API change visualizations 34 | - Improve debian build code 35 | - Add german translations 36 | - Add debian build tests to Travis CI 37 | 38 | [B]2.1.1[/B] 39 | - Clamp framebuffer texture to avoid edge pixels bleeding 40 | - Add source URL to addon.xml 41 | 42 | [B]2.1.0[/B] 43 | - Matrix API change inputstream API 2.3.1 44 | - Matrix APi change Global API 1.2.0 45 | 46 | [B]2.0.2[/B] 47 | - Allow on new addon settings to set own Shadertoy file 48 | - Update Debian package creation 49 | - Update glm on depends to version 0.9.9.4 50 | - Use reduced size always if calculation is lower as screen size 51 | - Prevent some shaders on GLES (can freeze on weak systems) 52 | - Add textureLod fallback on GLES (needed on some shadertoys) 53 | - Cleanup CMakeLists.txt 54 | - Update addon Readme 55 | - Kodi visualization API change 56 | 57 | [B]2.0.1[/B] 58 | - Fix debian packaging 59 | 60 | [B]2.0.0[/B] 61 | - Allow complete support via Angle to Windows 62 | - Add screenshots and fanart images to see what it brings 63 | - Update description text 64 | 65 | [B]1.2.0[/B] 66 | - Update build system version and cleanup 67 | - Bring in GL 4.0 support 68 | - Update shader files with a revised copy to a new OpenGL-related folder 69 | - Remove old for Windows not supported shader files 70 | 71 | [B]1.1.10[/B] 72 | - Fix correct buffer size after file read 73 | 74 | [B]1.1.9[/B] 75 | - Save last used preset 76 | 77 | [B]1.1.8[/B] 78 | - Kodi to addon interface changes 79 | - Update debian control 80 | 81 | [B]1.1.7[/B] 82 | - Change to automatic depends set on addon.xml 83 | 84 | [B]1.1.6[/B] 85 | - Removed never used addon interface functions 86 | - Fix of Windows 64 bit build 87 | 88 | [B]1.1.5[/B] 89 | - Fix OpenGL for Apple 90 | 91 | [B]1.1.4[/B] 92 | - Fix order matters. gles needs the extension first in shaders 93 | 94 | [B]1.1.3[/B] 95 | - Drop not used OpenGL EW 96 | 97 | [B]1.1.2[/B] 98 | - Fix do not prepend gles precision directives to gl shaders 99 | 100 | [B]1.1.1[/B] 101 | - Fix iterate by reference 102 | - Fix debian packaging 103 | 104 | [B]1.1.0[/B] 105 | - Rename addon.xml to addon.xml.in and bring it up to par with other add-ons 106 | 107 | [B]1.0.6[/B] 108 | 109 | - Add 2D led spectrum visualizer (remix) 110 | - Add electric pulse visualizer 111 | - Store presets in a struct 112 | - Fix addon.xml for windows 113 | - Add Dancing Metalights 114 | - Add spectrometer 115 | - Add audio eclipse 116 | - Support GLES2 117 | - Improve fractalland performance 118 | - [osx] add missing linkage to CoreVideo.framework 119 | - Change include paths after split of kodi-platform 120 | - Added new icon. Thx ronie 121 | 122 | [B]0.0.1[/B] 123 | 124 | - Initial import 125 | -------------------------------------------------------------------------------- /visualization.shadertoy/help-view.py: -------------------------------------------------------------------------------- 1 | import xbmcaddon 2 | import xbmcgui 3 | 4 | addon = xbmcaddon.Addon() 5 | 6 | xbmcgui.Dialog().textviewer(addon.getLocalizedString(30037), addon.getLocalizedString(30038)) 7 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/fanart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/fanart.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/icon.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/language/resource.language.eo/strings.po: -------------------------------------------------------------------------------- 1 | # Kodi Media Center language file 2 | # Addon Name: Visualization Shadertoy 3 | # Addon id: visualization.shadertoy 4 | # Addon Provider: Team Kodi 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: KODI Addons\n" 8 | "Report-Msgid-Bugs-To: https://github.com/xbmc/visualization.shadertoy/issues\n" 9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Automatically generated\n" 12 | "Language-Team: none\n" 13 | "Language: eo\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n != 1;\n" 18 | 19 | msgctxt "Addon Summary" 20 | msgid "Visualizations from Shadertoy" 21 | msgstr "" 22 | 23 | msgctxt "Addon Description" 24 | msgid "This music visualization is based on Shadertoy based GPU programs." 25 | msgstr "" 26 | 27 | #. Settings category 28 | msgctxt "#30000" 29 | msgid "General" 30 | msgstr "" 31 | 32 | #. Settings category 33 | msgctxt "#30001" 34 | msgid "iChannel 0" 35 | msgstr "" 36 | 37 | #. Settings category 38 | msgctxt "#30002" 39 | msgid "iChannel 1" 40 | msgstr "" 41 | 42 | #. Settings category 43 | msgctxt "#30003" 44 | msgid "iChannel 2" 45 | msgstr "" 46 | 47 | #. Settings category 48 | msgctxt "#30004" 49 | msgid "iChannel 3" 50 | msgstr "" 51 | 52 | #. Boolean settings value to enable and allow selection of a ".glsl" file and related textures 53 | msgctxt "#30010" 54 | msgid "Choose one yourself" 55 | msgstr "" 56 | 57 | #. Help text related to setting string with id 30010 58 | msgctxt "#30011" 59 | msgid "Use your own shadertoy. Attention: Some shaders are not supported by some GPU's in performance!" 60 | msgstr "" 61 | 62 | #. To open the file selection dialog about *.glsl files, if the setting "Choose one yourself"(30010) above is enabled. 63 | msgctxt "#30012" 64 | msgid "Shadertoy file" 65 | msgstr "" 66 | 67 | #. Help text related to setting string with id 30012 68 | msgctxt "#30013" 69 | msgid "Shader as *.glsl" 70 | msgstr "" 71 | 72 | #. Boolean value to use channel 0 as audio, if the setting "Choose one yourself"(30010) above is enabled. 73 | msgctxt "#30014" 74 | msgid "Channel 0 as audio" 75 | msgstr "" 76 | 77 | #. Help text related to setting string with id 30014 78 | msgctxt "#30015" 79 | msgid "Use audio stream data on channel 0" 80 | msgstr "" 81 | 82 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 83 | msgctxt "#30016" 84 | msgid "Channel 0 texture image" 85 | msgstr "" 86 | 87 | #. Help text related to setting string with id 30016 88 | msgctxt "#30017" 89 | msgid "Channel 0 as *.png" 90 | msgstr "" 91 | 92 | #. Boolean value to use channel 1 as audio, if the setting "Choose one yourself"(30010) above is enabled. 93 | msgctxt "#30018" 94 | msgid "Channel 1 as audio" 95 | msgstr "" 96 | 97 | #. Help text related to setting string with id 30018 98 | msgctxt "#30019" 99 | msgid "Use audio stream data on channel 1" 100 | msgstr "" 101 | 102 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 103 | msgctxt "#30020" 104 | msgid "Channel 1 texture image" 105 | msgstr "" 106 | 107 | #. Help text related to setting string with id 30020 108 | msgctxt "#30021" 109 | msgid "Channel 1 as *.png" 110 | msgstr "" 111 | 112 | #. Boolean value to use channel 2 as audio, if the setting "Choose one yourself"(30010) above is enabled. 113 | msgctxt "#30022" 114 | msgid "Channel 2 as audio" 115 | msgstr "" 116 | 117 | #. Help text related to setting string with id 30022 118 | msgctxt "#30023" 119 | msgid "Use audio stream data on channel 2" 120 | msgstr "" 121 | 122 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 123 | msgctxt "#30024" 124 | msgid "Channel 2 texture image" 125 | msgstr "" 126 | 127 | #. Help text related to setting string with id 30024 128 | msgctxt "#30025" 129 | msgid "Channel 2 as *.png" 130 | msgstr "" 131 | 132 | #. Boolean value to use channel 3 as audio, if the setting "Choose one yourself"(30010) above is enabled. 133 | msgctxt "#30026" 134 | msgid "Channel 3 as audio" 135 | msgstr "" 136 | 137 | #. Help text related to setting string with id 30026 138 | msgctxt "#30027" 139 | msgid "Use audio stream data on channel 3" 140 | msgstr "" 141 | 142 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 143 | msgctxt "#30028" 144 | msgid "Channel 3 texture image" 145 | msgstr "" 146 | 147 | #. Help text related to setting string with id 30028 148 | msgctxt "#30029" 149 | msgid "Channel 3 as *.png" 150 | msgstr "" 151 | 152 | #. Header text shown on notification dialog and on file selection dialog 153 | msgctxt "#30030" 154 | msgid "Shadertoy Visualization" 155 | msgstr "" 156 | 157 | #. Notification message shown on the screen when an incorrect preset list is given 158 | msgctxt "#30031" 159 | msgid "Cannot read the JSON file. Please check the formatting is correct and the file is available." 160 | msgstr "" 161 | 162 | #. Settings value to open dialog for file selection 163 | msgctxt "#30032" 164 | msgid "Path to custom preset list" 165 | msgstr "" 166 | 167 | #. Help text related to setting string with id 30032 168 | msgctxt "#30033" 169 | msgid "Set the path to your custom JSON-formatted preset file. If no path is configured, the add-on will use the default preset file." 170 | msgstr "" 171 | 172 | #. Settings group name 173 | msgctxt "#30034" 174 | msgid "Configure a single shader" 175 | msgstr "" 176 | 177 | #. Settings value to open a dialog for showing help about the preset file 178 | msgctxt "#30035" 179 | msgid "Show help about preset file" 180 | msgstr "" 181 | 182 | #. Help text related to setting string with id 30035 183 | msgctxt "#30036" 184 | msgid "Open to read about creating the JSON-formatted preset file." 185 | msgstr "" 186 | 187 | #. Header text on the help dialog within settings, related to the help text of string ID 30038 188 | msgctxt "#30037" 189 | msgid "Help about defining your own shaders in the JSON file" 190 | msgstr "" 191 | 192 | #. Help text about showing the JSON-formatted preset file in a text window. 193 | #. Same text also on visualization.shadertoy/resources/presets.json.md, for here 194 | #. only in Kodi's format style and colored code example! 195 | msgctxt "#30038" 196 | msgid "" 197 | "[B][I]JSON file for user defined shader lists[/I][/B]\n" 198 | "\n" 199 | "The file [B]presets.json[/B] is used to define custom shaders.\n" 200 | "A custom path to the shader files (GLSL) can be declared in the add-on settings.\n" 201 | "\n" 202 | "Contents of [B]presets.json[/B] should be:\n" 203 | "[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]\n" 204 | "[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.\n" 205 | "[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to \"audio\" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.\n" 206 | "[I] 4.[/I] Channel value 1 definition.\n" 207 | "[I] 5.[/I] Channel value 2 definition.\n" 208 | "[I] 6.[/I] Channel value 3 definition.\n" 209 | "[I] 7.[/I] [I][Optional][/I] append string [B]\"gl_only\"[/B] to make this preset only available to OpenGL.\n" 210 | "\n" 211 | "[B]Example:[/B]\n" 212 | "[COLOR white][COLOR green]{[/COLOR] [COLOR blue]\"presets\"[/COLOR]:[\n" 213 | "[COLOR gray]/* Default way used by the addon itself */[/COLOR]\n" 214 | "[ [COLOR red]\"The Disco Tunnel by poljere\"[/COLOR], [COLOR red]\"discotunnel.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 215 | "[COLOR gray]/* Description defined in strings.po */[/COLOR]\n" 216 | "[ 30100, [COLOR red]\"audioeclipse.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 217 | "[COLOR gray]/* Define custom file paths */[/COLOR]\n" 218 | "[ [COLOR red]\"My own one\"[/COLOR], [COLOR red]\"/path/to/glsl/my.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"/path/to/pngs/my_image.png\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 219 | "[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]\n" 220 | "[ [COLOR red]\"Polar Beats by sauj123\"[/COLOR], [COLOR red]\"polarbeats.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"gl_only\"[/COLOR] ],\n" 221 | "[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]\n" 222 | "[ [COLOR red]\"Another one\"[/COLOR], [COLOR red]\"./another.frag.glsl\"[/COLOR], [COLOR red]\"./my_01.png\"[/COLOR], [COLOR red]\"./my_02.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 223 | "[COLOR gray]/* Select texture image by file name, use default \"resources/\" dir */[/COLOR]\n" 224 | "[ [COLOR red]\"Fractal Land by Kali\"[/COLOR], [COLOR red]\"fractalland.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ]\n" 225 | "][COLOR green]}[/COLOR][/COLOR]" 226 | msgstr "" 227 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/language/resource.language.id_id/strings.po: -------------------------------------------------------------------------------- 1 | # Kodi Media Center language file 2 | # Addon Name: Visualization Shadertoy 3 | # Addon id: visualization.shadertoy 4 | # Addon Provider: Team Kodi 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: KODI Addons\n" 8 | "Report-Msgid-Bugs-To: https://github.com/xbmc/visualization.shadertoy/issues\n" 9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Automatically generated\n" 12 | "Language-Team: none\n" 13 | "Language: id_id\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | msgctxt "Addon Summary" 20 | msgid "Visualizations from Shadertoy" 21 | msgstr "" 22 | 23 | msgctxt "Addon Description" 24 | msgid "This music visualization is based on Shadertoy based GPU programs." 25 | msgstr "" 26 | 27 | #. Settings category 28 | msgctxt "#30000" 29 | msgid "General" 30 | msgstr "" 31 | 32 | #. Settings category 33 | msgctxt "#30001" 34 | msgid "iChannel 0" 35 | msgstr "" 36 | 37 | #. Settings category 38 | msgctxt "#30002" 39 | msgid "iChannel 1" 40 | msgstr "" 41 | 42 | #. Settings category 43 | msgctxt "#30003" 44 | msgid "iChannel 2" 45 | msgstr "" 46 | 47 | #. Settings category 48 | msgctxt "#30004" 49 | msgid "iChannel 3" 50 | msgstr "" 51 | 52 | #. Boolean settings value to enable and allow selection of a ".glsl" file and related textures 53 | msgctxt "#30010" 54 | msgid "Choose one yourself" 55 | msgstr "" 56 | 57 | #. Help text related to setting string with id 30010 58 | msgctxt "#30011" 59 | msgid "Use your own shadertoy. Attention: Some shaders are not supported by some GPU's in performance!" 60 | msgstr "" 61 | 62 | #. To open the file selection dialog about *.glsl files, if the setting "Choose one yourself"(30010) above is enabled. 63 | msgctxt "#30012" 64 | msgid "Shadertoy file" 65 | msgstr "" 66 | 67 | #. Help text related to setting string with id 30012 68 | msgctxt "#30013" 69 | msgid "Shader as *.glsl" 70 | msgstr "" 71 | 72 | #. Boolean value to use channel 0 as audio, if the setting "Choose one yourself"(30010) above is enabled. 73 | msgctxt "#30014" 74 | msgid "Channel 0 as audio" 75 | msgstr "" 76 | 77 | #. Help text related to setting string with id 30014 78 | msgctxt "#30015" 79 | msgid "Use audio stream data on channel 0" 80 | msgstr "" 81 | 82 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 83 | msgctxt "#30016" 84 | msgid "Channel 0 texture image" 85 | msgstr "" 86 | 87 | #. Help text related to setting string with id 30016 88 | msgctxt "#30017" 89 | msgid "Channel 0 as *.png" 90 | msgstr "" 91 | 92 | #. Boolean value to use channel 1 as audio, if the setting "Choose one yourself"(30010) above is enabled. 93 | msgctxt "#30018" 94 | msgid "Channel 1 as audio" 95 | msgstr "" 96 | 97 | #. Help text related to setting string with id 30018 98 | msgctxt "#30019" 99 | msgid "Use audio stream data on channel 1" 100 | msgstr "" 101 | 102 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 103 | msgctxt "#30020" 104 | msgid "Channel 1 texture image" 105 | msgstr "" 106 | 107 | #. Help text related to setting string with id 30020 108 | msgctxt "#30021" 109 | msgid "Channel 1 as *.png" 110 | msgstr "" 111 | 112 | #. Boolean value to use channel 2 as audio, if the setting "Choose one yourself"(30010) above is enabled. 113 | msgctxt "#30022" 114 | msgid "Channel 2 as audio" 115 | msgstr "" 116 | 117 | #. Help text related to setting string with id 30022 118 | msgctxt "#30023" 119 | msgid "Use audio stream data on channel 2" 120 | msgstr "" 121 | 122 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 123 | msgctxt "#30024" 124 | msgid "Channel 2 texture image" 125 | msgstr "" 126 | 127 | #. Help text related to setting string with id 30024 128 | msgctxt "#30025" 129 | msgid "Channel 2 as *.png" 130 | msgstr "" 131 | 132 | #. Boolean value to use channel 3 as audio, if the setting "Choose one yourself"(30010) above is enabled. 133 | msgctxt "#30026" 134 | msgid "Channel 3 as audio" 135 | msgstr "" 136 | 137 | #. Help text related to setting string with id 30026 138 | msgctxt "#30027" 139 | msgid "Use audio stream data on channel 3" 140 | msgstr "" 141 | 142 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 143 | msgctxt "#30028" 144 | msgid "Channel 3 texture image" 145 | msgstr "" 146 | 147 | #. Help text related to setting string with id 30028 148 | msgctxt "#30029" 149 | msgid "Channel 3 as *.png" 150 | msgstr "" 151 | 152 | #. Header text shown on notification dialog and on file selection dialog 153 | msgctxt "#30030" 154 | msgid "Shadertoy Visualization" 155 | msgstr "" 156 | 157 | #. Notification message shown on the screen when an incorrect preset list is given 158 | msgctxt "#30031" 159 | msgid "Cannot read the JSON file. Please check the formatting is correct and the file is available." 160 | msgstr "" 161 | 162 | #. Settings value to open dialog for file selection 163 | msgctxt "#30032" 164 | msgid "Path to custom preset list" 165 | msgstr "" 166 | 167 | #. Help text related to setting string with id 30032 168 | msgctxt "#30033" 169 | msgid "Set the path to your custom JSON-formatted preset file. If no path is configured, the add-on will use the default preset file." 170 | msgstr "" 171 | 172 | #. Settings group name 173 | msgctxt "#30034" 174 | msgid "Configure a single shader" 175 | msgstr "" 176 | 177 | #. Settings value to open a dialog for showing help about the preset file 178 | msgctxt "#30035" 179 | msgid "Show help about preset file" 180 | msgstr "" 181 | 182 | #. Help text related to setting string with id 30035 183 | msgctxt "#30036" 184 | msgid "Open to read about creating the JSON-formatted preset file." 185 | msgstr "" 186 | 187 | #. Header text on the help dialog within settings, related to the help text of string ID 30038 188 | msgctxt "#30037" 189 | msgid "Help about defining your own shaders in the JSON file" 190 | msgstr "" 191 | 192 | #. Help text about showing the JSON-formatted preset file in a text window. 193 | #. Same text also on visualization.shadertoy/resources/presets.json.md, for here 194 | #. only in Kodi's format style and colored code example! 195 | msgctxt "#30038" 196 | msgid "" 197 | "[B][I]JSON file for user defined shader lists[/I][/B]\n" 198 | "\n" 199 | "The file [B]presets.json[/B] is used to define custom shaders.\n" 200 | "A custom path to the shader files (GLSL) can be declared in the add-on settings.\n" 201 | "\n" 202 | "Contents of [B]presets.json[/B] should be:\n" 203 | "[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]\n" 204 | "[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.\n" 205 | "[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to \"audio\" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.\n" 206 | "[I] 4.[/I] Channel value 1 definition.\n" 207 | "[I] 5.[/I] Channel value 2 definition.\n" 208 | "[I] 6.[/I] Channel value 3 definition.\n" 209 | "[I] 7.[/I] [I][Optional][/I] append string [B]\"gl_only\"[/B] to make this preset only available to OpenGL.\n" 210 | "\n" 211 | "[B]Example:[/B]\n" 212 | "[COLOR white][COLOR green]{[/COLOR] [COLOR blue]\"presets\"[/COLOR]:[\n" 213 | "[COLOR gray]/* Default way used by the addon itself */[/COLOR]\n" 214 | "[ [COLOR red]\"The Disco Tunnel by poljere\"[/COLOR], [COLOR red]\"discotunnel.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 215 | "[COLOR gray]/* Description defined in strings.po */[/COLOR]\n" 216 | "[ 30100, [COLOR red]\"audioeclipse.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 217 | "[COLOR gray]/* Define custom file paths */[/COLOR]\n" 218 | "[ [COLOR red]\"My own one\"[/COLOR], [COLOR red]\"/path/to/glsl/my.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"/path/to/pngs/my_image.png\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 219 | "[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]\n" 220 | "[ [COLOR red]\"Polar Beats by sauj123\"[/COLOR], [COLOR red]\"polarbeats.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"gl_only\"[/COLOR] ],\n" 221 | "[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]\n" 222 | "[ [COLOR red]\"Another one\"[/COLOR], [COLOR red]\"./another.frag.glsl\"[/COLOR], [COLOR red]\"./my_01.png\"[/COLOR], [COLOR red]\"./my_02.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 223 | "[COLOR gray]/* Select texture image by file name, use default \"resources/\" dir */[/COLOR]\n" 224 | "[ [COLOR red]\"Fractal Land by Kali\"[/COLOR], [COLOR red]\"fractalland.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ]\n" 225 | "][COLOR green]}[/COLOR][/COLOR]" 226 | msgstr "" 227 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/language/resource.language.ja_jp/strings.po: -------------------------------------------------------------------------------- 1 | # Kodi Media Center language file 2 | # Addon Name: Visualization Shadertoy 3 | # Addon id: visualization.shadertoy 4 | # Addon Provider: Team Kodi 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: KODI Addons\n" 8 | "Report-Msgid-Bugs-To: https://github.com/xbmc/visualization.shadertoy/issues\n" 9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Automatically generated\n" 12 | "Language-Team: none\n" 13 | "Language: ja_jp\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | msgctxt "Addon Summary" 20 | msgid "Visualizations from Shadertoy" 21 | msgstr "" 22 | 23 | msgctxt "Addon Description" 24 | msgid "This music visualization is based on Shadertoy based GPU programs." 25 | msgstr "" 26 | 27 | #. Settings category 28 | msgctxt "#30000" 29 | msgid "General" 30 | msgstr "" 31 | 32 | #. Settings category 33 | msgctxt "#30001" 34 | msgid "iChannel 0" 35 | msgstr "" 36 | 37 | #. Settings category 38 | msgctxt "#30002" 39 | msgid "iChannel 1" 40 | msgstr "" 41 | 42 | #. Settings category 43 | msgctxt "#30003" 44 | msgid "iChannel 2" 45 | msgstr "" 46 | 47 | #. Settings category 48 | msgctxt "#30004" 49 | msgid "iChannel 3" 50 | msgstr "" 51 | 52 | #. Boolean settings value to enable and allow selection of a ".glsl" file and related textures 53 | msgctxt "#30010" 54 | msgid "Choose one yourself" 55 | msgstr "" 56 | 57 | #. Help text related to setting string with id 30010 58 | msgctxt "#30011" 59 | msgid "Use your own shadertoy. Attention: Some shaders are not supported by some GPU's in performance!" 60 | msgstr "" 61 | 62 | #. To open the file selection dialog about *.glsl files, if the setting "Choose one yourself"(30010) above is enabled. 63 | msgctxt "#30012" 64 | msgid "Shadertoy file" 65 | msgstr "" 66 | 67 | #. Help text related to setting string with id 30012 68 | msgctxt "#30013" 69 | msgid "Shader as *.glsl" 70 | msgstr "" 71 | 72 | #. Boolean value to use channel 0 as audio, if the setting "Choose one yourself"(30010) above is enabled. 73 | msgctxt "#30014" 74 | msgid "Channel 0 as audio" 75 | msgstr "" 76 | 77 | #. Help text related to setting string with id 30014 78 | msgctxt "#30015" 79 | msgid "Use audio stream data on channel 0" 80 | msgstr "" 81 | 82 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 83 | msgctxt "#30016" 84 | msgid "Channel 0 texture image" 85 | msgstr "" 86 | 87 | #. Help text related to setting string with id 30016 88 | msgctxt "#30017" 89 | msgid "Channel 0 as *.png" 90 | msgstr "" 91 | 92 | #. Boolean value to use channel 1 as audio, if the setting "Choose one yourself"(30010) above is enabled. 93 | msgctxt "#30018" 94 | msgid "Channel 1 as audio" 95 | msgstr "" 96 | 97 | #. Help text related to setting string with id 30018 98 | msgctxt "#30019" 99 | msgid "Use audio stream data on channel 1" 100 | msgstr "" 101 | 102 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 103 | msgctxt "#30020" 104 | msgid "Channel 1 texture image" 105 | msgstr "" 106 | 107 | #. Help text related to setting string with id 30020 108 | msgctxt "#30021" 109 | msgid "Channel 1 as *.png" 110 | msgstr "" 111 | 112 | #. Boolean value to use channel 2 as audio, if the setting "Choose one yourself"(30010) above is enabled. 113 | msgctxt "#30022" 114 | msgid "Channel 2 as audio" 115 | msgstr "" 116 | 117 | #. Help text related to setting string with id 30022 118 | msgctxt "#30023" 119 | msgid "Use audio stream data on channel 2" 120 | msgstr "" 121 | 122 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 123 | msgctxt "#30024" 124 | msgid "Channel 2 texture image" 125 | msgstr "" 126 | 127 | #. Help text related to setting string with id 30024 128 | msgctxt "#30025" 129 | msgid "Channel 2 as *.png" 130 | msgstr "" 131 | 132 | #. Boolean value to use channel 3 as audio, if the setting "Choose one yourself"(30010) above is enabled. 133 | msgctxt "#30026" 134 | msgid "Channel 3 as audio" 135 | msgstr "" 136 | 137 | #. Help text related to setting string with id 30026 138 | msgctxt "#30027" 139 | msgid "Use audio stream data on channel 3" 140 | msgstr "" 141 | 142 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 143 | msgctxt "#30028" 144 | msgid "Channel 3 texture image" 145 | msgstr "" 146 | 147 | #. Help text related to setting string with id 30028 148 | msgctxt "#30029" 149 | msgid "Channel 3 as *.png" 150 | msgstr "" 151 | 152 | #. Header text shown on notification dialog and on file selection dialog 153 | msgctxt "#30030" 154 | msgid "Shadertoy Visualization" 155 | msgstr "" 156 | 157 | #. Notification message shown on the screen when an incorrect preset list is given 158 | msgctxt "#30031" 159 | msgid "Cannot read the JSON file. Please check the formatting is correct and the file is available." 160 | msgstr "" 161 | 162 | #. Settings value to open dialog for file selection 163 | msgctxt "#30032" 164 | msgid "Path to custom preset list" 165 | msgstr "" 166 | 167 | #. Help text related to setting string with id 30032 168 | msgctxt "#30033" 169 | msgid "Set the path to your custom JSON-formatted preset file. If no path is configured, the add-on will use the default preset file." 170 | msgstr "" 171 | 172 | #. Settings group name 173 | msgctxt "#30034" 174 | msgid "Configure a single shader" 175 | msgstr "" 176 | 177 | #. Settings value to open a dialog for showing help about the preset file 178 | msgctxt "#30035" 179 | msgid "Show help about preset file" 180 | msgstr "" 181 | 182 | #. Help text related to setting string with id 30035 183 | msgctxt "#30036" 184 | msgid "Open to read about creating the JSON-formatted preset file." 185 | msgstr "" 186 | 187 | #. Header text on the help dialog within settings, related to the help text of string ID 30038 188 | msgctxt "#30037" 189 | msgid "Help about defining your own shaders in the JSON file" 190 | msgstr "" 191 | 192 | #. Help text about showing the JSON-formatted preset file in a text window. 193 | #. Same text also on visualization.shadertoy/resources/presets.json.md, for here 194 | #. only in Kodi's format style and colored code example! 195 | msgctxt "#30038" 196 | msgid "" 197 | "[B][I]JSON file for user defined shader lists[/I][/B]\n" 198 | "\n" 199 | "The file [B]presets.json[/B] is used to define custom shaders.\n" 200 | "A custom path to the shader files (GLSL) can be declared in the add-on settings.\n" 201 | "\n" 202 | "Contents of [B]presets.json[/B] should be:\n" 203 | "[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]\n" 204 | "[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.\n" 205 | "[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to \"audio\" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.\n" 206 | "[I] 4.[/I] Channel value 1 definition.\n" 207 | "[I] 5.[/I] Channel value 2 definition.\n" 208 | "[I] 6.[/I] Channel value 3 definition.\n" 209 | "[I] 7.[/I] [I][Optional][/I] append string [B]\"gl_only\"[/B] to make this preset only available to OpenGL.\n" 210 | "\n" 211 | "[B]Example:[/B]\n" 212 | "[COLOR white][COLOR green]{[/COLOR] [COLOR blue]\"presets\"[/COLOR]:[\n" 213 | "[COLOR gray]/* Default way used by the addon itself */[/COLOR]\n" 214 | "[ [COLOR red]\"The Disco Tunnel by poljere\"[/COLOR], [COLOR red]\"discotunnel.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 215 | "[COLOR gray]/* Description defined in strings.po */[/COLOR]\n" 216 | "[ 30100, [COLOR red]\"audioeclipse.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 217 | "[COLOR gray]/* Define custom file paths */[/COLOR]\n" 218 | "[ [COLOR red]\"My own one\"[/COLOR], [COLOR red]\"/path/to/glsl/my.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"/path/to/pngs/my_image.png\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 219 | "[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]\n" 220 | "[ [COLOR red]\"Polar Beats by sauj123\"[/COLOR], [COLOR red]\"polarbeats.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"gl_only\"[/COLOR] ],\n" 221 | "[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]\n" 222 | "[ [COLOR red]\"Another one\"[/COLOR], [COLOR red]\"./another.frag.glsl\"[/COLOR], [COLOR red]\"./my_01.png\"[/COLOR], [COLOR red]\"./my_02.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 223 | "[COLOR gray]/* Select texture image by file name, use default \"resources/\" dir */[/COLOR]\n" 224 | "[ [COLOR red]\"Fractal Land by Kali\"[/COLOR], [COLOR red]\"fractalland.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ]\n" 225 | "][COLOR green]}[/COLOR][/COLOR]" 226 | msgstr "" 227 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/language/resource.language.mi/strings.po: -------------------------------------------------------------------------------- 1 | # Kodi Media Center language file 2 | # Addon Name: Visualization Shadertoy 3 | # Addon id: visualization.shadertoy 4 | # Addon Provider: Team Kodi 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: KODI Addons\n" 8 | "Report-Msgid-Bugs-To: https://github.com/xbmc/visualization.shadertoy/issues\n" 9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Automatically generated\n" 12 | "Language-Team: none\n" 13 | "Language: mi\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=2; plural=n > 1;\n" 18 | 19 | msgctxt "Addon Summary" 20 | msgid "Visualizations from Shadertoy" 21 | msgstr "" 22 | 23 | msgctxt "Addon Description" 24 | msgid "This music visualization is based on Shadertoy based GPU programs." 25 | msgstr "" 26 | 27 | #. Settings category 28 | msgctxt "#30000" 29 | msgid "General" 30 | msgstr "" 31 | 32 | #. Settings category 33 | msgctxt "#30001" 34 | msgid "iChannel 0" 35 | msgstr "" 36 | 37 | #. Settings category 38 | msgctxt "#30002" 39 | msgid "iChannel 1" 40 | msgstr "" 41 | 42 | #. Settings category 43 | msgctxt "#30003" 44 | msgid "iChannel 2" 45 | msgstr "" 46 | 47 | #. Settings category 48 | msgctxt "#30004" 49 | msgid "iChannel 3" 50 | msgstr "" 51 | 52 | #. Boolean settings value to enable and allow selection of a ".glsl" file and related textures 53 | msgctxt "#30010" 54 | msgid "Choose one yourself" 55 | msgstr "" 56 | 57 | #. Help text related to setting string with id 30010 58 | msgctxt "#30011" 59 | msgid "Use your own shadertoy. Attention: Some shaders are not supported by some GPU's in performance!" 60 | msgstr "" 61 | 62 | #. To open the file selection dialog about *.glsl files, if the setting "Choose one yourself"(30010) above is enabled. 63 | msgctxt "#30012" 64 | msgid "Shadertoy file" 65 | msgstr "" 66 | 67 | #. Help text related to setting string with id 30012 68 | msgctxt "#30013" 69 | msgid "Shader as *.glsl" 70 | msgstr "" 71 | 72 | #. Boolean value to use channel 0 as audio, if the setting "Choose one yourself"(30010) above is enabled. 73 | msgctxt "#30014" 74 | msgid "Channel 0 as audio" 75 | msgstr "" 76 | 77 | #. Help text related to setting string with id 30014 78 | msgctxt "#30015" 79 | msgid "Use audio stream data on channel 0" 80 | msgstr "" 81 | 82 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 83 | msgctxt "#30016" 84 | msgid "Channel 0 texture image" 85 | msgstr "" 86 | 87 | #. Help text related to setting string with id 30016 88 | msgctxt "#30017" 89 | msgid "Channel 0 as *.png" 90 | msgstr "" 91 | 92 | #. Boolean value to use channel 1 as audio, if the setting "Choose one yourself"(30010) above is enabled. 93 | msgctxt "#30018" 94 | msgid "Channel 1 as audio" 95 | msgstr "" 96 | 97 | #. Help text related to setting string with id 30018 98 | msgctxt "#30019" 99 | msgid "Use audio stream data on channel 1" 100 | msgstr "" 101 | 102 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 103 | msgctxt "#30020" 104 | msgid "Channel 1 texture image" 105 | msgstr "" 106 | 107 | #. Help text related to setting string with id 30020 108 | msgctxt "#30021" 109 | msgid "Channel 1 as *.png" 110 | msgstr "" 111 | 112 | #. Boolean value to use channel 2 as audio, if the setting "Choose one yourself"(30010) above is enabled. 113 | msgctxt "#30022" 114 | msgid "Channel 2 as audio" 115 | msgstr "" 116 | 117 | #. Help text related to setting string with id 30022 118 | msgctxt "#30023" 119 | msgid "Use audio stream data on channel 2" 120 | msgstr "" 121 | 122 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 123 | msgctxt "#30024" 124 | msgid "Channel 2 texture image" 125 | msgstr "" 126 | 127 | #. Help text related to setting string with id 30024 128 | msgctxt "#30025" 129 | msgid "Channel 2 as *.png" 130 | msgstr "" 131 | 132 | #. Boolean value to use channel 3 as audio, if the setting "Choose one yourself"(30010) above is enabled. 133 | msgctxt "#30026" 134 | msgid "Channel 3 as audio" 135 | msgstr "" 136 | 137 | #. Help text related to setting string with id 30026 138 | msgctxt "#30027" 139 | msgid "Use audio stream data on channel 3" 140 | msgstr "" 141 | 142 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 143 | msgctxt "#30028" 144 | msgid "Channel 3 texture image" 145 | msgstr "" 146 | 147 | #. Help text related to setting string with id 30028 148 | msgctxt "#30029" 149 | msgid "Channel 3 as *.png" 150 | msgstr "" 151 | 152 | #. Header text shown on notification dialog and on file selection dialog 153 | msgctxt "#30030" 154 | msgid "Shadertoy Visualization" 155 | msgstr "" 156 | 157 | #. Notification message shown on the screen when an incorrect preset list is given 158 | msgctxt "#30031" 159 | msgid "Cannot read the JSON file. Please check the formatting is correct and the file is available." 160 | msgstr "" 161 | 162 | #. Settings value to open dialog for file selection 163 | msgctxt "#30032" 164 | msgid "Path to custom preset list" 165 | msgstr "" 166 | 167 | #. Help text related to setting string with id 30032 168 | msgctxt "#30033" 169 | msgid "Set the path to your custom JSON-formatted preset file. If no path is configured, the add-on will use the default preset file." 170 | msgstr "" 171 | 172 | #. Settings group name 173 | msgctxt "#30034" 174 | msgid "Configure a single shader" 175 | msgstr "" 176 | 177 | #. Settings value to open a dialog for showing help about the preset file 178 | msgctxt "#30035" 179 | msgid "Show help about preset file" 180 | msgstr "" 181 | 182 | #. Help text related to setting string with id 30035 183 | msgctxt "#30036" 184 | msgid "Open to read about creating the JSON-formatted preset file." 185 | msgstr "" 186 | 187 | #. Header text on the help dialog within settings, related to the help text of string ID 30038 188 | msgctxt "#30037" 189 | msgid "Help about defining your own shaders in the JSON file" 190 | msgstr "" 191 | 192 | #. Help text about showing the JSON-formatted preset file in a text window. 193 | #. Same text also on visualization.shadertoy/resources/presets.json.md, for here 194 | #. only in Kodi's format style and colored code example! 195 | msgctxt "#30038" 196 | msgid "" 197 | "[B][I]JSON file for user defined shader lists[/I][/B]\n" 198 | "\n" 199 | "The file [B]presets.json[/B] is used to define custom shaders.\n" 200 | "A custom path to the shader files (GLSL) can be declared in the add-on settings.\n" 201 | "\n" 202 | "Contents of [B]presets.json[/B] should be:\n" 203 | "[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]\n" 204 | "[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.\n" 205 | "[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to \"audio\" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.\n" 206 | "[I] 4.[/I] Channel value 1 definition.\n" 207 | "[I] 5.[/I] Channel value 2 definition.\n" 208 | "[I] 6.[/I] Channel value 3 definition.\n" 209 | "[I] 7.[/I] [I][Optional][/I] append string [B]\"gl_only\"[/B] to make this preset only available to OpenGL.\n" 210 | "\n" 211 | "[B]Example:[/B]\n" 212 | "[COLOR white][COLOR green]{[/COLOR] [COLOR blue]\"presets\"[/COLOR]:[\n" 213 | "[COLOR gray]/* Default way used by the addon itself */[/COLOR]\n" 214 | "[ [COLOR red]\"The Disco Tunnel by poljere\"[/COLOR], [COLOR red]\"discotunnel.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 215 | "[COLOR gray]/* Description defined in strings.po */[/COLOR]\n" 216 | "[ 30100, [COLOR red]\"audioeclipse.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 217 | "[COLOR gray]/* Define custom file paths */[/COLOR]\n" 218 | "[ [COLOR red]\"My own one\"[/COLOR], [COLOR red]\"/path/to/glsl/my.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"/path/to/pngs/my_image.png\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 219 | "[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]\n" 220 | "[ [COLOR red]\"Polar Beats by sauj123\"[/COLOR], [COLOR red]\"polarbeats.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"gl_only\"[/COLOR] ],\n" 221 | "[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]\n" 222 | "[ [COLOR red]\"Another one\"[/COLOR], [COLOR red]\"./another.frag.glsl\"[/COLOR], [COLOR red]\"./my_01.png\"[/COLOR], [COLOR red]\"./my_02.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 223 | "[COLOR gray]/* Select texture image by file name, use default \"resources/\" dir */[/COLOR]\n" 224 | "[ [COLOR red]\"Fractal Land by Kali\"[/COLOR], [COLOR red]\"fractalland.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ]\n" 225 | "][COLOR green]}[/COLOR][/COLOR]" 226 | msgstr "" 227 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/language/resource.language.ms_my/strings.po: -------------------------------------------------------------------------------- 1 | # Kodi Media Center language file 2 | # Addon Name: Visualization Shadertoy 3 | # Addon id: visualization.shadertoy 4 | # Addon Provider: Team Kodi 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: KODI Addons\n" 8 | "Report-Msgid-Bugs-To: https://github.com/xbmc/visualization.shadertoy/issues\n" 9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Automatically generated\n" 12 | "Language-Team: none\n" 13 | "Language: ms_my\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | msgctxt "Addon Summary" 20 | msgid "Visualizations from Shadertoy" 21 | msgstr "" 22 | 23 | msgctxt "Addon Description" 24 | msgid "This music visualization is based on Shadertoy based GPU programs." 25 | msgstr "" 26 | 27 | #. Settings category 28 | msgctxt "#30000" 29 | msgid "General" 30 | msgstr "" 31 | 32 | #. Settings category 33 | msgctxt "#30001" 34 | msgid "iChannel 0" 35 | msgstr "" 36 | 37 | #. Settings category 38 | msgctxt "#30002" 39 | msgid "iChannel 1" 40 | msgstr "" 41 | 42 | #. Settings category 43 | msgctxt "#30003" 44 | msgid "iChannel 2" 45 | msgstr "" 46 | 47 | #. Settings category 48 | msgctxt "#30004" 49 | msgid "iChannel 3" 50 | msgstr "" 51 | 52 | #. Boolean settings value to enable and allow selection of a ".glsl" file and related textures 53 | msgctxt "#30010" 54 | msgid "Choose one yourself" 55 | msgstr "" 56 | 57 | #. Help text related to setting string with id 30010 58 | msgctxt "#30011" 59 | msgid "Use your own shadertoy. Attention: Some shaders are not supported by some GPU's in performance!" 60 | msgstr "" 61 | 62 | #. To open the file selection dialog about *.glsl files, if the setting "Choose one yourself"(30010) above is enabled. 63 | msgctxt "#30012" 64 | msgid "Shadertoy file" 65 | msgstr "" 66 | 67 | #. Help text related to setting string with id 30012 68 | msgctxt "#30013" 69 | msgid "Shader as *.glsl" 70 | msgstr "" 71 | 72 | #. Boolean value to use channel 0 as audio, if the setting "Choose one yourself"(30010) above is enabled. 73 | msgctxt "#30014" 74 | msgid "Channel 0 as audio" 75 | msgstr "" 76 | 77 | #. Help text related to setting string with id 30014 78 | msgctxt "#30015" 79 | msgid "Use audio stream data on channel 0" 80 | msgstr "" 81 | 82 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 83 | msgctxt "#30016" 84 | msgid "Channel 0 texture image" 85 | msgstr "" 86 | 87 | #. Help text related to setting string with id 30016 88 | msgctxt "#30017" 89 | msgid "Channel 0 as *.png" 90 | msgstr "" 91 | 92 | #. Boolean value to use channel 1 as audio, if the setting "Choose one yourself"(30010) above is enabled. 93 | msgctxt "#30018" 94 | msgid "Channel 1 as audio" 95 | msgstr "" 96 | 97 | #. Help text related to setting string with id 30018 98 | msgctxt "#30019" 99 | msgid "Use audio stream data on channel 1" 100 | msgstr "" 101 | 102 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 103 | msgctxt "#30020" 104 | msgid "Channel 1 texture image" 105 | msgstr "" 106 | 107 | #. Help text related to setting string with id 30020 108 | msgctxt "#30021" 109 | msgid "Channel 1 as *.png" 110 | msgstr "" 111 | 112 | #. Boolean value to use channel 2 as audio, if the setting "Choose one yourself"(30010) above is enabled. 113 | msgctxt "#30022" 114 | msgid "Channel 2 as audio" 115 | msgstr "" 116 | 117 | #. Help text related to setting string with id 30022 118 | msgctxt "#30023" 119 | msgid "Use audio stream data on channel 2" 120 | msgstr "" 121 | 122 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 123 | msgctxt "#30024" 124 | msgid "Channel 2 texture image" 125 | msgstr "" 126 | 127 | #. Help text related to setting string with id 30024 128 | msgctxt "#30025" 129 | msgid "Channel 2 as *.png" 130 | msgstr "" 131 | 132 | #. Boolean value to use channel 3 as audio, if the setting "Choose one yourself"(30010) above is enabled. 133 | msgctxt "#30026" 134 | msgid "Channel 3 as audio" 135 | msgstr "" 136 | 137 | #. Help text related to setting string with id 30026 138 | msgctxt "#30027" 139 | msgid "Use audio stream data on channel 3" 140 | msgstr "" 141 | 142 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 143 | msgctxt "#30028" 144 | msgid "Channel 3 texture image" 145 | msgstr "" 146 | 147 | #. Help text related to setting string with id 30028 148 | msgctxt "#30029" 149 | msgid "Channel 3 as *.png" 150 | msgstr "" 151 | 152 | #. Header text shown on notification dialog and on file selection dialog 153 | msgctxt "#30030" 154 | msgid "Shadertoy Visualization" 155 | msgstr "" 156 | 157 | #. Notification message shown on the screen when an incorrect preset list is given 158 | msgctxt "#30031" 159 | msgid "Cannot read the JSON file. Please check the formatting is correct and the file is available." 160 | msgstr "" 161 | 162 | #. Settings value to open dialog for file selection 163 | msgctxt "#30032" 164 | msgid "Path to custom preset list" 165 | msgstr "" 166 | 167 | #. Help text related to setting string with id 30032 168 | msgctxt "#30033" 169 | msgid "Set the path to your custom JSON-formatted preset file. If no path is configured, the add-on will use the default preset file." 170 | msgstr "" 171 | 172 | #. Settings group name 173 | msgctxt "#30034" 174 | msgid "Configure a single shader" 175 | msgstr "" 176 | 177 | #. Settings value to open a dialog for showing help about the preset file 178 | msgctxt "#30035" 179 | msgid "Show help about preset file" 180 | msgstr "" 181 | 182 | #. Help text related to setting string with id 30035 183 | msgctxt "#30036" 184 | msgid "Open to read about creating the JSON-formatted preset file." 185 | msgstr "" 186 | 187 | #. Header text on the help dialog within settings, related to the help text of string ID 30038 188 | msgctxt "#30037" 189 | msgid "Help about defining your own shaders in the JSON file" 190 | msgstr "" 191 | 192 | #. Help text about showing the JSON-formatted preset file in a text window. 193 | #. Same text also on visualization.shadertoy/resources/presets.json.md, for here 194 | #. only in Kodi's format style and colored code example! 195 | msgctxt "#30038" 196 | msgid "" 197 | "[B][I]JSON file for user defined shader lists[/I][/B]\n" 198 | "\n" 199 | "The file [B]presets.json[/B] is used to define custom shaders.\n" 200 | "A custom path to the shader files (GLSL) can be declared in the add-on settings.\n" 201 | "\n" 202 | "Contents of [B]presets.json[/B] should be:\n" 203 | "[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]\n" 204 | "[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.\n" 205 | "[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to \"audio\" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.\n" 206 | "[I] 4.[/I] Channel value 1 definition.\n" 207 | "[I] 5.[/I] Channel value 2 definition.\n" 208 | "[I] 6.[/I] Channel value 3 definition.\n" 209 | "[I] 7.[/I] [I][Optional][/I] append string [B]\"gl_only\"[/B] to make this preset only available to OpenGL.\n" 210 | "\n" 211 | "[B]Example:[/B]\n" 212 | "[COLOR white][COLOR green]{[/COLOR] [COLOR blue]\"presets\"[/COLOR]:[\n" 213 | "[COLOR gray]/* Default way used by the addon itself */[/COLOR]\n" 214 | "[ [COLOR red]\"The Disco Tunnel by poljere\"[/COLOR], [COLOR red]\"discotunnel.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 215 | "[COLOR gray]/* Description defined in strings.po */[/COLOR]\n" 216 | "[ 30100, [COLOR red]\"audioeclipse.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 217 | "[COLOR gray]/* Define custom file paths */[/COLOR]\n" 218 | "[ [COLOR red]\"My own one\"[/COLOR], [COLOR red]\"/path/to/glsl/my.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"/path/to/pngs/my_image.png\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 219 | "[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]\n" 220 | "[ [COLOR red]\"Polar Beats by sauj123\"[/COLOR], [COLOR red]\"polarbeats.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"gl_only\"[/COLOR] ],\n" 221 | "[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]\n" 222 | "[ [COLOR red]\"Another one\"[/COLOR], [COLOR red]\"./another.frag.glsl\"[/COLOR], [COLOR red]\"./my_01.png\"[/COLOR], [COLOR red]\"./my_02.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 223 | "[COLOR gray]/* Select texture image by file name, use default \"resources/\" dir */[/COLOR]\n" 224 | "[ [COLOR red]\"Fractal Land by Kali\"[/COLOR], [COLOR red]\"fractalland.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ]\n" 225 | "][COLOR green]}[/COLOR][/COLOR]" 226 | msgstr "" 227 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/language/resource.language.my_mm/strings.po: -------------------------------------------------------------------------------- 1 | # Kodi Media Center language file 2 | # Addon Name: Visualization Shadertoy 3 | # Addon id: visualization.shadertoy 4 | # Addon Provider: Team Kodi 5 | msgid "" 6 | msgstr "" 7 | "Project-Id-Version: KODI Addons\n" 8 | "Report-Msgid-Bugs-To: https://github.com/xbmc/visualization.shadertoy/issues\n" 9 | "POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n" 10 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 11 | "Last-Translator: Automatically generated\n" 12 | "Language-Team: none\n" 13 | "Language: my_mm\n" 14 | "MIME-Version: 1.0\n" 15 | "Content-Type: text/plain; charset=UTF-8\n" 16 | "Content-Transfer-Encoding: 8bit\n" 17 | "Plural-Forms: nplurals=1; plural=0;\n" 18 | 19 | msgctxt "Addon Summary" 20 | msgid "Visualizations from Shadertoy" 21 | msgstr "" 22 | 23 | msgctxt "Addon Description" 24 | msgid "This music visualization is based on Shadertoy based GPU programs." 25 | msgstr "" 26 | 27 | #. Settings category 28 | msgctxt "#30000" 29 | msgid "General" 30 | msgstr "" 31 | 32 | #. Settings category 33 | msgctxt "#30001" 34 | msgid "iChannel 0" 35 | msgstr "" 36 | 37 | #. Settings category 38 | msgctxt "#30002" 39 | msgid "iChannel 1" 40 | msgstr "" 41 | 42 | #. Settings category 43 | msgctxt "#30003" 44 | msgid "iChannel 2" 45 | msgstr "" 46 | 47 | #. Settings category 48 | msgctxt "#30004" 49 | msgid "iChannel 3" 50 | msgstr "" 51 | 52 | #. Boolean settings value to enable and allow selection of a ".glsl" file and related textures 53 | msgctxt "#30010" 54 | msgid "Choose one yourself" 55 | msgstr "" 56 | 57 | #. Help text related to setting string with id 30010 58 | msgctxt "#30011" 59 | msgid "Use your own shadertoy. Attention: Some shaders are not supported by some GPU's in performance!" 60 | msgstr "" 61 | 62 | #. To open the file selection dialog about *.glsl files, if the setting "Choose one yourself"(30010) above is enabled. 63 | msgctxt "#30012" 64 | msgid "Shadertoy file" 65 | msgstr "" 66 | 67 | #. Help text related to setting string with id 30012 68 | msgctxt "#30013" 69 | msgid "Shader as *.glsl" 70 | msgstr "" 71 | 72 | #. Boolean value to use channel 0 as audio, if the setting "Choose one yourself"(30010) above is enabled. 73 | msgctxt "#30014" 74 | msgid "Channel 0 as audio" 75 | msgstr "" 76 | 77 | #. Help text related to setting string with id 30014 78 | msgctxt "#30015" 79 | msgid "Use audio stream data on channel 0" 80 | msgstr "" 81 | 82 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 83 | msgctxt "#30016" 84 | msgid "Channel 0 texture image" 85 | msgstr "" 86 | 87 | #. Help text related to setting string with id 30016 88 | msgctxt "#30017" 89 | msgid "Channel 0 as *.png" 90 | msgstr "" 91 | 92 | #. Boolean value to use channel 1 as audio, if the setting "Choose one yourself"(30010) above is enabled. 93 | msgctxt "#30018" 94 | msgid "Channel 1 as audio" 95 | msgstr "" 96 | 97 | #. Help text related to setting string with id 30018 98 | msgctxt "#30019" 99 | msgid "Use audio stream data on channel 1" 100 | msgstr "" 101 | 102 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 103 | msgctxt "#30020" 104 | msgid "Channel 1 texture image" 105 | msgstr "" 106 | 107 | #. Help text related to setting string with id 30020 108 | msgctxt "#30021" 109 | msgid "Channel 1 as *.png" 110 | msgstr "" 111 | 112 | #. Boolean value to use channel 2 as audio, if the setting "Choose one yourself"(30010) above is enabled. 113 | msgctxt "#30022" 114 | msgid "Channel 2 as audio" 115 | msgstr "" 116 | 117 | #. Help text related to setting string with id 30022 118 | msgctxt "#30023" 119 | msgid "Use audio stream data on channel 2" 120 | msgstr "" 121 | 122 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 123 | msgctxt "#30024" 124 | msgid "Channel 2 texture image" 125 | msgstr "" 126 | 127 | #. Help text related to setting string with id 30024 128 | msgctxt "#30025" 129 | msgid "Channel 2 as *.png" 130 | msgstr "" 131 | 132 | #. Boolean value to use channel 3 as audio, if the setting "Choose one yourself"(30010) above is enabled. 133 | msgctxt "#30026" 134 | msgid "Channel 3 as audio" 135 | msgstr "" 136 | 137 | #. Help text related to setting string with id 30026 138 | msgctxt "#30027" 139 | msgid "Use audio stream data on channel 3" 140 | msgstr "" 141 | 142 | #. Texture image to use, if the setting "Choose one yourself"(30010) above is enabled. 143 | msgctxt "#30028" 144 | msgid "Channel 3 texture image" 145 | msgstr "" 146 | 147 | #. Help text related to setting string with id 30028 148 | msgctxt "#30029" 149 | msgid "Channel 3 as *.png" 150 | msgstr "" 151 | 152 | #. Header text shown on notification dialog and on file selection dialog 153 | msgctxt "#30030" 154 | msgid "Shadertoy Visualization" 155 | msgstr "" 156 | 157 | #. Notification message shown on the screen when an incorrect preset list is given 158 | msgctxt "#30031" 159 | msgid "Cannot read the JSON file. Please check the formatting is correct and the file is available." 160 | msgstr "" 161 | 162 | #. Settings value to open dialog for file selection 163 | msgctxt "#30032" 164 | msgid "Path to custom preset list" 165 | msgstr "" 166 | 167 | #. Help text related to setting string with id 30032 168 | msgctxt "#30033" 169 | msgid "Set the path to your custom JSON-formatted preset file. If no path is configured, the add-on will use the default preset file." 170 | msgstr "" 171 | 172 | #. Settings group name 173 | msgctxt "#30034" 174 | msgid "Configure a single shader" 175 | msgstr "" 176 | 177 | #. Settings value to open a dialog for showing help about the preset file 178 | msgctxt "#30035" 179 | msgid "Show help about preset file" 180 | msgstr "" 181 | 182 | #. Help text related to setting string with id 30035 183 | msgctxt "#30036" 184 | msgid "Open to read about creating the JSON-formatted preset file." 185 | msgstr "" 186 | 187 | #. Header text on the help dialog within settings, related to the help text of string ID 30038 188 | msgctxt "#30037" 189 | msgid "Help about defining your own shaders in the JSON file" 190 | msgstr "" 191 | 192 | #. Help text about showing the JSON-formatted preset file in a text window. 193 | #. Same text also on visualization.shadertoy/resources/presets.json.md, for here 194 | #. only in Kodi's format style and colored code example! 195 | msgctxt "#30038" 196 | msgid "" 197 | "[B][I]JSON file for user defined shader lists[/I][/B]\n" 198 | "\n" 199 | "The file [B]presets.json[/B] is used to define custom shaders.\n" 200 | "A custom path to the shader files (GLSL) can be declared in the add-on settings.\n" 201 | "\n" 202 | "Contents of [B]presets.json[/B] should be:\n" 203 | "[I] 1.[/I] Name of preset. Either hardcoded string or defined in [I]resources/language/.../strings.po[/I]\n" 204 | "[I] 2.[/I] GLSL shader to use. If no custom path was declared, the default [B]resources/[/B] will be used. Set custom path to './' to use shaders from the same path as your [B]presets.json[/B] file.\n" 205 | "[I] 3.[/I] Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to \"audio\" to pass related stream data within texture. The PNG and GLSL files should be located in the same directory.\n" 206 | "[I] 4.[/I] Channel value 1 definition.\n" 207 | "[I] 5.[/I] Channel value 2 definition.\n" 208 | "[I] 6.[/I] Channel value 3 definition.\n" 209 | "[I] 7.[/I] [I][Optional][/I] append string [B]\"gl_only\"[/B] to make this preset only available to OpenGL.\n" 210 | "\n" 211 | "[B]Example:[/B]\n" 212 | "[COLOR white][COLOR green]{[/COLOR] [COLOR blue]\"presets\"[/COLOR]:[\n" 213 | "[COLOR gray]/* Default way used by the addon itself */[/COLOR]\n" 214 | "[ [COLOR red]\"The Disco Tunnel by poljere\"[/COLOR], [COLOR red]\"discotunnel.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 215 | "[COLOR gray]/* Description defined in strings.po */[/COLOR]\n" 216 | "[ 30100, [COLOR red]\"audioeclipse.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 217 | "[COLOR gray]/* Define custom file paths */[/COLOR]\n" 218 | "[ [COLOR red]\"My own one\"[/COLOR], [COLOR red]\"/path/to/glsl/my.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"/path/to/pngs/my_image.png\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 219 | "[COLOR gray]/* Preset only available to OpenGL (see 7) */[/COLOR]\n" 220 | "[ [COLOR red]\"Polar Beats by sauj123\"[/COLOR], [COLOR red]\"polarbeats.frag.glsl\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"\"[/COLOR], [COLOR red]\"gl_only\"[/COLOR] ],\n" 221 | "[COLOR gray]/* GLSL and PNG files are in the same folder as presets.json */[/COLOR]\n" 222 | "[ [COLOR red]\"Another one\"[/COLOR], [COLOR red]\"./another.frag.glsl\"[/COLOR], [COLOR red]\"./my_01.png\"[/COLOR], [COLOR red]\"./my_02.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ],\n" 223 | "[COLOR gray]/* Select texture image by file name, use default \"resources/\" dir */[/COLOR]\n" 224 | "[ [COLOR red]\"Fractal Land by Kali\"[/COLOR], [COLOR red]\"fractalland.frag.glsl\"[/COLOR], [COLOR red]\"tex02.png\"[/COLOR], [COLOR red]\"tex15.png\"[/COLOR], [COLOR red]\"audio\"[/COLOR], [COLOR red]\"\"[/COLOR] ]\n" 225 | "][COLOR green]}[/COLOR][/COLOR]" 226 | msgstr "" 227 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/presets.json: -------------------------------------------------------------------------------- 1 | { "presets":[ 2 | [ "2D LED Spectrum by un1versal", "2Dspectrum.frag.glsl", "audio", "", "", "" ], 3 | [ "Audio Eclipse by airtight", "audioeclipse.frag.glsl", "audio", "", "", "" ], 4 | [ "Audio Reaktive by choard1895", "audioreaktive.frag.glsl", "audio", "", "", "" ], 5 | [ "AudioVisual by Passion", "audiovisual.frag.glsl", "audio", "", "", "" ], 6 | [ "Beating Circles by Phoenix72", "beatingcircles.frag.glsl", "audio", "", "", "" ], 7 | [ "BPM by iq", "bpm.frag.glsl", "audio", "", "", "" ], 8 | [ "Circle Wave by TekF", "circlewave.frag.glsl", "audio", "", "", "" ], 9 | [ "Circuits by Kali", "circuits.frag.glsl", "audio", "tex07.png", "", "", "gl_only" ], 10 | [ "Colored Bars by novalis", "coloredbars.frag.glsl", "audio", "", "", "", "gl_only" ], 11 | [ "Cubescape by iq", "cubescape.frag.glsl", "audio", "tex05.png", "", "", "gl_only" ], 12 | [ "Dancing Metalights by Danguafare", "dancingmetalights.frag.glsl", "audio", "", "", "" ], 13 | [ "The Disco Tunnel by poljere", "discotunnel.frag.glsl", "tex02.png", "tex15.png", "audio", "" ], 14 | [ "Electric pulse by un1versal", "electricpulse.frag.glsl", "audio", "", "", "" ], 15 | [ "Fractal Land by Kali", "fractalland.frag.glsl", "tex02.png", "tex15.png", "audio", "", "gl_only" ], 16 | [ "Gameboy by iq", "gameboy.frag.glsl", "audio", "", "", "" ], 17 | [ "Input Sound by iq", "input.frag.glsl", "audio", "", "", "" ], 18 | [ "I/O by movAX13h", "io.frag.glsl", "audio", "", "", "", "gl_only" ], 19 | [ "Kaleidoscope Visualizer by Qqwy", "kaleidoscopevisualizer.frag.glsl", "audio", "tex14.png", "", "" ], 20 | [ "LED spectrum by simesgreen", "ledspectrum.frag.glsl", "audio", "", "", "" ], 21 | [ "Polar Beats by sauj123", "polarbeats.frag.glsl", "audio", "", "", "" ], 22 | [ "Simplicity Galaxy by CBS", "simplicitygalaxy.frag.glsl", "audio", "", "", "" ], 23 | [ "Sound Flower by iq", "soundflower.frag.glsl", "audio", "", "", "" ], 24 | [ "Sound sinus wave by Eitraz", "soundsinuswave.frag.glsl", "audio", "", "", "" ], 25 | [ "Spectrometer by jaba", "spectrometer.frag.glsl", "audio", "", "", "" ], 26 | [ "symmetrical sound visualiser by thelinked","symmetricalsound.frag.glsl", "audio", "", "", "" ], 27 | [ "Twisted Rings by poljere", "twistedrings.frag.glsl", "audio", "", "", "" ], 28 | [ "Undulant Spectre by mafik", "undulantspectre.frag.glsl", "audio", "", "", "" ], 29 | [ "Demo - Volumetric Lines by iq", "volumetriclines.frag.glsl", "audio", "", "", "", "gl_only" ], 30 | [ "Waves Remix by ADOB", "wavesremix.frag.glsl", "audio", "", "", "" ] 31 | ]} 32 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/presets.json.md: -------------------------------------------------------------------------------- 1 | # JSON file for user defined shader lists 2 | 3 | The file `presets.json` is used to define custom shaders. 4 | A custom path to the shader files (GLSL) can be declared in the add-on settings. 5 | 6 | Contents of `presets.json` should be: 7 | 1. Name of preset. Either hardcoded string or defined in `resources/language/.../strings.po` 8 | 2. GLSL shader to use. If no custom path was declared, the default `resources/` will be used. 9 | Set custom path to './' to use shaders from the same path as your `presets.json` file. 10 | 3. Channel value 0. Defines the texture to use (e.g. PNG file). Can also be set to "audio" 11 | to pass related stream data within texture. The PNG and GLSL files should be located 12 | in the same directory. 13 | 4. Channel value 1 definition. 14 | 5. Channel value 2 definition. 15 | 6. Channel value 3 definition. 16 | 7. *[Optional]* append string `"gl_only"` to make this preset only available 17 | to OpenGL. 18 | 19 | Example: 20 | ------------------- 21 | ~~~javascript 22 | { "presets":[ 23 | 24 | /* Default way used by the addon itself */ 25 | [ "The Disco Tunnel by poljere", "discotunnel.frag.glsl", "tex02.png", "tex15.png", "audio", "" ], 26 | 27 | /* Description defined in strings.po */ 28 | [ 30100, "audioeclipse.frag.glsl", "audio", "", "", "" ], 29 | 30 | /* Define custom file paths */ 31 | [ "My own one", "/path/to/glsl/my.frag.glsl", "audio", "/path/to/pngs/my_image.png", "", "" ], 32 | 33 | /* Preset only available to OpenGL (see 7) */ 34 | [ "Polar Beats by sauj123", "polarbeats.frag.glsl", "audio", "", "", "", "gl_only" ], 35 | 36 | /* GLSL and PNG files are in the same folder as presets.json */ 37 | [ "Another one", "./another.frag.glsl", "./my_01.png", "./my_02.png", "audio", "" ], 38 | 39 | /* Select texture image by file name, use default `resources/` dir */ 40 | [ "Fractal Land by Kali", "fractalland.frag.glsl", "tex02.png", "tex15.png", "audio", "" ] 41 | ]} 42 | ~~~ 43 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/screenshot-01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/screenshot-01.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/screenshot-02.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/screenshot-02.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/screenshot-03.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/screenshot-03.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/screenshot-04.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/screenshot-04.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/screenshot-05.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/screenshot-05.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/screenshot-06.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/screenshot-06.jpg -------------------------------------------------------------------------------- /visualization.shadertoy/resources/settings.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 |
4 | 5 | 6 | 7 | false 8 | 0 9 | 10 | 11 | 12 | false 13 | 14 | 15 | 16 | 17 | 18 | 19 | false 20 | 21 | 22 | true 23 | *.json 24 | 25 | 26 | 30030 27 | 28 | 29 | 30 | 0 31 | 32 | 33 | true 34 | 35 | 36 | RunScript(visualization.shadertoy) 37 | 38 | 39 | 40 | 41 | 42 | false 43 | 44 | 45 | 46 | 47 | 48 | true 49 | 50 | 51 | true 52 | *.glsl 53 | 54 | 55 | 30012 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | true 64 | 65 | 66 | true 67 | 68 | 69 | 70 | 71 | 72 | true 73 | false 74 | 75 | 76 | true 77 | *.png 78 | 79 | 80 | 30016 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | false 89 | 90 | 91 | true 92 | 93 | 94 | 95 | 96 | 97 | true 98 | false 99 | 100 | 101 | true 102 | *.png 103 | 104 | 105 | 30020 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | false 114 | 115 | 116 | true 117 | 118 | 119 | 120 | 121 | 122 | true 123 | false 124 | 125 | 126 | true 127 | *.png 128 | 129 | 130 | 30024 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | false 139 | 140 | 141 | true 142 | 143 | 144 | 145 | 146 | 147 | true 148 | false 149 | 150 | 151 | true 152 | *.png 153 | 154 | 155 | 30028 156 | 157 | 158 | 159 | 160 |
161 |
162 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/2Dspectrum.frag.glsl: -------------------------------------------------------------------------------- 1 | /* 2 | 2D LED Spectrum - Visualiser - https://www.shadertoy.com/view/Mlj3WV# 3 | Based on Led Spectrum Analiser by: simesgreen - 27th February, 2013 - https://www.shadertoy.com/view/Msl3zr 4 | 2D LED Spectrum by: uNiversal - 27th May, 2015 5 | Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 6 | */ 7 | 8 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 9 | { 10 | // create pixel coordinates 11 | vec2 uv = fragCoord.xy / iResolution.xy; 12 | 13 | // quantize coordinates 14 | const float bands = 30.0; 15 | const float segs = 40.0; 16 | vec2 p; 17 | p.x = floor(uv.x*bands)/bands; 18 | p.y = floor(uv.y*segs)/segs; 19 | 20 | // read frequency data from first row of texture 21 | float fft = texture2D( iChannel0, vec2(p.x,0.0) ).x; 22 | 23 | // led color 24 | vec3 color = mix(vec3(0.0, 2.0, 0.0), vec3(2.0, 0.0, 0.0), sqrt(uv.y)); 25 | 26 | // mask for bar graph 27 | float mask = (p.y < fft) ? 1.0 : 0.1; 28 | 29 | // led shape 30 | vec2 d = fract((uv - p)*vec2(bands, segs)) - 0.5; 31 | float led = smoothstep(0.5, 0.35, abs(d.x)) * 32 | smoothstep(0.5, 0.35, abs(d.y)); 33 | vec3 ledColor = led*color*mask; 34 | 35 | // output final color 36 | fragColor = vec4(ledColor, 1.0); 37 | } 38 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/audioeclipse.frag.glsl: -------------------------------------------------------------------------------- 1 | // see: https://www.shadertoy.com/view/MdsXWM 2 | 3 | const float dots = 40.; //number of lights 4 | const float radius = .25; //radius of light ring 5 | const float brightness = 0.02; 6 | 7 | //convert HSV to RGB 8 | vec3 hsv2rgb(vec3 c){ 9 | vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); 10 | vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); 11 | return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); 12 | } 13 | 14 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) { 15 | 16 | vec2 p=(fragCoord.xy-.5*iResolution.xy)/min(iResolution.x,iResolution.y); 17 | vec3 c=vec3(0,0,0.1); //background color 18 | 19 | for(float i=0.;i 1.0) uv.x = 2.0 - uv.x; 63 | #endif 64 | 65 | 66 | //four distortion patterns 67 | float coord1 = sin(uv.x + hwf) - cos(uv.y); 68 | float coord2 = sin(1.0 - uv.x + hwf) - sin(uv.y * 3.0); 69 | //float coord3 = cos(uv.x+sin(0.2*iTime)) - sin(2.5*uv.y - wf); 70 | float coord4 = mix(coord1, coord2,hwf); 71 | float coord5 = mix(coord1, coord2, beat); 72 | 73 | float coorda = mix(coord1, coord2, 0.5 + 0.5 *sin(iTime*0.7)); 74 | float coordb = mix(coord5, coord4, 0.5 + 0.5 *sin(iTime*0.5)); 75 | 76 | //mix distortions based on time 77 | float coord = mix(coorda, coordb, 0.5 + 0.5 *sin(iTime*0.3)); 78 | 79 | //distort the spectrum image using the above coords 80 | float j = (texture(iChannel0, vec2(abs(coord),0.0)).x - 0.5) * 2.0; 81 | 82 | //greyscale -> color with a lot of dot products 83 | float fac1 = dot(vec3(uv.x,uv.y,j),sun); 84 | float fac2 = dot(vec3(uv.y,j,uv.x),sun); 85 | float fac3 = dot(vec3(j,uv.x,uv.y),sun); 86 | bg_color = vec3(fac1,fac2,fac3); 87 | 88 | 89 | //extract some info about wave shape 90 | float w1 = texture(iChannel0, vec2(0.1,0.0)).x; 91 | float w2 = texture(iChannel0, vec2(0.2,0.0)).x; 92 | float w3 = texture(iChannel0, vec2(0.4,0.0)).x; 93 | float w4 = texture(iChannel0, vec2(0.8,0.0)).x; 94 | 95 | //save screenspace for later 96 | vec2 ouv = uv; 97 | 98 | 99 | float wave_width = 0.0; 100 | float wave_amp = 0.0; 101 | 102 | //rescale to aspect-aware [-1, 1] 103 | uv = -1.0 + 2.0 * uv; 104 | uv.y *= iResolution.y/iResolution.x; 105 | 106 | #ifdef ALT_MODE 107 | //bend-spin-stretch the coord system based on wave shape 108 | float theta = (w1 - w2 + w3 - w4) * 3.14; 109 | uv = uv*mat2(cos(theta * 0.2),-sin(theta * 0.3),sin(theta * 0.5),cos(theta * 0.7)); 110 | #endif 111 | 112 | //for polar calculations 113 | float rad = length(uv) - 0.3; 114 | 115 | float h; 116 | 117 | //slightly based on Waves by bonniem 118 | for(float i = 0.0; i < 10.0; i++) { 119 | //build a simple trig series based on wave shape 120 | //note that waves are in rectangular coords 121 | h = sin(uv.x*8.0+iTime)*0.2*w1+ 122 | sin(uv.x*16.0-2.0*iTime)*0.2*w2 + 123 | sin(uv.x*32.0+3.0*iTime)*0.2*w3 + 124 | sin(uv.x*64.0-4.0*iTime)*0.2*w4; 125 | rad += h * 0.4; 126 | //find the wave section's width in polar coords 127 | wave_width = abs(1.0 / (100.0 * rad)); 128 | wave_amp += wave_width; 129 | } 130 | 131 | //color waves based on sonar shape and screen position 132 | wave_color = vec3(0.2 + w2*1.5, 0.1 + w4*2.0 + uv.y*0.1, 0.1 + w3*2.0+uv.x*0.1); 133 | 134 | #ifdef ALT_MODE 135 | //fade with beat 136 | wave_amp *= beat * 3.0; 137 | #endif 138 | 139 | //modulate with waveform. doesn't do much. 140 | wave_amp *= hwf*2.0; 141 | 142 | 143 | //fade bg in from 0 to 5 sec 144 | final_color = bg_color*smoothstep(0.0,5.0,iChannelTime[0]); 145 | final_color += 0.12*wave_color*wave_amp; 146 | 147 | //postproc code from iq :) 148 | #ifdef POST_PROC 149 | //gamma. remove this for a solarized look 150 | final_color = pow( clamp( final_color, 0.0, 1.0 ), vec3(1.7) ); 151 | 152 | //contrast 153 | final_color = final_color*0.3 + 0.7*final_color*final_color*(3.0-2.0*final_color); 154 | #endif 155 | 156 | //vignette 157 | final_color *= 0.5 + 0.5*pow( 16.0*ouv.x*ouv.y*(1.0-ouv.x)*(1.0-ouv.y), 0.2); 158 | 159 | #ifdef ALT_MODE 160 | // final_color = mix(final_color, vec3(noise), distort * 10.0); 161 | final_color += vec3(noise) * distort * 10.0; 162 | #endif 163 | 164 | fragColor = vec4(final_color, 1.0); 165 | } 166 | /* 167 | split into vwf and hwf 168 | use vwf to self-modulate a texture for distort phase 169 | distort uv of beginning with vwf 170 | text! 171 | simple float arrays for each line, stored at half or less res 172 | use +1 for words, -1 for outline, inbet for glow effect 173 | eg 0.0, 0.1, 0.3, 0.5, 0.9, -1.0, -1.0, 1.0, 1.0... 174 | use timecodes of channel to get a time offset for text anim, 175 | a text centre, and a lyric file. 176 | */ 177 | 178 | /* 179 | Lean out in the window, take a look and see 180 | Metal moons are dreaming both of you and me 181 | Staring in the sky they are for days and weeks 182 | Painting cubes and ribbons like in demoscene 183 | 184 | Circuit-bent, eight-bit made, but how is your heart? 185 | pixel pelt, low-fi brain, that makes you so smart 186 | beeps and voice, glitch and noise, you're not a machine any more 187 | 188 | Coding every minute, coding every bit 189 | parties you can visit, people you can meet 190 | turn on your computer, make a brand new beat 191 | dance it like a human with your robot feet 192 | 193 | What is high definition for 194 | when you still play on Commodore? 195 | 196 | Any more 197 | */ 198 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/audiovisual.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/MsBSzw# 2 | 3 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 4 | { 5 | vec2 p = (fragCoord.xy-.5*iResolution.xy)/min(iResolution.x,iResolution.y); 6 | vec3 c = vec3(0.0); 7 | vec2 uv = fragCoord.xy / iResolution.xy; 8 | float wave = texture( iChannel0, vec2(uv.x,0.75) ).x; 9 | 10 | for(int i = 1; i<20; i++) 11 | { 12 | float time = 2.*3.14*float(i)/20.* (iTime*.9); 13 | float x = sin(time)*1.8*smoothstep( 0.0, 0.15, abs(wave - uv.y)); 14 | float y = sin(.5*time) *smoothstep( 0.0, 0.15, abs(wave - uv.y)); 15 | y*=.5; 16 | vec2 o = .4*vec2(x*cos(iTime*.5),y*sin(iTime*.3)); 17 | float red = fract(time); 18 | float green = 1.-red; 19 | c+=0.016/(length(p-o))*vec3(red,green,sin(iTime)); 20 | } 21 | fragColor = vec4(c,1.0); 22 | } 23 | //2014 - Passion 24 | //References - https://www.shadertoy.com/view/Xds3Rr 25 | // - tokyodemofest.jp/2014/7lines/index.html 26 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/beatingcircles.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/4d23Ww 2 | 3 | const float Pi = 3.14159; 4 | float beat = 0.; 5 | 6 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 7 | { 8 | float ct = iChannelTime[0]; 9 | if ((ct > 8.0 && ct < 33.5) 10 | || (ct > 38.0 && ct < 88.5) 11 | || (ct > 93.0 && ct < 194.5)) 12 | beat = pow(sin(ct*3.1416*3.78+1.9)*0.5+0.5,15.0)*0.1; 13 | 14 | float scale = iResolution.y / 50.0; 15 | float ring = 20.0; 16 | float radius = iResolution.x*1.0; 17 | float gap = scale*.5; 18 | vec2 pos = fragCoord.xy - iResolution.xy*.5; 19 | 20 | float d = length(pos); 21 | 22 | // Create the wiggle 23 | d += beat*2.0*(sin(pos.y*0.25/scale+iTime*cos(ct))*sin(pos.x*0.25/scale+iTime*.5*cos(ct)))*scale*5.0; 24 | 25 | // Compute the distance to the closest ring 26 | float v = mod(d + radius/(ring*2.0), radius/ring); 27 | v = abs(v - radius/(ring*2.0)); 28 | 29 | v = clamp(v-gap, 0.0, 1.0); 30 | 31 | d /= radius; 32 | vec3 m = fract((d-1.0)*vec3(ring*-.5, -ring, ring*.25)*0.5); 33 | 34 | fragColor = vec4(m*v, 1.0); 35 | } 36 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/bpm.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/ldB3D1 2 | 3 | // Created by inigo quilez - iq/2013 4 | // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 5 | 6 | // An example showing the use of iChannelData[] in order to synchronize an aimation 7 | 8 | #define BPM 128.0 9 | 10 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 11 | { 12 | vec2 uv = -1.0+2.0*fragCoord.xy / iResolution.xy; 13 | uv.x *= iResolution.x/iResolution.y; 14 | 15 | vec3 col = vec3(0.0); 16 | 17 | float h = fract( 0.25 + 0.5*iChannelTime[0]*BPM/60.0 ); 18 | float f = 1.0-smoothstep( 0.0, 1.0, h ); 19 | f *= smoothstep( 4.5, 4.51, iChannelTime[0] ); 20 | float r = length(uv-0.0) + 0.2*cos(25.0*h)*exp(-4.0*h); 21 | f = pow(f,0.5)*(1.0-smoothstep( 0.5, 0.55, r) ); 22 | float rn = r/0.55; 23 | col = mix( col, vec3(0.4+1.5*rn,0.1+rn*rn,0.50)*rn, f ); 24 | 25 | 26 | col = mix( col, vec3(1.0), smoothstep( 0.0, 3.0, iChannelTime[0] )*exp( -1.00*max(0.0,iChannelTime[0]- 2.5)) ); 27 | col = mix( col, vec3(1.0), smoothstep( 16.0, 18.0, iChannelTime[0] )*exp( -0.75*max(0.0,iChannelTime[0]-19.0)) ); 28 | 29 | fragColor = vec4(col,1.0); 30 | } 31 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/circlewave.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/Xsf3WB 2 | 3 | const float tau = 6.28318530717958647692; 4 | 5 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 6 | { 7 | vec2 uv = (fragCoord.xy - iResolution.xy*.5)/iResolution.x; 8 | 9 | uv = vec2(abs(atan(uv.x,uv.y)/(.5*tau)),length(uv)); 10 | 11 | // adjust frequency to look pretty 12 | uv.x *= 1.0/2.0; 13 | 14 | float seperation = 0.06*(1.0-iMouse.x/iResolution.x); 15 | 16 | vec3 wave = vec3(0.0); 17 | const int n = 60; 18 | for ( int i=0; i < n; i++ ) 19 | { 20 | /* float u = uv.x*255.0; 21 | float f = fract(u); 22 | f = f*f*(3.0-2.0*f); 23 | u = floor(u); 24 | float sound = mix( texture( iChannel0, vec2((u+.5)/256.0,.75) ).x, texture( iChannel0, vec2((u+1.5)/256.0,.75) ).x, f );*/ 25 | float sound = texture( iChannel0, vec2(uv.x,.75) ).x; 26 | 27 | // choose colour from spectrum 28 | float a = .9*float(i)*tau/float(n)-.6; 29 | vec3 phase = smoothstep(-1.0,.5,vec3(cos(a),cos(a-tau/3.0),cos(a-tau*2.0/3.0))); 30 | 31 | wave += phase*smoothstep(4.0/640.0, 0.0, abs(uv.y - sound*.3)); 32 | uv.x += seperation/float(n); 33 | } 34 | wave *= 3.0/float(n); 35 | 36 | vec3 col = vec3(0); 37 | col.z += texture( iChannel0, vec2(.000,.25) ).x; 38 | col.zy += texture( iChannel0, vec2(.125,.25) ).xx*vec2(1.5,.5); 39 | col.zy += texture( iChannel0, vec2(.250,.25) ).xx; 40 | col.zy += texture( iChannel0, vec2(.375,.25) ).xx*vec2(.5,1.5); 41 | col.y += texture( iChannel0, vec2(.500,.25) ).x; 42 | col.yx += texture( iChannel0, vec2(.625,.25) ).xx*vec2(1.5,.5); 43 | col.yx += texture( iChannel0, vec2(.750,.25) ).xx; 44 | col.yx += texture( iChannel0, vec2(.875,.25) ).xx*vec2(.5,1.5); 45 | col.x += texture( iChannel0, vec2(1.00,.25) ).x; 46 | col /= vec3(4.0,7.0,4.0); 47 | 48 | // vignetting 49 | col *= smoothstep( 1.2, 0.0, uv.y ); 50 | 51 | fragColor = vec4(wave+col,1); 52 | } 53 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/circuits.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/XlX3Rj# 2 | 3 | // This content is under the MIT License. 4 | 5 | #define time iTime*.02 6 | 7 | 8 | #define width .005 9 | float zoom = .18; 10 | 11 | float shape=0.; 12 | vec3 color=vec3(0.),randcol; 13 | 14 | void formula(vec2 z, float c) { 15 | float minit=0.; 16 | float o,ot2,ot=ot2=1000.; 17 | for (int i=0; i<9; i++) { 18 | z=abs(z)/clamp(dot(z,z),.1,.5)-c; 19 | float l=length(z); 20 | o=min(max(abs(min(z.x,z.y)),-l+.25),abs(l-.25)); 21 | ot=min(ot,o); 22 | ot2=min(l*.1,ot2); 23 | minit=max(minit,float(i)*(1.-abs(sign(ot-o)))); 24 | } 25 | minit+=1.; 26 | float w=width*minit*2.; 27 | float circ=pow(max(0.,w-ot2)/w,6.); 28 | shape+=max(pow(max(0.,w-ot)/w,.25),circ); 29 | vec3 col=normalize(.1+texture(iChannel1,vec2(minit*.1)).rgb); 30 | color+=col*(.4+mod(minit/9.-time*10.+ot2*2.,1.)*1.6); 31 | color+=vec3(1.,.7,.3)*circ*(10.-minit)*3.*smoothstep(0.,.5,.15+texture(iChannel0,vec2(.0,1.)).x-.5); 32 | } 33 | 34 | 35 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 36 | { 37 | vec2 pos = fragCoord.xy / iResolution.xy - .5; 38 | pos.x*=iResolution.x/iResolution.y; 39 | vec2 uv=pos; 40 | float sph = length(uv); sph = sqrt(1. - sph*sph)*1.5; 41 | uv=normalize(vec3(uv,sph)).xy; 42 | float a=time+mod(time,1.)*.5; 43 | vec2 luv=uv; 44 | float b=a*5.48535; 45 | uv*=mat2(cos(b),sin(b),-sin(b),cos(b)); 46 | uv+=vec2(sin(a),cos(a*.5))*8.; 47 | uv*=zoom; 48 | float pix=.5/iResolution.x*zoom/sph; 49 | float dof=max(1.,(10.-mod(time,1.)/.01)); 50 | float c=1.5+mod(floor(time),6.)*.125; 51 | for (int aa=0; aa<36; aa++) { 52 | vec2 aauv=floor(vec2(float(aa)/6.,mod(float(aa),6.))); 53 | formula(uv+aauv*pix*dof,c); 54 | } 55 | shape/=36.; color/=36.; 56 | vec3 colo=mix(vec3(.15),color,shape)*(1.-length(pos))*min(1.,abs(.5-mod(time+.5,1.))*10.); 57 | colo*=vec3(1.2,1.1,1.0); 58 | fragColor = vec4(colo,1.0); 59 | } 60 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/coloredbars.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/XsBXW1# 2 | 3 | #define M_PI 3.1415926535897932384626433832795 4 | #define MAXDISTANCE 32. 5 | #define MAXITERATIONS 32 6 | #define PRECISION 1e-3 7 | 8 | float rand(vec2 co){ 9 | return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 10 | } 11 | 12 | float plane(vec3 p, float z) { 13 | return p.z - z; 14 | } 15 | 16 | float udBox(vec3 p, vec3 b, out int object) { 17 | float tme = iTime*2.0 + 1024.0; 18 | 19 | p.y += tme / 2.0; 20 | float rowOffset = rand(vec2(0, floor(p.y/2.0))); 21 | p.x += tme * (2. * rowOffset + texture(iChannel0, vec2(rowOffset,.25)).x/500.); 22 | 23 | object = int(6. * mod(p.x/(32.*6.), 1.)) + 2; 24 | 25 | vec2 c = vec2(32, 2); 26 | p.xy = mod(p.xy, c)-.5*c; 27 | return length(max(abs(p)-b,0.)); 28 | } 29 | 30 | float getMap(vec3 p, out int object) { 31 | float distance = MAXDISTANCE; 32 | float tempDist; 33 | int tempObject; 34 | 35 | distance = plane(p, 0.0); 36 | object = 1; 37 | 38 | tempDist = udBox(p, vec3(12.0, 0.5, 0.5), tempObject); 39 | if (tempDist <= distance) { 40 | distance = tempDist; 41 | object = tempObject; 42 | } 43 | return distance * 0.5; 44 | } 45 | 46 | vec2 castRay(vec3 origin, vec3 direction, out int object) { 47 | float distance = rand(vec2(direction.y * iTime, direction.x)) * 6.0; 48 | float delta = 0.0; 49 | object = 0; 50 | 51 | for (int i = 0; i < MAXITERATIONS; i++) { 52 | vec3 p = origin + direction * distance; 53 | 54 | delta = getMap(p, object); 55 | 56 | distance += delta; 57 | if (delta < PRECISION) { 58 | return vec2(distance, float(i)); 59 | } 60 | if (distance > MAXDISTANCE) { 61 | object = 0; 62 | return vec2(distance, float(i)); 63 | } 64 | } 65 | 66 | object = 0; 67 | return vec2(distance, MAXITERATIONS); 68 | } 69 | 70 | vec3 drawScene(vec3 origin, vec3 direction) { 71 | vec3 color = vec3(0.0, 0.0, 0.0); 72 | int object = 0; 73 | 74 | vec2 ray = castRay(origin, direction, object); 75 | 76 | if (object != 0) { 77 | if (object == 1) { 78 | color = vec3(1.0, 1.0, 1.0); 79 | } 80 | else if (object == 2) { 81 | color = vec3(1.0, 0.3, 0.3); 82 | } 83 | else if (object == 3) { 84 | color = vec3(0.3, 1.0, 0.3); 85 | } 86 | else if (object == 4) { 87 | color = vec3(0.3, 0.3, 1.0); 88 | } 89 | else if (object == 5) { 90 | color = vec3(1.0, 1.0, 0.3); 91 | } 92 | else if (object == 6) { 93 | color = vec3(0.3, 1.0, 1.0); 94 | } 95 | else if (object == 7) { 96 | color = vec3(1.0, 0.3, 1.0); 97 | } 98 | } 99 | return mix(color, vec3(0.0, 0.0, 0.0), ray.y/float(MAXITERATIONS)); 100 | } 101 | 102 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) { 103 | vec2 p = (fragCoord.xy / iResolution.xy) * 2.0 - 1.0; 104 | float aspect = iResolution.x / iResolution.y; 105 | p.x *= aspect; 106 | 107 | vec3 color = vec3(0.0, 0.0, 0.0); 108 | vec3 origin = vec3(0.0, 0.0, 12.0); 109 | vec3 direction = normalize(vec3(p.x, p.y, -1.0)); 110 | direction.xy = mat2(cos(M_PI/4.0), sin(M_PI/4.0), -sin(M_PI/4.0), cos(M_PI/4.0)) * direction.xy; 111 | 112 | color = drawScene(origin, direction); 113 | 114 | fragColor = vec4(color, 1.0); 115 | } 116 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/dancingmetalights.frag.glsl: -------------------------------------------------------------------------------- 1 | // from: https://www.shadertoy.com/view/XdfGRH 2 | 3 | /* 4 | * I believe that the code is clear enough, so I will save comments :) 5 | * But if you need help to understand anything, just tell me. 6 | * This shader is free to use as long it is distributed with credits. 7 | * And, yeah, you can change it. 8 | * 9 | * Author: Danguafer/Silexars 10 | */ 11 | 12 | float beat = 0.; 13 | float mb(vec2 p1, vec2 p0) { return (0.04+beat)/(pow(p1.x-p0.x,2.)+pow(p1.y-p0.y,2.)); } 14 | 15 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 16 | { 17 | float ct = iChannelTime[0]; 18 | if ((ct > 8.0 && ct < 33.5) 19 | || (ct > 38.0 && ct < 88.5) 20 | || (ct > 93.0 && ct < 194.5)) 21 | beat = pow(sin(ct*3.1416*3.78+1.9)*0.5+0.5,15.0)*0.05; 22 | 23 | vec2 mbr,mbg,mbb; 24 | vec2 p = (2.0*fragCoord.xy-iResolution.xy)/iResolution.y; 25 | vec2 o = vec2(pow(p.x,2.),pow(p.y,2.)); 26 | vec3 col = vec3(pow(2.*abs(o.x+o.y)+abs(o.x-o.y),5.)); 27 | col = max(col,1.); 28 | float t=iTime+beat*2.; 29 | 30 | float t2=t*2.0,t3=t*3.0,s2=sin(t2),s3=sin(t3),s4=sin(t*4.0),c2=cos(t2),c3=cos(t3); // Let me extend this line a little more with an useless comment :-) 31 | 32 | mbr = mbg = mbb = vec2(0.); 33 | mbr += vec2(0.10*s4+0.40*c3,0.40*s2 +0.20*c3); 34 | mbg += vec2(0.15*s3+0.30*c2,0.10*-s4+0.30*c3); 35 | mbb += vec2(0.10*s3+0.50*c3,0.10*-s4+0.50*c2); 36 | 37 | col.r *= length(mbr.xy-p.xy); 38 | col.g *= length(mbg.xy-p.xy); 39 | col.b *= length(mbb.xy-p.xy); 40 | col *= pow(mb(mbr,p)+mb(mbg,p)+mb(mbb,p),1.75); 41 | 42 | fragColor = vec4(col,1.); 43 | } 44 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/discotunnel.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/lsBSRR 2 | 3 | float tex(vec2 uv, float s) 4 | { 5 | float col; 6 | float ntiles = 10.0; 7 | 8 | // Calculate the shape of the LEDs 9 | vec2 r = mod(uv * ntiles, 1.0) - vec2(0.5); 10 | col = 1.0 - dot(r, r); 11 | 12 | // Add some light to the tunnel 13 | vec4 n = texture(iChannel1, floor(uv * ntiles) / ntiles); 14 | col *= mod(n.r * n.g * n.b * s + iTime * 0.1 + clamp(s, 0.0, 0.6), 1.0); 15 | return clamp(col, 0.0, 1.0); 16 | } 17 | 18 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 19 | { 20 | vec2 uv = fragCoord.xy / iResolution.xy; 21 | vec2 uv1 = uv * 2.0 - 1.0; 22 | 23 | uv1.x *= iResolution.x / iResolution.y; 24 | 25 | // Calculate new UV coordinates 26 | vec2 center = vec2(0.0, 0.0) + 27 | vec2(0.075*(0.5 + 0.5 * sin(iTime*4.0)), 28 | 0.05*(0.5 + 0.5 * sin(iTime*0.01 + 1.7))); 29 | vec2 p = uv1 - center; 30 | float r = length(p); 31 | float a = atan(p.y, p.x) * 3.0 / 3.14; 32 | vec2 uv2= vec2(1.0 / r + iTime*0.25, a); 33 | 34 | // Read the sound texture 35 | float sound = texture(iChannel2, vec2(0.01, 1.0 - r)).r; 36 | sound = pow(sound, 1.5); 37 | 38 | // Calculate the colors 39 | vec3 c1 = vec3(0.02, 0.1, 0.02); 40 | vec3 c2 = mix( vec3(1.0, 0.6, 0.6), vec3(0.6, 0.6, 1.0), vec3(0.5 + 0.5 * sin(iTime*0.1))); 41 | vec3 c = mix(c1, c2, r); 42 | vec3 coltunnel = sound * c * tex(uv2, sound) + ( 0.15 * texture(iChannel0, uv2).rgb); 43 | vec3 colback = vec3(0.05,0.05,0.05); 44 | 45 | // Mix the colors 46 | fragColor = vec4(r * coltunnel + (1.0 - r) * colback, 1.0); 47 | } 48 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/electricpulse.frag.glsl: -------------------------------------------------------------------------------- 1 | /* 2 | Electric pulse - https://www.shadertoy.com/view/llj3WV 3 | Based on Electric Dream by: mu6k - 21st March, 2014 https://www.shadertoy.com/view/ld23Wd# 4 | Electric pulse by: uNiversal - 27th May, 2015 5 | Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 6 | */ 7 | 8 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 9 | { 10 | vec2 tuv = fragCoord.xy / iResolution.xy; 11 | vec2 uv = fragCoord.xy / iResolution.yy-vec2(0.9,0.5); 12 | 13 | float acc = .0; 14 | float best = .0; 15 | float best_acc = .0; 16 | 17 | for (float i = .0; i<0.5; i+=.008) 18 | { 19 | acc+=texture(iChannel0,vec2(i,1.0)).x-.5; 20 | if (acc>best_acc) 21 | { 22 | best_acc = acc; 23 | best = i; 24 | } 25 | } 26 | 27 | vec3 colorize = vec3(.5); 28 | 29 | for (float i = .0; i< 1.0; i+=.05) 30 | { 31 | colorize[int(i*3.0)]+=texture(iChannel0,vec2(i,9.1)).x*pow(i+.5,.9); 32 | } 33 | 34 | colorize = normalize(colorize); 35 | 36 | float offset = best; 37 | 38 | float osc = texture(iChannel0,vec2(offset+tuv.x*.4 +.1,1.0)).x-.5; 39 | osc += texture(iChannel0,vec2(offset+tuv.x*.4 -.01,2.0)).x-.5; 40 | osc += texture(iChannel0,vec2(offset+tuv.x*.4 +.01,5.0)).x-.5; 41 | osc*=.333; 42 | float boost = texture(iChannel0,vec2(1.0)).x; 43 | float power = pow(boost,9.0); 44 | 45 | vec3 color = vec3(.01); 46 | 47 | color += colorize*vec3((power*.9+.1)*0.02/(abs((power*1.4+.5)*osc-uv.y))); 48 | color += colorize*.2*((.9-power)*.5+.1); 49 | 50 | vec2 buv = uv*(1.0+power*power*power*.2); 51 | buv += vec2(pow(power,12.0)*5.1,iTime*.5); 52 | 53 | color += 54 | color -= length(uv)*1.1; 55 | 56 | color += texture(iChannel0,fragCoord.xy/256.0).xyz*.01; 57 | color = pow(max(vec3(.05),color),vec3(1.5)); 58 | 59 | fragColor = vec4(color,0.5); 60 | } 61 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/fractalland.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/XsBXWt# 2 | 3 | // "Fractal Cartoon" - former "DE edge detection" by Kali 4 | 5 | // There are no lights and no AO, only color by normals and dark edges. 6 | 7 | // update: Nyan Cat cameo, thanks to code from mu6k: https://www.shadertoy.com/view/4dXGWH 8 | 9 | 10 | //#define SHOWONLYEDGES 11 | #define NYAN 12 | #define WAVES 13 | #define BORDER 14 | 15 | #define RAY_STEPS 150 16 | 17 | #define BRIGHTNESS 1.2 18 | #define GAMMA 1.4 19 | #define SATURATION .65 20 | 21 | 22 | #define detail .001 23 | #define t iTime*.5 24 | 25 | 26 | const vec3 origin=vec3(-1.,.7,0.); 27 | float det=0.0; 28 | 29 | 30 | // 2D rotation function 31 | mat2 rot(float a) { 32 | return mat2(cos(a),sin(a),-sin(a),cos(a)); 33 | } 34 | 35 | // "Amazing Surface" fractal 36 | vec4 formula(vec4 p) { 37 | p.xz = abs(p.xz+1.)-abs(p.xz-1.)-p.xz; 38 | p.y-=.25; 39 | p.xy*=rot(radians(35.)); 40 | p=p*2./clamp(dot(p.xyz,p.xyz),.2,1.); 41 | return p; 42 | } 43 | 44 | // Distance function 45 | float de(vec3 pos) { 46 | #ifdef WAVES 47 | pos.y+=sin(pos.z-t*6.)*.15; //waves! 48 | #endif 49 | float hid=0.; 50 | vec3 tpos=pos; 51 | tpos.z=abs(3.-mod(tpos.z,6.)); 52 | vec4 p=vec4(tpos,1.); 53 | for (int i=0; i<4; i++) {p=formula(p);} 54 | float fr=(length(max(vec2(0.),p.yz-1.5))-1.)/p.w; 55 | float ro=max(abs(pos.x+1.)-.3,pos.y-.35); 56 | ro=max(ro,-max(abs(pos.x+1.)-.1,pos.y-.5)); 57 | pos.z=abs(.25-mod(pos.z,.5)); 58 | ro=max(ro,-max(abs(pos.z)-.2,pos.y-.3)); 59 | ro=max(ro,-max(abs(pos.z)-.01,-pos.y+.32)); 60 | float d=min(fr,ro); 61 | return d; 62 | } 63 | 64 | 65 | // Camera path 66 | vec3 path(float ti) { 67 | ti*=1.5; 68 | vec3 p=vec3(sin(ti),(1.-sin(ti*2.))*.5,-ti*5.)*.5; 69 | return p; 70 | } 71 | 72 | // Calc normals, and here is edge detection, set to variable "edge" 73 | 74 | float edge=0.; 75 | vec3 normal(vec3 p) { 76 | vec3 e = vec3(0.0,det*5.,0.0); 77 | 78 | float d1=de(p-e.yxx),d2=de(p+e.yxx); 79 | float d3=de(p-e.xyx),d4=de(p+e.xyx); 80 | float d5=de(p-e.xxy),d6=de(p+e.xxy); 81 | float d=de(p); 82 | edge=abs(d-0.5*(d2+d1))+abs(d-0.5*(d4+d3))+abs(d-0.5*(d6+d5));//edge finder 83 | edge=min(1.,pow(edge,.55)*15.); 84 | return normalize(vec3(d1-d2,d3-d4,d5-d6)); 85 | } 86 | 87 | 88 | // Used Nyan Cat code by mu6k, with some mods 89 | 90 | vec4 rainbow(vec2 p) 91 | { 92 | float q = max(p.x,-0.1); 93 | float s = sin(p.x*7.0+t*70.0)*0.08; 94 | p.y+=s; 95 | p.y*=1.1; 96 | 97 | vec4 c; 98 | if (p.x>0.0) c=vec4(0,0,0,0); else 99 | if (0.0/6.00.2) color.a=0.0; 122 | return color; 123 | } 124 | 125 | 126 | // Raymarching and 2D graphics 127 | 128 | vec3 raymarch(in vec3 from, in vec3 dir) 129 | 130 | { 131 | edge=0.; 132 | vec3 p, norm; 133 | float d=100.; 134 | float totdist=0.; 135 | for (int i=0; idet && totdist<25.0) { 137 | p=from+totdist*dir; 138 | d=de(p); 139 | det=detail*exp(.13*totdist); 140 | totdist+=d; 141 | } 142 | } 143 | vec3 col=vec3(0.); 144 | p-=(det-d)*dir; 145 | norm=normal(p); 146 | #ifdef SHOWONLYEDGES 147 | col=1.-vec3(edge); // show wireframe version 148 | #else 149 | col=(1.-abs(norm))*max(0.,1.-edge*.8); // set normal as color with dark edges 150 | #endif 151 | totdist=clamp(totdist,0.,26.); 152 | dir.y-=.02; 153 | float sunsize=7.-max(0.,texture(iChannel0,vec2(.6,.2)).x)*5.; // responsive sun size 154 | float an=atan(dir.x,dir.y)+iTime*1.5; // angle for drawing and rotating sun 155 | float s=pow(clamp(1.0-length(dir.xy)*sunsize-abs(.2-mod(an,.4)),0.,1.),.1); // sun 156 | float sb=pow(clamp(1.0-length(dir.xy)*(sunsize-.2)-abs(.2-mod(an,.4)),0.,1.),.1); // sun border 157 | float sg=pow(clamp(1.0-length(dir.xy)*(sunsize-4.5)-.5*abs(.2-mod(an,.4)),0.,1.),3.); // sun rays 158 | float y=mix(.45,1.2,pow(smoothstep(0.,1.,.75-dir.y),2.))*(1.-sb*.5); // gradient sky 159 | 160 | // set up background with sky and sun 161 | vec3 backg=vec3(0.5,0.,1.)*((1.-s)*(1.-sg)*y+(1.-sb)*sg*vec3(1.,.8,0.15)*3.); 162 | backg+=vec3(1.,.9,.1)*s; 163 | backg=max(backg,sg*vec3(1.,.9,.5)); 164 | 165 | col=mix(vec3(1.,.9,.3),col,exp(-.004*totdist*totdist));// distant fading to sun color 166 | if (totdist>25.) col=backg; // hit background 167 | col=pow(col,vec3(GAMMA))*BRIGHTNESS; 168 | col=mix(vec3(length(col)),col,SATURATION); 169 | #ifdef SHOWONLYEDGES 170 | col=1.-vec3(length(col)); 171 | #else 172 | col*=vec3(1.,.9,.85); 173 | #ifdef NYAN 174 | dir.yx*=rot(dir.x); 175 | vec2 ncatpos=(dir.xy+vec2(-3.+mod(-t,6.),-.27)); 176 | vec4 ncat=nyan(ncatpos*5.); 177 | vec4 rain=rainbow(ncatpos*10.+vec2(.8,.5)); 178 | if (totdist>8.) col=mix(col,max(vec3(.2),rain.xyz),rain.a*.9); 179 | if (totdist>8.) col=mix(col,max(vec3(.2),ncat.xyz),ncat.a*.9); 180 | #endif 181 | #endif 182 | return col; 183 | } 184 | 185 | // get camera position 186 | vec3 move(inout vec3 dir) { 187 | vec3 go=path(t); 188 | vec3 adv=path(t+.7); 189 | float hd=de(adv); 190 | vec3 advec=normalize(adv-go); 191 | float an=adv.x-go.x; an*=min(1.,abs(adv.z-go.z))*sign(adv.z-go.z)*.7; 192 | dir.xy*=mat2(cos(an),sin(an),-sin(an),cos(an)); 193 | an=advec.y*1.7; 194 | dir.yz*=mat2(cos(an),sin(an),-sin(an),cos(an)); 195 | an=atan(advec.x,advec.z); 196 | dir.xz*=mat2(cos(an),sin(an),-sin(an),cos(an)); 197 | return go; 198 | } 199 | 200 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 201 | { 202 | vec2 uv = fragCoord.xy / iResolution.xy*2.-1.; 203 | vec2 oriuv=uv; 204 | uv.y*=iResolution.y/iResolution.x; 205 | vec2 mouse=(iMouse.xy/iResolution.xy-.5)*3.; 206 | if (iMouse.z<1.) mouse=vec2(0.,-0.05); 207 | float fov=.9-max(0.,.7-iTime*.3); 208 | vec3 dir=normalize(vec3(uv*fov,1.)); 209 | dir.yz*=rot(mouse.y); 210 | dir.xz*=rot(mouse.x); 211 | vec3 from=origin+move(dir); 212 | vec3 color=raymarch(from,dir); 213 | #ifdef BORDER 214 | color=mix(vec3(0.),color,pow(max(0.,.95-length(oriuv*oriuv*oriuv*vec2(1.05,1.1))),.3)); 215 | #endif 216 | fragColor = vec4(color,1.); 217 | } 218 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/gameboy.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/XdlGzr 2 | 3 | // Created by inigo quilez - iq/2013 4 | // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 5 | 6 | // Created by inigo quilez - iq/2013 7 | // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 8 | 9 | float text( vec2 p ) 10 | { 11 | // trick for encoding fonts from CPU 12 | p.x += 0.2*floor(10.0*(0.5+0.5*sin(iTime)))/10.0; 13 | 14 | float x = floor( p.x*100.0 ) - 23.0; 15 | float y = floor( p.y*100.0 ) - 82.0; 16 | 17 | if( y<0.0 || y> 5.0) return 0.0; 18 | if( x<0.0 || x>70.0) return 0.0; 19 | 20 | float v = 0.0; 21 | 22 | if( x>63.5 ) { v=12288.0; 23 | if(y>2.5) v=30720.0; 24 | if(y>3.5) v=52224.0; } 25 | else if( x>47.5 ) { v=12408.0; 26 | if(y>0.5) v=12492.0; 27 | if(y>4.5) v=64632.0; } 28 | else if( x>31.5 ) { v=64716.0; 29 | if(y>0.5) v=49360.0; 30 | if(y>1.5) v=49400.0; 31 | if(y>2.5) v=63692.0; 32 | if(y>3.5) v=49356.0; 33 | if(y>4.5) v=64760.0; } 34 | else if( x>15.5 ) { v=40184.0; 35 | if(y>0.5) v=40092.0; 36 | if(y>2.5) v=64668.0; 37 | if(y>3.5) v=40092.0; 38 | if(y>4.5) v=28920.0; } 39 | else { v=30860.0; 40 | if(y>0.5) v=40076.0; 41 | if(y>1.5) v= 7308.0; 42 | if(y>2.5) v=30972.0; 43 | if(y>3.5) v=49292.0; 44 | if(y>4.5) v=30860.0; } 45 | 46 | return floor( mod(v/pow(2.0,15.0-mod( x, 16.0 )), 2.0) ); 47 | } 48 | 49 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 50 | { 51 | vec2 uv = fragCoord.xy / iResolution.xy; 52 | vec2 uvo = uv; 53 | 54 | vec2 res = floor( 60.0*vec2(1.0,iResolution.y/iResolution.x) ); 55 | 56 | vec3 col = vec3(131.0, 145.0, 0.0); 57 | if( uv.x>0.03 && uv.x<0.97 ) 58 | { 59 | uv.x = clamp( (uv.x-0.03)/0.94, 0.0, 1.0 ); 60 | 61 | vec2 iuv = floor( uv * res )/res; 62 | 63 | float f = 1.0-abs(-1.0+2.0*fract( uv.x * res.x )); 64 | float g = 1.0-abs(-1.0+2.0*fract( uv.y * res.y )); 65 | 66 | float fft = texture( iChannel0, vec2(iuv.x,0.25) ).x; 67 | fft = 0.8*fft*fft; 68 | if( iuv.y0.1 && g>0.1 ) col = vec3(40.0,44.0,4.0); 71 | if( f>0.5 && g>0.5 ) col = vec3(74.0,82.0,4.0); 72 | } 73 | 74 | 75 | float wave = texture( iChannel0, vec2(iuv.x*0.5,0.75) ).x; 76 | if( abs(iuv.y-wave)<=(1.0/res.y) ) 77 | { 78 | col = vec3(185.0, 200.0, 90.0); 79 | } 80 | 81 | float t = text( uvo ); 82 | col = mix( col, vec3(40.0,44.0,4.0), t ); 83 | } 84 | else 85 | { 86 | float g = 1.0-abs(-1.0+2.0*fract( uv.y * res.y*1.5 )); 87 | float f = 1.0-abs(-1.0+2.0*fract( uv.x * res.x + 0.5*floor(uv.y*res.y*1.5))); 88 | 89 | if( g<0.15 || f<0.15 ) col = vec3(40.0,44.0,4.0); 90 | } 91 | 92 | fragColor = vec4( col/255.0,1.0 ); 93 | } 94 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/input.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/Xds3Rr 2 | 3 | // Created by inigo quilez - iq/2013 4 | // License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 5 | 6 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 7 | { 8 | // create pixel coordinates 9 | vec2 uv = fragCoord.xy / iResolution.xy; 10 | 11 | // first texture row is frequency data 12 | float fft = texture2D( iChannel0, vec2(uv.x,0.25) ).x; 13 | 14 | // second texture row is the sound wave 15 | float wave = texture2D( iChannel0, vec2(uv.x,0.75) ).x; 16 | 17 | // convert frequency to colors 18 | vec3 col = vec3( fft, 4.0*fft*(1.0-fft), 1.0-fft ) * fft; 19 | 20 | // add wave form on top 21 | col += 1.0 - smoothstep( 0.0, 0.15, abs(wave - uv.y) ); 22 | 23 | // output final color 24 | fragColor = vec4(col,1.0); 25 | } 26 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/io.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/XsfGDS 2 | // I/O fragment shader by movAX13h, August 2013 3 | 4 | // I/O fragment shader by movAX13h, August 2013 5 | 6 | #define SHOW_BLOCKS 7 | 8 | float rand(float x) 9 | { 10 | return fract(sin(x) * 4358.5453123); 11 | } 12 | 13 | float rand(vec2 co) 14 | { 15 | return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5357); 16 | } 17 | 18 | float box(vec2 p, vec2 b, float r) 19 | { 20 | return length(max(abs(p)-b,0.0))-r; 21 | } 22 | 23 | float sampleMusic() 24 | { 25 | return 0.5 * ( 26 | //texture( iChannel0, vec2( 0.01, 0.25 ) ).x + 27 | //texture( iChannel0, vec2( 0.07, 0.25 ) ).x + 28 | texture( iChannel0, vec2( 0.15, 0.25 ) ).x + 29 | texture( iChannel0, vec2( 0.30, 0.25 ) ).x); 30 | } 31 | 32 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 33 | { 34 | const float speed = 0.7; 35 | const float ySpread = 1.6; 36 | const int numBlocks = 70; 37 | 38 | float pulse = sampleMusic(); 39 | 40 | vec2 uv = fragCoord.xy / iResolution.xy - 0.5; 41 | float aspect = iResolution.x / iResolution.y; 42 | vec3 baseColor = uv.x > 0.0 ? vec3(0.0,0.3, 0.6) : vec3(0.6, 0.0, 0.3); 43 | 44 | vec3 color = pulse*baseColor*0.5*(0.9-cos(uv.x*8.0)); 45 | uv.x *= aspect; 46 | 47 | for (int i = 0; i < numBlocks; i++) 48 | { 49 | float z = 1.0-0.7*rand(float(i)*1.4333); // 0=far, 1=near 50 | float tickTime = iTime*z*speed + float(i)*1.23753; 51 | float tick = floor(tickTime); 52 | 53 | vec2 pos = vec2(0.6*aspect*(rand(tick)-0.5), sign(uv.x)*ySpread*(0.5-fract(tickTime))); 54 | pos.x += 0.24*sign(pos.x); // move aside 55 | if (abs(pos.x) < 0.1) pos.x++; // stupid fix; sign sometimes returns 0 56 | 57 | vec2 size = 1.8*z*vec2(0.04, 0.04 + 0.1*rand(tick+0.2)); 58 | float b = box(uv-pos, size, 0.01); 59 | float dust = z*smoothstep(0.22, 0.0, b)*pulse*0.5; 60 | #ifdef SHOW_BLOCKS 61 | float block = 0.2*z*smoothstep(0.002, 0.0, b); 62 | float shine = 0.6*z*pulse*smoothstep(-0.002, b, 0.007); 63 | color += dust*baseColor + block*z + shine; 64 | #else 65 | color += dust*baseColor; 66 | #endif 67 | } 68 | 69 | color -= rand(uv)*0.04; 70 | fragColor = vec4(color, 1.0); 71 | } 72 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/kaleidoscopevisualizer.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/ldsXWn# 2 | 3 | // ---- change here kaleidoscope size and toggle on/off---- 4 | const float USE_KALEIDOSCOPE = 1.0; 5 | const float NUM_SIDES = 8.0; 6 | 7 | // ---- Change the amount at which the visualizer reacts to music (per song different settings work best) ---- 8 | const float MIN_SIZE = 0.01; 9 | const float REACT_INTENSITY = 0.3; 10 | const float BASS_INTENSITY = 1.1; 11 | const float BASS_BASE_HEIGHT = .0; 12 | const float ZOOM_FACTOR = 0.5; 13 | 14 | // math const 15 | const float PI = 3.14159265359; 16 | const float DEG_TO_RAD = PI / 180.0; 17 | 18 | // -4/9(r/R)^6 + (17/9)(r/R)^4 - (22/9)(r/R)^2 + 1.0 19 | float field( vec2 p, vec2 center, float r ) { 20 | float d = length( p - center ) / r; 21 | 22 | float t = d * d; 23 | float tt = t * d; 24 | float ttt = tt * d; 25 | 26 | float v = 27 | ( - 10.0 / 9.0 ) * ttt + 28 | ( 17.0 / 9.0 ) * tt + 29 | ( -22.0 / 9.0 ) * t + 30 | 1.0; 31 | 32 | return clamp( v, 0.0, 1.0 ); 33 | } 34 | 35 | vec2 Kaleidoscope( vec2 uv, float n, float bias ) { 36 | float angle = PI / n; 37 | 38 | float r = length( uv*.5 ); 39 | float a = atan( uv.y, uv.x ) / angle; 40 | 41 | a = mix( fract( a ), 1.0 - fract( a ), mod( floor( a ), 2.0 ) ) * angle; 42 | 43 | return vec2( cos( a ), sin( a ) ) * r; 44 | } 45 | 46 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 47 | { 48 | vec2 ratio = iResolution.xy / min( iResolution.x, iResolution.y ); 49 | vec2 uv = ( fragCoord.xy * 2.0 - iResolution.xy ) / min( iResolution.x, iResolution.y ); 50 | 51 | // --- Kaleidoscope --- 52 | uv = mix( uv, Kaleidoscope( uv, NUM_SIDES, iChannelTime[1]*10. ), USE_KALEIDOSCOPE ); 53 | 54 | uv *= ZOOM_FACTOR+(BASS_INTENSITY)* (texture(iChannel1, vec2(.01,0)).r); 55 | 56 | vec3 final_color = vec3( 0.0 ); 57 | float final_density = 0.0; 58 | for ( int i = 0; i < 128; i++ ) { 59 | vec4 noise = texture( iChannel0, vec2( float( i ) + 0.5, 0.5 ) / 256.0 ); 60 | vec4 noise2 = texture( iChannel0, vec2( float( i ) + 0.5, 9.5 ) / 256.0 ); 61 | 62 | 63 | //sound loudness to intensity 64 | float velintensity = texture(iChannel1, vec2(1.0+uv.x,0)).r; 65 | 66 | // velocity 67 | vec2 vel = -abs(noise.xy) * 3.0 +vec2( .003*-velintensity )-vec2(2.0); 68 | vel*=-.5; 69 | 70 | // center 71 | vec2 pos = noise.xy; 72 | pos += iChannelTime[1] * vel * 0.2; 73 | pos = mix( fract( pos ),fract( pos ), mod( floor( pos ), 2.0 ) ); 74 | 75 | //sound loudness to intensity 76 | float intensity = texture(iChannel1, vec2(pos.y,0)).r; 77 | 78 | // remap to screen 79 | pos = ( pos * 2.0 - 1.0 ) * ratio; 80 | 81 | 82 | 83 | // radius 84 | float radius = clamp( noise.w, 0.3, 0.8 ); 85 | radius *= 3.*intensity; 86 | //radius += 0.5; 87 | radius *= radius * 0.4; 88 | radius = clamp(radius, MIN_SIZE*abs(-pos.x), REACT_INTENSITY); 89 | 90 | // color 91 | vec3 color = noise2.xyz; 92 | 93 | // density 94 | float density = field( uv, pos, radius ); 95 | 96 | // accumulate 97 | final_density += density; 98 | final_color += density * color; 99 | } 100 | 101 | final_density = clamp( final_density - 0.1, 0.0, 1.0 ); 102 | final_density = pow( final_density, 3.0 ); 103 | 104 | fragColor = vec4( final_color * final_density, final_density ); 105 | } 106 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/ledspectrum.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/Msl3zr 2 | 3 | const float PI = 3.14159; 4 | 5 | // http://github.prideout.net/barrel-distortion/ 6 | vec2 distort(vec2 p, float power) 7 | { 8 | float a = atan(p.y, p.x); 9 | float r = length(p); 10 | r = pow(r, power); 11 | return vec2(r * cos(a), r*sin(a)); 12 | //return vec2((a / PI), r*2.0-1.0); // polar 13 | } 14 | 15 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 16 | { 17 | // create pixel coordinates 18 | vec2 uv = fragCoord.xy / iResolution.xy; 19 | 20 | // distort 21 | float bass = texture( iChannel0, vec2(0, 0) ).x; 22 | uv = distort(uv*2.0-1.0, 0.5+bass)*0.5+0.5; 23 | 24 | // quantize coordinates 25 | const float bands = 20.0; 26 | const float segs = 20.0; 27 | vec2 p; 28 | p.x = floor(uv.x*bands)/bands; 29 | p.y = floor(uv.y*segs)/segs; 30 | 31 | // read frequency data from first row of texture 32 | float fft = texture( iChannel0, vec2(p.x,0.0) ).x; 33 | 34 | // led color 35 | vec3 color = mix(vec3(0.0, 2.0, 0.0), vec3(2.0, 0.0, 0.0), sqrt(uv.y)); 36 | 37 | // mask for bar graph 38 | float mask = (p.y < fft) ? 1.0 : 0.0; 39 | 40 | // led shape 41 | vec2 d = fract((uv - p)*vec2(bands, segs)) - 0.5; 42 | float led = smoothstep(0.5, 0.3, abs(d.x)) * 43 | smoothstep(0.5, 0.3, abs(d.y)); 44 | vec3 ledColor = led*color*mask; 45 | 46 | // second texture row is the sound wave 47 | float wave = texture( iChannel0, vec2(uv.x, 0.75) ).x; 48 | vec3 waveColor = vec3(0.001, 0.01, 0.04) / abs(wave - uv.y); 49 | 50 | // output final color 51 | //fragColor = vec4(vec3(fft),1.0); 52 | //fragColor = vec4(d, 0.0, 1.0); 53 | //fragColor = vec4(ledColor, 1.0); 54 | //fragColor = vec4(waveColor, 1.0); 55 | fragColor = vec4(ledColor + waveColor, 1.0); 56 | } 57 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_display_GL.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform sampler2D uTexture; 4 | 5 | in vec2 vTextureCoord; 6 | 7 | out vec4 FragColor; 8 | 9 | void main(void) 10 | { 11 | FragColor = texture(uTexture, vTextureCoord); 12 | } 13 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_display_GL.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | in vec4 vertex; 4 | out vec2 vTextureCoord; 5 | 6 | void main(void) 7 | { 8 | gl_Position = vertex; 9 | vTextureCoord = vertex.xy*0.5+0.5; 10 | } 11 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_display_GLES.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | precision mediump int; 5 | 6 | varying vec2 vTextureCoord; 7 | 8 | uniform sampler2D uTexture; 9 | 10 | void main(void) 11 | { 12 | gl_FragColor = texture2D(uTexture, vTextureCoord); 13 | } 14 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_display_GLES.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | precision mediump float; 4 | precision mediump int; 5 | 6 | attribute vec4 vertex; 7 | 8 | varying vec2 vTextureCoord; 9 | 10 | void main(void) 11 | { 12 | gl_Position = vertex; 13 | vTextureCoord = vertex.xy*0.5+0.5; 14 | } 15 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_shadertoy_GL.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | uniform vec2 uScale; 4 | 5 | in vec4 vertex; 6 | out vec2 vTextureCoord; 7 | 8 | void main(void) 9 | { 10 | gl_Position = vertex; 11 | vTextureCoord = vertex.xy*0.5+0.5; 12 | vTextureCoord.x = vTextureCoord.x * uScale.x; 13 | vTextureCoord.y = vTextureCoord.y * uScale.y; 14 | } 15 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_shadertoy_GLES.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 100 2 | 3 | attribute vec4 vertex; 4 | 5 | varying vec2 vTextureCoord; 6 | 7 | uniform vec2 uScale; 8 | 9 | void main(void) 10 | { 11 | gl_Position = vertex; 12 | vTextureCoord = vertex.xy*0.5+0.5; 13 | vTextureCoord.x = vTextureCoord.x * uScale.x; 14 | vTextureCoord.y = vTextureCoord.y * uScale.y; 15 | } 16 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/main_test.frag.glsl: -------------------------------------------------------------------------------- 1 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 2 | { 3 | float y = ( fragCoord.y / iResolution.y ) * 26.0; 4 | float x = 1.0 - ( fragCoord.x / iResolution.x ); 5 | float b = fract( pow( 2.0, floor(y) ) + x ); 6 | if (fract(y) >= 0.9) 7 | b = 0.0; 8 | fragColor = vec4(b, b, b, 1.0 ); 9 | } 10 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/nyancat.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/4dXGWH 2 | 3 | /*by mu6k, Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. 4 | 5 | I started animating the nyancat image. I looked up the original colors 6 | for rainbow and background. I kept adding stuff until I ended up with 7 | something I could watch for 10 hours. Nah 10 hours is too long... or is it? 8 | 9 | Feel free to tweak the quality parameter... if you have a monster pc. 10 | 11 | quality 1 - no AA, extremely noisy blur. 12 | quality 2 - 2xAA, decent 13 | quality 3 - 3xAA, slow here on fullscreen 14 | quality 4 - 4xAA, doesn't even compile here 15 | 16 | Enjoy! 17 | 18 | 04/05/2013: 19 | - published 20 | 21 | muuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuusk!*/ 22 | 23 | #define quality 2 24 | 25 | float hash(float x) 26 | { 27 | return fract(sin(x*.0127863)*17143.321); 28 | } 29 | 30 | float hash(vec2 x) 31 | { 32 | return fract(sin(dot(x,vec2(1.4,52.14)))*17143.321); 33 | } 34 | 35 | 36 | float hashmix(float x0, float x1, float interp) 37 | { 38 | x0 = hash(x0); 39 | x1 = hash(x1); 40 | #ifdef noise_use_smoothstep 41 | interp = smoothstep(0.0,1.0,interp); 42 | #endif 43 | return mix(x0,x1,interp); 44 | } 45 | 46 | float hashmix(vec2 p0, vec2 p1, vec2 interp) 47 | { 48 | float v0 = hashmix(p0[0]+p0[1]*128.0,p1[0]+p0[1]*128.0,interp[0]); 49 | float v1 = hashmix(p0[0]+p1[1]*128.0,p1[0]+p1[1]*128.0,interp[0]); 50 | #ifdef noise_use_smoothstep 51 | interp = smoothstep(vec2(0.0),vec2(1.0),interp); 52 | #endif 53 | return mix(v0,v1,interp[1]); 54 | } 55 | 56 | float hashmix(vec3 p0, vec3 p1, vec3 interp) 57 | { 58 | float v0 = hashmix(p0.xy+vec2(p0.z*43.0,0.0),p1.xy+vec2(p0.z*43.0,0.0),interp.xy); 59 | float v1 = hashmix(p0.xy+vec2(p1.z*43.0,0.0),p1.xy+vec2(p1.z*43.0,0.0),interp.xy); 60 | #ifdef noise_use_smoothstep 61 | interp = smoothstep(vec3(0.0),vec3(1.0),interp); 62 | #endif 63 | return mix(v0,v1,interp[2]); 64 | } 65 | 66 | float hashmix(vec4 p0, vec4 p1, vec4 interp) 67 | { 68 | float v0 = hashmix(p0.xyz+vec3(p0.w*17.0,0.0,0.0),p1.xyz+vec3(p0.w*17.0,0.0,0.0),interp.xyz); 69 | float v1 = hashmix(p0.xyz+vec3(p1.w*17.0,0.0,0.0),p1.xyz+vec3(p1.w*17.0,0.0,0.0),interp.xyz); 70 | #ifdef noise_use_smoothstep 71 | interp = smoothstep(vec4(0.0),vec4(1.0),interp); 72 | #endif 73 | return mix(v0,v1,interp[3]); 74 | } 75 | 76 | float noise(float p) 77 | { 78 | float pm = mod(p,1.0); 79 | float pd = p-pm; 80 | return hashmix(pd,pd+1.0,pm); 81 | } 82 | 83 | float noise(vec2 p) 84 | { 85 | vec2 pm = mod(p,1.0); 86 | vec2 pd = p-pm; 87 | return hashmix(pd,(pd+vec2(1.0,1.0)), pm); 88 | } 89 | 90 | float noise(vec3 p) 91 | { 92 | vec3 pm = mod(p,1.0); 93 | vec3 pd = p-pm; 94 | return hashmix(pd,(pd+vec3(1.0,1.0,1.0)), pm); 95 | } 96 | 97 | float noise(vec4 p) 98 | { 99 | vec4 pm = mod(p,1.0); 100 | vec4 pd = p-pm; 101 | return hashmix(pd,(pd+vec4(1.0,1.0,1.0,1.0)), pm); 102 | } 103 | 104 | vec3 background(vec2 p) 105 | { 106 | vec2 pm = mod(p,vec2(0.5)); 107 | float q = pm.x+pm.y; 108 | vec3 color = vec3(13,66,121)/255.0; 109 | 110 | vec2 visuv = p*0.5; 111 | vec2 visuvm = mod(visuv,vec2(0.05,0.05)); 112 | visuv-=visuvm; 113 | float vis = texture2D(iChannel0,vec2((visuv.x+1.0)*.5,0.0)).y*2.0-visuv.y; 114 | 115 | if (vis>1.0&&visuvm.x<0.04&&visuvm.y<0.04) 116 | color.xyz *=0.85; 117 | 118 | vec2 p2; 119 | float stars; 120 | for (int i=0; i<5; i++) 121 | { 122 | float s = float(i)*0.2+1.0; 123 | //float ts 124 | p2=p*s+vec2(iGlobalTime/s,s*16.0)-mod(p*s+vec2(iGlobalTime/s,s*16.0),vec2(0.05)); 125 | stars=noise(p2*16.0); 126 | if (stars>0.98) color=vec3(1.0,1.0,1.0); 127 | } 128 | 129 | vec2 visuv2 = p*0.25+vec2(iGlobalTime*0.1,0); 130 | vec2 visuvm2 = mod(visuv2,vec2(0.05,0.05)); 131 | visuv2-=visuvm2; 132 | 133 | float vis2p = hash(visuv2); 134 | float vis2 = texture2D(iChannel0,vec2(vis2p,0)).y; 135 | 136 | vis2 = pow(vis2,20.0)*261.0; 137 | vis2 *= vis2p; 138 | 139 | if (vis2>1.0) vis2=1.0; 140 | 141 | if (vis2>0.2&&visuvm2.x<0.09&&visuvm2.y<0.09) 142 | color+=vec3(vis2,vis2,vis2)*0.5; 143 | 144 | return color; 145 | } 146 | 147 | vec4 rainbow(vec2 p) 148 | { 149 | 150 | p.x-=mod(p.x,0.05); 151 | float q = max(p.x,-0.1); 152 | float s = sin(p.x*(8.0)+iGlobalTime*8.0)*0.09; 153 | s-=mod(s,0.05); 154 | p.y+=s; 155 | 156 | 157 | //p.y += sin(p.x*8.0+iGlobalTime)*0.25; 158 | 159 | vec4 c; 160 | 161 | if (p.x>0.0) c=vec4(0,0,0,0); else 162 | if (0.0/6.00.2) color.a=0.0; 181 | return color; 182 | } 183 | 184 | vec4 scene(vec2 uv) 185 | { 186 | 187 | vec4 color = nyan(uv); 188 | vec3 c2 = background(uv+vec2(0,0)); 189 | vec4 c3 = rainbow(vec2(uv.x+0.4,0.05-uv.y*2.0+.5)); 190 | 191 | vec4 c4 = mix(vec4(c2,1.0),c3,c3.a); 192 | 193 | color = mix(c4,color,color[3]); 194 | return color; 195 | } 196 | 197 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 198 | { 199 | float vol = .0; 200 | for(float x = 0.0; x<1.0; x+=1.0/256.0) 201 | { 202 | vol += texture2D(iChannel0,vec2(x,0.0)).y; 203 | } 204 | vol*=1.0/256.0; 205 | vol = pow(vol,16.0)*256.0; 206 | 207 | 208 | vec2 uv = fragCoord.xy / iResolution.xy-0.5; 209 | uv.x*=iResolution.x/iResolution.y; 210 | vec2 ouv=uv; 211 | float t = iGlobalTime-length(uv)*0.5; 212 | 213 | uv.x+=sin(t*0.4)*0.05; 214 | uv.y+=cos(t)*0.05; 215 | 216 | 217 | float angle = (cos(t*0.461)+cos(t*0.71)+cos(t*0.342)+cos(t*0.512))*0.2; 218 | angle+=sin(t*16.0)*vol*0.1; 219 | float zoom = (cos(t*0.364)+cos(t*0.686)+cos(t*0.286)+cos(t*0.496))*0.2; 220 | uv*=pow(2.0,zoom+1.0-vol*4.0); 221 | uv=uv*mat2(cos(angle),-sin(angle),sin(angle),cos(angle)); 222 | 223 | 224 | vec4 color = vec4(0); 225 | 226 | uv.y+=vol; 227 | 228 | for(int x = 0; x 0.5) 7 | { 8 | uv -= 0.5; 9 | uv *= 2.; 10 | } 11 | else 12 | { 13 | uv *= 2.; 14 | uv = 1. - uv; 15 | } 16 | 17 | float fft = texture( iChannel0, vec2(uv.x,0.25) ).x; 18 | float dr = length(uv); 19 | float radius = 1.8; 20 | 21 | vec3 col = vec3(0.); 22 | if( abs(uv.y)61.8 && iChannelTime[0]<65.0 ) 150 | col *= vec3(1.0)*clamp( (iChannelTime[0]-61.8)/(65.0-61.8), 0.0, 1.0 ); 151 | 152 | 153 | col *= 0.15+0.85*pow( 16.0*q.x*q.y*(1.0-q.x)*(1.0-q.y), 0.15 ); 154 | 155 | fragColor=vec4( col, 1.0 ); 156 | } 157 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/shaders/wavesremix.frag.glsl: -------------------------------------------------------------------------------- 1 | // Taken from https://www.shadertoy.com/view/4ljGD1 2 | 3 | float squared(float value) { return value * value; } 4 | 5 | float getAmp(float frequency) { return texture(iChannel0, vec2(frequency / 512.0, 0)).x; } 6 | 7 | float getWeight(float f) { 8 | return (+ getAmp(f-2.0) + getAmp(f-1.0) + getAmp(f+2.0) + getAmp(f+1.0) + getAmp(f)) / 5.0; } 9 | 10 | void mainImage( out vec4 fragColor, in vec2 fragCoord ) 11 | { 12 | vec2 uvTrue = fragCoord.xy / iResolution.xy; 13 | vec2 uv = -1.0 + 2.0 * uvTrue; 14 | 15 | float lineIntensity; 16 | float glowWidth; 17 | vec3 color = vec3(0.0); 18 | 19 | for(float i = 0.0; i < 5.0; i++) { 20 | 21 | uv.y += (0.2 * sin(uv.x + i/7.0 - iTime * 0.6)); 22 | float Y = uv.y + getWeight(squared(i) * 20.0) * 23 | (texture(iChannel0, vec2(uvTrue.x, 1)).x - 0.5); 24 | lineIntensity = 0.4 + squared(1.6 * abs(mod(uvTrue.x + i / 1.3 + iTime,2.0) - 1.0)); 25 | glowWidth = abs(lineIntensity / (150.0 * Y)); 26 | color += vec3(glowWidth * (2.0 + sin(iTime * 0.13)), 27 | glowWidth * (2.0 - sin(iTime * 0.23)), 28 | glowWidth * (2.0 - cos(iTime * 0.19))); 29 | } 30 | 31 | fragColor = vec4(color, 1.0); 32 | } 33 | -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex00.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex01.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex02.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex03.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex04.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex05.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex06.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex07.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex08.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex09.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex10.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex11.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex12.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex14.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex15.png -------------------------------------------------------------------------------- /visualization.shadertoy/resources/tex16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xbmc/visualization.shadertoy/5089433f208c01e67e88e7bfa243b004e8136e35/visualization.shadertoy/resources/tex16.png --------------------------------------------------------------------------------