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
1answer
12 views

Compute shader in directx 12? [on hold]

I was just wondering since directx 12 is out does it have a compute shader like directx 11??? Ive tried searching and didn't find anything.
1
vote
2answers
327 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 ...
1
vote
1answer
23 views

How to get depth of vertex in 0 - 1 range

I want to get the depth of vertex in 0 to 1 range(like it done in the shader) and I do it like this D3DXVec3TransformCoord(&vertex, &vertex, &wvp); depth = vertex.z; It ...
2
votes
1answer
1k views

Reading from a staging 2D texture array in DirectX10

I have a DX10 program, where I create an array of 3 16x16 textures, then map, read, and unmap each subresource in turn. I use a single mip level, set resource usage to staging and CPU access to read. ...
1
vote
1answer
51 views

How does one calculate color intensity?

How do I calculate color intensity if I have a image sample of RGB? The sample is of a float3 of red, green, blue. I'm trying to do a bilateral blur and have to not change the image if the color ...
0
votes
2answers
219 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 ...
2
votes
1answer
225 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
1answer
72 views

Second pass in multipass effect is ignoring

I am trying to render my vertecies in 2 passes, but seems I am doing something wrong, because only one pass applying. I cannot make the second one work despite that second pass is applying. Here is ...
1
vote
1answer
147 views

How do I render a 2D overlay with DirectX 9?

I'm working in C++ with DirectX 9 on a 3D game, but I want a 2D overlay for rendering a HUD. I've heard that I could use D3DXMatrixOrthoLH, but I'm very confused on how to use it. I'm more familiar ...
3
votes
1answer
491 views

rendering an image within c# & sharpdx dirext3d9 [game overlay]

I'm following this guide and the related blog post to implement a basic game overlay for DirectX 9 games using SharpDX. So the tutorial already have an example for text rendering but I need to be ...
6
votes
1answer
157 views

How can I speed up this HLSL shader?

I have written a lighting shader file that is used as the fragment shader part of a deferred lighting pipeline. Unfortunately, each iteration seems to be adding 0.5ms to my frame time, so any more ...
1
vote
2answers
89 views

How to rotate camera using mouse?

I'm looking for a basic example of rotating camera using the mouse. the only problem is I'm not sure of how to rotating the camera around it target. should i do this by an algorithm or is there a ...
1
vote
3answers
1k views

How do I determine the look-at vector of a free-look camera?

I'm trying to create a free-look camera with DirectX 10. I've figured out how to get the directions for forward and back and left to right. However, I don't know how to rotate the look-at vector of ...
0
votes
1answer
36 views

Storing and rendering Mesh Data in stl container

I'm trying to refresh my DirectX11 knowledge, and ran into a problem while trying to render multiple meshes instanced. What I want to do is give my ObjectManager class the name of an .obj file and it ...
3
votes
1answer
287 views

Modifying depth values in PixelShader (SharpDX)

I'm relatively new to DirectX, and am currently converting some WPF 2D graphics code that displays geo-located sonar returns. I am using SharpDX, and rendering via a D3DImage. I've got the basics ...
3
votes
2answers
41 views

DirectX11 Using Multiple Shaders

I currently have a scenario where I am rendering terrain with a shadow map. I have two passes, one for the depth buffer to create the shadow map (which is rendered to a texture) and a second that ...
0
votes
1answer
182 views

Constant buffer not updating

I'm trying to rotate models independently of each other however I cannot for the life of my figure out how. I have gotten to the stage of writing this: std::vector<int>::size_type st = ...
2
votes
1answer
329 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); ...
2
votes
0answers
72 views

Jagged light bleeding where surface is roughly parallel to shadow mapping light direction

I am using Unity but this question might not be proper to this engine. I have projected the shadow map onto this sphere but there are grazing shadows. Is it possible to avoid it or to correct it as I ...
0
votes
1answer
118 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
0answers
21 views

DDS DXT5 texture doesn't render alpha correctly

I have an issue with how dxt5 textures render alpha. I have a source png with alpha gradients which is converted to dds with NVidia tools. Then is loaded in engine correctly but shows alpha pixels ...
3
votes
1answer
37 views

Vertex normals in the geometry shader using directx

I'm in directx 11 with the geometry shader. Is is possible to calculate vertex normals? Just one like segment per vertex? In the geometry shader? I did vertex normals per face, this is what I got, ...
3
votes
1answer
248 views

Why does writing to a D3DFMT_R32F render target clamp to 1?

I'm currently implementing a picking system. I render some objects in a frame buffer, which has a render target, which has the D3DFMT_R32F format. For each mesh, I set an integer constant evaluator, ...
0
votes
1answer
533 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
1answer
19 views

Distance per mesh in HLSL directx

I'm subdividing a sphere so when distance gets greater, the sphere is subdivided less to save memory. The sphere changes to another sphere when the distance is 10. My problem is that only one ...
0
votes
1answer
92 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 ...
1
vote
2answers
42 views

Subdivision of a triangle in HLSL

How can I subdivide a triangle more than once. I can not use recursion as directx 11 hlsl will not allow it. Are there any links to a HLSL code. This has to be done in the geometry shader as my book ...
1
vote
2answers
185 views

What is DirectX 11's equivalent of D3DCAPS9::MaxVertexIndex of DirectX 9?

