DirectX 11 render system - work-in-progress

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
evandropaulino
Gnoblar
Posts: 10
Joined: Mon Jun 06, 2011 9:42 pm

Re: DirectX 11 render system - work-in-progress

Post by evandropaulino »

Hi Assaf,

I will send the agreement this weekend.

Thanks.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

@evandropaulino: Thanks.
Can you also check in the following files:

Code: Select all

BlurH_ps40.hlsl
Blur_vs40.hlsl
BlurV_ps40.hlsl
Bloom2_ps40.hlsl
BrightBloom2_ps40.hlsl
Watch out for my OGRE related tweets here.
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Crashy »

I've just submitted the patch for the implementation of "comparison filtering"(I don't really know what's the technical term behind that).

Feels free to comment about it.
Follow la Moustache on Twitter or on Facebook
Image
Shtuka
Greenskin
Posts: 146
Joined: Mon Jan 10, 2011 7:39 pm
x 9

Re: DirectX 11 render system - work-in-progress

Post by Shtuka »

What remains to be done? (How) Can I help?
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

Re: DirectX 11 render system - work-in-progress

Post by LBDude »

hi, I have an ATI 4870x2 card and DX11 crashes on me on this line:

Code: Select all

hr = mDevice->CreateRasterizerState(&mRasterizerDesc, &opState->mRasterizer) ;
In OgreD3D11RenderSystem.cpp

Update:
Running without the debugger my log spits this out:

Code: Select all

13:24:53: OGRE EXCEPTION(9:UnimplementedException): Sorry your card does not support SHADER MODEL 3.0; cannot continue. in EngineController::onInit() at ..\..\..\src\view\EngineController.cpp (line 246)
This is a check I have to check for SM3. So I guess on DX11 it's not detecting SM3?


I think the problem is some of my shader doesn't work in DX11. Works fine in DX9. Is there some sort of doc / guideline that I can read in order to make my shaders compatible with dx11? I'm using SM3 do I need to change it to SM4?

Also this:

Code: Select all

13:14:34: OGRE EXCEPTION(3:RenderingAPIException): Attempted to render to a D3D11 device without both vertex and fragment shaders there is no fixed pipeline in d3d11 - use the RTSS or write custom shaders. in D3D11RenderSystem::_render at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11RenderSystem.cpp (line 2060)
13:14:49: OGRE EXCEPTION(3:RenderingAPIException): Attempted to render to a D3D11 device without both vertex and fragment shaders there is no fixed pipeline in d3d11 - use the RTSS or write custom shaders. in D3D11RenderSystem::_render at ..\..\..\RenderSystems\Direct3D11\src\OgreD3D11RenderSystem.cpp (line 2060)
Which I'm assuming is related to problems with my shaders above.
My blog here.
Game twitter here
Zero
Halfling
Posts: 50
Joined: Mon Mar 10, 2008 12:08 am
Location: Stuttgart|Germany
x 1
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Zero »

With DX11/DX10 you can only use SM4+ or you enable backwards compatiblity. Corret me if I'm wrong ;)

The second exceptions means that you tried to render a mesh without a vertex and fragment shader.
DX11/10 doesn't have a fixed function pipline and this means you need shaders.
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

Yes, only SM4 and up.
Watch out for my OGRE related tweets here.
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

Re: DirectX 11 render system - work-in-progress

Post by LBDude »

ahh thanks I will try it again later. How would you go about enabling backward compatibility mode anyhow? The only feature I want to use at this point is texture arrays.
My blog here.
Game twitter here
Shtuka
Greenskin
Posts: 146
Joined: Mon Jan 10, 2011 7:39 pm
x 9

Re: DirectX 11 render system - work-in-progress

Post by Shtuka »

Shtuka wrote:What remains to be done? (How) Can I help?
*push*
Zero
Halfling
Posts: 50
Joined: Mon Mar 10, 2008 12:08 am
Location: Stuttgart|Germany
x 1
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Zero »

https://sourceforge.net/tracker/?func=d ... tid=302997 next patch, for example reworked lock/unlocking of textures.

@Shtuka : You can implement vertex/pixel/geomtry shaders in the right way, at the moment you can only get 16 for all 3, but DX11 supports 16 for each, as far as I understand.
Image
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

DX 11.1

Post by Mind Calamity »

So, I just found out that a new version of DX came out :)

I didn't read into the detailed info, I just saw the list of features, and here it is:

Code: Select all

    * Shader tracing
    * Direct3D device sharing
    * Check support of new Direct3D 11.1 features and formats
    * Create larger constant buffers than a shader can access
    * Use logical operations in a render target
    * Force the sample count to create a rasterizer state
    * Process video resources with shaders
    * Change subresources with new copy options
    * Discard resources and resource views
    * Support a larger number of UAVs
    * Bind a subrange of a constant buffer to a shader
    * Retrieve the subrange of a constant buffer that is bound to a shader
    * Clear all or part of a resource view
    * Map SRVs of dynamic buffers with NO_OVERWRITE
    * Use UAVs at every pipeline stage
