# All Questions

3,003 questions
Filter by
Sorted by
Tagged with
0answers
23 views

### Compute shader threads confused

I am confused on how to pick the right numbers for my threads for a compute shader. I am trying to implement an FFT algorithm on a float2 buffer which is 1024 elements in size. Does that mean i have ...
1answer
47 views

### Texture value clamped to 1

I am working on ray/path-tracer using DXR and I'm starting with simple AO. In first pass, I am storing normal value and RayTCurrent(): ...
1answer
30 views

### Is the laplacian operator for meshes just the sum of the differences of neighbouring vertices?

I am starting to learn about the laplacian operator $\Delta = \nabla \cdot \nabla\phi(p)$ Which can be described as the divergence of the gradient of a scalar function $\phi$. This is equivalent to ...
2answers
54 views

### Shear(?) matrix projection along Z (depth) axis

I'm creating a primarily 2d game (platformer perspective) with 2d background parallax layers. The parallax effect falls out of the fact that I'm positioning a bunch of layers in 3d and using a ...
2answers
58 views

### What is the relation between colour spaces and what is actually displayed on our screens?

I am not entirely sure that this is the right stack exchange, but I couldn't find any other suitable one - please redirect me if necessary. There exists mathematically defined colour spaces which help ...
2answers
183 views

### Is BVH faster than the octree/kd-tree for raytracing the objects on a GPU?

Apparently most people use BVHs in their raytracers. The ray-AABB intersection code is very fast and and the BVHs also compresses empty space efficiently, working even with infinitely large objects, ...
1answer
42 views

### How 3D painting software works

I am new to graphics programming and i'm learning opengl. I managed to make a really simple renderer where i can import models display theirs textures with all lighting. My goal is to make a simple ...
1answer
92 views

### What are the use cases for multiple render passes?

From what I understand of Vulkan, we have a render pass with its associated image resources and subpasses, and each subpass accesses those resources and may synchronise with previous subpasses to ...
0answers
98 views

### Isosurface with cracks between LODs

I have an octree containing different LODs of an isosurface that was extracted using Marching Cubes. Neighbouring chunks show surfaces that do not line up if they have different LOD. See image below. ...
0answers
19 views

### How to interpolate vertex while clipping in homogeneous clip space?

I want to clip triangles to the near plane, in homogeneous clip space, so for each edge, I have to see if it crossed the near plane. If it has, I linearly interpolate the two endpoints based on the ...
1answer
20 views

### Using original vertices coordinates after clipping

Clipping is down in homogeneous clip space, therefore after multiplying the vertices by the model-view matrix. But as we do clipping in clip space, the position of the new vertices that we interpolate ...
1answer
103 views

### How to work around the pointer limitations of GLSL?

(I am new to Computer Graphics in general) I am learning how to ray trace from a book called ''Peter Shirley - Ray Tracing in One Weekend''. In the book, the code is written in C++. I have ...
0answers
45 views

### How could I remove this colour interpolation artefact across a quad?

I've been reading up on a vulkan tutorial online, here: https://vulkan-tutorial.com. This question should apply to any 3D rendering API however. In this lesson https://vulkan-tutorial.com/...
0answers
36 views

### GPU accelerated 2D graphics library with signed distance functions

I want to create my own 2D graphics library using signed distance functions where everything is drawn on the GPU. Browsing the web I quickly found Inigo Quilez website that describes how to draw basic ...
1answer
56 views

### Interpolate vertex attributes with $z$ AFTER homogeneous divide

Usually, if we want to interpolate some vertex attributes, say $A_1$, $A_2$ and $A_3$, we have to first divide them by their corresponding $z$ in view space, then we interpolate them using barycentric ...
1answer
38 views

### Albedo image map to color's Light Reflectance Value (LRV)

In many datasets in the literature of both Computer Vision and Computer Graphics there is the albedo map of a scene represented as RGB images, which in principle corresponds to the diffuse reflecting ...
1answer
35 views

### Paint pixels on the image around the cursor for painting application

