GithubHelp home page GithubHelp logo

Comments (22)

RunninglVlan avatar RunninglVlan commented on August 20, 2024 1

Also to note, GL is deprecated in SRP

Where did you find that? I did a quick search and found no information about it.

from gizmos.

popcron avatar popcron commented on August 20, 2024 1

I misread the original post, they're deprecating the rendering callbacks, not GL entirely. At https://forum.unity.com/threads/gl-lines-and-gl-functionality-with-lwrp.618985/#post-4191136

from gizmos.

popcron avatar popcron commented on August 20, 2024 1

That can likely be resolved by changing the shader to something that respects depth because I'm pretty sure this was always a thing.

The more important part is that GL works with 7.x

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024 1

Latest status: Gizmos render correctly in Game view with following settings in UniversalRenderPipelineAsset:

  • In Quality: Disable HDR and Anti Aliasing (MSAA)
  • In ForwardRendererData asset: Remove Renderer Features

and in Camera:

  • In Rendering: Disable Post Processing

Tried changing Material on which SetPass is called, as I thought maybe default shader Hidden/Internal-Colored is not compatible with URP, but to no avail.

from gizmos.

kronnect avatar kronnect commented on August 20, 2024 1

Problem is the depth/stencil buffer target is not preserved somehow when AfterCameraRender is called producing everything executed at that stage to render on top. It should be fixed/improved so a simple Graphics.DrawMesh called in AffterCameraRender works as usual. That will be super useful and will make migration easier.
Problem with Scriptable Features is that they require additional boiler plate and client-dependant setup which is a very bad design approach to solve a problem IMO. For many use cases, we just need to make direct draw calls after everything is rendered as before regardless of the pipeline!

Oddly enough, the result changes if Opaque Texture is enabled or disabled in LWRP asset settings.

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

New comments added in post and question. Got it to work when using default values for LWRP asset

from gizmos.

popcron avatar popcron commented on August 20, 2024

I'm not using LWRP, but I saw people on the forum stating the same issue and that it might be a bug.

https://forum.unity.com/threads/gl-lines-and-gl-functionality-with-lwrp.618985/

from gizmos.

popcron avatar popcron commented on August 20, 2024

Also to note, GL is deprecated in SRP

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

Yes, here's more info about it: https://forum.unity.com/threads/feedback-wanted-scriptable-render-pipelines.470095/page-8#post-3408481

from gizmos.

popcron avatar popcron commented on August 20, 2024

After checking with SRP 7.1.1, it works. In order to get this package from the pacman, the editor needs to updated to 2019.3.x

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

Tested Unity v2019.3.0b5 with Universal Render Pipeline v7.1.2. Unfortunately it still doesn't work correctly.
image
This is how it renders in Game view if either HDR is set to true, Anti Aliasing (MSAA) is set to anything but Disabled or Renderer Feature is added to Renderer, currently there's only one - Render Objects (Experimental).

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

You mean you recognize this as a bug in Render Pipeline and have some ideas on how it could be fixed? Maybe you could then contact them somehow =) Through some bug tracker, forums, emails, I don't know... We'd be happy if this would be fixed.

from gizmos.

popcron avatar popcron commented on August 20, 2024

I don't think the z ordering issue is a bug with unity, its more likely that the shader simply ignores depth. I can't test any time soon but try setting the material to a default diffuse or anything that is known to respect z order.

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

But why it ignores it only in Game view and only with those specific setting values?
I tested different materials, not one of them fixes the issue in Game view. Some of them brought rendering issue to Scene view. =D

from gizmos.

popcron avatar popcron commented on August 20, 2024

Makes sense, are you able to tell if it's an issue inherent to GL?

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

I don't think it's related to GL, the problem appears only using RenderPipelineManager.endCameraRendering. Without it everything renders OK as I described in question

from gizmos.

popcron avatar popcron commented on August 20, 2024

Can GL still render if that callback is replaced when using SRP? If it does then submit it as a PR and I'll merge it.

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

Sorry, didn't quite understand you. What do you mean by "that callback is replaced when using SRP"? If GraphicsSettings.renderPipelineAsset is empty and Camera.onPostRender is used, everything works fine.

from gizmos.

popcron avatar popcron commented on August 20, 2024

Hmmm, its rendering on top because of the endCameraRendering which is equivalent to onPostRender. Does beginCameraRendering work? I can't really test any of this because I have school work to do, all I can do is speculate.

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

It's OK to speculate, I guess you have more experience in the subject matter.
But no, beginCameraRendering doesn't help. Maybe this way it renders before everything else.

from gizmos.

RunninglVlan avatar RunninglVlan commented on August 20, 2024

I asked about the issue in Unity forums, and Unity developer said that we need to implement our own ScriptableRenderPass. I understood how to create one, but then also the thing that I don't have a clue about CommandBuffers and such, i.e., I don't know how to implement feature pass.
ScriptableRendererFeature can be created using Create/Rendering/Universal Render Pipeline/Renderer Feature. Unity has an example pass.
Do you know anything about CommandBuffers? =)

from gizmos.

popcron avatar popcron commented on August 20, 2024

I believe you have to create a new command buffer at the event and then pass it to the context to execute. Lastly you have to release the buffer (equivalent to dispose). Catlike has a page on custom srp with an example of command buffers.

Also that's quite a very specific set of requirements to make it work correctly eh.

from gizmos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.