arb assembly tutorials?

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Cool, that intext directive turns up some useful stuff, never knew about that :)

Well anyway, I converted all my shaders, took me two days but still it was easier than I imagined. Now I need to dig out my netbook to test...
pippy3
Posts: 155
Joined: Tue Dec 15, 2009 7:32 am

Post by pippy3 »

xDan wrote:Cool, that intext directive turns up some useful stuff, never knew about that :)

Well anyway, I converted all my shaders, took me two days but still it was easier than I imagined. Now I need to dig out my netbook to test...
I'm interested to see how well it turned out.

I assumed that the hardware limitations where the main obstacle, eg pixel shader x.x supports feature y, and the compilation of glsl code was just a formality.
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

I put the code up here, probably not much use to anyone out of context of my game though:
http://xzist.org/temp/puzzlegame/shaders/

It was all fairly trivial, couple of slightly tricky parts:

- no "if" construct, so had to use SLT/SGE (set-less than, so if the condition is true a variable is set to 1.0, otherwise is set to 0.0, you can then use that as a multiplier)
- no normalise function, but that is easily achieved (and can be seen done in the Irrlicht example shaders)
- no mix function, but that's also easily achieved (just a linear interpolation)
- no looping, so I had to unfold my loops (only time I had a loop was in my post processing blur pass)

But the end result is visually identical to my GLSL, since I didn't use any advanced features (mainly as my card didn't support them).

Though having tested it on my netbook, it works, but it's too slow to be usable. But hopefully it will still improve compatibility for some older PCs or laptops even if netbooks are out of the question.
omaremad
Competition winner
Posts: 1027
Joined: Fri Jul 15, 2005 11:30 pm
Location: Cairo,Egypt

Post by omaremad »

Cg toolkit from nvidia can parse glsl and compile to arb.
"Irrlicht is obese"

If you want modern rendering techniques learn how to make them or go to the engine next door =p
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

I did see that, I kind of wanted to try playing with some kind of assembly language for once though :)
Post Reply