Skip to main content

ent_shaders 0.1.0-dev.1 copy "ent_shaders: ^0.1.0-dev.1" to clipboard
ent_shaders: ^0.1.0-dev.1 copied to clipboard

The shaders of Ent Engine, compiled when an app is built into one shader bundle that its renderers share: fixed shaders, plus the material variants the app lists in its pubspec.

ent_shaders #

The shaders of Ent Engine, shared by its renderers. An app does not use this package directly: a renderer package such as ent_flutter depends on it, and the app names the shader variants it draws with.

Shaders are compiled only when the app is built, never at runtime. This package's build hook compiles them with impellerc into one shader bundle, the asset packages/ent_shaders/build/shaderbundles/ent.shaderbundle:

  • the fixed shaders in ent.shaderbundle.json (vertex stages, backgrounds, environment maps, shadows, post-processing);
  • one fragment variant per material setup the app lists, such as lambert map normal_map.

The bundle keeps only the GPU backends of the target the app is built for.

Shader variants #

Name the registry file in the app's pubspec.yaml:

hooks:
  user_defines:
    ent_shaders:
      shaders: ent_shaders.json
{
	"variants": [
		"physical ao_map metalness_map roughness_map"
	]
}

A key is a material kind followed by its flags; docs/shader-variants.md lists them. A renderer throws a StateError naming the key of a draw whose variant is missing.

License #

MIT, © 2026 KAMORA Ltd.; see LICENSE.

The notices of the third-party code it builds on are in THIRD_PARTY_NOTICES.md.

0
likes
0
points
60
downloads

Publisher

unverified uploader

Weekly Downloads

The shaders of Ent Engine, compiled when an app is built into one shader bundle that its renderers share: fixed shaders, plus the material variants the app lists in its pubspec.

Repository (GitHub)
View/report issues

Topics

#graphics #rendering #shaders #game-engine

License

unknown (license)

Dependencies

code_assets, flat_buffers, flutter, flutter_gpu_shaders, hooks

More

Packages that depend on ent_shaders