A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Separate names with a comma.
Discussion in 'Graphics Experimental Previews' started by Tim-C, Feb 19, 2018.
Now if I were to jab in lensflares....
.....How would I do THAT in THIS Render Pipeline?
....OH, and projectors while we're at it!
We currently don't have an upgrade path for terrains since by default there is no 'Material' normally, so the upgrader cannot find it to convert it. As for the trees we are currently working on porting the legacy speed tree shaders, as of now we currently do not have ant LWRP compatible tree shaders.
We haven't seen this internally, it would help us tremendously if you could file a bug with a small repo of the issue.
Interesting issue, I have tried multiple setups with multiple cameras and UI, if you could file a bug report with a small repo it would be great and help us track down and fix the issue quickly.
I'm not sure what you mean by instanced properties, are we talking about GPU instancing and using material property blocks? or is this something specific to Amplify shader editor?(I haven't used it much personally)
Currently if you have post processing enabled a depth pass is created, we can look into only requiring it if an effect needing depth is active but this might be a while off as this will most likely require changes to how the post v2 stack is working.
This example does seem like it would actually be slower, as 1000x34k is 34m vertices, 1000 draw calls(which aren't as bad as everyone thinks they are) vs trying to combine and render a 34m vert mesh is probably much easier on the hardware.
In saying that if GPU instancing 1000 cubes is slower than rendering all 1000 then we have an issue. Also if the same setup in legacy pipeline is faster then this is an issue/bug so feel free to file a bug report if this is the case.
Currently Lens flares work fine in LWRP(un-intentional) but they will be getting replaced by a post processing effect in the future, but in saying that we do need to support classic quad based lens-flares for low-end hardware, in the meantime just use the current lens flares in Unity.
The old implementation of projectors was very bad(great in it's day, 10 years ago), and caused a heap of unnecessary additional rendering, in saying that we do need a replacement that can be used as a proper decal system, since LWRP is a forward only renderer we cannot do decals the good way as deferred decals, so this is something we are currently investigating.
Well here's the problem, if I WAS to implement lens-flares... It would appear in the editor, but they wouldn't appear in-game... Unless I have to write my own shader for it... Which I WILL if I have to, but WHERE would I implement that?
Also... For projectors? Take your time if that means more power for mobile devices.
Oh please do fix the current projector rendering, also having a mesh decal support that would be great
THUS, take your time... What I'm doing here can wait for projectors... But they WILL look bizarre if someone falls off the map.
.... Now if someone could answer my billboard sprite riddle.
WebGl works with UI and LWRP? Can i make a WebGl build?
Well if it works for Mobile... Bet it could work for WebGl
Ive imported a few Unity assets I bought from the asset store, is there anyway these can be compatible when using Lightweight? I keep seeing pink materials....
Huh interesting, the editor must be forcing the overlay pass to be drawn. Unfortunately the internal Lens flare shader hasn't been exposed in the UI for replacement, you could try the classic duplicate builtin shader and change that but no guarantees as this is not the official way. This is exactly what we are looking into a proper replacement to a very old system.
Mesh decals would work well for static decals but dynamic ones could get taxing if having to project onto arbitrary and complex models, we have a Hackweek coming up here at Unity and I'm very tempted to have a dive into our options.
Whats the riddle? Or better yet whats the question
Unfortunately not right now, WebGL has a single thread limitation which is causing us issues in getting SRP in general working nicely, our WebGL team know about the issue and are looking into a solution.
Unfortunately LWRP uses a very different lighting system from standard unity making previous shaders incompatible, we also have dropped support for Surface shaders in SRP as the system(as much as it was useful to a lot of users) was a terrible mess in the background leading to bugs popping up all over the place, we are thinking about our options here too as we know having an intermediate shader system is well helpful to you guys.
In saying that all previous unlit shaders that are Vert/Frag should(TM) render fine in LWRP.
Normally mesh decal always used for static decals of course, beside mesh decal creation are better to be done in 3d software or probuilder. i'm just hope that mesh decal blending are supported.
I'm trying to billboard a sprite... How would I graph that? I know it involves a combination of matrixes... or something, and put that into our sample sprite node's UV... I think.
Do you think there will become support, I honestly love the new system, but for example amplifiy shader does not work at all with it. Guessing this is the new route, so waiting from updates from developers will be the case?
If a realtime Area light (or box shaped spotlight) is twice as taxing as the "classic" Unity lights, why not still allow it in LWRP and just count it 2x towards the pixel light limit?
But ok, if that is impossible, could we at least, please be allowed to scale a realtime point light in just one axis?
I've got a suspicion that box-shaped spotlights (NOT rectangular area lights) maybe possibly could be made available soon as it's just a change to the normal circular spotlight and since the shadow system could just use a 'stretched' square shadow map it isn't too different. Using a slightly smoothed off cookie it could pass reasonably well in most cases. Obviously not going to be anywhere near as good as a proper rectangular area light, but as an el cheapo substitute.
As for any lights that cost twice the normal amount, that's probably not possible the way it's set up; you currently have a distinction between vertex lighting, pixel lighting, and the 'most important' pixel light, and it's a bit like square peg round hole trying to fit anything else in there.
I have just started testing the LWRP, and it was going really well until I pushed my simple scene over to an Android device. I am having the same issues as @georgeq is here. My scene has a couple of lights, and post processing, but other than that, it is some planes and a moving cube. It is snagging on the gfx.waitforpresent in the profiler.
I tried the usual fixes found around (turn off vsync, hard code target frame rate, etc) and removing post-processing or lights or other elements has no significant effect. The slowdown is obvious on the device when my moving cube stutters consistently. The profiler is registering a consistent 15fps.
Has this been looked into yet? I am using 2018.10f2.
Yes that's it I'm sorry I wasn't clear enough here is an example:
In order to make GPU instancing work you'll have to make an Instanced material property:
I am setting the material property blocks through a script:
Setting the mainTex alone results in the objects being batched through GPU instancing. But setting the color results in the GPU instancing breaking because it is not a value that is instanciatable by default:
It needs these lines of code to work, in order to call the color like this:
But when we add this to the shader, it will not compile in the LWRP. What would be the best approach to make GPU instancing work in LWRP, maybe even with a shadergraph shader?
You will have to plug those matrices into the Vertex offset on the master node, to get you started have a look here for the shader code, you will be able to translate this into nodes.
This is indeed up to the developers, but I'm pretty sure Amplify has support/are working on support with the Pipelines.
It's not on our roadmap as it doesn't really fit with the aim of LWRP, but this doesn't mean that we will rule out ever adding them. Also as a fun learning exercise there is nothing stopping you from adding them in, that is in large the whole point of SRPs, the customisation level.
Would be interested to hear more about the setup you have. I've created the Boat demo shown off to demonstrate LWRP, it has post processing, 3 cameras, planar reflections, realtime lighting, etc and I can get 30fps on an S7.
In saying that we a still making large changes to the core of LWRP for performance as we know it's not as fast as it could be, this work is aimed to be completed once 18.3 is released later in the year.
By chance what is the shaders error you are getting? Instanced properties work fine as they have been tested and used a fair amount so something is weird here.
Hi, thank you for reacting:
These are the lines being refered to in the shader:
It might be that amplify is just not ready for this, and I'll have to wait for an update. Or is there a way to create instanced properties with shadergraph?
You currently cant do most things that are useful in shadergraph, so I doubt you can do this.
Still waiting for a way to do a NdotL that does not require me to edit copious amounts of code.
Sure! I'm interested in any guidance you have for me.
I have adjusted the amount of all elements to various levels with minimal increase in frame rate in editor (~400 fps, which is fine) or on Android (~15 fps).
I made a large box with primitive planes. One side of the box has a slit in it to let light come in from a directional light outside. The camera is inside the box. Inside the box is a cube and two emmissive spheres. I have post-processing turned on with just bloom. I have lights set to mixed and all sides of the box set to lightmap static except the one with the slit.
Again, I have varied the number of lights, the post-processing, objects being static, vsync, build settings like "Graphiics Jobs (Experimental)" and "Multithreaded Rendering"... all to very little effect.
Looking at the GPU in the profiler, most of the hit is coming from the rendering. I've attached the selected bit from the profiler. I only have 72 batches.
Again, any help is appreciated. Outside of the frame rate, this simple scene has some nice effects and I like where this is headed!
EDIT: I have continued to fiddle with this. If I strip everything down, I have found two things that do make a difference, but it was hard to tell when both were in effect. The first is a bit obvious, and that is the post-processing. The second seems weird, and doesn't make sense, but when I swapped out a primitive plane with a primitive cube that was flattened, my FPS doubled. I ensured that all of the lighting/shadows/material settings were the same.
EDIT2: After getting rid of planes in the scene to eliminate that (inexplicable frame rate hit), I kept testing. Tried different LWRP setting profiles and messed with the settings in there quite a bit. Saw some improvements, but just a few FPS here and there with a big reduction in quality generally. The best improvement I found was checking the "Fast Mode" box on the bloom effect in post-processing. Bloom is the only post-processing effect I have activated.
Again, this is looking really good and I want to be able to use a few of these effects. I swapped everything back to standard as a test and to view the difference, and the LWRP definitely looks a lot nicer! This is a nice new system in the works, and I appreciate the work on it.
I'm currently attempting to migrate a scene to the LWRP. I have gotten everything to either convert properly, or found a close-enough equivalent (e.g. speedtree shaders). However, I have had no luck with making the BillboardRenderer component draw anything. Does anyone know if it is possible to use the billboard system with LWRP, or will I need to write my own?
Hey there, does the Lightweight RP support the use of triplanar shaders?
Yes, you can use triplanar shaders with the Lightweight Pipeline, there is a Triplanar node in the Shader Graph
You are amazing thank you!
I compared it to my shader I use for testing and it seems it's missing the buffer name in the closing line, eg:
As for shader graph support, it's on the roadmap but no eta yet.
After a quick look through there is nothing that stands out from what you said, one thing to note is post is a heavy thing, a good rule of thumb is always tick the 'fast mode' options, and stay away from High Dynamic Range colour correction. Also depending on the phone you are testing on you might be rendering at a silly resolution such as 2560x1440 which is too much for a mobile to handle 3d with post, make use of the 'Render Scale' option in LWRP so you can render the scene at a lower res and keep the UI crisp(we are working on making the UX better for this so you can choose a max res such as 720p or 1080p).
This is my bad, I actually took on the task of bringing the legacy speed tree shaders into LWRP, it's almost done aside for the crossfading and billboarding, I will aim to get this done for 18.2.
Thanks for the response. I was doing testing on an S6 (2560x1440 resolution), and I was able to get things up to 30 fps by putting render scale at 0.5 (which I assume is about 720p). True, there was a decrease in quality, but not bad. I have also switched over to an S8, and it is dealing with everything just fine, even with the higher settings. So, this is likely just a problem on older devices, which is reasonable.
Should the different quality settings in the project preferences be switching between different LWRP profiles? It seems like there isn't a connection and I just need to assign a profile manually (or, I assume, with my own code at run time).
Thanks again for the help.
Ok, sounds good. For the meantime I guess I'll throw together a simple custom billboard system or something.
No, right now there is no linkage between them, for now you have to code a link between them so when you switch the pipeline asset with a different one the quality settings also change. It's not idea and we know our current settings situation is quite all over the place and I apologise for that, I'm using Unity every day and I find it frustrating but we are making head way in unifying all the settings so it's on the way!
Quick heads up: for fog with in the LWRP, I was unable to get exponential fog to work in exported builds (VR or 2D). Linear and exponential squared work just fine, but exponential works in editor & play mode, just not in exported builds. This has probably been reported somewhere before but just in case.
Any update on the status of mobile VR? I am still getting nothing rendering and openGL invalid state errors with 2018.2.0b7 and lightweight 1.1.10-preview. Hoping the fix makes it through the pipe soon; particularly interested in the 18.1 backport.
We are dropping Exponential since Exponential Squared is more physically correct and Linear covers other use cases, we just don't have the API to change the Lighting Settings window so it still appears.
Also we are planning to add a builtin height fog as a third even better option.
The LWRP devs have been working hard this week with the XR team so things should be looking good, but as far as backports to 18.1 are concerned, due to both the feature being 'Preview' and also our new release style means the 2018.x versions stop getting updates as newer 18.x versions release, check here for more info on LTS. So trust me if you are wanting to use LWRP it's worth while updating as 18.2 comes out, the amount of fixes and improvements will be worth it.
I came across an oddity. When I use the default lightweight particles, they show up fine on the Galaxy S6 I am using as a low-end tester. They do not show up on a Galaxy S8 I am using for comparisons. If I put in the regular Default Particle material, it works fine on both.
I tried different quality settings, etc. and it didn't seem to matter.
Gear VR and LWRP doesnt play well, unity 2018.1 , lwrp 1.1.10. Only skybox renders, and no other materials .
i am getting these errors when try to make build for Holocene
i am using unity 2018.1.1 with lightweight pipeline.
C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\firstname.lastname@example.org\PostProcessing\Runtime\PostProcessManager.cs(75,40): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\email@example.com\PostProcessing\Runtime\PostProcessManager.cs(76,40): error CS1061: 'Type' does not contain a definition for 'IsDefined' and no extension method 'IsDefined' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\firstname.lastname@example.org\PostProcessing\Runtime\PostProcessManager.cs(77,41): error CS1061: 'Type' does not contain a definition for 'IsAbstract' and no extension method 'IsAbstract' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\email@example.com\PostProcessing\Runtime\PostProcessManager.cs(80,34): error CS1579: foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator'
C:\Users\RChoudharyX098698\AppData\Local\Unity\cache\packages\packages.unity.com\firstname.lastname@example.org\PostProcessing\Runtime\PostProcessEffectSettings.cs(26,41): error CS1061: 'Type' does not contain a definition for 'IsSubclassOf' and no extension method 'IsSubclassOf' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
1.4's out... You can download THAT and try it out.
I have a new, periodic problem. Sometimes upon load or when switching a material from one LW shader to another (only the included shaders), I get a "failed to open source file: 'LWRP/ShaderLibrary/InputSurfaceSimple.hlsl' error. Textures end up pink, as expected. Often a restart of Unity will resolve this, but not always. Is there a reliable way to get this fixed?
is it possible to reach and change render scale in LWRP during runtime?
hello, i have problem about zsorting for leafes, i try two test, the left tree leafes use graph based shader, its works fine but suffering z sorting because its per object sorting, and tree on the right use lightweight cutout particle shader its works perfect but only get main directional lighting, can i use alpha cutout in standard shader? thank you
Thank you, all is fine now!
Support came in with 2018.2 and lwrp 2+ so you need the beta. It works with 2018.2.b08 and lightweight 2.0.3-preview. And MSAA seems to crash with an "GL_INVALID_FRAMEBUFFER_OPERATION" on the device so remember to keep it off for now.
Hi. I found that Halo doesn't work on LW RP. Is that expected design?
I'm trying to use projectors, which maybe not work in the LWRP at the moment? But when switching shaders, I get these error:
Shader error in 'LightweightPipeline/Particles/Standard (Physically Based)': failed to open source file: 'LWRP/ShaderLibrary/Lighting.hlsl' (on metal)
Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_DESKTOP UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
Shader error in 'LightweightPipeline/Particles/Standard (Physically Based)': failed to open source file: 'LWRP/ShaderLibrary/ParticlesPBR.hlsl' (on metal)
Shader error in 'LightweightPipeline/Standard Unlit': failed to open source file: 'LWRP/ShaderLibrary/InputSurfaceUnlit.hlsl' (on metal)
Shader error in 'LightweightPipeline/Standard Unlit': failed to open source file: 'LWRP/ShaderLibrary/Lighting.hlsl' (on metal)
Shader error in 'LightweightPipeline/Standard Unlit': failed to open source file: 'LWRP/ShaderLibrary/LightweightPassDepthOnly.hlsl' (on metal)
Is this due to metal, or am I doing something wrong? Is it impossible to use projectors at the moment, or how do I set it up? I've used it in the past, and I don't remember it was very hard to set up.
I'm trying to use the project onto a terrain, projecting onto a plane seems to work. Is that the issue?
Also I'm now getting these errors in Play mode and I can't tell where they are coming from:
Shader properties can't be added to this global property sheet. Trying to add _RefractionTex (type 3 count 1)
Shader properties can't be added to this global property sheet. Trying to add _RefractionTex_ST (type 1 count 1)
Shader properties can't be added to this global property sheet. Trying to add _RefractionTex_TexelSize (type 1 count 1)
Shader properties can't be added to this global property sheet. Trying to add _RefractionTex_HDR (type 1 count 1)
I'm really a noob on rendering and such, but Is there any way to go back to the standard unity rendering, and convert back the materials, or do I need to use a backup?
Hey guys, for everyone coming to Unite Berlin, André and I will present new stuff on LWRP and show the BoatAttack demo. I'll also be on wednesday from 11:00am - 1:00pm in the ask the experts booth to help with LWRP questions and be around the expo to meet all devs interested in the pipeline.
I'm sorry for not being as active as I wanted to be here in the forums. After Unite I'll give a sweep on the comments on this thread and will be more active here.
C:/Users/mythrilman/AppData/Local/Unityemail@example.com/Unity.Mathematics/matrix.cs(1,7): error CS1644: Feature `using static' cannot be used because it is not part of the C# 4.0 language specification
I've got almost no LWRP experience so I dont know what the mathematics package has to do with LWRP, but when I've had that error in relation to the mathematics package, I got round it with my first guess of what to try - in Unity edit menu->project settings->player, change scripting runtime version to .NET 4.x Equivalent.
Works like a charm.