Most Popular
1500 questions
3
votes
2 answers
What is the best practice for data in a VBO?
To start, this is my VBO Data Struct:
//-----------------------------------------------------------------
struct Vertex
//-----------------------------------------------------------------
{
…

BadSnowflake
- 133
- 4
3
votes
1 answer
Jos Stam's "Stable Fluids" boundary conditions
In the paper Stable Fluids by Jos Stam, I am confused about the boundaries in the set_bnd function in the code. I don't know what kind of boundaries is this. Is it Neumann boundary condition or Dirichlet boundaries?
Here is the set_bnd function;…

Anas Alaa
- 85
- 6
3
votes
1 answer
Need help reasoning about video oscillation >60hz
I want to make a basic video oscillator for the web. What I want to do is basically illustrated in a tutorial for Lumen: essentially, I want to define an oscillator to turn on and off a color signal at a given frequency. This is simple to do for a…

stackptr
- 31
- 2
3
votes
1 answer
Image regeneration with nearest neighbor search
So what I would like to achieve is this:
User submits Image 1 - this image is then broken down into X by X sized blocks
User submits Image 2 - then the program/algorithm takes all the blocks generated in the above step, and reconstructs Image 2…

Joel Damien
- 131
- 3
3
votes
0 answers
Problem with specular BRDF (Monte Carlo & Path Tracing)
Above on the left is my attempt and on the right is what I'm aiming for.As you can see my sphere with the specular brdf has a weird dark ring
In my radiance function I am recursing through the intersected objects with the next intersection from…

Aloof
- 31
- 2
3
votes
1 answer
WebGL: Why are my textures black?
I am trying to write a simple WebGL script to display a pyramid with a brick texture and Phong lighting. The lighting works fine but when I incorporate the texture, the pyramid turns black. I've checked and set my parameters to use with power-of-two…

mago3421
- 71
- 1
- 4
3
votes
1 answer
Phong shading in OpenGL: line of light from the center of the world
I implemented a Phong shader in GLSL, but there is a bug.
What you are (supposed) to see down below:
A point light source rotating around the center of the world,
with a radiance of (0, 100, 0)
A textured quad with kd of (1, 0, 0).
The problem…

Tudvari
- 313
- 1
- 3
- 13
3
votes
2 answers
Send Texture to Shader
I've been following the LearnOpenGL tutorials and I've come across a piece of code I don't understand.
glUniform1i(glGetUniformLocation(ShaderID, "textureVar"), 0);
In the above code ShaderID is a GLuint which references a shader.
textureVar is a…

Archmede
- 481
- 2
- 7
- 21
3
votes
1 answer
Tracing shadow rays in a scene with mirrors
In my real time ray tracer, I shoot primary rays from the eye, and at hit points, I trace to a single light source to determine if the object is shadowed or lit.
Pretty straightforward stuff so far.
However I have recently added perfect mirrors to…

Bram
- 270
- 1
- 5
3
votes
1 answer
Visualize the output of a Trowbridge-Reitz Half Vector Sampling Function
I am attempting to visualize the raw output from PBRT's half-vector sampling function, based on the trowbridge-reitz distribution. I'm isolating only the distribution and the associated functions necessary to sample it.
The function is based on…

Steve
- 73
- 5
3
votes
3 answers
What is name for far lowcontrast blueish landspace?
What is the name of effect, that we see on far objects in outdoors ? These objects are low-contrast, foggy ? Is it only fog or some scattering ?

Piotrek
- 31
- 1
3
votes
1 answer
Russian Roulette - Maximum call stack size exceeded
I am trying to write my own path tracer in JavaScript, but I have a problem with the implementation of russian roulette. First, let me describe how my path tracer works.
I have a function called traceRay where I am looking for ray-objects…

vendrick
- 33
- 6
3
votes
1 answer
How to use Monotone cubic interpolation in 3D?
I wanted to use Monotone cubic interpolation, but the site only provide explanation for 2D case. How can I extend it to 3D?

Bla...
- 481
- 4
- 12
3
votes
1 answer
Can draw.io type flowcharts be programmed?
I made this flowchart with draw.io:
It was the first chart I made so it took me a while to make it. I need to be able to dynamically generate variations of this diagram programmatically. I wold need to do things like change the colours of the human…

John Slotsky
- 31
- 2
3
votes
0 answers
Replace a chain of image blurs with one blur
In this question I asked how to implement a chain of blurs in one single step.
Then I found out from the gaussian blur page of Wikipedia that:
Applying multiple, successive gaussian blurs to an image has the same
effect as applying a single,…

user6321
- 131
- 2