Most Popular

1500 questions
3
votes
1 answer

Advantages of spherical harmonics over baked vertex lighting?

My question is about spherical harmonic lightning, in the context of computing the coefficients with an expensive GI algorithm and passing them to the vertex shader Another way is to just use an expensive GI algorithm to compute vertex colors and…
vuoriov4
  • 67
  • 5
3
votes
1 answer

Replacing Vertex Attributes (glBufferData vs glBufferSubData)

I'm sending a large number of data to the vertex shader. I use glBufferData to generate my VBO. Later on I have to replace the data in my VBO so I do the following: glBindVertexArray(VAO); glBindBuffer(GL_ARRAY_BUFFER,…
Archmede
  • 481
  • 2
  • 7
  • 21
3
votes
1 answer

What mechanisms are being used by Directx12 and Vulkan APIs in order to communicate with graphic card drivers internally?

I am trying and learning to develop a low level graphics API. I want to know, how do modern graphics APIs manage to communicate with graphic card drivers (to tackle GPU) so efficiently and in an optimized manner? Which technologies should I…
3
votes
1 answer

Any way to fake textureLod on GLES2?

I've been having nightmares at work this week trying to get Unity's Standard shader, and my own custom car paint shader modded from it, to look good on Android. The most obvious problem was fractured specular highlights, which I identified as a…
russ
  • 2,392
  • 9
  • 18
3
votes
1 answer

How to smooth out a voxel grid?

So I am facing the following issue. Say I have a minecraft like mesh (i.e I have a bunch of cubes on top of one another). I wish to smooth out this mesh in such a way that only the regions where there are edges are smoothed out and such that the…
Makogan
  • 1,706
  • 12
  • 28
3
votes
1 answer

Paper for the approximation formula provided by Brian Karis

In these slides, specifically page 11, the following formula is reported: $$ \frac{1}{N} \sum_{k=1}^N \frac{L_i(l_k)f(l_k,v)\cos(\theta_{l_k})}{p(l_k,v)} \approx \left( \frac{1}{N} \sum_{k=1}^N L_i(l_k) \right) \left( \frac{1}{N} \sum_{k=1}^N …
user8469759
  • 556
  • 1
  • 6
  • 17
3
votes
2 answers

How to generate chaotic halftone pattern?

I'm trying to generate a random halftone like below image: this is a simple halftone that I tried, but I need a random halftone float PI = 3.14159265359; void mainImage(out vec4 fragColor, in vec2 fragCoord) { vec2 p = (fragCoord.xy /…
3
votes
2 answers

AABB bounding boxes

Here's a constructor to construct a axis-aligned bounding box given two opposite vertices on the bounding box, from Pharr's Physically Based Rendering, Third Edition. BBox(const Point &p1, const Point &p2) { pMin = Point(min(p1.x, p2.x),…
user8277998
  • 215
  • 1
  • 2
  • 5
3
votes
2 answers

Getting rid of branching to check if a variable is within a range in GLSL

I have this GLSL function that I am trying to optimize because it is going to be ran on many pixels of an older devices GPU. There is no room for branching inefficiency. Essentially this function returns a 0 or a 1 based on the variables actualY…
J.Doe
  • 1,445
  • 12
  • 23
3
votes
1 answer

Rounding a corner formed by Arc and Line

Given shapes like these, which contain just Arcs and lines, I want to round all its corners with certain radius. I know the vertices of the lines & arcs these shapes. I can round the corners of a polygon (when two lines meet to form a corner), but…
user3453636
  • 105
  • 4
3
votes
1 answer

Video-games; Rendering textures on scope zoom-in. Texture compression problem?

This is general question. In the multitude of video-games that are not specialized in scoped warfare (like Sniper Elite), I've noticed that when you zoom in with a scope, the textures and normal maps won't "update". You're standing on coordinate…
Dominik Car
  • 133
  • 5
3
votes
2 answers

Accurately printed CIE diagram

This is more just for curiosity rather than actually wanting to get one, but is there a place where I could buy a printed version of the CIE xy colour space diagram which accurately recreates all of the visible colours outside of the regular…
Chuck
  • 296
  • 2
  • 6
3
votes
1 answer

Primary ray directions (MC Path tracer)

Do primary rays conform to the frustum? If they're randomly directed, is the randomness fitted to some distribution (as it would be for a diffuse BRDF? I'm building my existing raymarcher into a monte carlo path tracer and I'm really unsure about…
Paul Ferris
  • 447
  • 2
  • 11
3
votes
0 answers

Sinc interpolation and Ideal reconstruction example

I am trying to apply sinc interpolation on this data set. The patches in the left image is a snapshot of AutoCAD 3d faces. Lux values are calculated for centre of each patch that are in 0.3m x 0.3m dimension. The middle is a bitmap image of the…
ali
  • 740
  • 4
  • 14
3
votes
1 answer

Simple Intersection Algorithm for Ray and 3D Bézier Curves of Varying Thickness

I'm trying to get an algorithm for intersecting a "tube" (a 3D cubic Bézier curve extruded by a possibly-changing radius) with the following required properties: Computes intersections of ray and a 3D cubic Bézier curve. Must not become confused,…
geometrian
  • 1,980
  • 13
  • 26