hello,
it look like a bug in the original shader.
thanks for reporting it.
this shader should work.
could you test it so that i commit it if it's ok.
BTW, the fade control is for both right and left.
so it can be twice what the user expect.
i.e if you want 10 pixel shade on the right, so 10 pixel shade also on the
left, you have to set overlap to 20.
maybe i should change that.
feedback welcome.
Cheers
Cyrille
Le 21/03/2012 19:30, Florian Grond a écrit :
Here I could reproduce the problem with the example patch, having it extended
over the tripple head projectors.
I basically see the shading again only if I drive the overlap to extremely many
pixels.
I was wondering if this might have something to do with the texturing mode
rectangle anywhere?
I modified the the [flat_projection] so that I could define an offset for the
windowcreation.
Thanks for any help,
Best,
Florian
On 3/21/12 1:49 PM, Cyrille Henry wrote:
hello,
would it be possible to see your patch?
that would be easier to help.
Cyrille
Le 21/03/2012 18:15, Florian Grond a écrit :
Hello Jack,
01.flat_projection-help.pd seems to work.
I see either as 4 by 1 or 2 by the fractal image with decreasing
intensity at the edges giving a fade into black.
I looked into the guts of [flat_projection]
and if I send the print message to the glsl_fragemnet and the
glsl_program I get lots of info about user variable uvar#1 to uvar#4
I'm usin PD extended 0.42.5
I compiled GEM from the sources 0.93.3 (added some handmade classes)
My GPU NVIDIA GeForce 7300 GT
My screen size is 1280 * 1024
geometry is x 3 y 1
I would like to have an overlap of about 10 - 15 pixels
In my installation I see that I get a fade into black only if I
increase the overlap to very high numbers up to have the size of my x
dimension. So I conclude the fade into black is just too weak.
How could I change that?
Thanks,
Florian
So I think the GPU model is ok
On 3/20/12 6:51 PM, Jack wrote:
Le 20/03/2012 21:07, Florian Grond a écrit :
Dear List,
I'm currently working on a horizontal 3 screen projection (tripple
head) and I'm using the multiscreen projection flat projection
abstraction from Cyrille.
The overlap is working nicely but I don't get the it to fade. i.e. I
see a vertical stripe of overlap with higher intensity.
Any help or pointer where to look for solutions very much appreciated.
Cheers,
Florian
Hello Florian,
Can you tell us your configuration (Pd, Gem, GPU model) ?
Have you a problem with the example 01.flat_projection-help.pd' ?
++
Jack
_______________________________________________
GEM-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/gem-dev
// Cyrille Henry 2010
//#extension GL_ARB_texture_rectangle : enable
//uniform sampler2DRect MyTex;
uniform sampler2D MyTex;
uniform vec2 overlap, geometry_screen, geometry_computer;
void main (void)
{
// FSAA
// change coord from computer matrix to screen matrice
vec2 coord = (gl_TextureMatrix[0] * gl_TexCoord[0]).st;
vec2 pos_new = coord;
pos_new *= geometry_computer;
float screen_num = floor(pos_new.x)+floor(pos_new.y)*geometry_computer.x;
// number of the screen
pos_new = fract(pos_new); // coord in 1 screen (from 0 to 1)
pos_new.x += fract(screen_num/geometry_screen.x)*geometry_screen.x;
pos_new.y += floor(screen_num/geometry_screen.x);
pos_new /= geometry_screen;
// compute position regarding to the overlap
vec2 pos = pos_new;
pos *= geometry_screen;
vec2 pos_over = fract(pos);
pos_over *= overlap;
pos_over -= overlap/2.;
pos += pos_over;
pos += overlap/2.;
pos /= geometry_screen + overlap;
vec4 color = texture2D(MyTex, pos);
// compute fade on Top and Right
vec2 black = pos_new;
black *= geometry_screen;
black = fract(black);
black *= 1. + (overlap/ (geometry_screen/2.));
black -= 1.;
black = max(black,0.);
black *= (geometry_screen / 2.) / overlap;
if ( ( floor(pos_new.x*geometry_screen.x) < geometry_screen.x-1. ) &&
(overlap.x != 0) )
color *= (1.-black.x);
if ( ( floor(pos_new.y*geometry_screen.y) < geometry_screen.y-1. ) &&
(overlap.x != 0) )
color *= (1.-black.y);
// compute fade on Left and bottom
black = pos_new;
black *= geometry_screen;
black = fract(black);
black = vec2(1.) - black;
black *= 1. + (overlap/ (geometry_screen/2.));
black -= 1.;
black = max(black,0.);
black *= (geometry_screen / 2.) / overlap;
if ( ( floor(pos_new.x*geometry_screen.x) > 0. ) && (overlap.x != 0) )
color *= (1.-black.x);
if ( ( floor(pos_new.y*geometry_screen.y) > 0. ) && (overlap.x != 0) )
color *= (1.-black.y);
gl_FragColor = color;
}
_______________________________________________
GEM-dev mailing list
[email protected]
http://lists.puredata.info/listinfo/gem-dev