Tag Info

New answers tagged

1

From the question, this appears to be more a design problem rather than an API problem: specular power is not a property of the light, it's a property of the surface. By including it in your light properties cbuffer you're creating an artificial coupling between these two different classes of property, and it's likely to cause you further problems in the ...


2

In DirectX 10.x/11.0, constant buffers are intended to be updated as a unit (i.e. you have to update the whole thing). This is why our performance recommendations is to arrange your data in constant buffers by frequency of update rather than having large cbuffers that contain variables that are updated frequently (per-object) and others that are updated ...


0

You the data for Normals and TextChords in the each others place, Try switching them like mine below: static D3D11_INPUT_ELEMENT_DESC VertexLayout [ ] = { {"POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT,0,0,D3D11_INPUT_PER_VERTEX_DATA,0} {"NORMAL",0,DXGI_FORMAT_R32G32B32_FLOAT,0, D3D11_APPEND_ALIGNED_ELEMENT,D3D11_INPUT_PER_VERTEX_DATA,0} ...


0

This was a newbie error. I RTFM, but didn't pay close enough attention and, apparently, hadn't used this draw call in this way before. Specifically: This draws 8 consecutively-indexed vertices starting at index 0: g_d3dContext->DrawIndexed(4 * m_segments->LineCount, 0, 0); This draws the same 4 consecutively-indexed vertices, starting at index 0, ...


0

My lighting problem was caused by two things. 1.) My input layout's TEXCOORD was set to DXGI_FORMAT_R32G32B32_FLOAT instead of DXGI_FORMAT_R32G32_FLOAT. I suspect that this was behind the weird debug output I was seeing from my shaders, but I'm not sure. and 2.) My light was facing down the negative z axis, instead of the positive z axis. Either of these ...


1

Just move the skybox with the view. Just the translation of the view though. You wouldn't want the skybox to rotate and scale with your view. I suggest looking at this http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/ to understand matrices better. From what I've found this has a very simple explanation of them. To get an idea of what a ...


2

The proper way of doing this is to implement the alpha test yourself in a pixel shader and clip (-1) any pixel that fails. This will discard the pixel and no depth or stencil values will be written to the framebuffer, without having to write anything to a separate color buffer and perform an extra test afterwards. As discussed in comments, arbitrarily ...


0

Use this: // Bind both, the consume buffer UAV and the append buffer UAV to the CS. ID3D11UnorderedAccessView* UAVArray[2] = { mInputUAV, mOutputUAV }; UINT initialCounts[2] = { mNumElements, 0 }; md3dImmediateContext->CSSetUnorderedAccessViews( 0, 2, UAVArray, initialCounts ); just before applying the tech passes in DoComputeWork() public function.


2

From my understanding and research on the topic, enabling ambient occlusion on the control panel does not make your NVidia card do some voodoo magic and apply AO to your scene. That's the way I read it from this page. All of the games built on Valveā€™s Source engine support AO when enabled from the CP Instead it's an option that gets signaled into your ...


0

Like most recent games, the developers clearly spent more time making it pretty than making it good. As of this posting, the panel on the right does not correspond to anything real. The data was always correct and in-place.


0

This looks unusual. Texture coordinates only requires 2 component X and Y, thus you can use DXGI_FORMAT_R32G32_FLOAT or DXGI_FORMAT_R16G16_FLOAT or any other 2 component format. And for texture coordinates, normally you wouldn't store it in an image file anyway. If you insist on using ARGB data, either you can convert it offline, simply by reading 4 32-bit ...


1

The idea behind multisampled textures is to let you explicitly fetch each of the individual samples in a shader. You can gather all 8 samples and implement the MSAA resolve (the process by which multiple samples are resolved into a single sample) yourself, but I do not think that is what you want. In OpenGL, you work around this problem by blitting a ...


0

The best answer for this is at the Nvidia source: http://www.geforce.com/whats-new/guides/ambient-occlusion#1


2

I would highly recommend that you look into "Dual contour" Mapping using "Voxel space"... This method will allow you to make deformable terrain on the fly. Another method you might run into is called "Marching Cubes" but stay away from this as it will cost you a lot of time, jsut to learn that Dual contouring is a superior method anyway, and so I suggest ...



Top 50 recent answers are included