CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    [Shader] Two BackgroundShader Share

    Scripts
    11
    17
    1581
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Gking
      Gking last edited by

      The first is a bubble shader like Flux

      uniform float iTime;
      uniform vec2 iMouse;
      uniform vec2 iResolution;
      
      
      void main(void){
      
          vec2 uv = -1.0 + 2.0*gl_FragCoord.xy / iResolution.xy;
          uv.x *=  iResolution.x / iResolution.y;
          vec2 ms = (iMouse.xy / iResolution.xy);
      
          // background
          vec3 color = vec3(0.9 + 0.1*uv.y);
      
          // bubbles
          for( int i=0; i<40; i++ )
          {
              // bubble seeds
              float pha =      sin(float(i)*546.13+1.0)*0.5 + 0.5;
              float siz = pow( sin(float(i)*651.74+5.0)*0.5 + 0.5, 4.0 );
              float pox =      sin(float(i)*321.55+4.1) * iResolution.x / iResolution.y;
      
              // buble size, position and color
              float rad = 0.2 + 0.5*siz;
              vec2  pos = vec2( pox, -1.0-rad + (2.0+2.0*rad)*mod(pha+0.1*iTime*(0.1+0.1*siz),1.0));
              float distToMs = length(pos - ms);
              pos *= length(pos - (ms * 1.5-0.5));
              float dis = length( uv - pos );
      
      
              vec3  col = mix( vec3(0.1,0.2,0.8), vec3(0.1,0.4,0.8), 0.5+0.5*sin(float(i)*1.2+1.9));
              //    col+= 8.0*smoothstep( rad*0.95, rad, dis );
      
              // render
              float f = length(uv-pos)/rad;
              f = sqrt(clamp(1.0-f*f,0.0,1.0));
              color -= col.zyx *(1.0-smoothstep( rad*0.95, rad, dis )) * f;
          }
      
          // vigneting
          color *= sqrt(1.5-0.5*length(uv));
      
          gl_FragColor = vec4(color,1.0);
      }
      

      the second is a rain shader

      uniform float iTime;
      uniform vec2 iResolution;
      
      float rand(vec2 p){
      	p+=.2127+p.x+.3713*p.y;
      	vec2 r=4.789*sin(789.123*(p));
      	return fract(r.x*r.y);
      }
      
      float sn(vec2 p){
      	vec2 i=floor(p-.5);
      	vec2 f=fract(p-.5);
      	f = f*f*f*(f*(f*6.0-15.0)+10.0);
      	float rt=mix(rand(i),rand(i+vec2(1.,0.)),f.x);
      	float rb=mix(rand(i+vec2(0.,1.)),rand(i+vec2(1.,1.)),f.x);
      	return mix(rt,rb,f.y);
      }
      
      void main()
      {
      	vec2 uv = gl_FragCoord.xy / iResolution.y;
      
      	vec2 p=uv.xy*vec2(3.,4.3);
      	float f =
      	.5*sn(p)
      	+.25*sn(2.*p)
      	+.125*sn(4.*p)
      	+.0625*sn(8.*p)
      	+.03125*sn(16.*p)+
      	.015*sn(32.*p)
      	;
      
      	float newT = iTime*0.4 + sn(vec2(iTime*1.))*0.1;
      	p.x-=iTime*0.2;
      
      	p.y*=1.3;
      	float f2=
      	.5*sn(p)
      	+.25*sn(2.04*p+newT*1.1)
      	-.125*sn(4.03*p-iTime*0.3)
      	+.0625*sn(8.02*p-iTime*0.4)
      	+.03125*sn(16.01*p+iTime*0.5)+
      	.018*sn(24.02*p);
      
      	float f3=
      	.5*sn(p)
      	+.25*sn(2.04*p+newT*1.1)
      	-.125*sn(4.03*p-iTime*0.3)
      	+.0625*sn(8.02*p-iTime*0.5)
      	+.03125*sn(16.01*p+iTime*0.6)+
      	.019*sn(18.02*p);
      
      	float f4 = f2*smoothstep(0.0,1.,uv.y);
      
      	vec3 clouds = mix(vec3(-0.4,-0.3,-0.15),vec3(1.4,1.4,1.3),f4*f);
      	float lightning = sn((f3)+vec2(pow(sn(vec2(iTime*4.5)),6.)));
      
      	lightning *= smoothstep(0.0,1.,uv.y+0.5);
      
      	lightning = smoothstep(0.76,1.,lightning);
      	lightning=lightning*2.;
      
      
      
      	clouds*=0.8;
      	clouds += lightning +0.2;
      
      
      	vec2 newUV = uv;
      	newUV.x-=iTime*0.3;
      	newUV.y+=iTime*3.;
      	float strength = sin(iTime*0.5+sn(newUV))*0.1+0.15;
      
      
      	vec3 painting = (clouds)+clamp((strength-0.1),0.,1.);
      
      	float r=1.-length(max(abs(gl_FragCoord.xy / iResolution.xy*2.-1.)-.5,0.));
      	painting*=r;
      
      	gl_FragColor = vec4(painting, 1.);
      }
      

      9d5866ec-af5b-433b-91de-93a4249770e0-image.png
      4527fa2a-09da-4561-8517-5164314bb690-image.png

      G LIQUID PLASMA exit scammed 3 Replies Last reply Reply Quote 0
      • G
        Gabriel @Gking last edited by

        @gking Hello, can you give me the code for your custom liquidbounce? I wanna make my own, and i don't know how to code.

        ? 1 Reply Last reply Reply Quote 1
        • ?
          A Former User last edited by

          chrome_0eb1w3V8wk.png

          very epic coder 2021

          G 1 Reply Last reply Reply Quote 0
          • G
            Gabriel @Guest last edited by

            @sigma-allah How do i use dark theme in this forum? Pretty nice.

            ? Soulplexis 2 Replies Last reply Reply Quote 0
            • DreamWasFucked
              DreamWasFucked Banned last edited by

              cooool epic sex sigma wow nice code thx you ok :axocooler: :axocooler: :axocooler:

              G 1 Reply Last reply Reply Quote 0
              • G
                Gabriel @DreamWasFucked last edited by

                @skidma Hey shurpe.

                DreamWasFucked 1 Reply Last reply Reply Quote 0
                • DreamWasFucked
                  DreamWasFucked Banned @Gabriel last edited by

                  @gabriel no

                  1 Reply Last reply Reply Quote 0
                  • ?
                    A Former User @Gabriel last edited by

                    @gabriel said in [Shader] Two BackgroundShader Share:

                    @sigma-allah How do i use dark theme in this forum? Pretty nice.

                    just be smart and use google

                    1 Reply Last reply Reply Quote 0
                    • Soulplexis
                      Soulplexis @Gabriel last edited by

                      @gabriel click on your profile in the top right and go to settings and there is a thing called "Select a theme"

                      1 Reply Last reply Reply Quote 1
                      • W
                        wangtian297 last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • W
                          wangtian297 last edited by

                          Which class of liquidbounce is this code added to?

                          1 Reply Last reply Reply Quote 0
                          • ?
                            A Former User @Gabriel last edited by

                            jesus christ @gabriel

                            1 Reply Last reply Reply Quote 0
                            • W
                              wangtian297 last edited by

                              Excuse me, where should this code be added

                              Leejames2305 1 Reply Last reply Reply Quote 0
                              • Leejames2305
                                Leejames2305 @wangtian297 last edited by

                                @wangtian297 https://github.com/CCBlueX/LiquidBounce/blob/master/shared/main/resources/assets/minecraft/liquidbounce/shader/fragment/background.frag

                                1 Reply Last reply Reply Quote 0
                                • brightOwO
                                  brightOwO last edited by

                                  How to make such a menu?

                                  1 Reply Last reply Reply Quote 0
                                  • LIQUID PLASMA
                                    LIQUID PLASMA @Gking last edited by

                                    @gking How do I use/make one

                                    1 Reply Last reply Reply Quote 0
                                    • exit scammed
                                      exit scammed @Gking last edited by

                                      Sorry for the late response but where did you get all of these shader stuffs, I tried many from GLSLSandBox but none of them work.

                                      1 Reply Last reply Reply Quote 0
                                      • First post
                                        Last post
                                      About
                                      • Terms of Service
                                      • Privacy Policy
                                      • Status
                                      • Contact Us
                                      Downloads
                                      • Releases
                                      • Source code
                                      • License
                                      Docs
                                      • Tutorials
                                      • CustomHUD
                                      • AutoSettings
                                      • ScriptAPI
                                      Community
                                      • Forum
                                      • Guilded
                                      • YouTube
                                      • Twitter
                                      • D.Tube