Geometry shader

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Terry
Posts: 55
Joined: Wed Jan 27, 2010 6:16 am
Location: Peking/China

Geometry shader

Post by Terry »

Hello everyone,

Irrlicht 1.7.1 supports geometry shader,but only OpenGL was allowed.I don't know if Cg language is supported or i must use GLSL?
i found nvidia could provide much more materials using Cg and HLSL,so if Cg language and Fx_Composer software could be used,it would be great helpful.

looking forward to your answers!
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

HLSL is also supported "as-is". There's an Irrlicht extension that allows you to use Cg. To be honest I shouldn't speak for it since I haven't used it at all.
Terry
Posts: 55
Joined: Wed Jan 27, 2010 6:16 am
Location: Peking/China

Post by Terry »

slavik262 wrote:HLSL is also supported "as-is". There's an Irrlicht extension that allows you to use Cg. To be honest I shouldn't speak for it since I haven't used it at all.
Still thanks,HLSL only works at vertex shader and fragment shader,not for geometry shader.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Although the pages don't state it clearly, DirectX 10 is required for geometry shaders. Hence, support is only possible via GLSL in Irrlicht.
Terry
Posts: 55
Joined: Wed Jan 27, 2010 6:16 am
Location: Peking/China

Post by Terry »

now irrlicht doesn't support HLSL geometry shader
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

hybrid wrote:Although the pages don't state it clearly, DirectX 10 is required for geometry shaders. Hence, support is only possible via GLSL in Irrlicht.
Are there any plans for a DX10 driver for Irrlicht?
Terry
Posts: 55
Joined: Wed Jan 27, 2010 6:16 am
Location: Peking/China

Post by Terry »

hybrid wrote:Although the pages don't state it clearly, DirectX 10 is required for geometry shaders. Hence, support is only possible via GLSL in Irrlicht.
Hi hybrid,

I'd like to know i compile my Cg files into ASM shaders without needing to compile them on line,if these files could be used in irrlicht?
i'd like to use Cg just because nvidia would provide much more useful informations.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I doubt that this would work. If you need geometry shaders, you need a DX10 interface. Irrlicht always creates a dx9 version interface.
Several people are working on dx10 drivers, but none has reached a level where it was even considered for inclusion. AFAIK, there's even none that even requested so.
sobieh
Posts: 54
Joined: Sat Feb 09, 2008 11:12 pm

Post by sobieh »

DirectX10 doesnt support FixedPipeline anymore so it would be really hard to implement it to Irrlicht without loosing most the performance in pipeline emulation. Well irrlicht could gain alot of performance by dropping the FixedPipeline in DX9 (you could avoid thons of matrices switching for each shader ... ugh). The worst thing here is OpenGL compatibility which almost kills all the DX9/10 cool features.

But you should be able to use GeoShaders in OpenGL's GLSL shaders.
Afaik it doesnt require any extra stuff to work.
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

sobieh wrote:DirectX10 doesnt support FixedPipeline anymore so it would be really hard to implement it to Irrlicht without loosing most the performance in pipeline emulation.
This wouldn't be true for modern graphics cards, which anyone using DirectX 10 would be developing for. In fact, I'd bet it would run faster.
sobieh
Posts: 54
Joined: Sat Feb 09, 2008 11:12 pm

Post by sobieh »

slavik262 wrote:
sobieh wrote:DirectX10 doesnt support FixedPipeline anymore so it would be really hard to implement it to Irrlicht without loosing most the performance in pipeline emulation.
This wouldn't be true for modern graphics cards, which anyone using DirectX 10 would be developing for. In fact, I'd bet it would run faster.
I meant Irrlicht would run much slower on Dx10 because its CVideoDriver is built on old FixedPipeline architecture and since Dx10 doesnt support FixedPipeline the CVideoDriver would have to Emulate it on Dx10. It doesnt matter what GFX card someone has because its a matter of Engine not hardware. Dx10 will run much slower than Dx9 on Irrlicht and thats the truth unless all the Irrlichts VideoDriver would be rebuilt ... which is almost impossible to do because of OpenGL compatibility.

So im preety sure you won't see Irrlicht running on dx10 with the same or better performance as dx9 in any near future.

There is no sence to implement a new DX when you cant use its true potential and power. Irrlicht isn't even using all dx9 features and barely deals with shaders without even mentoining cube or volume dds textures :F
Simple waste of time to develop Dx10 now.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Your reasoning here seems to be flawed in all parts. Irrlicht uses a generalized API, which has high-level calls for rendering. These need to be implemented by any driver. There's no obvious reason why this would automatically become slower in shader based drivers. You might not be able to use all dx10 things easily or at all. But that's a different question.
sobieh
Posts: 54
Joined: Sat Feb 09, 2008 11:12 pm

Post by sobieh »

1. No material file support to load shaders dynamicly
2. No FX file effect support (loading and compiling frag/vert/geo shaders separately for each material on dx10 is ridiculous ... its 2010 :F)
3. No multi vertex buffers + multi vertex format definitions (really handy for geoshaders)
...

As far even 2 first points disqualify irrlicht as Dx10 enabled engine.
Well ... if youre stubborn you could run Dx10 but whats the point ?
Its pointless to develop Dx10 if it cant handle all Dx9 features.

Im not trying to be mean here but just realize that implementing Dx10 is not as easy as it seems to be.
There are many many new features introduced in dx10 which irrlicht just cant handle in its current state without loosing most the compatibility with other drivers such as OpenGL.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Post by Mel »

Maybe it is a dumb question, but would it be useful, as a first step to make easier the DX10 integration into the engine, to create a totally shader based DirectX9 driver, and take it as a base point?
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Post Reply