https://github.com/saggre/raymarch-engine
A game engine that renders primitive objects by utilizing raymarching
https://github.com/saggre/raymarch-engine
3d ambient-occlusion blinn-phong directx game-engine raymarching rendering sharpdx signed-distance-functions subsurface-scattering
Last synced: 19 days ago
JSON representation
A game engine that renders primitive objects by utilizing raymarching
- Host: GitHub
- URL: https://github.com/saggre/raymarch-engine
- Owner: Saggre
- Created: 2019-09-27T19:09:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T11:53:06.000Z (almost 4 years ago)
- Last Synced: 2025-05-12T17:22:23.479Z (11 months ago)
- Topics: 3d, ambient-occlusion, blinn-phong, directx, game-engine, raymarching, rendering, sharpdx, signed-distance-functions, subsurface-scattering
- Language: C#
- Homepage:
- Size: 14.1 MB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Raymarch Engine (WIP)
A game engine that renders primitive objects by utilizing raymarching. Different operations can be applied to the
primitives to create more complex objects. The engine uses `SharpDX` as its `DirectX`
wrapper and `System.Numerics.Vectors` for Vectors, Quaternions and Matrices.
Raymarch shader code is located [here](Shaders/Raymarch/Pixel.hlsl).
## Live rendering preview
### Things to look for:
- The preview has four different primitives (octahedron, box, sphere, plane). And one light source.
- All objects cast and receive shadows. These are fully dynamic.
- Octahedron, sphere and plane have reflections.
- All objects have Blinn–Phong shading as a base.
- The octahedron has subsurface scattering. light penetrates its thin edges, making them appear lighter.
- The box has rounded corners as a result of a rounding operation being applied to it.
- There is ambient occlusion and blue noise applied to the view space.
- Some purple-ish distance fog is visible in the background.
- Raymarched objects have infinite resolution (signed distance function = no mesh).

## Requirements:
- .NET Framework 4.8
- C# 7.3+
- DirectX 11
- Shader Model 5 support
- A capable GPU
## Supported primitives:
- Sphere
- Box
- Plane
- Torus
- Capped torus
- Ellipsoid
- Capsule
- Hex prism
- Cone
- Cylinder
- Pyramid
- Octahedron
- Rhombus
## Supported operations:
+ Rounding
+ Infinite repetition
+ Union
+ Subtraction
+ Intersection
+ Onion slicing
## Current features and future work:
- :heavy_check_mark: Basic gameobjects
- :heavy_check_mark: Basic shading (Blinn–Phong)
- :heavy_check_mark: Ambient occlusion
- :heavy_check_mark: Subsurface scattering
- :heavy_check_mark: Blue noise
- :heavy_check_mark: Reflections
- :heavy_check_mark: Soft shadows
- :heavy_minus_sign: All primitives
- :x: Dynamic sky
- :x: Custom resolutions
- :x: Color blending between shapes
- :x: Fractals
- :x: Physics
- :x: Custom shader code editor
- :x: Checkerboard rendering
- :x: Pre-compiled shaders
- :x: OpenGL support
- :x: Hyperbolic and spherical spaces