# All Questions

2,429 questions
Filter by
Sorted by
Tagged with
29 views

### Do I need a normal matrix if I calculate lighting in an objects space?

As a quick reminder, here is what normal matrix is and why do we need it. Now the question - if I take the light position and transform it into an object space than I don't need the normal matrix at ...
25 views

### Difference between Passing Instance Data to Vertex Shader methods

I see two kinds of passing Instance Data to Vertex Shader in different Examples. 1 .Using a Uniform Buffer and filling in an array, like below ...
6 views

### How can I detect if an edge has flipped during the UV unfold process?

I'm writing my own UV Unfold operation (similar to Maya's Optimize UV tool or 3DS Max's Relax Tool). My code works great 90% of the time but in some instances, I'm getting faces and edges that flip ...
24 views

### Inverse texture mapping

I have a textured 3D object and looking for ways to transform back the texture. Effectively, I think this is an inverse texture mapping task. Do you know of anything close to this? Some papers or ...
39 views

### Are there any reasons to use power of two textures with modern mobile platforms?

Are there any reasons to use power of two textures (like 128x128 sized) if one targets modern mobile platforms (with OpenGL ES 3.0, Metal and/or Vulkan)? With iOS the PVRTC only supports power of two ...
43 views

### How to approximate the heightmap of processed wood?

In the above image, you can see that there is some slight variation of the height of each wood plank. These variations do NOT come from the wood texture itself, but from the way it was cut, i.e if a ...
30 views

### Understanding the irradiance map generation

I am trying to understand how the generation of irradiance maps works. I was reading LearnOpengGL tutorial and Codinglabs article. Reading those articles, I got a bit confused about how we use ...
25 views

### How to display image from CUDA / What API to port my project to for real-time raytracing?

I started a raytracing project using the python numba library which provides a just-in-time compiler for CUDA kernels. When the scene is rendered my result is a 1920 x 1080 x 3 RGB array in GPU memory....
65 views

### Compute shader only 5 times faster on the GPU than on the CPU

I'm running following compute shader in Vulkan. worldImage is device local memory that holds the world. resultImage is reference to the memory of the swapchain image: ...
43 views

### Pitfalls of animating with quaternions

When working with animating a rig, quaternions are often used for rotations. However sometimes we need to clear rotation along given local axis of a joint. With quaternions it's not as simple as just ...
55 views

### Convert triangulated object to a polygonized object

Is there an efficient algorithm to convert a 3D object described with a set of triangles to a 3D object described with a set of polygons. Polygons can have an arbitrary number of points, more is ...
14 views

### Image contribution function and reconstruction using filters

So I've been reading Physicall Based Rendering which in section 16.4.3 defines the "image contribution function" to be the following $$I_j = \int_\Omega h_j(X)L(X)d\Omega$$ where the variables are ...
41 views

### Help with understanding the look-at function (the view matrix)

I've been reading this article about the look-at function. I don't understand the part when they're trying to inverse the matrix N. They say that R is orthogonal because all its row and column ...
38 views

### Only each third image in swapchain is being used, causing flickering

I've managed to write a "small" Vulkan program that outputs a solid color using compute shader directly to swapchain. However, it doesn't work properly. ImageMemoryBarriers I've setup don't ...
44 views

### Weird glColor3f results in framebuffer objects

The code is glColor3f(1, 1, 1); gluSphere(gluq, 0.2, 10, 10); glColor3f(1, 0, 0); glTranslatef(1, 0, 0); gluSphere(gluq, 0.2, 10, 10); In short, when I draw ...
19 views

### How do I automate projecting a 2D vector image onto a 3d curved surface plane? [closed]

