Hi,
I must be stupid or something. I can't see any relevant difference between the attached patch (and its shader) and the example "01 simple texture" in the "10 GLSL" folder.
However, the abovementioned example works fine here, while the attached example shows up as a all-one-color square (probably the color of one corner pixel of the image).
It looks much like an attempt to use normalized coordinates (0..1) where whatevertheyarecalled coordinates are expected (0..width,0..height). However, "my" shader seems identical to Cyrille's one and I'm sending the [rectangle 1( message to all textures, so I can't understand why one works while the other doesn't...
It must be right in front of my eyes but I don't see it.
(oh you need img1,2,3.jpg from the example folder to test it)
thanks m.
cyrille henry escribió:
there is no pix_image for the shader pix_texture. so there is no coordinate : gl_MultiTexCoord0 is not initialised.
Oh...
And why does "my" shader work fine in non-rectangular mode?
cyrille henry escribió:
there is no pix_image for the shader pix_texture. so there is no coordinate : gl_MultiTexCoord0 is not initialised.
I've added a [pix_image] before [pix_texture] (in the shader's chain) and nothing change. Do I have to load an image into that pix_texture?
But I want to use a texture "created" somewhere else, whose texunit I know (indeed it's gonna be the video from a pix_video)...
So the texcoords initialized by the pix_image should be meaningless...
With rectangle 0 the issue does not exist... I'm a bit confused...
Now that I've put a [pix_image] with an image, I can see the image correctly.
However,
beginning) and I can't understand why 2) Changing the uniform variable "curtex" with the [curtext...( message does not work (which did without rectangle textures).
The images have now 3 different sizes, but before I can test whether I get the results I expect or not, I am stuck with these 2 problems which don't make sense to me.
Anybody can see what's wrong in the patch or shader?
thanks m.
cyrille henry escribió:
Matteo Sisti Sette escribió:
Sorry sorry sorry I wasn't loading the shader, forget about this one.
HOWEVER, I'm still getting GL stack overflows, both before and after loading the shader!!!
That makes me mad, why the hell stack under/overflows??????
It seems somehow related to the use of [texunit( messages, but what's wrong with them???
cyrille henry escribió:
Oh, thank you! The separator! I forgot to try removing it :$:$
In my "real" patch however, it will be pretty difficult to find out what separators to remove (and whether I can remove them) to avoid the stack overflow....
cyrille henry escribió:
I've done some tests. You're right, removing the separator under/overflows stop. However with the separator and no [texunuit( messages there are no o/u-flows. Also, some [texunit( messages stop the o/u-flows, that is, using texunit M on one given pix_texture and texunit N on another pix_texture may stop the overflows for some values of M and N.
This is not related to the use of shaders, since I have reproduced it without using shaders (see attached patch).
Any idea for a workaround? I do need separators...
thanks
m.