Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

proof of concept signed distance DSL with a RVSDG based optimizer. Mirror of the same repository on GitLab.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

SiebenCorgie/minisdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proof of concept RVSDG based compiler for a simple SignedDistanceField language.

Crates

tree-sitter-minisdf: The tree-sitter grammar and parser, if you get strange tree-sitter errors, change into that directory and call ´tree-sitter generate´

minisdf-ast: AST implementation for MiniSDF. Can either be parsed from a file (using tree-sitter), or generated by a program.

minisdf-optimizer: The RVSDG based optimizer /middle-end. Takes an AST and builds a RVSDG representation using basic lowlevel-ish operations.

minisdf-backend-spirv: simple SPIR-V backend based onrspirv.

msdfc:MiniSdfCompiler: Simple library that accepts a miniSDF compiler source file, or AST, and generates, if possible, a SPIR-V Binary.

Example

The following example defines a field that subtracts smoothed-box from a unit box that repeats in the domain 4³.

The offset of the subtracted box is set by an externaloffset parameter. Which can be animated through the callingshader.

field myfield(offset: vec3){    sub(){        repeat(4.0, 4.0, 4.0){            box(vec3(1.0, 1.0, 1.0))        }    }{        translate(offset){            smooth(0.25){                box(vec3(1.0, 1.0, 2.0))            }        }    }}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

proof of concept signed distance DSL with a RVSDG based optimizer. Mirror of the same repository on GitLab.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp