DirectX is a set of multimedia APIs from Microsoft aimed primarily at game developers. Popular APIs within the DirectX collection include Direct3D, XInput, and XAudio.

learn more… | top users | synonyms (1)

0
votes
0answers
23 views

My texture is doing weird, either not loaded correctly or not rendered correctly. DirectX11

I'm loading a texture from a file called owl.png. But it renders really weird. Original picture(512 X 512): But it renders like this: It's rendered on a square, that is initialized like this: { ...
2
votes
0answers
29 views

Assimp and directX12 universal apps

I started a directX 12 universal app project on visual studios and started coding some stuff to create a physics engine. I was currently working on implmenting Assimp into the engine too load whatever ...
0
votes
1answer
50 views

Why would this scaling matrix have no effect?

To draw a simple model using the DirectXTk, I'm doing the following. It all works perfectly, draws correct, and so on. Except changing the scaling factor makes NO difference, and I can't figure out ...
1
vote
0answers
38 views

Set Render Target usage

I am using Unity and I have some difficulties about understanding the way Set Render Target works and how it can behave with the shaders. Is it possible to render a shader pass in multiple render ...
6
votes
0answers
305 views

Strange SSAO effect (wrong position/normal textures in view space?)

I try to create an SSAO effect in my game engine (DirectX 11, C++), based mainly on gamedev.net tutorial by José María Méndez. Unfortunately, it doesn't cover texture-creating problem (normals, ...
0
votes
1answer
22 views

Getting mouse movement value with DirectX Tool Kit

today I want to ask a question about how to get mouse movement value with DirectX Tool Kit. While I can certainly use Mouse::SetMode(MODE_RELATIVE), to do this, I want to be able to get the mouse ...
0
votes
0answers
66 views

Speed up the DirectX game - how else can I boost the fps with typical triangle drawing?

I am writing my own c++/DirectX engine. I've made the basic framework and here comes the time for optimizations. I don't want to focus on optimizing the resources themselves right now (meshes, ...
0
votes
0answers
26 views

Device.SetRenderTarget Prevents Shader From Executing

Using DirectX 9 and C++. I'm trying to finalize this code to run a HLSL shader on in-memory data. In theory it should be working. In practice the shader doesn't run. ...
0
votes
1answer
35 views

How to Set HLSL Shader Input Textures?

Very simple question. With C++/Direct9, I'm creating a texture as RenderTarget with a full screen quad, creating a scene, setting a HLSL pixel shader, copying the image and then call Present. 1) How ...
0
votes
1answer
34 views

DX9 How to Apply HLSL Shader with StretchRect

Using DirectX 9,I'm trying to run a HLSL pixel shader on video frame data while copying it from one texture buffer to another texture buffer without displaying it. StretchRect at the end is what ...
0
votes
0answers
21 views

How to Set Compiled Pixel Shader

When compiling a shader with D3DXCompileShaderFromFile, it works. But what if the shaders are pre-compiled into .cso files? I have this function. It fails. What's the proper way of loading the pixel ...
0
votes
0answers
24 views

DX9 StretchRect to Texture Fails

Alright, I got the code almost working to copy memory data to a texture, process it with DirectX9 into another texture and copy the result back to memory. Almost all the errors are gone and the code ...
0
votes
1answer
21 views

How to Create Device with D3DFMT_A32B32G32R32F

I'm trying to create a DirectX9 device to copy video frame data from one memory buffer to another while processing it through a HLSL shader. I will need half-float or float precision for each channel. ...
1
vote
1answer
57 views

DX11 Mixing 2D and 3D

So I am somewhat new to working with DirectX rendering, and I have done some 2d and 3d work. I am planning on working on a new application where I will be rendering a bunch of 3d scenery, and then ...
1
vote
1answer
38 views

Can DirectX9 be used without HWND handle?

I found an excellent code here that does almost everything I need: running an HLSL shader on memory texture to process video frames into another texture buffer without displaying it. ...
1
vote
0answers
40 views

Simulating sun 3d direction

At the moment I got the following to simulate the suns direction: void Sun::Update() { if (!mIsMoving) return; const auto now = Clock::now(); const auto timeDiff = now - ...
0
votes
2answers
27 views

How to handle mesh update in its vertex buffer

suppose i have a mesh, it can undergo any kind of changes - bend, stretch, even been torn. How should i update vertex buffer in DirectX for this mesh. For now i recreate it every time, and i don't see ...
0
votes
0answers
55 views

Run Simple HLSL Pixel Shader with DirectX 9

I'm trying to run HLSL Pixel Shaders with DirectX 9 where I feed a texture in, run the HLSL code and copy the resulting texture back from memory. I think I'm getting pretty close, although a LOT of ...
0
votes
0answers
27 views

OpenGL textureGather and DirectX gather

These functions sample multiple RGBA pixels but return only a single component. OpenGL: https://www.opengl.org/sdk/docs/man/html/textureGather.xhtml DirectX: ...
0
votes
1answer
142 views

Is DirectX free for commercial use?

This question isn't gamedev per se but it is definitely relevant. Still, if it's off-topic, please direct me to the proper SE page. This question has probably already come up many times but I'd like ...
0
votes
1answer
23 views

DirectX 11 throws out my pixel shader when I multiply verts by MVP

Been following some tutorials online for DirectX 11. I was able to successfully get a triangle to render in screen space. But the moment I add a MVP matrix, my triangle disappears! Looking at it in ...
1
vote
1answer
118 views

Run HLSL in C++ Basic Sample

I'm considering the idea of taking shaders written in HLSL and running them in an AviSynth plugin to process videos. This would allow accessing various shaders, and also to have GPU acceleration. I'm ...
0
votes
0answers
65 views

How to calculate spherical harmonic coefficients for indirect diffuse?

After reading the article "An Efficient Representation for Irradiance Environment Maps", I'm a bit confused as how to calculate the spherical harmonic coefficients. I'd like to generate these ...
0
votes
0answers
13 views

Retrieving shared video memory using SharpDX

I am trying to retrieve the total available video memory using SharpDX via DXGI, using the Description of the best available adapter. The DedicatedVideoMemory is correct (1GB in my case), but the ...
1
vote
0answers
43 views

how to rotate a 3d instance using an HLSL shader

ok, im experimenting a little with HLSL shaders, i have the following code for a vertex shader, it is used to render a few instances of a 3d model. Let's say i want to rotate these instances on their ...
0
votes
2answers
75 views

Texturing without D3DX

Well, i have been online for hours looking for solutions, but i have found none. Im looking for a way to create textures without the function D3DXCreateShaderResourceViewFromFile. Since D3DX is ...
2
votes
1answer
48 views

3D Studio MAX dxf model to OpenGL and DirectX

Main Question I saw this Loading and Animating MD5 Models with OpenGL an old post explaining .md5mesh .md5anim files. Is there any similar alternate mechanisms? Additional Questions 1.) Is there an ...
4
votes
1answer
818 views

32 Bit colors difference

Im going through a tutorial to create a basic directx framework, and i've noticed that in there (and other tutorials, when i checked out) use DXGI_FORMAT_R32G32B32A32_FLOAT inside the input element ...
5
votes
2answers
203 views

Low quality bilinear sampling in WebGL/OpenGL/DirectX

I'm seeing low quality bilinear texture sampling in WebGL, OpenGL and Directx, and was wondering if anyone knew how to make it higher quality? The picture below should help show what I mean. The ...
1
vote
1answer
40 views

Why does the 3D window go blank on resuming from sleep/lock?

I have a 3d window hosted inside a WPF program. This is written in C#, using SlimDX. It uses a D3DImage subclass to support dx10 & dx11 rendertargets, like this site recommends: ...
0
votes
2answers
93 views

DirectX map/unmap

In my 2d game i want to use dynamic buffers to render sprites. My question is, when should i map unmap buffer? The 2 possibilities are: #1 //game logic map() fill buffer unmap() render() #2 ...
0
votes
2answers
83 views

Disable/Remove Warning about a not bound Render Target View

So to render into my shadow map depthstencil buffer i only bind a DepthStencilView to the Output Merger. Like this m_pContext->OMSetRenderTargets(0,0, m_pShadowMapDV); ...
3
votes
2answers
565 views

How do I use graphics APIs to select the proper display device among multiple attached to a PC?

I have an LCD monitor display and Oculus Rift attached to my PC. I have an Nvidia 820M dedicated GPU. How does the GPU know to which display device it has to render (or to send rendered information)? ...
1
vote
2answers
91 views

Is it possible to run GLFW eventhough my graphic card(Nvidia) supports Direct3d API? [closed]

I have Nvidia 820M GPU installed in my windows 7 machine. In nvidia control panel it is showing it supports Direct3d API version 11. Am I able to run OpenGL applications(using GLUT,GLFW) on my machine ...
4
votes
2answers
148 views

Best way of writing pixel manipuliting-intensive applications with OpenGL/Direct3D

Recently I have been making little experiments with engines similar to old Wolfenstein 3D, Doom and Build, engines where the 3D rendering is entirely done in software and therefore you need full ...
1
vote
1answer
68 views

Can you trilinear sample a non volume texture?

Let's say that i have a regular 2d texture (not a volume texture). Is it possible to do trilinear texture sampling of that texture even though it isn't a volume texture in opengl or directx? ...
2
votes
1answer
54 views

DirectX is the camera a point or a plane?

I've built an application in SlimDX using an orbit camera. Currently I treat the position of the camera as a singular point in space. I've noticed my projections from 3D space to 2d space are off by ...
3
votes
1answer
58 views

How to debug a DirectX crash on client machine?

I have customers who are experiencing crashes which I can't reproduce on my machine. From the minidumps they sent over, it appears that their crashes all seem to be in unexplained Direct3D calls, ...
1
vote
1answer
53 views

Observer pattern for clickable 2D Elements?

So i am currently thinking about the best way to handle and implement clickable 2D menu elements in a very simple DirectX Game. I very much like the idea of having subscribers to a event where they ...
-1
votes
1answer
39 views

Direct3d 9 z-buffer fails drastically [closed]

I have just completed my custom mesh class and my engine is very basic right now, but now I am facing this strange issue. I have posted the pictures bellow, it seems like z-buffer is not working ...
0
votes
0answers
51 views

Shader - Simple SSS lighting issue

I am trying to create a simple subsurface scattering effect using a shader but I am facing a small issue. Look at those screenshots. The three images represents three lighting states (above surface, ...
0
votes
1answer
58 views

Sample() returns (0, 0, 0) for normal map 90% of frames

I'm having some trouble reading the values from my Normal map in my lighting fragment shader. The relevant part of the shader code is as follows: Texture2D NormalGB : register(t0); Texture2D ...
0
votes
1answer
113 views

Shader - Color blending

I would like to know how to blend colors in a specific way. Let's imagine that I have a color (A) and an other color (B). I would like to blend them in such a way that if I choose white for the (B) ...
1
vote
1answer
82 views

Shader - Convert vector into scalar

I am trying to convert a half3 as a simple half but I am facing an issue. As for an example half3(1, 0, 0) give me white but half3(0, 1, 0) gives me black. How can I convert properly a half3 to a ...
1
vote
0answers
113 views

tex2Dlod to limit max mip level to use for a texture (atlas)

I'm developing a 3D multitexturing terrain engine in C# on Monogame (XNA) plateform. I would like my engine works on Windows XP or upper, so on DirectX 9c minimum. Monogame allow me to build a DirectX ...
1
vote
1answer
111 views

3D GUI Shader Problem

So I want to create one of these in my directX11 project. The little axis there that shows you the direction. I have a nice 3d shader for my world geometry that I tweaked from Frank D. Luna (He ...
0
votes
1answer
203 views

DirectX11 Equivalent of OpenGL code

I am currently porting parts of my engine over to D3D11 from OpenGL and was trying to figure out how I would accomplish the following blending functions in D3D11. glEnable(GL_BLEND); ...
-1
votes
1answer
116 views

How do i load, render and trasnform 2D images using Direct3D 11 API? [closed]

In my small game project using DirectX 11 API, I created a Direct3D device, and can draw 3D meshes, using web tutorials and a book. But I cannot figure out how to load, transform (rotate, scale, ...
2
votes
1answer
138 views

SharpDX / DirectX: How to render text to a transparent BitmapRenderTarget?

I'm trying to render text to a BitmapRenderTarget, cleared with transparent color. My TextBox is drawn on its own SharpDX.Direct2D1.BitmapRenderTarget, which I create in this way: var ...
1
vote
0answers
59 views

SharpDX - Character Skinning Different in Windows Phone 8.1 Emulator and Real Device

I have an engine written using SharpDX, that can load a character mesh and animation stored in a FBX file, then it renders a scene and animates a character. It is written as an Universal Windows Store ...