Page 1 of 2

YES YES YES YES YES SHADERS OH YES!

Posted: Mon Jul 19, 2004 1:35 pm
by thesmileman
Did anyone read Niko's blog about ordering books on shaders? Anyway if you did not it looks like he is getting some books in hopes that it will help with adding shaders to irrlicht. SWEEET :D :D :D

Posted: Mon Jul 19, 2004 5:21 pm
by soconne
If you search through the forums, somebody has already written a class for loading CG Shaders.

Posted: Tue Jul 20, 2004 11:16 am
by Felipe
Way to kill his party, soconne. :D You should have let him enjoy the news a bit...

Posted: Tue Jul 20, 2004 12:09 pm
by soconne
That is why I am here 8)

Posted: Tue Jul 20, 2004 12:09 pm
by soconne
That is why I am here 8)

Posted: Tue Jul 20, 2004 12:09 pm
by soconne
That is why I am here 8)

Posted: Tue Jul 20, 2004 6:12 pm
by thesmileman
I knew someone wrote that but it was only for open gl and noone every tried to get it working for directx which is what I prefer.

Posted: Tue Jul 20, 2004 6:28 pm
by bal
Now I saw that bumpmapping and other shader stuff in the G3D-library demo I really can't wait to see those things in Irrlicht :)
Keep on reading and understanding, niko!

Posted: Tue Jul 20, 2004 11:05 pm
by dingo
I sure hope we are talking about GLSL or Cg because they are so much easier to work with than others IMO.

The funny thing is that GLSL is still only supported by beta drivers by NVidia and ATI has only released one version that supports GLSL (just).

........prepare to ugrade your video cards ppl!!!!!!!

(trust me it is worth it)

Posted: Wed Jul 21, 2004 8:28 pm
by Hoff
thesmileman wrote:I knew someone wrote that but it was only for open gl and noone every tried to get it working for directx which is what I prefer.
Why do you prefer DirectX? Isn't it all abstracted away by Irrlicht, so you couldn't possibly know which one you're using anyway?

Posted: Wed Jul 21, 2004 10:39 pm
by dingo
The actual code to create the shader would be either GLSL, Cg or HLSL. These programs are relatively small and use a very similar (but not the same) language between them.

You could also write GPU family specific assembler code (DX 8.1 shaders)- but that is just crazy when we have the 3 languages mentioned above.

To abstract away the shading language, Niko would have to create a new one, then translate it to base code, then ask the JIT compiler for it to compile the translated code (without error) and the use it for each renderer.

Of course probably the best choice would be Cg as it supports both OpenGL and DirectX. One issue is though it is a NVidia product. ATI cards can use it happily but I'm sure NVidia will tailor it to be optimised for NVidia cards (I only have NVidia cards at the moment so I can't run any comparisons.)

Personally I think the OpenGL Shading Language is the nicest to work in. Support for it is relative immature but is rapidly increasing. It is built along the same lines as the rest of OpenGL so if you can add OpenGL shading Language to OpenGL programs nicely.

Finally, OpenGL Shading runs nicely on linux (and maybe other platforms that support Open - I don't know). DirectX (and HLSL) doesn't run on Linux.

Posted: Thu Jul 22, 2004 11:52 am
by niko
dingo wrote:To abstract away the shading language, Niko would have to create a new one, then translate it to base code, then ask the JIT compiler for it to compile the translated code (without error) and the use it for each renderer.
That's right. That's the reasons why I won't abstract these languages first.
I don't know how Ogre does this (haven't looked at it yet), but some people told me that they are managing this somehow very elegantly.
For the enhanced material system, I'll make all interfaces of the real renderers accessible to make it possible to add new material types without having to modify the Irrlicht.dll.

Posted: Thu Jul 22, 2004 7:17 pm
by thesmileman
Hoff wrote:Why do you prefer DirectX? Isn't it all abstracted away by Irrlicht, so you couldn't possibly know which one you're using anyway?
I prefer directx because of two things in Irrlicht. One the quality of rendering is better. If you don't believe me make a particle system and look at the difference from directx and opengl. Two most test I have done the directx rendering in Irrlicht is faster.

Posted: Thu Jul 22, 2004 10:21 pm
by Hoff
thesmileman wrote:
Hoff wrote:Why do you prefer DirectX? Isn't it all abstracted away by Irrlicht, so you couldn't possibly know which one you're using anyway?
I prefer directx because of two things in Irrlicht. One the quality of rendering is better. If you don't believe me make a particle system and look at the difference from directx and opengl. Two most test I have done the directx rendering in Irrlicht is faster.
I don't want to get into a flame war about this, but --

Any quality / speed differences in the two are because of driver / Irrlicht issues. Think about it -- DirectX and OpenGL are using the hardware in the exact same way, one of them won't magically increase your rendering quality (unless one API exposes some functionality the other doesn't, but that's not the case). As far as Irrlicht goes, I know there are a few places where OpenGL is kinda left behind in the implementation. Last I knew, the color buffer was iterated through once each rendering (which is ridiculous), and I'm pretty sure there are some multitexturing issues here and there.

Posted: Fri Jul 23, 2004 1:44 am
by thesmileman
@Hoff, I guess I was not clear in my explaination. I thought saying "directx rendering in Irrlicht" would mean only in irrlicht not in general not in general I guess you did not see that.