Most Popular

1500 questions
5
votes
1 answer

Topological Sweep

I need to identify certain topological entities (circular holes) in a given geometry, that is, given the boundary representation of a solid, I need to identify the exact coordinates of all holes in the solid. I have been told to use a topological…
jcp1966
  • 51
  • 1
5
votes
1 answer

Kaiser windowed sinc filter for mip mapping

These older but informative article talks about how a Kaiser windowed sinc filter is a good way to generate mips. The Inner Product - Mipmapping - Part 1 | Jonathan Blow The Inner Product - Mipmapping - Part 2 | Jonathan Blow Unfortunately, the…
Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
5
votes
2 answers

How did the hard, accurate shadows, work in early 3d (2000 - 2004) games?

I've been hunting around the internet for a while now, and I can't find anything about the specific shadow technique that I'm looking for. I can only recall one game in particular that used it, and I know that it happens on the PC port of the game…
5
votes
1 answer

Why does this gl_FragDepth calculation work?

I am raytracing in GLSL. My gl_FragDepth calculation wasn't right, so I did some hunting and found this solution (P is the world-space coordinate of the pixel and pv is proj*view): vec4 Pclip = pv * vec4 (P, 1); float ndc_depth = Pclip.z /…
spraff
  • 289
  • 3
  • 6
5
votes
1 answer

Reduce kd-tree's nodes' bounding box sizes to their shapes' extents?

I've implemented a ray tracer that uses kd-trees for acceleration. To help debug kd-tree construction, I also created a crude OpenGL view of the same scene that shows the axis-aligned bounding boxes (AABBs) for each node in the tree (along with the…
5
votes
1 answer

why is translating in 3D space the same as shearing in 4D space?

I was reading "3D Math Primer for Computer Graphics and Game Development" and there was something the author had said that I thought was particularly interesting, he stated It is important to understand that this matrix multiplication is still a …
MatriXcel
  • 51
  • 1
5
votes
1 answer

Why sending data from gpu to cpu is slower than cpu to gpu?

Why sending data from gpu to cpu is slower than cpu to gpu? I heard the relation is similar to network situation, in detail, the upload is slower than download. However, I could not understand the meaning. In my opinion, the sending operation…
shashack
  • 523
  • 4
  • 13
5
votes
1 answer

Unable to render a Waveront model in WebGL2

I am following the WebGL2Fundametals tutorial. Using some sample (cube) data I was able to successfully call gl.drawElements(); using index, normal and geometry data. This are my fragment and vertex shaders: Fragment shader: #version 300 es …
チーズパン
  • 27
  • 2
  • 14
5
votes
1 answer

Do stencil tests use any acceleration techniques?

Stencil bits are often used for optimizations, for instance having full screen lighting passes only affect certain pixels. Does the stencil test mechanism use any acceleration structures of any kind (like maybe dividing the screen into a coarser…
Alan Wolfe
  • 7,801
  • 3
  • 30
  • 76
5
votes
3 answers

Rounding corners of polygon given vertices of its corners

Given a polygon (regular or irregular, convex or concave), I want to round its corner, with a given radius; let's say 'x'. I have the code to draw an arc given 2 points, but how can I find the start and end points of the arc? All I have is a list of…
user3453636
  • 105
  • 4
5
votes
1 answer

Threads per compute shader group

The maximum allowed number of threads per compute shader group is 1024 for Shader Model 5.0. Is it advisable with regard to performance to stay close to this maximum number? In order to resolve SSAA and MSAA (down-scaling with appropriate tone…
Matthias
  • 1,074
  • 9
  • 25
5
votes
2 answers

Is there ever a time when I should *not* use the GL* types?

If I am writing my own function to check shader compile errors, or do anything that interacts with the OpenGL API but ultimately returns as a result of my application code, should I use the C++ void or GLvoid? I.E. GLvoid…
Startec
  • 781
  • 6
  • 19
5
votes
3 answers

How to modify Perlin (not simplex) noise to create continental like terrain generation

I have been playing around for a day with Perlin noise, and I am currently stuck. Most of the modifications I have made to the algorithm produce more or less the following: Now, this is a very good start, but the idea is to generate terrain similar…
Makogan
  • 1,706
  • 12
  • 28
5
votes
1 answer

The mathematics of two dimensional interpolation on a quad

I am trying to wrap my head around how exactly the GPU interpolates texture coords on a quad. I realize to the GPU a quad is two triangles but I find thinking in terms of the whole quad to be easiest. If we define texture space as the texture…
J.Doe
  • 1,445
  • 12
  • 23
5
votes
1 answer

Rounding the edges in a mitered line segment inside of a fragment shader

As some of you may know drawing line segments between sets of points is really difficult especially when you want wide lines or variable widths. Because I am looking to draw a few hundred of these line segments each frame I am having to go with the…
J.Doe
  • 1,445
  • 12
  • 23