keijiro / KinoMotion

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

Does not work correctly with orthographic cameras #13

Closed raveaf closed 8 years ago

raveaf commented 8 years ago

Are orthographic cameras even supported? test_scene.zip

keijiro commented 8 years ago

I think it's working properly. Could you explain what the point is? Attaching a screenshot might help a lot :)

keijiro commented 8 years ago

FYI: I checked it with Unity 5.4.0p2

catafest commented 8 years ago

With Unity 5.3.5f1 (64-bit)not working for me , I will try with the new version of Unity.

keijiro commented 8 years ago

@catafest It requires Unity 5.4.0 or later.

catafest commented 8 years ago

the defaul scene has nothing to test it. how is working ? can you help me with this output over windows 10 tree command? The output file is strange ...

|   |   +---fc
|   |   +---fd
|   |   +---fe
|   |   \---ff
|   +---ScriptAssemblies
|   \---ShaderCache
|       +---0
|       +---2
|       +---3
|       +---4
|       +---5
|       +---6
|       +---7
|       +---9
|       +---a
|       +---b
|       +---c
|       +---d
|       \---f
+---ProjectSettings
\---Temp
    +---ProcessJobs
    \---__Backupscenes
keijiro commented 8 years ago

@catafest This issue ticket is dedicated to the problem that @raweaf met. Please create a new ticket for a new topic.

catafest commented 8 years ago

yes

raveaf commented 8 years ago

Weird, now it works and I can not reproduce it. Thanks anyway!

raveaf commented 8 years ago

I encountered the problem again a few times, but I always got it fixed by closing and reopening the game window. Maybe it is just a unity bug.

But I found a different problem when using an orthographic camera. The motion blur gets "occluded" when an opaque object is behind the object effected by the motion blur. It does not happen when the object behind is transparent, so maybe it has something to do with the depth buffer.

I also added a test project (now with the correct scene).

test test2 test_scene.zip

keijiro commented 8 years ago

Fixed! (b3f7a10) Thanks for reporting it!

FYI: It seems the skybox shader writes wrong motion vectors. This issue is not related to the Motion effect, so I'll report it to UTech later. At the moment, it's recommended to put a background quad or something to avoid artifacts.