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)

1
vote
1answer
415 views

ERROR #342: DEVICE_SHADER_LINKAGE_SEMANTICNAME_NOT_FOUND

I've stared at this for at least half an hour now and I cannot figure out what directx is complaining about. I know this error normally means you put float3 instead of a float4 or something like ...
2
votes
1answer
258 views

Regarding cel-shading of existing games

Is it possible to cel-shade existing games through API interception? I would assume yes. If done properly, could cel-shading be used as a rendering optimization technique? This means, rather than ...
3
votes
2answers
292 views

How to reconcile depth ordering with minimal shader context changes?

We generally want to minimise shader-program switches (glUseProgram and all associated context changes) for the sake of performance. AFAIK it is not uncommon to render by shader program, i.e. group ...
-1
votes
1answer
136 views

DirectX UV Coordinates not responding?

My UV coordinates never respond to me for some reason. It is just UV mapping itself in the smallest way possible. It's a tile-able texture and the program is subdividing so much I can't even zoom in ...
0
votes
2answers
1k views

OpenGL matrix vs DirectX matrix

I'm working on an animation and model exporter from Maya to use within my game. Currently, models work perfectly, and animations have some issues with the joints. Since Maya works in an OpenGL ...
-1
votes
1answer
174 views

Desktop twist, does anyone know how to implement this effect in DirectX?

http://my.tv.sohu.com/u/vw/26933139 I didn't know what the exactly name for this effect, so I just paste the link of the video here, I want to know what is the knowledge background needed if I want ...
1
vote
2answers
183 views

How does my program know which variables to link to the shader?

I am using DirectX and C++. I never understood how my VertexDeclaration knew what variables were the UV map and which were linked to the position. I have in my shader Position : POSITION and Texture : ...
2
votes
1answer
700 views

Multi-textured Terrain?

How would I accomplish multi-textured terrain? I need to know how to write the HLSL shader for it. The world already UV maps itself and I can get it to do 1 texture at a time. But I want more than 1 ...
1
vote
1answer
297 views

Highlight edge on 3d cube in directx

I want to make a 3d editor in DX9/XNA for a project I'm working on. I'm just thinking through how I would go about certain tasks and I'm stuck on one particular thing, which is crucial to making the ...
0
votes
1answer
140 views

How would I write a shader that supports 2 different texture coordinates?

Hi I am not very good with writing shaders. How would I make a shader that simply supports 2 texture coordinates so I can load up 2 different textures to be used at the same time but on different ...
1
vote
1answer
298 views

How would I get this to UV map correctly?

Alright so I have my code to draw out a big landscape using C++ and DirectX. I had it textured with one texture and then needed to add more. I saw people doing it where they had 1 texture image and ...
0
votes
1answer
306 views

XNA Multisampling only for 3D

I am working on a game which consists of 3D elements and a 2D GUI. I have it working properly, but I want to enable multisampling for only the 3D parts, and not the 2D Textures. Otherwise, the GUI ...
4
votes
1answer
451 views

Simplex Noise flat land and hills

I'm using the simplex noise to create Minecraft like terrain. I can only achieve hills like this. Does anyone know how to use simplex to make more dynamic landscapes?
0
votes
1answer
363 views

Taking MSAA screenshot using D3DX10SaveTextureToFile()

I have some screenshot code (pasted below) which was working fine until I enabled MSAA. The first time I tried to use this code, it complained that the texture I'm creating needed to match the sample ...
1
vote
2answers
1k views

Sharing a texture resource from DX11 to DX9 to WPF, need to wait for DeviceContext.Flush() to finish

I'm following these instructions on TheCodeProject for rendering from DirectX to WPF using D3DImage. The trouble is that now that I have no swap chain to call Present() on -- which according to the ...
0
votes
1answer
704 views

Rotating around a non origin point

I've been looking around the forums for some answers to the question I have. I've found some answer that seem to help but nothing that answers my specific question. That question being how to rotate ...
1
vote
1answer
267 views

Intercepting DirectX calls and optimizing the overal performance of games

