Most Popular
1500 questions
3
votes
1 answer
OpenGL task/mesh shader extension NV_mesh_shader not behaving as I expected
I am trying to get up to speed with the NV_mesh_shader extension from NVidia (on my RTX2080). Samples are rare, so I tried to come up with my own small sample.
I am rendering a sphere (20 triangles) using an index buffer and a vertex buffer. I can…
pettersson
- 171
- 4
3
votes
1 answer
Math for adaptive supersampling for raytracing
How do I determine how many (jittered) rays to trace for a given pixel, as a function of the statistics of a small initial set of test rays? Also, what size should the initial set be? (it's currently 20, based on eyeball tests)
Currently I'm…
Octa9on
- 131
- 4
3
votes
0 answers
volume raymarching - aligning sample coords with the 3d texture
I'm implementing a volume raymarcher and the unlit basic version seems to be working fine. This article helped a ton grokking the view-to-volume-space transform: http://www.lebarba.com
However, it quickly gets ugly when reducing the ray step count…
Jakob
- 131
- 2
3
votes
1 answer
Shader that transforms a mercator projection to equirectangular?
I am new in the OpenGL - GLSL and trying to make a shader that taking a mercator projection texture as a source and converting it to an equirectangular projection texture.
Sample input: (1024x1024)
Desired output (1024x512)
I found this question,…
Hamid Reza Mohammadi
- 161
- 8
3
votes
0 answers
How to properly combine diffuse and rough specular BRDFs in a path tracer
Looking around here on various sources (including related questions on this site), if my understanding is correct, when implementing a path tracer with a material which has both a diffuse term and a specular term, we can randomly choose whether to…
yggdrasil
- 145
- 4
3
votes
2 answers
Coloring arbitrary closed regions
I'm trying to implement the following paper in modern OpenGL
http://web.media.mit.edu/~lieber/Publications/Coloring-Book.pdf
The issue is that the algorithm described requires you to consider interior points in an orderly fashion -- horizontally…
root
- 33
- 4
3
votes
1 answer
Interpolation in Graphics Pipeline
I am trying to program my own version of WEBGL graphics pipeline in python, however, I am confused as to where the color interpolation takes place in the pipeline. According to my research, it happens after the rasterizer has calculated the points…
Anisa
- 41
- 2
3
votes
0 answers
Understanding BRDF sampling
I'm trying to understand BRDF importance sampling following the exemples of the lambertian/diffuse model and the reciprocal Phong model.
I would like to be able to extend the principle to other models. If you know good ressources on the subject…
kipgon
- 151
- 2
3
votes
1 answer
Does WebGL 2 support linear depth texture sampling?
With WebGL 1 we can use WEBGL_draw_buffers extension which lets us use a texture as the depth attachment on the frame buffer.
And we can chose to use LINEAR or NEAREST as the filtering…
zoran404
- 153
- 9
3
votes
1 answer
SDF rendering for large world
There are lots of cool things you can do with SDFs to render implicit surfaces. Most of the examples I've seen have been “all in the shader”, where the entire distance function is encoded in the shader source…
jwd
- 133
- 5
3
votes
1 answer
glBindImageTexture returning INVALID_VALUE
I am currently having an issue with OpenGL as I am trying to load some vector information into a 3D texture. Currently, I am developing in OpenGL 4.6 which should support Image bindings.
this my code to bind the texture to an image:…
Sachin Chopra
- 31
- 1
3
votes
0 answers
Upscaling screenshots with subpixel rendered text
Upscaling a screenshot with subpixel antialiased text produces unpleasant color fringes, e.g. why does black text have orange and blue pixels This is especially annoying when trying to show an application on a projector, when you have to zoom in…
Kristóf Marussy
- 131
- 1
3
votes
1 answer
How do people come up with subdivision schemes?
Be it chaikin subdivision, loop subdivision, catmull-clark subdivision...
How do people come up with the coefficients for an arbitrary subdivision scheme?
Makogan
- 1,706
- 12
- 28
3
votes
1 answer
How to subdivide faces with a half edge DS?
Assume we have a mesh represented as a half edge datastructure.
We want to subdivide faces without introducing unnecessary vertices (i.e the new number of vertices must be exactly V + E where V is the old number of vertices and E is the old number…
Makogan
- 1,706
- 12
- 28
3
votes
2 answers
Need a fast ray-box intersection that handles if a ray is parallel and in line with a plane of the box
I've seen lots of spins on the ray-box intersection test, and a lot of them seem to boil down to this code: (omitting some details here)
invRay.x = 1.0 / ray.x;
tx1 = (box.min.x - rayOrigin.x) * invRay.x;
tx2 = (box.max.x - rayOrigin.x) *…
Tyler Shellberg
- 203
- 1
- 10