# All Questions

2,249 questions
7 views

### Where does fireflies come from?

I'm using a renderer developed by other people, and I found there are fireflies. It is strange that in a completely diffuse scene, there are still fireflies presented. To my understanding, I think it ...
50 views

### How to account for self intersection with large ray tracing scenes?

I'm working on a hybrid real time ray tracing project and trying to tackle the problem of self-intersection with larger scenes due to loss of float accuracy. The logic I'm trying to use is based on ...
42 views

### Why does a black person 's skin color turn white when you apply a black and white filter to a picture of this person?

That sounds like a strange question, but I saw a picture in Photoshop recently with a black man on it with a black and white filter and then I noticed that the skin color just turned white. Shouldn't ...
23 views

### Compute shader textures compared 2D float4 arrays

I am wondering is there a difference in performance between using floating point textures as my 2D float4 array vs just passing in 2D float4 arrays? 2D float arrays eliminate the need to do texture ...
31 views

### Weight space in libigl

I'm trying to use the function of libigl uniformly_sample_two_manifold, but it does not work as described and there is no documentation whatsoever to help me understand why. I have a 3D mesh ...
34 views

### Anti aliasing thin features in textures

Assume I have a texture with a repeating line pattern. The lines are exactly 2 texels wide (really thin). Ans very spaced out (50 texels in between each line). I am now struggling with the ...
35 views

### Lanczos filter implementation issue

I tried to follow Nathan Reed post Antialiasing: To Splat Or Not to implement splat method. The image I am getting thorugh the Lanczos filter is very different than Nathan. I do not understand where ...
25 views

### Incorrect Z transform in fragment shader based rasterizer

I have been trying to implement a simple rasterizer in GLSL fragment shader. The goal is to render a quad with texture mapped on it, with correct 3d transforms (perspective and model matrices). I got ...
61 views

### Some questions about working in 0-255 integers instead of single precision floating point colors

I have many objects that store their color values. At the moment I'm storing them as vec4 values, that is four 4-byte values for RGBA, mainly because this is how the shader reads them. I was thinking ...
43 views

I am trying to learn compute shaders from source codes, but i am a bit confused by whats going on in the code so am hoping someone can help answer some questions i have. The algorithm is the fast ...
40 views

### Simple Two Point Perspective of a Cube

