# All Questions

4,097 questions
Filter by
Sorted by
Tagged with
0 votes
1 answer
38 views

### How are these two projection matrices related?

I have two 3D perspective projection matrices $A,B$ with standard projection parameters $k=\cot(\theta/2)$, where $\theta$ is the field of view, $n$ is the $z$-near value, $f$ is the $z$-far value, ...
• 157
3 votes
1 answer
49 views

### What to do with the homogeneous $w$ during vector operations

As I understand it: In graphics, 3D vectors are usually represented as homogeneous coordinates by storing an additional $w$ component known as the weight. The vector is divided by $w$ to obtain the ...
• 157
0 votes
1 answer
65 views

### what technicalities involved in screenshot process? what is the dependency of screen properties in the screenshot of an image?

If we take screenshot of image displayed on a monitor screen, then does it take only framebuffer data? Does the framebuffer data is independent of display screen properties like contrast, brightness? ...
2 votes
1 answer
47 views

### Possible reason for buffer orphaning being faster than using glBufferSubdata even when changing the size of that data?

I recently conducted an experiment, where a large scene was split into two types of mesh data - static (the terrain) and dynamic (lots of low poly trees). I evaluated two memory layouts and update ...
• 121
0 votes
0 answers
10 views

...
0 votes
0 answers
10 views

### Issues with vxgi implementation when rotating the camera

right now I have implemented vxgi algorithm. Voxelization is working fine, same for mipmap generation. But, I have an issue when I rotate the camera. Basically, it is not stable when it is rotated. I ...
• 101
0 votes
1 answer
31 views

### How to achieve smooth max of two coordinates in a shader

I am trying to achieve a border effect to a square tile on a xz plane. I am using max of coordinates x and z to achieve that. Here is my ShaderLab code: ...
1 vote
1 answer
52 views

### Is the light emitted by a typical white pixel actually a blue-ish purple to compensate for our greater sensitivity to the color green?

The human eye is considerably more sensitive to green light than red or blue; this is expressed in formulae which calculate an approximate overall "luminance" value for a RGB color (example)....
0 votes
1 answer
50 views

### Pose representation using rigid transformations

In literature (3D graphics, computer vision, 3d deep learning etc.) I notice that often an object's pose is represented using a rigid transformation, i.e a member of the group SE(3) combining a ...
• 133
0 votes
1 answer
97 views

### How does ray tracing handle the calculation of reflections and shadows in the presence of multiple translucent objects?

Raytracing can handle the interaction between light and multiple translucent objects in a scene by using global illumination and raytracing with volumetric effects to calculate the color of the object ...
• 103
0 votes
0 answers
28 views

### Is it possible to use OpenGL ES extensions in OpenGL? If not, why?

I've been looking at KHR_texture_compression_astc_hdr for OpenGL. It seems it's only currently supported by OpenGL ES 3.2. My GPU is an Nvidia RTX A3000, which does ...
• 113
1 vote
1 answer
75 views

### Is there a quicker way to draw a symmetric, scale-invariant (declining color) gradient around an ellipse?

The goal is to generate a picture like this: A symmetric color gradient around an ellipse which is rotated by $\theta$, has $(x_\circ,y_\circ)$ as center and and major and an minor axis $a,b$. The ...
• 13
1 vote
1 answer
49 views

0 votes
0 answers
93 views

### Do Euler Angles always cause Gimbal Lock?

I am learning about euler angles, and read about gimbal lock. I read that representing rotations with euler angles can always cause gimbal lock. All the examples that I saw on the internet show an ...
1 vote
0 answers
30 views

### How to morph a enclosing mesh according to the enclosed mesh?

I am quite new to meshing and mesh manipulation. I am working on a problem consiting of meshes $A$, $B$, and $C$. The mesh $C$ completely encloses the meshes $A$ and $B$ as shown in the attached ...
• 11
1 vote
1 answer
63 views

### Why does lv = fract(uv*2) result in grid like pattern?

Here is a shader in GLSL that visualizes the normalized pixel coordinates (from 0 to 1): ...
• 141
0 votes
0 answers
15 views

### BC1 code decoding for texels

I want to implement a BC1 decoder. A single BC1 compressed block consists of 64-bit, where bits are stored like this: ...
0 votes
0 answers
14 views

### Reflective shadow maps sampling

I'm following the old RSM paper and I don't understand the sampling section. I understand that it's a disc pattern, that is more scattered away from the center and has some weights. I don't understand ...
2 votes
0 answers
31 views

### How does this wormhole effect shader create a distortion?

Below is the code for a simple wormhole effect shader made in shadertoy.com. I understand everything else except: ...
• 141
1 vote
0 answers
42 views

### How to create a more photorealistic ocean?

Photorealism has many elements. Take, for instance, the figure 1 below, a shot from Dune Part One movie. Figure 1 The process of production of a image such as this one, is laborious and involve more ...
• 111
1 vote
1 answer
46 views

### Vertices are mapped to UV coordinates, but how does the shader access the UV data?

