Age Verification
This website contains age-restricted material including nudity and explicit content. By entering, you confirm being at least 18 years old or the age of majority in the jurisdiction you are accessing the website from.
I am 18+ or older - Enter
I am under 18 - Exit
Our parental controls page explains how you can easily block access to this site.

Discussions for Scenes for Version 1.2.X Fullscreen Mode here

  掲示板 / iStripperに関する全て

Z22
Joined in Aug 2017

1166 投稿
November 7, 2017 (edited)
oops got the 60 and 213 the wrong way round and the wrong numbers anyway...


vec2 Go0 = vec2((G0.x - Offset.x)+(Offset.x * 576), (G0.y - Offset.y)+(Offset.y * 16.1));
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017
0(58) : warning C7011: implicit cast from "int" to "float"
0(59) : warning C7011: implicit cast from "int" to "float"
0(60) : warning C7011: implicit cast from "int" to "float"
0(62) : warning C7011: implicit cast from "int" to "float"
0(63) : warning C7011: implicit cast from "int" to "float"
0(64) : warning C7011: implicit cast from "int" to "float"
0(66) : warning C7011: implicit cast from "int" to "float"
0(67) : warning C7011: implicit cast from "int" to "float"
0(68) : warning C7011: implicit cast from "int" to "float"
0(72) : warning C7011: implicit cast from "int" to "float"
0(72) : warning C7011: implicit cast from "int" to "float"
0(72) : warning C7011: implicit cast from "float" to "vec3"
0(73) : warning C7011: implicit cast from "int" to "float"
0(73) : warning C7011: implicit cast from "int" to "float"
0(73) : warning C7011: implicit cast from "float" to "vec3"
0(74) : warning C7011: implicit cast from "int" to "float"
0(74) : warning C7011: implicit cast from "int" to "float"
0(74) : warning C7011: implicit cast from "float" to "vec3"
0(76) : warning C7011: implicit cast from "int" to "float"
0(76) : warning C7011: implicit cast from "int" to "float"
0(76) : warning C7011: implicit cast from "float" to "vec3"
0(77) : warning C7011: implicit cast from "int" to "float"
0(77) : warning C7011: implicit cast from "int" to "float"
0(77) : warning C7011: implicit cast from "float" to "vec3"
0(78) : warning C7011: implicit cast from "int" to "float"
0(78) : warning C7011: implicit cast from "int" to "float"
0(78) : warning C7011: implicit cast from "float" to "vec3"
0(80) : warning C7011: implicit cast from "int" to "float"
0(80) : warning C7011: implicit cast from "int" to "float"
0(80) : warning C7011: implicit cast from "float" to "vec3"
0(81) : warning C7011: implicit cast from "int" to "float"
0(81) : warning C7011: implicit cast from "int" to "float"
0(81) : warning C7011: implicit cast from "float" to "vec3"
0(82) : warning C7011: implicit cast from "int" to "float"
0(82) : warning C7011: implicit cast from "int" to "float"
0(82) : warning C7011: implicit cast from "float" to "vec3"
0(132) : warning C7011: implicit cast from "int" to "float"
0(132) : warning C7011: implicit cast from "int" to "float"
0(132) : warning C7011: implicit cast from "int" to "float"
0(132) : warning C7011: implicit cast from "float" to "vec3"
0(133) : warning C7011: implicit cast from "int" to "float"
0(133) : warning C7011: implicit cast from "int" to "float"
0(133) : warning C7011: implicit cast from "int" to "float"
0(133) : warning C7011: implicit cast from "float" to "vec3"
0(134) : warning C7011: implicit cast from "int" to "float"
0(134) : warning C7011: implicit cast from "int" to "float"
0(134) : warning C7011: implicit cast from "int" to "float"
0(134) : warning C7011: implicit cast from "float" to "vec3"
0(136) : warning C7011: implicit cast from "int" to "float"
0(136) : warning C7011: implicit cast from "int" to "float"
0(136) : warning C7011: implicit cast from "int" to "float"
0(136) : warning C7011: implicit cast from "float" to "vec3"
0(137) : warning C7011: implicit cast from "int" to "float"
0(137) : warning C7011: implicit cast from "int" to "float"
0(137) : warning C7011: implicit cast from "int" to "float"
0(137) : warning C7011: implicit cast from "float" to "vec3"
0(138) : warning C7011: implicit cast from "int" to "float"
0(138) : warning C7011: implicit cast from "int" to "float"
0(138) : warning C7011: implicit cast from "int" to "float"
0(138) : warning C7011: implicit cast from "float" to "vec3"
0(140) : warning C7011: implicit cast from "int" to "float"
0(140) : warning C7011: implicit cast from "int" to "float"
0(140) : warning C7011: implicit cast from "int" to "float"
0(140) : warning C7011: implicit cast from "float" to "vec3"
0(141) : warning C7011: implicit cast from "int" to "float"
0(141) : warning C7011: implicit cast from "int" to "float"
0(141) : warning C7011: implicit cast from "int" to "float"
0(141) : warning C7011: implicit cast from "float" to "vec3"
0(142) : warning C7011: implicit cast from "int" to "float"
0(142) : warning C7011: implicit cast from "int" to "float"
0(142) : warning C7011: implicit cast from "int" to "float"
0(142) : warning C7011: implicit cast from "float" to "vec3"

