Search Unity

Feedback Wanted: Scriptable Render Pipelines

Discussion in 'Graphics Experimental Previews' started by Tim-C, May 9, 2017.

  1. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    111
    how to enable pcss in defered pipeline?? is it only supported in Forward pipeline?
    because as soon as i change the pipeline all the shadows turn into hard shadows:(
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,096
    Correct!

    However you're able to adjust cascade split blending now, giving a lot more quality to deferred shadows.
     
  3. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    111
    And just to be sure what are the differences between Forward and defered pipelines??
     
  4. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    111
    How?
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,096
    Unity_2019-07-04_14-22-16.png

    It'll be in the volume options, it's only in newer versions though. I'm on 2019.1 with HDRP latest preview available for that. Have a dig about. Add shadows to the global volume.

    Borders are the blending.
     
    Last edited: Jul 4, 2019
  6. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    111
    is soft shadowing possible in defered?
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,096
    Yes if you use lower resolution shadows and tweak, but not as a specific feature you're asking for. This is for performance on a wide scale. Forward is not necessarily slow with HDRP, it's still single pass tiled lighting. Give it a shot.

    With HDRP, forward is the higher quality option, and if you don't overlap lights much (different to a classic foward renderer) you'll keep pretty much similar perf while having the options you want.
     
  8. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    961
    LWRP is URP now. What changes will HDRP have ?

     
  9. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,415
    What is your question exactly?

    There is already a very long list of changes for 7.0.0 of HDRP.

    The main thing I am unclear about at the moment is where we are at with improvements to area lighting, such as those mentioned at Unity Roadmap talks a bit earlier this year. I thought some of that stuff was due for 2019.2 but I've lost track of whether any of it happened. Delays?
     
  10. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    961
    It would be nice if URP will become subset of HDRP. I wonder if something will happen in this direction.
     
  11. ekakiya

    ekakiya

    Joined:
    Jul 25, 2011
    Posts:
    26
    Please add SortingCriteria for ShadowDrawingSettings, like for DrawingSettings.

    We can sort objects by shader with the SortingCriteria and the material's render queue, to fit SRP batcher.
    We can also use SetOverrideMaterial for Z pre-pass of common opaque shaders.

    But the DrawShadows pass doesn't have those options, and the pass looks like ignoreing the material's render queue.
    It ends up to many SRP batcher calls, because they are not sorted by shader.
     
  12. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    When will be added command buffers and light buffers or analog?
    I absolutely can not adapt anything from my projects.
    I don't have access to a shadows map.
    I can't compute a light volumes/shadows.
    I can't control a rendering queue for custom bliting
    I can't control a camera rendering.
    More than a year has passed, and so far this is the most closed api that cannot be changed.
    After all, srp was originally created so that there would be more opportunities.
    srp - scriptable rendering pipeline and absolutely nothing can be changed by scripts...
     
    _FLX, SKoptev and Cynicat like this.
  13. CG_Bull

    CG_Bull

    Joined:
    Feb 12, 2017
    Posts:
    70
    Maybe they just give us the source code like unreal, let's change it ourselves. Intresting....
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    6,513
    Maybe I'm stupid, but is there a... like... collection of API changes between the 2018.4 SRP and the 2019.2 SRP? To put things charitably, the documentation is a little lacking and now next to none of my code is even in the API anymore. This wouldn't be so bad if the documentation in the API reference was any good, but it's real bad actually.
     
    GameDevCouple_I likes this.
  15. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    572
    Yeah, I have made similar suggestions (you might have read some), but given their lack of manpower I doubt it's going to happen soon.

    Instead, if you are writing a custom SRP, look at repo like this for some reference:

    https://github.com/phi-lira/HelloSRP
    https://github.com/cinight/CustomSRP
    https://bitbucket.org/account/user/catlikecodingunitytutorials/projects/SRP
     
    rukqoa, SKoptev and GameDevCouple_I like this.
  16. zwcloud

    zwcloud

    Joined:
    Mar 15, 2016
    Posts:
    314
    Can you disable this warning in editor (not in play mode) or show only once? It just spam the console output. Our project creates the main camera after starting playing.

    UPDATE
    I modified the source and removed that warning in our project.
     
  17. Wawruch2

    Wawruch2

    Joined:
    Oct 6, 2016
    Posts:
    29
    Hello, we working on a project that is highly dependend on a terrain details and realtime GI, recently we tried to upgrade our HDRP to 7.0+ and realtime GI is gone and terrain details seems to be completely ignored, I saw in a blogpost that there's a plan to release a new Realtime GI in Unity 2021 (???). Can you elaborate on that? Roadmap says that it's going to be out of preview in 2019.3 am I right? If so, what about realtime GI?
     
  18. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    409
    Realtime GI is deprecated in HDRP 2019.3, and will be entirely removed in 2020.1. There is no official word on what we should do with the one year and a half gap between now and the planned preview of a replacement solution.

    Every forum post mentionning that huge problem is just being ignored by Unity. I even wrote to some of the staff individually, and again no response.
     
    Rich_A, DGordon, tspk91 and 1 other person like this.
  19. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,790
    They don't have a solution yet, from their own wording, they are looking at solution, and in the unite they publicly admitted it will have something to do with a variant of DDGI which was name dropped. They made a blog post where they announced doubling down on lightprobe, so that checks out. The biggest question is about the updating part of the GI, DDGI is implemented using raytracing that bake to light probe, with a visibility structure to prevent light leaking. We have yet to see performance of that on weak machine. I have start working on a custom exploration personnally, starting with roughest approximation and trying to build from there: https://forum.unity.com/threads/exp...n-for-open-gl-es-2-0-and-weak-machine.752600/
     
  20. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    109
    Add RenderWithSrader plz. Without it i cannot even render debug view with albedo-only. SetOverrideMaterial is not an option because it's ignore original material properties.
     
    chingwa and Jes28 like this.
  21. Ashkin

    Ashkin

    Joined:
    Jan 13, 2015
    Posts:
    1
    Are there any plans to implement a shader replace function like Camera.RenderWithShader()? DrawingSettings.overrideMaterial overwrites the material properties of objects it renders, while RenderWithShader doesn't. To my knowledge there's no way to get this functionality in SRPs yet, but is there some workaround that just hasn't been documented?
     
    neoshaman and chingwa like this.
  22. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    107
    Is there any way to inject custom code in the culling phase? Currently custom dynamic occlusion culling must enable and disable renderers in the main thread, it would be much nicer to modify the culling results at a lower level.
     
    Gekigengar, Jes28 and Kichang-Kim like this.
  23. ekakiya

    ekakiya

    Joined:
    Jul 25, 2011
    Posts:
    26
    To select a frame buffer as a render target, we can use BuiltinRenderTextureType.CameraTarget for the current camera.
    But in SRP, the current camera can be changed only with SetupCameraProperties.

    The SetupCameraProperties includes other setup matrix things, so are there any way to just change the current camera or select the frame buffer directly?
     
    Last edited: Oct 30, 2019
  24. Dickie

    Dickie

    Joined:
    Jan 10, 2014
    Posts:
    6
    Running into the same issue as these two. My pipeline's impossible without properties from the origonal materials being used in the replacement.

    As a side note, calls like ScriptableRenderContext.DrawRenderer disappearing off into the blackbox of c++ land is very frustrating and limiting
     
  25. GuardHei

    GuardHei

    Joined:
    Feb 10, 2018
    Posts:
    55
    Hi, I've been trying to use SRP batcher in my own SRP. However, if I set
    Code (CSharp):
    1. GraphicsSettings.useScriptableRenderPipelineBatching = true;
    and then open up the frame debugger and click in whatever drawcall that is marked as "SRP Batch", the console will show up the warning "Internal: JobTempAlloc has allocations that are more than 4 frames old - this is not allowed and likely a leak". And then even I closed the frame debugger, the same warning still gonna show up when entering play mode.

    I believe I didn't use any allocation related to JobTemp. I used native collections, however, allocating them using Temp. Also these warnings do not exist if
    Code (CSharp):
    1. GraphicsSettings.useScriptableRenderPipelineBatching = false;
    The warning is really annoying because it stops me from using frame debugger. Is it a known issue? A bug from the engine? Or I overlooked any aspects?

    By the way I am using 2019.2f on Mac, using Metal.

    Thanks for any help!
     
  26. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    109
    I use global shader lod as workaround. I.e. LOD 1 is albedo, LOD 2 is normal, LOD 3 is some masks.
     
  27. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    961
    SRP.JPG
    I've made this artistic impression what SRP should be in future 2020.3/2021.x.
    URP and HDRP should be easy to switch like Cycles and Eevee are although vastly different engines. Black rectangles in HDRP represent everything which can reduce performance for targeted systems and it is disabled in URP.
     
  28. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,096
    I'm sure that would be possible. You would initially start with a copy of the HD SRP, and then modify it to create a subset of it inside of that. This does not sound practical to me though.

    If it were me I would focus instead on making URP look pretty and leave HDRP to it's own devices at the top end. It is far easier to do it that way round (and more practical).
     
  29. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,790
    I bet that srp is structured enough we can create a high level interface that allow to plug anything we want, that currently exist, in the right place, so far what I see is that declaration has to be made in multiple place and files, we can probably unify that like they did with renderpass objects. That would allow to plug and play stuff fast and keep the practicality okay.
     
  30. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    971
    I'm really curious about Unity's reasoning to only render the first pass in shaders in LWRP/URP. It seems like a decision that's only going to force people to make less performant and less artist friendly workarounds to render their objects with multiple passes through manual draw calls and separate materials. Multi-pass is a pretty essential shader feature to have that keeps things simple. If there are concerns about it leading to an ecosystem of low-performance third-party shaders, this really only makes that possibility worse by forcing people into more convoluted workarounds.
     
  31. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,283
    Ruchir likes this.
  32. CogumeloSoft

    CogumeloSoft

    Joined:
    Dec 28, 2012
    Posts:
    66
    Hi!
    I'm using Unity 2019.3.0f3 and URP 7.1.7
    I'm trying to follow this tutorial:
    https://blogs.unity3d.com/pt/2019/0...n-shader-graph-expanding-your-graphs-in-2019/

    But the "mainLight.shadowAttenuation" and "mainLight.distanceAttenuation" always return white if using a "Unlit Shader" as Base. It works with a "PBR" shader but this is not what i need (since i need a fully controllable light model).

    Is it a bug or there's something new that is not documented about it?
     
    Last edited: Dec 26, 2019
  33. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    109
    Make ResolveAntiAliasedSurface method works with RenderTargetIdentifier.
     
    GuardHei likes this.
  34. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    10
    Will SRP support IES Lamps ?
     
    OCASM likes this.
  35. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    70
    Would it be possible to use the new renderpiplines per Scene?

    For example, we want to use the URP and HDRP in one project.

    This would overcome all drawbacks of compatibility issues, like asset store assets which are not compatible with a certain SRP.

    Regarding all the SRP incompatibility issues, I think, unity will break his own neck with this approach. One big advantage of unity is/was to just put in some assets from the asset store, modeling program or whatever and it runs. Now you have to deal with compatibility on the very base level, and adding a lot of complexity.

    Hopefully I am wrong, and everything will come to a good end. :(
     
  36. chingwa

    chingwa

    Joined:
    Dec 4, 2009
    Posts:
    3,446
    Render Pipelines is a project-wide decision, you can't mix URP and HDRP. And yes SRP has screwed the Asset Store and the most fundamental appeal that Unity grew up on.
     
    Gekigengar likes this.
  37. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    109
    If you implement this in your pipeline.

    Why not? I do it while ago to overcome lack of RenderWithShader.
     
  38. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    70

    Would this work also in runtime, let's say: scene1 HDRP, scene2 URP, sene3 BRP?
     
  39. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    468
    It can be possible only if your assets ready for this, materials textures lights.... for each render pipeline :)
     
  40. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    70
    So, it is also possible to switch the SRP during runtime. Let's say, I know that scene-2 will be HDRP, and my current scene is in BRP. Before loading scene-2, I switch the renderer to HDRP? I thought we can set this only per project basis, so if you have choosen HDRP you need to stick to it?
     
  41. BattleAngelAlita

    BattleAngelAlita

    Joined:
    Nov 20, 2016
    Posts:
    109
    Code (CSharp):
    1. GraphicsSettings.renderPipelineAsset
    Thanks that setter is still public.
    Unity guys, please stop privating properties that you think we no needed. We need them.
     
    Gekigengar likes this.
  42. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    70
    Wow, thank you very much. That will help us a lot :)
     
unityunity