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.

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

Postby evandropaulino » Thu Sep 01, 2011 4:56 pm

Hi Assaf,

I will send the agreement this weekend.

Thanks.
evandropaulino
Gnoblar
 
Posts: 10
Kudos: 0
Joined: 06 Jun 2011

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

Postby Assaf Raman » Fri Sep 02, 2011 1:19 pm

@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.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby Crashy » Sun Sep 04, 2011 11:50 pm

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
Crashy
Google Summer of Code Student
Google Summer of Code Student
 
Posts: 1071
Kudos: 14
Joined: 08 Jan 2003
Location: Lyon, France

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

Postby Shtuka » Thu Sep 08, 2011 7:13 pm

What remains to be done? (How) Can I help?
Shtuka
Greenskin
 
Posts: 146
Kudos: 9
Joined: 10 Jan 2011

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

Postby LBDude » Thu Sep 15, 2011 9:23 pm

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
LBDude
Gnome
 
Posts: 389
Kudos: 22
Joined: 26 Jul 2010

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

Postby Zero » Fri Sep 16, 2011 8:28 am

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
Zero
Halfling
 
Posts: 50
Kudos: 1
Joined: 10 Mar 2008
Location: Stuttgart|Germany

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

Postby Assaf Raman » Fri Sep 16, 2011 8:48 am

Yes, only SM4 and up.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby LBDude » Sat Sep 17, 2011 12:42 am

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
LBDude
Gnome
 
Posts: 389
Kudos: 22
Joined: 26 Jul 2010

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

Postby Shtuka » Sun Sep 18, 2011 6:41 pm

Shtuka wrote:What remains to be done? (How) Can I help?


*push*
Shtuka
Greenskin
 
Posts: 146
Kudos: 9
Joined: 10 Jan 2011

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

Postby Zero » Sun Sep 18, 2011 8:30 pm

https://sourceforge.net/tracker/?func=detail&aid=3411278&group_id=2997&atid=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
Zero
Halfling
 
Posts: 50
Kudos: 1
Joined: 10 Mar 2008
Location: Stuttgart|Germany

DX 11.1

Postby Mind Calamity » Tue Sep 20, 2011 8:08 am

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 ?
User avatar
Mind Calamity
Ogre Magi
 
Posts: 1207
Kudos: 78
Joined: 25 Dec 2010
Location: Macedonia

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

Postby Assaf Raman » Tue Sep 20, 2011 8:13 am

Not out yet.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby Mind Calamity » Tue Sep 20, 2011 8:24 am

Assaf Raman wrote:Not out yet.


Oh, I guess this blog article on GameDev misled me :)
User avatar
Mind Calamity
Ogre Magi
 
Posts: 1207
Kudos: 78
Joined: 25 Dec 2010
Location: Macedonia

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

Postby Assaf Raman » Wed Sep 28, 2011 12:41 pm

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.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby Crashy » Wed Sep 28, 2011 4:45 pm

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
Crashy
Google Summer of Code Student
Google Summer of Code Student
 
Posts: 1071
Kudos: 14
Joined: 08 Jan 2003
Location: Lyon, France

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

Postby boyamer » Thu Sep 29, 2011 10:23 am

Anyone got stencil shadows working here? Seams that it need vertex and fragment shaders.
User avatar
boyamer
Orc
 
Posts: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy

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

Postby Assaf Raman » Mon Oct 03, 2011 11:48 pm

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
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby boyamer » Tue Oct 04, 2011 8:21 am

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
boyamer
Orc
 
Posts: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy

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

Postby Assaf Raman » Tue Oct 04, 2011 5:13 pm

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
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby boyamer » Tue Oct 04, 2011 6:51 pm

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: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy

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

Postby boyamer » Mon Oct 10, 2011 9:34 pm

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
boyamer
Orc
 
Posts: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy

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

Postby Assaf Raman » Mon Oct 10, 2011 10:06 pm

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
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

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

Postby boyamer » Tue Oct 11, 2011 1:05 pm

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/bb173613(v=VS.85).aspx)
User avatar
boyamer
Orc
 
Posts: 443
Kudos: 5
Joined: 24 Jan 2009
Location: Italy

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

Postby Crashy » Sat Oct 15, 2011 3:55 pm

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
Crashy
Google Summer of Code Student
Google Summer of Code Student
 
Posts: 1071
Kudos: 14
Joined: 08 Jan 2003
Location: Lyon, France

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

Postby Assaf Raman » Sat Oct 15, 2011 5:50 pm

I will have a look.
Watch out for my OGRE related tweets here.
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
 
Posts: 3091
Kudos: 78
Joined: 11 Apr 2006
Location: TLV, Israel

PreviousNext

Return to Developer talk

Who is online

Users browsing this forum: No registered users and 4 guests