Most Popular

1500 questions
6
votes
1 answer

Ray Tracing Shadows: The Shadow Line Artifact

By using smooth shading (i.e. interpolation of normals), an object can have a smooth look despite low polygon count. A nasty artifact that can happen when casting shadow rays is the Shadow Line Artifact. Since shadow rays originate from a certain…
David Kuri
  • 2,293
  • 13
  • 32
6
votes
1 answer

How much precision do I need in my G-Buffer?

I'm in the process of working out how to pack all the information I need for a Physically Based Deferred Renderer into a G-Buffer without using an obscene amount of render targets. What I have so far is 4 3-part vectors:…
Mark A. Ropper
  • 287
  • 2
  • 6
6
votes
1 answer

How to know when rendering is complete in WebGL?

gl.drawArrays()/gl.drawElements() initiates a drawing and returns immediately. There is also (non-recommended) gl.finish() that (theoretically) blocks execution until rendering is complete. Is there a way to receive event when rendering is complete,…
metalim
  • 163
  • 6
6
votes
2 answers

OpenGL set a vertex element stride of zero

Problem X: I need to provide "compensation" streams for attributes that are not plugged by the mesh data, but the shader requires them. (In d3d not matching the input layout is a hard error) Solution Y: In D3D I've created a 16 bytes buffer…
v.oddou
  • 623
  • 4
  • 9
6
votes
1 answer

Amount of light reaching the sensor of pinhole camera model

Consider hypothetical camera with pinhole (in mathematical sense) lens and is sensor, like in below image. Is it the case that the central region of the sensor will receive more light (pixels will be brighter) than the pixels closer to the…
ciechowoj
  • 203
  • 1
  • 5
6
votes
2 answers

realtime dynamic reflections, which way to go?

I'm working on my own engine and I'm struggling to find any techniques that give okay-ish reflections in realtime on dynamic scene. So far the only technique I found that work in real time on dynamic scene is SSR but it's really heavy and have a lot…
newin
  • 363
  • 2
  • 7
6
votes
1 answer

How Sunlight is added in Bidirectional Path tracing?

How is distant directional light source(like sun) added in BDPT? If this is an indoor scene that gets sunlight through windows, how is this handled in BDPT(other than to consider Sun as a big disc far away and to sample a position on it's area, as…
ali
  • 740
  • 4
  • 14
6
votes
2 answers

Radiance at a nearly perpendicular angle is almost infinite?

As far as I understand, radiance is a measure of the "intensity" of light in a direction defined as a differential cone . It's measure is Flux per solid angle per projected area. $L = \frac{d\Phi}{d\omega dA^\perp} = \frac{d\Phi}{d\omega…
6
votes
3 answers

Turn an enclosed region into a triangle mesh

I have a (2d) region defined as a list of vertices that I'm currently drawing as a line loop in opengl. I want to draw this region solidly. I started by using triangle fan, but that doesn't work if the region has vertices positioned at the same…
Sushisource
  • 163
  • 4
6
votes
2 answers

Advice on how to create GLSL 2D soft smoke/cloud shader

I want to recreate this smoke/cloud effect which is used in the Arrival (2016) movie end credits. I uploaded a sped up version of the credits to see the smoke dynamics. http://streamable.com/n3309 49s x6 sped up video of the credits I know how…
Simon Kirsten
  • 163
  • 1
  • 4
6
votes
1 answer

Anti-aliasing - Controlling colour density of pixel that comes within the "rectangle" surrounding my line

I am currently a beginner when it comes to anti-aliasing. I have read some notes online that how anti-aliasing works is that you first draw the line using an algorithm such as Bresenham's algorithm. Then you modify it to include anti-aliasing. Now,…
Belphegor
  • 163
  • 3
6
votes
1 answer

Fragment shader's output variables

EDIT: This is a duplicate of a question from stack overflow: https://stackoverflow.com/questions/9222217/how-does-the-fragment-shader-know-what-variable-to-use-for-the-color-of-a-pixel If you want to send a value from vertex shader to fragment…
Adrian
  • 667
  • 8
  • 17
6
votes
3 answers

Mirror Reflections: Ray Tracing or Rasterisation?

Are mirror-like reflections in computer graphics purely handled with ray-tracing/ray-casting techniques or are there some situations where they are achieved through rasterisation?
Will D
  • 115
  • 2
  • 5
6
votes
1 answer

Is there a way to do sphere caustics analytically?

I have a Shadertoy which renders the image below using ray tracing. I'd like to add caustics, but am aware that in general they are a hard solution, especially without bidirectional ray tracing or photon mapping. Does anyone know if there is a way…
Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
6
votes
2 answers

How is that possible that matrices can be thought as coordinate systems?

I've been reading around that matrices (for example, rotation matrices, but not only) can be thought somehow as coordinate systems. My question is: how is that possible? I've seen for example that if we're using row-major conventions, the rows of…
user4718