Page 20 of 29

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

Posted: Thu Sep 01, 2011 4:56 pm
by evandropaulino
Hi Assaf,

I will send the agreement this weekend.

Thanks.

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

Posted: Fri Sep 02, 2011 1:19 pm
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

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

Posted: Sun Sep 04, 2011 11:50 pm
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.

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

Posted: Thu Sep 08, 2011 7:13 pm
by Shtuka
What remains to be done? (How) Can I help?

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

Posted: Thu Sep 15, 2011 9:23 pm
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.

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

Posted: Fri Sep 16, 2011 8:28 am
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.

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

Posted: Fri Sep 16, 2011 8:48 am
by Assaf Raman
Yes, only SM4 and up.

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

Posted: Sat Sep 17, 2011 12:42 am
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.

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

Posted: Sun Sep 18, 2011 6:41 pm
by Shtuka
Shtuka wrote:What remains to be done? (How) Can I help?
*push*

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

Posted: Sun Sep 18, 2011 8:30 pm
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.

DX 11.1

Posted: Tue Sep 20, 2011 8:08 am
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 ?

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

Posted: Tue Sep 20, 2011 8:13 am
by Assaf Raman
Not out yet.

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

Posted: Tue Sep 20, 2011 8:24 am
by Mind Calamity
Assaf Raman wrote:Not out yet.
Oh, I guess this blog article on GameDev misled me :)

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

Posted: Wed Sep 28, 2011 12:41 pm
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.

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

Posted: Wed Sep 28, 2011 4:45 pm
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.

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

Posted: Thu Sep 29, 2011 10:23 am
by boyamer
Anyone got stencil shadows working here? Seams that it need vertex and fragment shaders.

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

Posted: Mon Oct 03, 2011 11:48 pm
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.

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

Posted: Tue Oct 04, 2011 8:21 am
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

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

Posted: Tue Oct 04, 2011 5:13 pm
by Assaf Raman
Amer - I am having lots of EOL issues when merging your code... What do you suggest?

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

Posted: Tue Oct 04, 2011 6:51 pm
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.

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

Posted: Mon Oct 10, 2011 9:34 pm
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?

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

Posted: Mon Oct 10, 2011 10:06 pm
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.

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

Posted: Tue Oct 11, 2011 1:05 pm
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)

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

Posted: Sat Oct 15, 2011 3:55 pm
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

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

Posted: Sat Oct 15, 2011 5:50 pm
by Assaf Raman
I will have a look.