#archived-urp
1 messages ยท Page 24 of 1
So just to be clear, none other than the "Sorting Group" solution I already proposed, right?
yup
Why not use Render Objects instead? although you could atleast upgrade to 2020.3
if you're at prototyping stage, it's the best time to upgrade
We are way past the prototyping stage. We are at pre-final delivery ^^
Anyone got the new 2021.2 motion vectors working?
ConfigureInput(ScriptableRenderPassInput.Depth | ScriptableRenderPassInput.Motion);
I add this to Camera motion blur effect to get Object motion blur.
when an shader is set to transparent he isn't affected by fog unless there's another object below it, how can i fix that?
How to upgrade materials to URP in unity 2021.2? It doesnt works the same as it has a time ago
Edit > Render Pipeline > Universal Render Pipeline this isnt anymore
Nevermind found it
hello, i have been recently upgraded from 2020.4 to 2021.2 does anyone knows how to fix it?
Did anyone else have issues with decals in 2021.2.0f1? Worked fine in beta, but after upgrading it works in scene view, but in game view decals are only visible in thin line in the bottom of the screen, and the mapping is wrong. Maybe I am missing something?
an unnecessary warning. shadow resolution is reduced dynamically when there is too much light.
how do i get red of it? because it annoys me
welp, it works but it will also ignore other messages such as debug.log
Graphics\com.unity.render-pipelines.universal\Runtime\Passes\AdditionalLightsShadowCasterPass
414 //
๐
To implement it, you need to convert it to Local URP package.
alright thanks for help!
So i just upgraded from Unity version 2020.3.17 to 2020.3.21, and now im getting exponentially lower performance in my game due to some task called "CullSceneDynamicObjects". Below is a picture of the profiler, and below that is what the scene looks like (you can see there are patches of gold nodes around the world, which are all objects that are set to static).
I'm not sure why this is happening as it was perfectly fine before I upgraded, and the scene has no dynamic objects present in it. Any help would be appreciated (and apologies if this isn't the right channel, im just assuming it is since im using URP)
And just to add to this: Before I upgraded, performance would show around 800-1000fps in the profiler WITH all the gold objects active
you can also see large spikes in the profiler, thats gc (which also wasnt happening before)
I assume you're not using occlusion culling?
I am, and all gold objects are set to static
Which is what confuses me
Try clearing occlusion data and see if it's there, if not, it's occlusion related
Let me know if it goes way or not
by clearing do you mean just turn off culling on the cameras rendering component?
cause ive also tried that as well, which makes no difference
Go to occlusion culling window, and delete the baked data
under visualization it says no occlusion data has been baked
Did you profile in editor or build?
editor
If editor, try making a build in development mode with autoconnected profiler and check if it exists
will do
If it does, than a good idea is to make a bug report
Something is definitely not right though. Before updating I was sitting around 1000fps, now I sit around 250fps (this is with nothing in the scene)
Seems deleting all URP renderer assets / volume profiles and then re-importing them has fixed the issue.
๐คท
Thanks!
Hi I am new to shaders and I jut ran into a problem I can't find a fix to. I am having a project in URP. In it I want to use the unity particle pack(https://assetstore.unity.com/packages/essentials/tutorial-projects/unity-particle-pack-127325). The problem is this package uses the default unity render pipeline materials and the models in my project use URP materials. If I set the render pipeline to URP from project settings, the particles don't render as intended and show a purple null texture. If I set it to standard pipeline, the 3d models don't render. What should I do so I can use both?
Upgrade the materials to URP materials using the instructions pinned to this channel.
Some materials may not be able to be upgraded, you'll have to swap the shaders manually.
I tried that
all the materials are particle materials
and 1 is a custom shader
and a Legacy shaders/Particles/VetextLit Blended material didn't got converted either
the other materials which were just Standard shaders did got converted
There are URP particle shaders that you can manually port the materials to. The package wasn't designed for URP, so it'll require work to port.
ok
might not need that
if there was a way to render standard materials on both front and back
like in URP materials there is an option of rendering saying Front, Back and Both. I want it to be both. Is there some way to do that in standard materials?
does anybody know why my material with texture doesn't get applied to custom models ?
it doesn't even work with normal textures
Here is an example of what i mean
This arch thing has the same material applied as the floor
but for some reason the arch has no texture applied to it whilst the floor has
show the inspector properties of the material, the arch and the floor
made it myself
forgot to generate a uv map..
lol, i'll do it right now
adn then try again
Yeah, unwrap the UVs then add your texture from there then bake it
if you made the model in Blender, and each individual object has their own UV map then make sure the name of those UVs are the when you merged it
bruh you didn't show the main thing. The Mesh Renderer. Lol.
thanks
it is working
and it made me realize that my sandstone texture is so fricking bad
Any idea why all of my objects in game suddenly missing it's shadow? Eveything shadows were toggled on as per usual
I'm experimenting with render features in URP to try and get my 3d cursor to always be rendered on top of everything in the scene, however I'm getting some odd effects where the cursor ether does not appear or appears very glitchy, or has its depth rendering all messed up, rendering geometry on top of other geometry.
Any one know how to get the cursor to render normally but still on top of everything else?
Oh god damn,, my directional light was accidentally rotated into horizontal position.. fixed it
So I have a scrolling background for a title screen, and when I import the Universal RP, it doesn't scroll at all anymore (gonna post the code one sec)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BGScroll : MonoBehaviour
{
[Range(-5f,5f)]
public float scrollSpeed = 0.5f;
private float offset;
private Material mat;
// Start is called before the first frame update
void Start()
{
mat = GetComponent<Renderer>().material;
}
// Update is called once per frame
void Update()
{
offset += (Time.deltaTime * scrollSpeed) / 10f;
mat.SetTextureOffset("_MainTex", new Vector2(offset, 0));
}
}
going to try uninstalling it and seeing if that works
Yeah, URP broke it ;-;
gonna have to find a workaround for that then
easily done in shader graph using time node plugged into a tiling and offset node.
it's fine i already fixed the prob but thanks anyways ๐
URP motion vector works great!!!!
I do not change the camera near plane. It acts as a kind of depth bias for the camera motion vector.
not sure if that was sarcasm or you meant it actually works ๐
it was sarcastic ๐
when camera near plane is lower than 0.2. I can see the motion vector of my character behind the wall.
as a side note, I noticed that Oculus made modified URP (for their Application SpaceWarp for Quest) where they actually added movec passes to all URP shaders because their fork was for URP 10. I think URP 12 did movecs as semi hidden renderer feature as the movec passes are actually not part of the shader templates
I haven't really looked that far on the source implementation to tell that for certain though
yes, that's exactly what it is. Motion vector pass in URP 12 draws all objects with a single shader. shaders do not have motion vector passes. Even if it sounds like "it could be a performance". We have motion vector which even Alpha Clip does not support.
some of the helpers they added there were also added to URP 12 as part of the new draw api addition
ah... well.. maybe could snatch those movec passes from that oculus repo to counter that if needed?
I haven't checked what kind of buffer it creates though
it could have some extra stuff for their spacewarp tech
i solved
ObjectMotionVectors.shader
- line
I don't know why this is happening. but the problem is solved now the character doesn't generate motion vector inside the wall.
oh no
the problem still continues ๐ฆ
I seem to get black alpha on some shaders in an Android build for Oculus Quest. Not all textures have this issue and I am not sure why this happens. I am forcing ATSC compression in build settings
Hi, what are the risks of switching from built-in RP to URP in an existing project? We have a 2d project with some sprites, UI etc but no shaders, lighting or post processing so I don't think there is anything that would break. But I'd just like to make sure. I am considering switching because of the 2D lights feature in URP :)
we also have no custom materials, just using the basic sprite/UI materials that unity automatically applies
thank you
with asset bundle? what shader are you using? what's the import setting of texture
Not my shaders, custom made with shader graph. Shaders work perfextly in editor but in build the textures have black alpha on most but not all Partille effects
Import setting is use texture alpha. RGBA compressed ASTC 6x6 (or 4x4)
black alpha = alpha transparency missing, or alpha not being read. whats the file extension of your texture?
you need to first trim down the possibilities here. start with your shader. if your shader works for even one of alpha texture, i would assume something wrong with your texture. try to match the import settings completely for textures which use the same shader and has some of the texture working, and some not
you can also preview alpha of the texture in editor import settings
@lament canopysaw your forum post about SSAO, looks nice. especially interested on the cost as you said it's on the same ballpark
I've done some testing with the HBAO asset, which is a notable upgrade on URP but it's also about twice the cost (although there's some room for improvements if one re-enables the temporal filtering for URP now that it has movecs)
I'd love to try GTAO on URP as well, shouldn't be that difficult to port it but can't just play with the techs all day long ๐
they basically do the same thing. Keijiron's algorithm gives better results. Even with a sample count of 4 it looks good. the problem is denoise.
Since I can't write a temporal filter (I don't know how to capture the previous frame in URP), I gave Fullscreen and opened TAA on it. I actually shared how it would look if I could ๐
looking at the code of that Keijiro's thing atm, it's really simple setup
can't you just blit the AO buffer to some RT you allocate and manage yourself instead of using some temp RT?
(considering the previous frame)
Any idea how to get rid of the glossy/shinyness of this URP terrain? I've tried setting the alpha source of the texture to "None"
Maybe set the smoothness of the material to 0
yeah, I tried 0, no luck
could you send an image of the material properties?
anyone know how to remove HDR from this textmesh pro color?
๐ถ
Don't change it from the individual material. Change it from the terrain editor.. give it a try
It will be overriden by the setting in the terrain editor regardless. I'm not sure if this is an expected behavior in 2021.2 beta, if you're not using a beta nor 2021 version, still , give it a try
it's in the layer properties of the terrain editor
Also, you don't need to do this, a tint color would do a better job, with greyscale as maskmap that would make other maps less/not accurate
what is channel based function?
is there a way to set the default Renderer at runtime on the URP asset? i'd like to switch between these two renderers with code and i can't find any API references or autocompletions
found it ๐คฆ it's very confusing, but it's in the UniversalAdditionalCameraData script that's attached to the camera
spent like 20 minutes looking through docs before posting here and then found it within a few minutes smh ๐
yeah first google hit gave me that yesterday when I was wondering the same thing ๐
(was mentioned on some unity forum post)
I also tried to look for it in the docs initially but didn't find anything relevant to that there
something similar has happened to me multiple times, where some setting is hidden in that obscure component. there's no properties in the inspector, so out of sight, out of mind ๐
It's actually possible to switch to an entirely different render pipeline at runtime I discovered a few months ago. Absolutely insane, but possible.
it's possible but totally unsupported by Unity
I've had prototypes of runtime swapping between LWRP and HDRP and later URP and HDRP.. it works but you have to take a whole bunch of things into account
but now at least on URP 12 / Unity 2021.2 their shader stripping changes have made this type of combo totally unfeasible their changes fully broke the shader stripping for anything but currently set default for SRP asset on your graphics settings
I've kinda nagged people at Unity about it and apparently it's in some sort of backlog but I wouldn't assume that would change any time soon
I guess if you just want to swap between built-in RP and URP or built-in RP and HDRP, that's might still work somewhat ok
can't really think of any good reason why anyone would swap between built-in and URP tho
@empty path as example of things that may actually have surprising cost behind, here's one really simple test scene I used for base line before testing raytracing with URP:
actual URP functionality cost is minimal in that shot, actually all cost is coming from SSR, HBAO and TAA
so if comparing between URP and HDRP, would need to make sure your features are configured at least in some matching setup
Yup, did so -- as much as I can.
Scene is the exact same, all extra graphic features are disabled on both.
Only thing enabled to test performance since most games use it is SSAO, bloom, and tonemapping.
Fog on both is disabled
both run forward
since it's only one directional light
forward can be tad faster on both URP and HDRP in such case yeah
especially noticeable on older GPUs
Yup, deferred was slower when I tested in HDRP for this scene
I think URP too but i'm not sure
I will do final test and post results in forums
might be good idea to test both also without PP to see if it offsets the results
I think better to test with since everyone uses PP and it's a part of the render pipeline
would still be valuable to see what is the related cost on different effects etc, this is why I really like nsight
you can immediately tell from such shot if there's some overhead one could still strip away
You mean what cost of bloom etc?
or motion blur etc, there's often different settings on many of these effects too
I think unity profiler shows cost for each post processing effect, or most
like bloom, motion blur etc
yeah, but it's not as easy to gather from one glance the proportions of each effect
I prefer the hierarchy view tbh
much clearer
HDRP frame time: 5.2 - 6.2ms~
URP frame time: 5.3
HDRP mainthread: 4.8~ms
URP mainthread: 4.8~ms
difference in frame time is because the GPU is the bottleneck for both
URP GPU: 4.4ms - 4.8ms
HDRP GPU: 6.2ms
not exact since I eye-averaged it but still gives an idea about the perf
also the camera doesn't move
to give an idea about ms/fps 5.5~ms is around 180FPS (give or take a bit)
@empty pathI dunno, I just seriously struggle to find proper info from the Profiler's own GPU module
for example, I'm trying to look for DLSS cost here:
it's obviously not 0
but single glance over this and I can see it's 1.5ms
I assume I'm using the built-in profiler wrong but I just struggle to find the info I need all the time when I use it
really wish they would do the same treatment for the gpu module as they have for the cpu one:
for cpu side, I do prefer the hierarchy as it's way less cryptic
interesting, I don't think your using it wrong
some stuff isn't profiler tracked
hopefully they improve it, some stuff you can only see the cost of using nsight or the like
I'm using the default lit shader that came with URP in unity 2021.2 on some materials right now, and I want to make faces with normals that face away from a light source less dark. How can I do this?
use a custom shader and do your own custom lighting calculation
Or use ambient lighting in your scene
was playing with URP and some 3rd party extensions for it yesterday
this has additional SSR, HBAO and TAA, altho HBAO's visual effect on that shot is negligible
you need to understand that since its universal, it means whatever unity releases for URP, it needs to be compatible for so many other platforms. developing something like that which needs to work for that many platforms will take some time. Unity5 had lots of time to evolve and it was a huge step up from unity4 which lacked severely and was much behind the time. third party assets often have some limitations which might not be acceptable for just anyone. give it a time. built in hasn't been deprecated yet and still works amazingly. until your required features are there, you can stick with it. if you've already jumped the ship, i guess you have to bear with it
to be fair, how the URP's 3rd party offerings do remind me more of how things went down with built-in RP... you basically had to buy 3rd party assets with built-in to get decent fidelity out of the effects
HDRP is more of an exception here where it actually comes out most features out of the box
well, stramit has been working on URP exposure: https://github.com/Unity-Technologies/Graphics/tree/tim/exposure
relevant card:
https://portal.productboard.com/8ufdwj59ehtmsvxenjumxo82/c/221-automatic-exposure
Summary
Exposure is a linear scaling operation performed on a scene-referred
image before tone mapping to fine-tune the brightness or darkness of the image. URP allows for manual adjustment of exposure of the final render using [Color Adjustment](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@10.2/manual/Post-Proc...
but yeah it's not ideal situation... still not fair to compare it to built-in that's been mostly unchanged for years
(it's been pretty same since Unity 5 released, or add few minor versions to that to get the PP functionality)
one more reason why unity is focusing more on hdrp could probably be that they're focusing more on the higher segment of the market and AAA studios now since unity previously lacked that. even i was very frustrated and got stuck between choosing the 3 pipelines initially, and have jumped ships more than three times in big projects. there are lots of overlapping between URP and the default render pipeline, but HDRP is something that I could have never imagined would reach this stage when it was initially announced. ever since hdrp10, i'm pretty satisfied with my results. urp might take some more time, but its gonna be there some point.
if you're not targeting mobile platforms and if you hate being dependent on 3rd party assets, you should definitely try out hdrp
Does anybody know how to make baked emissive materials in URP?
Another reason why they been focusing on hdrp bcos their next-door neighbor been showing of some cool stuffs every year *Cough .... UE ...*Cough
I'm new to the whole art pipeline for games and like, the different render pipelines sure seem like a pain. I can't really put my problems into words but I think I am facing an information overload as I try to learn built in and urp at the same time to figure out which one I actually need.
Tons of reasons.
- Programming: Better API, better workflow, better documentation, C#.
- Editor customizability.
- No 'unreal look' that is evident in most indie unreal games. Way stronger than any other engine, and personally I don't like it at all. Especially bad for indie games.
- Unity workflow. Some people don't like nodes for everything. They prefer unity workflow, drag and drop, menus, etc.
- HDRP does things different. You want DLSS? It's built-in. You want FSR? built-in. In unreal you have to download different branches provided by nvidia. Maybe compile from source. I don't think they support FSR. Although they have TSR in UE5.
Was unity really made for small projects?
A better question is, which one serves indie developers better?
Look at steamdb tech list. There's almost not a single big successful indie game (5 developers or less) made in unreal. There's a reason for that, it's not random.
Where in unity, there's a ton. 2D and 3D.
To name a few successful indie games: Valheim, Rimworld, Dyson sphere program, She will punish them, Risk of rain 2, The forest, Among us, Getting over it with Bennett f, Eastshade.
All these games have 5 developers or less, many have 1 or 2.
Any indie game with the success of valheim, rimworld, or dyson sphere program?
Even HDRP which is fairly new has a game in that list
@empty path dlss is nowadays a normal plugin for unreal
No need for custom engine build
nice, Good to know
One good reason is that the iteration times are way faster + I actually think core HDRP visuals are better. Having used Unreal for years I can tell that I spent ~90 percent of my time just waiting for it to compile something and at similar tasks Unity took only tiny fraction of the time.
And I'm not talking about baking lights now
In fact, if HDRP VR wouldnt be that slow, I wouldnt be playing with URP at all.
I get the frustration on using URP though as dealing with 3rd party things to complete the experience is tedious and things tends to break or not be supported by specific scenarios unless it's coming from Unity. URP VR SPI is good example for that
How come? Doesn't Unreal have every single possible shadow fancy toy including SDF shadows for long distances and analytical shadows for characters?
They do have a ton of shadow techs but majority of them are not something can use without issues as they tend to have technical limitations
But I'm not denying that out of the box, Unreal has tons more features than Unity and way more extensive editor tooling for them
My main issue there is rather how much more they hardcode everything, practically forcing every serious project made with it to use custom engine builds which alone crap the iteration times
When I started using it at UE4.0 my old i5 could compile the engine and tooling from scratch in 15minutes, it was still tedious wait to modify the internals as single line code change often results half engine recompilation due to their dependency hell
As time went on that 15m went to 45m then 1h then 1.5h to just compile the engine. I've since gotten 12 core Ryzen9 with fast nvme and got ue build again in 15'ish minutes few versions ago but 4.27 probably is closer to 30m already.. Cycle repeats and I havent even dared to test how long ue5 builds
But even if you manage to cope with vanilla editor, you still wait ages for it to finish any task
I see. That's very different from how how ex Unity users freshly converted to Unreal described it on GDL discord.
Grass is always greener at first
I was amazed by unreal for the first year using it too
My first advice to anyone going for Unreal for serious dev is to get as beefy dev rig as one can possibly afford as it will have monumental difference on the experience. Unity is way more forgiving if you use it with older gear. Mainly shader compilation and build times can get long
There is also always some frustration involved if you use some tool for longer periods of time. When new/other tool comes around and fixes some of your old painpoints you can get blinded by that other tools own limitations. When I moved from Unity to Unreal I thought I'd never come back ๐
In short tho, there is no perfect game engine, all have their own issues
what's GDL?
anyone knows of a way to get LineRenderer work with reflection probes?
the option is greyed out in the inspector :/
gamedev league. It is one of those general purpose unfocused gamedev groups.
ooh, now i'm curious, but i don't want to going off topic. . . .
I've never understood why such groups exist but I dont think I'm their target audience either. I just prefer places that discuss specific topics. Typically more generic discussion place is the less dev focused it goes.
ic, thanks for the info.
Hey there,
I wonder, when using URP, are those built-in shaders still necessary? Does it makes sense to keep them ? (im on 2019.4)
@half ridge @merry monolith GDL has per engine channels. Actually, we have a huge Unity community and Unity is the only engine that gets a special unity-chat channel.
It used to be the discord linked in the r/gamedev sidebar so it's big.
Huge ++ for iteration time. UE might have good artistic tools but it's a nightmare for programmers, especially Indie teams with just 2-3 programmers all spending most of their time waiting for either engine build, or even just compilation.
Huge projects are the biggest nightmare for indie cos one simple recompilation takes 30 seconds easily and hot reboot never worked for me
The UI shaders might be important. Other than that, just experiment removing them if you're unsure of it.
UI does work normally without being included but when I switched to addressable, it did give me some headache
Oh hm okay, thanks! ๐
Just a suggestion, you should definitely try unity2020.3 or even 2021.2
2021.2 has some crazy new stuffs
Hey, can you send me a link to those stuff, they are from asset store?
It's tragic that URP doesn't have the full variety of features as built-in, but its focus is on universality and optimization above all else
That might not be what you need specifically, but for the majority of users it's a big plus that you have to learn much less about optimizing each feature for every platform you target
Anyone any idea why reflection probes on lineRenderer are greyed out?
they are greyed out on any other mesh renderer too, but there they are set to "Simple"
adding an anchor override makes no difference, because the reflection probes dropdown is greyed out and set to Off, that's my problem
Also, I have an LDR monitor, but Iโm making a game for HDR. Are there any tools I can use to emulate it in game view?
@delicate trout since you posted this on #archived-urp it's worth noting that URP actually doesn't support HDR monitors
or rather HDR output on such devices
Unity can only do HDR output on built-in RP and on bleeding edge HDRP (they only just added support for HDRP 13 on Unity 2022.1)
โฆ. If soโฆ would have to test on my phone. Was asking to see if I should make a subtract shader or stick with alpha blending.
Does anyone have some experience with ScriptableRenderContext.DrawRenderers? When I use it, my alpha channel is completly set to 1 (using it in a temp RT) so there's no way to distinguish between empty and drawn objects...
Is there a way to disable SRP batching on 2021.2?
Can't find it in the URP asset
In 2021.2, what texture are motion vectors meant to be written to, is it the depth texture? Because I can't seem to see any channels other than R ever being written to on it
yes you have to click the ... and show more options
Hi guys, I installed the URP asset, and after applying the URP asset settings in my graphics, all my textures became pink. I changed the shaders one by one to URP -> lit. But now my shadows dont work anymore and I can't find what to do... Has anybody got an idea ?
There's an upgrade tool, that upgrades your standard shaders to URP.
As for shadows, check the shadow settings in your URP asset
*upgrades your materials
the conversion tool doesn't actually port any shaders, it just remaps the textures to be compatible with stock URP shaders
Max probably meant this in the first place, just want to make sure there won't be any confusion
Ok yes thanks
figured everything out, but I had to reinstall urp
Nvm I still can't find what's wrong wth my shadows
Literally changing the graphics and quality settings from default to urp, then upgrading my project materials made all the shadows from my spotlight disappear
other shadows are working
in the later version of Unity the upgrade thingy is not the same like we used to in 2020... It's more like upgrade-assistant now, they would detailed what were missing etc
Yup, but it still does the same stuff. With some extra.
Only in URP though, in HDRP it's still the old way
yup, it can do other work too but there's no shader conversion, it's too complicated task to even make with current shaderlab setup
Unity is working on more modular shader structure atm that lets you shuffle shaders built against it easier but we might see first public version only later next year + it wouldn't convert this decade old library of old built-in renderer shaders
so in the nutshell: no shader conversion tool available, only shader swap/material conversion
Where exactly?
@sinful gorgesee those three dots on top?
hitting that all additional properties setting will open editor preferences menu where you can set these
topmost option is just toggle per object
it's a very weird setup IMHO
I want to be able to rotate the skybox, so I attached a separate camera (SkyboxCamera) to my main camera (PlayerCamera). SkyboxCamera only renders the skybox by putting culling mask to "Nothing", and the PlayerCamera is set to render type "Overlay" and culling set to "Everything" so it renders all objects. I added the PlayerCamera to the stack of the SkyboxCamera, everything works fine except that my transparent materials only render the skybox now and don't render the objects behind them. My theory is that my shader used in those materials use "Screen Position" node into the "Emissive" input of the fragment shader, and that it's using the screen position of the SkyboxCamera which only renders the skybox. But I don't know if this is even correct or how to resolve it.
I need pitch yaw and roll
And thats only yaw if I'm right
Well, it works aside form the transparency issues, is that what you mean with sorting problems?
And I'd rather not overcomplicate things with custom shaders, I also don't know how to write said shaders
Forgot about Shader Graph, I'll give it my best
Thanks
@merry monolith
https://github.com/Unity-Technologies/Graphics/tree/RP/urp-taa-mb
TAA ๐
ohhhh
I see they gave that to Hable
Unity just recently hired him
Hable is the person behind "Hable" tonemapper, aka Uncharted tonemapper aka neutral tonemapping in Unity PP
oh nice ๐
Hopefully it's a good implementation
talking of that tonemapper, I wish Unity would expose at least some of the magic values instead of hardcoding everything
Yeah I agree, I wonder why they don't bother doing that
Does URP supports Height maps(Displacements) at all?
vertex displacement or just bump mapping?
(the answer is yes to both)
@rain sequoiaonly thing it doesn't support out of the box is tessellation, so if you want to make tessellated mesh with additional displacement, that's not going to work unless you use 3rd party shaders for it (Amplify Shader Editor can do tess on URP for example)
I see, thank you very much.
I do not think using camera stacking is overkill, but you need to set it up correctly to avoid depth sorting problems with transparency
Wish I had enough experience with it to point out what the problem is, but I recall seeing an official tutorial showing how to do it
@slate spruce https://youtu.be/5AmI2yOx0Nc found it
Looks like it fixes a similar issue with the transparent bits
Learn how to create a first person shooter style camera in Unity that will not clip through walls, without using multiple cameras. This FPS camera is created using Unity's Lightweight Render Pipeline or LWRP using scriptable render passes. Download the demo project here: https://ole.unity.com/FPSDemo
Though it's a bit of an old tutorial
Damn, I don't know if this still works but it's a really nice solution, and yes, this was the exact problem I was having. Right now I implemented a shader to rotate the skybox but when that no longer supports my needs I'll definitely switch to this, thanks a lot!
my post process shows in unity editor but not in play mode
I made sure settings are set to high
So after 8 hours or trying and researching, it appears that URP does not support "Don't Clear" flag for cameras?
Any way I can make only one object glow? with bloom
seems if I add a volume to my camera
all objects will be affected and they will glow
i guess u could use a local volume instead of a global one
I've been trying to make the camera to render so that it would NOT clear. I'm using the camera to render into Render Texture, which is then projected into the Raw Image UI component. My goal is to create a fog of war effect for a minimap. Now, the trouble is - it works, but not always. And when it does, it is caused by seemingly completely unrelated actions.
- I start the Play mode. The camera is clearing, which is not wanted. When I select the UI Canvas where the Raw Image resides (or any object in its hierarchy), the camera no longer clears the render target and the fog of war now works properly. Video below:
- In editor, each time I recreate the material attached to the Raw Image and reassign it, the camera does not clear and the fog of war works right from the start of the Play mode, but ONLY until I change something in the project. It's really weird and I have no idea how is any of it related, but I managed to reproduce this behavior with:
- Moving the material asset elsewhere (???)
- Recompiling the assembly
Video below - creating material, assigning it, running the game - not clearing and fog of war working - then moving the material asset, running the game again - clearing and fog of war not working - once again selecting the canvas - not clearing and fog of war working again.
Can somebody please tell me what the heck is happening here? Or suggest some alternatives/workarounds? I'm totally lost.
Thank you
What should I do so my spotlight doesnt go through walls ?
it was wroking fine before using urp
What kind of shader are you using for the wall material?
URP lit
its pink because i chose to
if i apply the standard shader, the shadow works fine
but its not rendering because of urp
"not rendering" = purple/pink glitched color
if there is no fix possible does anyone know how to reproduce the effect of a flashlight in an other way ?
I have to admit that would make subsequent serialization much easier (as the explored areas should be saved), but visually, it'd not look as I want it to. Furthermore, I do not wish to involve physics in yet another feature. Basically, I'd like it to look exactly as it is now - when it works that is. All that stands in my way is the camera that doesn't work consistently, which I assume to be a bug. Do you think there's a way to somehow bypass the camera and still have similar results?
yup, tried modifying depth and normal bias, but they almost dont change anything, i tried changing resolution, cascade, hard/soft shadows, near plane etc.
Spotlights don't normally show through walls
Hard to guess what the issue is just from those images
In your position I would confirm that spotlights and shadows work correctly in an empty scene
created a new project and still have the same issue
With same meshes or different?
can you share screenshot of the wall material?
default mesh in both
Fixed it
Casting shadows on the wall
had to be set to "two-sided" instead of "on"
thanks all of you, sorry for bothering
Glad you found a solution that works
Although it's no consolation to you, using two-sided shouldn't be necessary
My best guess is that something is wrong with the URP pipeline or quality settings, but no idea what, especially if the problem carries over to an empty project
Yes that's what I thought because i didnt use two sided while the URP wasnt installed.
do you know if its performance consuming ?
if i apply it to all my cubes
It renders the geometry twice for every light, so yes
But geometry isn't very expensive, and for cubes and simple walls that means only a few extra faces so there's no need to worry
My game won't be very heavy so it'll do the trick, thanks !
Heyo! I Just finished my Unity URP character figured some people might wanna see
ikr, i've spent like 10 hours trying to figure it out, but I can't.. The two sided "solution" is not event working for certain angles. I really dont know what else to do. Can you try on an empty project if you have the same issue so I can't tell if it's coming from my installation, or if it's a general URP problem ?
Very cool !
im using unity 2020.3.21f1
urp should be up to date, i guess, I installed it from the package manager, today again
SHould i try to update unity ?
Yup, it worked
thanks bro
I was a bit worried about getting 2021 since its not a LTS, but it's way better
and verything seems to work fine, so thanks
2021.2 is essentially going to be 2021.3 LTS with some minor changes, one big downside for going nonLTS now is if you rely on Asset Store assets because some publishers only support LTS versions
I just noticed they just released the 2021.2... so sooo tempted to upgrade, as I'm still using 2021.2 beta 13..
yeah it got released few weeks ago ๐
it's a nice upgrade feature wise.. I'm still having one editor crash issue with it that but it's also not going to be any kind of issue for 99.99% URP users ๐
my crash issue on it is related to raytracing and even more specifically how the shaders are designed (it's something one could do differently to prevent it from happening)
Unity did fix the issue on 2022.1 alpha already, hoping they will backport it to 2021.2
I don't think they would do that... very unlikely
it's a minor fix, I'd be more surprised if they didn't fix it. While they don't backport new features anymore to 2021 cycle, it will still get 2.5 years of bug fixes and this goes under that
URP itself doesn't even support raytracing out of the box, I'm using 3rd party thing for it
nevermind, just fixed it on 2021.2 by redoing the shader a bit :p
I'm surprised they didn't bring the material workflow from hdrp to urp... having predefined profiles to choose for materials would be great
oh wait, I spoke to soon, it's actually planned
i want 3d urp. do i pick "universal render pipeline" or "3d urp"?
which one is the most 3d and most universal render pipeline of the two?
@loud sky What you are seeing there is an unfortunate side effect of well.. Unity screwing up the templates. If you use Unity Hub 3 beta, it shows those like it should. Basically they've designed it to work like this:
old / current Hub doesn't get these right so what you see as "Universal Render Pipeline" is actually hardcoded entry for "3D Sample Scene (URP)" which is the old workbench template.... and that 3D URP is just empty new project with URP package preset to it without any extras
thanks
Is it possible to override postprocessing of URP in a square on the screen?
I am trying to darken the entire screen but leaving out a square the player can move around
that sounds more like PP effect you'd want to build and apply yourself
maybe, sadly I dont rly know hwo to do that. This is pretty much what I want but its just a color overlay with a white square
not sure what you really want to do there
if you just want to render the game view at specific part of the screen, you have viewport settings on the camera for that
entire camera render doesn't have to fill the whole screen
(altho usually it is handy to have it like that)
I want everything, except that square, to be rendered darker
so you basically just want to have UI not getting affected by PP?
that square is a spriterenderer (that should be unaffected), the UI at the the top is UITK so its unaffected by default, everything outside the whiter square should be darkened
ignore the UI at the top, its irrelevant to the issue
You could use a Render Objects pass that occurs after post processing. If you only want that object to be unaffected. If you're looking to use it as a mask, that is not what you want.
cuz the player moves that square around with the mouse, and I dont know how big levels are going to get at some point
I honestly don't understand what's the issue here
I feel like I'm missing what the real problem is
alright, I'll take a step back and expalin it
basically, I have a mechanic that allows the user to control a looking glass.
I darken the scene when the looking glass is enabled, but the inside of the looking glass should not be darkened.
I am darkening it to make sure the text rendered when an element is hovered by the looking glass is clearly readible as that is an issue at default screen brightness
A mask would be the solution I am looking for here actually
can't you just make a mask sprite for that purpose? (or better yet some shader graph with just procedural hole in the middle)
I haven't touched anything 2D with Unity though, so probably not the best person to comment on this
I honestly have no idea how I can do this with a mask
I could use the square vertices of the corners to generate an overlay sprite that makes it an inverse of the square in respect to the screen bounds ๐ค
I recalculate the sprite vertices and generate the mesh when the mouse is moved, then I make that sprite colored slightly transparent
there has to be an easier way tho right?
not sure if your suggestion is quicker, never really used rendertextures @young escarp
mhmm, I see what you mean. that seems like the "simplest" solution tho it will still be quite a bit of work haha
Guys I need help/suggestion, I'm testing the terrain of my game I added some trees to make it more forest like but I'm encountering a lot of LOD pop-in for the trees, is there a way to hide that I little bit more in a way the player don't see it that much
Make sure it uses LOD crossfade
the quality of LODs themselves also matter. Some LODs are better than others.
You can also increase the range where the change happens
or add extra LODs so the difference between each change is not as big
My camera isn't seeing the depth of my water shader. Any way I could fix this?>
I figured it out.
Hi Olento, what is the 3rd party thing that hallow raytracing on urp?
Hey, when I create reflection probes and place them, my entire terrain gets affected by them. Does anyone have any experience with this problem?
@twilit gorge it's a paid asset, Corgi Raytracing. it's not full blown out integration like HDRP's raytracing and there's still some things to fix on the shading side (been communicating a lot with the dev on fixing some of the issues)
so, on current state, how useful that is to you probably depends on your project and how realistic visuals you want from it.. I'm mainly after raytraced reflections myself
Very interesting
there's currently some issues on how it deals with smooth material's reflections, it kinda treats them like they were metallic - at least visually. still working this out with the dev. He's been super helpful and willing to improve the asset so that's a huge plus
Hey guys, does anyone know if NormalMaps in a 2D URP renderer mess with the Stencil Buffer? I've created some "custom" shaders (really just the standard sprite lit shader with a stencil buffer at the start of the subshader) and toggling on "Use NormalMaps" for ANY 2D light breaks my Stencil Buffer effect.
QQ, does anyone know if it's possible to get rid of the lines where particles of fog touch other objects?
If you're using soft particles, it should help with that
noob question, where can I find the option for soft particles?
On the particle material. It also needs to be enabled in the quality settings (usually is by default). I'm unsure whether there's a tick box on the URP settings asset either
It's not
If you look at the docs for the URP particle materials they all mention soft particles
yeah, I enabled depth textures
in the URP settings, it looks like it improved the situation!
My shadows don't get rendered if i'm just a few feet away. How can I increase the distance before they get not rendered?
Hey all, I got passthrough working on Quest 2, but when I toggle/adjust opacity/overlay-underlay/adjust depth/etc. my scene objects and/or UI are not showing up. Just black screen. Skybox/Color is not showing up either. I'm using URP. Any ideas why the OVRCamersaRig's camera is not rendering the scene?
Has anyone run into the issue where commandbuffer.blit with a scale doesn't work? I'm trying to blit at half resolution, but i end up only seeing the bottom left of the screen
Are you changing anything in the OVR rig?
Naturally you should see the oculus camera being rendered instead of skybox. Your UI and scene objects should still be visible
Shadow distance in the URP asset (can be found in your assets or via quality settings). If quality is bad, try adding cascades
I have a problem with lighting, as my character moves the shades from STATIC OBJECTS change, like i can't see shade of some object even though it's close until i get really close to it... how can I solve that problem please
Hey all, I'm struggling to get my head around how to port functionality of OnRenderImage to URP, any ideas / help?
@glossy wyvern can you rather describe what you want to accomplish with it?
Good question ๐
Yes I shall post the code here
I want to manipulate a texture/ material at runtime
it's to do with the occlusion manager with arfoundation to make an effect for the human occlusion stencil
If you need like postprocessing style effect you can use urp renderer features
Yeah I need it for a specific element in a shader which is kind of I'm not sure how to get from point A to point B
point A being I have the Standard render pipeline code
point B being having the same functionality but is compatible with URP
Hello! probably a basic question but I struggle with unity's default settings.
I want the bare minimum to create a low poly retro 3D game and by default I get weird blurring in the distance
as you can see on the edges of that cube, the textures get all "cloudy", "blurry"
How would I get rid of that?
You would have to disable mipmapping on the texture @placid laurel
Perfect thank you
The textures were indeed the only aspect I had not looked into
Still it confuses me how that blur bypasses even the pixel perfect camera
hello all. Could you tell me is Village Interiors/Exteriors Kit supported by URP?
I faced some problems with standard assets (e.g. water) in URP
You should see this on the asset store and if it doesn't say, ask the creator
This has to do with how the texture is sampled so it's not related to the camera at all. If you wanna understand it better there should be some pretty straightforward videos on what mipmapping is
Thank you I will!
Have a great day ๐
oh, ok, thanks ๐
this is the problem with the picture ... you can see there's supposed to be shadow, it changes depending on the distance and the angle
There's a setting for distance for shadow in URP setting. It's a performance saving feature but you can increase distance to render far shadows
hey has anyone found a work around for light cookies?
There's been some progress for this in URP:
https://docs.unity3d.com/2021.2/Documentation/Manual/Cookies.html
what about when i am close like in the 2nd picture... how am I to sole that
how does your shadow settings look in urp asset? send a screenshot here
I have been using a URP. I am making a 3D pixelated video game. Should I use HDRP or URP?
Up to you
HDRP has the potential to be a lot prettier at the cost of performance and of having a more complicated art pipeline.
hmm performance is very important to me.
Can somebody explain to me why am I unable to get _CameraColorTexture in URP 12.1.1. (results in warning "CommandBuffer: temporary render texture _CameraColorTexture not found while executing <pass name>"), while it does work, using the same code, in URP 10.7?
api change?
_CameraColorTexture definitely works on URP 12 but you may need to change the Renderer Feature
Can you elaborate a bit more? What exactly changed in the API? Today I found one of my features is broken (haven't used it for a long time and kept updating URP as it was released) and I was unable to find what is changed in the API that could be causing problems
I can't remember specifically what change was mandatory but I do remember facing that same issue when playing with these in past. Docs example has this comment for ConfigureInput:
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
{
if (renderingData.cameraData.cameraType == CameraType.Game)
{
//Calling ConfigureInput with the ScriptableRenderPassInput.Color argument ensures that the opaque texture is available to the Render Pass
m_RenderPass.ConfigureInput(ScriptableRenderPassInput.Color);
m_RenderPass.SetTarget(renderer.cameraColorTarget, m_Intensity);
renderer.EnqueuePass(m_RenderPass);
}
}```
technically if you don't care for VR rendering at all, you could just check the color buffer name with Unity's frame debugger etc and use that instead
it got some extra suffix on it
like _CameraColorTextureA etc, I don't remember specifically but you will recognize it immediately when you see it
you could also look at this example I have here before the last commit that swaps that cameracolor texture to opaque one: https://github.com/0lento/URP_RendererFeature_SPI_Example/tree/4000938f9e43a644c2f4019db184e9013ba7d717/Assets/RendererFeatures
actual shader uses TEXTURE2D_X(_CameraColorTexture); so it's definitely there
unless... that sample is broken on URP 12 as well ๐
pretty sure it should work though
I briefly browsed the Frame debugger, (having both URP 10.7 and 12.1.1 opened in two project side by side to see what's different) but to be honest I'm not an expert in this and I wasn't able to find anything that would have any resemblance with color texture name ๐ I'll give it a go again though
I can check that in a bit
@random stone try this instead: _CameraColorAttachmentA
you can tell by the name you are not supposed to use it like that but it should work if it's there
It works! Thank you so much pal
np. if you want to use the proper name, I think it boils down on doing the config phase proper for the current api
not 100% sure of that but there's not much else there to it ๐
I'm gonna have a deeper look at the code and the link you posted above, seems like there are some major changes in the render pass API compared to what I have (implemented about a year ago). Thanks again!
Hi all, is there any approach to render a sprite in URP with custom data passed to shader (same textures) and not break SRP batcher?
Anyone having issues with setting render target in URP 12 with command buffers? It seems to do nothing for me. URP 11 it works fine...
btw the new "Ruined King: A League of Legends Story" seems to be using URP
although, quite an old version -- 2019 lts. Obviously with some custom work, probably why they chose it over built-in, it's all C#
Where'd you see that? Their jobs site only lists unreal jobs
maybe he has the game files?
related to this: #archived-hdrp message but steamdb doesn't really catch any of the sdk's on this specific game
if it's a unity game, you can see the unity version from the exe itself... and even if it's using IL2CPP, there's metadata there that reveal the used libs
ah didn't realise it's released now, makes sense ๐
Anyone seen any examples out in the wild of the new motion vectors in URP being used?
not in the wild but URP TAA on asset store uses them. also would expect the official URP TAA and MB to use them eventually but their wip branch might have not yet gone that far https://github.com/Unity-Technologies/Graphics/commits/RP/urp-taa-mb-v2
I guess if you need some example, look into Graphics repo's test projects, they have some movec test scene there I think
@karmic ironmore specifically, scene 206 in https://github.com/Unity-Technologies/Graphics/tree/master/TestProjects/UniversalGraphicsTest_Foundation/
Ahhh that is helpful, will check out their test projects, thanks
oh they finally merged this PR https://github.com/Unity-Technologies/Graphics/pull/5346
TL;DR: this adds HDRP style RT handling for URP
asset publishers will rejoice as they need to adapt this for URP Renderer Features ๐
it's not a huge change though
(for your own code)
They use il2cpp, I dumped the files to get .dll and names. Unreal jobs is probably for Valorant
They also use quite some assets.
They use volumetric fog & mist 2
& AdvancedFPSCounter
& BetterTrails (really old, deprecated)
& AlphaRaycaster UI mouse stuff
& EasyDecal( urp no decals back then, classic)
& Flowcanvas
& Rewired
when targeting PS5 and current gen Xbox, is it necessary to use URP/HDRP, or can Builtin still be used?
I don't think it's 'necessary' as in you can't do it, should work fine.
But built-in has received no improvements for the last few years. Even bug fixing in some places is slowing down because priority is with SRP.
have built game for mobile first, using Builtin, and optimised heavily with all sorts of techniques unique to Builtin. A while back I saw something about needing to upgrade to target PS5/XboxNext, and it seemed to imply that moving to SRP was necessary. But this was a year or so ago, and I haven't kept up to date on that stuff, and given how URP and HDRP still aren't nearly finished, I was hoping Unity might have softened any stance they had on forcing migration to target these two newer consoles.
HDRP is actually in a really good state in 2021.2, even 2020.3. It's development has always been fast.
URP is much slower, but it's now acceptable in 2021.2.
Although for mobile HDRP isn't really an option.
In hindsight it might not work for next-gen, I thought you were talking about PS4.
Not sure about PS5
So you have seen/read something similar about PS5 and Unity?
This says it better than I can, when considering Multiplatform targeting with modern Unity: https://forum.unity.com/threads/what-is-next-for-us-at-unity-with-scriptable-render-pipelines.924218/page-12#post-7531463
in 2021.1 release notes
it doesn't say "SRP: " so maybe it works for built-in as well
Wow. Good find. And yes, I'd also presume this means support for Builtin added, as it was already/always that SRP had support for next gen, since 2020 versions... I think...
Hi, is there any way to get a working UI_Lit shader in URP ? Thanks
Howwww
I am attempting to incorporate this into my project
I am stuck on how to get the camera texture, manipulate and then put back into the screenbackbuffer
do you need VR btw?
that example is using older approach which doesn't work in VR while using single-pass instanced mode
No I don't need VR ๐
then it should work
basically what you are asking here is how to put the camera data into temporary RT, modify it and then blit it back
unless you use URP's opaque texture, you have to just blit it back and forth
I'm really stuck on the implementation and syntax
This is how far I've gotten (including old code as well)
I also have example here, if you go down in the commits, you can see total of 3 different approaches.. I intentionally started with the old cmd.blit so people could see how it could be modified for newer approaches: https://github.com/0lento/URP_RendererFeature_SPI_Example
basically this version is using the traditional cmd.blit (which doesn't work in VR SPI anymore): https://github.com/0lento/URP_RendererFeature_SPI_Example/tree/2874d1463537d6316e486054d8b51b7efb1cc1e1
how I'd start approaching this is to have some renderer feature sample that makes sense to you, make sure it's functional and then start modifying it to do the thing you want it to do - instead of trying to port some built-in thing directly to it
it's easier to have something that's all the time somewhat functional that you keep adding things into
Thank you so much for your response I will take a look at these ๐
I guess what I'm trying to do is:
- Figure out what OnRenderImage does and when, what the src and dest render texture are and what happens if they are null
-Figure out how to replicate the functionality OnRenderImage with the same timings / events that trigger OnRenderImage () of taking the camera data, apply my texture / material / post processing to it and then put it back into the camera.
Especially what the syntax is and how to work with renderer features
I've found that a can do MaterialPropertyBlock.SetVector("_MainTex_ST", new Vector4(x, y, z, w)); which, i think, will be same as Material.SetTextureOffset, but there is also Material.SetTextureScale, so what is reserved _MainTex* name? And where can i see all list?
or is _MainTex_ST is offset+scale, because it 4 values
Correct, xy is the tiling/scaling, zw is the offset/translation
what means ST? Scale + Tilling ?
I believe it stands for Scaling and Translation. But in the material inspector it's always labelled as Tiling and Offset.
Does it exists by default in URP shaders? (i've seen that in legacy shaders it is _BaseMap_ST)
You can have a float4 for any texture property with _ST appended. _MainTex tends to be used in built-in RP while URP tends to use _BaseMap. It depends on the shader though, it can be named anything.
So if in custom shader i have for example _PaletteTex, then i can access to it's ST through _PaletteTex_ST ?
What i'm trying to achieve right now is to write custom sprite renderer by using DrawMeshInstanced with MaterialPropertyBlock filled with arrays of data. So instead of modify sprite mesh's (quad) UVs i try instead pass Vector4 to ST
I'm start thinking that those *_ST properties just defined in buil-in shaders and in my own shader i must define it by myself and use Tilling and Offset node to get proper UV
If you're writing a custom shader yeah, you need to define and use it. e.g. :
TEXTURE2D(_MainTex);
SAMPLER(sampler_MainTex);
float4 _MainTex_ST;
Varyings vert (Attributes IN) {
...
OUT.uv = TRANSFORM_TEX(IN.uv, _MainTex);
...
}
half4 frag (Varyings IN) : SV_Target {
half4 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, IN.uv);
...
}
I'm not so advanced in shader code, but where in this code _MainTex_ST supposed to be used?
It's used by the TRANSFORM_TEX(IN.uv, _MainTex) macro. That's just shorthand for IN.uv * _MainTex_ST.xy + _MainTex_ST.zw
But we have no node in shader graph though?)
For Shader Graph, you'd need to create the Vector4 property with the reference set to whatever the texture reference is with _ST appended. Split and recombine XY into a Vector2 node and ZW into another Vector2 node, then put those into the Tiling And Offset node.
exactly what i do ๐ Thank you for so detailed answer! ๐
seems all is right inside shader, so something wrong with constructing this Vector4, because i get wrong results
Oh, you probably also need to set the Vector4 as non-exposed. Sorry forgot that part.
why?
Not entirely sure tbh. If it still doesn't work non-exposed then you could just use an exposed one and a completely custom reference, ignoring the whole texture + _ST thing. Then also change the reference used in the MPB.SetVector() of course.
It is work, because Tilling and Offset affect results, so i think _ST is just a way yo mark that this is texture coordinates
I think it's just a special property that's created alongside the texture, and having it exposed treats it as a regular property instead of the special one.
i have checked this by having just texture property without anything and there was no _ST for this texture, because passing values did nothing, and after i have manually created this _ST property it have started to work
how to extract offset from sprite that was affecred by SpriteAtlas? I just look at values and Sprite.rect.position is always 0.0
there is so dark and cold in lands of graphics ๐
i was struggling with how to be able to pass data arrays to MaterialPropertyBlock and see expected results, but what i was see that values of all instance was the same no matter what array values was, like shader only get the last on the first one value from array. And i've looked to Override Property Declaration and set it to Hybrid Per Instance and all got magically work.
I thought that Hybrid Per Instance is something for DOTS lands or something
Yes! YES! One drawcall finally
Are you basically locked into shader graph when using URP? I'm exhausted being lost in a web of nodes for what wouldn't be complicated in code
you can still write your own shaders from code using URP, there is samples of how to do this https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@13.1/manual/writing-custom-shaders-urp.html
Ohh cool, don't know how I missed this, kept getting forum posts
Also you can use
- Sub-graph to group nodes in one
- Custom function node which can read from file/string and compile your hlsl function
Anyone tried the new Decal ShaderGraph with Custom Nodes file functions ?
I am getting some weird issues, think it's a bug
keeps giving me a "undeclared identifier" error even though the function is declared an all...
@hazy sequoiayou sure it's related to decal sg and not just issue on your custom nodes file syntax? it requires very specific setup
well, I am using custom node on several different shaders as well
I only make shaders with custom nodes, alot easier than noodle stuff
sounds weird it would only break on decal sg though
I don't think the custom node code itself is in any way tied to specific SG types
I'd try to do something similar on regular SG, just to verify it works still and if it does, then file bug report on the decal one
I made a forum post: https://forum.unity.com/threads/decal-custom-function-node-not-working.1199662/#post-7666717
in case anybody manage to replicate - then yeah we need to file a bug report
ah yes, it indeed only breaks on decal material
I'm guessing the file itself gets out of scope for whatever reasons
which probably means that string mode on custom function node is still fully functional (altho I get it's messy)
ok thanks for confirming
has anyone found that urp breaks z ordering?
this works fine in 2d renderer, but when switching to urp, the guy in the back blits in front of the guy in front in a couple frames
how SpriteRenderer renders sprite in simple Built-in renderer? Does it depends on Z value, or just renders sprite depending only on sorting order?
I think it goes by sorting order, then z value to break ties
i think Z goes before sorting order. but you can check it
My sort order is the same though, i've been sorting based off of z
enemies (those in right) have the same sorting order?
i see now, this is not really 2D. Maybe you can find answer here https://docs.unity3d.com/Manual/2DSorting.html
Why is it different for URP vs 2d Renderer though?
i think because URP 2D is only for pure 2D, where Z is not included to calculations
Ahh ok so 2d renderer adds in z ordering then, vs URP 2D which doesn't?
so if i wanted to use URP, i should switch to 3d?
I guess i can also stop being lazy and just set sorting order
it is only my assumption, but yeah, in my project, which is use URP2D i want to make something what you've made with this 2D in 3D, where camera have perspective and sprites position includes z value, so i think for this purposes i should switch to simple URP
For whatever reason, setting GraphicsSettings.renderPipelineAsset to null at runtime causes the Oculus Quest 2 to stop rendering anything. But it renders perfectly fine in Unity. I have no idea why.
Setting it from null works just fine, but setting it to null breaks everything.
@dry willow i've seen on twitter that you've implemented grass with DrawMeshInstancedIndirect. Can you please explain key difference between DrawMeshInstanced and DrawMeshInstancedIndirect?
I want to write custom sprite renderer, and i try to figure out should i use Indirect variant. My sprites can change position on scene frequently. So maybe you can give me an advise what method should i choose.
I've found this article is a good explanation : https://toqoz.fyi/thousands-of-meshes.html (though the exact shader code examples are intended more for the built-in RP)
I've read this couple of time yesterday and today, it's still not very clear for me, but in all cases in that article we have static meshes which only move in late examples with compute shaders. In my case i need to grab LTW matrix from object and pass it to GPU dynamically, so is it any benefit of using Indirect variant in case when matrices are mutable?
If you need to upload the matrices every frame anyway then there's probably not much benefit to using the Indirect version, other than to perhaps bypass the 1023 instances limit.
Something to also keep in mind is that afaik both options won't do any frustum culling. You'll probably want to handle that manually so you are only drawing the sprites you can actually see on screen, either through C# or via a compute shader.
Thank you, so i understand the situation right. I'm going to do cull using jobs ๐
My {collider} volumes aren't working. Does anyone know what might be amiss?
Because my guess is you're missing the shaders in quest. Unity does a shader stripping pass to remove unused shader from the build to increase compilation speed and reduce file size. It's hard to get multiple pipeline shader in the device. Maybe what you can do is try to write an assetbundle with default shaders and after changing pipeline, you can just load the bundle and the shaders within
Unistorm recently added support for URP.
Playing their demo, it's really impressive. Way better than I expected, also has a weather system.
Hello, is this the right place to ask a question about a problem I've been having with URP 2D lights and shader Stencils?
i think yes. maybe if question about shader is more about writing shaders then better place would be shaders channel
Well, that's the thing -it's a question about a shader I've made starting from a sprite-lit default URP shader, and the question is more about how shaders interact with URP 2D ligthing.... So I thought this'd be the correct place to ask.
@empty path no support for URP VR (SPI) though ๐
my issue with most 3rd party sky solutions is that they have that built-in weather system... it's annoying to have people hardcoding a lot of behavior and making it PITA to manually managing the values... I guess the idea there is that people who can't figure that stuff out themselves need to be given turn key solution but all that stuff just gets in the way for more advanced uses
Enviro is especially guilty of this, Unistorm is tad nicer on that front
True, that can be annoying to some. Although on VR, aren't you better off just using an HDRI or something else due to perf reasons?
yeah you'd want to use prebaked sky on VR typically, but imagine if you have a dynamic day/night cycle on VR game..
I guess there's still some tricks one could pull off to make nicer transitions to more premade sky images
even on desktop, whole volumetric sky cost is often nontrivial
True, hard finding a balance sometimes
oh... " HDRP support is currently in development." (on Unistorm page)
dev was previously totally against HDRP
Oh, why?
kinda weird he/she considers it now that HDRP already has volumetric clouds ๐
well.. I kinda get it, every solution has different visuals... and if you make a crossplatform title, you may want to author game on URP for some and with HDRP on some.. sticking the same sky solution for all build targets makes a whole lot more sense than splitting the systems
btw, despite what the store page said, Unistorm had partical URP support even before latest update
no idea if it's like fully supported now
asset store is being stupid so I don't know if I got this even updated
Nice, I tried the demo although it uses built-in unity but I assume clouds look about the same
oh wait... it's probably just new Package Manager functionality that I can re-download the asset?
I thought something went wrong on the update ๐
I guess they aren't that confident on not getting corrupt downloads with their system....
HDRP clouds are really nice performance wise, but sometimes you want more visually than it can give currently, but the authoring of the clouds is superb
Yeah never seen that before
I tried HDRP stock ones but they were quite hard to get to look decent
I like some of the tweaked shots shown on the forums though
There's some stuff missing though which i look forward to land in backports, currently the sun isn't covered by the clouds correctly. the pull landed to improve it just waiting for backports
as for the PM, they updated Package Manager on latest 2022.1 alpha, probably related to that
And it's really fast.
You have to use volumetric fog with it though, otherwise it'll look off
@empty path URP on 2022 will have HDRP style RT handling, better dynamic resolution handling, FSR, TAA and object motion blur
that all is pretty much granted as the work is already under way
Hope so, but I have some worries TAA won't make it
and according to productboart they will do deal layers and blob shadows too
maybe I'm just being unityphobic
I've already tested TAA, it's somewhat functional on desktop already
VR was still broken when I tried it
FSR is gonna be nice in URP
Dev also replied to me and now seems like they'll add sharpness paramater to FSR
also you kinda want TAA to land for FSR to make sense IMHO
which is nice
yeah it's already in the PR ๐
HDRP is still MIA on that though..
.. Under consideration can mean good chance it'll make it, and next to no chance
in regards to HDR
or worse, volumetric fog
on what?
FSR sharpness
ah
yeah it's not in original algo at all... some devs take creative liberties ๐
it can be troublesome at times as they are still marking the tech as AMDโข๏ธ tech
FSR sharpness in HDRP will be different in 2022 compared to 2021, so different results. I think it was 0.50 and now it'll be 0.25
give or take a bit
I'm actually downloading water branch right now to test.. see how it's looking
now i'm talking about HDRP, this channel jiggling can be annoying lol
meanwhile... testing just updated Unistorm in URP VR ๐
I mean, I not not surprised
some user claimed to have fixed this and sent the fixes but it wasn't all obvious if the fixes were for Unity 2019
VR development is a scary place, I will stay far away ๐
that grey and black eye views is what happens with URP VR when you use cmd.blit. it's been broken since Unity 2020
really want to play Half-Life:Alyx though, so plan to get one eventually
it's fixable but it's tedious for sure, been working with some asset publishers on fixing these on various assets... some of the publishers are great and make the effort for it.. and some couldn't care less ๐
I don't imagine VR is a big part of their customer base, I guess some don't feel like it's worth it
So I got these shaders that work together using the Stencil buffer to hide characters when they are not under a certain mesh (playable character's FOV) + there's a slightly dark sprite over the camera that doesn't render over the FOV, giving the illusion of "lighting up" the area that can be seen. All of this in Unity 2D, using the URP 2D Renderer, and it works just fine- except when I activate "use normal map" on ANY 2D light, the FOV shaders seemingly stop working. Characters still remain hidden, the FOV mesh still exists, but it's like the FOV shader doesn't write to the stencil buffer anymore? Even worse, if I move the character in a position far enough away from the offending light, it works just fine! I have also noticed that, with NormalMaps disabled on every light -so with the FOV effect visible- the screen still has a noticeable change in brightness when I get a certain distance away from the light, which kind of makes me wonder if this is somehow related.
Video of the bug as it happens: https://www.youtube.com/watch?v=vrBACb0d108
I'm really just stumped, I don't know what could be causing this.
I can also send the Shaders code if I need to, I just didn't want to spam multiple links in the same message.
Is there something with URP not being compatible with polybrush?
I tried upgrading my project to URP and stuff went pink. I heard it can be the materials and textures or what not so I try directly dragging the texture straight on my plane and it's fine. So how to I change the polybrush to accept it?
sorry if this is common knowledge, but does URP not support all the helpful debug scene modes?
this is all that is available
2020.3
@tacit ravine
Awsome thankyou! ๐
the ones that aren't global.
@steel locust does global ones work? are the local ones using higher prio than the global ones?
yo so I have been messing around with water for like a month now and I still don't know how to make it so when you enter water your vison is blurry and blue and you don't have the same physics as if you were still on land
Look at the analysis menu section (same place where profiler is). There should be some option to show fullscreen materials there. Under rendering etc
You can examine various buffers on that debug tool
Thank you kindly
I've got a little stacked in my understanding of GPU instancing. I'm now trying to figure out how i will write render system for sprites and i want to use DrawMeshInstanced[Indirect], because i've seen so much articles about it and it is really good feeling when you can draw your whole game in 2-3 method call.
It seems that in all DrawMeshInstanced method variants we pass sequences of data to GPU which is instancing, but why in DrawMeshInstanced variant we use only MaterialPropertyBlock with Set[Type]Array and with DrawMeshInstancedIndirect we use ComputeBuffer AND MaterialPropertyBlock. I can't understand which do what. While we can write properties data to both classes.
In my case i have real case situation where there are a lot of moving sprites in my scene, which leads to sorting every frame which also leads to reassign sequences of data every frame, because i think we can't sort it on GPU (do we?). And i've read that it is not good to write a lot of data to ComputeBuffer every frame, but also i've read that we can write it in parallel using ComputeBuffer.BeginWrite and EndWrite, which is confusing. I need to be able to write float4x4 every frame, because i need to control movement on CPU. So after sorting and do all things assuming that every frame i have at least one changed array of data (positions) what should i choose?
Oh, i see now, the ComputeBuffer that we pass in Indirect variant is only for mesh args, and in examples guys set other buffers to material/mpb. That makes it more clear
So looking at it, am I right in my takeaway that UniversalFragmentPBR() in Lighting.hlsl just is the URP lit shader function? Like if I provide all the inputs and surface data the same way I would in a shader graph (and a bunch of enabled keywords), the output would be the same color that would be applied to the shaded mesh, right? I'm interested in creating a shader graph node that has 1:1 parity with the URP lighting system, but gives me the output rather than going directly to the surface. Ideally in such a way that if I plug it into an unlit shader it's the same as using a lit one.
I have tried setting the priority. The global one works.
Unity has a built in way of creating this.
One minute.
yet when I add a post-processing effect it doesn't do anything.
(after creating a new volume)
yo guys, how can i fixed my scene looking blue like this?, it happens when i upgrade my project with unity new version.
@steel locust urp docs on volume setup are quite lacking. HDRP docs explain explicitly that you need trigger collider for local volumes. Since it is the same volune setup on both, I'd expect the same apply to urp as well
PP layer thing only applies to old post processing stack (not used in urp anymore)
@upbeat nicheis it still compiling shaders? I don't remember if 2020.3 had progress bar for it yet. pretty sure you get cyan tint for things where it processes those shaders
you could also just try reopening the project
ah... found the old forum discussion on this: https://forum.unity.com/threads/urp-demo-scene-blue-tinge.923759/
I feel like the reflection probe theory is the most believable one... the person saying rotating light will fix it probably had baked lights enabled, so when you adjust the light source it rebakes the lighting - along with those baked reflection probes as well
oh right, the last post on the thread explained it was actually just that what happened there
Thanks bro, but nevermind i've already create new scene lol it's just prototype.
yeah, it could still happen again when you update to next 2020.3 version with some shader changes, so good to know that rebaking reflection probes will fix it - unless Unity manages to fix the issue before that
Does any URP shader support setting Emission intensity from the emission map? Would be nice to use the alpha channel for that.
yeah definitely i should know that
Is deferred rendering an option for urp?
I haven't checked it out yet, but it should be supported in Unity 2021.2
2021.2 is first one with deferred yes
don't expect all 3rd party URP assets to support it though
Wow, it took all of my materials and fucking broke them. That's a whole month's work for fucking nothing. Thanks, Unity Render Pipeline!
Have you researched before upgrading? bet you're not!
Anyway, thats totally fixable.. oh! URP did nothing wrong ๐
I don't care
well, then why complaining ๐ตโ๐ซ
I was trying to fix this fucking thing to make PBR shader graphs an option for me to use. Turns out, PBR graphs aren't a thing anymore! Wish the official unity sources would have told me that
Right, I have a fucking shader graph that's doing something useful for once, how do I apply it to a material?
I've tried looking for tutorials and everything is from 2005 when PBR graphs still existed and when T-Pain was probably still cool
Im on a sub graph
Or is that the wrong option?
I realized this is the wrong chat, reposted there
- use version control system or at very least some kind of backup solution before doing any major changes
- URP can't render shaders not compatible with URP, hence the pink materials
- there's a material conversion script for materials that used to use built-in renderer's standard shader
- old shadergraphs should upgrade to latest versions automatically
- old PBR graph type doesn't exist anymore because... you can just use URP Lit target now. only reason PBR graph even existed afaik was that the same graph type could be used for both LWRP and HDRP - you now instead just use same SG and add both Universal and High Definition targets to it (this wasn't possible on the older SG setup)
- blaming Unity for your own mistakes is bit silly
Also, what you need is just to read the docs.. and FIX YOUR LANGUAGE so others would glad to help you @prime marlin no need to be a smartass
I do get the frustration, been there.. but yeah it can get in the way if asking help here
Look
I have been sitting here for 6 hours trying to get this to work and it's 3 AM
I am going to keep sitting here until this works purely out of spite
thats your problem
as for the sub graphs, they are not the main shader graph type, it's like the name suggests SUB graph for shader graphs, meaning you can drop that into existing shader graphs (or other subgraphs)
actual shader graph is the main level thing that makes your final shader
there are many learning resources for these things so maybe worth checking them out instead of just banging the head into monitor?
even the official docs explain the URP and shader graph basics
I was trying to learn with resources, but all the ones I could find were from PBR times
And I know, the docs
I know
yeah some of that may be bit outdated. the current Shader Graph system changed a bit on Unity 2020 / URP 10 so if you follow some older tutorial, the SG user interface is bit different
They are all older tutorials
I just wanted to make a simple water shader
I got the rest of the materials back by recreating them
Now I can't make a material based on a shader, it's just showing more missing textures
That's my new problem
I'd suggest just trying to follow some tutorial meant for the engine version you are currently at.. or try to learn first on some older Unity version which matches your tutorials to grasp the key concepts
That's the problem, they all seem to skip past the step where they make the material based on the shader not be useless
@prime marlin this official blog post explains for example the new SG setup on URP 10+ and also has example for the water shader for URP https://blog.unity.com/technology/introducing-shader-graphs-new-master-stack
but by the sounds of it, you are just trying to rush through atm. I would take few steps back and try to solve things one at the time
I don't think you get the problem
I'm stuck on literal step one here
Everything I see, from official documents to tutorials
Does not have this on the shader-generated texture
This is the thing that's plaguing me right now
do you even have URP asset assigned to your player settings->graphics at the moment?
if not, Unity is not using URP - which makes shader graph based materials incompatible
WHY IS THAT IN PLAYER SETTINGS?
well.. on 2021.2 there is actually a target on SG for built-in
and... you REALLY should read the 101 intro docs, they are meant to cover stuff like this
I'm on 2021.3.23f1
2021.2 but yeah, it has support for built-in target too on SG
it's just way more bare bones
Alright, let's fix this "docs" problem right now, everyone keeps talking about "the docs", there are so many "docs" for shading that to read them all would take up all the time I need to study for my actual courses, what doc are you referring to for intro
first link pinned to this channel
there are step by step instructions there to get you going, and they are not even that bloated, they get to the point
has anyone been able to profile their GPU on mac using the profiler? Unity doesn't support one option and the other that they do support is deprecated by apple (classic)
some URP function is chewing up my framerate but I can't profile to find out because Unity can't handle metal
Hello people! I'm having a problem with my scene. I use a custom shadergraph to use channel-packed masks (occlusion, roughness, metallic) and it worked perfectly...until now.
My master shader is suddenly broken and my scene appears white!
Only the materials that use this shader are broken
2021.2, I'm sure this has a name but it isn't coming to me, everything cameras draw is sticking around afterward, like it's leaving a trail. If that doesn't sound familiar to anybody, I'll see about video, but it'll take me a bit.
hey guys i'm using ummorpg with urp and I'm having a hard time transfering the projector indicator to a decal projector. it keeps hitting my character and it looks like it renders on top of his head instead of the ground.
I have that all!
yep!
That is defaulted to that.
2020.3 but I managed to fix it - my Shadergraph has a blend that had somehow changed to "Screen" instead of Overlay..
Thank you! Inattention.
hi there, I'm trying to apply a small patch to the universal rp package. Any idea where the package manager stores the files on macOS?
I see there's some stuff in ~/Library/Unity/cache/npm/packages.unity.com/com.unity.render-pipelines.universal but the version I'm using is not there
nevermind I found it
Is there a way to assign layers to objects that you "DrawProcedural"? (for testing purposes)
I am having issues with URP Shaders where it rescales the object and draws them on top of Canvases in the scene (and it repositions them in the center of the canvas), then when canvas is gone it goes back to where it is supposed to be. (The problem is that the mesh it draws should never be moved, but it does when a canvas is in view of the camera). *** Problem does not occur in standard pipeline
https://docs.unity3d.com/ScriptReference/Graphics.DrawProcedural.html Look at the last parameter
Thank you for this info. My apologies, I should have said that I use "DrawProceduralNow". which does not take that argument.
pretty sure there's no layer involved at all for that one. It just... draws the stuff now, like it says
layers are used by the render pipeline to choose whether or not to render a given object for a given camera. But this doesn't even involve cameras.
It uses the currently set render target, transformation matrices and shader pass.
and using the vr camera causes the problem
Is there a reason you need to use the "Now" variant?
Im honestly not sure... I bought an Asset on the asset store, and due to these issues I've been trying to change/alter the code until I can find the fix. Is there a benefit for one vs the other?
Im not great with shaders, but Ive been doing a lot of learning with this problem. The code specifically loads very large data sets into a compute shader and uses this method to push the data for processing
then visualizes it since it is verts and colors
MeshTopology is points, if that helps you to get an understanding
That all sounds kinda complex, so I'm not really sure what the right answer is, but I will say if you use Graphics.DrawProcedural, you can specify a layer there as normal.
I assume the original dev had this same prob - (buffer removed before it is ever used) https://gamedev.stackexchange.com/questions/188923/in-unity-why-does-drawproceduralnow-work-in-onrenderobject-but-drawprocedural-d
Ok yeah I'm not knowledgeable enough about the render pipeline to help you here.
best of luck
๐ฆ thank you, though
I'm not sure where this goes so I'm going to put it here. I have a boat that's going to be interacting with a water mesh. Is there any trick I can use to make the mesh not appear inside the boat?
So the boat can actually properly sit in the water?
can anyone tell me how to make MSAA actually like, work
reasons for why it might not be working?
Imagine if it's actually not working, the rest of the world would throw rocks at Unity ๐
Plenty of how to set this on unity's forum and some on Youtube
yes, from 2013
i have applied a number of fixes i found on forums that have not worked
for example: 'screen space - overlay' mode is broken and won't be fixed. so i've switched to camera mode. it does not yet work
here forward path is used, as recommended
here the MSAA is correctly configured
@civic breachI'm confused, you are trying to make this work for built-in renderer and not for URP?
(I do realize this discord doesn't have dedicated channel for built-in renderer)
most obvious follow up question would be... you actually have that quality level active in the editor when you test this?
i'm not sure how to confirm that last part
and yes the built-in renderer looks like
you have your quality levels on that list, whichever you have selected from those settings for tweaking it's settings is the one editor is actively as well
just making sure you don't have some quality level active without MSAA preset
How far can you get with URP in 2021.2?... Pretty far ๐
Making an appealing graphic in a game not as hard as making it running on targeted platforms ๐ .. Good job! ๐
ah, well i have selected the one it's turn onto
Hi guys. I'm working on custom sprite rendering system. I've figured out that transparent and opaque materials renders different in my case. I have N sprites with different X, Y and same Z. In my system i sort sprites depending on theirs Y and then call DrawMeshInstanced. What i expect that sprites will be rendered in the same order as i pass it in DrawMeshInstanced method. And it works with transparent render type with any camera projection and it works with opaque with only orthographic camera projection. If i use opaque + perspective camera projection then when camera have not zero rotation ZFighting appears no matter what order was passed. I think it happens because of ZWrite and ZTest in shader (i don't use Sprite shader because those don't support instancing). And i see no way to turn it of in URP except copy all generated shader code and just manully comment it.
Is there any other ways i can fix zfighting? and also is it worse performance when there is Z write and test which is not used?
Does anyone know what happend to the advanced tab on the URP asset. This is where you are supposed to be able to turn on/off the SRP Batcher. Unity 2021.1.2 and URP 12.1
I found in the URP code where it is supposed to show but it doesn't
okay I found it - under preferences and Core pipeline you need to change Visibility to All Visible
and then SRP Batcher will show up under Rendering section
I did not find this documented anywhere or missed it somehow
Equiv not in the URP docs - https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@12.0/manual/More-Options.html
Anyone know how to make 2d shadows fade over distance?
haha weird.. looks like someone tracked mud through the house
how to do day/night cycle if my universal render pipeline is not working?
(2d)
(horror game)
(top down)
something like this:
please help, its one of the most important things
Working around this error " [Unity] ERROR: GLTFUtility/URP/Standard (Metallic) has too many Shader variants(12582912).To resolve this, go to Project Settings > Graphics and remove this Shader from the Always Included Shaders list.For more explicit control over how Unity includes specific Shader variants in a build, use a ShaderVariantCollection." was discussed before for local builds. Has anyone solved it for Untiy cloud builds?
Looking at cloud builds because Unity took 5 hours last night to do a local build (mostly) compiling shader variants
@lament canopy I've seen quite substantial URP perf loss in native Quest side when going from 2020.2 to 2021.2 and 2022.1
struggling to hit 90Hz on Quest 2 on bare bones scene with newer URP versions... when using URP 10 it still leaves bit of a headroom
haven't checked if there's similar perf loss on desktop side but it really could be limited to mobile
URP 13 still flies on my dev rig on windows
I just tested a build now. On my S20 in 720P FXAA + FSR + Shadow mask mode. It should be able to get 120fps (I was able to get it before) but it hovers between 60-30fps ๐ฆ
could be some frame limiter issue yet again
they've had such issues few times already
Anyone that has noticed issues with iOS (dark/light) mode showing different graphics after Unity 2020.3.23f1 ?
URP does not support the Post Processing package, it has it's own post processing solution (using a different "Volume" script/component)
oh
Oh I see, thank you
How do you upgrade the project materials to URP? There's apparently supposed to be an Edit/Render Pipeline/URP/Upgrade Project Materials, but I don't get that option
@bronze briar URP 12 has separate conversion tool now so they removed the script version
Where
"Window > Rendering > Render Pipeline Converter"
yes, it's actually quite clunky to use
but you'll get used to it
OK, I used it and all but one material failed to convert
These aren't even custom materials, they come from Probuilder and such
Does .Raytrace shader not work in URP?
they do
(Corgi Raytracing uses those for example, on both built-in and URP)
Okay, imma just have error, the screen is just black rn
everything initialized proper and you are on DX12?
(in editor too)
also what does the error say?
yes, I am dx12 and there is no error, im going by this docs rn to learn https://docs.unity3d.com/ScriptReference/Experimental.Rendering.RayTracingShader.Dispatch.html
pretty sure there are more complete examples for using this type of setup but they are probably for built-in RP (should still help on getting going with these)
okay thanks, im gonna look more, I currently use my own raytracer but more complex scenes just take ages, so something actually official and with Acceleration structure would rly help ๐
Okay, first step done, found the issue, passing new RenderTexture into RayTracingShader seems to not be able to use, so I had to "Initialize" the texture in normal compute shader, write anything to it and then it works when passed into RayTracingShader.
after upgrading my project to urp my linerender is invisible
i added a material after upgrading unity to urp. before i had a pink line. now i wanted to add a material but it is invisible now. when i delete the material its the same.
hi guys! doin a lil cel shading in the urp shadergraph- is there a way to modify the scene color node with another node to remove shadows?
oop! i should clarify- i had tried making a cel shader from an unlit graph but i hit a roadblock or 12 when i tried adding in additional lights (and specifically shadows from said lights) so i've decided to go a different route by applying a material override to the forward renderer which applies a cel shading effect to the overall scene by modifying scene color. I've got the black and white cel shading effect to work, but multiplying it by the scene color node to get color back in has the unfortunate effect of adding back in the default lighting on top of my cel shader (which is counter-productive). thus, i'm trying to find a way to separate the scene color node from its shadows so i can multiply the color back in sans-shading with the cel shadows.
TL;DR: i've got a cel shaded BW shadow node and i'm trying to find a way to manipulate the scene color node to feed back colors without the shading so i can multiply the two together
Do you have Quest 2 link? Im getting stable 90hz on quest2 in urp 12 after removing it
Not sure if I completely understand the method you're using currently, but if you're using RenderObjects (or a custom one with an overrideMaterial) that means you're now rendering everything twice, which probably isn't great for performance. You can't remove the shadows from the scene color once it's already rendered, but you could change those materials to be unlit rather than using the default PBR lighting. But I'd really look into going back to the original method.
The roadblock you mentioned may be because you need to add keywords to the graph in order to get shadows working correctly (e.g. _ADDITIONAL_LIGHTS & _ADDITIONAL_LIGHT_SHADOWS), and v10+ edited the GetAdditionalLight method to take a third parameter in order to calculate the shadows too. It's meant to be to support baked ShadowMasks, but if you don't need that you can just default it to 1, e.g. GetAdditionalLight(i, WorldPosition, half4(1,1,1,1)). I have some functions/subgraphs here, as well as a Toon shader graph example : https://github.com/Cyanilux/URP_ShaderGraphCustomLighting
@fossil lilyyou mean by link having the usb cable connected? you can't even have Link or AirLink running same time while you run native Quest apps...
if so, yeah, I keep usb cable connected as that's how I upload the apk
No I mean by having the link itself disabled in settings
I'm using a Beta version and I expect you are using one too
beta of what?
Your quest os
nah it's stock v34
then nvm. I don't have a quest with stock rom to confirm anything about stable 90hz in urp12
not just urp12, I had a similar issue with unity 2018 back in quest1
I mean the stable 90 fps wasn't really even the main point I was trying to communicate here, instead that exactly same scene and settings resulted on way worse perf on URP 12 and 13
I can make it run 90Hz by further removing things from the scene setup
oh like that. I never had any fps issue here
but URP 10 handled more
I might give it another try but the last few times iโve tried adding the shadows with keywords i get these really whack giant vertical bands of black that move with the camera that noone on google seems to have ever seen or heard of before XD
Anybody else finding builtin pipeline multipass confusing after years of working with SRPs? Like this grabpass and multipass magical businness without specifying at which point they should be invoked. That's confusing af ๐ค
Like people actually want that instead of the clarity URP has with defined stages and command buffers?
yo guys can i use hrdp assets in urp project??
ah i see, thanks bro
I'm URP in my game and I would like to combine a global light together with black shadows
this is my global light:
These are my black shadows (created with a point light source):
how do I combine them?
If I add both I just get this:
which is not what I want
Anyone know how to do this?
@inland saddle you can split light by layers + also you can customise how your light blends in URP 2D rendering asset SO
@inland saddle sorting layer
Okay, that allows me to do a lot of stuff, but I still can't make it like I want it to be
which is this:
@inland saddle so you want to shadows be 100% dark?
@inland saddle i think you can set up shadow parameters in light source component or in shadow caster component
Depends what part of HDRP visuals you want to get.
But usually what you need is volumetric fog/lighting, good AA, and some nice post processing. You can get close, but it won't be exact of course. Some assets will help you if you can't make the stuff yourself.
of course not. Why would they even have HDRP if that was possible?
Yes.
Check the Lost in Random talk on the Unity youtube channel.
To be fair they did a lot of custom stuff. The entire visuals of lost in random depends on the volumetric fog, which is aura 2 but converted to URP by lost in random team(which was a lot of work). Even aura 2 developer gave up and started developing aura 3.
With additional custom changes to aura 2 that made a big change to how it looks.
But in essence, the answer is yes depending on your game and what part of HDRP you want, you can get close.
The problem is if you aren't a graphics programmer, you'll have to rely on the asset store.
@empty path well, there are some volumetric addons for URP. I haven't really seen people use HDRP volumetrics in a non bruteforce way either ๐
Like it seems some people just overlight their scene, enable volumetrics and boom, no variation, here u go, constant density fog everywhere.
Well, depends on the user really ๐
lost in random originally used HDRP and they really liked HDRP's volumetric fog, they tried to convert it to URP but it was too much work to do it.
but switched to URP for switch support, which makes sense considering the type of game/visuals
They also had a dedicated graphics programmer which helped a lot (man.. would be fun to have one of these specimens)
Tbh I don't know how to use volumetrics properly either ๐
Like how do you get rid of the constant density which makes it look weird.
A 3d noise texture maybe?
Yeah, HDRP also voxelates(I think that's the word..) the volumetric lighting for performance. You need to blend it to make it less apparent. You could also increase volumetric quality which gets rid of the problem but performance goes up to crazy high values.
Especially noticeable in road 96 (game uses HDRP), car taillights are volumetric (I think headlamp as well). When they're far away it looks like a big voxel
You can also use volumetric density fog which you can place in the world "local volumetric fog" in 2021.2, old versions had a different name
looking at the Unity stream where they discussed this, I got more of impression that they used URP for some platforms and HDRP still for others
but yeah... as for the question, if we forget about volumetrics, you can get something that's quite close to HDRP visually
I don't think so, I think I downloaded the game and checked game files and it was URP
just not... out of the box :p
I would be impressed by the visuals and give URP a thumbs up, but it's not really URP visuals ๐
I'm still waiting for the NGSS guy getting his URP port done
Yeah NGSS is really gonna help URP
that + Unity actually getting those cached shadowmaps to URP
URP roadmap updated blob shadows card saying that decals that landed in 2021.2 can be used to fake shadows
I think they moved it from in progress to under consideration after that, I might be imagining things though
current URP 12/13 shadows are not all horrible to look atm, it was way worse few vesrions before these. but there's not much to play with to get them dialed in
afaik URP's shadow filtering algo is same what HDRP uses under the hood (for HDRP medium + low filtering options, their high is PCSS but on HDRP I actually prefer their medium setting)
hmm I don't think so, it looks fairly different
both use PCF
nice thing about high filtering is you can play with shadow smoothness
I really dig how PCSS works on NGSS, but I can't get similar results on HDRP's high preset
Yea, URP shadows are weird. You set the resolution to 4k for the directional light and it's still pixelated. Not the same when you do so in HDRP. Even 1024 looks fine if you don't have any really small objects casting shadows
I haven't noticed this one... but I also do use soft shadows
also URP does default with less shadow cascades by default I think
I always enable soft shadows. I think URP doesn't use the full resolution for the shadows for directional light. Changing cascades doesn't do much either. For larger objects the shadow looks fine though