0
votes
0answers
15 views

How to render many regions from the same texture using UV mapping?

I tried to apply some things that look like a "texture atlas". I would like to load 1 big texture which includes many small textures, my goal is to render each texture separately. I tried to use UV ...
0
votes
1answer
95 views

DirectX UV coordinates are flipped

I'm loading a simple model, which is composed of vertices that have position, normal and UV texture coordinates. The thing is, displaying that model using DirectX 9 or 10 shows that the UV ...
0
votes
1answer
104 views

Why do I have to switch T(v) texture coordinates while importing OpenGL to Direct3D?

I am importing my code from OpenGL to Direct3D. My D3DTS_PROJECTION uses D3DXMatrixPerspectiveFovRH, and my D3DTS_VIEW uses D3DXMatrixLookAtRH to set a view equal to OpenGL's view. My question is why ...
0
votes
1answer
80 views

Getting invalid argument error on R32G32B32_FLOAT texture creation

D3D11_TEXTURE2D_DESC texDesc; texDesc.ArraySize = 1; texDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE; texDesc.CPUAccessFlags = 0; texDesc.Format = DXGI_FORMAT_R32G32B32_FLOAT; ...
0
votes
0answers
62 views

Dealing with 2D tiled maps in DirectX

I'm new to DirectX. I'm pretty much to the point to where I can create some sprites and attach textures to them, but I'm not fully cognizant of the entire model of textures and sprites or exactly how ...
0
votes
2answers
257 views

Texture coordinates for a 3D box

I have a box model in my DirectX application, stored as 8 vertices: MyVertex vertices[] = { { DirectX::XMFLOAT3( - 1.0f, + 1.0f, - 1.0f ), /*,tex coord...*/}, //0 { DirectX::XMFLOAT3( + ...
1
vote
1answer
53 views

Repeat or wrap texture (DirectX 9)

Sure there's something I'm missing about wrap/repeat textures in D3D 9. I've tried setting the sampler in the shader, i.e. : sampler DiffuseSampler = sampler_state { Texture = ...
0
votes
1answer
69 views

Triangular grid and rendering to a texture (Direct3D 11)

Is it possible to render vertex data from a triangular grid into a texture with a same size (i.e. 3x3 vertices to 3x3 pixels - each pixel is representing one vertex)? Consider following situation. I ...
1
vote
1answer
59 views

Does `SetResourceArray` copy the data into the GPU?

I am trying to create multiple textures, and only several of them change every few frames. I don't want to have to copy in the whole array via SetResourceArray for just a few textures that change, ...
5
votes
1answer
303 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. ...
1
vote
2answers
161 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
370 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 ...
0
votes
1answer
291 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
309 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 ...
2
votes
1answer
276 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 ...
1
vote
0answers
175 views

Connecting smoothly N textures on terrain

I started to create my own terrain in a quite common way, just like this: http://www.rastertek.com/tertut18.html . It is infinite and automatically generated (by using coherent noise). The areas are ...
1
vote
0answers
69 views

Directx Texturing problem [closed]

I've recently started exploring Directx 11. I'm almost done the introduction so I started making my own *.obj parser and it works beautifully. I accounted for the right-hand coordinate system of 3ds ...
1
vote
1answer
184 views

Texture Shaders vs. Pixel/Fragment Shaders?

My question is a simple one. Functionally, practically, and performance-wise, what are the differences between using a D3DX Texture Shader, and using a Pixel/Fragment Shader rendered with a full ...
3
votes
2answers
322 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 ...
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 ...
3
votes
1answer
235 views

Preventing banding textures in DirectX

I have a 3D scene that I've tried rendering in Direct3D 10 and using WPF's 3D framework. Obviously, going directly to Direct3D is producing far better performance but I am getting banding which ...
3
votes
1answer
2k views

How do I create a decal system?

I'm currently given the task to design & create a simple decal-system in C++/DirectX. Does anybody know a great tutorial, article or paper to start with? (Especially the part about 2D-texture to ...
1
vote
1answer
1k views

DirectX 2D Sprite Texture

I am trying to make DirectX display a sprite from a sprite sheet I found on the internet but it doesn't seem to be displaying the texture in the correct position as I am specifying it. D3DXVECTOR2 ...
0
votes
1answer
144 views

What does SetTextureStage(0, D3DTSS_COLORARG2, 0) in DirectX mean?

I'm trying to convert some DirectX code to Ogre3D and was wondering what the following translates to: pDev->SetTextureStage(0, D3DTSS_TEXCOORDINDEX, 0) pDev->SetTextureStage(0, ...
0
votes
1answer
202 views

How fill gutter using ID3DXTextureGutterHelper interface?

Using UVAtlas (Direct3D 9) Packed charts are separated by a user-specified gutter width. The gutter width is the amount of separation between charts, and allows for bilinear interpolation and ...
5
votes
1answer
2k 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(), ...
3
votes
1answer
401 views

Hashing 3D position into 2D position

I am doing volumetric raycasting and curently working on depth jitter. I have 3D position on ray and want to sample 2D noise texture to jitter the depth. Function for converting (or hashing) 3D ...
6
votes
3answers
1k views

Common light map practices

My scene consists of individual meshes. At the moment each mesh has its associated light map texture, I was able to implement the light mapping using these many small textures. 1) Of course, I want ...
8
votes
3answers
1k views

Very slow direct3D texture sampling

So I'm writing a small game using Direct3D 9 and I'm using multitexturing for the terrain. All I'm doing is sampling 3 textures and a blend map and getting the overall color from the three textures ...