I would like to use a DirectX proxy dll to intercept (and possibly optimize) the graphics calls being made by normal PC games. I am going to "screen cast" a game with ffmpeg or something similar and ...
1
vote
0answers
139 views

Direct X Vertex Coloring [closed]

So I've been messing around with directx 9 for the past few days, and I recently bump in a simple problem of vertex coloring. Can someone here with directx9 expirience solve this problem? I would ...
3
votes
1answer
906 views

What does multisampling skip or improve? (so it can be faster than supersampling)

I never really fully understood this, or found an article which explained all the steps in a friendly way. I'll start with what I do know already (which I hope do not contain misconceptions). I'm ...
0
votes
2answers
206 views

Creating a WARP device in managed DirectX

I have a very old graphic card that only supports shader model 2, but I need shader model 3 or up for the app I am developing. I tried to use a reference device but it seems to run very slowly, then I ...
5
votes
1answer
504 views

Is the June 2010 DX SDK really the latest?

I have not been involved in game development, using the DirectX SDK, since around 2008. From the looks of it, the June 2010 release, of the DirectX SDK, is still the latest release. This release is ...
1
vote
0answers
239 views

Framework to implement an in game gui editor [closed]

I need to do an in game gui editor. The game engine has his own widgets elements and I don't want a gui library that substitute it. The most difficult task is the implementation of the functionality ...
1
vote
0answers
217 views

Rendering transparent textures in directX

I am working with a directX application with WPF, I am facing a problem with videos and images that contains transparent pixels, I have to draw a color in background an then a video/image over it. ...
3
votes
0answers
200 views

Flickering problem with world matrix

I do have a pretty wierd problem today. As soon as I try to change my translation- or rotationmatrix for an object to something else than (0,0,0), the object starts to flicker (scaling works fine). It ...
1
vote
1answer
299 views

Get video chipset manufacturer in Direct3D

I'd need to know if the video chipset Direct3D runs on is from Nvidia, AMD or Intel. Is there a way to do that?
0
votes
1answer
2k views

Triple buffering causes input lag?

Consider some time in between two vsyncs. Suppose the first display buffer is being used to display the current image, and suppose the game was really fast and computed and rendered the next image to ...
-1
votes
1answer
181 views

Camera not working

I made a camera in DX9. To move forward I press the Up arrow. To rotate on the Y axis I use the mouse. When I perform these movements on their own the camera moves at the speed I want. However, if I ...
6
votes
1answer
401 views

How do I get FEATURE_LEVEL_9_3 to work with shaders in Direct3D11?

Currently I'm going through some tutorials and learning DX11 on a DX10 machine (though I just ordered a new DX11 compatible computer) by means of setting the D3D_FEATURE_LEVEL_ setting to 10_0 and ...
13
votes
2answers
1k views

Is it possible to construct a cube with fewer than 24 vertices

I have a cube-based world like Minecraft and I'm wondering if there's a way to construct a cube with fewer than 24 vertices so I can reduce memory usage. It doesn't seem possible to me for 2 reasons: ...
6
votes
2answers
2k views

What advantages does DirectX 11 have over DirectX 10?

What advantages does DirectX 11 have over DirectX 10? Most of the new features seemed to be for directcompute from what I can tell, and how much more are you limiting your market by if you use DX11 ...
1
vote
2answers
222 views

What could cause a pixel shader to paint outside the lines of the vertex shader output?

From what I understand, the pixels that a pixel shader operates on are specified implicitly by the SV_POSITION output (in DirectX) of the vertex shader. What then could cause a pixel shader to render ...
1
vote
1answer
351 views

How do I connect the seams between my terrain?

I'm using c++ and D3D11 and I'm trying to create a (pretty) large terrain, lets say 4096x4096, maybe larger. I've got the basics of terrain creation and already split it up into chunks. But, when I'm ...
3
votes
1answer
2k views

SV_POSITION in pixel shader

What are the uses for SV_POSITION in the pixel shader? Previously this was the POSITION semantic and it wasn't readable in the pixel shader, but now that it is, what can it be used for? In an SM2 ...
4
votes
1answer
657 views

Bitwise operators in DX9 ps_2_0 shader

