keijiro / SimplePostEffects

Simple post effects for Unity URP using Shader Graph
The Unlicense
137 stars 19 forks source link

Effects not applied on Unity 2021.3.5f1 #1

Open asus4 opened 2 years ago

asus4 commented 2 years ago

Thanks for publishing your wonderful library as usual.

This worked well on the exact same version 2021.2.16f1. But I encountered an issue that any changes on PostEffect.shadergraph are not applied on the (mostly) latest Unity 2021 LTS.

Tested environment

How to reproduce

fig1

The shaders seemed to be running when I looked at the frame debug, although they did not show up in the final render result.

framedebug-2021lts

The difference between the two versions was the 2021.3.5f1 has no FinalBlit pass in the last of rendering.

Frame 2

Do you have any clue about this?

keijiro commented 2 years ago

Thanks for reporting the issue. It seems that the following fix to URP introduced the regression.

https://github.com/Unity-Technologies/Graphics/commit/de66f0110d238f2aad54c4dd4a76505971bfeff9

Due to this regression, the FinalBlit doesn't get invoked when using RenderPassEvent.AfterRenderingPostProcessing.

I'll report the issue to the dev team. You can use one of the following workarounds at the moment:

asus4 commented 2 years ago

Thanks for replying and forwarding this to the dev team!

Use RenderPassEvent.AfterRendering instead of AfterRenderingPostProcessing.

This workaround works in my case.