pastasfuture / com.hauntedpsx.render-pipelines.psx

A scriptable render pipeline for emulating Playstation-1-style graphics on contemporary hardware.
https://twitter.com/HauntedPs1/
MIT License
383 stars 26 forks source link

Canvas order is not considered for non-Overlay legacy Canvas UI #18

Closed thebeardphantom closed 2 years ago

thebeardphantom commented 2 years ago

Canvas order is ignored because PSXRenderPipeline.DrawLegacyCanvasUI() does not use proper SortingCriteria for the SortingSettings instance created for rendering. This should do the trick:

var sortingSettings = new SortingSettings(camera)
{
    criteria = SortingCriteria.CommonTransparent
};
thebeardphantom commented 2 years ago

To be clear, this is specifically for Canvases set to Screen Space - Camera mode. Overlay mode sorts properly.

PixelDough commented 2 years ago

Huh, interesting. I was just encountering this issue today. Never ran into it before until now for some reason.

thebeardphantom commented 2 years ago

PR: https://github.com/pastasfuture/com.hauntedpsx.render-pipelines.psx/pull/21

pastasfuture commented 2 years ago

Fixed - thanks for reportingšŸ–¤