• 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 13
Release 2D Spectrum, visualization
Doesnt kodi-platform already exist in current kodi? Why do you need to compile libplatform, isnt that already compiled when you compile kodi and binary addons?

Edit

https://github.com/xbmc/xbmc/tree/master...t/platform

mmm make -C tools/depends/target/platform doesnt seem to work either

This really shouldn't be this complicated
Reply
(2015-05-23, 18:02)wsnipex Wrote: 1. build and install kodi master
2. build and install (lib)platform: https://github.com/Pulse-Eight/platform/
3. build shadertoy

steps for 2. and 3.:
Code:
cmake -DCMAKE_INSTALL_PREFIX=<kodi-prefix> -Dkodi_DIR=<kodi-prefix/lib>
make -j4
make install

Note: -Dkodi_DIR=<kodi-prefix/lib> is only needed if kodi is not installed in a standard prefix(/usr,/usr/local)

edit: or use the nightly ppa: kodi-visualization-shadertoy (for ubuntu >=14.10. 12.04 doesn't build atm)

That works but the resulting shadertoy does not

settings.xml for instance is

Code:
<?xml version="1.0" encoding="UTF-8"?>
<settings>
    <setting id="lastpresetidx" type="integer" default="0" visible="false" />
</settings>

And nothing happens when selecting it as a visualization and cant change presets, essentially does not work.
Reply
works fine for me.
Reply
(2015-05-24, 09:14)wsnipex Wrote: works fine for me.

Well current nightly compiled from yesterday does not.

Even the Waveform visualization crashes kodi immediately,So clearly something is really wrong with current Master tree.
Reply
@wsnipex, thanks for that package in nightlies - testing it right now Smile
Reply
Also wsnipex

this shows up in logs

Code:
14:51:07 T:140617296975808   DEBUG: ADDON: Dll Initializing - Shadertoy
14:51:07 T:140617296975808   ERROR: ADDON: Could not locate visualization.shadertoy.so

Looking further shardertoy .so installs to

-- Installing: /usr/lib/x86_64-linux-gnu/kodi/addons/visualization.shadertoy/visualization.shadertoy.so.0.0.1
-- Installing: /usr/lib/x86_64-linux-gnu/kodi/addons/visualization.shadertoy/visualization.shadertoy.so.15.0
-- Installing: /usr/lib/x86_64-linux-gnu/kodi/addons/visualization.shadertoy/visualization.shadertoy.so

However regular binary addons (like audio encoders) are also installed to /usr/lib/kodi/addons/ and shadertoy atm is not. Even though kodi is installed to /usr and cmake -DCMAKE_INSTALL_PREFIX=/usr was used in shadertoy config

So I can confirm that after copying the directory /usr/lib/x86_64-linux-gnu/kodi/addons/visualization.shadertoy to /usr/lib/kodi/addons/visualization.shadertoy then shadertoy start to work.

Also the presets

Polar Beats by sauj123
Revision 2015 Livecoding Round 1 by mu6kl

Both kill/restart/crash kodi when selected
Reply
yes, seems there is something wrong with addon install paths
Reply
OK so back to main request (not quite that image but close enough for now)

I took https://www.shadertoy.com/view/Msl3zr and modified it to remove that fugly second wave and the crazy distort which both seem to ruin this otherwise great visualization.

Code:
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
    // create pixel coordinates
    vec2 uv = fragCoord.xy / iResolution.xy;
        
    // quantize coordinates
    const float bands = 20.0;
    const float segs = 20.0;
    vec2 p;
    p.x = floor(uv.x*bands)/bands;
    p.y = floor(uv.y*segs)/segs;
    
    // read frequency data from first row of texture
    float fft  = texture2D( iChannel0, vec2(p.x,0.0) ).x;    

    // led color
    vec3 color = mix(vec3(0.0, 2.0, 0.0), vec3(2.0, 0.0, 0.0), sqrt(uv.y));
    
    // mask for bar graph
    float mask = (p.y < fft) ? 1.0 : 0.0;
    
    // led shape
    vec2 d = fract((uv - p)*vec2(bands, segs)) - 0.5;
    float led = smoothstep(0.5, 0.3, abs(d.x)) *
                smoothstep(0.5, 0.3, abs(d.y));
    vec3 ledColor = led*color*mask;

    // second texture row is the sound wave
    float wave = texture2D( iChannel0, vec2(uv.x, 0.75) ).x;
        
    // output final color
    //fragColor = vec4(vec3(fft),1.0);
    //fragColor = vec4(d, 0.0, 1.0);
    //fragColor = vec4(ledColor, 1.0);
    //fragColor = vec4(waveColor, 1.0);
    fragColor = vec4(ledColor, 1.0);
}

Result Image

I haven't tried adding oit to visualization.shadertoy yet and Im pretty sure my hacking around isnt complete or correct but on shadertoy website looks exactly like what I was looking for. So assist would be good if somone who kew more took and fixed it up.

EDIT
OK seems to work in shadertoy in kodi

Image

So I guess Ill submit a PR and see how that goes from there.

Edit 2

https://github.com/topfs2/visualization....toy/pull/3
Reply
(2015-05-24, 16:34)wsnipex Wrote: yes, seems there is something wrong with addon install paths

https://github.com/xbmc/xbmc/pull/7192 should fix that.
Reply
notspiff said something to the effect kodi hasn't been patched to look in multiarch install paths. but if that fixes that I shall try it out for sure. see https://github.com/notspiff/visualizatio...-105037368
Reply
yes correct. Kodi doesn't use multi arch yet. Since we're already way into beta stage, this won't change for Isengard.
Reply
Ive tried implementing (see it in action there -> https://www.shadertoy.com/view/4lS3W3) a variation of audioCube as well, and I managed to get it working in kodi.

Problem is that performance?! Is awful despite CPU being at 10% and Ram 400MB, so hardly being used and with a nvidia GT610. (not the only visualisation do act like this on this machine haven't tested others dont have others to test)

Screenshots (looks great but its really slow)

watch gallery


This should have enough humpf for these things and yet they grind to a halt.

Also there's no support for cube maps (yet is it planned?) in the shadertoy addon this visualization particular looks great with a texturecube mapped to it.

But there you are maybe soon enough.

I also realized that shortage of better screensavers or even live wallpapers can also be remedied by a similar addon one for audio visualisations and one for screensavers and so on, So the same code visualisation.shadertoy and screensaver.shadertoy etc, Im sure content wouldn't be a problem.

EDIT
Well this is odd, most of these visualisations are around 60fps on my HTPC this particula one barely hits 4fps on a lucky moment, So I went and truned off Dirty regions, thinking this could be the cause, but turns out thats not even close, so Barking up the wrong tree there., What's is odd that on a browser on same machine the very same code runs perfectly well.
Reply
Will shadertoy be included into Kodi? It's really good imo.
Reply
(2015-05-31, 01:19)OurJermain Wrote: Will shadertoy be included into Kodi? It's really good imo.

I think thats the general idea, mostly works though its missing a few things and you can install it already from ppa

The same codebase would eventually work for screensavers and live wallpapers which is extra exciting, but after giving this a try myself some shaders currently perform poorly so lets see if this addon which is probably still being developed makes it into kodi officially real soon.
Reply
a screensaver add-on for shadertoy has already been created and is part of nightly RPI builds by Milhouse Smile
Reply
  • 1
  • 6
  • 7
  • 8(current)
  • 9
  • 10
  • 13

Logout Mark Read Team Forum Stats Members Help
2D Spectrum, visualization0