KhronosGroup / KhronosGroup/UnityGLTF

PBRGraph shader does not work for points topology

Open
#816 1 comment 0 reactions 1 assignee Claimed by @robertdorn83 View on GitHub
bug spec compliance
Dominant language
C#
Stars
2.2k
Forks
536
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug 💬

The attached model has some points topology in it.
Unity tries to render it, but fails with a shader error:
```
Drawing with MeshTopology.Points, yet the vertex program 'UnityGLTF/PBRGraph' does not have PSIZE output.
```

I think that points should probably be rendered with a custom unlit shader that supports map + color + vertex color (lighting on them doesn't really make sense), but care has to be taken to ensure compatibility with BiRP, URP, HDRP.

### Steps to reproduce 🔢

1. Download [20250223-MixedTopologySphere.glb.zip](https://github.com/user-attachments/files/18940336/20250223-MixedTopologySphere.glb.zip)
2. Import in Unity at edit time

### Files to reproduce the issue ♻

_No response_

### Editor Version 🎲

2021.3

### Render Pipeline and version

URP

### UnityGLTF Version

2.14

### Operating System 👩‍💻

macOS

### When does this problem happen?

- [x] Editor Import
- [ ] Runtime Import
- [ ] Editor Export
- [ ] Runtime Export

### Additional Info 📜

Related: https://github.com/atteneder/glTFast/issues/246

### Validations 🩹

- [x] I have [searched existing issues](https://github.com/KhronosGroup/UnityGLTF/issues): no issue already exist that reports the same problem.
- [x] I follow the [Code of Conduct](https://www.khronos.org/about/code-of-conduct)
- [x] I provided a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), including files when necessary.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.