am I choking my graphics card with too many shaders?
Jan 24 2009 | 7:37 pm
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?
- Jan 24 2009 | 7:42 pmthe error message I get is git.gl.pbuffer: error binding texture: GL Error: Invalid operation git.gl.texture: unable to create texture!
- Jan 24 2009 | 7:49 pmhjklsadf 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?
- Jan 25 2009 | 12:42 am> 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.
- Jan 25 2009 | 10:41 am> a better graphics carddo you have any hint?
- Jan 25 2009 | 7:59 pmQuote: Kyred wrote on Sun, 25 January 2009 03:41 ---------------------------------------------------- > > a better graphics card > > do you have any hint? ----------------------------------------------------
- Jan 25 2009 | 11:51 pmone of the biggest problems with macbooks is that it isn't "possible" to upgrade the graphics card.
- Jan 26 2009 | 12:09 am
- Feb 02 2009 | 3:58 ami 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
- Feb 02 2009 | 6:34 amplease post a patch demonstrating this behavior with specific system and software specifications, and we will do our best to track down problems.
- Feb 02 2009 | 2:15 pmhere 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 whitesystem: 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
- Feb 02 2009 | 2:26 pmhere 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 whitesystem: 17" macbook pro 2.16 ghz 2gb ram ati radeon x 1600 ith 256mb vramos: 10.5.6 max: 5.0.5 (latest) quicktime: whatever the latest update was a week or two ago.. 7.6.2 or whatever
- Feb 02 2009 | 2:27 pmsorry..double post and couldnt edit it
- Feb 02 2009 | 7:55 pmI 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
- Feb 02 2009 | 8:27 pmah..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
- Feb 11 2009 | 9:29 pmive 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
- Feb 11 2009 | 9:59 pmtd.kaleido also doesnt work although that's less important
- Feb 12 2009 | 6:07 amthis 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.
- Feb 12 2009 | 2:19 pmare 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...
- Feb 12 2009 | 4:20 pmXML was munged by the forum, I suppose. Here's a zip file uploaded in the forum.-Joshua
- Feb 12 2009 | 6:22 pmgoddamnit, 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
- Mar 29 2009 | 6:25 pmI'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
- Mar 29 2009 | 6:26 pmthis 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
- Mar 29 2009 | 7:21 pmfor 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
- Mar 29 2009 | 9:05 pmah 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 whyi 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" windowif 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?
- Mar 29 2009 | 10:01 pmyou need to send the drawto message to both the gl.gridshape and the gl.texture.
- Mar 30 2009 | 12:17 amyeah, I've tried that, it still gets me just a single instance of one particle on top of a full set of the other particleI 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