### 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

#### Re: Pre-Pull Request: D3D11 Initial testing

Timmy
Posts: 361
Joined: Thu Feb 05, 2015 3:20 am
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...

http://forums.torque3d.org/viewtopic.ph ... =140#p4447

It also cause the SkyLine object to not render correctly.
I can't say i have noticed but truth be told i haven't been able to test every scenario. I'll take a look. Do keep reporting any problems you find, it all helps.

#### Re: Pre-Pull Request: D3D11 Initial testing

Timmy
Posts: 361
Joined: Thu Feb 05, 2015 3:20 am
Mud-H

I tried the fogband at 1 on the regular d3d11 and it's ok

Will have a quick chat with az whenever i see him on irc about it.

#### Re: Pre-Pull Request: D3D11 Initial testing

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

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. OpenGL's twitchy about it, yeah. Up to and including case sensitivity. #### Re: Pre-Pull Request: D3D11 Initial testing Mud-H Posts: 183 Joined: Thu Feb 19, 2015 3:08 pm Mud-H I tried the fogband at 1 on the regular d3d11 and it's ok Ahhhh, I will do a test on my clean T3D Installation by running only the D3D11 branch. Might be from PBR specific code then or could it be a local hardware issue? Yesterday, I was wondering why the PBR FullTemplate demo was telling that my renderer was D3D9 in the window title so I reinstalled my GFX drivers but then I realized it in console that D3D11 was found: Direct 3D (version 11.x) device found so I tought it was something not updated. But after a sleep, I tought maybe I had to change the graphic options... and yes I had to but it change nothing (A chance because I would have been very angry about myself...) EDIT: What DirectX SDK I should be using? While compiling the updated PBR branch I got some console warning I never saw before: Code: Select all 1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(12): warning C4005: 'DXGI_STATUS_OCCLUDED' : macro redefinition (F:\T3DProjects\T3DLab\Engine\source\gfx\D3D11\gfxD3D11EnumTranslate.cpp) 1> C:\Program Files (x86)\Windows Kits\8.1\Include\shared\winerror.h(50092) : see previous definition of 'DXGI_STATUS_OCCLUDED' 1>c:\program files (x86)\microsoft directx sdk (june 2010)\include\dxgitype.h(13): warning C4005: 'DXGI_STATUS_CLIPPED' : macro redefinition (F:\T3DProjects\T3DLab\Engine\source\gfx\D3D11\gfxD3D11CardProfiler.cpp) 1> C:\Program Files (x86)\Windows Kits\8.1\Include\shared\winerror.h(50101) : see previous definition of 'DXGI_STATUS_CLIPPED'  I got 100+ of those but the compile succeeded. Do microsoft directx sdk (june 2010) is ok? I think I remember reading about that DirectX is now part of Windows SDK, right? #### Re: Pre-Pull Request: D3D11 Initial testing Mud-H Posts: 183 Joined: Thu Feb 19, 2015 3:08 pm Sorry for being annoying these days... Still haven't been able to load my test level in Debug after 2 hours of trying. I'm almost there but this time it failed to compile shader using DirectX11 (I never test my game with D3D11 yet, I forgot to change my render options to used it). So here's what I get in console: Code: Select all Constant Buffer Name:$Params Variable Name $diffuseMaterialColor:, offset: 0, size: 16, constantDesc.Elements: 1 Variable Name$alphaTestValue:, offset: 16, size: 4, constantDesc.Elements: 1 Variable Name $matInfoFlags:, offset: 20, size: 4, constantDesc.Elements: 1 Variable Name$vEye:, offset: 32, size: 12, constantDesc.Elements: 1 Variable Name $oneOverFarplane:, offset: 48, size: 16, constantDesc.Elements: 1 Variable Name$visibility:, offset: 64, size: 4, constantDesc.Elements: 1 Compiling Shader: 'shadergen:/d062ebf5_V.hlsl' failed to compile shader: F:\T3DProjects\T3DLab\My Projects\GameLab\game\shaders\procedural\d062ebf5_V.hlsl(27,33): error X3536: Duplicated input semantics can't change type, size, or layout ('TEXCOORD0'). f:\t3dprojects\t3dlab\engine\source\gfx\d3d11\gfxd3d11shader.cpp(922,0): {Fatal-ISV} - Unable to compile shader!
Here's the content of that procedural shader, I think there's something wrong with the TEXCOORD0 used twice in VertData struct: (I have attached the full file)

Code: Select all

