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.
0
votes
1answer
24 views
Direct3D - Get screen coordinates for printing multiple text elements
I have a function that I use to print text PrintText(char* text) that stores the text to a vector, which is then displayed if the vector is not empty. I'm trying to figure out how can I correctly ...
0
votes
1answer
54 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 ...
0
votes
1answer
101 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 ...
2
votes
1answer
360 views
Ogre 3D Visibility Advice
I would like an advice about some real-time rendering optimization.
I'm rendering a BSP level, by only using the mesh, textures, entities, and lightmaps, not using VIS at all.
I'm trying to make my ...
0
votes
0answers
27 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:
{ ...
3
votes
1answer
300 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 ...
2
votes
0answers
30 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 ...
7
votes
6answers
2k views
Correct level of abstraction for a 3d rendering component?
I've seen lots of questions around this area but not this exact question so apologies if this is a duplicate.
I'm making a small 3d game. Well to be honest, it's just a little hobby project and ...
0
votes
1answer
53 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 ...
3
votes
1answer
187 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 ...
0
votes
2answers
837 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 ...
1
vote
0answers
39 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 ...
1
vote
1answer
196 views
How to draw an ellipse with DirectX 9?
I can draw the outline of an ellipse but I want to draw a filled in ellipse, but I can't seem to get the code to work. Any help would be great! I am using DirectX 9 and D3DX.
0
votes
1answer
155 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 = ...
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 ...
6
votes
0answers
313 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
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);
...
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, ...
4
votes
1answer
2k views
What advantages does multisampling have over 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
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
36 views
Maya 2015 Collada mesh transforms not applied
I am trying to load a dae (Collada) model into my 3d engine. The problem is they export the vertices and transforms seperately. So in Maya 2015 it looks like this
In the game engine I have it simply ...
0
votes
1answer
359 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
36 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
2answers
138 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.
0
votes
1answer
239 views
DirectX9 Drawing Sprites out of place due to offset
This is my very first time into DirectX. Im trying to make a simple 2D game, just for learning the basics. And i've achieved that. The next step is to draw an animation using sprites.
For that, i ...
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 ...
1
vote
1answer
240 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
1answer
49 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, ...
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
119 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
2answers
96 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
...
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?
...
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 ...
0
votes
0answers
67 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, ...
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
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
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
159 views
Having trouble getting shader to work with sprite batch in XNA #4
I found a neat "CRT screen" effect shader on the web, but I've never used shaders before and I can't seem to get it working properly. If I do the second sprite batch in my code here normally without ...
0
votes
0answers
22 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
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
56 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
143 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 ...
5
votes
2answers
4k 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 ...
1
vote
1answer
109 views
How can I manually syncronize render calls with a monitor's refresh rate in Direct3D 9?
I have an application that utilizes Direct3D 9 to render 3D graphics. I'm trying to manually control the number of frames rendered in a given second. Here is pseudocode:
while( bInGame )
{
// ...