Skurdt / SK.Libretro

Libretro wrapper written in C# with support for the Unity game engine
MIT License
28 stars 13 forks source link

libretro_crt_geom on rendering on one eye in VR #9

Closed XenuIsWatching closed 10 months ago

XenuIsWatching commented 1 year ago

When I create a OpenXR project and apply the libretr_crt_geom Shader. It only renders on the left eye. I'm not quite sure why that is happening or if there is a more "generic" shader I should be selected rather than the Universal Render Pipeline Shader?

XenuIsWatching commented 1 year ago

apparently, I was able to just fix this my self...

UNITY_VERTEX_INPUT_INSTANCE_ID in appdata UNITY_VERTEX_OUTPUT_STEREO in v2f

UNITY_SETUP_INSTANCE_ID(v);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);

in the vert shader

Skurdt commented 1 year ago

This shader is a very dumb direct conversion from the libretro repository. It's more a proof of concept (the ability to easily convert to unity shader language) rather than a proper shader for unity's different pipelines.

It's included here just because it looks better to me than using the default material when testing.

The library isn't tied to this shader in any way, it only requires a shader texture parameter name to hook into.

See: https://github.com/Skurdt/SK.Libretro/blob/master/Unity/Scripts/Runtime/InstanceSettings.cs#L29