Pre-Pull Request: D3D11 Initial testing

This forum is for tracking and working on active issues that need to be resolved, as well as testing Pull Requests that are waiting to be integrated into Torque 3D.
• 1
• 2
• 3
• 4
• 5
• 7

Pre-Pull Request: D3D11 Initial testing

JeffR
Steering Committee
Posts: 783
Joined: Tue Feb 03, 2015 9:49 pm

While not a full PR yet, the D3D11 stuff looks stable enough we can being preliminary testing of how it plays for everyone.

The branch is here: https://github.com/rextimmy/Torque3D/tree/d3d11

Follow the standard 'how to test a PR' instructions to pull it down to your local repository an make sure you do a new project to ensure the new engine and template files get copied. Once you get the game fired up, ensure you can switch to the D3D11 driver in the options menu and test everything and make note of any problems.

If you can integrate it into an existing project for a more in-depth test, that's even better.

Re: Pre-Pull Request: D3D11 Initial testing

Dwarf King
Posts: 158
Joined: Thu Feb 05, 2015 7:20 pm
JeffR wrote:If you can integrate it into an existing project for a more in-depth test, that's even better.

I am not sure that would be possible as I use AFX 2.0 with UAIK in my project. I mean AFX 2.0 uses DX 9 shaders as far as I know and DX 11 does not fall back to DX 9 shaders right?

Anyway I will try to see the outcome after some testings And report back with the results

Re: Pre-Pull Request: D3D11 Initial testing

Azaezel
Posts: 393
Joined: Tue Feb 03, 2015 9:50 pm

Dwarf King wrote:
JeffR wrote:If you can integrate it into an existing project for a more in-depth test, that's even better.

I am not sure that would be possible as I use AFX 2.0 with UAIK in my project. I mean AFX 2.0 uses DX 9 shaders as far as I know and DX 11 does not fall back to DX 9 shaders right?

Anyway I will try to see the outcome after some testings And report back with the results

Actually, Timmy threw in some macros to allow dx9 and dx11 to share shaders. for some practical samples:
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L31 becomes
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L32

https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L35 becomes
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L32

https://github.com/rextimmy/Torque3D/bl ... sl#L41-L67 becomes
https://github.com/rextimmy/Torque3D/bl ... sl#L39-L59 (Do note best kept in groups of 4, so 3+1, 2+2, 4)

https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L70 becomes
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L62

https://github.com/rextimmy/Torque3D/bl ... .hlsl#L178 becomes
https://github.com/rextimmy/Torque3D/bl ... .hlsl#L170 on the send end with
https://github.com/rextimmy/Torque3D/bl ... w.hlsl#L75 becoming
https://github.com/rextimmy/Torque3D/bl ... w.hlsl#L76 on the recieving end,

Re: Pre-Pull Request: D3D11 Initial testing

RasterRon
Posts: 53
Joined: Sun Oct 25, 2015 7:36 am

JeffR wrote:While not a full PR yet, the D3D11 stuff looks stable enough we can being preliminary testing of how it plays for everyone.

The branch is here: https://github.com/rextimmy/Torque3D/tree/d3d11

Follow the standard 'how to test a PR' instructions to pull it down to your local repository an make sure you do a new project to ensure the new engine and template files get copied. Once you get the game fired up, ensure you can switch to the D3D11 driver in the options menu and test everything and make note of any problems.

If you can integrate it into an existing project for a more in-depth test, that's even better.

Works great so far and with the switch options.

Re: Pre-Pull Request: D3D11 Initial testing

RasterRon
Posts: 53
Joined: Sun Oct 25, 2015 7:36 am

One small issue that I did notice is when you are in Windowed Mode (Maximize) and toggled the World Editor on and back to the game, the maximize capability is no longer there. This does not happen in DX9.

Re: Pre-Pull Request: D3D11 Initial testing

Dwarf King
Posts: 158
Joined: Thu Feb 05, 2015 7:20 pm
Azaezel wrote:
Dwarf King wrote:
JeffR wrote:If you can integrate it into an existing project for a more in-depth test, that's even better.

I am not sure that would be possible as I use AFX 2.0 with UAIK in my project. I mean AFX 2.0 uses DX 9 shaders as far as I know and DX 11 does not fall back to DX 9 shaders right?

Anyway I will try to see the outcome after some testings And report back with the results

