Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
96 user(s) are online (70 user(s) are browsing Forums)

Members: 0
Guests: 96

more...

Support us!

Recent OS4 Files
OS4Depot.net

Report message:*
 

Re: Warp3DNova shader bugs thread

Subject: Re: Warp3DNova shader bugs thread
by kas1e on 2020/5/30 6:03:07

@All
Another shader to discuss : https://www.shadertoy.com/view/wd2Szm

Code:

#define T iTime
#define R iResolution
#define M iMouse


// magic stuff
#define A(i)(6.283*fract(3.7*sin(i))+.7*mix(-1.,1.,fract(3.7*sin(i)))*T)
#define P(i)vec2(-(step(.5,fract(3.7*sin(i)))-.5)*sin(A(i)),(step(.5,fract(3.7*sin(i)))-.5)*cos(A(i)))

void mainImageout vec4 _FragColorin vec2 _FragCoord )
{
    
// standard uv fixup
    
vec2 p = (2.0*_FragCoord.xy-R.xy)/R.0.5*vec2(sin(0.2*T),sin(0.3*T));
    
    
// get the recursion values
    
float i floor(T-length(p)),
        
i-length(p), 
        
pow(2.718, -log(3.333)*m) * .08,
        
0.;
    
    
// get the zoom position
    
p*zP(i);
    for (
float r 0.9.; ++r)
        
+= (P(i+r+1.) / 3.333) * pow(1. 3.333r);
    
    
// recursion
    
for (float r 0.r<9.; ++r)
    {
        
// rotate
        
= -A(i);
        
p=vec2(p.x*cos(m) - p.y*sin(m), p.x*sin(m) + p.y*cos(m));

        
// yin yang function
        
float b 5.*z/min(R.yR.x),
        
1.0,
        
length(2.0*vec2(01)),
        
l;
        if (
p.0.0)
            
mix(c0.0smoothstep(1.0-b1.0+bl));

        
length(2.0*vec2(01));
        if (
p.0.0)
            
mix(0.0csmoothstep(1.0-b1.0+bl));
        if (
p.0.0)
            
l;

        
mix(cvsmoothstep(1.0-b1.0length(p)));

        if (
.6)
        {
            
// stop if outside
            
mix(step(0.0p.y), vsmoothstep(.6+.12,.6+.12+b,d));

            
// fix color around the edges
            
if (.72+&& p.0.0) ++i;
            break;
        }

        
// which side are we on?
        
p.+= mix(0.5, -0.5,  step(0.0,p.y));

        
// update zoom and position
        
*= 2./.6;
        
*= 2./.6;     
        
        
// unrotate
        
A(i);
        
p=vec2(p.x*cos(m) - p.y*sin(m), p.x*sin(m) + p.y*cos(m));
           ++
i;
    }
    
    
// final coloring
    
_FragColor vec4(v*vec3(1.+sin(i+T+i),1.+sin(i+T+1.),1.+sin(i+T+2.)),1.);
}


Win32 look (open in new tab for fullsize):

Resized Image

Aos4 look (open in new tab for fullsize):

Resized Image


In os4 version we can see some distortion (see green quads and squares), and that one not related to the other issues we reported. That kind of bug i can see also in some other shaders (through happen to be very rare), but worth to invistigate for sure.

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project