Most Popular

1500 questions
11
votes
1 answer

Do the alignement and declaration order of uniforms matter?

In the section 6.4 Constant Buffers of the book Practical Rendering & Computation with Direct3D 11 (pages 325, 326) it is mentioned: By default, the HLSL compiler will attempt to align constants such that they don't span multiple float4 registers.…
Julien Guertault
  • 4,420
  • 2
  • 23
  • 47
11
votes
1 answer

Efficient rendering with many light sources

To render a scene with a single light source using phong shading, one can calculate the final color of each fragment passed into the fragment shader based on the ambient/diffuse/specular components of both the material and the light source. This can…
es1024
  • 433
  • 5
  • 12
10
votes
1 answer

Is it possible to alpha blend multiple render targets using a specified alpha?

Say I have render targets 0 through N and RT 0 happens to have in its fourth component an alpha channel specified by a material or mask or something. Is it possible to have the hardware compositor blend render targets 1 through N using the alpha of…
jeremyong
  • 267
  • 1
  • 11
10
votes
1 answer

Modelling Young's double slit experiment

Young's double slit experiment is very simple to set up and simple to explain, but it is an example of both diffraction and interference, neither of which are modelled by conventional raytracing. It is straightforward to render an approximation of…
10
votes
2 answers

Why do GPUs divide clip space Z by W, for position?

Background: I found that it is very easy to use a linear depth buffer, using only a slight modification to the canonical vertex transformation. The simplest method is found at the bottom of…
Jessy
  • 203
  • 2
  • 7
10
votes
2 answers

Is depth of field incongruous in a 3D still image?

If rendering an image in 2D, adding depth of field effects (blurring objects further from the focal distance) adds realism and draws the eye to the object of the image. With a 3D (i.e. stereo) image, looking at an object in the image at a given…
10
votes
3 answers

What is the optimal radius of gaussian distribution for determining pixel colour?

Using a gaussian distribution of points on an image plane to calculate a pixel value, what radius/standard deviation will give the most information in the final image? Too large a radius gives a blurred image, and too small a radius neglects…
10
votes
1 answer

Using Monte carlo on Rayleigh scattering

Update I am editing and posting this question in a different way; this time from the point of view of Nishita paper. Sunlight gets scattered at P and attenuated before reaching Pv. Therefore intensity reaching Pv coming from P can be obtained by…
ali
  • 740
  • 4
  • 14
10
votes
4 answers

What is the difference between glossy and specular reflection?

What is the difference between glossy and specular reflection? What is their relations with BRDF?
chaosink
  • 591
  • 1
  • 4
  • 15
10
votes
2 answers

Why is the half vector not used in diffuse BRDF Fresnel calculations?

I am currently working with Earl Hammon Jr's Presentation PBR Diffuse Lighting for GGX+Smith Microsurfaces (now mentioned as [PBR, p.XYZ] and have read through (among others) Brent Burley's Physically-Based Shading at Disney (now mentioned as [DIS,…
Tare
  • 1,551
  • 7
  • 24
10
votes
1 answer

Asset creation for signed distance field rendering?

In traditional computer graphics, most 3D models are rendered by rasterizing or ray tracing against a subdivided mesh of primitives, usually triangles or quads. More recently, some real-time techniques have been predicated on ray-tracing against…
Mokosha
  • 1,144
  • 7
  • 23
10
votes
3 answers

How to do texturing with OpenGL direct state access?

How do you use textures with direct state access in OpenGL? I have the following in my code, which seems to work: GLuint textureHandle; glGenTextures(1, &textureHandle); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D,…
LinAGKar
  • 183
  • 1
  • 9
10
votes
2 answers

Is there a method to do ray marching style modulus repeat with raytracing?

One of the features of ray marching is that you can use modulus to repeat shapes infinitely, like in the image below, which is from https://www.shadertoy.com/view/MsBGW1 I was curious if there exists any technique which allows you to do the same…
Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
10
votes
1 answer

Why did AMD's putting an SSD on a GPU board reduce latency so much?

AMD have recently been in the news with an interesting Radeon Pro board with a couple of M2 SSDs on it. As some of the more detailed stories (here or here, for example) note, the benefits may principally accrue not from high bandwidth (the M2's are…
timday
  • 201
  • 1
  • 5
10
votes
1 answer

Shading: Phong vs Gouraud vs Flat

How do they work and what are the differences between them? In what scenario should you use which one?
Joey
  • 627
  • 1
  • 6
  • 14