I know this question may be a little basic, but still I haven't found an answer for it anywhere. Let's say I have a normalized cube; vertices at (+-0.5, +-0.5, +-0.5) If I render it on screen (...
72 views

### Monte Carlo Importance Sampling

I am following the "Ray Tracing - the Rest of your Life" book by Peter Shirley and I am facing some troubles in the implementation of Monte Carlo importance sampling, and Direct light sampling. Monte ...
22 views

### Cyrus Beck Line Clipping algorithm doubt

Let us say we have a line AB (as shown in the image) and according to Cyrus Beck Line Clipping algorithm, C will be a potentially entering point and D will be a potentially leaving point. And ...
62 views

### Where should I learn shaders as a vulkan user?

I have no prior experience with any other graphics low level libraries and I have barely any clue how shaders work, any book related to shadings is bloated with opengl code and is demoralizing.
36 views

### Is groupshared memory stored in L2 cache of GPU?

The article says that L1 cache is shared by work items in the same work group(aka. SM) and L2 cache is shared by different work groups. In Direct3D, it seems that a thread group (which is specified ...
72 views

### How to simulate a line laser diode?

I'm interested in simulating the way a laser line deforms when it strikes an object and runs along the surface of it. Which concepts would be involved? Is there any 3D modeling software out there that ...
75 views

### ShadowMap peter-panning and wrong direction

I am creating Forward-Rendering DX11 engine and I have some troubles with shadow-mapping algorithm as it doesn't work as supposed. As you can see - shadow is peter-panning and looks totally not ...
79 views

### How to model braids?

Many hair simulations render their hair as lines (usually splines). Since hair is a really thin object. if the hair is braided, rather than having thin infinitesimally small cylinders, you have ...
59 views

### Trying to optimize texture mapping

We are developing a PPI plot for a radar system, similar to the following: NOTE: 1 radial is defined as a single slice of data within the circle, and 1 range gate is defined as a single point along a ...
28 views

### Mantiuk's contrast mapping seems to amount to a gamma correction

I'm reading this paper and one thing sticks out at me. Let's say I use the approximate transducer: R = 54.09288 ·G^0.41850 Then I scale it: ...
47 views

### GGX BRDF is greater than 1?

I am implementing a GGX BRDF, this is the formula I used is from:https://schuttejoe.github.io/post/ggximportancesamplingpart1/ And this is my implementation: ...
94 views

### What is a list of common, cheap, real time rendering algorithms?

I am well aware of the existence of Blinn-Phong shading, which is a great tool when you are doing, for example, modelling algorithms and wan't to focus on the model. In this case a full BRDF result, ...
58 views

### How Image Based Lighting is applied to indoor scene?

Now the mainstream engine's approach is to use image-based lighting to achieve approximate global illumination, but such a technique seems to be only applicable to outdoor scenes.What kind of ...
56 views

### Convey screenspace bounding box of rendering result

Imagine I render to an FBO some arbitrary geometry. Geometry can be rendered via single or multiple draw calls. For the sake of the question, assume I know nothing about geometry or transformation ...
102 views

### Why can I see the diffuse lighting effect on a perfect mirror?

Currently I am learning PBR by Unity3D. I find that even I turn the smoothness to 1, I can still see the diffuse lighting effect, which does not make any sense to me. Imagine I trace a ray from my ...
98 views

### Why is Forward Rendering/Shading named this way?

Forward rendering is the 'classic' approach to the rendering pipeline. Nowadays it is mostly replaced by a more flexible, deferred rendering approach. I did some research and had trouble finding ...
49 views

### Show the edges between the clipping plane and clipped objects [closed]

I want to utilize shaders to not only discard fragments if they are on one side of a predefined plane but also render a contour along the intersection. My fragment shader currently does something ...
61 views

### Constraining a Polyline to Look Smooth

What are the mathematical constraints required for a polyline, i.e., a piecewise linear curve, to appear as a smooth curve to human vision? I've discovered one document that specifies only that the ...
68 views

### Tiled Image Palettization Algorithm?

In most cases today, image palettization consists of reducing the overall number of colors in an image to some fixed number globally. This is typically solved as a straightforward but computationally ...
45 views

### Why is the BRDF defined as a quotient of differentials?

so my question is in the title. The BRDF(according to Physically based Rendering) is defined as f_r(p,\omega_0,\omega_i) = \frac{\mathrm{d}L_0(p,\omega_0)}{\mathrm{d}E(p,\omega_i)} = \...
62 views

39 views

### How could I do a graphic from Collatz conjecture?

I would like to make a graphic to visualize the Collatz conjecture. in one axis we represent all n, in the other axis we represented the numbers that have the same odd rules applied. When we talk ...
80 views

### Are texture binds expensive?

I am trying to get a feel for how much effort I should put into this. I am building a basic 2D engine and for my use case there are only 8 textures. Each draw call in this engine currently requires ...
81 views

### Which method for detecting edges of white object on white background?

I would like to segment picture of cloths in order to remove the background. The pictures come from online retailers, they usually have an homogeneous white background. Using Canny edge detector ...
64 views

### Path tracing - Better images without Gamma correction?

So I read about tonemapping and Gamma Correction recently and have implemented it in my path tracer. For the time being I'm using Reinhard tonemapping operator as described in his paper \$L_d = L_w *...
70 views

### Ray tracing the next week: understanding Instances

My question is not about the code, but it's about the approach used by the author Peter Shirley (and apparently common practice in ray tracers) of handling Instances. To understand the question it's ...
115 views

### Why do animated CG characters always feel fake?

Why do animated CG characters always feel fake? Usually if a CG character is an animal (or humanoid creature), they tend too look kinda off. Their movement tends to look oddly smooth or lightweight, ...
54 views

### How to create 2D (directional) noise?

I'm just getting started trying to understand noise generation algorithms. What I'm trying to achieve is to get a 2D (or 3D) grid of random directional vectors (again, 2D or 3D) according to a noise ...
32 views

### Is it possible to bind dynamic texture samplers to a shader in DX12?

So usually texture samplers are set directly in the D3D12_ROOT_SIGNATURE_DESC structure in DX12, at least that's how I've been setting them. I was wondering if it's ...
72 views

### Weirdly looking diffuse irradiance map

I have problem with creating diffuse irradiance map. As reference I am using https://learnopengl.com/PBR/IBL/Diffuse-irradiance and https://github.com/TheEvilBanana/PhysicallyBasedRendering/blob/...
57 views

### Why don't discretization errors occur with compute-shaded kernel filters?

An efficient compute-shaded image filter would be emitted with (screenX / [kernel width], screenY / [kernel height], 1) groups and one kernel in each group, allowing texels to pass into groupshared ...
71 views

### How can I control memory for command allocators and command queues in D3D12?

The D3D12 programming guide suggests specific allocation strategies for command queues and allocators, but the creation methods for those objects operate directly on queue/allocator pointers without ...
110 views

### Ray tracing in One weeked: issue with metal reflection

Problem I am following the book Ray tracing in one weekend , and I got stuck after the implementation of the material Metal. I checked my code many times, and it looks exactly like the code ...
50 views

### GBuffer: Framebuffer with different texture format types?

I rely on this answer from Nathan Reed: How much precision do I need in my G-Buffer? It is proposed to use two different texture formats for one Gbuffer. However as far as I know, color texture ...
62 views

### How to implement explicit light sampling when implementing path tracing?

I implemented a path tracer and got a similar result like this one. Sample: 4096, time used: 537.05s The algorithm is exactly the same as the one in wikipedia, where only the Gathering Path is ...
50 views

### OpenGL Unable to retrieve the values of data sent to shader using textures

I've been following these tutorials and i can't figure out how to send data to shaders using textures. https://en.wikibooks.org/wiki/OpenGL_Programming/Scientific_OpenGL_Tutorial_02 In this tutorial ...
91 views

### Blur with alpha transparency

I'm writing a simple box blur for a graphics library. The formula makes the average of a range of pixels by adding the ARGB amounts and then dividing by the blur range For example, with a blur range ...
71 views

### How do I use texture coordinates of a .obj file in OpenGL?

I have an obj file, with texture coordinates (indicated by vt). How would I use this to load textures in OpenGL?