Actually, Timmy threw in some macros to allow dx9 and dx11 to share shaders. for some practical samples:
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L31 becomes
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L32

https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L35 becomes
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L32

https://github.com/rextimmy/Torque3D/bl ... sl#L41-L67 becomes
https://github.com/rextimmy/Torque3D/bl ... sl#L39-L59 (Do note best kept in groups of 4, so 3+1, 2+2, 4)

https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L70 becomes
https://github.com/rextimmy/Torque3D/bl ... P.hlsl#L62

https://github.com/rextimmy/Torque3D/bl ... .hlsl#L178 becomes
https://github.com/rextimmy/Torque3D/bl ... .hlsl#L170 on the send end with
https://github.com/rextimmy/Torque3D/bl ... w.hlsl#L75 becoming
https://github.com/rextimmy/Torque3D/bl ... w.hlsl#L76 on the recieving end,

That is some awesome work done their!

Re: Pre-Pull Request: D3D11 Initial testing

Mud-H
Posts: 176
Joined: Thu Feb 19, 2015 3:08 pm
I'm trying to solve an issue I'm having with SkyBox/SkyLine with the PBRDX11 branch and I found something which look not correct in the new shaders. I'm really not an expert in shaders but I'm starting to understand a little more how they work.

Code: Select all

TORQUE_UNIFORM_SAMPLER2D(texMap, 0);TORQUE_UNIFORM_SAMPLER2D(refractMap, 0);

I don't think this is ok, right?
From the torqueScript shader, it's set like this:

Code: Select all

new ShaderData( Reflect ){   DXVertexShaderFile    = "shaders/common/planarReflectV.hlsl";   DXPixelShaderFile    = "shaders/common/planarReflectP.hlsl";      OGLVertexShaderFile  = "shaders/common/gl/planarReflectV.glsl";   OGLPixelShaderFile   = "shaders/common/gl/planarReflectP.glsl";      samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$refractMap";      pixVersion = 1.4;};

I don't think it's what cause my issue but should it be diffuseMap or texMap used?

ReflectBump shader seem wrong also but maybe it's ok to send diffuseMap sampler and set is as textMap in the shader code...

Code: Select all

samplerNames[0] = "$diffuseMap"; samplerNames[1] = "$refractMap";   samplerNames[2] = "$bumpMap";  Code: Select all TORQUE_UNIFORM_SAMPLER2D(texMap, 0);TORQUE_UNIFORM_SAMPLER2D(refractMap, 1);TORQUE_UNIFORM_SAMPLER2D(bumpMap, 2); Does this works or diffuseMap/texMap should be the same? Re: Pre-Pull Request: D3D11 Initial testing Timmy Posts: 324 Joined: Thu Feb 05, 2015 3:20 am Code: Select all TORQUE_UNIFORM_SAMPLER2D(texMap, 0);TORQUE_UNIFORM_SAMPLER2D(refractMap, 1); That refractMap should be using tex unit 1, it's a typo in the shader. Good pickup The shader uniform texture unit should match the samplerNames[N] from ShaderData *Edit: I updated my original d3d11 branch with this fix, i'm sure once az notices he will update the pbr branch too. Re: Pre-Pull Request: D3D11 Initial testing Timmy Posts: 324 Joined: Thu Feb 05, 2015 3:20 am Mud-H wrote: Code: Select all samplerNames[0] = "$diffuseMap";   samplerNames[1] = "$refractMap"; samplerNames[2] = "$bumpMap";

Code: Select all

TORQUE_UNIFORM_SAMPLER2D(texMap, 0);TORQUE_UNIFORM_SAMPLER2D(refractMap, 1);TORQUE_UNIFORM_SAMPLER2D(bumpMap, 2);

Does this works or diffuseMap/texMap should be the same?

It should actually work with D3D11 even though the names don't match(it works because the texture units match) BUT it's good practice to make sure it all matches up as a different API it may not work.

Re: Pre-Pull Request: D3D11 Initial testing

Mud-H
Posts: 176
Joined: Thu Feb 19, 2015 3:08 pm
Any ideas about what is causing the SkyBox with FogBandHeight > 0 issue? I think it's related to the new shader/D3D11 code so maybe it should be discussed here...

viewtopic.php?f=9&t=55&start=140#p4447

It also cause the SkyLine object to not render correctly.
• 1
• 2
• 3
• 4
• 5
• 7

Who is online

Users browsing this forum: No registered users and 2 guests