Most Popular
1500 questions
6
votes
0 answers
OpenGL texelFetch causes black stripes
THE SHORT VERSION
In my fragment shader I'm reading (using texelFetch) multiple times the same texel from a texture (created by another fragment shader) and write it to the output render buffer. After a few read operations on the texel a fault…
Christian_B
- 313
- 1
- 8
6
votes
1 answer
Mix shader looks wrong on my path tracer
I apologize if my methods seem way off because this is my first time trying to build a path tracer and I'm struggling quite a bit. Currently, I am trying to mimic the "mix shader" node in Blender 3D that combines two different shaders. I would like…
Henry Bergin
- 409
- 2
- 9
6
votes
2 answers
Is there a way to draw spherical objects without triangles?
It seems that in all existing graphics libraries, 3D objects are always described in terms of triangles. Drawing triangles can be implemented very efficiently on video hardware and since any 3D object can be approximated with triangles, triangles…
martinkunev
- 163
- 4
6
votes
3 answers
Display that supports full CIE xyY color space
Right now, all current monitors use three (or four) primary colors to create their color, which could never allow them to produce all colors that can be seen by the human eye; in fact, their colors will always be inside a triangle on the xyY diagram…
d9584
- 61
- 4
6
votes
1 answer
B-Spline patches on the tessellation shader. How to get the control points
I have a polygonal mesh with ngons in it. I want to make a tessellation shader to which I send only the regular quads in such a way that it can construct a B-Spline surfaces across it. I came across the useful tutorial, but I do not completely…
Slugger
- 201
- 1
- 2
6
votes
1 answer
Why is there so many macros in OpenGL?
I would just like to know why are there so many things defined as macros that point to memory addresses in OpenGL?
I see them all over the place. For example when I go to choose parameters for a function such as glDrawArrays(), I have to choose a…
mbl
- 291
- 1
- 8
6
votes
1 answer
Signed distance field font looks odd
I attempted to implement font rendering using signed distance fields.
My program first generates a mono bitmap at font size 64 (using FreeType), then generates an SDF from the bitmap. This is then uploaded into a texture atlas.
The results are not…
timedt
- 163
- 4
6
votes
2 answers
Method for rendering heightmap from a 3D scene
I am looking for a method of rendering a heightmap from a 3D scene. The scene may consist of a terrain which is in turn generated from another heightmap, but will also have regular 3D objects.
The generated heightmap should, so to speak, indicate…
user5314
- 63
- 3
6
votes
1 answer
Depth of Field in Path Tracing: What do I do with the secondary ray?
How can I implement Depth of Field in my Path Tracer? I have read this article which explains the theory behind everything & I already have a good understanding of what this effect needs to achieve based on previous experience with a DSLR but I am a…
Arjan Singh
- 2,511
- 3
- 22
- 38
6
votes
1 answer
UV Coordinate Interpolation in Compute Shader
I am trying to get the screen space position of each pixel in a texture on a mesh and write it into a texture. I was hoping to use a compute shader to do this:
#pragma kernel CSMain
struct VertexData
{
float4 v_point;
float2 uv;
…
Giles Ruscoe
- 61
- 1
- 2
6
votes
0 answers
Form Factors confusion in Radiosity papers
I feel a bit confused about the use of $F_{ij}$ and $F_{ji}$ in Radiosity papers. $F_{ij}$ should be the fraction of energy leaving patch $i$ that arrives at patch $j$.
If you take the original radiosity paper ("Modeling the Interaction of Light…
cesss
- 161
- 1
6
votes
2 answers
How to translate object to origin?
I want to rotate a 3D object. On this website http://paulbourke.net/geometry/rotate/
the first step says:
(1) translate space so that the rotation axis passes through the origin
What is meant by "space"? Is it every point on my object? If so, the…
S.A
- 317
- 3
- 14
6
votes
1 answer
Is colorized subpixel rendering possible?
Subpixel rendering is used most commonly to anti alias fonts. It works by leveraging the physical layout of the color components of a display to give geometry details to an image that are smaller than a pixel.
For instance, this font has a height of…
Alan Wolfe
- 7,801
- 3
- 30
- 76
6
votes
2 answers
How can I improve the performance of my custom Global Illumination approach?
I want to experiment with some new stuff about modern rendering techniques and in that way I'm trying to implement a custom GI (somewhere between pathtracing and instant radiosity).
My scene is a bit less than 1,000,000 tris and my algorithm…
newin
- 363
- 2
- 7
6
votes
1 answer
Derivation of Wikipedia's path tracing diffuse BRDF
Wikipedia's path tracing algorithm has the following line for the diffuse BRDF:
Color BRDF = 2 * m.reflectance * cos_theta;
I'm a little confused as I've been reading that Lambertian surface BRDF is $\frac{\rho}{\pi}$ where $\rho$ is the…
PeteUK
- 700
- 5
- 13