keijiro / KinoMotion

Motion blur post-processing effect for Unity
MIT License
648 stars 76 forks source link

Frame Blending produces weird lighting artifacts #27

Open Apfelmoes opened 11 months ago

Apfelmoes commented 11 months ago

Hi, I'm using KinoMotion to mod motionblur into a game (Specifically, People Playground). I did this by putting all the shaders needed for kinomotion into an assetbundle, then moving all the scripts into my mod, and then immediately loading all the shaders out of the assetbundle as soon as the mod is loaded (This is before the player exits the menu screen and before the Kino.Motion component is added to the game camera)

Everything seems to work fine except for the frame blending, which causes weird lighting artifacts.

Here's an example: Frame blending = 0 (Normal lighting): image

Frame blending > 0 (Weird auras around lights, background seems lighter and has a blue hue to it): image

I can't exactly send you a unity project because I am modding the game and I do not have access to the source files, but if you need any extra information, please ask me and I will be happy to send it.

My theory is that the frame blending is blending together the lighting of multiple frames which causes the "aura" around light-emitting items. Don't know if this is anywhere near correct though, as I am not experienced enough with shaders to exactly understand the FrameBlending shader.

Update: I noticed that it's not just lighting that is being affected, it is the entire scene that seems to get over-saturated by the frame blender