RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
239 stars 29 forks source link

Small issue at 'poles' when playing 180 stereo video #2019

Closed charlesingea closed 1 month ago

charlesingea commented 1 month ago

Describe the issue There is a tiny issue at the 'north and south poles' of an 180 video - a few pixels that stick out of the semisphere. It is not a big problem in itself but it messes up the feathering when using UnlitTransparent(stereo+color+fog+alpha) - it causes the feathering to be inconsistent at the north and south poles compared to the edges of the sphere.

Your Setup (please complete the following information):

Screenshots If applicable, add screenshots to help explain your problem. Without feathering: image

With feathering: image

Ste-RH commented 1 month ago

Enable 'High Quality' on marterial/shader

image

charlesingea commented 1 month ago

Thank you! This has fixed the issue when no feathering is applied. But when I apply feathering, I still get this strange kind of artefact where the feathering at the poles is in this weird pattern: image Do you know of any fix?

Chris-RH commented 1 month ago

There often tends to be distortion at the poles. What you could do is use something like Blender to create a high-resolution UV Sphere (looking at around 128k verts) and that should improve it.

charlesingea commented 1 month ago

I see - thanks for the help!

Ste-RH commented 1 month ago

@charlesingea You could also look to change the feathering better solve your use-case. You want to be looking at this line of code:

image

Maybe swapping it out for this line instead better works for your use-case?

float d = (uv.x - featherDirection.x) (uv.y - featherDirection.y) (featherDirection.z - uv.x) (featherDirection.w - uv.y) 10.0;

...and you end up with this kind of effefct:

image

Ste-RH commented 1 month ago

With and without this feathing (screen grab of one of the poles):

image

image

Ste-RH commented 1 month ago

We have fixed the 'notch' issue.

We have also changed the feathering code to the change documented above.

Chris-RH commented 3 weeks ago

AVPro Video version 3.1 has been released