Most Popular

1500 questions
4
votes
1 answer

What Are The Default Values of `glReadBuffer/glDrawBuffer(s)` for an FBO?

glReadBuffer(...)/glDrawBuffer(...)/glDrawBuffers(...) access part of a framebuffer's state. For reading the default framebuffer, this is GL_FRONT or GL_BACK. However, the documentation doesn't say what it is for FBOs. The only thing I found was…
geometrian
  • 1,980
  • 13
  • 26
4
votes
1 answer

Weird rendering in rectangle mesh shader AKA Why has my basic shader become a modern art generator?

I am trying to translate an old (2013) bit of code from Apple from objective C to Swift with some modifications I need for my simulation. The code I am translating can be found here To make translation easier I have broken the simulation into parts.…
J.Doe
  • 1,445
  • 12
  • 23
4
votes
1 answer

What other paradigms exist besides vector/fragment/transform graphics programming?

I am familiar with the basic concepts of writing vector and fragment shaders while using linear transformation matrices to describe orientations in 3D space. But, what other paradigms exist (theoretical or not)?
trusktr
  • 255
  • 1
  • 6
4
votes
2 answers

File format for swept profile with changing normal

I have to create a file describing a 3d surface with the following properties: a circular arc cross section is swept along a closed 2d curve spine defined with equations the normal direction of the arc is not always tangential to the spine, the…
Tawhiri
  • 39
  • 5
4
votes
1 answer

Is it better to blur the input or output of an edge detection shader for noise reduction?

To reduce noise of edge detection the norm seems like it is to apply a blur. However, is it generally better to apply the blur to the input of the edge detection. The input in my case being the depth and normal GBuffers in which I compare…
Syntac_
  • 561
  • 4
  • 9
4
votes
1 answer

What are the fConstX in Spherical Harmonics?

At page (slide in reality) 12/20 of this tutorial it is shown a function used to project lights into SH coefficients, however the value of those coefficients is not given, what are their values and what they are for? Do I have to clamp colors to max…
4
votes
1 answer

draw a chord in three.js as in d3.js

I'm starting to learn three.js and want to create a chord diagram as possible in d3.js, but from ground up. I've created a scene and have circle segments on xz axes. But I got stuck on the chords. I looked up d3.js code (path+quadratic curve) but…
4
votes
1 answer

DLT algorithm (4+ points) not working, what's missing?

I'm doing a direct implementation of DLT algorithm but I can't figure out why, at the end the matrix H I get doesn't (even remotely) produce x2 = H*x1 The algorithm is not that complicated so I can't see what I'm missing at this stage. %%point…
Kronephon
  • 243
  • 1
  • 6
4
votes
1 answer

Compute shader not updating buffer, or vertex buffer unable to read the updates

I'm learning OpenGL compute shaders and following this guy's code, and I have stuff drawing, but not updating. The particles are spread out in their starting positions, but they stay there. Particle manager initialization void…
John Cox
  • 161
  • 3
4
votes
1 answer

How can you interpolate over an array of say 5 colors?

I have an array of color values. I have an interpolating parameter, t, which varies from 0 to 1. I can't for the life of me figure out how to smoothly interpolate between these color values based on t, such that I get a smooth blended color for any…
lokstok
  • 43
  • 2
4
votes
1 answer

Pixel packed texture source

I am grabbing video from a web cam using Microsoft Media Foundation. The image data is in YUY2 format. The pixels are packed in a 4:2:2 ratio. The color format is YCbCr. The color data gets repeated 2x. Ex the packed pixel data is: y0 u y1 v Gets…
001
  • 165
  • 4
4
votes
1 answer

get partial view points from 3d surface mesh

I have a 3d surface mesh. Say the camera is located in some points and I want to get the visible points from the 3d surface mesh from the camera view. I believe this kind of process would be done before 3d rendering in graphics. I want to know how…
taeyoon
  • 41
  • 1
4
votes
1 answer

Rendering same vertex-array in different modes

here is my vertex array I am using: vertices = [ -1.0, 1.0, 0.0, 0.0, 1.0, 0.0, -0.5, 1.0, 0.0, 0.5, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 0.5, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.0, -0.5, 0.5, 0.0, …
チーズパン
  • 27
  • 2
  • 14
4
votes
2 answers

Combination of Triangles and Quads in a mesh

Is it topological correct to combine triangles with quads to form a mesh. If not, why?
user55844
  • 43
  • 3
4
votes
1 answer

exact down sampling and re-triangulation of mesh data(non-convex)

I have a human body 'surface' mesh data.: triangular mesh (vertices, face) What I want to get from this is 'exact-down-sampled' version of the current mesh. Which means.. the processed output mesh should have the vertices that all belong to the…
taeyoon
  • 41
  • 1