I've got the following code in a shader: // v & y are both uints nPixel = v; nPixel << 8; nPixel |= y; and this gives me the following error in compilation: shader.fx(80,10): error ...
3
votes
2answers
130 views

How can I simulate multiple depth channels?

Here's what I'd like to achieve: Rendering a first pass of objects in my scene, using standard depth comparison Rendering another pass of objects in the same scene, but with the following rules: A ...
2
votes
1answer
867 views

Question about mipmaps + anisotropic filtering

I'm a bit confused here and maybe someone can explain this to me. I created a simple test texture for my terrain which is nothing more than a solid green color with a black grid overlayed on top of ...
0
votes
1answer
115 views

Can I animate render targets or the swap chain?

I want to animate some synthetic video bits to fullscreen w/o tearing. Can I set up D3D 9/10/11 in exclusive mode, and have it present a series of buffers that I'm writing to? I know how to copy ...
0
votes
1answer
570 views

Multiple render targets and pixel shader outputs terminology

I'm a little confused on the jargon: does Multiple Render Targets (MRT) refer to outputting from a pixel shader to multiple elements in a struct? That is, when one says "MRT is to write to multiple ...
2
votes
1answer
889 views

Quaternion Camera Orbiting around a Sphere

Background: I'm trying to create a game where the camera is always rotating around a single sphere. I'm using the DirectX D3DX math functions in C++ on Windows. The Problem: I cannot get both the ...
0
votes
1answer
680 views

Render full-screen gradient or texture

What's the simplest way to fill the background of the screen with a gradient or a texture in Direct3D 10/11? I'm building a Windows 8 metro app in which the camera never moves and I render some ...
0
votes
0answers
266 views

Differences in cg shader code for OpenGL vs. for DirectX?

I have been trying to use an existing library that automatically generates shaders (Hydrax plugin for Ogre3D). These shaders are used to render water and somewhat involved, but are not extremely ...
9
votes
2answers
663 views

Handle many lights in a scene (with shaders)

I'm curious about how to handle many lights in a scene. Given a very big map in a role playing game, with dungeons (with lights in there) etc. I know about deferred lighting, but that only answers how ...
0
votes
1answer
100 views

What Do I Pass for inputGeometryTransform Parameter of ID2D1Geometry::CompareWithGeometry?

I have a list of ID2D1Geometry objects and I'm trying to use CompareWithGeometry to detect collisions in Direct2D; unfortunately, I'm not getting the results I need. I suspect I am improperly using ...
2
votes
2answers
140 views

Distance to a sphere, in Screen Space

Is it possible to find the distance of a pixel to a rendered sphere, in screen space? All my naive solutions for just using the 2D screen distances are failing because of the warping that occurs ...
3
votes
2answers
1k views

How to mix textures in DirectX?

I am new to DirectX development and I am wondering if I am taking the wrong route to achieve the following: I would like to mix three textures which contain transparent areas and some solid areas ...
1
vote
1answer
2k views

SDL & Windows 8 Metro WinRT

I am just beginning to dip my tow into game programming and have been reading up on SDL, SFML, OpenGL, XNA, MonoGame and of course DirectX. (Needless to say there are a lot of choices out there) As ...
3
votes
2answers
1k views

How to fix issue with my 3D first person camera? [closed]

My camera moves and rotates, but relative to the worlds origin, instead of the players. I am having difficulty rotating the camera and then translating the camera in the direction relative to the ...
9
votes
3answers
1k views

Pixel-perfect rendering to a rendertarget with a fullscreen quad

I have some trouble rendering a bunch of values to a rendertarget. The values never end up in the exact range I want them to. Basically I use a fullscreen quad and a pixel shader to render to my ...
4
votes
1answer
3k views

Is DXUT deprecated?

I'm starting on a new project and was thinking of using DXUT. On the Microsoft site though, this page says the content has moved to this page. And on that second page, which is an overview of ...
0
votes
1answer
276 views

Quaternion to axis-angle, or ripping apart a full transform matrix

My game entities currently hold a quaternion for their orientation with the ability to return either a 3X3 full rotation matrix (based on that quaternion), or a full 4X4 transform matrix. though what ...