playcanvas / engine

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

Implement color correction #4315

Open mvaligursky opened 2 years ago

mvaligursky commented 2 years ago

Details to be figured out, but based on something equivalent to 3D LUT texture. This could be done either inlined in the shaders, or as a post-processing.

Maksims commented 2 years ago

Inlined in a shader would be faster on mobile, as any post-process on mobile leads to an extra few ms overheads due to mobile GPUs. Also inline will allow to control it per material and per mesh, just like with tone mapping and gamma correction currently.

mvaligursky commented 2 years ago

perhaps we implement support for .CUBE format LUTs, which is the most common color grading format, used by Video Editing Software. Easy to parse. Represents a cube texture, easy to parse. Example attached.

Cine-4-debarup.zip