Search Unity

Feedback Wanted: Scriptable Render Pipelines

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

  1. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,377
  2. Snapshot

    Snapshot

    Joined:
    May 9, 2018
    Posts:
    5
    @Reanimate_L Cool, but I'd like it to appear as a proxy over the material. I.e. not a seperate thing. Basically what the material upgrader does but not just once off. Let the artists use the standard shader input and have it re-pack and convert. Its literaly an interface thing as the material upgrader that already exists works really well.
    This is purely an artist productivity issues, no renderer should push texture packing onto the art team. Its automatable and most importantly allows renderer peeps to change stuff at will. Notice a channel is only being used as binary, pack it down to a bit etc.
    Its also makes it easier to tackle the thorny issue of linear/sRGB encoding. Was the metallic map generated or hand drawn? naming convention and auto convert/pack removes it from runtime (it also allows the slightly odd choice of taking linear to sRGB to benefit from the range compression and that the HW will decompress for you, tho BC6 has made that a bit obsolete imho).
     
  3. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,377
    i think they do mention this stuff around earlier page of this thread (if i'm not mistaken , i just forgot which thread). Basically they didn't want to add that kind of tool and the shader graph can help user to assign their own input setup
     
  4. Snapshot

    Snapshot

    Joined:
    May 9, 2018
    Posts:
    5
    Ah hmm Booo its exactly the kind of things I don't want to see in shader graph. Its a pre-process, not a runtime thing.
     
  5. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    976
    Hey, thanks very much for sharing this link! In one of this author's other Github repos, I found exactly the kind of code examples for custom nodes that I was looking for in the question I posted earlier. :)
     
  6. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Hi Deano,

    >Performance and quality is pretty good on both PC and XB1, however there are places its lacking.

    Currently XB1 one have poor performance (there is a big gap between PS4 and XBone with HDRP) due to almost no existent ESRAM management, so good to heard it already fit your performance requirement, it can only become better.

    >to have the functionality available on a material

    We have discuss this a lot. Almost every projects (including internal demo of Unity) develop their own tools for that. Sadly we lack resources and time to develop a robust general tools for Unity.

    >I'd be happy with just the features unity currently supports

    What features are you referring to?
    Terrain / Particles / VR or you refer to something else ?

    >accept maintaining a custom renderer based on current SRP:HD
    >So my current thinking is that it would be possible to ship with it,

    This really depends on your context and your shipping date. If it is mid-2019, then it may be acceptable with a graphic programmer support. HDRP still experimental because it is not production ready :)

    Maybe this can help you or not, but I will post just below current state of HDRP for 2018.1 and 2018.2
     
    Last edited: Jul 6, 2018
    Snapshot and konsic like this.
  7. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Here is the current state of HDRP:

    2018.1 features / functionality
    General

    • Platform support: DX11, DX12, PS4, XBoxOne, Metal, Vulkan

    • HD don’t use Resources folder mechanism but rely on a RenderPipelineResources Asset that reference all orphan shader and compute shaders

      • Pros: Users don’t need to add mandatory shaders to always include shaders

      • Cons: Not using Resource folder is problematic as asset referenced in RenderPipelineResources suffer from another issue related to asset pipeline and meta that cause random link break when we upgrade them. Problem appear with Postprocess stack also.

      • Not extensible by the users, even more painful with package manager
    • Constant buffer at Frame, Camera and RenderPass frequency are setup from C#

      • Done for camera except for Shadow matrix

      • ConstantBuffer arrangement compatible with the new batcher from Arnaud Carre ("UnityPerMaterial" and "UnityPerDraw”)

      • TAA jittering matrix handled by HDRP, VR camera retrive with C# API and sent to the shader
    • Camera relative rendering (to have better precision)

    • RenderPipeline Asset control supported features of HD (shadowMask, VR, etc…)

      • This allow to definitely remove memory allocation or shader variant
    • FrameSetting by camera. FrameSettings allow to define which rendering features are enabled for this camera (shadow, sky/fog, sss, opaque, transparent, postprocess…)

    • Scene settings control via generic volume settings hierarchy (similar to postprocess)

      • This handle settings like sky, cascade shadow, fog
    • RenderTarget management via RTHandle

      • No use of GetTemporaryRT() call that cause a lot of trouble with multiple camera and a lot of reallocation. Target are allocated via RenderTexture and based on percentage of screensize (except texture like shadow).
    Debug
    • Generic Debug windows that can handle any debug command / control. This windows is available both in editor and at runtime.

      • FrameSettings per camera control (Override current FrameSettings of the camera)

      • Material debug mode

        • Display any properties of a given master shader either deferred or forward
      • Lighting debug mode

        • Can display diffuse lighting only, specular lighting only, shadow map, sky cubemap, lux meter

        • Can display shadow of selected light in editor
      • Property override mode

        • Override albedo, diffuse, normal
      • Mipmap and streaming debug mode

        • Only based on baseColor of Lit.shader
      • Property debug mode

        • Display mesh with a given property like POM or Tessellation
      • Intermediate buffer

        • Can display intermediate AO buffer, motion vectors
      • Color picker debug mode

        • Allow to pick a pixel of current HDR buffer or any debug mode enabled and display its value
      • Nan checker

      • Light tile / Cluster / material classification debug mode
    Lighting
    • New light type / Features

      • HD Custom light editor

      • Inner angle control for SpotLight

      • SpotLight shape: Cone, Box (Box is what people call local directional) and Pyramid Projector

        • Box don’t support orthogonal shadow for now

        • Pyramid projector don’t use a correct shadow (Use cone settings one)

        • Pyramid support perspective shadow

        • Pyramid and box have no edge attenuation, this is control by the cookie
      • Color temperature

      • Colored cookie textures on directional, point and spot lights

        • Repeat and clamp mode for directional

        • Clamp to black only for spot

        • Animated cookie supported with CustomTexture
      • No attenuation option (For indoor), Dimmer option (to turn on/off smoothly light by script), Fade distance option (Smoothly fadeout with distance)

      • Affect Diffuse / Affect specular option (Don’t save any cost)

      • HD Reflection probe editor

      • Reflection probes with improvement

        • Support OBB and sphere shape

        • Separate influence volume and proxy volume (Only API Side, not UI)

        • Various fading option: per face fade distance, per face fade, normal oriented based fade, weight dimmer

        • Intensity multiplier

        • Realtime reflection probes supported

        • Reflection probe convolution done on GPU at runtime

          • No need for “Specular (Glossy Reflection)” option for custom cubemap (Save import time)

          • Allow different texture resolution for different platform (Platform just use regular mipmap required then convolve)

          • CPU convolution still enable but is useless (need to disable it)

          • For real time cubemap: GPU built-in unity convolution still execute in addition to HD correct convolution.
        • GPU convolution that we do is fast and use importance sampling, it is not a good fit for HDRI with a Sun (Sun should be analytic), it generate noise.
      • Realtime Planar reflection probes

        • Handled exactly like reflection probe (except it is a plane)

        • Only mirror (No glossy reflection)
      • Rectangular area light (no shadow, no GI) - high cost

      • Line light (no shadow, no GI) - high cost

      • Physical light unit (Lumen for punctual light and area, Lux at ground level for Directional)

      • Built-In area lights are not supported (replace by Rectangle light). However in 2018.1 Rectangle Light don’t support baking, so there is no equivalent

    • Shadows:

      • HD additional shadow data editor

        • Shadow dimmer

        • Shadow resolution
      • ShadowMask and ShadowMask Distance feature of built-in Unity supported

      • Deferred shadow for deferred and forward opaque (for GPU performance)

      • Screen space contact shadow for directional light only - control on volume settings - high cost (not polished)

      • Cascade shadow map distance control on volume settings

      • Support various filtering algorithm: MSM, VSM, EVSM, PCF, TentPCF

        • Shadow atlas

        • Default to TentPCF

        • Control is done via code
      • Various shadow bias control

        • View bias

        • Normal bias

          • Use normal map. For directional light only in deferred.
        • Edge leak fix

        • Sample bias (disable by default, expensive)

    • Lighting architecture

      • Prepass option

        • Prepass always perform for forward opaque/opaque alpha tested and deferred opaque alpha tested. Then during regular rendering (Forward or deferred), the alpha testing is not perform and it use depth equal z test (Performance reason).

        • Optional full prepass in deferred (i.e render opaque non alpha tested as well)
      • Tile rendering for deferred

        • Lighting and emissive stored together in emissive buffer (RT3)
      • Tile or cluster rendering for forward opaque, transparent always cluster. If MSAA always cluster

        • Current limit is 24 light per tile (could be change to 31 with few effort)
      • Tile/Cluster use TextureArray

        • Cookie, CubeCookie, ReflectionProbe, PlanarReflection have fixed size

        • Realtime version version are part of the TextureArray with same size restriction

        • None of this texture are compressed (Compressing texture in editor currently don’t change that - uncompressed in TextureArray)
      • Light classification for deferred case

      • Reflection and refraction hierarchy

        • Screen space refraction (not working with sky background), no screen space reflection

        • Fallback on reflection probe (Reuse same probe for Refraction)

        • Fallback on sky
      • Feature parity between deferred and forward renderer (Decals, SSSSS)

        • Except for shadow bias normal with deferred directional light

    • Sky

      • Realtime GPU cubemap convolution (See Reflection Probe)

      • Sky settings control by volume settings

      • Sky manager allowing to have different sky type

        • Optional separate sky settings for baking (Ambient probe + Lightmaps)

        • Optional lighting override (lighting different from visual)

        • Designed with dynamic time of day in mind

          • Sky is rendered into a cubemap when changed and then a convolution is done on GPU. Then sky is render normally in background.

          • Currently cubemap setup in a sky material for built-in Unity system

          • Time of day not implemented
      • HDRI sky

      • Procedural sky (Same as built-in Unity)

      • Fog/Atmospheric scattering: Linear or Exponential

        • Support height based fog

        • Fog can be tint by sky color (Use mips from the sky cubemap)

        • Apply to both opaque and transparent

    • SS Ambient Occlusion (From stack V2: MSVO)

      • SSAO is apply during lighting pass on lighting buffer (which include GI * albedo * AO + emissive, mean double occlusion and AO on emissive that are barely visible)

      • SSAO can be apply on direct lighting with a percentage factor

      • Work in both forward and deferred (Depth only)

      • Use multibounce approximation formula from Jimenez

    • SS Specular occlusion

      • Use Tri-ace trick on top of SSAO

      • Min with specular occlusion from material (no double occlusion)

    • Global illumination

      • Hack to support alpha map and transmissive for PVR (Custom transmissive map should be supported if user add it)

      • Inverse square attenuation (with smooth attenuation) for progressive lightmapper

      • Enlighten don’t support inverse square attenuation
    Material
    • Material architecture

      • Material classification for deferred case

      • 4 GBuffer (3 for material, one for lighting) in deferred + 1 for shadow mask

    • Lit

      • Opaque/Transparent

        • Blend mode for transparent: Alpha, Add, Premultiplied alpha

        • Compatible with Fog

        • Blend mode specular lighting: better handling of specular lighting with transparent blend mode
      • Support receive decal

      • Motion vector for vertex animation (with shader graph)

      • Transparent Queue priority allowing to force sorting order of transparent

      • Two sided lighting: None, Flip, Mirror

      • Object space (OS) and tangent space (TS) normal map

      • Parallax occlusion mapping (POM)

        • Can adapt to object scale and tiling
      • Vertex displacement map (Can be apply with or without tessellation)

        • Can adapt to object scale and tiling
      • Tessellation (Phong)

      • Disney parametrization (Metal/BaseColor) or Specular/Color parametrization

      • Detail map (Smoothness, Albedo, normal)

        • Tiling of detail map can inherit from tiling of base
      • Surface gradient framework (allows to have correct tangent basis for UV sets other than 0). Normal mapping in tangent space rely on a tangent basis that is calculated from the UV set. In Unity, tangent basis is only available for UV0, it means that if other UV sets are used for normal map (like it is often the case for detail normal map), it is incorrect. Surface gradient framework allows to generate a tangent basis on the fly for UV sets other than UV0 and have correct normal mapping result.

      • UV0-UV3 mapping, Planar and Triplanar mapping (compatible with POM and normal map OS or TS)

        • UV1 still reserved by static lightmap (Built-in behavior)

        • UV2 still reserved by dynamic lightmap (Built-in behavior)

        • Precision on static batching issue wrt Lightmap UVs. When static batching happens, *lightmap* UV transformation is applied directly inside the batched mesh on the UVs and not in the shader anymore so it means that it's applied for everything that uses these particular UVs
      • Bent normal support and use to fetch lightmap/light probe (provides better result than using normal map)

      • Specular occlusion with BentNormal (bad quality)

      • Emissive color/mask that can be affected by albedo or not

      • Standard BRDF

        • Isotropic GGX for specular with multi scattering support for specular

        • Burley Disney for diffuse
      • Various BRDF features (Add on top or replace part of standard)

        • Anisotropy

          • Anisotropic GGX with multi scattering support for specular

          • Parameters goes from -1 to 1 to support along tangent and along bitangent anisotropy
        • Subsurface scattering

          • Normalized Burley diffusion (Disney) subsurface scattering

          • Control via a diffusion profile (Diffusion Profile asset)

          • SSS Mask

          • Optional transmission

            • Thickness map for transmittance

            • Transmittance handle shadow for thin object

            • Hack to support shadow for thick object
        • Iridescence

          • Replace fresnel of specular

          • Iridescence Mask

          • Iridescence Thickness map
        • Translucent

          • Transmission Only (See Subsurface scattering)
        • Clear coat

          • Clear coat Mask

          • Fixed smoothness, reuse normal map of standard
      • Rough refraction option for transparent material

        • Support 2 mode (plane and sphere) with thickness

        • Absorption

        • Index or refraction

        • Transparent can be render before rough refraction pass (but then break the sorting) to be visible in rough refraction
      • Distortion (Distortion is based on distortion vector and target artistic effect unlike rough refraction which is physical)

      • GI

        • Linked Two sided lighting with Double Sided global Illumination

        • Meta pass is correctly handled for vertex color and UVs and support planar and triplanar
      • Transparent only sorting help

        • Material can define relative priority (either pre refraction or not)

        • (not expose) Support for a depth prepass for transparent object (to help with sorting issue)

        • Support of back face then front face rendering for improve sorting issues

        • Support of depth post pass to solve issue with Postprocess (DOF/MB)
      • Support instancing

    • Layered Lit

      • Two to Four Layers

        • Layer is a Lit material that only support material type: Standard, Subsurface scattering, Translucent)

          • Transparent may not behave correctly

          • Flipped normal with two sided lighting may not work correctly with multiple layer and surface gradient framework with UV1-3.

          • Parallax occlusion mapping (POM) does not work currently with multiple layers
      • Blending based on

        • Blend mask

          • Separate UV mapping and tiling
        • Vertex color (two mode: additive, multiplicative)

        • Heightmap (optional)
      • Optional influence mode of Main layer

        • Influence mask layer for fine control

        • Current baseColor, normal and heightmap Layer can be modified (influenced) by the Main layer
      • Optional density mode

        • Alpha in diffuse controls a threshold to make layers appear (Giving the illusion that we control the density of a particular material, like small pines)
      • 2 buttons to be able to synchronize properties of a given material on a given layer

        • One to synchronize all properties

        • One to synchronize all properties but UV mapping and tiling

    • Decal

      • Decal Projector

        • DBuffer approach for deferred and forward opaque

        • Cluster decal for transparent (Crash on PS4)

        • Support BaseColor, Normal, Smoothness (Single blend value)

        • Still unstable
    Camera/Postprocess
    • Support Postprocess stack V2 support except SSR

    • Motion vector: Support of skinned motion vector and add concept of MotionVectors pass
    2018.2 features / functionality
    General
    • Support history buffer per Camera (History buffer are keep frame to frame, use for temporal accumulation and SSR)

    • Every constant buffer setup from C# except the one at Per-Object frequency

      • Still shadow pass to fix
    • Editor Outline shader support for alpha tested object

    • Keyword stripping support (Limit shader variant at build time)

      • Control by RenderPipeline Asset ‘support’ flags

      • Each Material can provide their rules to exclude shader variant

      • How this work as Asset is suppose to be assign at runtime?
    • Better support of “support” flags in RenderPipeline Asset

      • Don’t allocate memory, remove shader variant
    • Enable SRP Batcher by default (Almost stable to be enabled but not fully yet)

    • VFX editor compatibility - Unlit / Lit opaque

    • Subset of HD features support in Shader graph (Part that is share with Lightweight)

    • Disable per object-light culling
    Debug
    • New debug mode

      • FalseColor, Correct Lux Meter, shadowmap visualization
    • Texture streaming debugging
    Lighting

    • New Light type

      • Function to generate an emissive mesh for line and rectangle area light (rectangle) of correct size and intensity, allow to get correct GI.

      • Realtime Planar reflection probe

        • Glossy reflection support

        • Light in planar reflection other than directional light are not working (Planar use an oblique matrix and the gpu light culling code is not compatible with it yet)
      • Reflection Probe

        • Clear Reflection Probe to black and disable Sky to not be polluted by Sky in first bounce (Martin problem report)
      • Optimization: Sort LightDefinition property by access order

    • Volumetric lighting

      • Support directional, point, spot, cookie, shadows

      • Support ambient probe

      • Homogenous and local fog

      • Reuse cluster light list

      • Settings control by Volume settings

      • Support 3D Texture to control heterogeneous fog

    • SS Reflection / SS Refraction

      • More perceptually linear roughness for refraction

      • Use color pyramid from previous frame

      • Support proxy and hierarchical screen space trace

      • Current HiZ version is not working correctly and have performance problem


    • Global illumination

      • Support shadow mask control per light (no more global choice of distant shadow mask and regular shadow mask, all light use shadow mask distance and can optionally have regular shadow mask enabled (i.e render of only non lightmapped object in dynamic shadow).

      • Enlighten still not support inverse square attenuation
    Material
    • Support Normal+Roughness buffer dump during depth prepass

      • Required to perform SSR or SSAO in forward (feature parity)

      • Required for shadow normal bias of deferred directional shadow

    • Lit / LayeredLit

      • SpecularAA

        • Add geometric anti-aliasing term from Yusuke Tokuyoshi
      • Subsurface scattering
    • Auto thickness calculation (based on shadow map if available) for thick mode

    • StackLit (Automotive / VFX) - Follow Laurent Belcour research

      • Isotropic GGX coat layer on top of anisotropic GGX layer

      • Coat normal

      • Dual specular

      • Geometric and texture normal filtering: Normal map texture need to be specifically generated for texture filtering

      • Subsurface, Transmission, Iridescence

      • SpecularAA

        • Add geometric anti-aliasing term from Yusuke Tokuyoshi

        • Add support of variance + normal map (variance is generated at import from normal map and combine correctly in shader graph / shader)

          • Done but not working good

    • Decal improvement

      • Support Decal Mesh for DBuffer

      • Optimization

      • Support UV tiling
    Camera
    • Better handling of motion vector

      • Support correctly motion vector in motion vector pass
     
    pvloon, sqallpl, Korindian and 5 others like this.
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,377
    @SebLagarde wait "Support Decal Mesh for DBuffer" mesh decal are supported now?
     
  9. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    562
    It's coming, I was excited to see it pop on Github a few weeks ago.
     
  10. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,366
    one_one and syscrusher like this.
  11. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,366
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,377
    wouldn't it be better though if bent normal are a realtime gbuffer just like how star citizen did for their specular occlusion?
     
  13. Michal_

    Michal_

    Joined:
    Jan 14, 2015
    Posts:
    360
    Are there any plans to let us customize culling and instancing? How does ECS and GPU culling fit into SRP?

    We can simulate and render large number of entities thanks to ECS but it only works if we manually create instanced draw calls (Graphics.DrawMeshInstanced). But we obviously want different instanced draw calls for camera frustum and for each shadow map. Graphics.DrawMeshInstanced + Unity culling is useless in this context because it will use the instanced draw calls for camera and all shadows. Making it either slow or incorrect. What is the plan for ECS rendering (or manual instanced rendering in general)?

    What if we want to perform frustum and occlusion culling on the GPU for performance reasons? We will again need to create different instanced/procedural draw calls (+indirect draw calls) for camera and shadows. And possibly mix it with build-in culling for local lights. I don't see any "clean" way how to do it in SRP now.

    And maybe we simply have better understanding about the geometry in our scene and we can perform culling and instancing more efficiently than general purpose solution. Especially with ECS.


    I really like the idea of SRP and ECS. And I believe we can hack it to achieve our goal. I just wish it was less of a black box or the public API was more generous.
    (I have no hands-on experience with SRP, so maybe I'm missing something here)
     
    hippocoder likes this.
  14. Snapshot

    Snapshot

    Joined:
    May 9, 2018
    Posts:
    5
    Thanks Seb, that overview is really handy.

    For us, particles and xb1 ESRAM performance are probably the only things we miss. Both things I can probably work around until support makes it in.

    As we are a procedural generated destructible game, most of the baked lighting stuff isn't for us so we tend to have lots of lights which is why the tile/cluster improvements are such a compelling feature to us.

    You mentioned the internal teams use there own tools for the material interface stuff, do you know if they tend to use a facade over the material or a seperate tool? Ideal world i'd like a facade like interface so the artists can gradually upgrade to the newer style interface over time, so if there is an example of that would be interesting in taking a look even if its custom and requires reworking for us.

    I'll be moving to 2018.2 very soon, so might have some more feedback its looking good.

    Nice work by the team!

    Deano
     
    syscrusher likes this.
  15. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    148
    "Disable per object-light culling" :( So that's truly intended to be that way ?
    Or is it just disabled because it's not finished or... (in which case, any eta ?) ?

    Also, I wondered if that was a bug while using LWRP: light culled by specific layers is disabled/not working. (I'm not sure it's the same feature as 'per object light or unrelated..)
    There's no feedback in the light inspector about the rest of the layers being disabled..or is it a bug ?

    Note that the issue doesn't show up if: the shadows are disabled, or that 'Nothing' culled mask is used.


    Some other frustrating note, regarding the Github of SRP "We are migrating reported issues to fogbugz. Please log issues there."
    1. Have no idea what 'here' means in that context
    2. fogbugz -> okay, seems like JIRA type thingy, didn't found any unity thing related, only way to connect to fogbugz is apparently creating a 'manuscript account' that is 'free' for 14 days ? What I'm supposed to do to be able to submit bugs or follow the ones that were created on the github ??

    Thanks for your reply.
     
    Last edited: Jul 9, 2018
  16. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,177
    This is the system where your bug report discussion is tracked, afaik you are not supposed to use the system directly yourself. All bug reports you make with Unity's own bug report tool show up in fogbugz system and further input is provided via email. More info here:
    https://unity3d.com/unity/qa/bug-reporting
     
  17. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    >For us, particles and xb1 ESRAM performance are probably the only things we miss.
    Certainly not what you are waiting for, but currently Shuriken unlit particles work.
    Shuriken lit particles work too (with a lit shader) if you don't use Shuriken feature (i.e don't use vertex color or related)...

    There is a plan for a new nodal GPU VFX editor to come for HDRP, it's in progress.

    >You mentioned the internal teams use there own tools for the material interface stuff,
    it is usually a script launch on the whole game data, or a script executed at import time with some naming convention. nothing fancy or elaborate.

    Cheers
     
  18. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Hi,

    >"Disable per object-light culling" :( So that's truly intended to be that way ?
    We don't use it in HDRP and it was wasting CPU performance, what was your intented usage?

    >1. Have no idea what 'here' means in that context
    Poke @Tim-C
     
  19. Immu

    Immu

    Joined:
    Jun 18, 2013
    Posts:
    148
    @SebLagarde, I probably confused it with 'per layer-light' culling, my bad. I suppose it's not the same thing ?
    I intend to use light culling mask/layer in LWRP but it doesn't seem to work properly (as explained in picture above), but again, I don't know if it's disabled intentionaly or a bug.
     
  20. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,177
    How does one select these filters on HDRP? I tried looking out everywhere but I can't find any place on the editor where these could be set. I'm mainly interested on trying out recently added PCSS on HDRP (using HDRP 2.0.5-preview from staging).
     
  21. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    562
    It's through code to change it.
    upload_2018-7-11_12-59-9.png
     
    rizu likes this.
  22. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,177
    Ah thanks, I missed that line. Curious still, are they going to expose the settings in editor on default scripts / assets? I makes very little sense to make people write custom scripts just to set the shadow filtering.

    Also, wonder how you are supposed to control it via code, I made this short test script (need to be attached to a light source) but it doesn't change anything visual, so I'm probably missing something:
    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3. using UnityEngine.Experimental.Rendering;
    4.  
    5. [RequireComponent(typeof(AdditionalShadowData))]
    6. public class ShadowFilter : MonoBehaviour {
    7.     int shadowAlgo = 0;
    8.  
    9.     void Start()
    10.     {
    11.         StartCoroutine(SwapShadowAlgo());
    12.     }
    13.  
    14.     IEnumerator SwapShadowAlgo()
    15.     {
    16.         AdditionalShadowData data = GetComponent<AdditionalShadowData>();
    17.         while (enabled)
    18.         {
    19.             int shadowDataFormat;
    20.             int[] shadowData = data.GetShadowData(out shadowDataFormat);
    21.             data.SetShadowAlgorithm(shadowAlgo, (int)ShadowVariant.V0, (int)ShadowPrecision.High, shadowDataFormat, shadowData);
    22.             Debug.Log("Shadow Algorith: " + (ShadowAlgorithm)shadowAlgo);
    23.             shadowAlgo++;
    24.             if (shadowAlgo > 4) { shadowAlgo = 0; }
    25.             yield return new WaitForSeconds(1);
    26.         }
    27.     }
    28. }
     
    Last edited: Jul 11, 2018
  23. poa123

    poa123

    Joined:
    Jul 13, 2018
    Posts:
    22
    Using HD Pipeline, i still have to update Shader Graph last version from Package Manager in order to stay up to date? Or the HD Render Pipeline package will be aligned with the last supported Shader Graph version?

    Thanks!
     
  24. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    562
    It should give you the latest when you update, same goes for LWRP.
     
  25. poa123

    poa123

    Joined:
    Jul 13, 2018
    Posts:
    22
    I believe the same applies for the Post Porcessing package, right?
    Saw a commit that says "revert post process version for now" on ScriptableRenderPipeline git.

    Thanks!
     
  26. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    80
    Hi! I'm not finding any subforum so I'm asking here.

    I wanted to follow a video tutorial about the shader editor and I'm having trouble with 2018.2:
    1 - I create a new project (3D with Highend Scriptable Pipeline)
    2 - The default scene eventually loads all fine
    3 - I import a model/prefab from the asset store
    4 - All I see on the model is pink

    The materials seem to be all wrong, how come?
     
  27. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,366
    Because those models and prefabs are still using materials that use traditional Unity shaders such as the Standard Shader. The new scriptable render pipelines use their own shaders and old shaders are not compatible.

    Unity have provided some menu options that will upgrade existing materials, so long as they are based on Standard Shader etc rather than specialised custom shaders. Go to the Edit menu in Unity, then Render Pipeline, then Upgrade Project Materials to High Definition Materials. Or, to just upgrade one or several specific materials in particular, select them and then Edit->Render Pipeline->Upgrade Selected Materials to High Definition Materials.
     
    ZoidbergForPresident likes this.
  28. ZoidbergForPresident

    ZoidbergForPresident

    Joined:
    Dec 15, 2015
    Posts:
    80
    Ooooh! Thank you, I think this is what I needed! Thanks a lot!
     
    elbows likes this.
  29. BadFoolPrototype

    BadFoolPrototype

    Joined:
    Sep 7, 2013
    Posts:
    14
    Hello there,
    on a slightly different note the file https://github.com/Unity-Technologi...Projects/GraphicsTests/Packages/manifest.json is not available anymore.
    What can be used otherwise ?

    I love the concept of ScriptableRenderPipeline, even if in my case I want a complete control of every pass and shader by writing from scratch.
    But this is an amazing addition and at least gives the flexibility to create your pipeline!
    Thanks!
     
  30. poa123

    poa123

    Joined:
    Jul 13, 2018
    Posts:
    22
    Hey guys.

    I am struggling a little with Antialiasing... i have a default (template) HD Pipe scene, with the Traption Guard imported from Adam samples.
    No matter how much i change the Temporal AA settings, i always end up with some noticeable jittering (specially on smooth surfaces / edges being lit by light)...

    Any advice to improve AA in Unity, specially on HD pipe?

    Thanks a lot!

    PS: in the picture the problem is not noticeable, i only attached to clearly show the kind of asset i am working on. In that plates on the head the jittering is worst...
     

    Attached Files:

    • UHD.jpg
      UHD.jpg
      File size:
      237.9 KB
      Views:
      445
  31. eric_delappe

    eric_delappe

    Joined:
    Dec 10, 2015
    Posts:
    18
    With the LWRP in 2018.2, many of the scene view UI elements are not rendering properly. The grid is invisible (though you can kind of see it pop in when viewed from a certain angle). Gizmos and selection outlines are also much more transparent than they should be.
     
  32. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    We have a fix in the works for this :)
     
    anuragaofl likes this.
  33. Laurens-Paladin-Studios

    Laurens-Paladin-Studios

    Joined:
    Apr 25, 2015
    Posts:
    49
    Hi there Unity,

    Using LWRP alpha clipping in the material is not taken into account when baking GI with progressive lightmapper.

    On the left you can see the baked plane and on the right is the real-time cast shadow. Double sided GI is enabled in the material:
    BakedGiAlphaClip.JPG


    It works just fine using Unity standard render pipeline:
    BakedGiAlphaClip_UnityRP.JPG

    Since we are developing for mobile, alpha clipping and correct lightmapping are quite important features we are going to need.

    Is this issue already on you radar? I made a bug report
    • (Case 1061688) [LWRP] Alpha clipping not taken into account with baked lighting

    Thank you,
    Laurens
     
    hippocoder likes this.
  34. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,093
    Thanks for making a bug report. This is on our radar but the bug report helps with prioritization.
     
  35. pavelkouril

    pavelkouril

    Joined:
    Jul 22, 2016
    Posts:
    125
    Hello,

    is the VR support for HDRP coming anytime soon (e.g., with 2018.3 beta)?
     
  36. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    562
    Try turning on Geometric Specular AA on the material that should get rid of most if not all of it.
     
  37. reflectingb0t

    reflectingb0t

    Joined:
    Apr 10, 2018
    Posts:
    18
    Hi, i have a question about Environment Ligthting in HDRP. I want to have baked ambient light with a custom gradient, but everytime I reload the scene, it'll reset all it's environment settings.
    I read a bit in this thread and SebLagarde said some time ago, that the environment setting were supposed to be set inside the volume settings, but I don't get how to do this with a gradient.
    Already tried to use a custom skybox with those colors as HDRI sky inside the volume settings, but it seems to just ignore it and always bake the default skybox (?). Same thing with procedural sky, if changing the ground color.
    So how do I achieve this in HDRP? I'm completely lost with this.

    Also, if the environment settings are going to be moved to volume settings, it would be nice, if we could keep the source modes color and gradient (maybe integrate them into procedural sky or something like that?

    upload_2018-7-19_0-12-14.png
    test scene with custom gradient colors

    upload_2018-7-19_0-13-2.png
    same scene after reloading..

    Thanks,
    Lea
     
  38. dri_richard

    dri_richard

    Joined:
    Mar 10, 2017
    Posts:
    57
    I also need to know the answer to this. We need to make decisions for a high-end VR game in the next couple of months, and without clarity on when HDRP will support VR - in production - we may simply have to move to UE4. HDRP is great but if the preview status and lack of VR are open-ended, then Unity's rendering is stagnating and our stakeholders will push strongly for an alternative.
     
  39. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,648
    I'm finding the longer I am in game dev, the less abstraction there is for simple things, the better. This approach you suggest is OK but really a big red flag that you're shifting the responsibility from earlier to later. You will definitely have to revisit that later on as it would have to generate these textures for every shader tweak, which for some projects (especially mobile) might lead to big problems later on with memory / performance.

    Also it hides what is happening. I could not be more against that kind of practise.
     
  40. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,366
    See the following forum post, where someone makes reference to the Unity blog post about 2018.2 which apparently mentions VR support for HDRP is scheduled for 2019, not this year...

    #301
     
  41. dri_richard

    dri_richard

    Joined:
    Mar 10, 2017
    Posts:
    57
    Thanks for sharing the link. Unfortunately, 2019 is 6 months away, and 12 months long, and who knows if VR support will arrive in a preview state.
    What to do...
     
  42. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,366
    if you dont have the luxury of dealing with such timescales and uncertainties then there is probably only one choice.
     
  43. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,177
    ^ or just use the legacy renderer or valves the lab renderer, depending on what you want to do in VR.

    Do note that if you go for Unreal and their forward, they've got limited feats there and afaik, they haven't even fixed the MSAA shadow artifacts (Robo Recall didn't suffer badly from those so they never fixed them).
     
  44. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,366
    Ah thats actually 'one solution' I meant. Switching engines completely only makes sense to me if there are other compelling reasons to do so and the reasons not to arent likely to bite you in the bum.
     
  45. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Hey, I don't know if light culling mask is supported d in LW. And yes, it is something different.
    @Tim-C ?
     
  46. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Sadly the setup is not friendly currently, of course we want to improve that in the future...

    For now, from what If i remember well, you have two files to edit:
    - LightLoop.cs at line ~128 when SetGlobalShadowOverride is called you can change the shadow algorithm to PCSS, also make sure to use the ShadowVariant V0 with PCSS as it has only one variant.
    - To access the PCSS shadow settings you have to comment the
    ```[CustomEditor(typeof(AdditionalShadowData))```
    line in AdditionalShadowDataEditor.cs
    And then normally in the light inspector you'll see PCSS's properties `shadow softness` and `sample count` at the bottom of the AdditionalShadowData component
     
    rizu likes this.
  47. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    What is the purpose ? You can check any manifest in the github database as an example (in core, in LW, in HDRP...)
     
    BadFoolPrototype likes this.
  48. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Using GeometryAntialiasing can help, TAA can be tweaked a bit but will not solve all the issues.
    If the problem come from normal map, it mean this is a texture filtering issue and we haven't added that currently.
     
  49. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Hi, Not for 2018.3
     
  50. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    450
    Hi,

    Doc is here: https://github.com/Unity-Technologies/ScriptableRenderPipeline/wiki/sky-and-fog with an example of how to write a custom sky to make a gradient (Yes, not friendly way yo handle this sorry).
    We plane to hide the environment lighting on the lighting panel soon, so user are not confuse by it.

    We may add the gradient later, not a priority due to other task.