keijiro / KlakHap

HAP video player plugin for Unity
Other
341 stars 27 forks source link

Texture not clearing when update with HAP Alpha #15

Closed max619 closed 5 years ago

max619 commented 5 years ago

When playing video, encoded with HAP Alpha codec via FFMpeg, old frames still visible under new rendered frame and leaving trails.

Rendered: Rendered

Original: Original

keijiro commented 5 years ago

Thanks for reporting the issue. Could you provide a minimum project that can reproduce the reported issue?

max619 commented 5 years ago

image Also tried to use it in Test project still same result. Only happens when rendering video in ui to render texture

max619 commented 5 years ago

@keijiro pushed test project here

max619 commented 5 years ago

I have one more video, that 100% was encoded correctly, however same issue occurs video here

max619 commented 5 years ago

Sent you PR request, looks like it would fix this issue Also replaced HAP Alpha videos with dynamic ones

keijiro commented 5 years ago

Thank you very much for providing the reproduction project and the pull request.

I realized that the HAP Player component incorrectly uses the blending shader to update a render texture for HAP Alpha sources. I fixed this issue in the latest commit (e8f037f1dfe686387a2730d97d65b716b626e005) and updated the package (v0.1.10).

I'm closing this issue now. Please feel free to reopen for further problems.