So in every mesh, the vertices can have UVs, and UVs are a way to store data for each vertex. Basically, at the time of rendering, when the shader runs, it's a way to check some arbitrary data for ...
• 141
0 votes
1 answer
98 views

### What are some ways of modelling data for GPU side where e.g. OOP is not available?

I'm currently on a journey of writing a basic path-tracer. My current implementation uses fragment shaders to run the path tracing algorithm per pixel. I am at the point where I need to start ...
0 votes
0 answers
16 views

### Determine horizontal FOV of a panoramic photo

Say I have a panoramic photo (less than 360) and would like to view it in a cylindrical screen in a VR headset to get an immersive experience. How to determine the optimal width and height of the ...
1 vote
0 answers
35 views

### text-rendering: why alpha testing produces wavy edges. And why SDF solves that problem

My first question is almost identical this one. I originally became aware of this when reading Valve's paper on using Signed Distance Field (or SDF for short) as seen here: However, I would really ...
• 23
0 votes
1 answer
43 views

### Who does the actual drawing when I call openGL draw API?

I am sorry if the question is too basic but I am just starting with the graphics library. My question is when I invoke draw API in openGL who does the actual job of drawing/coloring of the actual ...
• 115
1 vote
1 answer
97 views

### Why is my ray tracer not accelerated by CUDA?

Summary: I ported a simple path tracer smallpt into CUDA but the performance doesn't boost. reproduce results: build and run the CPU version: ...
• 183
-1 votes
1 answer
64 views

### Drawing Feynman diagrams

I am working on my MSc thesis on Quantum Electrodynamics. I have to draw some Feynman diagrams for Compton scattering and similar processes, for which I want to use Microsoft Visio. I am having a hard ...
2 votes
0 answers
23 views

### glMultiDrawArraysIndirect is not drawing anything

This code works: ...
0 votes
0 answers
33 views

### Opengl Color Alpha is not working

Hi iam follwoing the cherno Game Dev series but with 3D Engine in mind iam at point where i cant figure out why is the alpha of the color not being affect when i try to change the alpha color texture ...
0 votes
1 answer
52 views

### How to approximate a 90 degrees sine with a bezier curve in PostScript

I have found here similar questions for other languages like SVG but they don't quite answer this particular question. I want to find a good approximation of the first 90 degrees of a sine curve with ...
0 votes
0 answers
34 views

### Environment map: inverting (phi, theta) to (x,y,z) mapping

I'm currently working on a ray tracer in C++ as an assignment. This ray tracer needs to take into account environment maps, which I also need to implement a part of. From my understanding of an ...
0 votes
0 answers
30 views

### Rotating shader UV around camera position in world space

I have a tiled XZ world comprised of separate meshes. Additionally, I've implemented a water shader that draws patterns based on world space coordinates. Furthermore, I have a camera that can both ...
3 votes
1 answer
91 views

### Why is the z coordinate simply set to 1 for setting up direction of a ray in ray marching

I’ve recently gotten into shader art , using sites like shadertoy and various tutorials for getting started. One thing I noticed is that a typical setup involves ray marching whereby: We set a ...
• 133
2 votes
1 answer
55 views

### Why are YCbCr transforms defined in terms of gamma-corrected RGB?

I've learned a lot about digital color recently, and I've had the opportunity to implement several transforms in shaders, including converting between different RGB systems and converting into YCbCr ...
• 151
2 votes
1 answer
75 views

### How to find the major and minor axes of a convex hull?

I have a set of particles in a gravitationally bound system. The shape of the particles change with time, I have used a convex hull algorithm to "enclose" the particles of the cloud. I want ...
2 votes
0 answers
135 views

### "Charlie" Sheen BRDF's directional albedo integrates to values higher than 1 at low roughnesses. Does this mean it is not energy conserving?

I am implementing the BRDF from the 2017 paper "Production Friendly Microfacet Sheen BRDF". This BRDF is modelled as a coat layer stacked on top of a base specular. In order to do so in an ...
• 53
2 votes
0 answers
97 views

### Multiple importance sampling with Next Event Estimation gathers less energy compared to One-sample-model

I'm developing a webgpu pathtracer using multiple importance sampling with two similiar techniques, next event estimation and one-sample model. For some reason, next event estimation seems to gather ...
• 31
0 votes
1 answer
82 views

### Point light source radiance

I was reading Deriving radiance from irradiance and intensity and the last comment said that by dividing $r^2$ we convert radiant intensity to irradiance. What confuses me then is the fact that for ...
• 3
0 votes
1 answer
142 views

### Preferred GPU API to use for Steam Deck, Windows, Linux and MacOS support

Good people of the graphics SO community, I am new to Graphics programming or GPU programming in general but I have been a game dev enthusiast for over 4-5 years. I started learning about Graphics ...
• 101
0 votes
0 answers
80 views

### Write down the window to viewport transformation matrix if the viewport PQRS is normalize in the range of [-1,1]

What exactly will be the final matrix? "Consider a window ABCD whose lower left corner is A (XWL,YWL) and the upper right corner C is (XWm, YWM). A viewport PQRS has been defined with the lower ...

15 30 50 per page