Geeks3D Forums

Geeks3D.com | GeeXLab | Softwares | Reviews | Downloads | Shader Lib 


News:Rendering 3D Graphics on a 32×32 RGB LED Matrix Display with a Raspberry Pi and GeeXLab

Demo pack X-MAS 15

(Read 7639 times)

0 Members and 1 Guest are viewing this topic.



Stefan

  • Global Moderator
  • Hero Member
  • *****
  • *
  • Posts: 4250
Download from here

updates:
Snail - fixed
Arlo - fixed
River Styx - almost fixed

Package contains new textures 17-20 from Shadertoy and a cubemap from Humus (used by "Crystal Skull").
Copy missing textures from code sample pack or MadShaders' data folder.
Demos tagged WIP don't work properly for misc. reasons.

Highlights are some [SIG15] submissions and most excellent shader "Snail".

Last Edit: December 27, 2015, 03:08:16 PM by Stefan



Stefan

  • Global Moderator
  • Hero Member
  • *****
  • *
  • Posts: 4250
Note: the background in "Snail" is messed up in GeeXLab for some reason.

In some other shaders before (e.g. "River Styx") i noticed that GeeXLab dislikes code lines with colons and questionmarks.

Code: [Select]
vec3 background( in vec3 d )
{
    // cheap cubemap
    vec3 n = abs(d);
    vec2 uv = (n.x>n.y && n.x>n.z) ? d.yz/d.x:
              (n.y>n.x && n.y>n.z) ? d.zx/d.y:
                                     d.xy/d.z;
   
    vec3  col = vec3( 0.0 );
    for( int i=0; i<200; i++ )
    {
        float h = float(i)/200.0;
        float an = 31.0*6.2831*h;
        vec2  of = vec2( cos(an), sin(an) ) * h;

        vec3 tmp = texture2D( iChannel2, uv*0.25 + 0.0075*of, 4.0 ).yxz;
        col = smax( col, tmp, 0.5 );
    }
   
   
    return pow(col,vec3(3.5,3.0,6.0))*0.2;
}
Last Edit: December 25, 2015, 08:34:06 AM by Stefan

nuninho1980

  • NewsPosters
  • Full Member
  • *
  • *
  • Posts: 141
NOTICE!!!
"Snail" sample, "ShaderToy" online is 7x faster than GeekLab or GLSLHacker!?!! Why?? Because of bad code for GeekLab or GLSLHacker?

EVGA GeForce GTX 780 Ti Classified 358.50WHQL (HQ) running Win 10 x64 - "Snail" sample:
online: ~28 fps at 1024x768 fullscreen
GeekLab or GLSLHacker: 4 fps at max windowed in 1024x768 desktop.
Last Edit: December 25, 2015, 03:44:24 PM by nuninho1980

Stefan

  • Global Moderator
  • Hero Member
  • *****
  • *
  • Posts: 4250
As you can read in overlay, i activated 4xAA in pixel shader.

If you like it fast and ugly, then revert the code to the original

Code: [Select]
#define AA 1

nuninho1980

  • NewsPosters
  • Full Member
  • *
  • *
  • Posts: 141
As you can read in overlay, i activated 4xAA in pixel shader.

If you like it fast and ugly, then revert the code to the original

Code: [Select]
#define AA 1
Thank ;)

1xAA or 0xAA: 65 fps - woww!?!! :)
4xAA: 4 fps
At max windowed in desktop 1024x768.

Why from 0xAA to 4xAA impacts insanely performance?? But it is BAD optimized... But  65 fps at 0xAA to ~30 or ~40 fps at 4xAA - it's normal...
Last Edit: December 25, 2015, 04:40:35 PM by nuninho1980

Stefan

  • Global Moderator
  • Hero Member
  • *****
  • *
  • Posts: 4250
Please download again Snail - fixed

I fixed the background by adding
gh_gpu_program.uniform1i(shadertoy_prog, "iChannel2", 2);
to "update_scene"
Usually this is redundant, but in this case it showed the backbuffer.

Also i made the overlays more clearly.





Stefan

  • Global Moderator
  • Hero Member
  • *****
  • *
  • Posts: 4250
River Styx - almost fixed

Works fine now on AMD and NVIDIA, fails to render on Intel.

Pixel shader error: C0000: syntax error, unexpected '=', expecting ',' or ';' at token "="
Code: [Select]
// Home in on the surface by dividing by two and split...
(mapDE(rO + halfwayT*rD) < 0.) ? t.x = halfwayT:t.y = halfwayT;
has been fixed by replacing questionmark and colon with commas.
I have no idea why the original code compiles at shadertoy.com, but fails in GeeXLab.



Last Edit: December 27, 2015, 03:06:41 PM by Stefan