metaforce/hecl/README.md

30 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2015-12-17 00:24:53 +00:00
### HECL (high-level, extensible combiner language)
2016-01-25 20:22:04 +00:00
**HECL** is a toolkit for building custom asset pipelines, assisting the development of conversion tools and runtime loaders.
2015-12-17 00:24:53 +00:00
The most significant feature is the intermediate HECL language, using an expressive command syntax to represent cross-platform shaders. This includes a common source representation and intermediate binary representation. Complete vertex and fragment shader programs are generated for supported platforms and may be built on-demand as part of a 3D application runtime.
2016-01-25 07:36:43 +00:00
```py
# Combiner 1: Opaque *Diffuse* and *Emissive*
HECLOpaque(Texture(0, UV(0)) * Lighting() + Texture(1, UV(0)))
# Combiner 2: Alpha-blended single-texture
# (both texture-accesses folded to a single sample operation)
HECLAlpha(Texture(0, UV(0)), Texture(0, UV(0)).a)
# Combiner 3: Additive-blended single-texture
# (modern graphics APIs require blending configuration along with all shader configs)
HECLAdditive(Texture(0, UV(0)), Texture(0, UV(0)).a)
```
2015-12-17 00:24:53 +00:00
Beyond shaders, HECL also defines a rigged mesh format called HMDL. Meshes using this encoding interact with HECL, with pose transforms applied via the vertex shader.
For asset pipelines, HECL provides a project system with dependency-resolution much like an IDE or `make`. Assets in their editable representation are *cooked* in-bulk and whenever the source file is updated. Currently, blender is the only-supported input format for rigged meshes with node-materials.
2016-01-25 07:36:43 +00:00
#### Supported Backends
* GLSL 330 *(with optional SPIR-V conversion)*
* HLSL (Shader Model 4)
* Metal 1.1
2016-01-25 19:17:54 +00:00
* GX *(complete TexCoordGen and TEV configs in intermediate structures)*