Forums > Jitter

bug: texture turns white on new mac books with Max5

January 5, 2013 | 2:12 pm

Bug happens when attributes "wrap repeat" and "rectangle 1" on newest macbook pro. See patch below.
It does *not* happen with Max6 (v 6.0.8) on any of the config below, but does with Max5.
Is it possible to hope for a fix in Max 5 (v 5.1.9) (to ease the transition period of porting a huge patch in Max6 :) ) ?

System config on which the probleme does happen :
- ¨Processor 2,6Ghz Intel Core i7
- 8Go 1600 Mhz DDR3
- NVIDIA GeForce GT 650M 1024 Mo
- OSX 10.8.2

System on which the probleme does *not* happen :
- Processor 2,8 GHz Intel Core 2 Duo
- 4 Go 1067 MHz DDR3
- NVIDIA GeForce 9400M 256 MB
- Mac OS X Lion 10.7.4

– Pasted Max Patch, click to expand. –

January 9, 2013 | 1:40 pm

bump ?


January 9, 2013 | 3:18 pm

repeat mode wrapping is not compatible with rectangular textures in opengl.
max 6 simply handles this better than max 5.


January 10, 2013 | 9:30 am

Thanks Rob for the reply.

How is it possible then to get a continuous repeat mode in a system using a 2-pass rendering, given the fact that :

- with @rectangle 0 you get the captured window put in a gl_texture texture sized a multiple of 2^N (which does not match your screen size, in most case), and the results is unwanted border in the texture
- with @rectangle 1, you cannot use tex_plane_s and tex_plane_t to resize the texture (which format does match the screen size in this case)

See example patch below if what I explain here is not clear.

NB : I am aware that it is possible to get something better than the "checker" background (e.g. with @defaultimage black), but left if on purpose to make my problem more visible.

– Pasted Max Patch, click to expand. –

January 10, 2013 | 7:39 pm

hi vincent.

below is a patch demonstrating how to do this with max 6 and jit.gl.node.
the trick is to use the "sendoutput" message to jit.gl.node, which allows you to change the default behavior of the output texture, as well as disabling @adapt and setting the dims explicitly.

then you want to use @transform_reset 1 on your first jit.gl.gridshape, so that it completely fills the captured texture.

i’m not sure if this is possible with max 5.

– Pasted Max Patch, click to expand. –

January 14, 2013 | 9:33 am

Thanks Rob for the reply.

I am aware that jit.gl.node is a very good candidate to achieve this kind of multiple bus system…
* However * (and apart from the fact that i am looking for a Max5 solution at the moment), I remember when I have been testing jit.gl.node that it acts as somehow various opengl "shared context". A consequence is that the way to share a jit.gl.texture bank between various OpenGL busses is to set the context (with drawto) on jit.gl.texture objects at every GL-bus tick.

I have the (maybe wrong) feeling that using a single GL-context and rendering the various pass with the "totexture to render" methode (what do you call it ?) seems more robust optimized.

Any hint on what is the right way to go is ultra-welcome !
aTdHvAaNnKcSe


January 14, 2013 | 9:36 pm

i’m not sure what you’re asking.
the patch i posted above is the current recommended way to go about this kind of thing.


January 15, 2013 | 1:54 am

FWIW, in theory, one could write a shader in Max 5 which wraps texture coordinates to the modulo range of the texture dimensions even with rectangular textures.


January 15, 2013 | 10:49 am

Rob : what I mean is : suppose you have a texture bank filled your favourite pictures, and you want to use these textures in any rendering pass, I guess you solution implies to set all the textures a "drawto" message to all the texture you you in a rendering pass, to set the current context… which I find a bit aukward…
Is my purpose clearer ? Or should I send an example patch ?

Joshua : thanks for the idea, I had not thought of it !


Viewing 9 posts - 1 through 9 (of 9 total)