# All Questions

2,224 questions
47 views

### Can you disable strip cutting (AKA primitive restart) on Direct3D 11?

Line strips and triangle strips are drawing modes supported across 3D graphics APIs, such as OpenGL, Direct3D, and Vulkan. When using indices to control drawing, a more recent feature is "strip ...
39 views

### Cook-Torrance Specular BRDF Artifact [duplicate]

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 ...
107 views

### 3D scene construction and change of coordinates

My book says: After a scene has been constructed we transfer object descriptions to the viewing-coordinate reference frame. This conversion of object descriptions is equivalent to a sequence of ...
24 views

### Converting color to equivalent with opacity

Assume a color X with alpha 1 and RGB 255,230,210. How can i find another color with alpha A ( or an array of colors ) that blended with a background of color Y ( e.g 255,255,255 ) would produce the ...
82 views

### Do operating programs such as Microsoft Office or Windows Explorer use OpenGL to draw?

I have a server and my only monitor is plugged into its graphics card. My question is - do all programs (Windows explorer, Excel whatever) draw their output using the graphics card and more ...
45 views

### What is the equivalent of rotation matrix in Euler angle space for Quaternions?

I have to load a mesh in Blender (which uses Z and Y as up and forward axes), modify it and export it (with setting up and ...
56 views

### How to include OpenGL extension loader in my project

I have a modern OpenGL project hosted publicly. I want to create the easiest experience so someone can just clone the repo and have it just work. So far, I have included (as git submodules) the ...
52 views

### How to rotate a shape in another 3D software so that the rotation matches with the rotation in Blender?

I import a mesh in Blender, export it with setting axis_forward='-Z', axis_up='Y', import in NVIDIA's FleX, rotate it and store it on disk; I call this mesh ...
72 views

### Using depth texture to mask local pixels

I have a scene with camera facing billboards drawn with depth write off so they appear on top of other objects. I would like to draw each sprite so that any obscured pixels are drawn with a very low ...
84 views

### Which graphics APIs texture formats are HDR texture formats?

I understand that HDR files are images encoded with a higher precision in order to keep more details. When loading such images in real-time rendering applications using common Graphics APIs (DirectX, ...
46 views

### How to compute A and B in projection matrix

I'm trying to compute a projection matrix to transform from view space to NDC with a near clip plane at -1 and far plane at +1. The general form of this matrix (disregarding aspect ratio and focal ...
66 views

### Wrong tangential directions for cubic bezier curve

I am well aware that there are several ways to find the tangents to a Bezier curve. However, I choose to just substitute the result of differentiating the Bezier curve equation. So, given four ...
3k views

### Raytracing: why are the spheres in the image below appear stretched?

Some context. Above are the code and the resulting image for it in Peter Shirley's Raytracing in one weekend's book. As you can see from the code, he adds in some spheres. And yet in the final image ...
66 views

### qt - view geomview (.off ) file

I want to open a .off file and view the content 3d model using libQGLViewer, qt-creator. I don't know how to display the 3d model after opening its .off file. ...
67 views

### Plotting software used in old scientific papers

Does anyone know what software was used in many old scientific papers (please see attached example). I love the clean look of the graph and the typeface. Thanks. Graph example
46 views

### Resolution issue of generating a PNG icon for macOS menu bar

Wonder if anyone has experienced this. When generating png image icons for macos. its recommended at 19x19 pixels. However, based on that, the icon (shield) that is generated is pixellated compared ...
55 views

### What objects do get loaded into GDDR?

I currently have a 4K monitor and want to buy a new graphics card. My choice would either be the RTX 2080 or the RTX 2080 Ti. Now I need to know which one I really need. The Ti variant has 12 GB of ...
458 views

### How to convert Euler angles to Quaternions and get the same Euler angles back from Quaternions?

I am rotating n 3D shape using Euler angles in the order of XYZ meaning that the object is first rotated along the X axis, then Y...
36 views

### Does MRG32k3a compare well with PCG and Xorshift256*?

I've been using standard 32-bit Xorshift in my GPU path-tracer for a while, following Nathan Reed's approach with hashed seeds and decorrelated state. I (finally) discovered today that Xorshift is ...
120 views

### GLSL Debugging Volumetric light

I'm implementing basic volumetric lighting using deferred shading (gbuffer + render to screen quad) and basic shadow mapping. So, I am sending the position texture and shadow map to a separate shader,...
23 views

### D3D12EnableExperimentalFeatures causes D3D12CreateDevice to fail

I am following Nvidia's DXR tutorial: D3D12HelloTriangle. I call below code before creating device and it returns true ...
64 views

### How to randomly draw Quaternions within a specific range of Euler angles for rotation?

I am pretty new to Quaternions so please bear with me. I want to draw random Quaternion samples so that their Euler angle equivalent would range within [-30, +30] ...
70 views

### WebGL - issues doing a simple texture downsample

I'm working on an image processing app which uses WebGL to apply shaders to a bunch of input photos. At one point in the algorithm, I need to create some image pyramids where I downscale the input ...
143 views

### What are Metal and Vulcan?

I keep coming across the terms 'Metal' and 'Vulcan' on this site. Guessing this to be some CG software, I'm interested to know what these are exactly and what the intended and most common usage is. A ...
78 views

### Why is pixel 0,0 at the top left of some formats and bottom left of others?

It seems that every image format (jpeg, png, tiff, bmp, jp2000...) doesn't place their origin at the same corner. Do you know where I could find some info about this differences? I can only say that ...
50 views

### Identification of visible area of a plane in OpenGL

I have somewhat generalized version of this question: https://stackoverflow.com/questions/52475104/how-to-show-visible-part-of-planar-world-rendered-with-3d-perspective-on-topside -‎ I would also like ...
71 views

### How are the three plane equations derived in the NVIDIA's CG Tutorial chapter 8?

I'm reading the chapter 8 of the Cg tutorial and I could not understand 8.4.1 : Because all these coordinates lie in the plane of the same triangle, it is possible to derive plane equations for x, ...
98 views

### Why replicating the higher bits of RGB565 when converting to RGBA8888?

I have seen in some computer graphics software's code bases that sometimes the higher bits of RGB565-format image data are replicated into the lower bits when converting to higher-bit-depth format ...
37 views

### Confused about graphic art and what software is used to create the environment of it? [closed]

I have a question that I am stuck on, I am wondering what style is this image considered? And what program do people generally use to create this?
44 views

### What is a “Vulkan Extension”?

When creating a VkInstance, you need to setup the API's extensions that are going to be used by your application (for example you need an extension to interface with the window system on desktop ...
132 views

### What's the point of “work groups” for OpenGL compute shaders?

glDispatchCompute has the number of work groups as arguments. What is the point of having work groups? How are they useful, compared to just having NxM independent pixel calculations with a known (x,...
179 views

### How does this small fractal shader work?

I would like to know the magic behind this tiny fractal shader; I didn't really understand the code and the mentioned thread... Is there an accessible explaination? https://www.shadertoy.com/view/...
75 views

### Hodge Decomposition in fluid simulations

I have just started implementing a fluid simulator based on the navier stokes equation. I am following Jos Stam's paper to do so. In this paper, it says that the velocity field must be mass conserving....
119 views

### What is shader warming, and why does Direct3D seem to avoid it?

I am involved in a project that had been modified to run on Apple and Linux computers, when it was originally Windows only. Specifically, Metal and Vulkan renderers have been written alongside the ...
108 views

### Surface fairing, implementation detail

I'm reading through Polygon Mesh Processing, section 4.3 (Surface fairing). The reference I mentioned defined defines "Surface Fairing" as The goal of surface fairing is to compute shapes that are ...
110 views

### Computing perspective directly

Assume the screen is axis aligned with origin at 0 and there is absolutely no view transformation. in other words we will simply try to project the model onto the screen plane following perspective. ...
106 views

I have a voxel raytracer that is generating some weird shadows and I want to understand what is the source of the problem. The image is voxelized, resulting in: I then generate Hard shadows from the ...
86 views

### How to apply wire texture for realistic rendering of embroidery?

I am building an algorithm which takes a bitmap image as input and render the image as an embroidery design. The different steps are : Vectorize the image, I keep only 5 colors (Done) Generate ...
526 views

### For shader math, why should linear RGB keep the gamut of sRGB?

sRGB is often contrasted with "linear RGB." Images are stored on disk and passed to displays in sRGB, which is approximately perceptually uniform in intensity. Shader math is done in linear RGB, ...
122 views

### BSDF sampling versus light sampling

I wish to understand the specific application of Multiple Importance Sampling (MIS) to weighting BSDF sampling and light sampling together. Refer to the following diagram from these Stanford course ...
57 views

### Choosing corner values for trilinear interpolation

I'm caching distances for SDF functions in volume textures for faster rendering, and I'd like to use trilinear interpolation for smoother edges. I know that I'll need distance values at each corner; ...
57 views

### Compression of user-drawn “whiteboard” image

I need to store user-drawn images from an online whiteboard. The amount of data gets huge quickly which is obviously not good. What I need is to store something drawn through a tablet for example in ...
144 views

### Ray tracing implicit surfaces using Sturm's theorem

I am trying to render implicit surfaces given by a polynomial equation $F(x,y,z) = 0$ using Sturm's theorem. Plugging the parametric ray equation $r(t) = o + td$, where $o\in\mathbb{R}^3$ is the ray ...
95 views

### How do I derive this transformation

If I had two right handed frames where one has vectors [i, j, k] and another with corresponding vectors [u v w], how would I derive the transform M[i j k] <-- [u v w] when applied to any point P in ...
159 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 ...
111 views

### Defocus blur: Computing the pixel plane distance

I'm following Peter Shirley book, Ray tracing in one weekend. In the last chapter, he talks about how to make defocus blur by using thin len approximation. His camera class accepts a parameter called ...
26 views

### OpenCL - Kernel outputs image correctly but values don't show up on Host side

So once again it's related to my previous path tracer project. The path tracer routines are inside the kernel and for simplicity I'm just outputting a predefined color value ignoring all the lengthy ...
82 views

### Relatively new to OpenGL, need guidance/tips on an assignment with interactive user input

I'm currently taking a Computer Graphics class at university, and have been given an assignment which involves loading an obj file and manipulating it with keyboard and mouse controls (eg. arrow keys ...