I am creating a workflow consisting one or more tools to wrap or project 2D vector images onto a 3D surface plane. The process is as follows: Convert image in a vector format (any format compatible ...
30 views

In newer OpenGL it's encouraged to use shaders and pass the model-view-projection as parameters. But what if I drew a complex object, and wanted to translate/rotate it and draw many copies? For ...
11 views

### Area of a mesh patch given the corners

I have a mesh $\mathcal{M}$ and 4 vertices $v_1, v_2, v_3, v_4$, I know the connectivity but not the geometric path. $\mathcal{M}$ is a single connected component (with no holes). What's the quickest/...
50 views

### Diffuse lighting calculations in ray-tracer

I am trying to write a ray-tracer. The lighting part is proving to work but not accurately. To debug I simplified the scene to a single sphere centered at the origin with a radius of 1 and a point ...
46 views

### Strange sphere reflection effects in ray tracing project. I cannot figure out what causes them

I started a ray tracing project in Python. I made a CUDA kernel and a trace() function for each pixel. It works perfectly when calculating intersections, shadows and lambert shading, however when I ...
29 views

### How To Upgrade My Intel Graphics Driver? [closed]

I have Ubuntu 18.04. When I run glxinfo | grep OpenGL, I get this: I have OpenGL 3.0 but I want this to be upgraded to OpenGL 3.1+. I tried to do what was advised in https://askubuntu.com/questions/...
44 views

### Screen space reflections become warped when looking up or down

I have been experiencing issues over the past few days with implementing SSR on water into my engine. Looking straight forward, it appears to be alright. However, when I look up or down, the ...
22 views

### Boundary Smoothing Algorithms

I have a 2-manifold with boundary, built with marching cubes. Are there any well-known algorithms for smoothing its boundary edges? Most of the papers I found are concerned with smoothing the surface....
58 views

### Represent shape as particles

Input: Triangles which make up an arbitrary shape. Each triangle is represented by 3 3D points. Output: A set of particles which fills up the inside of the object (see image). I have read the ...
38 views

### Out of core rendering

Suppose there is a frame, which is larger that the device memory (I mean, dozens of Gb). And I would like to render to it from a set of textures, which is larger than the host memory (I mean, dozens ...
19 views

### Volume of Intersection of Cube and Sphere

Is there any way to compute the volume when a sphere intersects a AABB(cube), with different centers. Also i want to be able given a percentage of sphere's volume to to place the sphere's center in a ...
25 views

### Access frames of livestream

A friend of mine offers a live-stream via TCP. I can view the live-stream in a browser by fetching it via web-socket. What I want to achieve is to segregate the video into frames. Furthermore, the ...
44 views

### Camera position in vertex shader

in the vertex shader I have the vertex position vpos which is in object space and I want to get the vector going from the camera to ...
71 views

### How can i create a 3D Sphere(earth) using OpenGL, GLFW, GLAD, GLM?

Please help me out with this thing and currently i am a little more than a beginner so please tell me in that context. i don't need any obsolete methods for creating this like using GLUT or GLEW.can ...
47 views

### Pseudo rounded cube in OpenGL

If I have a cube in OpenGL, how can I have it appear like rounded? I think it's too complicated to really have the cube rounded so is there any "light trick" to have something like this: The cubes ...
57 views

### Proper way of consuming stratified samples in path/ray tracing

I'm working on a (toy-level) path/ray-tracer, currently trying to implement (and understand) improved sampling strategies. The obvious next choice after uniform random sampling would be stratified/...
31 views

### Is there a list of OpenGL extension support?

I am looking for a list that states which vendor does support which OpenGL extension. For example I wanted to use ARB_shading_language_include, which was accepted ...
19 views

### Nomenclature problem: what to call a graph format

(This may be the wrong group to ask in. Am open to suggestions.) I've been trying to graph a dataset of x1,y1-x2,y2 pairs. Each pair has an id and each id has information and style attached. So far ...
71 views

### The termination probability of Russian roulette in PBRT

As described in PBRT 14.5, the path tracer stops bouncing rays at a probability q, which is determined by the throughput of the path. ...
38 views

### Which is more important : Texel or Pixel rate? [closed]

I would like to know which is the most important ? More particularly in games or for the display of a desk (ex KDE Plasma, Windows 10 ...) ?
19 views

### Cannot use variable as texture sample value - HLSL DirectX11

I ran into strange problem. My HLSL VS won't compile for given lines: ...
57 views

### Is it possible to do color conversion on decoded video without getting it from GPUmemory to CPU memory?

Decoding video will result in different pixel formats on different GPUs and drivers. I have an application which can render (using OpenGL), only the RGB8 pixel format, therefore I need to do color ...
34 views

### Pixelated /aliased /blurry edges in volumetric rendering

I have been trying to implement a simple GPU based volumetric renderer, somewhat similar to described here. I conceptually understand most of the stuff, and implemented some code, but my results are ...
18 views

### Mathing gl_PerVertex declarations

Half a year ago the vulkan validation layer of matching the declaration of gl_PerVertex between shaders (e.g. vertex and geometry). Hence following pair of shaders now throws a validation error: <...
100 views

### GLSL Compute Shader doesn't run for large inputs

The shader takes an SSBO of Photons that have a position, direction, wavelength and intensity and each thread is responsible for tracing exactly one photon through the grid, where at each grid cell ...
23 views

### Customized editing of a 2D bitmap

Please excuse this basic question, as I'm new to computer graphics. Let's say I have a sprite that looks like below. I wish to programmatically transform the sprite such that the bitmap looks like ...
80 views

### Regular voxel grids and RTX accelerated ray tracing

I've been looking to play with ray tracing, starting with a simplest of minecraft clones (making something more akin to cave game, for starter). I figured I'd define a voxel as a primitive and then ...
47 views

### Wrapping normals around a sphere

I'm using a vertex shader to effectively wrap vertices on a sphere. Starting with world_position already after multiplying the vertex by the model transform matrix ...
40 views

Every frame I dispatch a compute shader which write data in a storage buffer. The cpu needs to readback this data and use it. I would expect this to work : ...
23 views

### How can I create multivariable function plotting software

I have finished Dennis Ritchie's C book, and I would like to create my own plotting software for enhancing my programming skill,I want sources,books or anything to reach this goal.Thanks for answers.
48 views

### Microfacet BRDF artifacts

I've been trying to implement a microfacet specular BRDF based on the equations in Real Shading in UE4, but I'm getting weird ring-shaped artifacts in the highlights of rough surfaces: Here's the ...
74 views

### Rendering equation in terms of paths rather than directions

Path tracing seems to perform Monte Carlo integration where the space being integrated over is the space of paths (e.g. chains of rays) but the rendering equation is stated in terms of outgoing rays. ...
33 views

I am trying to simulate the actual response of a camera given some object that is reflecting light. I've written a ray tracer, and have a BRDF that I need to use, and I have a camera sensitivity in ...