LMAO
TheEmu
Joined in Jul 2012

3309 投稿
November 7, 2017 (edited)
@Z22 - I woke up and think that I understand what you are trying to do and where you are going wrong. Its wonderful how you can sometimes solve problems while *****.

What I think you are trying to do is to conceptualy construct a gray scale map as a function of position (x,y), treat this as if it was a surface and calculate the normal vector at each point of this surface.

To this end you are generating the vectors Gray0 through Gray9 which should be of the form (x,y,h) where x and y give the position and h the "height" of the surface above the x-y plane. In your case this height is a greyscale value.

However, instead of using x and y you are using the red and blue components of the colour at (x,y). I.e. you were using 2D colour space (red,blue) coordinates instead of the position coordinates (x,y).

Rather than using G0.x, G0.y etc. as the x and y values you just want either the actual x and y values (vTexCoord after applying Offset) or, more simply, the x and y values relative to the centre point, which are just the Offset components with the appropriate signs. This can be simplified even more by using

vec3 Gray0 = vec3 (-1.0,-1.0, (G0.r + G0.g + G0.b)/3.0 );
vec3 Gray1 = vec3 ( 0.0,-1.0, (G1.r + G1.g + G1.b)/3.0 );
vec3 Gray2 = vec3 ( 1.0,-1.0, (G2.r + G2.g + G2.b)/3.0 );
vec3 Gray3 = vec3 (-1.0, 0.0, (G3.r + G3.g + G3.b)/3.0 );
vec3 Gray4 = vec3 ( 0.0, 0.0, (G4.r + G4.g + G4.b)/3.0 );
vec3 Gray5 = vec3 ( 1.0, 0.0, (G5.r + G5.g + G5.b)/3.0 );
vec3 Gray6 = vec3 (-1.0, 1.0, (G6.r + G6.g + G6.b)/3.0 );
vec3 Gray7 = vec3 ( 0.0, 1.0, (G7.r + G7.g + G7.b)/3.0 );
vec3 Gray8 = vec3 ( 1.0, 1.0, (G8.r + G8.g + G8.b)/3.0 );

though you will then have to compensate later by changing one of your overall multiplicative factors.

I think you may have been ***** by thinking that (G0.x,G0y) was somehow getting the (x,y) coordinates for the texture. In fact (G0.x,G0.y) is exactly the same as writing (G0.r,G0.g) and because G0 is a colour you get the red and green components of the colour of the texture. This is because GLSL makes no distinction between colour vectors and spacial vectors and you can set up a vector one way and then reference it the other. GLSL is slightly more strongly typed than C, but only very slightly, and this can be ***** if you are presented with a shader in which the author has used (x,y,z) instead of (r,g,b) and vice versa.

