1,085 questions
0
votes
0
answers
18
views
How to handle negative texture coordinates in a CPU raytracer
Years ago I implemented a CPU raytracing software and things work properly. I then implemented a DirectX 12 viewer. I just found out there is some discrepancies between my 2 implementations when i t ...
1
vote
1
answer
45
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 ...
0
votes
1
answer
98
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
39
views
How to get exact position back after DDA algorithm
I have implemented the DDA algorithm in a voxel raycaster, which is working well, but I now want to cast from where it hits towards the sun, for basic shadows, but that requires "restarting" ...
0
votes
2
answers
284
views
Fastest way to accumulate (reduce) a StructuredBuffer<float> in a compute shader
I've got a RWStructeredBuffer<float> tau I'm writing to in a ray generation shader rayGen. The DispatchRays dimension are (tauWidth, tauHeight, 1) and tau has exactly tauWidth * tauHeight ...
0
votes
1
answer
131
views
UI not updating during render
I've coded a small raytracer that renders a scene (based on Peter Shirley's tutorial, I just coded it in Swift). The raytracer itself works fine, outputs a PPM file which is correct. However, I was ...
0
votes
0
answers
56
views
How to use the same name for different types in Metal and Swift while ensuring correct alignment?
I'm writing my ray tracing game engine in Swift and Metal on my Mac. So it is very necessary to make full use of the natural optimize of Metal.
My current version can work, but it is incredibly slow ...
1
vote
0
answers
83
views
Why my Metal kernel function accepts a empty value?
I'm developing my own game engine.
It is for Apple devices so I write it in Swift + Metal.
I firstly write it in C on CPU. After I finished and tested all of the functions and I'm sure that it can ...
0
votes
0
answers
107
views
Inconsistent results with my C# Fast Voxal Traversal Algorithm (Amanatides & Woo)
I'm trying to implement this algorithm in C#, but I have very inconsistent results at the moment, and I can't figure out why.
Here is my current implementation :
public static IEnumerable<Point> ...
1
vote
0
answers
87
views
How to correctly add point light and reflection values in an ray tracing system?
I'm working on a small ray tracing project and I'm trying to add a point light system to my rendering engine. Here's an excerpt of my main ray_color function, which calculates the color of a ray based ...
-3
votes
1
answer
100
views
Device doesn't have PIPELINE_EXTENSION_NAME even though rayTracingPipeline is supported
When I give pointers to extension structs to be filled in when I call vkGetPhysicalDeviceFeatures, the rayTracingPipeline flag is 1, meaning it should be supported, and pretty all the flags in ...
0
votes
1
answer
148
views
Draw each rendered scanline in windowed raytracer? [closed]
I'm refactoring a raytracer to have a window pop up that shows each scanline produced instead of having to wait for the ppm image to be rendered and open it with some ppm viewer.
I've been advised to ...
1
vote
1
answer
158
views
Smart pointers vs raw pointers for raytracer [closed]
I wrote a toy raytracer following the popular raytracing in one weekend series that uses heavily shared_ptr for more or less everything. The codebase in nice and tidy but extremely slow (a 400x400 ...
2
votes
0
answers
118
views
How to convert camera space to world space given Camera Vector and Ray vector in camera space
How can i convert a camera space vector to world space, given the camera direction vector, and the camera space vector?
All vecs are normalized 3D vectors, and the camera space projection is correct ...
1
vote
3
answers
204
views
Parallelized ray tracer is slower than single thread version
i'm writing a raytracer based on the popular raytracing in a weekend series.
i've tried to parallelize it by dividing the image in slices and give each thread a portion of the image to render:
void ...