Questions tagged [raymarching]
38 questions
1
vote
1 answer
Why are my Ray march fragment shader refelction texture lookups slowing my frame rate?
I’ve written a Fragment shader in GLSL, using shader toy.
Link : https://www.shadertoy.com/view/wtGSzy
most of it works, but when I enable texture lookups in the reflection function, the performance drops from 60FPS to 5~FPS.
The code in question is…

Minty
- 103
- 7
1
vote
0 answers
Collision detection between non-uniform signed distance fields?
Hi folks:) this is my first question and I hope this is not a too unspecific/broad question to answer to.
I am very excited about Ray Marching (Sphere Tracing specifically) and the ability to render based on 'distance' between points and objects…

ich.
- 17
- 4
1
vote
1 answer
Large-scale volume rendering and visualization libraries for terabyte-size data
I want to visualise 3D volumes of data that span between a few gigabytes to a few terabytes. One solution would be to roll my own but this may take some time. To avoid this I am currently exploring what are current available solutions. The more I…

AstrOne
- 3,569
- 7
- 32
- 54
1
vote
0 answers
How to prevent artefacts on rotationg glsl raymarching surfaces
I am learning about raymarching in GLSL, and have drawn basic understanding from http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm and various shaders on the ShaderToy website.
I have created a shader where I use the signed…

DatHydroGuy
- 1,056
- 3
- 11
- 18
1
vote
1 answer
Volume rendering is more transparent from one direction that another
I'm trying to get my head around volume rendering using three.js and ray marching GLSL. I've got some data I synthesised from a numpy array.
The cube of data being rendered is more opaque on one side, graduating to being transparent on the other…

nrob
- 861
- 1
- 8
- 22
0
votes
0 answers
Raymarching orthographic view
I need to calculate ray origin and ray direction vector for ray-marching orthographic view.
I know that ray origin must move for each pixel and not stay from center and I believe this formula ro = ro + vec3(v_UV * orthRectSize, 0.); should work.
I…

Bobi 1
- 33
- 7
0
votes
0 answers
Ray marching on non-enclosed SDF
I am trying to implement ray marching rendering of some SDF and these SDFs represented interfaces and top surface of a structure with material regions distributed between adjacent SDF represented surfaces. In my case, new material regions are…

Plasma
- 1
- 1
0
votes
1 answer
Raymarching - depth calculation
I wrote a simple ray marcher (goal is a nice volumetric fire), but I am stuck with this one issue presented on the screenshot below:
when I am close enough, the depth test works correctly, but a tiny jerk backwards, and the box suddenly is…

Breeze
- 37
- 5
0
votes
1 answer
How to understand the simpler calcNormal function?
I'm reading shadertoy tutorial here:
https://inspirnathan.com/posts/52-shadertoy-tutorial-part-6
there is a normal method to calculate the normal of the sphere:
vec3 calcNormal(vec3 p) {
float e = 0.0005; // epsilon
float r = 1.; // radius of…

tankin
- 1
- 1
0
votes
0 answers
Screen-space shadows producing white result
I've been trying to learn screen-space techniques, specifically Ray-marching ones but I have been struggling to get a single working example to continue learning from and solidify my knowledge. I'm implementing Screen-space shadows following this…

Krellex
- 613
- 2
- 7
- 20
0
votes
0 answers
How render 3D render texture in a Unity3D custom shader
Hi is it possible to render a 3d render texture on a custom shader raymarching like a 3dtexture?
I use a 3D render texture because I calculate and set the color of the 3D volume in a compute shader. I set the rendertexture 3D as shown…

Sergio Solorzano
- 476
- 9
- 29
0
votes
2 answers
Access Function Outside of Shader
I'm attempting to develop a game using OpenGL that renders a scene via a raymarching algorithm in a fragment shader. I intend to implement collision using the same signed distance field function that was used to render the scene.
What I'm trying to…
0
votes
2 answers
How to get the closest Axis-Aligned Bounding Box to a point?
I have a large array of Axis-Aligned Bounding Boxes, I'm trying to get the euclidean distance from a point to the closest one, I have tried manhattan distance but it doesn't seem to match the "brute force" result by iterating over all of them with…

Doofus
- 3
- 1
0
votes
1 answer
My raw primitives cannot be displayed in Raymarching
I encountered a very strange problem while learning Raymarching.
My equation cannot be displayed well.
It can be displayed well in matlab. But it can't be shown on Shadertoy at all.
My equation:
f(x,y,z) =…

Joy900
- 1
0
votes
1 answer
How can I correctly translate/rotate my camera in my 3d raymarched world
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 for several years but having zero experience with…

Arthur Visser
- 51
- 6