With the above if you form cross products with Gray4 you will get a consistant set of vectors which you can average and should get a sensible result for the normal vector.

Now, having woken up early I will try to get another hour or so of rest before getting up properly for the day.
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017 (edited)
naa, if it was function of position it would just be a gradient black top left to white bottom right, assuming 0.0 is top left.

the gradient comes from the girls combined rgb at the current(and offset) x,y that gl_fragcolour is looking for.

i had already changed to

vec4 G0 = texture2D ( texture0, vTexCoord.xy + Offset*vec2(-1.0,-1.0) ) ;

vec2 Go0 = vec2((G0.x - Offset.x)+(Offset.x * 576), (G0.y - Offset.y)+(Offset.y * 16.1)); corrects for scale and aspect of x,y vs z(rgb of girl) so the vectors occupy a cube, more just for the hell of it really.

vec3 Gray0 = (Go0.x, Go0.y, (( 2*((G0.r + G0.g + G0.b)/3)) -1.0)); moves the rgb into vector space

and a bunch of other ***** after swapping back and forth beween vector space and colour space so the maths worked out.
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017 (edited)
Result of tonights spaghetti code

https://drive.google.com/open?id=1a1ERXJgZNwd_rHxmFJB2quBF0qrBeA6M

the new effect is most noticable in the bar, the old version only offset up and left, this does up/down and left/right.

