gkjohnson / three-gpu-pathtracer

Path tracing renderer and utilities for three.js built on top of three-mesh-bvh.
https://gkjohnson.github.io/three-gpu-pathtracer/example/bundle/index.html
MIT License
1.28k stars 125 forks source link

Figure out how to use Float textures on iOS #481

Closed gkjohnson closed 2 months ago

gkjohnson commented 5 months ago

Currently half float textures are used on ios and any platform that doesn't support float texture blending. However this will result in heavily skewed colors during blending. Screenshots after ~ 5000 samples

HalfFloat

image

Float

image
gkjohnson commented 5 months ago

On ios we can render to two buffers and manually blend while using nearest filter instead of relying on hardware support. Or we can perform the blend in the raytracing buffer itself.