All Questions
3,963
questions
0
votes
1
answer
13
views
viewing direction vectors are not parallel in orthographic projection
I did some math with orthographic projection matrix to compute viewing direction vectors in screen space.
I thought all viewing direction vectors should be parallel in orthographic projection because, ...
0
votes
0
answers
27
views
Ray Tracing in Camera-World Space
I am trying to implement rendering in "Camera-World" space following PBRT-V4's camera implementation in my Rust ray tracer. I Have been trying to solve that for days
I read these multiple ...
0
votes
0
answers
11
views
Different basis from spherical harmonics to represent light?
There's a lot of research being done in 3D shape analysis when it comes to PDE methods. Recently I've been reading quite a bit of literature on this subject and recent trends in this subject propose ...
1
vote
0
answers
10
views
Alpha calculation for anti aliased line
Seems like there are two techniques
Interpolation: Interpolate the minimum distance from the canter of the pixel to the line.
...
0
votes
0
answers
28
views
Confusion about different sampling strategies in Monte Carlo Path Tracing
I am studying Monte Carlo Path Tracing from different sources. However, I have some confusion about the sampling part and dare to post here for experts' ...
3
votes
0
answers
40
views
Profile GPU performance in Direct3D 11
I'm trying to profile a d3d11 application using queries (pretty much exactly as described here).
I noticed something strange with the data I was getting from the queries and I think I managed to ...
0
votes
3
answers
42
views
Texture coordinates
Consider the square shown below on the left, which has been textured with the image shown on the right. What are the texture coordinates of the vertices a, b, c, and d?
Does anyone know how to answer ...
0
votes
2
answers
65
views
Geometry Shader Not Working
So I seem to have some trouble getting a geometry shader working with "glDrawArrays(GL_LINE_STRIP, 0, 4);". When I omit the geometry shader and make some minor variable changes, the vertex ...
0
votes
1
answer
44
views
Raycasting wall slice height issue
I am having an issue with wall heights in my 2D raycasting playground I made for practice.
Problem
Test code in P5.js editor: https://editor.p5js.org/tomekp/sketches/6fKPIAHNx (WASD to move, Left/...
0
votes
1
answer
47
views
Gregory triangle patch, calculating $b_{i,j,k}$
I am trying to implement the Triangular Gregory patch from this paper.
The goal is to create a $G^1$ continuity across the patch boundaries. So that the normal vectors of neighboring triangles are ...
0
votes
0
answers
24
views
Issues understanding rotations exported from Blender to gltf
I am trying to write a raytracer in Rust that is able to load a .gltf file and render it. To do this I model a scene in Blende, export it to gltf (y up) and use my renderer to render the scene.
The ...
1
vote
1
answer
65
views
Convert between screen and world coordinates in isometric 3D
I'm working on a a simple 3D scene in WebGL. The purpose is to:
Implement an isometric viewing angle in orthographic 3D
Translate between XY screen coordinates and XY world coordinates
Codepen: ...
1
vote
1
answer
174
views
Nomenclature: Other word for non-closed polygon?
In Wikipedia, a polygon is defined as a closed polygonal chain. In other words, the term "polygon" implies that the curve is closed.
My question is: Is it common to refer to non-closed, ...
-1
votes
0
answers
43
views
How can I change the dpi of an image?
I tried this site to change the dpi of an image, but it didn't really change anything, based on the size of the image and the image properties displayed when I opened the "converted" image ...
2
votes
1
answer
57
views
Raymarching Refraction
I'm sorry if this question is imprecise, or violates any guidelines. This is my first post on Stack Exchange, so any feedback is welcome.
I am working on a ray-marcher in my spare time, which you can ...
1
vote
0
answers
32
views
Why does my implementation of a sinusoidally time-varying color work so slowly?
I've been following TheCherno's OpenGL tutorials and I got to the point where I could render a square by using an index buffer. Now I wanted to vary the color of the square by using $$\frac{\sin(t) + ...
1
vote
1
answer
113
views
k-torus code in C++
I've been trying to implement this k-torus code that I found, but all it does is return a cylinder (torus of outer radius infinity). Is there anything that I'm missing here?
...
-1
votes
1
answer
28
views
How to implement camera translation arround object using gluLookAt?
I'm trying to move my camera around the object, a house, using some keyboard keys and the gluLookAt() function.
...
0
votes
0
answers
19
views
Doing spectral analysis in GLSL, how can I get FFT-level fidelity in my results?
I'm using GLSL to do spectral analysis of an input signal. I do the math to associate each pixel (in a single row) with a frequency, then use [The Goertzel Algorithm][1] to determine the contribution ...
1
vote
1
answer
42
views
Fixing bias in Specular lobe
Im currently making some modifications for a path tracer for Minecraft, specifically adding glossy refractions. The program currently uses for specular reflections this method, linear interpolation ...
0
votes
1
answer
146
views
Procedural generation of genus $k$ tori triangle meshes
I am looking for code or pseudo-code for the generation of genus $k$ tori triangle meshes. I want to get something like in the image here. Book/paper references, code, github links, etc. are all ...
0
votes
1
answer
66
views
How to imlement the Phong BRDF
I'm really sure that this question was asked before, and I found some code snippets by searching this via google. Unfortunately these snippets are in openGL or some other high level computer graphics ...
1
vote
0
answers
59
views
Spherical Harmonics for view-dependent effects in research of learned radiance fields (NeRF, 3D Gaussian Splatting)
In research on making the rendering of learned radiance fields (e.g., neural radiance fields) faster, many approaches use Spherical Harmonics (SH) to approximate view-dependent color (e.g. baking SH ...
1
vote
1
answer
91
views
How do I normalize all pixel values such that all pixel values are 'pulled towards' the mean?
Originally asked in Graphic Design site here (but I don't know how to 'move' a question to another site)
Credit to this guy: Python Tutorials for Digital Humanities - I followed a lot of his ideas, ...
0
votes
1
answer
80
views
Constructing half-edges table from triangle list without hash
Motivation
I am trying to refine a mesh such that each triangle gets subdivided into 4 triangles, but I want the vertices to be shared. For that purpose I need a half-edge data structure so I can ...
0
votes
0
answers
62
views
What kind of code would it take to visualize just 1 3d gaussian in Godot?
I'm trying to create the simplest possible implementation of the gaussian visualization code from this paper in Godot, https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/ but I just don't even ...
0
votes
1
answer
76
views
How do I tell what kind of shader an hlsl shader is by looking at the code?
How do I tell what kind of shader this is: https://github.com/aras-p/UnityGaussianSplatting/blob/main/package/Shaders/GaussianSplatting.hlsl
Among these options:
vs – vertex shader
ps – pixel shader
...
0
votes
0
answers
23
views
Normal blend mode math
I have one question.
How to calculate source color after blending operation.
For example. I have
1 - Background color (r-115, g-94, b-67, a-1)
2 - Foreground color above background color, which ...
5
votes
1
answer
95
views
Screen space line anti aliasing
I need to solve the following problem: do some anti-aliasing onto an image that contains rasterized "lines".
I have some post-processing effects that output super-thin (~1px) features such ...
1
vote
0
answers
24
views
What is the difference between Uniform/Storage Buffer and Hitgroup Record data buffer?
I have a vulkan ray tracer in which I uploaded my vertices as a single buffer (for all meshes in the scene) as a storage buffer. I have one closest hit shader per way-of-calculating-lighting (e.g. one ...
0
votes
1
answer
42
views
how can I estimate the depth of an object with a bound box from just a few images where i moved it?(knowing how much i moved)
how can I estimate the depth of an object with a bound box from just a few images where i moved it?(knowing how much i moved)
For testing purposes I have a cube and a camera perpendicular to it and I ...
2
votes
1
answer
46
views
value range in CIEXYZ space
When converting from sRGB to CIEXYZ I seem to be off by a factor of 100
I'm trying to convert from sRGB to CIELAB.
Calculation
First I need to go from sRGB to CIEXYZ. Using this formula I get i.e. ...
0
votes
0
answers
15
views
Is it possible to separate rigid part and flexible part from a structure (point cloud)?
Given a structure represented by the point cloud, most part of the points in the structure are rigid, and only a few points are flexible. If I have two representations of the point cloud, and I ...
0
votes
0
answers
21
views
How to use unbound descriptor range properly in descriptor tables
I am trying to use 2 "D3D12_DESCRIPTOR_RANGE" in a root descriptor table,defined as follows:
...
0
votes
1
answer
65
views
How to correctly handle rendering of ~600000, arbitrary colored 2D squares with WebGL?
Information
I have to render a map, that is rendered as a 2d collection of squares of different color, separated by white lines horizontally and vertically. There may be ~600000 squares surrounded by ...
1
vote
0
answers
32
views
Why would an image look the same pre-raytracing and post-raytracing?
I am trying to raytrace an image of a black hole, but given my current difficulties of doing so with the formalism of relativity, I've decided to do my raytracing using Newton's law of gravitation ...
0
votes
2
answers
46
views
What's the type of iChannel[0-3] in Shadertoy?
I'd like to have a helper function in the Common tab that does something fancy with texture input and returns the result. I'd like the function in question to be able to use any ...
2
votes
1
answer
79
views
Cosine weighted hemisphere sampling is a little bit darker and arguably noisier than reference
I'm writing a small path tracer that currently:
Samples a random light source at each bounce (direct lighting)
Bounces rays around multiple times (indirect lighting)
The scene only contains ...
1
vote
1
answer
88
views
Why doesn't using depth biasing to fix shadow acne result in an even bigger problem?
I am currently reading the Ray Tracing in One Weekend tutorial (link), and I am dubious about their fix for shadow acne, which is to ignore ray-geometry intersections that occur at very small times.
...
1
vote
0
answers
20
views
Help understanding Texture2D multi-sampling semantics: Why do we need sample index AND location?
Looking at the windows HLSL documentation for Texture2DMS.Load found here: https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/texture2dms-load
can someone help me better understand different ...
1
vote
0
answers
31
views
How are multisample samples partitioned in OpenGL, and at which points does interpolation take place?
As I understand it, with glEnable(GL_MULTISAMPLE), glEnable(GL_SAMPLE_SHADING) and ...
0
votes
1
answer
61
views
Extrapolating geometry across a triangle mesh?
Say you have 2 parametric cylinders represented as triangle meshes with very different geometries and you connect them together.
Is there a method that allows you to join them together such that the ...
1
vote
0
answers
58
views
Piecewise smoothing of a mesh?
Kobbelt et al. published a paper some 20 years ago where they specified how solving Poisson equations on the positions of a mesh lead to removing noise. This can be used for reconstructing mesh ...
0
votes
1
answer
46
views
Are stencil buffer dimensions required to match render target dimensions?
I may not need as precise pixel-perfect stenciling as my render target during stencil tested render pass. I could be okay with stencil test happening at half or quarter of resolution to save bandwidth,...
1
vote
3
answers
102
views
How to calculate the radiance of the reflected light ray using the Blin Phong BRDF
to get the radiance of the Lambertian diffuse reflected light, I have to multiply the constant pdf (rho/pi) with the incoming intensity I0*cos(theta_i), where cos(theta_i) is given by the scalar ...
0
votes
1
answer
95
views
Is it possible to fill in Stencil Buffer programmatically via fragment shader?
I've never worked with stencil buffers, but I'm researching if it is the right tool for my task.
Basically I don't understand yet if stencil buffer can only be filled in by some hardcoded rules during ...
1
vote
1
answer
30
views
GLSL Uniform Layout Spec says member array stride alignment is rounded up to vec4?
in GLSL spec section 7.6.2.2 about Standard Uniform Block Layout, rule (4) says:
If the member is an array of scalars or vectors, the base alignment and array stride are set to match the base ...
0
votes
0
answers
20
views
How is re projection usually implemented in remeshing?
I was reading "Polygon Mesh Processing" and in chapter 5 the authors present this little algorithm:
...
0
votes
0
answers
35
views
Can STEP files contain polygon data? How do I get a smoother mesh out of a STEP file?
I am trying to work with a .STEP file I have received. Upon opening it in CAD Assistant, I find
its surface as jagged lines, like a low poly model. When I export it as OBJ from there, the edges and ...
0
votes
0
answers
27
views
Rotation from quaternion to glmatrix axis rotation
I have my own webgl library with scene objects who have position and rotation.
I use for physics cannon.js library. In cannon.js for rotation logic it is used ...