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 ...
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. ...
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. ...
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 ...
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 ...
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" ...
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
3
votes
Problem with Basic Diffuse Lighting
Your ambient lighting contribution is missing from the second one (:
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 ...
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:
<...
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,...
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, ...
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 (...
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
...
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:
...
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 ...
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.
...
1
vote
Accepted
XMMatrixPerspectiveFovLH is broken?
Problem
XMMATRIX and XMVECTOR (which use __m128 under the hood) require 16 byte alignment. ...
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 ...
1
vote
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
directx11 × 49opengl × 11
hlsl × 9
direct3d × 7
c++ × 5
lighting × 4
directx12 × 4
directx × 4
shader × 3
texture × 3
gpu × 3
physically-based × 3
real-time × 3
deferred-rendering × 3
pixel-shader × 3
post-processing × 3
rendering × 2
vulkan × 2
pbr × 2
performance × 2
compute-shader × 2
shadow × 2
antialiasing × 2
memory × 2
shadow-mapping × 2