vec2 Offset = vec2(0.27) / textureSize0; //vec2(1.0)I settled for a rubbed in oily look without da cellulite..LoL
Tks for the great Swirl.fsh. hours of fun for a DJ-VJ at the laundromat😉 👍
#version 120
//By Z22
uniform sampler2D texture0;//feedback
vec2 vTexCoord = gl_TexCoord[0].xy;
vec3 LC = vec3(0.2126, 0.7152, 0.0722);//correct
float GetLuma(vec3 rgb) {
//return (rgb.r*rgb.g*rgb.b);
return dot(LC, rgb);
}
void main(void)
{
vec4 G = texture2D ( texture0, vTexCoord.xy ) ;
vec4 IG = texture2D ( texture0, vec2(1.0-vTexCoord.x, vTexCoord.y) ) ;
vec3 outp = mix(G.rgb , IG.rgb, smoothstep(0.4, 0.6, (GetLuma(G.rgb)+1.0-GetLuma(IG.rgb))*0.5 ) );
gl_FragColor = vec4(outp.rgb, 1.0);
}
The more recent shader conversions are now run in frame buffers
to allow easy mixing of another shader in da sprite post camera node😉
gl_FragColor = vec4(cc) * gl_Color;Then you can 'underlay' this Torus2 sprite derivative in the .scn of FG775
gl_FragColor.a = length(gl_FragColor.rgb);//<-here
}
Similarly you can make the white in any different shader transparent by
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
}
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
}
Merci @EverthangForever.
Toutes les scènes FG773-FG783 fonctionnent bien pour moi.😊
NB: Btw I highly endorse @TheEmu 's advice of using Beyond Compare
a program which allows you to quickly see and correct
any slight differences in alternate versions of .fsh or .scn files.
#version 120
// The texture containing the image to be enhanced
uniform sampler2D image;
// The texture coordinates of the current fragment
varying vec2 texCoord;
void main() {
// Sample the texels at the current fragment and its neighbors
vec4 center = tex2D(image, texCoord);
vec4 left = tex2D(image, texCoord - vec2(1.0, 0.0));
vec4 right = tex2D(image, texCoord + vec2(1.0, 0.0));
vec4 top = tex2D(image, texCoord - vec2(0.0, 1.0));
vec4 bottom = tex2D(image, texCoord + vec2(0.0, 1.0));
// Calculate the gradient of the image at the current fragment
vec4 gradient = vec4(right - left, bottom - top, 0.0, 0.0);
// Calculate the magnitude of the gradient
float gradientMagnitude = length(gradient);
// Calculate the enhanced color using a sharpening filter based on the gradient magnitude
vec4 color = center * (1.0 + gradientMagnitude);
// Set the output color to the enhanced color
gl_FragColor = color;
}
If you sign up to OpenAI you can access the ChatGPT which can write open gl code ....
@Z22 I look forward to your next creation that will benefit all of humanity😂
// Return the final color
return hsv2rgb(vec3(hue, 1.0, brightness));
iStripper の無料ユーザーはフォーラム内の주제に参加したり新しい주제を作ることはできません。
でもベーシック카테고리には参加できコミュニティーと接することはできます!