google / google/filament

Offscreen rendering not working properly

Open
#8,352 1 comment 0 reactions 1 assignee Claimed by @pixelflinger View on GitHub
Dominant language
C++
Stars
20.5k
Forks
2.3k
Avg merge
2d 16h
Merged PRs (30d)
74

Description

⚠️ **Issues not using this template will be systematically closed.**

**Describe the bug**
Offscreen rendering is producing completely black images.

**To Reproduce**

An example of this failure occurs when using the [frame_generator](https://github.com/google/filament/blob/main/samples/frame_generator.cpp) example. To reproduce:

1. Build filament library.

2. Generate a material using `matc` tool, for example:

`./matc --api all -o ./plastic.filamat plastic.mat`

3. Use this material in the `frame_generator` tool, and use `params.txt` file containing only `roughness 0.0 1.0`:

`./frame_generator --material="plastic.filamat" --params=./params.txt --api=opengl --scale=0.1 -l -c 10 donut.obj`

The result from the command above will be completely black:

Image1

However, if `opengl` option is replaced with `vulkan`, the mesh is rendered but without the skybox:

Image2

**Expected behavior**
The mesh should be rendered fine in opengl as well as vulkan along with the skybox, but it does not render at all in opengl and the skybox is not rendered in vulkan

**Screenshots**
Screenshots added above.

**Logs**
Output when using vulkan:
```
FEngine (64 bits) created at 0x62cb0e9e87a0 (threading is enabled)
Vulkan device driver: NVIDIA 565.57.01
Selected physical device 'NVIDIA GeForce RTX 4080 Laptop GPU' from 3 physical devices. (vendor 0x10de, device 0x27e0, driver 0x8d4e4040, api 1.3)
Backend feature level: 3
FEngine feature level: 3
```

Output when using opengl:
```
FEngine (64 bits) created at 0x6272196b6f80 (threading is enabled)
FEngine resolved backend: OpenGL
Backend feature level: 3
FEngine feature level: 3
```

**Desktop (please complete the following information):**
- OS: ubuntu 24.04
- GPU: NVIDIA GeForce RTX 4080
- Backend: OpenGL & Vulkan

**Smartphone (please complete the following information):**
- Device: [e.g. Pixel 2]
- OS: [e.g. Android Pie 9.0]

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.