however there is something causing a diagonal up and left smear, most noticable on the forest stream background(when the girl is over the dirt in the centre of the screen. or just turn off the other layers and the compose at the end of the .scn

i guess that is just coming from how i am combining the results at the end.


Edit:-
just changed over to

float x = ((2*combo.r)-1.0) * (Offset*100);
float y = ((2*combo.b)-1.0) * (Offset*100);

they should still be in vector space but if i dont put in the (2*colour)-1.0 it doesnt work properly ...hmmm

think it's this...
vec3 cp0 = (Gray4 * Gray1);
should move to colspace before i do that...or just actually get round to doing the cross properly...naaa

that was wrong but not the cause of the diagonal streaks. thats coming from the x,y coords. i only need the offset(+-1) in the vector not the whole thing.

hmm
vec2 Go0 = vec2((-1.0)+(Offset.x * 576), (-1.0)+(Offset.y * 16.1));
still got the diagonal streaks...

it may just be that texture causing the problem as it's not really a problem on the others.
still... found other errors by looking for it so thats a bonus.

lol, just re-read what you wrote and you told me about the above problem... helps if i pay attention.
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017
float x = ((2*combo.r)-1.0)+((2*combo.b)-1.0) * (Offset*2);
float y = ((2*combo.g)-1.0)+((2*combo.b)-1.0) * (Offset*2);

interesting... wrong but interesting.

with all of the above i know it's not how to do it properly. That would be with using cross to get the normal of the 9 vectors and run that result through a refract function.
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017 (edited)
"Fixed" version of the shader

https://drive.google.com/open?id=1wBFy5lOzOGq1HediyX-RgjIuU4aZEqJr

don't forget to change the name to Glass3.fsh in the .scn

So, now it looks like all the numbers coming out of Gray0 ect are correct i can figure out how to do a cross of the 9 vectors and scrap a bunch of code that i won't need.

so when i said "Cross can suck a dick. Causes weird artifacts that look like mpg noise but everwhere. Probably more to do with me than it tbf."
it was me...

I don't know if the diagonal streaks are because of a fault in the first part or an artifact of how i am adding the results together atm.

but

float x = ( ((2*combo.r)-1.0)+((2*combo.b)-1.0)*0.5 )* (Offset*128);
float y = ( ((2*combo.b)-1.0)+((2*combo.g)-1.0)*0.5 ) * (Offset*128);

looks ok. ish.
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017
vec2 Go0 = vec2( (-1.0)+(Offset.x * 60), (-1.0)+(Offset.y * 16) );

other numbers were way off, goddammit windows calc. still a may be wrong 64x18 sounds more like it as the texture is a 32x9 ratio
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017 (edited)
Well, i am getting clean numbers out of cross now

// G0---G1---G2
// |. .\ ..|. ./ ..|
// G3---G4---G5
// |.. / ..|.. \ ..|
// G6---G7---G8

vec3 cp0n = cross(Gray4 - Gray1, Gray4 - Gray0);
vec3 cp1n = cross(Gray4 - Gray0, Gray4 - Gray3);
vec3 cp2n = cross(Gray4 - Gray3, Gray4 - Gray6);
vec3 cp3n = cross(Gray4 - Gray6, Gray4 - Gray7);
vec3 cp4n = cross(Gray4 - Gray7, Gray4 - Gray8);
vec3 cp5n = cross(Gray4 - Gray8, Gray4 - Gray5);
vec3 cp6n = cross(Gray4 - Gray5, Gray4 - Gray2);
vec3 cp7n = cross(Gray4 - Gray2, Gray4 - Gray2);
vec3 cp8n = (Gray4);


vec3 combon = ((2*(cp0na + cp1na + cp2na + cp3na + cp4na + cp5na + cp6na + cp7na + cp8na))-1)/9;


float x = combon.r*(Offset*256);
float y = combon.g*(Offset*256);
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017
yep the cross is giving me good numbers

float x = (cp0n.r + cp1n.r + cp2n.r + cp3n.r + cp4n.r + cp5n.r + cp6n.r + cp7n.r + cp8n.r)*0.02;
float y = (cp0n.b + cp1n.b + cp2n.b + cp3n.b + cp4n.b + cp5n.b + cp6n.b + cp7n.b + cp8n.b)*0.02;

now to figure out how to use refract....
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017
vec2 Offset = vec2(1.0) / vec2 ( textureSize ( texture0, 0 ) );

odd..

vec2 Offset = vec2(1.0) / vec2 ( textureSize ( texture0, 0 ) );

seems to be working..
Z22
Joined in Aug 2017

1166 投稿
November 7, 2017
getting something wrong


vec3 combN = ((1+(cp0n + cp1n + cp2n + cp3n + cp4n + cp5n + cp6n + cp7n + cp8n))*0.5)/9;
vec3 cam = (0.5, 0.5, 0.5);
vec3 SoL = (0.5, 0.5, 0.5);


vec3 refR = refract(normalize(cam), normalize(combN.r), 0.5);
vec3 refG = refract(normalize(cam), normalize(combN.g), 0.5);
vec3 refB = refract(normalize(cam), normalize(combN.b), 0.5);

gives

error C1115: unable to find compatible overloaded function "refract(vec3, float, float)"
TheEmu
Joined in Jul 2012

3309 投稿
November 7, 2017
@Z22 - I have tried posting the text shown in the attached image several times, but for some reason I am not allwed to do so. I have resorted to posting it as an screen capture instead.
Z22
Joined in Aug 2017

1166 投稿
November 8, 2017
ahh, thats was it. I have got it outputting now but i still ned to sort out the cross function as it looks like it's outputting 0 .

looks like it's the inputs to it
Z22
Joined in Aug 2017

1166 投稿
November 8, 2017
Arrg, this refract function is a ***** in the arse. Have cut everything right dwn so all it gets as inputs are

vec4 Girl0 = texture2D(texture0, vec2(vTexCoord.x, vTexCoord.y));

//vec3 Gray4 = (Girl0.x, Girl0.y, (Girl0.r + Girl0.g + Girl0.b)/6);
// works ish...
//the +0.5 is because otherwise it picks up the original girl from the left most copy of the background

////////////same as above but seperated to make sure the correct things were going in.
//float GGirl = (Girl0.r + Girl0.g + Girl0.b)/6;

///vec3 Gray4 = (vTexCoord.x+0.5, vTexCoord.y, (GGirl));
/////////////////////////////////////

vec3 AoI = (0.0, 0.0, 1.0); // messing with AoI and IoR either make it go apeshit chrome, monochrome or black.
vec3 IoR = (0.5, 0.5, 0.5);

vec3 refR = refract(AoI, Gray4.xyz, IoR.r); // Gray4.zzz doesn't really make any differance.
vec3 refG = refract(AoI, Gray4.xyz, IoR.g); // or oddly .xxx or .yyy still have the girl onscreen.
vec3 refB = refract(AoI, Gray4.xyz, IoR.b);

color.r = texture2D(texture0, vec2(refR.z+0.5, refR.z+0.5)).r;// have to +0.5 or it just samples from the top and right edge of the screen

color.g = texture2D(texture0, vec2(refG.z+0.5, refR.z+0.5)).g;
color.b = texture2D(texture0, vec2(refB.z+0.5, refR.z+0.5)).b;
color.a = 1.0;

gl_FragColor = color.rgba;

if it turn off the combine in the scn i notice that some backgrounds manage to pick up the girl even though i have offset it by half the screen(its 2 backgrounds wide)

I have been messing with it for hours and the best i can get is some ***** chrome effect. Think my old way was a better option, at least till i actually know what i am doing.

I don't think it can work with one texture and i can't get 2 textures into this fsh even though i can get 3 into combine.fsh

So ***** it, i give up on this one for now. Back to optimising the previous one.
EverthangForever
Joined in Oct 2009

2477 投稿
November 8, 2017 (edited)
@Z22 I had a go at running the glasstastic.scn you put on the share thread under 3D camera and it is cool with z=0 clipsprite values but as soon as I try to make the girl smaller via scale or change z value it stops the shaders dead.
If you find a way round this/these issues..will be truely grateful, otherwise we're a little restricted to just running the published one only as 2D against fixed backgrounds atm. Its a great effect with many applications for us to use later...Hope you and @Emu can perfect it somemore. Much appreciated thus far..Keep trying man👍
Z22
Joined in Aug 2017

1166 投稿
November 8, 2017
z=0 clipsprite. eh?

the 2 instances of

standingHeight: 1800
sittingheight: 1500

is how you scale the girls.
Z22
Joined in Aug 2017

1166 投稿
November 8, 2017 (edited)
https://drive.google.com/open?id=1VjxRjFm2TcR8Ftq2V6PDA1kNiXOnTvon

Latest "working" version with one that uses static backgrounds and another that can use the background shaders from totems examples. I guess other shaders that use a quad will work too.

The glass3.fsh in this one has a lot of garbage code in there that i haven't clean out/fixed yet.
EverthangForever
Joined in Oct 2009

2477 投稿
November 8, 2017
No I tried that,
standingHeight: 900
sittingheight: 750
does nothing under 3D Cam here. Will try with the update. tks
Z22
Joined in Aug 2017

1166 投稿
November 8, 2017
? 3d cam? those are not additional values, there are already 2 instances of them in the .scn. just change those to your new sizes. don't add more.
Z22
Joined in Aug 2017

1166 投稿
November 8, 2017
where it says..

clipSprite {
pos: 0, 1080
standingHeight: 1800
sittingheight: 1500
source: Clip
blend: true
}
}