#include "shaders/common/lighting.hlsl" #include "shaders/common/torque.hlsl" // Features: // Vert Position // Base Texture // Specular Map // Bumpmap [Deferred] // Deferred RT Lighting // Pixel Specular [Deferred] // Visibility // HDR Output // Hardware Instancing struct VertData { float3 position : POSITION; float tangentW : TANGENTW; float3 normal : NORMAL; float3 T : TANGENT; float2 texCoord : TEXCOORD0; float4 inst_objectTrans[4] : TEXCOORD0; float inst_visibility : TEXCOORD4; }; 
what are those procedural files exactly? I remember a while back, there was some options about how to manage the procedural shaders, do there's still something about it?

Here's how I think that procedural file should be to avoid the crash with my limited knowledge

Code: Select all

struct VertData { float3 position : POSITION; float tangentW : TANGENTW; float3 normal : NORMAL; float3 T : TANGENT; float2 texCoord : TEXCOORD0; [b] float4 inst_objectTrans[4] : TEXCOORD4;[/b] //Was TEXCOORD0 but seem to be related to TEXCOORD4 in the shaderFeature file [b] float inst_visibility : TEXCOORD5;[/b] //Was TEXCOORD4 but in ConnectData it's 5 so I took a guess... }; struct ConnectData { float4 hpos : SV_Position; float2 out_texCoord : TEXCOORD0; float3x3 outWorldToTangent : TEXCOORD1; float3 outWsPosition : TEXCOORD4; float visibility : TEXCOORD5; };
EDIT2: Can't run the D3D11 renderer in Release either, I switched back to D3D9 and everything work fine.

Attachments

procedural.rar

#### Re: Pre-Pull Request: D3D11 Initial testing

Timmy
Posts: 361
Joined: Thu Feb 05, 2015 3:20 am
Go into game/scripts/client/prefs.cs and change $pref::TS::maxInstancingVerts to 0. I haven't added instancing support yet and this will fix the procedural shader problem above. As for the warnings in your other post, you can ignore those for now. It's because d3d9 is still using the now deprecated d3dx libraries. #### Re: Pre-Pull Request: D3D11 Initial testing Mud-H Posts: 183 Joined: Thu Feb 19, 2015 3:08 pm Go into game/scripts/client/prefs.cs and change$pref::TS::maxInstancingVerts to 0. I haven't added instancing support yet and this will fix the procedural shader problem above.
Thanks! I can now load my level with D3D11, everything is fine except 1 or 2 materials are weird. I think I played with vertex lit parameters on those. But then I launch TorqueLab to fix those materials and the rendering became very weird... It stay the same when I got back into game. Here's a screenshot, It's like if the view from when I open TorqueLab got lock into the rendering(You can see a House Ghost iin background)... Also it should not be that dark.

Any ideas about what is happening?

Oh, and also my screenshot no longer works

Code: Select all

Screenshot module not initialized by device
Anyway, take the time you need, I can live with D3D9 for now...

Edit: I tried to load the same level again without leaving and now 95% of materials are black.

#### Re: Pre-Pull Request: D3D11 Initial testing

Timmy
Posts: 361
Joined: Thu Feb 05, 2015 3:20 am
The easiest way is to supply a level or just reproduce the problem in one of the demo levels so i can take a look. By the way is that with pbr dx11 or just plain dx11 branch?

I will say i am super busy with my Deadly Matter duties currently but i'll try and fit in some more time with dx11 stuff soon.

#### Re: Pre-Pull Request: D3D11 Initial testing

Mud-H
Posts: 183
Joined: Thu Feb 19, 2015 3:08 pm
The easiest way is to supply a level or just reproduce the problem in one of the demo levels so i can take a look. By the way is that with pbr dx11 or just plain dx11 branch?

I will say i am super busy with my Deadly Matter duties currently but i'll try and fit in some more time with dx11 stuff soon.
This was with the PBR branch which have now the D3D11 in it (PBR_D3D11 is gone). Well, there's no hurry and I haven't test it further yet, I have enough to do and trying to avoid distraction. Tomorrow I will at least try with stock editor to see if it's a TorqueLab issue and if not, I will try to reproduce on the outpost demo. If TorqueLab is the cause, I will try to see what it do differently.

#### Re: Pre-Pull Request: D3D11 Initial testing

Timmy
Posts: 361
Joined: Thu Feb 05, 2015 3:20 am
I would guess it's most likely D3D11 related, i mean if you can fire up the exact same level with D3D9 or GL and it's all good than it's obvious where the problem is

Yeah whenever you get time if you could reproduce the problem in the stock levels/art work that is a great help and makes it faster to track down the problem.
• 1
• 2
• 3
• 4
• 5
• 7

#### Who is online

Users browsing this forum: No registered users and 2 guests