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)

5
votes
1answer
276 views

How can I draw a perspective-correct quad?

I'm trying to draw a quad in 2D (in SharpDX, but that is basically XNA). But texture correction is not working, and I'm getting only an affine textured quad. I'm using BasicEffect to render it. ...
3
votes
2answers
166 views

How to fill/initialize D3D11_SAMPLER_DESC properly?

If I want to set explicitly every parameter of the structure I just do so and that's it. But what if I want to set only some of them and leave the rest with default values? I've seen in some tutorial ...
8
votes
1answer
276 views

DirectX error with older XP systems

I am a blind programmer, working on an audio game for the blind. I am using SlimDX, and it has been tested on dozens of systems from XP to Win 8.1. My code works on most systems just fine, but I ...
6
votes
2answers
416 views

Fixed Function vs Programmable Pipeline performance with many batches

In OpenGL 2.0 I can easily make 10,000 draw calls per frame (with state changes in between each call). However, if i try to do this in either OpenGL ES 2.0 or DirectX9 with shaders, my peformance is ...
2
votes
1answer
306 views

How to create texture using raw RGBA texture data without having to use LockRect

I was previously uploading textures to DirectX by creating texture in D3DPOOL_MANAGED and then calling LockRect to upload the texture data to DirectX. However, I have switched to using DirectX9 Ex, ...
0
votes
1answer
78 views

Multiplying matrices in HLSL

