Shader support

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

Shader support

Post by William Finlayson »

I have just finished adding DirectX 8 shader support for nVidia cards under OpenGL to Irrlicht/Bindenlicht. The reason for doing this was that my GeForce4 ti doesnt support GL_ARB_fragment_shader, so there was no way of using pixel shaders with Irrlicht even though the card supports them. It took some time to implement, but it now means that GeForce3 cards and up can run DirectX style ps1.1 and vs1.1 shader programs under OpenGL.

I was wondering if anyone would be interested in having the same support for ATI cards. If would mean that almost all older hardware would be able to use shaders under OpenGL, using common dx shader programs, but would be more work again. So is anyone interested in this? Or is the hardware I'm using just totally obsolete and eveyone is using OpenGL 1.5/2.0 shaders?

As a side note, although you might say that should just use DirectX and then not have to worry about doing this, the advantage of having it working under OpenGL is that it works on Linux as well as Windows, and hopefully any other platform Irrlicht gets ported to.
Guest

Post by Guest »

Great stuff.
I didn't know it was possible to combine DX shaders with OGL.

I can't say I'm a potential "customer" - I have an FX5200 on my Linux box - and from what I understood, ATi's Linux drivers weren't supposed to be very good.
But IMO it would be great because it allows Irr devs to use more advanced options on a larger number of systems.
Guest

Post by Guest »

Such greate feature should be implemented for Irrlicht NX++. Go here and post your patch if you want:

http://www.irrlichtnx.mmdevel.de/
Guest

Post by Guest »

The BORG has spoken!
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

Post by William Finlayson »

To add the nvidia shader support I useda modified version of nvparse, so it needs to be linked with that, and it uses extgl for extension loading, and on top of that, it's built on Irrlicht 7.1, so I'm not sure how easy it would be to add directly to nx++.

If someone wants to give it a go though, I'll be happy to post the source somewhere.
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Precompiled demo? Screenshots showing a (rather advanced) shader? This sound awesome :). I'm sure it would be easy to integrate it in NX++, though mm765 is currently redesigning the material system so it'll need some modification.
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
William Finlayson
Posts: 61
Joined: Mon Oct 25, 2004 12:11 am

Post by William Finlayson »

There is an example of it working in the latest Bindenlicht release (0.1.7). Try out TestShaders. If you want to view/change the pixel shader, it's in the media folder. If your card supports arb_fragment_program then you can still get it to use the nVidia shader by altering the example source, or by removing opengl.ps.

Let me know how it goes, I haven't had much of a chance to test it. dx vertex shaders are disabled, as they aren't working yet, and it seems that pretty much all cards have arb_vertex_program anyway,[/url]
Post Reply