DirectX 11 is the latest release of Microsoft's collection of APIs which contain features to aid in game development.

learn more… | top users | synonyms (2)

0
votes
0answers
12 views

Blending two images with Directx 11

I want to blend two images. I have a brick wall and I want to subtract a grey scale. I do not want to do this in the pixel shader. This is what I want in the picture. My blend code is: ...
1
vote
1answer
21 views

Render to Texture Using Multisampling

I have a DirectX11 application, which has multisampling / anti-aliasing enabled. However, I want to add an effect that requires a render-to-texture step. When I add this extra step, I lose all ...
0
votes
1answer
93 views
+50

How to Enable NVIDIA Ambient Occlusion in my Game

I have a DirectX11 based game, and I want to enable NVIDIA's built in Ambient Occlusion (that is shown in the NVIDIA control panel, but it grayed out for my application). Is that possible? Or do I ...
-3
votes
1answer
50 views

Are these functions and parameters used in DirectX 11.2? [on hold]

Functions and parameters like WINAPI, hPrevInstance, hInstance , PSTR etc are used in DirectX 11.2?
0
votes
1answer
27 views

Will DX10.1 rated motherboard run DX11 graphics card? [closed]

I have H61 m DS2 which is rated with dx 10.1 but if i use a dx 11 graphics card like GT730 1GD5(asus) will my motherboard support? please reply..
0
votes
0answers
22 views

Loading skinned mesh - initially rotated bones, how to set the weights?

I have an mesh that I've exported from 3ds max to my own file format. I use the left-handed coordinate system with Y up and the orientation is expressed as quaternions (both for models and bones). ...
0
votes
0answers
13 views

C++ - Error X3501 Main Entrypoint Not Found [duplicate]

I was developing my DirectX 11 app, but when I wanted to add a function to draw a triangle, I get this error from compiler. Error X3501 Main Entrypoint Not Found This is how my main .cpp looks ...
0
votes
3answers
53 views

How can I track down outstanding references to a D3D swap chain?

On direct3d_11.1 initialisation the swapchain is resized to the desired proportions but after the getting the backbuffer it isn't released. I check the return value and check its address which doesn't ...
0
votes
0answers
43 views

DirectX Compute shader (HLSL) makes texture black

Hello this is my first question on this forum :) When using compute shader in directx to change the color to blue the texture only gets black. I really don't understand what the problem could be and I ...
-1
votes
1answer
47 views

How to render 2d image with sharpdx after post processing by hlsl [on hold]

using System; using System.Diagnostics; using System.Windows.Forms; using SharpDX; using SharpDX.D3DCompiler; using SharpDX.Direct3D11; using SharpDX.Direct3D; using SharpDX.DXGI; using ...
0
votes
1answer
45 views

How to merge 2 textures into single SRV

I have 2 textures in 2 different ShaderResourceViews. What's the fastest/least expensive way to merge them into one? I would use CopySubresourceRegion but copying a texture is quite a bit expensive. ...
1
vote
2answers
124 views

Elegant ways to handle rendering with DirectX 11

I'm looking for a design pattern that's going to help me to elegantly handle the rendering of my game objects. Lots of game development guides talk about how to handle the game objects themselves, ...
0
votes
0answers
19 views

alpha blending rendering black

I'm using blending in my game here is my blending equation: D3D11_BLEND_DESC blendStateDescription; ZeroMemory(&blendStateDescription, sizeof(D3D11_BLEND_DESC)); ...
-2
votes
1answer
41 views

Can I use my directx 9 code to visual studio 2013 that already has directx11? [closed]

I am facing problem with my directtx 9 code?
0
votes
1answer
35 views

Resizing D3D Buffers within a frame

I have a particle system. So far it worked like this: I have a dynamic vertex buffer for a system, which is created with a size that can hold for example 100 000 particles. I map/unmap this and write ...
0
votes
1answer
30 views

Binding an Instance Matrix with an InputLayout

