Most Popular

1500 questions
4
votes
1 answer

How does MSAA performance scale?

I'm finding myself increasingly interested in rendering techniques utilizing multisampling for anti-aliasing (obviously), out-of-order transparency, volumes etc. Searching the web for performance numbers of MSAA in the range only gets me to gamer…
Andreas
  • 359
  • 1
  • 9
4
votes
1 answer

Generating and Combining Spectral Colors

I have two somewhat related questions to ask: What is the most accurate way to get the colors of a spectrum, without having to go deep into physics and simulating the universe? ;) Right now, I'm using these color matching functions, and simply…
Daniel Kareh
  • 577
  • 3
  • 11
4
votes
1 answer

OpenGL: Why glTextureSubImage2D crashes?

I'm trying to create single-channel (no mipmaps) texture initialized with my custom pixel data, but it crashes on glTextureSubImage2D. Any idea why? const std::vector myData(1025 * 1025, 0); GLuint texture; glCreateTextures(GL_TEXTURE_2D,…
regnar
  • 41
  • 1
4
votes
1 answer

unwanted patterns in simplex noise

I want to create a "river biome" where there are rivers cutting to a flat land mass, to start I wrote a little js to generate a random height map (with simplex noise) but that's where I'm stuck. this is what it generates: as you can see there are…
Sam Apostel
  • 141
  • 3
4
votes
2 answers

How does ID3D12Resource::Map work?

How does Map() work? I would guess that it allocates memory to fit the resource size (or a range of it), but when are the bytes sent to the GPU?
Derag
  • 596
  • 3
  • 13
4
votes
2 answers

Does a gaussian blur based bloom/glow shader require gamma correction? Any other tips?

Hello I have a simple application with some bright 2d mono-color shapes I am hoping to make appear emissive with a nice glow around them. To do that I am producing multiple gaussian blurs of varying kernels and resolutions and adding them all…
J.Doe
  • 1,445
  • 12
  • 23
4
votes
1 answer

How do you deal with clipping when rendering to a limited colorspace?

In my naïve raytracer experiment I work internally with RGB values, and after all the tracing has been done, I end up with raw RGB triplets that I need to write down to some image format with a limited gamut, typically sRGB. Since bright spots in my…
pipe
  • 141
  • 3
4
votes
1 answer

Clipping for perspective projection

In the following two graphs, the red lines are borders of the perspective-projection frustum, the blue lines are to be rasterized, the green lines are perspective-projection lines, which are wrong. How do modern GPU pipelines do such clipping…
chaosink
  • 591
  • 1
  • 4
  • 15
4
votes
1 answer

Directional Light ViewSpace Calculation

I am a bit confused in terms of directional light calculation in OpenGL. Generally we care about the direction of the directional light and we use it with the normal and view (toCamera) vector to calculate lighting. Let's say I do my calculation in…
ChaoSXDemon
  • 153
  • 5
4
votes
1 answer

How to calculate curvature of isoline of image

I've got a discrete grayscale image (a.k.a. 2D rectangular array of floats). Its continuous representation (whether received via reconstruction with sinc, with a cubic kernel, with a triangle kernel...) is a continous 2D function, so it has…
Stefan Monov
  • 191
  • 6
4
votes
0 answers

Color of the Sky

What is the color of the sky depending on the time? I'm looking for a set of colors (HTML-Code), the sky has during sunrise, morning, forenoon, noon, afternoon, evening and sunset. A formula to calculate the color would be awesome.
dudas
  • 141
  • 1
4
votes
1 answer

Roughness Remapping

I have been recently exploring physically-based rendering (PBR), but there is one part that still confuses me. I don't quite get roughness remapping, as described in the PBR section on Learn OpenGL. Specifically, scroll down until you find Geometry…
Daniel Kareh
  • 577
  • 3
  • 11
4
votes
1 answer

Why does an affine transform work only on three of the corners?

I am trying to use a linear transformation to straighten out the camera angle on this image: In other words, I want to transform the image into a head-on view of the whiteboard. I applied an affine transformation to that image, identifying the top…
4
votes
1 answer

Vertices of a regular polygon given the incircle radius

How can I find the vertices of a polygon (specifically hexagon) given the radius of the incircle? I want to calculate the vertices of a polygon given the face-to-face distance (inscribed circle diameter?) I've below code to calculate the vertices…
user7413
  • 143
  • 3
4
votes
1 answer

If I have an nVidia graphics card on Linux, do I need Mesa or FreeGLUT or anything like that?

The wiki says the following about using OpenGL on Linux: Most Linux distributions rely on the Mesa3D project to provide their OpenGL implementation But it also says: OpenGL is included in drivers, so you'll have to make sure drivers are properly…
Startec
  • 781
  • 6
  • 19