I'm porting a DirectX 9 program to DirectX 11. How do I get the value in DirectX 11 that is retrieved using D3DCAPS9::MaxVertexIndex in DirectX 9? Thanks in advance.
1
vote
0answers
12 views

Cannot obtain correct bone transform matrix data

I tried to obtain bone transform matrix for animation implemented with Directx11 and FBX sdk. I found this function in some web resources: fbxCluster->GetLink()->EvaluateGlobalTransform(); // ...
0
votes
0answers
45 views

Unity - _LightMatrix0 and Directional Light

I am trying to access the _LightMatrix0 in a forward base pass to calculate some light point of view coordinate but it seems that the _LightMatrix0 is empty with directional light. Any idea how can I ...
1
vote
0answers
27 views

Loading FBX Files into a DirectX 9 Application

I'm having an extremely difficult time trying to convert an FBX file into a format that can be used with DirectX. I've read a lot of articles on forums all over the internet and have followed ...
0
votes
0answers
57 views

Cubemap texturing issue D3D11 (C++)

I have a texture problem with the cubemap I'm rendering and can't seem to figure it out. I've generated a cube map with direct x's texture tools and then read it using ...
0
votes
0answers
24 views

Shader - Directional Lights Depth

Is there a way to retrieve the deph from directional lights ? I can access the _ShadowMapTexture but this is not the depth. I found how to access the shadow map of, I think, every light type by using ...
0
votes
1answer
32 views

Unity - Access to svPosition in fragment shader

I am trying to access to the svPosition in my fragment program in Unity but I keep having this error. invalid input semantic 'POSITION': Legal indices are in [1,15] invalid ps_3_0 input semantic ...
-1
votes
1answer
149 views

Encoding Float to RG/RGBA and Blending

Encoding a float value inside a RG or RGBA texture is very interesting and useful but it is also become quite useless when you use blending as the result and the values might be altered because of ...
1
vote
0answers
45 views

Subsurface Scattering - Transmittance

I have a question related to SSS and especially transmittance. I've looked at several papers about that topic, most of them from Jorge Jimenez, which are very interesting and, I admit, a bit hard for ...
1
vote
2answers
49 views

What's the reasoning behind using “redistributable” packages?

On Windows, many if not all games require some DirectX package and some VC++ runtime. Others also need OpenAL, wmfaredist, nvidia physx, windows live and probably others. I'm trying to figure out why ...
0
votes
3answers
634 views

Direct3D 11 - Mipmap level selection

When we sample a texture resource through an SSO in HLSL, how is the mip level selected for sampling; assuming the texture resource contains mips? The SSO has parameters that seem to be concerned ...
2
votes
1answer
56 views

How to store renderer vertex / index data in scene graph objects?

I have a SceneNode class which contains a Mesh instance. The Mesh class stores client side information such as vertex and index arrays (before they're uploaded to the GPU). I also have an abstracted ...
0
votes
0answers
17 views

Is it possible to Change the vertex format of a Model from line list to Triangle strip using DirectX

So I have a DirectX game library and using DirectX models in a game I am developing. All the models I am using have a Triangle Strip topology and thats fine as ID3DXMesh uses triangle strips for ...
16
votes
7answers
4k views

Modern Shader Book? [closed]

I'm interested in learning about Shaders: What are they, when/for what would I use them, and how to use them. (Specifically I'm interested in Water and Bloom effects, but I know close to 0 about ...
1
vote
0answers
27 views

Direct3D11: Directional Shadow Maps

I've recently implemented shadow maps on my project. However, I'd like to add a feature that allows the light direction to be dynamically changed, so that the terrain can be viewed using different ...
3
votes
0answers
33 views

How to link assimp lib to universal app

I cannot make assimp object loader work with universal app, and I got the same problem as this one: Assimp and directX12 universal apps I tried the static library approach mentioned in the answer of ...
3
votes
1answer
65 views

How to determine what color will be written into single pixel framebuffer?

I thinking about rendering into single pixel (1x1) framebuffer. For example we have two triangles which covers whole NDC area, one is green second red. What color will be written to 1x1 framebuffer? ...
3
votes
1answer
48 views

Issues with depth calculation in HLSL shader

I'm currently trying to implement shadow maps in my graphics framework. I ran into an issue with depth calculations I wasn't able to solve myself (yet). I did a lot of testing and debugging and think ...
1
vote
1answer
30 views

What happenes if you leave out buffers for the inputassembler that the vertex shader expects?

I'm working through my first attempt at a "graphics engine" (I use the term loosely as I'm not aiming for much more than something that will display a few meshes). I want to leave my classes as ...
5
votes
2answers
223 views

What are other sources of screen tearing?

I have a DirectX11 based engine / application that is showing screen tearing on a certain system. The system has a large TV monitor with a GTX 980 graphics card. The tearing tends to happen in ...
2
votes
1answer
142 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
21 views

Texture being stretched when using D3DTADDRESS_CLAMP

I'm trying to create a skybox using a cube and using one of this textures: http://forum.unity3d.com/threads/mundus-skybox-pack-01-released.202748/ I've got it working well, but I noticed there are ...
1
vote
1answer
58 views

Rotate camera with quaternion around axis going through the origin

I am trying to implement my own third person camera using quaternions in DirectX. I first wanted to check that the camera rotates as expected so I started to rotate it around the world y-axis (0,1,0) ...