PS2 and PS3

category: general [glöplog]
First of all, where can I find a specification of what is allowed and what is not in different pixel shader versions? I couldn't find one in google.

I tried to do some implicit surface test but now I understand why all these require PS3.

do while = not supported
break inside for loop = not supported
some stupid unoptimal thing to make it work on for loop with constant steps (but doesn't stop when a hit happens)
trying to write things in for loop = frequent not supported sometimes(stupid things where float c = sin(dir.x) works but float c = sin(dir.x) + sin(dir.y) doesn't work (wtf?)

Finally because I thought the automatic loop unrolling for PS2 card might be confused depending on what I write inside the loop, I manually unrolled the loops.

One chunk of unrolled code = works
Two copies of it = works
Fours copies of the same code that worked = not supported

I was like: WTF?

Is one limitation of PS2 that the shader code must be of a limited size? Or am I doing something wrong?

..and then I decided I need a new graphics card (or a new computer)
added on the 2009-08-24 09:23:09 by Optimonk Optimonk
Ok, maybe what I write here is well known and you are just having the laughs, but I am just asking what the limitations could be and if there is a documentation for the diferrences between the shader versions. Also,. is it ever possible to do an implicit surface algorithm (I tried to do the one with the 3d plasma alike surfaces) on PS2 even with very weird fucked up code?
added on the 2009-08-24 09:24:27 by Optimonk Optimonk
As you can see PS2 doesn't have dynamic flow control (means: all code branches needs to be evaluated and all loops unrolled) and a relatively small instruction limit.
added on the 2009-08-24 09:30:31 by masterm masterm
what masterm said. The world gets better once everyone has a shader model 4 gpu.

I'm eagerly waiting for shader model 5 (or later), where recursive calls are allowed :)
added on the 2009-08-24 10:33:55 by xTr1m xTr1m
ps2 is capable of 64 instructions only, so with some sin() you´ll exceed these very fast !
i´m coding everything in ps3, has 4096 ALUs -> enough for 4ks i´d say :)
ps3_cards arent even expensive anymore nowadays, so just get one :)
what's the point of recursive calls though since you can convert *any* recursive algorithm to an iterative one? oO
added on the 2009-08-24 10:51:51 by nystep nystep
honestly, aren't you *bored* playing with plasmas for the past 10 years of your life ??
added on the 2009-08-24 10:52:14 by Navis Navis
xbox sux ps2 rules!

ohwait wrong site.
added on the 2009-08-24 10:53:31 by alien^PDX alien^PDX
@Navis: I am not talking about the old plasma (and no I am not bored, please stop criticizing my love for plasmas, thanks :), it's the 3d effect in dollop and other 4ks which look to me like 3d plasmas (but might be perlin, I am just calling them 3d plasmas)

I have just seen the vertex shader has 65536 executed instructions so it might fit there with a grid of quads like pixels. Lame, but I just want to see the algorithm work (the other alternative in my crappy hardware is to do it in software)

Sorry, I had a PS3 card when I did the quantum retrofuture demo but my motherboard burned and I got an older motherboard that doesn't like the new gfx card and I have the PS2 one and a slower computer. I will not update it now because I will buy a laptop at the end of September for my studies.
added on the 2009-08-24 11:12:34 by Optimonk Optimonk
If you already reached a perfectly reasonable explaination, why are you starting a thread about it?

..and, while you're doing all this "change" stuff, bring your demo-effects into the 21st century. :)
added on the 2009-08-24 11:23:06 by gloom gloom
Yea, i was wondering if he was attacking me or u :)
I've also one a lot of plasmas in the last 10 years and i love them. And no they don't bore me :)
But yep, shit can happen when you only judge people out of 3 lines at pouet..
added on the 2009-08-24 11:24:18 by nystep nystep
@gloom: I asked it here because I didn't believe it. I wasn't sure too.
added on the 2009-08-24 17:55:13 by Optimonk Optimonk