20 explosions using 100 particles each
//#################################################################
framebuffer { //low resolution display
// size = 1920 x 1080 divided by 8 = 240 x 135
id: Fireworks
size: 240, 135 // Size
quad {
size: 240, 135 // Size same as above
hotspot: 0.0, 0.0
uniform: EXPLOSIONS, float, 20.0 // number of firework explosions
uniform: PARTICLES, float, 100.0 // number of particles per firework
shader: fragment, Shaders/Fireworks.fsh
}
}
//#################################################################
clipSprite { //WA: cartoon effect modified from source: TheEmu
pos: 0, 510, 1
standingHeight: 900
source: ClipAntiAlias
scale: -1.0, 1.0, 1.0
uniform: SketchWidth, float, 18.0 // width of sketch lines try 1.0 to 30.0
uniform: SketchDarkness, float, 0.4 // darkness of sketch lines try 0.0 = black to 2.0
uniform: SketchFill, float, 1.0 // intensity of fill color between sketch lines try 1.0 to 3.0
uniform: SketchAlpha, float, 1.0 // opacity of sketched image
shader: fragment, Shaders/Sketch.fsh //WA: cartoon effect modified from source: TheEmu
}
8 explosions using 20 particles each
//#################################################################
framebuffer { // hi resolution display
// size = 1920 x 1080 divided by 1 = 1920 x 1080
id: Fireworks
size: 1920, 1080 // Size
quad {
size: 1920, 1080 // Size same as above
hotspot: 0.0, 0.0
uniform: EXPLOSIONS, float, 8.0 // number of firework explosions
uniform: PARTICLES, float, 20.0 // number of particles per firework
shader: fragment, Shaders/Fireworks.fsh
}
}
//#################################################################
clipSprite { //WA: cartoon effect modified from source: TheEmu
pos: 0, 510, 1
standingHeight: 900
source: ClipAntiAlias
scale: -1.0, 1.0, 1.0
uniform: SketchWidth, float, 0.0 // width of sketch lines try 1.0 to 30.0
uniform: SketchDarkness, float, 0.0 // darkness of sketch lines try 0.0 = black to 2.0
uniform: SketchFill, float, 1.0 // intensity of fill color between sketch lines try 1.0 to 3.0
uniform: SketchAlpha, float, 1.0 // opacity of sketched image
shader: fragment, Shaders/Sketch.fsh //WA: cartoon effect modified from source: TheEmu
}
Is there anyway to make FG149 cycle a bit faster?
float Hash(float h) {
//return fract(sin(h) * 43758.5453;
return fract(sin(h) * (43758.5453 + fract(time)/0.2));
}
void main( void )
//void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = gl_FragCoord.xy/iResolution.y - 0.5;
uv.x *= iResolution.x/iResolution.y;
uv *= 1.4;
// add movement
uv *= (0.1+fract(time)/10.)*10.;
vec3 col;
uv = 0.5 - fract(uv);
float lL = length(uv);
for (float i=0.0; i<5.0; i++) {
uv = abs(uv) / pow(lL, super) - magic;
float nL = length(clamp(uv, - amaze, 1.0));
col = max(col, abs(nL - lL));
col *= 1.0 - vec3( Hash(seed+0.1+i), Hash(seed+0.2+i), Hash(seed+0.3)) * 0.25;
lL = nL;
}
gl_FragColor = vec4(col, 1.0);
}
Unfortunately you cannot mount a shader on a quad
within a frame buffer, so framebuffer has to include reference to a real texture substrate.
//#################################################################
framebuffer { // hi resolution display
// size = 1920 x 1080 divided by 1 = 1920 x 1080
id: Fireworks
size: 1920, 1080 // Size
quad {
size: 1920, 1080 // Size same as above
hotspot: 0.0, 0.0
uniform: EXPLOSIONS, float, 8.0 // number of firework explosions
uniform: PARTICLES, float, 20.0 // number of particles per firework
shader: fragment, Shaders/Fireworks.fsh
}
}
//#################################################################
//#################################################################
framebuffer { //low resolution display
// size = 1920 x 1080 divided by 8 = 240 x 135
id: Fireworks
size: 240, 135 // Size
quad {
size: 240, 135 // Size same as above
hotspot: 0.0, 0.0
uniform: EXPLOSIONS, float, 20.0 // number of firework explosions
uniform: PARTICLES, float, 100.0 // number of particles per firework
shader: fragment, Shaders/Fireworks.fsh
}
}
//#################################################################
from this
texture {
id: myquad
source: Textures/Beige01.png
}
framebuffer {
id: Torus
source: myquad
size: 1920, 1080
pos: 0, 0, 0
shader: fragment, Shaders/WPFractalsMod04.fsh
uniform: varspeed, float, 0.8
uniform: zoomout, float, 10
}
to This
framebuffer {
id: Torus
size: 1920, 1080
quad {
size: 1920, 1080 // Size same as above
hotspot: 0.0, 0.0
shader: fragment, Shaders/WPFractalsMod04.fsh
uniform: varspeed, float, 0.8
uniform: zoomout, float, 10.0
}
}
// reflected gold
col = vec3(1.0, 0.85, 0.0) * texture(iChannel0, reflect(rd, n).xy).rgb;
// diffuse, ambiant occlusion, shadow, specular
float diff = pow(dot(n, ld) * .5 + .5,2.0);
float ao = getAmbiantOcclusion(p, n, 40.0);
float sha = clamp(getShadow(p, ld, 0.01, 150.0, 5.0), 0. ,0.9);
float spe = pow(max(dot(-rd, reflect(-ld, n)), 0.0), 32.0);
vec3 base = hsv2rgb_smooth(vec3(atan(p.x,p.z)/3.14159*0.5 - iTime * 0.1, 0.8, 0.8)); // define base here
if (mat(p) < 0.5) // hexa sides
{
// vary base color according to ao
col = mix(base, vec3(1), ao) * 0.5;
}
else // hexa face
{
// reflected gold
col = base.gbr * texture(iChannel0, reflect(rd, n).xy).rgb; //swizzle base here
}
void main( void )
// void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = gl_FragCoord.xy/iResolution.xy;
Als ein Gratisnutzer von iStripper bist du nicht berechtigt Beiträge zu schreiben oder neue Topics zu starten.
Aber du hast Zugriff auf die grundlegenden Bereiche und kannst unsere Community kennen lernen