I'm trying to create a simple painting application. And I was wondering about an efficient way to draw pixels on the screen. I have a pixel struct: ...
2answers
62 views

### Get normalized device coordinate of an image pixel

I have an image rendered to the screen, and based on the normalized device coordinates of the cursor I would like to pick the pixel of the image under the cursor. Say the image has four channels, I ...
0answers
37 views

### GLSL asymmetric performance for point cloud

I'm currently using OpenTK (OpenGL binding for C#) to draw a lot of points (~17 million) - that very rarely change - in a cube (256 x 256 x 256) with different float "transparency weights". ...
0answers
34 views

### How to find closest points on two not intersecting convex polygons in 2D

I would like to know if it is possible to do this using GJK alghorythm. I know how to find if polygons intersect and also find closest point on polygon from a given external point. Using Minkovski ...
0answers
7 views

### MMP algorithm, no metion of “in window” intersections

If you are familiar with the MMP algorithm for geodesic finding, you know an important part of the algorithm revolves around solving intersections of windows. I am running into a case that I don't see ...
0answers
34 views

### Are there algorithms besides Canny edge detection that can create consistent width edges?

Sobel edge detection is pretty much the quintessential way to get edges out of an image. It however suffers from certain quirks. One example is, because it's gradient, based certain surfaces exhibit ...
0answers
71 views

### Why isn't the 'Map Colors' fixup changing text colors?

I saw this question some where, I think Reddit, but I can't find it. I have same issue. Please see the screenshot beneath. I've uploaded the PDF to mega.nz I'm using Adobe Acrobat Pro DC Version 2019....
2answers
261 views

### Why is eye-based ray tracing preferred over light-based ray tracing?

It seems that virtually all path tracers use eye-based or view-based path tracing. That is, the light rays originate from the camera rather than the light source. The reason given for this everywhere ...
0answers
20 views

### Deferred Decals

What's the proper of way of calculating the coords to apply decals by let's say linear interpolation? My understanding is that you render your GBuffer albedo, specular, etc... and after that you do ...
1answer
16 views

### Get binding point of sampler/image in shader

I have an image and a sampler declared in a shader as follow layout(binding = 5) uniform isampler2D heightmap; layout(binding = 3) uniform writeonly uimage2D info; ...
1answer
59 views

### Let GPU write to itself

As someone who is trying to dive into WebGL for parallelizing simulations, or Machine Learning, or typical IIR filters I've come to realize that for everything that I want to do requires the GPU to ...
0answers
40 views

### Does ffmpeg or NVDEC (nvidia decoder) support YUV444 video input?

I tried feeding an .h264 video with YUV444 color format to ffmpeg in hardware decoding mode on a GTX 1660 and it looks like this color input isn't supported. I get an error in the ...
0answers
37 views

### Clipping 3D Perspective matrix

I am trying to implement clipping in my simple renderer, but i have a trouble with setting the boundaries. I used the same projection matrix that is in OpenGL. The problem is, the vertices that are ...
1answer
32 views

### OpenGL shader introspection/interface queries for images

I've been looking at Interface queries in order to prevent common mistakes that are time consuming to debug, such as forgetting to bind a buffer, binding the wrong resource type, etc. However, I wasn'...
1answer
52 views

### Is it possible to send Texture Buffer to shader dynamically?

I want to send a series of integer to the geometry shader, while the data will be modified every frame. But when I try to retrive the sampleBuffer in geometry shader, it seems to keep output zero. Am ...
0answers
46 views

### alternative to spherical harmonics to model radiance aproximation, optimized for real-time evaluation

I'm looking for a compact representation of radiance over the hemisphere that is also performant to evaluate in realtime (in a pixel shader). The purpose of it is to compress surface lightfields so ...
1answer
67 views

### Transfer the texture between two different sets of uv

Say I have a mesh with two sets of uvs. And I have a texture made for the first set of uvs. I would like to create a second texture that has the same relationship between its pixels and the second set ...
0answers
57 views

### How to retrieve data from Compute Shader to CPU?

