Questions tagged [directxtk]

This tag is for questions related to the open source C++ utility library DirectX Tool Kit available for DirectX 11 and DirectX 12.

This tag is for questions related to the open source C++ utility library DirectX Tool Kit available for DirectX 11 and DirectX 12.

65 questions
1
vote
0 answers

Why are the texture coordinates wrong when I try rendering an fbx model in directX

I have a c++/cx project where I want to render meshes (loaded from FBX-files) using DirectX-11. The FBX-files contain texture coordinates, but when rendering them, these UV-coordinates send to the vertexshader are completely wrong. Here's how it…
Stef
  • 315
  • 3
  • 14
1
vote
0 answers

SaveDDSTextureToFile() saves a black texture instead the expected

I have created a red colored texture of DXGI format DXGI_FORMAT_R32_FLOAT. I have a byte buffer of red color pixels where 4 byte per pixel is prepared. The byte buffer is then copied using device context map and unmap functions and after that I have…
1
vote
1 answer

PNG Gamma Correction

I used the DirectXTex library to capture a screenshot of a DX11 game and save it to a file. The problem is that it works great when I save it as jpeg but if I save it as png the image would become super bright and washed out. I checked the image…
uNiverselEgacy
  • 337
  • 3
  • 14
1
vote
1 answer

CoInitialize has not been called - (loading gamepad.h from DirectXTK without library)

I am using the DirectXTK library for the gamepad class. I compiled the library with only this class inside it and it works. If I would only add the source files to my project, without the library, the size would be ~50KB instead of ~500KB. However,…
Z0q
  • 1,689
  • 3
  • 28
  • 57
1
vote
0 answers

Error 0x80070057 depending on file containing vertex shader code

this being my first question, please provide me with a little mercy. I am currently working with the following bits of shader code in the Pixel Shader: struct PixelShaderInput { float4 pos : SV_POSITION; }; float4 main(PixelShaderInput…
Tam HANNA
  • 51
  • 6
0
votes
1 answer

Cannot open include file: '*Inst.inc' when build DirectXTK

When built DirectXTK, VS2019 reported: Cannot open include file: 'DebugEffect_VSDebugInst.inc': No such file or directory Cannot open include file: 'NormalMapEffect_VSNormalPixelLightingTxInst.inc': No such file or directory Cannot open include…
Charge AA
  • 49
  • 4
0
votes
2 answers

How do I fix the colours for this Directx TK sprite batch render?

This is a png from Aseprite, rendered with DirectX TK. This is the png, as seen in Aseprite. The code to render the scene: void Graphics::BeginScene() { m_d3dDeviceContext->ClearRenderTargetView(m_renderTargetView.Get(), BackColor); …
ball
  • 39
  • 7
0
votes
0 answers

A grayscale gradient image on an HDR10 monitor seems "whiter" or lighter than that in SDR mode

I'm trying to display 10-bit grayscale images on an HDR10 monitor. A Windows app was implemented by DirectXTK: Using HDR rendering (which is based on Direct3D 11). For the purpose of comparison between HDR and SDR, I also duplicated the same app but…
0
votes
1 answer

DirectX 11 2D Camera rotation

I'm trying to make a 2D game using DirectX 11 and I get distortion issues when I rotate the camera By rotating the camera I mean rotating it about its Z axis with the X axis being left/right on the screen, the Y axis being up/down on the screen, and…
yoy
  • 1
  • 1
0
votes
1 answer

How does the DownScale2x2 BasicPostProcess work in DirectX Tool Kit?

I have a DirectX 12 desktop project on Windows 11 that implements post-processing using a combination of DXTK post-process effects. The aim of the post-proc sequence is to end up with individual bloom and blur textures (along with a depth texture…
Maico De Blasio
  • 97
  • 1
  • 2
  • 8
0
votes
1 answer

DirectXTex : generateMipmap with HDR RGBA32f texture clamp value to 1.0f

I'm trying to generate mip map chain from an .exr HDR image with the DirectXTex function DirectX::GenerateMipMaps(). But the result have all pixel clamped to 1.0f. The source image have some to pixel superior to 30.0f, but after the mimap generation…
flob
  • 3
  • 1
0
votes
1 answer

Applying a texture to a custom effect using DirectXTK results in the texture being stretched

I'm trying to apply a custom effect using the DirectXTK. The effect is supposed to be an "unlit" shader with just one texture. But for some reason, the texture is stretched across the model. I looked in renderdoc and the texturecoordinates appear to…
jkinz3
  • 23
  • 6
0
votes
1 answer

How to use DirectX::Model with a custom DirectX::Effect

I'm using the DirectXToolKit. I created a model like this m_Model = Model::CreateFromCMO(device, L"Content/Meshes/cube.cmo", *m_EffectFactory); And I want to use a custom effect I created that inherited from DirectX::IEffect. m_ModelEffect =…
jkinz3
  • 23
  • 6
0
votes
1 answer

Share direct3d11 rendered frame from swapchain backbuffer as texture with another separate process

So I will elaborate on the title What I am trying to accomplish is do all the computation and rendering in one process and then read the resulting frame (I am going for swapchain backbuffer before present when all computation is done) from another…
kingpin
  • 21
  • 4
0
votes
1 answer

How to access individual frames of an animated GIF loaded into a ID3D11ShaderResourceView?

I used CreateWICTextureFromFile() from DirectXTK to load an animated GIF texture. ID3D11Resource* Resource; ID3D11ShaderResourceView* View; hr = CreateWICTextureFromFile(d3dDevice, L"sample.gif", &Resource, &View); Then I displayed it on an…