All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
129 views

Point a normal vector towards a point in 3D-Space

Given a normal vector in 3D-Space, how can I rotate the vector, such it points to a point in 3D-Space. I tried couple of ways doing this, which ended up looking completely wrong.
0 votes
1 answer
106 views

Do GL compute shaders trigger TDR if they crash. Not just timeout?

I'm getting a TDR trigger after 4ms with a GL4.3 compute shader. tdrDelay is currently set to 30 secs, this obviously isn't long enough to get a timeout with the default Windows 11 tdrDelay value let ...
1 vote
2 answers
267 views

Defining "inside" and "outside" of a 3D space

I am not sure if this is the correct SE to ask this question. However, lets say I have been given 3D models of several enclosed spaces. I want to populate spaces with, lets say, planes flying through ...
1 vote
1 answer
149 views

How to get the boundary of delaunay triangulation

I'm implementing tunnel detection algorithm in the paper "Computing Geometry-aware Handle and Tunnel Loops in 3D Models". Before the actual tunnel detection, the input needs to be ...
2 votes
1 answer
75 views

How can I get an Irradiance or power value from RGB?

is there a way to output the power in watts from an R, G and B value? I know there are many formulae to get perceived brightness but is there one to get an objective amount (relative or otherwise)? ...
5 votes
1 answer
3k views

How to draw an orthogonal graph from its edges and vertices data?

I am writing a software and I need to represent an graph in a orthogonal manner from topological data (vector of edges,vertices and their connectivity data) Graphs consist of a set of vertices and a ...
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 ...
2 votes
1 answer
652 views

Difference between a spherical camera and a trackball camera

A spherical camera is pretty easy to define. We have an anchor point C the camera always looks at and a relative position P where the camera is, which can be expressed in spherical coordinates, ...
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 ...
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 ...
1 vote
1 answer
363 views

Normal Artifacts On Grazing Angles

I am currently experiencing a very obvious artifact that occurs when looking at objects on very grazing angles Here is a picture of the artifact: I noticed that the issue was coming from my ...
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
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
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
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
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
2 answers
461 views

How to determine RGB values given a display spectral response curve?

I am reading Physically Based Rendering section 2.2.2 on RGB color. I am trying to understand how, given a display spectral response curves for rgb intensities, we can choose the intensities so that ...
0 votes
2 answers
123 views

Storing array of floats within shader

I am about to implement a framerate histogramm chart for a DirectX Renderer. Ideally I would do this in pure shader code, but for a a histogramm I need to store the timestamps of the last ...
5 votes
1 answer
2k views

Which interpolation algorithm does MS Paint on Windows 7 use for image rescaling?

I was about to scale this image down to 64x64 pixels: The result I got on MS Paint on Windows 7 was surprisingly good (i.e. crisp edges): , whereas scaling it with GIMP resulted in for cubic and ...
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/...
15 votes
2 answers
684 views

Problem with definition of BSDF and radiance

When I was reading theory behind physical based rendering I noticed that definition of BSDF and radiance has some problems. For example BSDF of purely specular surfaces is zero almost everywhere and ...
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 ...
0 votes
1 answer
69 views

Triangle Rasterization Shaking Issues

I am making a Software renderer, and I noticed that there is a screen shaking like effect happening. shown in the first video: I tried doing filling without clipping against the small square, and 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: ...
0 votes
1 answer
207 views

How to properly create textures using DSA for ImageTexture in OpenGL

For the old approach, generating a texture for the ImageTexture for compute shaders would look like this: ...
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 ...
2 votes
1 answer
115 views

How to properly use the BRDF from glTF 2.0 specification in path tracing while using metallic/roughness materials?

I've built a renderer which should render glTF materials, as they are defined in their specification. So I should be able to render satisfying (similar to Cycles and Ospray) results just from the base ...
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
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 ...
1 vote
2 answers
2k views

Opengl GLSL binding locations confusion

The background of this question is that I am trying to write an automatic binding system, where for each uniform variable I want to declare in my GLSL code, I call a method ...
2 votes
3 answers
2k views

vulkan perspective matrix vs opengl perspective matrix

Hi I have a slight confusion in using the opengl perspective matrix in vulkan. glm's perspective matrix works directly in vulkan just by multiplying the "[1,1 term by -1 but when I compared the ...
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 vote
1 answer
78 views

Is it possible to read arbitrary data at arbitrary array offset in glsl?

TL;DR In a Vulkan / GLSL ray tracing program, I have several shader files, all accessing the same material buffer of arbitrary data. All materials have an arbitrary layout, e.g. one might be a float, ...
4 votes
2 answers
191 views

cosine term in rendering equation

Rendering equation's value can be estimated with Monte Carlo (Physically Based Rendering: Light Transport I: Surface Reflection): $\begin{equation} \begin{split} L_o(p, \omega_o) &= \int_{S^2}f(p, ...
-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 ...
0 votes
1 answer
337 views

OpenGL ignores glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);

I'm learning OpenGL for a personal project. I need to draw a triangle mesh as a wireframe. From what I've read, I can do this using glPolygonMode. However, the program always draws my polygons filled. ...
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? ...
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
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 ...
2 votes
1 answer
644 views

Rendering splines on GPU

We have an application which needs to render spline curves (cubic, bezier, b-spline etc.). We currently have working algorithms in C to stroke the control points of these curves into line strips. The ...
-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 ...
0 votes
1 answer
108 views

Sensor size of Sony HDR-HC7e

I want to motion track a shot from my Sony HDR-HC7e camcorder and I am not quite sure about the horizontal sensor size(width). I set the focal length to minimum and the recording to HDV 16:9 This ...
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
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
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, ...
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 ...

15 30 50 per page
1
2 3 4 5
80