Most Popular
1500 questions
9
votes
1 answer
Shader uniform performance
I'd like to know if there's any performance impact based on how I struct my shader uniforms. For instance, is passing 4 floats worse than passing a single vec4?
Felipe Lira
- 1,246
- 1
- 11
- 16
9
votes
2 answers
Is there a way to achieve the look of a distant flock or shoal without full simulation?
Although simulation models like Boids give good results for bird flocks or fish shoals on a small scale, simulating every single member in real time becomes unrealistic for huge numbers. Is there a way I can model a flock in the distance where only…
trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
9
votes
1 answer
Writing to a compressed texture using a compute shader, with no extra copies
I'm trying to figure out what the best way is to generate an OpenGL texture using a compute shader. So far, I've read that pixel buffer objects are good for non-blocking CPU -> GPU transfers, and that compute shaders are capable of reading and…
Mokosha
- 1,144
- 7
- 23
9
votes
1 answer
Is there an established method of approximating dust distribution on surfaces?
Intuitively, dust settles onto surfaces at a higher rate in areas where the air flow is slower. This means instead of a surface gathering an even layer of dust, there will be more in corners - corners of a room/shelf, corners formed by the placement…
trichoplax is on Codidact now
- 6,292
- 3
- 23
- 69
9
votes
1 answer
How to get started writing a low-level GPU profiler?
I have been studying hardware corporation GPU profilers in recent days (Qualcomm, PowerVR, Intel). I've noticed that these tools seem to give more low-level details than the GPU profilers I have used in the past -- XCode's OpenGL ES frame capture…
user3412
9
votes
5 answers
Why does the 1/r² term appear with point sources?
I'm currently reading some books on radiometry. They mention that radiance is constant along a ray. It doesn't change with distance.
However, I've seen some raytracer and they put the 1/r² factor when they deal with point sources. I don't get why. I…
Livetrack
- 169
- 4
9
votes
1 answer
How does the rendering equation incorporate shadowing
This is how the rendering equation is written in the textbook
$$L(p,\omega) = L_e(p,\omega) + \int f(p,\omega_i,\omega) \, L(p*,-\omega_i)\cos \theta \, d\omega_i$$
which component of this equation handles the shadowing?
user2976568
- 157
- 4
9
votes
1 answer
Find the longest straight line between two points on surface of polygon
My shape is a slightly concave polygon, and I'd like to know the maximal diameter. I imagine a straight line between two points on the surface of the polygon, such that the line does not pass outside the polygon.
Is there a general algorithm for…
jiggunjer
- 191
- 3
9
votes
1 answer
Moving each point of a surface in direction of corresponding normal
So let assume that I have some convex smooth and unclosed surface.
I'm moving each point of it in a normal direction by some constant factor (This factor is same for all points on surface).
Can I replace this operation by Uniform or Non-uniform…
Ibraim Ganiev
- 393
- 1
- 5
9
votes
3 answers
Color space of MERL BRDF database?
I know that by now it might be considered as a kind of sad recurrent joke, but by chance, does anyone here has the least information about the colorspace of RGB values in the MERL BRDF measurement database ?
Fabrice NEYRET
- 1,266
- 8
- 14
9
votes
0 answers
3D mesh segmentation simple algorithm
I am developing the algorithm reported in this article:
Least square conformal mapping.
Here is presented an algorithm to flat a 3d mesh on the parametric space, but i don't understand the segmentation step.
Does anyone know an alternative…
Mugna
- 91
- 2
9
votes
2 answers
How to create a patterned object with variable pattern density in real-time?
Assume there is some value p, calculated per-frame, that varies continuously over the surface of an object. The value of p determines the density of some pattern on the surface. For example, in a case with only two possible densities if p < 0.3 it…
Ryan
- 201
- 1
- 5
9
votes
1 answer
How should I fill a shape consisting of Bezier curves and straight lines?
I have been working on a graphics library for some time now and have gotten to the point where I have to draw Bezier and line based fonts. Up to this point I am stuck with this:
The green lines are the Bezier paths, and the white part is what gets…
Creator
- 93
- 5
9
votes
3 answers
How does a computer upscale 1024x768 resolution to 1920x1080?
Without there being black bars I mean. 1080 isn't any multiple of 768 so is there some sort of data loss?
V0ight
- 91
- 2
9
votes
2 answers
Archimedean spiral in C++
Im trying to plot the x and y positions of an Archimedean spiral in C++.
So far I've been trying something like this, but no luck:
int dx = 0;
int dy = 0;
int x = 0;
int y = 0;
for (int i = 0; i < maxPoints; i++)
{
dx = sin(i * PI / 2);
dy…
David
- 303
- 2
- 9