Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes

Is there a method to do ray marching style modulus repeat with raytracing?

I've tried to figure this out as well, but I don't think there is a solution that is just as performant as tracing one sphere. Basically you would want to cast one ray to hit a infinite set of ...
zackpudil's user avatar
7 votes
Accepted

Volume Rendering (Path Tracing & Real-Time)

Ray marching is a ray tracing method where you take multiple steps along a ray to find intersection with geometry or to perform integration of in-scattered light from participating media (fog, clouds, ...
JarkkoL's user avatar
  • 3,636
6 votes
Accepted

Volumetric integration in Frostbite

What is wrong with it seems to be explained on the next two slides: it leads to non-energy-conserving results, where the apparent brightness of the volume changes depending on the scattering ...
Nathan Reed's user avatar
5 votes
Accepted

How to compute normal of surface from implicit equation for ray-marching?

The usual way of doing this with raymarching is to define your surface as a signed-distance field and use finite differences to get the gradient of the distance function at the point you’re sampling. ...
Noah Witherspoon's user avatar
4 votes
Accepted

How to align Ray Marching on top of traditional 3D rasterization?

The problem, I think, is that you are comparing two different kinds of depth values. For want of better terms, the rasterizer's depth buffer stores 'parallel' depth, whereas raymarching calculates '...
russ's user avatar
  • 2,392
3 votes
Accepted

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

It depends on your setup. Of course you can normalize the direction to have length 1, but it is usually unnecessary. The following figure depicts the differences: Round frustum end face Flat frustum ...
Enigmatisms's user avatar
3 votes
Accepted

mapping 3d texture on view frustum (or part of it)

In techniques I've seen that use a frustum-aligned voxel grid (so-called "froxels"), it looks like option 2 in your diagram. The voxels are cuboids in post-projective screen space, so when transformed ...
Nathan Reed's user avatar
3 votes

Vulkan Ray Tracing analogue of Optix's OPTIX_BUILD_INPUT_TYPE_CURVES

I don't think vulkan has any way of natively doing curves. I think you will need to program it yourself using VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR, by providing your own bounding ...
Peter's user avatar
  • 529
3 votes
Accepted

Ray Tracing With Continuous Refraction

You can refer to the available literature on the topic. The papers I am aware of are: Ray Tracing in Non-Constant Media and Interactive Rendering of Non-Constant, Refractive Media Using the Ray ...
lightxbulb's user avatar
  • 2,226
3 votes
Accepted

Is there a better, more elegant way of translating/rotating my camera in my 3d raymarched world or am I stuck with trigonometry?

A reliable way of getting the forward/left directions relative to the view is to use the camera rotation matrix itself to produce forward, Up and right vectors. ...
PaulHK's user avatar
  • 2,322
3 votes
Accepted

Rendering a particle system as a smooth blob

For culling faraway particles: as lightxbulb said, the keyword to search for is "acceleration structure". There are a variety of options: BVH, octree, kd-tree, uniform grid, or some ...
Nathan Reed's user avatar
3 votes

How can I convert signed distance field to a mesh?

with CGAL you can generate mesh by implicit function. https://doc.cgal.org/latest/Mesh_3/index.html Search for "implicit". There is an example of generating meshes from the funciton of a sphere.
Zesen Qian's user avatar
2 votes

Is there a method to do ray marching style modulus repeat with raytracing?

If you want to warp the space as in the raymarching infinite spheres example, ...
cmarangu's user avatar
  • 121
2 votes
Accepted

Reading thesis on cone tracing, did the author make a mistake?

It’s kind of inaccurately stated—by comparing the SDF with a linearly increasing radius, the shape that’s being traced out is a cone with a hemisphere on the end, something like this: At any point ...
Noah Witherspoon's user avatar
2 votes

How can I convert signed distance field to a mesh?

After many research I figured out how it works: he defined three buffer in glsl and i get 3 sampler2D for multipass, in each fbo attachments. the params are (buffer : file : id) file is the targeted ...
Seyed Morteza Kamali's user avatar
2 votes
Accepted

Why does UV tiling affect performance in volumetric ray marching?

It sounds like you are experiencing a loss of texture cache hit rate on your 3D texture. As with any modern processor, GPUs have a cache hierarchy. Texture units typically read from a local L1 cache, ...
Nathan Reed's user avatar
1 vote
Accepted

understanding SDF[Signed Distance Functions] for a torus

This turned into a rabbit hole for me hopefully it helps answer your question, I recommend trying out the various functions on the ShaderToy website. Just drop them in and change the call to "...
pmw1234's user avatar
  • 3,219
1 vote

understanding SDF[Signed Distance Functions] for a torus

The following video discusses the SDFs of various primitives (linked to torus section): https://youtu.be/Ff0jJyyiVyw?t=491 It discusses a torus but not the capped variant. The rest of the channel has ...
dubious's user avatar
  • 113
1 vote

How to calculate ray-origin and ray-direction in vertex shader working universally for any projection and using interpolators for performance

There is no universal solution here since there are many different small variations that can be applied to get a specific result. One of the things that trips people up when computing ray's in the ...
pmw1234's user avatar
  • 3,219
1 vote

Glitches with raymarcher shader

The code isn't taking enough steps for the ray to hit anything where the sphere and the floor meet. minF is smaller in that region, so the ray marches forward until it runs out of steps and then gives ...
pmw1234's user avatar
  • 3,219
1 vote

Porting from DXR/HLSL to Vulkan Ray Tracing Extension/GLSL

As I understand GLSL_EXT_ray_tracing.txt, gl_RayTmaxEXT contains the current t in intersection shaders, due to the following pieces of information given in ...
j00hi's user avatar
  • 131
1 vote

Porting from DXR/HLSL to Vulkan Ray Tracing Extension/GLSL

According to this document, one should be able to extract those values through gl_RayTminEXT and gl_RayTmaxEXT GLSL built-ins for intersection shader. Further comments are welcome.
Vectorizer's user avatar
1 vote
Accepted

SSR/RTLR - hitting object/ending condition

The termination condition is that the ray passes through the surface represented in the depth buffer. To track this, you have to calculate the z position of the ray at the current step, and compare it ...
Nathan Reed's user avatar
1 vote

Parallax/relief mapping with gl_FragDepth and conservative depth

Unfortunately, gl_FragDepth won't enable you to write outside of the rasterized triangle's screen-space bounds. All it enables is to modify the values written to ...
Nathan Reed's user avatar
1 vote

Volume Rendering: Implementation

For your first question, the basic process should be (simplified version): ...
Enigmatisms's user avatar
1 vote

Frustum aligned volume integration - aliasing issue - temporal reprojection

You can look into alias-free volumetric sampling algorithm by Huw Bowles for potential solution to the ray marching aliasing issues. The basic idea is to snap your samples to planes based on the ray ...
JarkkoL's user avatar
  • 3,636
1 vote

Frustum aligned volume integration - aliasing issue - temporal reprojection

Well actually I think I was doing it wrong. I stored raymarching effects in 2D texture. This is not correct because it suffers from issues. Correct way is store raymarching effect in 3D texture, to ...
mdkdy's user avatar
  • 2,169

Only top scored, non community-wiki answers of a minimum length are eligible