Comments (22)
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.
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.
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.
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.
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.
New comments added in post and question. Got it to work when using default values for LWRP asset
from gizmos.
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.
Also to note, GL is deprecated in SRP
from gizmos.
Yes, here's more info about it: https://forum.unity.com/threads/feedback-wanted-scriptable-render-pipelines.470095/page-8#post-3408481
from gizmos.
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.
Tested Unity v2019.3.0b5 with Universal Render Pipeline v7.1.2. Unfortunately it still doesn't work correctly.
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.
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.
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.
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.
Makes sense, are you able to tell if it's an issue inherent to GL?
from gizmos.
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.
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.
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.
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.
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.
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.
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)
- Gizmo for VR HOT 5
- gizmos get rendererd by one camera only HOT 3
- Add shape fill (Gizmos.DrawCube) HOT 1
- Some materials turns back to its original(pink) when project is reopened or sometime on scene reloading in Universal Rendering pipeline Unity 2019.3.0f6. HOT 2
- Not Rendering in Android Phone HOT 1
- Lines rendering towards camera. HOT 8
- Version control HOT 5
- [2018.4.23] Not working in Play Mode HOT 3
- is it possible to the gizmo to be attached to a parent ? HOT 1
- it requires .Net Framework 4.5,can it be used in ubuntu , for Linux HOT 1
- Conflict with Graphic.DrawMeshInstancedProcedural HOT 3
- Prevent Drawing Over Worldspace and Transparent UI HOT 8
- "Authentication failed" error caused every time I pressed to play HOT 4
- AR and URP
- Can i make line thick? HOT 1
- i am lost, cant use package
- Gizmos.DrawRay HOT 1
- Rendering issues with HDRP HOT 2
- GC Alloc HOT 4
- Duration as parameter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gizmos.