* List taken from here.

What's the plan ?
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

Not out yet.
Watch out for my OGRE related tweets here.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: DirectX 11 render system - work-in-progress

Post by Mind Calamity »

Assaf Raman wrote:Not out yet.
Oh, I guess this blog article on GameDev misled me :)
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

Assaf Raman wrote:@evandropaulino: Thanks.
Can you also check in the following files:

Code: Select all

BlurH_ps40.hlsl
Blur_vs40.hlsl
BlurV_ps40.hlsl
Bloom2_ps40.hlsl
BrightBloom2_ps40.hlsl
@evandropaulino: Any progress with this?
Thanks.
Watch out for my OGRE related tweets here.
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Crashy »

I've got the multiple render target working here, I'm stress testing it with my application to see if it's stable enough to be submitted.
Follow la Moustache on Twitter or on Facebook
Image
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: DirectX 11 render system - work-in-progress

Post by boyamer »

Anyone got stencil shadows working here? Seams that it need vertex and fragment shaders.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

If you get a new errors in the d3d11 render system after installing the Visual Studio 11 preview (like me) - read this to fix the issue - http://www.gamedev.net/topic/610863-inp ... tallation/
Or just read it to learn about the good work Microsoft is doing.
Watch out for my OGRE related tweets here.
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: DirectX 11 render system - work-in-progress

Post by boyamer »

I've got some new features running, please note that the repository is the one used into Alimer engine.
I'm using states as DX11 even into Ogre core, so you'll notice file called OgreRenderStates.h which contains all
new states and how we manage them, i've added support fot Domain and Hull shader, fixed 1D texture loading and so on.
Probably i'll add more features in future as i want DX11 support in Alimer engine.

https://bitbucket.org/amerkoleci/ogre_modified/overview

Hope this helps.

Amer
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

Amer - I am having lots of EOL issues when merging your code... What do you suggest?
Watch out for my OGRE related tweets here.
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: DirectX 11 render system - work-in-progress

Post by boyamer »

Assaf Raman wrote:Amer - I am having lots of EOL issues when merging your code... What do you suggest?
I do not suggest to merge my files, as all changes are fully related to Alimer engine, just take look on how Domain and Hull shader are created, stuff like that, you can manually copy and paste it into official ogre.
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: DirectX 11 render system - work-in-progress

Post by boyamer »

Do you reference to this error:

Code: Select all

OGRE EXCEPTION(3:RenderingAPIException): Unable to set D3D11 vertex declarationID3D11Device::CreateInputLayout: The provided input signature expects to read an element with SemanticName/Index: '(null)'/55486577, but the declaration doesn't provide a matching name.
 in D3D11VertexDeclaration::getILayoutByShader at D:\SVN\ogre_trunk\RenderSystems\Direct3D11\src/OgreD3D11VertexDeclaration.cpp (line 226)
I've just updated DX11 Rendersystem from official ogre repository, but i'm getting always this error, do you know how to avoid this?
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

This is a Microsoft issue.
Read here: if you install VS11 preview - you start getting this error. Solved by copying dlls from the DX sdk to system32.
Watch out for my OGRE related tweets here.
User avatar
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: DirectX 11 render system - work-in-progress

Post by boyamer »

Just want you to tell you that multiple viewport rendering does not work, probably there need to be added combination with active viewport and geometry shader
(@see http://msdn.microsoft.com/en-us/library ... S.85).aspx)
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Re: DirectX 11 render system - work-in-progress

Post by Crashy »

Hi,
Just fixed a little thing about the reflected frustum and the cull mode.

In OgreDirect3d11RenderSystem.cpp, I replaced

Code: Select all

void D3D11RenderSystem::_setCullingMode( CullingMode mode )
	{
		mCullingMode = mode;
		mRasterizerDesc.CullMode = D3D11Mappings::get(mode);
	}
by

Code: Select all

void D3D11RenderSystem::_setCullingMode( CullingMode mode )
	{
		mCullingMode = mode;
		bool flip = ((mActiveRenderTarget->requiresTextureFlipping() && !mInvertVertexWinding) ||
			(!mActiveRenderTarget->requiresTextureFlipping() && mInvertVertexWinding));

		mRasterizerDesc.CullMode = D3D11Mappings::get(mode,flip);
	}
By the way, I still have the multipe render target stuff here, waiting for me doing a patch to submit, but I wanted to know if the boyamer code you merged recently handle this feature correctly.

There is still a patch from me waiting for a review there :
http://sourceforge.net/tracker/?func=de ... tid=302997
Follow la Moustache on Twitter or on Facebook
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: DirectX 11 render system - work-in-progress

Post by Assaf Raman »

I will have a look.
Watch out for my OGRE related tweets here.
Post Reply