The 2024 Developer Survey results are live! See the results

# Questions tagged [raymarching]

The tag has no usage guidance.

35 questions
Filter by
Sorted by
Tagged with
25 views

### Ray direction in VR (Vision Pro)

I am trying to calculate the ray direction for each pixel in a post processing shader on the Vision Pro for raymarching. I am using the inverse of the projection matrix created from the tangents ...
• 101
91 views

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

I’ve recently gotten into shader art , using sites like shadertoy and various tutorials for getting started. One thing I noticed is that a typical setup involves ray marching whereby: We set a ...
• 133
124 views

### Raymarching Refraction

I'm sorry if this question is imprecise, or violates any guidelines. This is my first post on Stack Exchange, so any feedback is welcome. I am working on a ray-marcher in my spare time, which you can ...
1 vote
751 views

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

I have been reading and watching many raymarching tutorials, but almost all of them are only working in the perspective projection. Almost all assume, that to calculate the ray direction, you just ...
• 111
70 views

### "Smoothing out" raymarched reflections

I am writing a program to display 3-dimensional lattices (honeycombs) using raymarching and reflections. I made a simple cubic honeycomb to start. The usual method is to use a repetition operator, by ...
• 101
58 views

### Volumetric Renders become brighter as the focal length changes

Before we start, I have to warn yall, this program was written in VEX. Which is a programming language for Houdini. So it is a language within a 3D software. Its not really meant for this sort of ...
• 121
162 views

### Glitches with raymarcher shader

I have been programing a simple ray marcher with GLES, using The Book of Shaders editor. I noticed that on scenes with multiple objects (multiple SDFs), I am getting glitches on edges of object which ...
145 views

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

I am working on the port of a demo from DXR to Vulkan Ray Tracing extension using GLSL. In DXR/HLSL space, there are RayTMin() and RayTCurrent() functions to retrieve the starting and the current end ...
• 309
1 vote
136 views

### Vulkan Ray Tracing analogue of Optix's OPTIX_BUILD_INPUT_TYPE_CURVES

Optix has OPTIX_BUILD_INPUT_TYPE_CURVES to model splines. The SDK comes with an example named optixHair. I could not find something like this under Vulkan RayTracing Extension, how could one implement ...
• 309
1 vote
332 views

### Ray Tracing With Continuous Refraction

I want to write a simple ray tracing(?) algorithm in WebGL with continuous refraction. So my idea was, what if you have a material whose optical density varies continuously, if this is physically ...
• 127
1 vote
37 views

### Distance to arbitrary set of line segments acceleration structure?

Background: I'm trying to render lightning within a volumetrically rendered cloud. I'm currently using a series of line-segments to represent lightning. At first I used a distance field rendered into ...
• 280
250 views

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

What I am trying to achieve So I'm a fractal enthusiast and decided to build a 2D/3D fractal generator in WebGL using raymarching, with Typescript as scripting language. I've been a C#/Typescript dev ...
145 views

### SSR/RTLR - hitting object/ending condition

My main problem is: When I'm raymarching (should I use View Space or Screen Space/Clip Space?), how do I determine condition to end marching and find which UV's color should be used? My current code ...
190 views

### Why does UV tiling affect performance in volumetric ray marching?

I am building a volumetric ray marching shader in HLSL in Unreal Engine, based on Ryan Brucks’ work: https://shaderbits.com/blog/creating-volumetric-ray-marcher I am trying to add some additional ...
919 views

### Ray-Marching: Rendering a Voxel Grid with Proper Normals

Dear Computer Graphics SE, I have a RAYMARCHING renderer, that looks up voxel data from a 3D texture. Each cell in the texture can be 0 or 1. I have a very simple algorithm for calculating the signed ...
1 vote
383 views

### Combining two images based on their depth maps

Lets assume, we have two depth maps with us and their corresponding color maps. Now, our task is to populate a final image that will be displayed. Each pixel in the final image needs to be calculated ...
• 111
1 vote
3k views

### understanding SDF[Signed Distance Functions] for a torus

