Tagged Questions
-2
votes
0answers
65 views
DirectX or Opengl? Good resources [closed]
I am attempting to learn DirectX 11 for game programming (In c++).
I want to learn everything from the graphics pipeline and how to begin using DirectX11 to animating 3d graphics (such as characters) ...
-1
votes
1answer
59 views
Are there any open-source Direct X code-bases that I can look at to learn from as a beginning Direct X and graphics programming student? [closed]
I'm a third-year university student and I've recently begun studying Direct X 11. Mostly I've been following the samples from the SDK and reading a lot out of the MSDN. Although I have a decent ...
0
votes
1answer
148 views
How do I implement my old OpenGL-based gfx_render_triangle_list using DX11?
I am working at a game that has lots of procedural content. I had built a game engine using OpenGL that handles everything needed for creating a basic 2D game, sprites, primitives, blending, polygons ...
2
votes
1answer
59 views
Emulate border color texture address mode efficiently
In WinRT the border color texture address mode is not supported.
The best I came up with in emulating the border address mode, is doing this in my pixel shader:
float4 tcol = tex.Sample(texSampler, ...
3
votes
1answer
272 views
Proper use of Dynamic Vertex Buffers for rapid update
I am creating a C#/SharpDx/DirectX10 application to plot line charts in a fast way.
I have a prototype which uses Dynamic Vertex Buffers and fills a fixed-size buffer, say 1M vertices, with new data ...
1
vote
1answer
194 views
Render video from file to DirectX11 texture
Is there a way to render a video from file (avi, mp4, etc...) to a texture in a directx11 environment?
If so, how?
0
votes
1answer
122 views
Stencil buffer and transparent pixels
Do transparent pixels cause a stencil buffer operation (increment, decrement, etc.) to be executed?
My understanding was that only opaque pixels cause a stencil buffer operation, transparent pixels ...
0
votes
2answers
174 views
Multipass shader in DirectX 11
As far as I understand for DirectX11 it is recommended to have multiple single pass shaders, so the the method with multiple passes in one shader file is deprecated. Is my understanding correct and ...
-1
votes
1answer
89 views
How To Buffer Many Vertex, Geometry, and Pixel Shaders
What is the best way to buffer Vertex Shaders, Pixel Shaders, etc into the Device/Device Context without having to reload them from the filesystem every time?
ID3D11Device::CreateVertexShader ...
3
votes
3answers
320 views
How to Bind Multiple Shapes/Models to One Vertex Buffer?
If I have two Vertex Arrays, one for Square, and one for Triangle; what is the best way to bind them to the VertexBuffer?
What are the patterns used to write multiple vertices to the VertexBuffer? ...
3
votes
1answer
183 views
Per Instance Textures, and Vertex And Pixel Shaders?
How do you implement per instance textures, vertex shaders, and pixel shaders?
Given:
1. Two different model templates in Vertex Buffer, Square & Triangle
2. Instance Buffer with [n] instances of ...
1
vote
1answer
325 views
DirectX / Instance Buffer - How To Use Instance Buffers To Enable Reuse of VertexBuffer Data?
I created a simple Model framework in C++ 11 so that the same model can be rendered in different parts of a scene.
What I am trying to figure out is how to reference VertexBuffer data already "set" ...
1
vote
1answer
182 views
DirectX post-processing pipeline
I'm trying to make a simple post processing pipeline, depicted as follows with 3 effects in this case:
|------| |------| |------|
I ...
0
votes
1answer
99 views
Weird shader compiler error
I am trying to draw a full screen quad without a vertex buffer.
SV_VertexID should do the trick, although I get a weird error in my shader on the following line:
PS_IN VS(uint VertexID : ...
5
votes
2answers
283 views
D3D/DXGI handle fullscreen transition
I have a D3D11 application, and I want to add proper fullscreen suport.
Now I can let DXGI switch my window to fullscreen for me, and I'm under the impression that DXGI will take care of everything ...
1
vote
0answers
67 views
Does the feature level affect multisampling?
I'm using DirectX 11 with the feature level 9_3 even though my computer could run 11_0, but I want to support older hardware as well.
I'm using CheckMultisampleQualityLevels to check whether multi ...
2
votes
1answer
84 views
Nine Patch Images in DirectX
In Android development I found nine patch images very useful to draw images that have a fixed border. When the image is scaled the inner part scales, but the border stays at a fixed size.
I was ...
3
votes
1answer
134 views
What happens to a D3D11 application when Windows hibernates?
In D3D9 there was the concept of a "device reset". When a device reset occurred textures created with D3DPOOL_DEFAULT had to be recreated, but textures created with D3DPOOL_MANAGED didn't, because, ...
2
votes
1answer
159 views
DirectX11 CreateWICTextureFromMemory Using PNG
I've currently got textures loading using CreateWICTextureFromFile however I'd like a little more control over it, and I'd like to store images in their byte form in a resource loader. Below is just ...
3
votes
1answer
147 views
DirectX Unproject troubles
I have an orthographic projection and I try to unproject a point from screen space.
Following are the view and projection matrices:
var w2 = ScreenWidthInPixels/2;
var h2 = ScreenHeightInPixels/2;
...
4
votes
2answers
261 views
ConsumeStructuredBuffer, what am I doing wrong?
I'm trying to implement the 3rd exercise in chapter 12 of Introduction to 3D Game Programming with DirectX 11, that is:
Implement a Compute Shader to calculate the length of 64 vectors.
Previous ...
1
vote
1answer
106 views
Texture the quad with different parts of texture
I have a 2D quad. Let say it's position is (5,10) and size is (7,11).
I want to texture it with one texture, but using three different parts of it.
I want to texture the part of quad from x = 5 to x ...
3
votes
2answers
213 views
Having the same texture data in different ID3D11Texture2D
Sorry if this has been answered elsewhere - I'm rather new to DX. My question concerns conservation of resources - specifically textures in VRAM. I assume that upon returning from a call to ...
1
vote
1answer
214 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 ...
6
votes
1answer
293 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 ...
12
votes
2answers
867 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
980 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
1answer
1k 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 ...
3
votes
2answers
113 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 ...
1
vote
1answer
501 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
98 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
475 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
3answers
2k views
Should I go with OpenGL to see my future in Game Development industry? [duplicate]
Possible Duplicate:
Should I continue studying OpenGL or just switch to DirectX to give me a better chance of landing a job in the game industry?
I tried Google but found quite old ...
0
votes
1answer
321 views
Determine the stride of a DirectX Texture2D line?
Is there a way to determine, or preferably calculate/predict, the the stride of a line of a DirectX 11 Texture2D resource when using SharpDX?
(E.g. Can we say the stride of a line is always a power ...
5
votes
3answers
856 views
Which of these DirectX11 calls actually sends data to the GPU?
I'm trying to learn graphics programming and DirectX11.
I'm trying to learn how to minimize CPU-GPU transfer and graphics programming in general.
I have a question that I have been unable to answer ...
2
votes
2answers
417 views
How do I keep a triangle strip between geometry shader invocations?
I'm using a small geometry shader to build a "ribbon" from a set of points. For each point, I create 4 vertices that represent a section of the ribbon:
[maxvertexcount(4)]
void GS( point GS_Input ...
2
votes
1answer
1k views
Does the latest DirectX SDK support both Direct3D 9.0c and 11?
1) What is the latest version of DirectX SDK?
2) For my purposes I need DirectX 9.0c SDK and DirectX 11 SDK. Do I need to install these libraries separately or last DirectX SDK package contains both ...
4
votes
1answer
1k views
How do I create a CPU read/write buffer in SlimDX (what are the legal combinations of Usage and CPUAccess flags)?
Currently, I create a vertex buffer in SlimDX like so:
SlimDX.Direct3D11.BufferDescription Description = new SlimDX.Direct3D11.BufferDescription();
Description.BindFlags = ...
2
votes
1answer
453 views
Direct3D11 feature level
If I set the directx feature level to D3D_FEATURE_LEVEL_9_3 but I have a graphics card which supports D3D_FEATURE_LEVEL_11_0 does that prevent directx11 features from working even though my graphics ...
3
votes
2answers
3k views
Mapping a Vertex Buffer in DirectX11
I have a VertexBuffer that I am remapping on a per frame base for a bunch of quads that are constantly updated, sharing the same material\index buffer but have different width/heights. However, ...
5
votes
1answer
875 views
Render to Texture2DArray slices in DirectX11?
I would like to set a slice of a Texture2DArray as a render target in D3D/DirectX11. It's not clear how to do this.
What I'm looking for is the DirectX equivalent of glFramebufferTextureLayer(), ...
4
votes
2answers
2k views
How Often do you change Vertex/Index/etc Buffers?
So im still learning but I think i've got a grasp of most things DX11 (Well....beginner things) And I REALLY do apologize for all the questions.....but I'd rather understand EVERYTHING before I move ...
2
votes
2answers
446 views
Should I start to use DX11 [duplicate]
Possible Duplicate:
learning Direct3D 9, 10 or 11 ?
I have just started game dev and was wondering should I use DX11 or version 10?
I know AMD/nVidia now have DX11 cards but there are not ...
4
votes
1answer
1k views
SRV from UAV on the same texture in directx
I'm programming gpgpu raymarching (volumetric raytracing) in directx11. I succesfully perform compute shader and save raymarched volume data to texture. Then i want to use same texture as SRV in ...
13
votes
6answers
2k views
Modern Shader Book?
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 ...
5
votes
2answers
857 views
What is the purpose of a Direct3D vertex layout?
This tutorial (msdn) gives a description of a vertex layout.
This is an example of a input layout:
D3D11_INPUT_ELEMENT_DESC layout[] =
{
{ "POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, ...
5
votes
3answers
1k views
The pros and cons - DX9 moving to DX11 render?
We are a "nano" game dev company working on REFUSION.
DX9 renderer is almost done and question is: Should we move it to DX11 or not?
Anyone have experience with this?
Here are some videos from dev ...