If I want to bind an instance matrix to a vertex shader, how do I go about it? For example, here is a super-simple VS input: struct VS_IN { float4 Position : POSITION; row_major float4x4 ...
1
vote
1answer
31 views

Mix multisample and non multisample rendering in Directx11

is there a way to mix multisample and non multisample rendering in Directx11? It seems that when I create a multisampled render target I always get a multisampled rendering, regardless of the value of ...
0
votes
1answer
33 views

Sharpdx DirectX11 MapSubresource is failing trying to map a staging texture

I'm trying to render to a texture and then pull the image data out. I've created one texture as a render target and another as a staging texture. After rendering to the render target, I use ...
1
vote
0answers
49 views

DirectX 11 GenerateMips only works with premultiplied alpha?

The GenerateMips method in the ID3D11DeviceContext allows generation of mipmaps at runtime, which is fine for fully opaque textures. However, when this method is used with transparent textures that do ...
1
vote
1answer
147 views

D3D11/C++ Inaccuracies in uv interpolation in pixel shader. How to avoid?

I'm trying to draw a quad with a texture onto the screen such that texels and pixels perfectly align. Sounds pretty easy. I draw 2 triangles (as TRIANGLE_LIST, so 6 vertices) using these shaders: ...
0
votes
1answer
25 views

DirectX 10 - dimension of vertices passed to vertex shader

I'm trying to learn DirectX programming. Looking at different tutorials there is something about vertices that I find a bit confusing. I know that DirectX uses vertices with four elements (x, y, z, ...
0
votes
0answers
88 views

DirectX Rendering to a texture

I'm trying to implement a rendering to a texture but without success. I've created a class that will(should) take care about all these stuff: class TextureRenderer { public: TextureRenderer() = ...
0
votes
1answer
44 views

How is this particular HLSL condition treated with respect to compile- or run-time evaluation?

Let's say I have this very simple pixel shader (cbuffers and other stuff omitted) float4 PS(VertexOut pin, uniform bool useLighting) : SV_Target { float4 retColor = gDiffuseMap.Sample( sampler0, ...
0
votes
1answer
49 views

How to disable depth buffer in Directx11

For now i know what i must use OMSetDepthStencilState. In the beginning i must create two states and change them every time i need another. For now i have this and it doesn't work, i.e. objects ...
0
votes
0answers
117 views

HLSL 5.0 assembly shows tons of ieq / add / or instructions for array indexing in loop

First of all, I have to apologize for the long code samples, but their content is not so important. Besides they are really simple and I tried to comment as much as possible. I'm working on a pixel ...
0
votes
1answer
56 views

Can state setting warnings be ignored?

If I am running DirectX 11 in debug mode (D3D11_CREATE_DEVICE_DEBUG), I am constantly getting these warnings: D3D11 WARNING: ID3D11DeviceContext::OMSetRenderTargets: Resource being set to OM ...
0
votes
0answers
75 views

Picture got distorted after has been moved to Directx11

I have moved app from Directx9 into Directx11. After this upgrade strange thing happened with my world. Objects get skewed and became 2D, also they are clipped in unexpected places. Two arrows at ...
1
vote
2answers
67 views

How to change render states only when necessary?

Earlier, I have been setting render states (shaders, shader resources, etc.) without checking if it is really necessary. Maybe they had been bound earlier and I could use them without setting them ...
0
votes
1answer
114 views

Directx: HLSL Texture based height map. (Shader 5.0)

I'm trying to implement a GPU based height map the simplest (and fastest) way that I know how. I passed a (.png, D3DX11CreateShaderResourceViewFromFile()) texture into the shader, and I'm attempting ...
1
vote
1answer
71 views

How to diagnose the problem when the input assembler and the vertex shader look correrct, but the Output Merger is wrong? [closed]

I'm porting some OpenGL code to Direct X 11. I ended up with nothing being drawn on the screen. I reverted to a simple program, which I am writing about here. I'm now trying to use the Graphics ...
0
votes
1answer
88 views

Compiling a shader with fxc results in invalid ps_5_0 output semantic 'COLOR0'

I'm attempting to compile a shader at the command prompt. What am I doing wrong that would make it generate this error? fxc /Od /Zi /T ps_5_0 /E "ps_main" /Fo "basic.pso" "basic.ps" Here is the ...
0
votes
1answer
80 views

Specular light flickering with high specular power

I'm having some issues with specular lights, to be more specific, the specular color seems to be flickering when I set high power, like 512 (I set the specular color to green, so you can see better): ...
0
votes
1answer
56 views

Making a parenting system

Each Entity can have one parent and any number of children. They have a position vector and a quaternion orientation. I know that I can make objects look like they're in a hierarchy by multiplying ...
0
votes
1answer
46 views

Normal Mapped Models Render with render target background color acting as transparency and lighting Problem [closed]

SOLVED. See my comment below. Originally I noticed some sort of transparency when rendering in Direct3D 11. I noticed it was worse once I changed my background color to something other than black. ...
0
votes
0answers
88 views

Trying to bounce a box with a plane using bullet physics

I'm trying to simulate a box that bounces with a plane and I'm beginner with bullet physics. I created a plane (box) and and a box that is falling. The problem is the ball is stalled while colliding ...
0
votes
0answers
101 views

Update DirectX 11 Texture Created in Unity Asynchronously in the Native (c++) Plugin

Sorry for the long question :D tl;dr version :) Is it possible to update DirectX 11 textures created in Unity asynchronously in a native plugin (C++)? I've written a plugin that retrieves data from ...
1
vote
0answers
79 views

Geometry shader: Dynamic output?

I'm currently using a geometry shader to generate grass blades out of single root points that are layed out in a grid. For each root point, I generate a grass blade with, right now, a constant number ...
0
votes
0answers
303 views

Automatic gamma correction on DX11

Trying to figure out how to get automatic gamma correction on DX11. I'm using deferred shading. I'm not exactly sure exactly which textures needs to be in the SRGB format. Here's my guess: The ...
0
votes
1answer
68 views

My texture blends into one single color (DirectX11)

First thread on gamedev stackexchange. I am currently creating a cube with a single texture on each side. I got my cube up and running. But when I apply my texture, I get this: It blends the ...
2
votes
1answer
71 views

HLSL compiled code

I've been using RenderDoc for debugging my shaders, and one thing that struck me as odd is that sometimes, after stepping through the debugger, I notice some vector attributes are interchanged, for ...
1
vote
1answer
57 views

CopySubresourceRegion results in no-op

I'm having some trouble copying a subregion from a source texture (2D) to a destination texture. Both textures are mipmapped 2D textures, with dimensions (at mip 0) of 512 x 32. Rather than tell you ...
0
votes
1answer
169 views

SSAO all jagged

So I've been working on SSAO for awhile, and I thought I had it right, untill I loaded up the sponza scene that accompanied the SAO technique I'm implementing ...
0
votes
0answers
70 views

How to Render to Texture using DirectXTex

I can display a textured quad by using D3D11 & DirectXTex's ScratchImage and CreateShaderResourceView. How would I be able to render this texture to another one similarly created? I know that I ...
0
votes
1answer
106 views

Fullscreen triangle pass and texcoords

So I have a fullscreen triangle shader like this: #ifndef FULLSCREEN_TRIANGLE_VERTEX_HLSL #define FULLSCREEN_TRIANGLE_VERTEX_HLSL // Variation on Timothy Lottes FXAA vertex shader, for CCW frontface ...
0
votes
1answer
223 views

How to render a vertex buffer in DirectX11 C++ (specifically with box2d's b2Draw)

I have all the DirectX11 devices etc setup and working with DirectXTK's SpriteBatch and currently attempting to implement a b2Draw class to draw my box2d physics worlds. I have little idea on how to ...
1
vote
1answer
230 views

How does Direct3D know if a constant buffer is for the vertex or pixel shader?

I have a question about constant buffers in directX 11. They really confuse me and after searching on google most sites simply supply sample code without explaining how it works. I am probably ...
0
votes
1answer
178 views

Animation, Interpolation, & Structure

I have been working on animation in my small game engine recently and I am implementing some interpolation to be used with skeletal animations. I know how to do interpolation but I am not sure where ...
0
votes
0answers
134 views

mouse-controlled third person camera

I have a simple camera that always stays a set distance behind and above the player. Mouse-on-screen coordinates are used to do Pitch and Yaw, and the keyboard is used to roll. I get how to position ...
0
votes
0answers
51 views

Getting a Rect of a SpriteBatch

I'm using DirectXTK, https://directxtk.codeplex.com/wikipage?title=SpriteBatch it's a port of XNA spritebatch. I'm trying to get a bounding rect of my sprite for testing collisions AABB. I draw ...
0
votes
2answers
136 views

How should I fix a graphic glitch caused by t-junctions when using greedy meshing

As you might be able to see in the following image, a "graphic glitch" occurs between triangles. I know you are able to make this less visible by enabling anti-aliasing but i was wondering if there is ...