This topic would contain a lot of sub questions because I have one for each shape but for today I just want to understand the function for a torus and a capped torus This is the article for all shapes ...
• 179
1 vote
286 views

### Rendering a particle system as a smooth blob

What is a good algorithm for rendering a particle system as a coherent mesh, in realtime? I am running a smoothed-particle hydrodynamics fluid simulation, and I would like to render the particles not ...
• 312
638 views

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

I am reading this document that talks about signed distance field rendering. In that document section 6.3, on the topic of cone tracing, it says: Cone tracing is an extension of the sphere tracing ...
• 1,746
254 views

### Volume Rendering - Dataset not rendered correctly

So Im trying to implement a Volume Renderer mainly for medical images like CT-scans and MRI images using GPU raymarching. I'm using the book "Real Time Volume Graphics" and this tutorial as a refernce....
• 2,478
1k views

### Can I use Path tracing together with Ray Marching?

So I'm trying to render participating media like clouds/sky/fog (Sky is the first step) etc. I had already implemented a normal pathtracer and I was thinking of extending it. But I heard terms like ...
• 2,478
167 views

### How does Voxel Cone Tracing solve the rendering equation? [duplicate]

so I am not new to interactive graphics programming, but I wanted to try out advanced techniques. Currently I am struggling to understand how the author of the 2011 paper "Interactive Indirect ...
• 121
4k views

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

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation. For instance, we can consider the equation of an ellipsoid given as:  \frac{x^2}{a^2} + \frac{y^2}...
• 153
2k views

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

I'm trying to apply raymarching on top of 3D rasterization, ordering what 3D object gets displayed based on the depth of a rasterization pass and the raymarch depth. After getting the transform ...
• 280
10k views

### How can I convert signed distance field to a mesh?

I can easily make models by Modeling with Distance Functions but I need make mesh from It so I decide to use voxelizing and make triangles for my signed distance field torus like this video.but I ...
1 vote
364 views

### Not understanding the lighting equation for volumetric cloud rendering

I've been looking The Real-time Volumetric Cloudscapes of Horizon-Zero Dawn, but I'm very confused by a few terms. The presentation mentions "The Henyey-Greenstein phase function" on page 54, ...
• 280
708 views

### Parallax/relief mapping with gl_FragDepth and conservative depth

New to writing shaders, please forgive any naivety in the question! Parallax mapping in any of its ray-marchy variants (e.g. steep parallax, cone step mapping, POM) generates fake geometry on a ...
• 151
435 views

### Volumetric integration in Frostbite

In their presentation at SIGGRAPH 2015 Electronic Arts presented method of volumetric rendering using 3D texture aligned with view frustum. This technique needs two steps: Injection of color and ...
• 2,169
835 views

### Volume Rendering: Implementation

Can somebody explain how to implement volume rendering and scattering? I've been told that this is the easiest and most effective method to render things like smoke, milk and fog. Scratchapixel has ...
• 2,521
2k views

### Volume Rendering (Path Tracing & Real-Time)

I have a few doubts and questions regarding volume rendering, I was hoping someone here could help me understand. I commonly hear the terms 'Ray-Marching' & 'Volume Rendering' being used together ...
• 2,521
4k views

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

One of the features of ray marching is that you can use modulus to repeat shapes infinitely, like in the image below, which is from https://www.shadertoy.com/view/MsBGW1 I was curious if there exists ...
• 7,801
485 views

### Frustum aligned volume integration - aliasing issue - temporal reprojection

Raw volume raymarching especially aligned with frustum seem to produce a lot of aliasing/banding on edges of shadow map. Especially when fragment pos is far because step length is then getting bigger. ...
• 2,169
873 views

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

I'm implementing volumetric fog in my OpenGL renderer. First I inject color into 3D texture using compute shader, atomic operations and shadow map visibility check. The information I use to compute ...
• 2,169
190 views

### Ray-based rendering terms [closed]

There are a number of terms for rendering techniques based on the particle model of light: forward ray-tracing, reverse ray-tracing, ray-casting, ray-marching, and possibly others. What's the ...
• 1,612