I have code that calculates a position like this in HLSL: output.ShadowPos = input.VertexPos; output.ShadowPos = mul(output.ShadowPos, gWorld); output.ShadowPos = mul(output.ShadowPos, ...
0
votes
0answers
27 views

Blendshapes workflow in mudbox

I am new to mudbox. I want to create a face with blendshapes. Currently my face has 24576 polygons on level 3. I would like to go to level 2 or level 1, ie lower than 6000, but there, detail suffers. ...
1
vote
3answers
121 views

Applying scale to objects appears to have little effect when close up.

I just started out with D3D 11. My goal is to write a cube voxel engine (Minecraft style). Actually it's working pretty solid already, but when I finally tried to change the size of my cubes, I ran ...
-1
votes
1answer
171 views

Dynamically updating a shader resource view which was loaded from D3DX11CreateShaderResourceViewFromMemory?

I've loaded up multiple images from my custom video format into a vector after using D3DX11CreateShaderResourceFromMemory. Inside the rendering loop it's not updating the shader resource view like I ...
0
votes
1answer
142 views

Why am I getting rendered rectangles that are off relative to their bounding rectangles in this code?

I am rendering different rectangles with the help of the DirectXTK (PrimitiveBatch) and surrounding them with a BoundingOrientedBox (DirectXCollision.h). For visualization I draw the corners of the ...
2
votes
3answers
146 views

Can I store D3D9 textures so that they don't consume process memory and also don't require “lost device” handling?

I have an OpenGL application that uses a lot of texture memory. While the texture is stored in the system memory, that texture memory is not part of my application process memory. When this ...
1
vote
1answer
149 views

Center directional light shadow to the cameras eye

I'm currently drawing my directional light shadow using this view and projection: XMFLOAT3 dir((float)pitch, (float)yaw, (float)roll); XMFLOAT3 center(0.0f, 0.0f, 0.0f); XMVECTOR lightDir = ...
0
votes
1answer
313 views

Anyone know the frames per second that IOS apps run?

Anyone know the frame rate that iphones, ipads, and even android mobiles run?
0
votes
1answer
117 views

Where does XNA 4.0 takes memory from to perform operations?

I found this question which talks around the question I'm interested in. In particular I focused on the line where the guys says that GraphicsDevice object is literally a representation of the ...
1
vote
2answers
151 views

How can I repeat a portion of a texture on a quad?

I want to repeat a selected part of the texture into a quad. I was looking at this thread, however the solution involved changing my HLSL. Is there any way to do it without changing my shader ...
1
vote
1answer
102 views

When creating the horizontal blur, how is the vertex shader being called for each pixel?

I am following this tutorial. I am confused as to why the VertexShader is being called each time for the PixelShader. I was under the assumption the VertexShader is called only 6 times during the ...
0
votes
1answer
171 views

Creating a 2D texture array for depth view

Following my question here, I decided to create an 2D texture array for all of my depth screen texture so that I can use them for shadows for all my lights. I'm having an issue setting it up, I'm ...
0
votes
1answer
218 views

Set Sampler states: Linear, Bilinear, Trilinear Filtering/Interpolation

How do you set each of these sampler states in the hlsl Linear filtering Bilinear filtering Trilinear filtering
1
vote
1answer
270 views

How to create and populate a 2D Texture Arrays in DirectX11

I have generated a bunch of ID3D11ShaderResourceView that are a 2D textures that have a depth map screen shot for my lights shadows. I would like to take all of these textures and put them into a ...
1
vote
3answers
188 views

Is it possible to gain performance by omitting vertex normals in the GPU pipe?

I am working on a rendering problem where I want to render as many raw triangles to the screen as I can with either OpenGL or DirectX with the absolute fastest performance possible. I wondered about ...
1
vote
1answer
188 views

How does HLSL handle clip(vector)?

My goal is to convert clip() to GLSL, version 1.5. I'm currently doing a basic: if (x < 0) discard; But if x is not a scalar, obviously I can't use the "<" operator. So I'm wanting to ...
1
vote
2answers
332 views

What is the depth that a pixel shader may output? Is it necessary to write Depth?

In DirectX11, what does the depth that a Pixel Shader can output mean? Does a pixel shader need to output a depth so that we "write" the depth? If not, why would we output it? For any doubts, I'm ...
3
votes
1answer
209 views

Multiple pixel shader passes

I currently have a pixel shader that calculates the texture and I have another that calculates the light. I want another shader that does both. What I would ideally like to do is instead of creating a ...
1
vote
1answer
95 views

Basic DirectX app creates whistle noise

I'm in the process of learning DirectX and in the book examples they have a very basic application which sets up DirectX and displays a blank screen. When I run this app however my computer starts ...
1
vote
1answer
138 views

Does HLSL implement Shader Model LOD instruction?

The DX Shader Model 5.0 has a lod instruction. It returns "the LOD (level of detail) that would be used for texture filtering". Does HLSL have a built-in intrinsic that can do the same? I know I ...
0
votes
1answer
145 views

DirectX11 Linker error

I'm in the process of learning DirectX and in the examples supplied with the book I get the following error: Error 29 error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match ...
0
votes
1answer
229 views

How to print Depth to a Texture2D and then read it in the next pass on a shader in DirectX11

I'm programming a two-pass effect in DirectX 11 (SharpDX). It's supposed to write the depth to a texture in the first pass and then use that texture to extract data on the second one in the pixel ...
0
votes
1answer
256 views

Difference between texture.Load() and texture.Sample() methods in DirectX?

The question is simply that: What is the difference between texture.Load() and texture.Sample() in DirectX? I've used a Texture2D to store the depth in a pass of a DirectX Shader (with SharpDX), and ...
1
vote
1answer
61 views

When should I clear an auxilliary render target?

I'm using a few different render targets in my game in addition to the back buffer. These other render targets are only used in a few places, for specific tasks. I'm wondering when I should be ...
0
votes
2answers
106 views

Alpha interpolation in a pixel shader

How does the interpolation in a fragment shader work when it comes to the alpha parameter? I'm programming a shader with SharpDX, DirectX11. My idea is to interpolate 2 3d points of a segment, so ...
1
vote
1answer
113 views

How do I create an efficient long, pannable, sprite-animated scene in a Windows Store game?

I am creating my first Windows Store application in XAML, and I cannot seem to find a proper example for the requirements I have. The basic idea of the app is to have a large scrollable canvas which ...
0
votes
2answers
127 views

Accesing depth buffer from shader

I read this presentation and on 6th slide I found that is not need to use multiple render targets and depth can be taken directly from depth buffer. From which version of DirectX or OpenGL can be ...
0
votes
1answer
117 views

Why isn't my other two constant buffers being updated to the shader?

I posted previously before about my two dynamic buffers not being dynamically updating the constant shader. The tessellation buffer isn't working because I have to manually update the tessellation ...
1
vote
3answers
345 views

Bouncing ball isssue

I am currently working on the 2D Bouncing ball physics that bounces the ball up and down. The physics behaviour works fine but at the end the velocity keep +3 then 0 non-stop even the ball has stopped ...
2
votes
1answer
252 views

Resource management

I've come across a strange thing in DirectX 11: I'm trying to implement large scale volume visualization engine. My approach is like this: if the volume is HUGE (could not fit to GPU memory ...
0
votes
3answers
302 views

Loaded Images are upside down

I'm using SharpDX Toolkit and load a png file with SharpDX.Toolkit.Graphics.Texture.Load(GraphicsDevice, Stream) If I apply the texture to another texture it's drawn upside down. The texture is: and ...
1
vote
3answers
335 views

Error on running exe, build using SharpDX

I have developed a windows application to read gamepad using SharpDx (XInput) and C# (VS 2008). The application is running smoothly in my development environment. But when i move to some other machine ...
0
votes
0answers
71 views

Determining desktop bounds by D3D9 adapter

I've got a Direct3D 9 application which normally runs full-screen. The user is able to select a display adapter to determine which screen it is shown on. I also offer a Windowed mode which launches ...
3
votes
1answer
2k views

Teamviewer doesn't show my game screen

I've been building a 3D engine from scratch using C# and I've tried to show the result to a friend of mine using Teamviewer. When my demo game starts he doesn't see it. He can only see the last active ...
1
vote
1answer
2k views

Can I use DirectX with C#?

I thought that if you wanted to make games using DirectX, you had to know C++. But I recently found out that that is not actually true. It looks like some parts of Direct3D can be used from C#. This ...
0
votes
2answers
481 views

how to detect same keyboard key press only once

I am designing a keyboard class that can detect the keyboard key press only one time but I still cannot figure out the way to do it. My goal is just check and perform the action only once when the ...
2
votes
2answers
344 views

Is it possible to use DirectX in pure C program?

I want to try something simple with Direct Sound. Just want to know if it's possible. Or maybe I need some other API?
0
votes
1answer
93 views

Just 2 images on a window loaded using DirectX10…But how?

I am a beginner to DX and I have tried looking everywhere for something very similar to this concept but can't find anything. I just want two rectangles on a window. Rectangle 1 : on some x,y with ...
3
votes
1answer
299 views

Finding Pixels within UV Coordinates

I am building lightmaps for 3D models. My lightmap algorithm needs to determine which pixels( lumels ) within the lightmap texture fall within the boundary of a mesh face( triangle )...this process ...
0
votes
0answers
122 views

Making a texture bank, pointer in vector killing me

I'm trying to make a texture bank. I'm not 100% as to whether I'm doing 2D or 3D but whatever, it's a basic texture bank. The goal is to use texture objects that I can use a pointer to so as to load ...
2
votes
1answer
138 views

Development with multiple libraries

I'm almost fresh to the game development and I have one question about libraries. If I choose one library, such as SFML, to develop the menu of my game, is it possible to merge with, for example, ...
2
votes
3answers
631 views

How to check if user has integrated graphics card?

I'm almost done with my Direct3D game. When user starts game first time it will adjust settings (and maximum settings) based on DirectX feature level starting from 9_1 up to 11_1. I have different ...
1
vote
1answer
74 views

How can I fix this transparency problem when my data is viewed from a certain angle?

using Microsoft.DirectX.Direct3D; using Microsoft.DirectX; I render a 3D data by setting device.RenderState.AlphaBlendEnable = true Now my top view looks like below, the outer surface layer ...
1
vote
1answer
264 views

Color grading, shaders and 3d textures

I'm trying to implement color correction with the 3d lookup table. The lookup table is actually just a 2d texture 256x16 and consists of 16 squares which one is 16x16. When it comes to rendering, I ...
1
vote
0answers
34 views

Align Object With Triangle

I currently am trying to figure out how rotate an object so it's aligned with a triangle along the Z Axis. I have the world matrix of the object and a triangle, which has it's 3 points and the normal. ...