All Projects → marklundin → Glsl Sdf Primitives

marklundin / Glsl Sdf Primitives

Licence: mit
A bunch of distance field primitives for ray marching

Labels

Projects that are alternatives of or similar to Glsl Sdf Primitives

Shadows
Shädows - A Shadows & Lights engine for löve
Stars: ✭ 134 (-11.84%)
Mutual labels:  glsl
Shader minifier
Minify and obfuscate GLSL or HLSL code
Stars: ✭ 141 (-7.24%)
Mutual labels:  glsl
Glslang
Khronos-reference front end for GLSL/ESSL, partial front end for HLSL, and a SPIR-V generator.
Stars: ✭ 2,034 (+1238.16%)
Mutual labels:  glsl
Sketch
Explorations on cross-hatching, engraving, and similar non-photorealistic rendering.
Stars: ✭ 136 (-10.53%)
Mutual labels:  glsl
Forge
High Performance Visualization
Stars: ✭ 140 (-7.89%)
Mutual labels:  glsl
Shaderc Rs
Rust bindings for the shaderc library.
Stars: ✭ 143 (-5.92%)
Mutual labels:  glsl
Cute Deferred Shading
Cute little deferred shading implementation.
Stars: ✭ 129 (-15.13%)
Mutual labels:  glsl
Wombat
An efficient texture-free GLSL procedural noise library
Stars: ✭ 149 (-1.97%)
Mutual labels:  glsl
Glsl Color Spaces
Utility functions to convert between various color spaces in GLSL
Stars: ✭ 141 (-7.24%)
Mutual labels:  glsl
Fsynth
Web-based and pixels-based collaborative synthesizer
Stars: ✭ 146 (-3.95%)
Mutual labels:  glsl
Godot3 shaders
Godot shaders experiments
Stars: ✭ 135 (-11.18%)
Mutual labels:  glsl
Quark Shaders
A repository of GLSL #150 pixel shaders for use with byuu's Higan emulation package.
Stars: ✭ 140 (-7.89%)
Mutual labels:  glsl
Godot Cel Shader
A Cel Shader for the Godot Engine
Stars: ✭ 145 (-4.61%)
Mutual labels:  glsl
Bookofshaders Godot
BookOfShaders in Godot Shader Language
Stars: ✭ 134 (-11.84%)
Mutual labels:  glsl
Retrace.gl
Create, ray trace & export programatically defined Signed Distance Function CSG geometries with an API suited for generative art - in your browser! 🎉
Stars: ✭ 149 (-1.97%)
Mutual labels:  glsl
Wisdom Shaders
A Minecraft shaderspack. Offers high performance with high quality at the same time.
Stars: ✭ 132 (-13.16%)
Mutual labels:  glsl
Godot Water Shader Prototype
Water Shader Prototype for Godot
Stars: ✭ 143 (-5.92%)
Mutual labels:  glsl
Twigl
twigl.app is an online editor for One tweet shader, with gif generator and sound shader, and broadcast live coding.
Stars: ✭ 145 (-4.61%)
Mutual labels:  glsl
Glowingobjectoutlines
A technique for Glowing Object Outlines in Unity.
Stars: ✭ 149 (-1.97%)
Mutual labels:  glsl
Glsl
GLSL parser for Rust
Stars: ✭ 145 (-4.61%)
Mutual labels:  glsl

Modeling with distance fields

A collection of distance field equations for modeling and ray-marching basic primitives shapes. Primitives can be combined and modified to create more complex shapes using glsl-sdf-ops.

Ray traced primitives

The library is glslify compatible. An demo exists here.

These were taken from iQ's excellent distance functions page

Usage

vec2 doModel(vec3 p);
#pragma glslify: raytrace = require('glsl-raytrace', map = doModel, steps = 90)

// import a primitive
#pragma glslify: sdTorus 	= require('glsl-sdf-primitives/sdTorus')

vec2 doModel(vec3 p) {
  return vec2( sdTorus( p, vec2( 0.20, 0.05 )), 0.0 );
}

Primitives

Signed Sphere

sdSphere( vec3 position, float radius )

Signed Box

sdBox( vec3 position, vec3 dimension )

Unsigned Box

sdBox( vec3 position, vec3 dimension )

Unsigned Rounded Box

sdBox( vec3 position, vec3 dimension, float rounding )

Signed Plane

sdPlane( vec3 position, vec4 planeEquation )

Signed Torus

sdTorus( vec3 position, float hole )

Signed Capped Cone

sdCappedCone( vec3 position, vec2 dimension )

Signed Capped Cylinder

sdCappedCylinder( vec3 position, vec2 dimension )

Signed Capsule

sdCapsule( vec3 position, vec3 a, vec3 b, float radius )

Signed Cone

sdCone( vec3 position, vec2 dimension )

Signed Cylinder

sdCylinder( vec3 position, vec2 dimension )

Signed Hexagonal Prism

sdHexPrism( vec3 position, vec2 dimension )

Signed Triangle Prism

sdTriPrism( vec3 position, vec2 dimension )

Unsigned Quadrilateral

udQuad( vec3 p, vec3 a, vec3 b, vec3 c, vec3 d )

Unsigned Triangle

udTriudTriangle( vec3 p, vec3 a, vec3 b, vec3 c )

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].