playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.31k stars 1.32k forks source link

Lightmapper doesn't work with physical light units #4656

Open GSterbrant opened 1 year ago

GSterbrant commented 1 year ago

Description

The PR #4618 changes the way light intensities are handled. With these light intensities, lightmaps using 8 bits per channel won't be able to store the intensities, so another solution is needed.

MAG-AdrianMeredith commented 1 year ago

Is this the lightmap baking or just lightmaps in general? I'm finding that my own custom lightmaps are now effectively missing so I'm multiplying the lightmap output by my own "lightmap luminance" value.

p.s. are emissive materials supported? do they have a luminance multiplier?

mvaligursky commented 1 year ago

@GSterbrant - any thoughts on this question above? Do we need another ticket to add luminance to imported material lightmaps as well?

mvaligursky commented 1 year ago

related ticket that allows Lightmapper to bake HDR lightmaps: https://github.com/playcanvas/engine/pull/4838 That is probably the largest part needed to make physical lights to work with the Lightmapper.