framebuffer
{
id: CleanGirl
pos: 1920, 1080
size: 3840, 2160

clipSprite {
pos: 0, 1080
standingHeight: 1800
sittingheight: 1500
source: Clip
blend: true
}
}





change it to say...
clipSprite {
pos: 0, 1080
standingHeight: 900
sittingheight: 750
source: Clip
blend: true
}
}

framebuffer
{
id: CleanGirl
pos: 1920, 1080
size: 3840, 2160

clipSprite {
pos: 0, 1080
standingHeight: 900
sittingheight: 750
source: Clip
blend: true
}
}
EverthangForever
Joined in Oct 2009

2477 投稿
November 8, 2017
sheesh, you right.. i'd overlooked the sitting standing heights nested under CleanGirl
and only changed those nested under fb2..srry re dat. Will play with the new version !
Z22
Joined in Aug 2017

1166 投稿
November 9, 2017 (edited)
vec2 Offset = vec2(1.0) / vec2 ( textureSize ( texture0, 0 ) );


i get an error code for this but the forum won't let me post the code. it just goes to a not allowed to on this server page.

warning C7532: global function textureSize version 130" or later.. hmm it the forum doesnt like quote then hash in posts.

# is fine though.


if i use
#version 130
as the first line it doesn't ***** about that anymore but ***** that

