# All Questions

2,421 questions
Filter by
Sorted by
Tagged with
30 views

### Algorithm for randomly generating polyhedrons?

I want to randomly generate polyhedrons which need not be convex. What is the most efficient way for doing so? I can think of an algorithm for generating random convex polyhedrons, but am unable to ...
35 views

### Unity: Pass texture pointer from OpenGL to Unity

I'm working on a scene in Unity where I have textures loaded at runtime. As a result of that, the scene is being slowed down (even with co-routines), so I thought maybe I could move the texture ...
52 views

### WebGL Can't render anything, wrong projection?

I'm trying to understand and learn WebGL and computer graphics from button up, that is why I started to work on my own little library for that. I've spent couple of days looking for right answer and I ...
38 views

### Are non manifold meshes problematic for Virtual Reality?

A simple question. I know that non-manifold meshes are problematic for physics simulations, boolean operations, and 3D printing. I was wondering if they can be problematic for a virtual reality ...
280 views

### How are colors really mixed?

I'm kind of stuck on this one. When following a conventional, high-level shading tutorial, you'll come across these images that are like ambient + diffuse + specular = result, but I can tell that it's ...
85 views

### Programmatically generating bin files for GLTF models

I have a need to generate a series of GLB files. I have a base template for a GLTF file which I have to derive off of. The models thus generated will only have varying textures on them. The base mesh ...
55 views

### Using octree for cheking intersection of ray and meshes

I wrote the code for checking intersection of ray and meshes on scene. It consist of two parts - broad phase and narrow phase. In broad phase I build an oriented bounding box around each mesh and ...
98 views

### gl_FragCoord and glViewport

I've been scanning the specifications for both OpenGL and GLSL, and I can't find a definitive answer as to how exactly are gl_FragCoord's ...
54 views

### Vulkan: efficient way to update VBO mesh vertices?

I would like to change/add/remove some mesh vertices in existing VBO's (while deforming and remeshing 3D objects) . With OpenGL I would have to reload whole vertex VBO's. I suppose with Vulkan there ...
32 views

### How to make the lines of a (binary) image dotted or dashed?

Let's say I had a binary image (i.e. only contains black and white pixels). For example, this one: How would I make all the lines in this image dotted or dashed? In other words, the eyes would be ...
19 views

### Export images in sketchup models

I built a model on Sketchup and imported png images in it to fill some faces. At first time, I tried to fill with a texture pointing to the desired image but it wasn't centered. Then when I export my ...
48 views

### How to project an image on spherical surface with least possible distortion

I did not know where to ask, I will try it here. I work in a local planetarium and I wonder if it is possible to edit an image in such way, that when projected on spherical cupola (diameter 8 m), it ...
41 views

### Why BMP file format last line of image is first line on file?

I'm studying Microsoft Windows Bitmap File Format, extension BMP. I'm curious to know why scanlines are stored on file from bottom to up: the last scanline on image is the first line on file and the ...
73 views

### How to calculate interpolation between multiple skeleton poses?

I found out that I should use spherical linear interpolation to blend two poses of a joint. I cannot find what to do if I have hundreds of poses to blend except applying the SLERP iteratively. What ...
63 views

### Why the Bresenham's algorithm does not work for those two points?

I am using the Bresenham algorithm from wikipedia: ...
56 views

16 views

### Should I use common resource bindings across all my shaders in HLSL/D3D12?

Will unaccessed bindings consume cache or bandwidth? I want to improve cache usage by splitting the per-path information in my renderer across different resources, but I also want to keep my binding ...
29 views

### Is it possible to have multiple descriptor ranges in a single descriptor table?

Let's say I have the following registers in my HLSL 5.1 shader: Texture2DArray g_texture_array : register(t1); Texture2D g_texture[10] : register(t0); I had in ...
67 views

### Difference between isnan and comparison to self

In GLSL, what is the difference between isnan(x) and !(x == x)?
75 views

### Noise shaping for dithering with gamma?

The context of this question is correct dithering of color with gamma correction. In dithering we add (shaped) noise $n$ to a signal $s \in [0, 1]$ based on a random variable $r \in [0, 1]$ s' = s +...
69 views

### 3D object to slices like in medical scan

I am novice lacking professional terminology. I want to create from 3D object (let's say from polygon mesh) a slice through to PNG file in order to create something like reverse medical MRI scan from ...
92 views

### How to do CSG on 3D triangulated objects, originally stored as a .obj file, using openGL or other libraries?

What I would like to do is to create a crater on a field. To do so, I thought that creating a universal crater object (something cone-shaped) and then subtracting it from the field on a specified ...
28 views

### Arrange common items to spell out words

This seems like a pretty easy thing to do, but I've never done anything like it and I would rather not reinvent the wheel - so I'm looking for example code in pretty much any language or an algorithm ...
26 views

### Why did most or all vector graphic devices not support some type of curve input parameters?

In the case of classic plotters, it seems the hardware would have been able to handle (something like bezier) curves with the correct software, but instead curves were drawn very slowly using a large ...
28 views

### How to scale primitive shapes [in Blender] so that they are within a [unit] sphere?

I wonder how is it possible to scale all shapes so that they are within boundaries of a [unit] sphere? I know how to do this for a cube: if radius of the sphere is S...
68 views

I was following this guide for drawing circles using shadertoy. Now I am trying to mimic the examples behaviour in WebGL. Here is a working shadertoy example I try to mimic. The code is not mine, see ...
70 views

### how many watts are in the SPD of the color white?

Please help. I'm trying to implement a ray tracer, going by the PBRT book and got stuck on an issue that I fail to find the answer to. My scenes are made from objects and light sources. From that, I ...
### Why need a $h$ parameter in the Geometry Function of a BRDF
Geometry Function in the specular BRDF term is defined as $G(l, v, h)$. Why need a $h$ since $h=\frac{l+v}2$. $f_{spec}(l,v) = \frac{F(h,v)G_2(l,v,h)D(h)}{4|n\cdot l||n\cdot v|}$ from "Real Time ...