I want to retrieve data that has created by the compute shader but have no clue how it works. After researching a few forums and articles on how it should work and this is what I came up with. Compute ...
1answer
88 views

### Procedural generation of biological models

I was wondering if anyone can point me in the direction of some research papers, or articles that describe a method for generating biological 3D models. I am drafting a prototype for a new game that ...
0answers
32 views

### What method is used for baking grayscale curvature maps

I'm looking for a way to generate curvature maps like this: The map stores the Convexity and Concavity of each pixel as a value from 0 to 1, where .5 is no curvature and 1 and 0 are the extremes. I ...
1answer
73 views

### Approximating Geodesics in a half edge DS, how can I refine my mesh to get good approximations

I implemented Djikstra's shortest path algorithm to approximate Geodesics on arbitrary meshes. Djikstra's works, but I noticed a problem inherent to the discretization of my meshes. Consider the ...
1answer
72 views

### BRDF for point lights should not return values over 1

This is standard Cook-Torrance BRDF in formulation for a single point light. No intergrals over a hemisphere, just a single direction to a source of incoming energy.  L_o = { \bigg ( (1-F) \frac{...
0answers
97 views

### Corrupt values when writing and reading from the same RWTexture2D in HLSL/DirectX?

I'm playing around with DirectX 12 ray tracing, and I'm trying to read and write data to a 32-bit RGBA floating point RWTexture2DArray within a DirectX 12 HLSL shader. I'm getting weird corruption/...
1answer
49 views

### Phong model: why no multiplication by N dot L in specular term?

Classical Phong reflection model, as described on wikipedia, computes diffuse and specular light as follows: ...
1answer
57 views

### Does atomic functions on same memory location cause an performance issue?

is it worse to do for each invocation an atomicAdd on the same memory location than doing for each invocation an atomicAdd to a unique memory location? (I know, atomicAdd does not make sense when each ...
0answers
52 views

### Conditionals and branching in shaders

This is a quite wide subject which implies a lot of topics such as the platform or the compiler, but I think that it could be useful for everyone to know more about this. A common mistake is to think ...
1answer
74 views

### How are textures projected onto 3d models in texture painting applications

In most modeling software you can texture paint onto 3d models using so called stencil textures. They basically project a texture from the viewport view onto the model as seen for instance in the ...
0answers
46 views

### Aligning (matching) colors (white balance, brightness) of two scenes based on reference object

What I am trying to do is to become able to compare with reasonable accuracy two real world fabric/textures (colorwise speaking) at two distinct locations. I can't move them into single place to ...
1answer
39 views

### Reading from buffer versus calculating on the fly performance

I am creating a fast fourier transform algorithm for the compute shader - i am no expert on how GPUs really run optimally so thought i would ask here. I have the option to calculate on the fly or ...
1answer
49 views

### When unsetting a VAO, should you also unbind the associated VBOs?

I'm working with a js/wasm/c++ program that uses object oriented programming when updating the OpenGL state. There are corresponding c++ classes for VBOs (vertex buffer) and VAOs (vertex array). ...
0answers
45 views

### What's a good research topic in Computer Graphics?

I am currently trying to find topics for my master's thesis. I would really like to do something in the field of computer graphics, but I've been having trouble finding what are some current problems ...
1answer
44 views

### How do you apply a normal map to a 3d mesh?

I'm writing my own mesh renderer, and I previously was able to apply a normal map to a sphere, so I understand the basic process of applying a normal map. But my understanding is that in order to ...
1answer
37 views

### Efficiently generating mesh for self-generated voxel grid

I'm working on an app that lets users construct a 3D house, with the ultimate goal of it being 3D printable. I use various materials in the form of a height map constructed from an image, like this ...
1answer
32 views

### OpenGL Framebuffer with multiple Depthbuffers inside

I am trying to put multiple depthbuffers into one Framebuffer. I want to use VR and render both eyes at the same time: that means, in the geometry stage I want to clone the incoming triangle to two ...

15 30 50 per page