Skip to content
Back to search

filament

SkillOfficial: GoogleGitHub

Filament is a real-time physically based rendering engine for Android, iOS, Windows, Linux, macOS, and WebGL2

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026. Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/google/filament with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/google/filament'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/google--filament/badge.svg)](/listings/google--filament)

HTML

<a href="/listings/google--filament"><img src="/api/listings/google--filament/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 357 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Filament
  2. [![Android Build Status](https://github.com/google/filament/actions/workflows/status-android.yml/badge.svg)](https://github.com/google/filament/actions/workflows/status-android.yml)
  3. [![iOS Build Status](https://github.com/google/filament/actions/workflows/status-ios.yml/badge.svg)](https://github.com/google/filament/actions/workflows/status-ios.yml)
  4. [![Linux Build Status](https://github.com/google/filament/actions/workflows/status-linux.yml/badge.svg)](https://github.com/google/filament/actions/workflows/status-linux.yml)
  5. [![macOS Build Status](https://github.com/google/filament/actions/workflows/status-macos.yml/badge.svg)](https://github.com/google/filament/actions/workflows/status-macos.yml)
  6. [![Windows Build Status](https://github.com/google/filament/actions/workflows/status-windows.yml/badge.svg)](https://github.com/google/filament/actions/workflows/status-windows.yml)
  7. [![Web Build Status](https://github.com/google/filament/actions/workflows/status-web.yml/badge.svg)](https://github.com/google/filament/actions/workflows/status-web.yml)
  8. Filament is a real-time physically based rendering engine for Android, iOS, Linux, macOS, Windows,
  9. and WASM. It is designed to be as small as possible and as efficient as possible on Android.
  10. ## Download
  11. [Download Filament releases](https://github.com/google/filament/releases) to access stable builds.
  12. Filament release archives contains host-side tools that are required to generate assets.
  13. Make sure you always use tools from the same release as the runtime library. This is particularly
  14. important for `matc` (material compiler).
  15. If you'd rather build Filament yourself, please refer to our [build manual](/BUILDING.md).
  16. ### Android
  17. Android projects can simply declare Filament libraries as Maven dependencies:
  18. ```gradle
  19. repositories {
  20. // ...
  21. mavenCentral()
  22. }
  23. dependencies {
  24. implementation 'com.google.android.filament:filament-android:1.81.0'
  25. }
  26. ```
  27. Here are all the libraries available in the group `com.google.android.filament`:
  28. | Artifact | Description |
  29. | ------------- | ------------- |
  30. | [![filament-android](https://img.shields.io/maven-central/v/com.google.android.filament/filament-android?label=filament-android&color=green)](https://mvnrepository.com/artifact/com.google.android.filament/filament-android) | The Filament rendering engine itself. |
  31. | [![filament-android-debug](https://img.shields.io/maven-central/v/com.google.android.filament/filament-android-debug?label=filament-android-debug&color=green)](https://mvnrepository.com/artifact/com.google.android.filament/filament-android-debug) | Debug version of `filament-android`. |
  32. | [![gltfio-android](https://img.shields.io/maven-central/v/com.google.android.filament/gltfio-android?label=gltfio-android&color=green)](https://mvnrepository.com/artifact/com.google.android.filament/gltfio-android) | A glTF 2.0 loader for Filament, depends on `filament-android`. |
  33. | [![filament-utils-android](https://img.shields.io/maven-central/v/com.google.android.filament/filament-utils-android?label=filament-utils-android&color=green)](https://mvnrepository.com/artifact/com.google.android.filament/filament-utils-android) | KTX loading, Kotlin math, and camera utilities, depends on `gltfio-android`. |
  34. | [![filamat-android](https://img.shields.io/maven-central/v/com.google.android.filament/filamat-android?label=filamat-android&color=green)](https://mvnrepository.com/artifact/com.google.android.filament/filamat-android) | A runtime material builder/compiler. This library is large but contains a full shader compiler/validator/optimizer and supports both OpenGL and Vulkan. |
  35. ### iOS
  36. iOS projects can use CocoaPods to install the latest release:
  37. ```shell
  38. pod 'Filament', '~> 1.81.0'
  39. ```
  40. ## Documentation
  41. - [Filament](https://google.github.io/filament/Filament.html), an in-depth explanation of
  42. real-time physically based rendering, the graphics capabilities and implementation of Filament.
  43. This document explains the math and reasoning behind most of our decisions. This document is a
  44. good introduction to PBR for graphics programmers.
  45. - [Materials](https://google.github.io/filament/Materials.html), the full reference
  46. documentation for our material system. This document explains our different material models, how
  47. to use the material compiler `matc` and how to write custom materials.
  48. - [Material Properties](https://google.github.io/filament/notes/material_properties.html), a reference
  49. sheet for the standard material model.
  50. ## Examples
  51. ![Night scene](docs/images/samples/example_bistro1.jpg)
  52. ![Night scene](docs/images/samples/example_bistro2.jpg)
  53. ![Materials](docs/images/samples/example_materials1.jpg)
  54. ![Materials](docs/images/samples/example_materials2.jpg)
  55. ![Helmet](docs/images/samples/example_helmet.jpg)
  56. ![Screen-space refraction](docs/images/samples/example_ssr.jpg)
  57. ## Features
  58. ### APIs
  59. - Native C++ API for Android, iOS, Linux, macOS and Windows
  60. - Java/JNI API for Android
  61. - JavaScript API
  62. ### Backends
  63. - OpenGL 4.1+ for Linux, macOS and Windows
  64. - OpenGL ES 3.0+ for Android and iOS
  65. - Metal for macOS and iOS
  66. - Vulkan 1.0 for Android, Linux, macOS, and Windows
  67. - WebGPU for Android, Linux, macOS, and Windows
  68. - WebGL 2.0 for all browsers supporting it
  69. ### Rendering
  70. - Clustered forward renderer
  71. - Cook-Torrance microfacet specular BRDF
  72. - Lambertian diffuse BRDF
  73. - Custom lighting/surface shading
  74. - HDR/linear lighting
  75. - Metallic workflow
  76. - Clear coat
  77. - Retroreflection
  78. - Anisotropic lighting
  79. - Approximated translucent (subsurface) materials
  80. - Diffuse transmission
  81. - Cloth/fabric/sheen shading
  82. - Normal mapping & ambient occlusion mapping
  83. - Image-based lighting
  84. - Physically-based camera (shutter speed, sensitivity and aperture)
  85. - Physical light units
  86. - Point lights, spot lights, and directional light
  87. - Specular anti-aliasing
  88. - Point, spot, and directional light shadows
  89. - Cascaded shadows
  90. - EVSM, PCSS, DPCF, or PCF shadows
  91. - Colored penumbra
  92. - Transparent shadows
  93. - Contact shadows
  94. - Screen-space ambient occlusion
  95. - Screen-space reflections
  96. - Screen-space refraction
  97. - Global fog
  98. - Dynamic resolution (with support for AMD FidelityFX FSR)
  99. ### Post processing
  100. - HDR bloom
  101. - Depth of field bokeh
  102. - Multiple tone mappers: GT7, PBR Neutral, AgX, generic (customizable), ACES, filmic, etc.
  103. - Color and tone management: luminance scaling, gamut mapping
  104. - Color grading: exposure, night adaptation, white balance, channel mixer,
  105. shadows/mid-tones/highlights, ASC CDL, contrast, saturation, etc.
  106. - TAA, FXAA, MSAA
  107. - Screen-space lens flares
  108. ### glTF 2.0
  109. - Encodings
  110. - [x] Embeded
  111. - [x] Binary
  112. - Primitive Types
  113. - [x] Points
  114. - [x] Lines
  115. - [ ] Line Loop
  116. - [x] Line Strip
  117. - [x] Triangles
  118. - [x] Triangle Strip
  119. - [ ] Triangle Fan
  120. - Animation
  121. - [x] Transform animation
  122. - [x] Linear interpolation
  123. - [x] Morph animation
  124. - [x] Sparse accessor
  125. - [x] Skin animation
  126. - [x] Joint animation
  127. - Extensions
  128. - [x] KHR_draco_mesh_compression
  129. - [x] KHR_lights_punctual
  130. - [x] KHR_materials_anisotropy
  131. - [x] KHR_materials_clearcoat
  132. - [x] KHR_materials_diffuse_transmission
  133. - [x] KHR_materials_dispersion
  134. - [x] KHR_materials_emissive_strength
  135. - [x] KHR_materials_ior
  136. - [x] KHR_materials_iridescence
  137. - [x] KHR_materials_pbrSpecularGlossiness
  138. - [x] KHR_materials_retroreflection
  139. - [x] KHR_materials_sheen
  140. - [x] KHR_materials_specular
  141. - [x] KHR_materials_transmission
  142. - [x] KHR_materials_unlit
  143. - [x] KHR_materials_variants
  144. - [x] KHR_materials_volume
  145. - [x] KHR_mesh_quantization
  146. - [x] KHR_texture_basisu
  147. - [x] KHR_texture_transform
  148. - [x] EXT_meshopt_compression
  149. ## Rendering with Filament
  150. ### Native Linux, macOS and Windows
  151. You must create an `Engine`, a `Renderer` and a `SwapChain`. The `SwapChain` is created from a
  152. native window pointer (an `NSView` on macOS or a `HWND` on Windows for instance):
  153. ```c++
  154. Engine* engine = Engine::create();
  155. SwapChain* swapChain = engine->createSwapChain(nativeWindow);
  156. Renderer* renderer = engine->createRenderer();
  157. ```
  158. To render a frame you must then create a `View`, a `Scene` and a `Camera`:
  159. ```c++
  160. Camera* camera = engine->createCamera(EntityManager::get().create());
  161. View* view = engine->createView();
  162. Scene* scene = engine->createScene();
  163. view->setCamera(camera);
  164. view->setScene(scene);
  165. ```
  166. Renderables are added to the scene:
  167. ```c++
  168. Entity renderable = EntityManager::get().create();
  169. // build a quad
  170. RenderableManager::Builder(1)
  171. .boundingBox({{ -1, -1, -1 }, { 1, 1, 1 }})
  172. .material(0, materialInstance)
  173. .geometry(0, RenderableManager::PrimitiveType::TRIANGLES, vertexBuffer, indexBuffer, 0, 6)
  174. .culling(false)
  175. .build(*engine, renderable);
  176. scene->addEntity(renderable);
  177. ```
  178. The material instance is obtained from a material, itself loaded from a binary blob generated
  179. by `matc`:
  180. ```c++
  181. Material* material = Material::Builder()
  182. .package((void*) BAKED_MATERIAL_PACKAGE, sizeof(BAKED_MATERIAL_PACKAGE))
  183. .build(*engine);
  184. MaterialInstance* materialInstance = material->createInstance();
  185. ```
  186. To learn more about materials and `matc`, please refer to the
  187. [materials documentation](https://google.github.io/filament/Materials.html).
  188. To render, simply pass the `View` to the `Renderer`:
  189. ```c++
  190. // beginFrame() returns false if we need to skip a frame
  191. if (renderer->beginFrame(swapChain)) {
  192. // for each View
  193. renderer->render(view);
  194. renderer->endFrame();
  195. }
  196. ```
  197. For complete examples of Linux, macOS and Windows Filament applications, look at the source files
  198. in the `samples/` directory. These samples are all based on `libs/filamentapp/` which contains the
  199. code that creates a native window with SDL2 and initializes the Filament engine, renderer and views.
  200. For more information on how to prepare environment maps for image-based lighting please refer to
  201. [BUILDING.md](/BUILDING.md#running-the-native-samples).
  202. ### Android
  203. See `android/samples` for examples of how to use Filament on Android.
  204. You must always first initialize Filament by calling `Filament.init()`.
  205. Rendering with Filament on Android is similar to rendering from native code (the APIs are largely
  206. the same across languages). You can render into a `Surface` by passing a `Surface` to the
  207. `createSwapChain` method. This allows you to render to a `SurfaceTexture`, a `TextureView` or
  208. a `SurfaceView`. To make things easier we provide an Android specific API called `UiHelper` in the
  209. package `com.google.android.filament.android`. All you need to do is set a render callback on the
  210. helper and attach your `SurfaceView` or `TextureView` to it. You are still responsible for
  211. creating the swap chain in the `onNativeWindowChanged()` callback.
  212. ### iOS
  213. Filament is supported on iOS 11.0 and above. See `ios/samples` for examples of using Filament on
  214. iOS.
  215. Filament on iOS is largely the same as native rendering with C++. A `CAEAGLLayer` or `CAMetalLayer`
  216. is passed to the `createSwapChain` method. Filament for iOS supports both Metal (preferred) and
  217. OpenGL ES.
  218. ## Assets
  219. To get started you can use the textures and environment maps found respectively in
  220. `third_party/textures` and `third_party/environments`. These assets are under CC0 license. Please
  221. refer to their respective `URL.txt` files to know more about the original authors.
  222. Environments must be pre-processed using
  223. [`cmgen`](/BUILDING.md#running-the-native-samples) or
  224. using the `libiblprefilter` library.
  225. ## How to make contributions
  226. Please read and follow the steps in [CONTRIBUTING.md](/CONTRIBUTING.md). Make sure you are
  227. familiar with the [code style](/CODE_STYLE.md). For reporting vulnerabilities, please consult
  228. our [Security Policy](/SECURITY.md).
  229. ## Directory structure
  230. This repository not only contains the core Filament engine, but also its supporting libraries
  231. and tools.
  232. - `android`: Android libraries and projects
  233. - `filamat-android`: Filament material generation library (AAR) for Android
  234. - `filament-android`: Filament library (AAR) for Android
  235. - `filament-utils-android`: Extra utilities (KTX loader, math types, etc.)
  236. - `gltfio-android`: Filament glTF loading library (AAR) for Android
  237. - `samples`: Android-specific Filament samples
  238. - `art`: Source for various artworks (logos, PDF manuals, etc.)
  239. - `assets`: 3D assets to use with sample applications
  240. - `build`: CMake build scripts
  241. - `docs`: Documentation
  242. - `math`: Mathematica notebooks used to explore BRDFs, equations, etc.
  243. - `filament`: Filament rendering engine (minimal dependencies)
  244. - `backend`: Rendering backends/drivers (Vulkan, Metal, OpenGL/ES)
  245. - `ide`: Configuration files for IDEs (CLion, etc.)
  246. - `ios`: Sample projects for iOS
  247. - `libs`: Libraries
  248. - `bluegl`: OpenGL bindings for macOS, Linux and Windows
  249. - `bluevk`: Vulkan bindings for macOS, Linux, Windows and Android
  250. - `camutils`: Camera manipulation utilities
  251. - `filabridge`: Library shared by the Filament engine and host tools
  252. - `filaflat`: Serialization/deserialization library used for materials
  253. - `filagui`: Helper library for [Dear ImGui](https://github.com/ocornut/imgui)
  254. - `filamat`: Material generation library
  255. - `filamentapp`: SDL2 skeleton to build sample apps
  256. - `filameshio`: Tiny filamesh parsing library (see also `tools/filamesh`)
  257. - `geometry`: Mesh-related utilities
  258. - `gltfio`: Loader for glTF 2.0
  259. - `ibl`: IBL generation tools
  260. - `image`: Image filtering and simple transforms
  261. - `imageio`: Image file reading / writing, only intended for internal use
  262. - `matdbg`: DebugServer for inspecting shaders at run-time (debug builds only)
  263. - `math`: Math library
  264. - `mathio`: Math types support for output streams
  265. - `utils`: Utility library (threads, memory, data structures, etc.)
  266. - `viewer`: glTF viewer library (requires gltfio)
  267. - `samples`: Sample desktop applications
  268. - `shaders`: Shaders used by `filamat` and `matc`
  269. - `third_party`: External libraries and assets
  270. - `environments`: Environment maps under CC0 license that can be used with `cmgen`
  271. - `models`: Models under permissive licenses
  272. - `textures`: Textures under CC0 license
  273. - `tools`: Host tools
  274. - `cmgen`: Image-based lighting asset generator
  275. - `filamesh`: Mesh converter
  276. - `glslminifier`: Minifies GLSL source code
  277. - `matc`: Material compiler
  278. - `matedit`: Material editor for compiled materials
  279. - `matinfo` Displays information about materials compiled with `matc`
  280. - `mipgen` Generates a series of miplevels from a source image
  281. - `normal-blending`: Tool to blend normal maps
  282. - `resgen` Aggregates binary blobs into embeddable resources
  283. - `roughness-prefilter`: Pre-filters a roughness map from a normal map to reduce aliasing
  284. - `specular-color`: Computes the specular color of conductors based on spectral data
  285. - `web`: JavaScript bindings, documentation, and samples
  286. ## License
  287. Please see [LICENSE](/LICENSE).
  288. ## Disclaimer
  289. This is not an officially supported Google product.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.