variable gl_TexCoord is deprecated after version 120

so the 2 commands are incompatable in my previous shader. I guess that is causeing problems with the Offset.
whats the correct command to get the texture size in v 1.2 that we are using by default?

i have used...

float Offsetx = (0.5 / u_WindowSize.x);
float Offsety = (1.0 / u_WindowSize.y);
vec2 Offset = (Offsetx, Offsety);

as a temp workaround, and that works and the diagonal streaks are gone too.

shortened to
vec2 Offset = (0.5 / u_WindowSize.x, 1.0 / u_WindowSize.y);
TheEmu
Joined in Jul 2012

3309 投稿
November 9, 2017 (edited)
@Z22 - Looking in some of the shaders provided by Totem I see the following

uniform vec2 textureSize0;
uniform vec2 textureSize1;
uniform vec2 textureSize2;

which are used in the shaders exactly as you would expect from the names. It appears that Totem are automatically providing the texture sizes so you do not need to call the textureSize function.
Z22
Joined in Aug 2017

1166 投稿
November 9, 2017
dammit dammit dammit. missed out a vec3 yesterday.

had
vec3 Gray4 = (Go4.x, Go4.y, ((G4.r + G4.g + G4.b)/3) );

instead of
vec3 Gray4 = vec3(Go4.x, Go4.y, ((G4.r + G4.g + G4.b)/3) );

ffs.

Z22
Joined in Aug 2017

1166 投稿
November 9, 2017
@TheEMu still need the size of one pixel though for the Offset. The workaround is doing fine even though it logs a casting error.
Z22
Joined in Aug 2017

1166 投稿
November 9, 2017
Kinda nice if you want a bondfilm title girl thing.
Z22
Joined in Aug 2017

1166 投稿
November 9, 2017 (edited)
Am getting more normal map like results out of the dross now but is there a better way of combining than this...

//Cross products from v4

vec3 cp0n = cross(Gray4 - Gray1, Gray4 - Gray0);// correct, i think
vec3 cp1n = cross(Gray4 - Gray0, Gray4 - Gray3);
vec3 cp2n = cross(Gray4 - Gray3, Gray4 - Gray6);

vec3 cp3n = cross(Gray4 - Gray6, Gray4 - Gray7);
vec3 cp4n = cross(Gray4 - Gray7, Gray4 - Gray8);
vec3 cp5n = cross(Gray4 - Gray8, Gray4 - Gray5);

vec3 cp6n = cross(Gray4 - Gray5, Gray4 - Gray2);
vec3 cp7n = cross(Gray4 - Gray2, Gray4 - Gray1);
vec3 cp8n = (Gray4);

//Cross the result
vec3 Fc0 = cross(cp0n - cp1n, cp2n - cp3n);
vec3 Fc1 = cross(cp2n - cp3n, cp6n - cp7n);

// and cross the result again
vec3 Fcf = cross(Fc0, Fc1);


// G0--G1--G2
// | \ | \ |
// G3--G4--G5
// | \ | \ |
// G6--G7--G8

TheEmu
Joined in Jul 2012

3309 投稿
November 9, 2017 (edited)
@Z22 - earlier today you said, in response to my post about textureSize0 etc.

still need the size of one pixel though for the Offset.

As the components used to index into a texture run, by defnition from 0.0 to 1.0 and textureSize0.xy etc. give the number of pxiels for the texture then the 1 pixel offsets are just

vec2 Offset = vec2(1.00)/textureSize0;

etc.
Z22
Joined in Aug 2017

1166 投稿
November 9, 2017
That throws an undefined variable error for texturesize0

まだ参加することはできません

iStripper の無料ユーザーはフォーラム内のトピックに参加したり新しいトピックを作ることはできません。
でもベーシックカテゴリーには参加できコミュニティーと接することはできます!