Here is another example you can try with
FG775 For FG775 alter the code of its primary shader
ronwnor/sort of domain coloringMod01.fsh
so that the
black becomes transparent in the .fsh
by adding a gl_FragColor.a entry as the last line
gl_FragColor = vec4(cc) * gl_Color;
gl_FragColor.a = length(gl_FragColor.rgb);//<-here
}
Then you can 'underlay' this Torus2 sprite derivative in the .scn of FG775
with a background shader eg: 'bubbles_DMod01.fsh' taken from FG748
framebuffer {
id: Torus2
source: Torus
size: 1920, 1080
shader: fragment, Shaders/ronwnor/sort of domain coloringMod01.fsh
}
framebuffer {
id: Clipx
size: 960, 540
source: Clip
}
camera {
type: 3D
angle: 45
pos: 0, 0, 1272
quad {
size: 1920, 1080
pos: 0, 0, 0
shader: fragment, Shaders/auurora/bubbles_DMod01.fsh
}
sprite {
source: Torus2
size: 1920, 1080
hotspot: 0.5, 0.5
pos: 0, 0, 0
scale: 1.0, -1.0
}
Similarly you can make the
white in any different shader transparent by
adding a gl_Fragcolor.a entry in the .fsh code as below:
Remember to layer something under the shader, or you will just see black there..
gl_FragColor = vec4(cc) * gl_Color; // set the pixel to the value of vec4 cc
gl_FragColor.a = length ( vec3(1.0) - gl_FragColor.rgb ); // <--here
}