Most Popular

1500 questions
10
votes
2 answers

Fundamentally, how are 2D bitmaps rendered?

Suppose we have a 64-bit word-addressable computer and we want to program it to output a 5x7 character stored as a binary image bitmap (such as the one below) to a memory-mapped display. Since we have 5 x 7 = 35 pixels per character, we could…
user1735
  • 101
  • 3
10
votes
1 answer

How could I check the correctness of my result of fluid simulation?

I wrote a particle based fluid simulating program. It's hard to tell if I get the right result. The visualized result seems reasonable, but some part of it looks weird. I don't know wether it's a feature of fluid. Is there some accurate method to…
Yyao
  • 203
  • 1
  • 5
10
votes
1 answer

How do I accurately compute coverage of overlapping analytical curves?

Antialiasing of 2D shapes boils down to computing the fraction of a pixel that is covered by the shape. For simple non-overlapping shapes, this is not too difficult: clip the shape against the pixel rectangle and calculate the resulting shape's…
John Calsbeek
  • 3,972
  • 21
  • 31
10
votes
1 answer

Trying to implement Microfacet BRDF but my result images are wrong

I am trying to implement microfacet BRDF model. I am reading Sebastien Lagarde's slides. I implemented formulas to my code but i think result image is wrong. Yellow is base color of material. Specular color is red to see properly. My code: //…
hmkum
  • 131
  • 1
  • 12
10
votes
6 answers

Why can't we have hardware-specific graphics APIs?

Right now, if you want to use a GPU, you have to do it through graphics APIs like DirectX or Vulkan. These APIs are meant to be hardware-independent, but more often than not, they are tied to a specific platform (like DirectX for Windows, or Metal…
J22o
  • 209
  • 2
  • 5
10
votes
1 answer

Do you need to use a lowpass filter before downsizing an image?

Apparently bicubic pixel interpolation is good for scaling up or down an image (in real time or not). Is it recommended to use a lowpass filter before downsizing though, or does the bicubic sampling handle aliasing problems at all?
Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
9
votes
1 answer

How does UV unwrapping work?

I would like to project the triangles of my mesh to a 2D surface. I would like to minimalize the distorion, avoid breaking connected polygons if possible, and also maximalize the used space on the 2D surface. I tried to look for algorithms/papers…
Iter Ator
  • 278
  • 3
  • 11
9
votes
2 answers

Is long term continuous use of GPGPU safe for my GPU?

I'm looking to use my GPU for non-graphical calculations (artificial life simulations) but ideally I would like to leave this running for weeks at a time, 24 hours a day. Is there anything I should take into account before trying this? Is a GPU…
9
votes
2 answers

Why are oct trees so much more common than hash tables?

When reading papers I commonly find Oct tree implementations of geometry representations to sort the data. However whenever I think about the problem hash tables seem better overall. Hash tables have a better average and worse case scenarios for…
Makogan
  • 1,706
  • 12
  • 28
9
votes
1 answer

Raytracing: why are the spheres in the image below appear stretched?

Some context. Above are the code and the resulting image for it in Peter Shirley's Raytracing in one weekend's book. As you can see from the code, he adds in some spheres. And yet in the final image there are 2 ellipsoids side by side. I just…
Manh Nguyen
  • 329
  • 3
  • 8
9
votes
1 answer

How to use GLSL texelFetch?

I have read the OpenGl documentation of texelFetch, which is: gvec4 texelFetch(gsampler2D sampler, ivec2 P, int lod). I know the first argument "sampler" is just a texture. But I am very confused about the second and third arguments. According to…
yuchen
  • 475
  • 1
  • 4
  • 12
9
votes
1 answer

Importance sampling microfacet GGX

I have a renderer where the BxDF interface is Sample(), PDF(), and Eval(). The Lambertian BRDF is working well, and I believe I have properly implemented Eval for GGX based on another user's question, but I'm struggling to find a resource I can…
hunterloftis
  • 295
  • 3
  • 11
9
votes
2 answers

How can I convert signed distance field to a mesh?

I can easily make models by Modeling with Distance Functions but I need make mesh from It so I decide to use voxelizing and make triangles for my signed distance field torus like this video.but I haven't Idea that how can I do this. you can see this…
9
votes
2 answers

The most performant way to organize vertex data on modern GPUs

Say I have a model made up of vertices, each with position, normal, tangent, and texcoord attributes, where triangles are specified by index triples. If we just focus on the vertex attributes, I'm aware of two broad strategies: the structure of…
lcmylin
  • 413
  • 3
  • 7
9
votes
3 answers

What's a proper way to clamp dither noise?

When reducing color depth and dithering with a 2 bit noise (with n=]0.5,1.5[ and output=floor(input*(2^bits-1) + n)), the ends of the value range (inputs 0.0 and 1.0) are noisy. It would be desirable to have them to be solid color. Example:…