Open PawitKoch opened 1 year ago
this seems specific to hdrp, is there perhaps a compiler region specific to it so that endContextRendering
could be swaped in?
I can try making endContextRendering
be in a conditional region today and submit a subsequent PR?
Previously I was working with URP, in which there are two active cameras (MainCamera, UICamera) in my game view. Calling methods such as
PopcronGizmos.Line
orPopcronGizmos.Draw
was rendering fine when viewing from the MainCamera. However, it seems that after having upgraded to HDRP, the same functionalities aren't rendering now from the MainCamera. After some investigation of my own and coming across this thread, it seems that I had to make the following change toGizmosInstance
on my local clone of the repo to make rendering work for HDRP:RenderPipelineManager
callback fromendCameraRendering
toendContexRendering
which takes a list of cameras instead of a single one. I would then have to filter the list of cameras to find one tagged withMainCamera
to then pass toOnRendered
to draw GL lines.After some debugging, it seems that using
endCameraRendering
keeps alternating between the two cameras in my scene which then would mean the lines I want to draw will not persist in the game view from myMainCamera
.Is there a way to fix this such that draw lines still work for the
MainCamera
with HDRP with a multi-camera setup, and that I don't have to maintain my own fork of the repo?