21,172 questions
1
vote
2
answers
119
views
How can I replicate this image using Java2d?
I'm trying to replicate this image using java2d, and I've almost done it, but there's a slight difference.
In the original image, there are 4 circles overlapping in the center, but in my output there'...
-1
votes
0
answers
47
views
3D software renderer clipping issue: triangles disappear or have gaps when crossing the near plane (or screen edge) [closed]
I'm writing a software 3D renderer in Java (for learning purposes). I have implemented perspective projection, textures, lighting, Z-buffer, and backface culling. Everything works fine except clipping....
Advice
0
votes
7
replies
95
views
Why is my Perlin Noise algorithm not blending in between grid cells?
I have been trying to replicate Perlin Noise in Python using the Pygame module, the steps I took was this:
1. Window size is (1600, 1200) this window is split into a grid of 40 x 40 pixel Cells, so ...
Tooling
0
votes
0
replies
79
views
Tree-like data structure visualization/representation/drawing
There's a tree data structure with string nodes.
Is there a framework/library to draw this structured text tree into graphic context (CGContext)?
it's about calculating correct layout to represent it
...
0
votes
0
answers
34
views
D3D12 root descriptor binding breaks when reordering root parameters or adding resources
I'm running into a weird issue with D3D12 root signatures and root descriptors.
Right now I have a setup like this:
Shader:
ConstantBuffer<frameConstants> frameConstantsData : register(b0);
...
Advice
1
vote
6
replies
101
views
Whats a good choice as graphics API for small programs for different systems?
For a long time I wanted to create little programs like drawing a fractal utilizing a GPU instead of CPU. I would like to share those programs with friends and family. So while I am using Linux, some ...
Advice
0
votes
4
replies
56
views
Confusion on TextureHandle disposal in URP Render Graph
I was reading the TextureHandle documentation and noticed it mentions that we don’t need to manually dispose of a TextureHandle, since its lifetime is managed automatically by the Render Graph system.
...
1
vote
1
answer
52
views
I am trying to make a PPM file and I am only getting a singular pixel. How do I fix this?
I was following along with the "ray tracing in a weekend" e-book and I was attempting to do the first task of making a ppm file to produce an image. I have written some code but it only ...
1
vote
1
answer
98
views
Skybox cubemap artefact when depth buffer is enabled
I'm trying to optimise my skybox to only use one draw call. But unfortunately I have this output:
[
Disabling the depth buffer (by unbinding it) solves the issue, but objects drawn before the cubemap ...
Advice
0
votes
7
replies
138
views
Porting WPF to a faster rendering system
I made a WPF desktop application for Windows with C#, and when I basically finished it programming with a 1920x1200 pixel screen, I found out that the graphics rendering performance is way too slow on ...
0
votes
0
answers
54
views
In Godot, how can I use different culling distances for 2 different layers with a single camera?
I am building a 3D game in Godot 4.5.1. I need to keep the near culling distance on my camera at the default value in culling layer 1. However, I want the camera to have a lower near culling distance ...
4
votes
1
answer
187
views
How do I get the 3D rotation from one orthogonal basis to another (quaternion or matrix)
I have right, up, and forward normalized vectors that are all orthogonal for two orientations. How would I get the rotation between these two orientations.
This code would be used to get the rotation ...
Advice
1
vote
2
replies
77
views
Is optimization done at graphics pipeline creation time between stages?
The reason I'm asking this question is because I have cases in a vertex shader where I have:
layout (location = 0) out float3 outEyeSpacePosition;
layout (location = 1) out float2 out_tex_coords;
And ...
1
vote
1
answer
223
views
Are Vulkan validation layers injected even if they're not enabled on the Vulkan instance?
I discovered something rather surprising to me regarding the Vulkan validation layer that's used for error reporting and debugging. Usually in a debug build I will set the ...
0
votes
0
answers
93
views
Android logcat spam: TransactionCallbackInvoker writeReleaseFence failed. error 32 (Broken pipe) every frame in SurfaceView
I get this log continuously (every render frame):
E/TransactionCallbackInvoker: [SurfaceView(...)(BLAST)]
writeReleaseFence failed. error 32 (Broken pipe)
It comes from the system (SurfaceFlinger), ...
1
vote
0
answers
48
views
Want to get rid of "jagged teeth" from DTS simulator made in matlab
So I made a program in matlab that numerically simulates a DTS system and its almost right but there's one detail that there's "jagged teeth" in the graphic diagram ( circled in blue ) ...
Advice
0
votes
0
replies
41
views
Early Initialization of GPU, Weston, and Hypervisor Drivers with Deferred Systemd Services & modules
how to configure systemd to load essential graphics and virtualization modules early in the boot process, while deferring non-critical services & modules for manual activation later.
called gpu ...
2
votes
0
answers
90
views
How to render drop shadow like figma in Metal shader
I am new to Graphic programming and shaders and I am working on a Metal fragment shader that downscales a video frame by 20% and adds a soft drop shadow around it to create a depth effect. The shadow ...
0
votes
0
answers
59
views
Problems with fencing sporadic command buffer submission in Vulkan
I am invoking a compute shader, writing to it, then reading it to then write to disk.
According to renderdoc the image is properly generated. Additionally, when compiled in debug mode I get the right ...
3
votes
2
answers
152
views
What does a min filter do on the same mip level?
In a graphics API like Vulkan, you have VkFilter, which can be NEAREST or LINEAR. Leaving aside the mipmap filtering, which is another thing altogether, I'm trying to understand what the point of the ...
-2
votes
1
answer
223
views
DirectX debug layer dll version mismatch
I was learning directx by https://github.com/d3dcoder/d3d12book, and at one point, it suddenly started not working in Debug mode like this.
So I asked github copilot and he said that the problem was ...
1
vote
1
answer
151
views
Non-uniform access by indexing vs non-uniform access from a switch case or if-else statement
This question is supposed to be in the most general sense possible, this is because I'm using the Slang shading language to apply potentially to multiple graphics APIs.
In OpenGL and Vulkan the ...
2
votes
1
answer
90
views
Are storage buffers bounds-checked by default?
I found a comment on Reddit saying:
SSBO accesses are bound checked at runtime by the shader to prevent
segmentation faults (which is why the descriptor of a SSBO is a
pointer and size). I think this ...
1
vote
0
answers
156
views
Why does mouse look feel jittery in winit + wgpu despite smooth frame rendering?
Code
In the event loop, this arm handles mouse motion with the MouseMotion device event:
Event::DeviceEvent {
event: DeviceEvent::MouseMotion { delta: (dx, dy) },
..
...
1
vote
0
answers
75
views
Render Texture Triangle From Vertexes and Uvs
I'm attempting to render out part of a spritesheet to a new standalone texture. I have the triangles, vertexes and uv coords of my sprite but my code only correctly renders the first triangle not the ...
0
votes
1
answer
99
views
Ray-Tracing: Sphere not showing up. Is the intersection correct?
I am currently doing a ray-tracer. For a start, sphere ray-casting only. When trying to rendering a scene with three spheres two rendered as expected. The third did not. In the image bellow, one can ...
0
votes
0
answers
42
views
Why does PIL Image use inverse of affine transformation matrix as argument?
Affine transformations (rotations, translations, shears and scales) can be represented (for 2-D arrays of points) as 3x3 matrices. And it is immediately clear, by looking at this matrix, what the ...
1
vote
1
answer
110
views
C# SkiaSharp draws translucent pixels too dark
I'm working on a script that needs to take images and stack them. Image 0 at the bottom, image 1 over that, image 2 over that, etc. etc. with Image n on the top.
Essentially, I want the final product ...
0
votes
1
answer
57
views
Django, xhtml2pdf cannot add to canvas properties
I'm trying to create some pdf bar charts in my Django project using xhtml2pdf (which I find easier to use than ReportLab and better than Weasyprint). I can use the example given in the xhtml2pdf docs ...
6
votes
1
answer
155
views
More than one dot in legend
I have created the first figure using legend normally.
I would like to have more than one dot in the legend, so the colours are easier to recognize there, as in the second figure (which I created ...
1
vote
2
answers
181
views
How to make shapes, drawn on a form, resilient to changes in display's resolution / scale
An elegant solution for drawing polygons on a form was proposed by Jimi, as part of an answer to the question Why am I getting an extra line when drawing polygons? (see attached code).
I designed the ...
0
votes
0
answers
58
views
How can I fix self-shadowing artifacts in my BGFX shadow mapping shaders?
I would like some help with me shadow mapping. The issue I am having, I am assuming is with self shadowing. It is like the shadow is not mapped to my model correctly.
See image to see what it looks ...
5
votes
1
answer
186
views
Why am I getting an extra line when drawing polygons?
After some advice from kind people over here, I managed to have my code working. However, an extra line, from the origin of the form to the first polygon point, is also drawn.
I would like to learn ...
0
votes
0
answers
70
views
How to filter a curve to prevent overlap of segments during rendering
I have a sequence of points in 2d that are rendered as a thick line by using quads.The quads are formed by extruding the curve around its center line in the normal direction.
The figure is showing a ...
5
votes
1
answer
160
views
Rotate an image with transparent background
I have trouble rotating images with transparent background while retaining a transparent background. magick::image_rotate() adds a white background with a gray border (I think due to anti-aliasing).
...
-1
votes
1
answer
48
views
Issue with Zooming when projecting 3D on to a 2D surface
Please note that this is a learning exercise for me, so I am not using third-party libraries or matrix transformations provided in .NET. The example included below displays a cube on a form and allows ...
2
votes
0
answers
89
views
How to properly render a 2D outline in Unity?
I try to render a box, but I noticed that the thickness is displayed very inconsistently:
Meaning that the line to the south might appear much thicker than the other lines (but it is not always south)...
1
vote
1
answer
53
views
How to avoid transitioning between two image layouts for an image frequently
I have the case that I want to sample from an image as a texture and write to it at the same time. The actual use case is that the image contains information pertaining to a city for a city builder. ...
-1
votes
1
answer
205
views
3D projection without matrices breaks on negative distance
I am drawing edges of triangles and quads with rotation and changing camera position, without projection matrices but multiplication and division, however I can not figure out what happens to the ...
0
votes
2
answers
390
views
Godot Engine - How to prevent z-fighting
As a beginner in Godot Engine, my first project to practice is to create a skin editor for the game Minecraft. I created a grid as a MeshInstance3D for each cube (body part) but the render looks ugly. ...
1
vote
0
answers
247
views
C++ Raylib issue with finding Collisions with Mesh when mesh DrawModel() Position is not work center
I am trying to make a game which requires checking collisions with the players camera. When trying to handle collisions I found that I was not able to detect collisions with a Model unless the ...
3
votes
1
answer
105
views
glBegin(GL_QUADS) is not drawing a kite
I am trying to draw a kite:
...using glBegin(GL_QUADS):
// g++ main.cpp -lopengl32 -lgdi32 -municode
#include <windows.h>
#include <GL/gl.h>
#include <cstdlib> //system
#include &...
0
votes
0
answers
109
views
Implement a Custom Sampler in Mitsuba
I am trying to implement a basic custom sampler, and here is the code that I have been working with. As I attempt to render the scene, I encounter an error stating that the traverse() method is not ...
1
vote
1
answer
75
views
Hover text for multiple heatmap traces in an R plotly plot
This is something of a follow-up question from this one. Ultimately, I have a plotly plot that seems to be treating separate traces as the same and producing unexpected behavior. I'm trying to figure ...
3
votes
1
answer
180
views
Is there a way to get the index of a draw call?
I know there's gl_VertexIndex and gl_VertexID, but let's just say I have an index buffer that looks like:
[3, 0, 4, 1, 2, 3]
The first vertex processed in the vertex shader with an indexed draw ...
0
votes
2
answers
92
views
Is it possible to take references to avoid copies in shader languages?
I have used GLSL and Slang, and in my GLSL code I have very verbose code because I repeat the same code over and over:
obj_scaling = vec3(object_info_arrays[nonuniformEXT(...
1
vote
0
answers
74
views
Circular artifacts when performing deferred shading
I finally managed to add realistic realtime rendering to my software. Now I am facing some "banding" artifacts when performing the actual shading. The test scene is straightforward. It ...
1
vote
0
answers
61
views
Artifacts in PCSS realization
I'm trying to write my own 3d renderer. I'm stuck in the shadow stage. I can't figure out what I'm doing wrong with the PCSS implementation. At the edges of tall objects, the shadow becomes sharp.
I ...
0
votes
0
answers
78
views
White Screen on DesmuMe emulator while using devKitPro to make a game
I was doing a game while testing it in NO$GBA emulator, until now that I tried to use Desmume to try it out there when it only shows up a white screen.
Also this error shows up: "Undefined opcode ...
0
votes
1
answer
216
views
In vkAcquireNextImageKHR what's the difference between the timeout argument and the fence to signal?
The vkAcquireNextImageKHR has arguments:
timeout specifies how long the function waits, in nanoseconds, if no
image is available.
fence is VK_NULL_HANDLE or a fence to signal.
If I provide a fence ...