... two months of news for the Cascadeur - the official youtube channel ... :

2D, 3D, game, games, online game, game development, game engine, programming, OpenGL, Open AI, math, graphics, design, graphic, graphics, game development, game engine, programming, web development, web art, web graphic, arts, tutorial, tutorials,


#ifdef GL_ES
precision highp float;
#endif
#extension GL_OES_standard_derivatives : enable
uniform float time;
uniform vec2 resolution;
void main( void ) {
vec2 uv = 0.5-(gl_FragCoord.xy - resolution * 0.15) / max(resolution.x, resolution.y) * 5.0;
uv *= 1.0;
float e = 0.0;
for (float i=3.0;i<=16.0;i+=1.0) {
e += 0.081/abs( (i/11.) +sin((time/1.20) + 0.18*i*(uv.y) *( cos(i/2.10 + (time / 11.0) - uv.y*.4) ) ) + 2.5*uv.x);
gl_FragColor = vec4( vec3(e/1.6, e/18.6, e/1.6), 1.0);
}
}#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
void main( void ) {
vec2 p = ( gl_FragCoord.xy / resolution.xy ) -0.5;//+ mouse / 4.0;
// float color = 0.0;
float sx =cos(0.123*time)*(p.x)*sin(7.6*p.x-0.5*time);
float dy =1.1/(1000.*abs(p.y-sx));
float dy2 =(50.*abs(p.y-dy));
float dy3 =(150.*abs(p.y-dy));
gl_FragColor = vec4( vec3( .01, dy*dy3 ,dy2*.1),4);
}#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 resolution;
uniform float time;
mat2 m(float a) {
float c=cos(a), s=sin(a*1.0);
return mat2(c,-s,s,c);
}
float map(vec3 p) {
p.xz *= m(time * 0.1);p.xy*= m(time * 0.1);
vec3 q = p * 4.0 + time;
return length(p+vec3(sin(time * 0.17))) * log(length(p) + 0.10) + sin(q.x + sin(q.z + sin(q.y))) * 1.8;
}
void main() {
vec2 a = gl_FragCoord.xy / resolution.y - vec2(0.5, 0.5);
vec3 cl = vec3(0.0);
float d =0.15;
for (int i = 0; i <= 5; i++) {
vec3 p = vec3(0, 0, 4.0) + normalize(vec3(a, -1.0)) * d;
float rz = map(p);
float f = clamp((rz - map(p + 0.1)) * 0.5, -0.1, 1.0);
vec3 l = vec3(0.1, 0.3, 0.44) + vec3(1.5, 1.0, 1.0) * f;
cl = cl * l + smoothstep(0.5,0.31, rz) * 0.16 * l;
d += min(rz, 1.0);
}
gl_FragColor = vec4(cl*8.0, 1.0);
}
#include "stdosl.h"
#define IOR_THRESHOLD 1.000001
float FresnelDielectric(vector i, normal n, float eta)
{
float c = fabs(dot(i, n));
float g = eta * eta - 1 + c * c;
float result = 1.0;
if (g > 0) {
g = sqrt(g);
float a = (g - c) / (g + c);
float b = (c * (g + c) - 1) / (c * (g + c) + 1);
result = 0.5 * a * a * (1 + b * b);
}
return result;
}
surface Glass(
color diffuse_col = 0.8,
float ior = 1.45,
output closure color bsdf = 0)
{
float real_ior = max(ior, IOR_THRESHOLD);
float eta = backfacing()? 1.0 / real_ior : real_ior;
float fr = FresnelDielectric(I, N, eta);
bsdf = diffuse_col * (fr * reflection(N) + (1.0 - fr) * refraction(N, eta));
}#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform vec2 resolution;
uniform float time;
void main(void) {
float mx = max(resolution.x, resolution.y);
vec2 uv = gl_FragCoord.xy / mx;
vec2 center = resolution / mx * 0.5;
float t = time * 10.0;
gl_FragColor = vec4(cos(t+distance(uv, center) / 222.0)+1.0,
vec2(sin(t - distance(uv, center) * 76.0)) * 10.5,
1.0);
}

#define f length(fract(q*=m*=.6+.1*d++)-.5)
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
float d = 0.;
//vec3 uv = vec3(fragCoord.xy / iResolution.xy,iTime*.2);
vec3 q = vec3(fragCoord.xy/iResolution.yy-13., iTime*.2);
mat3 m = mat3(-2,-1,2, 3,-2,1, -1,1,3);
vec3 col = vec3(pow(min(min(f,f),f), 7.)*40.);
fragColor = vec4(clamp(col + vec3(0., 0.35, 0.5), 0.0, 1.0), 1.0);
}#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform vec2 resolution;
uniform float time;
uniform vec4 mouse;
uniform vec4 date;
#define f length(fract(q*=m*=.6+.01*d++)-.5)
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
float d = 0.91;
vec3 q = vec3(fragCoord.xy/resolution.yy-13., time*.2);
mat3 m = mat3(-2,-3,6, 3,-1,1, 0,3,1);
vec3 col = vec3(pow(min(min(f,f),f), 7.)*40.);
fragColor = vec4(clamp(col + vec3(0., 0.35, 0.5), 0.0, 1.0), 1.0);
}
void main() {
vec4 fragment_color;
mainImage(fragment_color, gl_FragCoord.xy);
gl_FragColor = fragment_color;
}

#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform vec2 resolution;
uniform float time;
uniform vec4 mouse;
uniform vec4 date;
//#define time iTime
#define R resolution.xy
void mainImage( out vec4 fragC, in vec2 fC)
{
// vec2 pos = (fragCoord.xy/R.xy) * 8. - 4.;
vec2 pos = (fC.xy/R.xy) * 8. - 4.;
pos.x *= R.x / R.y;
float s = .25, f = .0, k = f;
vec3 p = vec3(pos, sin(time * .4) * .5 - .5)* s;
for( int i=0; i< 9; i++ )
{
p = abs(p)/dot(p,p)- 1.5;
k = length(p) ;
p = p*k+k;
}
f = dot(p,p)* s;
fragC= vec4(f*.5, f *1.2, f * 5., 0.111);;
}
void main() {
vec4 fragment_color;
mainImage(fragment_color, gl_FragCoord.xy);
gl_FragColor = fragment_color;
}#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform vec2 resolution;
uniform vec2 cameraAddent;
uniform mat2 cameraOrientation;
uniform samplerExternalOES cameraBack;
void main(void) {
vec2 uv = gl_FragCoord.xy / resolution.xy;
vec2 st = cameraAddent + uv* cameraOrientation * vec2(tan(0.805),cos(0.31));
gl_FragColor= vec4(
texture2D(cameraBack, st*vec2(2.0,1.0)).rgb,0.1);
}