11 votes

Why did tessellation come to be a prominent feature?

The main purpose of tesselation is to increase the resolution of the mesh, while only transferring a small amount of triangle data around. In addition, tessellation allows you to dynamically change ...
RichieSams's user avatar
  • 3,782
9 votes
Accepted

Physically Based Area Lights

When I implemented real-time area lighting, there were two documents I kept referring to: "Moving Frostbite to PBR" by Sebastien Lagarde and "Real Shading in Unreal Engine 4" by ...
JarkkoL's user avatar
  • 3,636
8 votes
Accepted

What are Jittering and Dithering

Jittering and dithering are both techniques of adding noise to reduce visible artefacts (such as banding) in an image. They solve different kinds of artefacts so they are used in different situations. ...
Dan Hulme's user avatar
  • 6,810
7 votes
Accepted

Bloom in DirectX

This effect is called light bloom. Its algorithm is usually a variation of the following: Render your scene (preferably in high dynamic range) to texture. Make a thresholding pass to another texture. ...
IneQuation's user avatar
7 votes
Accepted

What's the difference between Sample and tex2D

They represent the same operation, but Sample is what it's called in D3D10 and newer versions of HLSL, while tex2D is what it's ...
Nathan Reed's user avatar
5 votes

Books to learn Ray Tracing

For an introduction, you can give a look at: Ray Tracing from the Ground Up (Amazon link here). It starts really from the basics, and provides simple implementations for the concepts that are ...
wip's user avatar
  • 1,861
5 votes
Accepted

Is `groupshared` memory stored in L2 cache of GPU?

There seems to be some confusion of terminology here. In Direct3D, you have threads and thread groups. "work item" and "work group" are generally encountered in OpenCL terminology, where a "work item" ...
Michael Kenzel's user avatar
4 votes
Accepted

Error with tube lighting

Found the solution, it turns out the lightVec is not the vector of light from the tube but rather the direction the tube will point. Therefore i will need to pass it a light rotation value to be used ...
Josh Nuttall's user avatar
4 votes
Accepted

Why don't Direct3D/Metal support texture swizzles?

Why is this feature present in OpenGL/Vulkan and not Direct3D/Metal? It's present in OpenGL because someone thought it would be a good idea, wrote an OpenGL extension specification for it, released ...
Michael Kenzel's user avatar
4 votes
Accepted

Trading off instancing for render order

It depends on your GPU. "Tiled renderers" do this for you so the benefit of doing it yourself is minimal (unless you have some more efficient way of knowing the order, e.g. sorting a fixed-viewpoint ...
Dan Hulme's user avatar
  • 6,810
4 votes
Accepted

mipmap selection process

Mipmap selection is done by looking at adjacent pixels on the screen, and finding how far apart their texture samples fall. The mip level is chosen so as to make the space between adjacent texture ...
Nathan Reed's user avatar
3 votes
Accepted

D3D11 Gpu profiling with queries accuracy

It looks like a normal amount of variance to me. Profiling results naturally fluctuate because there can be nondeterministic cache effects, changes in how the work is scheduled, there can be other ...
Nathan Reed's user avatar
3 votes

Books to learn Ray Tracing

Not a book, but here's an online write-up about the basics of Monte Carlo path tracing: Path Tracing – Getting Started With Diffuse and Emissive | The blog at the bottom of the sea I've also ...
Alan Wolfe's user avatar
  • 7,801
3 votes
Accepted

Buffer of arrays in HLSL compute shader

It looks to me like you want a buffer containing a single array of integers (not a buffer containing multiple arrays, whatever that would mean). So, you should be able to just do this: ...
Nathan Reed's user avatar
3 votes

Trouble Finding Simple 2D DirecX11/HLSL Issue

You have not set a viewport with RSSetViewports. You need to set this to the pixel dimensions of your render target. Without this the viewport will be set to 0,0,0,0 meaning no pixels will be touched. ...
icStatic's user avatar
  • 131
3 votes
Accepted

HLSL Deferred Rendering

A very novice mistake, I was compiling with the old HLSL compiler. But why would that be the default? Very strange. For anybody wondering, just right click the HLSL file in the solution explorer and ...
phatgreen's user avatar
  • 141
3 votes

Problem with Basic Diffuse Lighting

Your ambient lighting contribution is missing from the second one (:
Alan Wolfe's user avatar
  • 7,801
2 votes
Accepted

Trouble Finding Simple 2D DirecX11/HLSL Issue

I can't believe it has taken me this long to find this... So the array I was giving the Index Buffer Desc that contains the data was the wrong one... It was a blank one that I forgot I didn't need, ...
phatgreen's user avatar
  • 141
2 votes

Projected grid water horizon detail

The technic what Benedikt mentioned is explained in Section 2.4.1 of this thesis. http://fileadmin.cs.lth.se/graphics/theses/projects/projgrid/projgrid-lq.pdf Implementing this should solve your ...
TheXappy's user avatar
2 votes

How do you loop through the contents of a buffer in DX11?

There are a couple of issues. First you need to make sure that veBuffer has the correct type, so that probably means you need to cast it to pointer to vertex: <...
trojanfoe's user avatar
  • 121
1 vote
Accepted

D3D11 Map forces synchronization

Yes, Map can force synchronization in some situations. In D3D11, the driver handles GPU command recording, submission and synchronization. When you make D3D11 calls,...
Nathan Reed's user avatar
1 vote

what is the range for NDC coordinates to be visible in directx

Like you said... When using a perspective projection, your 'w' can be !=1. Between the vertex pocess stages (Vertex, Tessellation control, Tessellation evaluation, geometry) and the Fragment shader, ...
Thomas's user avatar
  • 1,265
1 vote
Accepted

what is the output from rasterizer

You are correct in your understanding that the rasterizer produces fragments. Each fragment can be thought of as a quasi-pixel, in that geometry may generate more than one fragment for the same pixel (...
Straivers's user avatar
  • 126
1 vote
Accepted

Downscaling texture via mipmap [DirectX 11]

I found the problem. By zeroing the sampler description I implicitly set LOD bounds to 0. After adding ...
ivokabel's user avatar
  • 1,464
1 vote
Accepted

ShadowMap peter-panning and wrong direction

I found out that simply removing minus sign in shader in converting coords to [0, 1] solved direction problem. But scale is still off - here is an example: ...
DirectX_Programmer's user avatar
1 vote
Accepted

Weirdly looking diffuse irradiance map

I've actually managed to find problem thanks to @PaulHK, thanks! I decided to pass which face I am currently working on and setting then coordinates manually per face. It is awful but it works rather ...
DirectX_Programmer's user avatar
1 vote
Accepted

R16_FLOAT, SampleCmp and CheckFormatSupport

Because I was using the CheckFormatSupport wrong. The second parameter is supposed to be an input. Here is what it should be like. ...
ACskyline's user avatar
  • 115
1 vote
Accepted

XMMatrixPerspectiveFovLH is broken?

Problem XMMATRIX and XMVECTOR (which use __m128 under the hood) require 16 byte alignment. ...
Matthias's user avatar
  • 1,074
1 vote

Physically Based Area Lights

Fellow 15-year-old here. As far as I have read, you would usually implement an Area light by combining multiple things: A point or directional light at the position for BRDF calculations. Using the ...
SparkyPotato's user avatar
1 vote

Problem with Basic Diffuse Lighting

...
Arjan Singh's user avatar
  • 2,511

Only top scored, non community-wiki answers of a minimum length are eligible