am I choking my graphics card with too many shaders?
hi
im just starting to venture into the world of gl objects, and I've been using my normal matrix processing modus operandi, which is basically just making big webs of effects modules and combining them with matrix operators. i make chains of slab objects with the same name containing whatever different shaders, then run them all through one another and into a videoplane.
i only seem to be able to get about three shaders before I start getting apparently random solid colors
is there any inherent limitation on how many different shaders you can work with at a time in max? im working on a low end macbook with an integrated graphics card. could I be choking it with too many shaders?
if so, would learning to write my own shaders so I can combine effects and perameters into a single object solve this problem?
the error message I get is
git.gl.pbuffer: error binding texture: GL Error: Invalid operation
git.gl.texture: unable to create texture!
hjklsadf by restarting the patch ive gotten away with adding a few more shaders!
i suppose my question still stands though. Is this just not how youre supposed to do it?
> is there any inherent limitation on how many different shaders you can work with at a time in max?
not in max, all depends on your card.
> im working on a low end macbook with an integrated graphics card. could I be choking it with too many shaders?
those are definitely not the best cards for 3d graphics.
> if so, would learning to write my own shaders so I can combine effects and perameters into a single object solve this problem?
possibly, but depends on what you're trying to do. some effects are impossible to achieve without chaining shaders.
obviously the more you know about shaders, the better off you'll be.
unfortunately, the best advice i can give is to work with a better graphics card.
> a better graphics card
do you have any hint?
Quote: Kyred wrote on Sun, 25 January 2009 03:41
----------------------------------------------------
> > a better graphics card
>
> do you have any hint?
----------------------------------------------------
one of the biggest problems with macbooks is that it isn't "possible" to upgrade the graphics card.
thanks a lot for your response. thats frustrating but its good to know
however I have been getting some somewhat interesting gpu clitches
i am also having this problem on a 2 year old macbook pro..if i try to chain more than 3 shaders together, i get an all white image, which goes away if I turn one other shader off (doesnt matter which one..if i have 5 on and turn off any of them, the image comes back)..nothing fancy, just scalebias, sobel, brcosa and normal..annoying because I'm trying to rebuild my vj patch in gl but i normally have a few cases where i need tons of effects on at once
please post a patch demonstrating this behavior with specific system and software specifications, and we will do our best to track down problems.
here is my embarassing looking patch in the prototyping stage..im using the video processing tutorial from the main page as a jumping off point ..i put some notes in there to walk you though how it works..just turn the effects on with the ubu menus and when i reach the magic number, my screen goes white
system: 17" macbook pro 2.16ghz
2gb ram
ati radeon x 1600 with 256mb vram
using mac os x 10.5.6
latest version of max, 5.0.5
here is my embarassing patch in the prototyping stage using the video processing tutorial from the main page as a starting point..i added some comments as to how to get the thing running..when i have 4 total shaders on at once (there is one hidden in the 'end of video chain' patch, my window goes white
system: 17" macbook pro 2.16 ghz
2gb ram
ati radeon x 1600 ith 256mb vram
os: 10.5.6
max: 5.0.5 (latest)
quicktime: whatever the latest update was a week or two ago.. 7.6.2 or whatever
sorry..double post and couldnt edit it
I think your issue is the nested @dimscale 2 1, which should only be
used on the first uyvy2rgba slab. The dimensions keep growing by
powers of two until the graphics card can't support the resolution.
-Joshua
ah..thank you so much..that was exactly it..thats what i get for blindly copying and pasting..now to really see what my shader limit is, hah
ive encountered a new problem that i think is probably related to my crappy graphics card. td.rota.jxs simply does not work on my machine. I get black.
does anyone know of any other shaders or combinations of shaders that would allow me to scale and rotate an image around a variable axis? its so hard to make attractive feedback loops without it
td.kaleido also doesnt work although that's less important
this has been reported and an alternative rota shader has been posted
for older/weaker graphics cards. search the forums.
/*j
> td.rota.jxs simply does not work on my machine. I get black.
are you referring to the one posted in this thread?
I had trouble with that one as well. i get this error message
jit_xml_documentL error reading file at byte offset 3862 / not well-formed (invalid token)
line (137): >
jit.gl.shader: error reading shader xml file...
XML was munged by the forum, I suppose. Here's a zip file uploaded in the forum.
-Joshua
goddamnit, no dice. there are two underscores after the final that it seems to want me to get rid of but when I do, it gives me "ERROR: Parser found no code to compile in source strings."
sorry about all this and thankyou so much for your help
I'm just trying to get a textured plane to appear on screen. can anyone tell me what I'm doing wrong? I've attached the nonfunctioning patch
this is part of a larger problem I'm trying to solve. I have a particle system based on the one from particle sprites in recipe book 1 and I want to get more than one type of sprite to appear in the system at the same time. I figure if I can get it to load more than one texture, I can either switch between them as it iterates through the particles, or generate two or more systems with different textures and composite them. ive included that patch too, if anyone has any suggestions on how best to do that I'd love to hear them
for the smaller problem you need to turn automatic on, and set your dim to a larger value in the gridshape.
for the larger problem, not sure if i understand, but you can capture to texture with an alpha value, and composite these textures over each other.
recent posts discuss this method in detail.https://cycling74.com/forums/index.php?t=msg&rid=3061&S=2226b956a46b6156cf66899bd5765a2c&th=38251&goto=166481#msg_168347
ah thankyou a lot!
thanks to your smaller solution, I've made this patch that seems to me like it ought to solve the bigger broblem. It doesn't work though and I don't know why
i have two separate particle systems on two separate renderers in two separate windows. both work fine by themselves. It seemed to me like I ought to be able to combine them by switching the "drawto" attribute on one of the gl.gridshape objects to the name of the other gridshape object.
to operate the patch, open it, click the only saved preset, load different images into the two gl.texture objects (im using transparent .tiffs) and load a .wav file into the sfplay~ object. The particles should jitter around in their separate windows according to the amplitude of the sound.
now switch the destination of the "dok" gridshape object to "flicker". If your computer is having the same issue as mine, you should see a second system of white square particles bouncing along with the properly textured particles in the "flicker" window
if at this point you switch the destination of the "dok" texture object to "flicker", you see a single instance of your second texture bouncing along with a full system of your first texture. this is the closest I've been able to get to what I want but really I'd like to see the two full particle systems running in the same window. (interestingly, when I have my windows in expose mode [im on a mac], I can see the window flickering back and forth between the two systems. this tells me that it's rendering the complete second system, it's just not displaying it. could this be a timing issue?)
should I be going at this by a different approach?
you need to send the drawto message to both the gl.gridshape and the gl.texture.
yeah, I've tried that, it still gets me just a single instance of one particle on top of a full set of the other particle
I managed to solve the problem using the name attribute for the jit.gl.texture object. I loaded three .tiffs into three texture objects with different names. then, using a new plane I added to the matrix that determines XYZ coordinates for each particle, I had the gridshape object switch between the shaders as it jit.iterates through the particles. I included the fixed patch for anyone who's interested