Does length just add the rgb values together then? so (0.5, 0.25, 0.15) would equal 0.9?
////////////////////////////////////////////////////////////////////////////////
clip {
id : Clip
deny : top
}
////////////////////////////////////////////////////////////////////////////////
texture {
id : BG
source : Backgrounds
size : 3840, 2160 // Force to a common size
}
////////////////////////////////////////////////////////////////////////////////
framebuffer
{
id : fb2
pos : 1920, 1080
size : 7680, 2160
sprite {
source : BG
pos : 3840, 0
blend : false
}
clipSprite {
source : Clip
pos : 0, 1080
blend : true
standingHeight : 1800
sittingheight : 1500
}
}
framebuffer
{
id : CleanGirl
pos : 1920, 1080
size : 3840, 2160
clipSprite {
pos : 0, 1080
source : Clip
blend : true
standingHeight : 1800
sittingheight : 1500
}
}
////////////////////////////////////////////////////////////////////////////////
framebuffer
{
id : ResizedDrip
pos : 1920, 1080
size : 3840, 2160
clipSprite {
pos : 1920, 0
source : fb2
shader : fragment, Glass4.fsh
blend : true
}
}
////////////////////////////////////////////////////////////////////////////////
camera {
type : 2D
pos : 1920, 1080
size : 3840, 2160
sprite {
size : 3840, 2160
source : ResizedDrip, 0
source : CleanGirl, 1
source : BG, 2
shader : Combine8.fsh
}
}
framebuffer
{
id: FeedbackBuffer
pos: 1920, 1080
size: 3840, 2160
sprite {
opacity: 1
hotspot: 0.5, 0.499
size: 3840, 2160
// source: Feedback
blend: false
}
}
uniform sampler2D texture0;
uniform float u_Elapsed;
vec2 vTexCoord = gl_TexCoord[0].xy;
///////////////////////////////////////////////////////////////////////////////////////////
vec2 Grain(vec2 fm0)
{
vec4 Girl = texture2D ( texture0, vTexCoord.xy ) ;
float Tits = ( Girl.r + Girl.g + Girl.b ) * 0.3333333333333;
fm0.x = (fm0.x)-0.03; // 0.00005; // Increased for debugging purposes
fm0.y = (fm0.y)-0.03; // 0.00005; // Increased for debugging purposes
float x = Tits * fm0.x ;
float y = Tits * fm0.y ;
return vec2 ( fm0.x+x, fm0.y-y );
}
///////////////////////////////////////////////////////////////////////////////////////////
void main(void)
{
gl_FragColor = texture2D ( texture0, Grain(vTexCoord) ) * gl_Color;
}
// Main code adapted from https://www.shadertoy.com/view/XlsGWf by whiteskull
// Adapted by z22 and TheEmu.
uniform sampler2D texture0;
varying vec4 gl_TexCoord[];
varying vec4 gl_Color;
uniform vec2 u_WindowSize;
uniform float u_Elapsed;
void main()
{
// Get a time varying angle of rotation, a.
float sp = cos(u_Elapsed*0.5) * sin(u_Elapsed*0.5);
float a = radians(u_Elapsed*sp) * 0.2;
// Form the rotation matrix for a rotaion by angle a.
mat2 R = mat2 ( cos(a), -sin(a),
sin(a), cos(a)
);
// Rescale and shift origin, uv components in range -0.5 to +0.5
vec2 uv = gl_FragCoord.xy/u_WindowSize.xy - 0.5;
// Clockwise and anticlockwise rotations to uv.
vec2 uvA = R*uv;
vec2 uvB = uv*R;
// Look up colours at the rotated coordinates.
vec4 AA = texture2D ( texture0, uvA+0.5 );
vec4 BB = texture2D ( texture0, uvB+0.5 );
// Combine colour samples weighted by their opacities.
vec3 color = AA.rgb*AA.a + BB.rgb*BB.a;
// Determine what opacity to use. There is no obvious
// choice, but the following should work well for most
// cases. It works perfectly when the source opacities
// are either 0.0 or 1.0 and gives sensible results if
// thhey have intermediate values of opacity.
float opacity = clamp ( AA.a+BB.a, 0.0, 1.0 );
// Update the shader's output.
gl_FragColor = vec4(color,opacity) * gl_Color;
}
clip {
id: Clip
deny: table, behindtable, fronttable, inout, cage, top
}
////////////////////////////////////////////////////////////////////////////////
texture {
id: Feedback
source: Empty.psd
// Empty source
}
texture {
id: Feedback2
source: Empty2.psd
// Empty source
}
////////////////////////////////////////////////////////////////////////////////
framebuffer
{
id: FeedbackBuffer
pos: 1920, 1080
size: 3840, 2160
sprite {
opacity: 1
hotspot: 0.5, 0.499
size: 3840, 2160
source: Feedback
color : 0.5, 0.5, 1.0 // Debug - using blue to mark stuff from a "Feedback" buffer
blend: false
}
}
framebuffer
{
id: FeedbackBuffer2
pos: 1920, 1080
size: 3840, 2160
sprite {
opacity: 1
scale: 1.01, 1.01
//hotspot: 0.5, 0.5
size: 3840, 2160
source: Feedback2
color : 0.5, 0.5, 1.0 // Debug - using blue to mark stuff from a "Feedback" buffer
blend: false
}
}
framebuffer
{
id: fb2
pos: 1920, 1080
size: 3840, 2160
clipSprite {
source: FeedbackBuffer
blend: true
}
clipSprite {
pos: 0, 1080
standingHeight: 1800
source: Clip
blend: true
}
}
framebuffer
{
id: fb3
pos: 1920, 1080
size: 3840, 2160
clipSprite {
source: FeedbackBuffer2
blend: true
}
clipSprite {
pos: 0, 1080
standingHeight: 1800
source: Clip
blend: true
}
}
////////////////////////////////////////////////////////////////////////////////
framebuffer
{
id: Dust
source: fb2
shader: fragment, Dust.fsh
color: 1.0, 0.5, 0.5 // Debug - anything from Dust is redish
}
framebuffer
{
id: Dust2
source: fb3
shader: fragment, spin.fsh
color: 0.5, 1.0, 0.5 // Debug - anything from Dust2 is greenish
}
////////////////////////////////////////////////////////////////////////////////
camera {
type : 2D
pos : 1920, 1080
size : 3840, 2160
sprite {
size: 3840, 2160
// For debugging use one of these simple sources to see
// what each input to the shader would be by itself.
// source: Dust
// source: Dust2
// source: Clip
// and comment out the rest, including the shader line.
source: Clip, 0
source: Dust, 1
source: Dust2, 2
shader: Combine-Dusty2a.fsh
}
}
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