#archived-urp
1 messages · Page 17 of 1
Oof, I guess that's a problem
yeah, I'm starting to feel like I don't have the same criteria as the Unity devs when it comes to decide what features should be 2D only and what should be 3D only hehehe. For me most of them should be common 🙂
Seems to be part of the SortingSettings passed into DrawingSettings struct when using context.DrawRenderers / cmd.DrawRendererList. But yeah, 3D doesn't allow you to set it.
Guess you could fork and edit URP, though at that point you might as well stick with 2D and add the layermask instead
wow, this answer is clearly beyond my technical knowledge hehe. I'll show it to my team programmer and see if that's something that we can do. The problem is that for a commercial multiplatform release, we try to stick to standard Unity and LTS versions. But again, I really can't know if what you propose is doable in our project. Thanks so much for the suggestion anyway 🙂
Unity's advantage used to be that it did both fairly well and imposed no limitations on mixing them
Not so much now with the modern renderers
Coulnd't agree more at this point 🥲
Last version's (6000.0.9f1) URP pipeline does not work very well for everyone else? Forward+ gives errors, post processing volumes makes project black when active (even in a brand new project). I'm a bit lost.
Also forward renderer does not allow changing ambient color anymore (lighting > environment)? Changing it does nothing.
is expecting 144+fps in 1440p using volumetric fog and clouds, ssgi deluded?
all realtime lighting
URP doesn't have those features, and performance will 100% depend on your hardware as well as other things going on in the scene
So I've set up a render feature, how can I obtain and send the depth and view space normals texture to the shader?
Use LTS versions.
Actually I got it for whomever comes across this, add this line in the AddRenderPasses function:
_effectRenderPass.ConfigureInput(ScriptableRenderPassInput.Normal | ScriptableRenderPassInput.Depth);
And then you can access them via the shader like this:
sampler2D _CameraDepthTexture;
sampler2D _CameraNormalsTexture;
My question wasn’t about which version to use. For example, after deleting the Library folder for some reason the issues disappeared
Asking about issues makes it easier to know if something is on user-end or software-end
replying to this btw
If you use non-LTS versions you have to expect bugs and be able to figure out what’s normal and what’s not. Most people here don’t really care about solving issues with preview versions.
So in built in i could say ColorMode G, Blend Mode Max and the pass was going to be applied with amax on the green value. How can I do the same thing in URP?
is there any tricks to remove or add things from a custom shader scrip or graph to make it compataible for URP
Turn off "enable lag" on the URP Render asset.
||You need to use the profiler to actually find the source of the lag||
I am getting pink screen in AR webgl project on running camera
Anyone please suggest to correct this
Anyone here
@toxic forum sorry for pinging
If you have any idea regarding this or who can help me in it, please
i guess your shader is not supported by webgl
I broke something in my game and now when I import new packages everything is purple and black like it is incompatible render pipeline even when they are specified as compatible with URP. I can fix most issues by re-converting my game to URP, but some things like lighting health bars and a selection and movement system don't work. I know these assets are compatible with URP and were actually fully working till I did something to break it. I've been trying to fix this for days and feel like Iv'e tried everything so any suggestions would be greatly appreciated.
Some assets on the store are available on multiple renderer pipelines. If they are, they usually have additional packages inside their folders that you have to open for your specific pipeline.
Any suggestion?
Shaderlab operations haven't changed, it would be the same in URP afaik
How do I use unity_ObjectToWorld with a dots instanced URP shader? Having the exact same issue and errors as this person from a year ago: https://gamedev.stackexchange.com/questions/206403/unlit-camera-facing-billboard-in-ecs-dots-shader
Nvm, solved it with ```
#ifdef DOTS_INSTANCING_ON
float4x4 unity_ObjectToWorld = GetObjectToWorldMatrix();
#endif
inside my vert
nvm again? to works for one object, but for anohter one wiht the same material but a different mesh it doesn't
oh, it's messing up their transforms somehow, strange
ah, nvm, replacing UnityObjectToClipPos with TransformObjectToHClip did that
Is there any way to shove code into a command buffer via some sort of callback or something?
Might be helpful to know what you are trying to achieve, there is probably an idiomatic solution for that that’s not necessarily a callback.
have a bunch of code that sets compute shader buffers etc and really didn't feel like porting it all to use command buffers
but its all done now
still kind of curious if it is possible though
Pink means shader error, most likely shader incompatible with your render pipeline
Probably due to trying to use assets meant for URP without URP
But you'd have to check
there were pngs XD
Your tilemap renderer has a field specifying which material the renderer is using, which determines the shader as well
What image format the sprite texture was imported has no impact on that
can anyone help i want moving light from one side to another ..what to do ? Light isnt even adding in scene tried so many things
Your sprites should use a Lit sprite material to be able to receive light
Looking for some help optimizing 2D Lights.
Specifically, I want to prevent the normal map pass from getting rendered as it adds a lot of draw calls (and I'm not using normal maps, and only using global 2d lights).
However, I noticed that if I use a SpriteMask the normal maps will get rendered anyway. This appears to be because of line 224 of Render2DLightingPass which reads:
(hasSpriteMask && i == 0) ||
(hasSpriteMask && i + 1 == batchCount))
{```
is there any way to prevent the normals from getting rendered, while using a spriteMask?
From this line of code it looks like the first and last batch are the only batches considered when checking for spriteMasks. I'm using Unity `2022.3.34f1` Any help is much appreciated!
I have a FOV script that creates a mesh using raycasts, with a stencil buffer to mask anything outside the FOV (a giant black rectangle covers the map)
How can I make the edges of the FOV softer/blurred?
Meshes and stencils have only hard edges so you cannot
You would have to make a similar system but out of distance functions, or textures mapped to the meshes using UV coordinates which then are used to mask the visible pixels with shaders
what is that line, and how can i get rid of it
Does it appear with the light component disabled?
yea
this is the material
From what I can see of the texture preview, the emissive part is right next to the metal part, so over a distance they can bleed over each other
I assume the pixel glare disappears or is significantly reduced if you toggle off Emission
yea then it dissapears
but i want the emission
You either want to UV map the mesh again so that there's some space between the emissive and non-emissive parts on the texture, or separate the emissives to a different material slot entirely
can i edit the uv map inside unity somehow?
Probuilder should have that functionality, but you may need to edit the texture as well to match
okayy, thanks
So, I was able to avoid rendering the normal map pass for the 2D renderer, if I remove any use of a SpriteMask. But... does anyone know if there is a way to use SpriteMasks but still skip rendering the normal map pass?
Not entirely sure where to put this... but I'm using the URP pipeline and I've been trying to replace the S, rP, gG, and M for star, rocky planet, gas giant, and moon, in my scroll-view at the bottom here with the actual, live, view of the respective GameObject for each using extra camera(s) to no avail. Does anyone know how or have a good tutorial for this?
You should never use that many cameras at the same time, for helping you I have some questions:
- Do stars of the same system always look the same?
- Would it be taxing on the performance if you re-render each star again at the bottom?
Does something like this from hdrp exist in urp?
am i just blind?
wait im an idiot that isnt even what im looking for
im looking for uv mapping space
which also doesnt seem to exist in urp
What / where is the uv mapping space
The cropped screenshot doesn't give much in the way of context since "normal map space" is used in many places
yeah im sorry this is what im trying to get
im porting my project from hdrp and i dont see the option in urp
It doesn't exist in the URP Lit shader by default
You'd have to recreate the Lit shader with shader graph, using Triplanar node for UVs rather than mesh UVs
ah so i cant put off learning shader graph anymore lol
You may be able to find some shader graphs or subgraphs online that do what you need
The official Starter Assets package includes a triplanar lit shader also
But I think it's pretty limited
ooh ill have alook at that i dont need anything fancy
i just use pixel based materials so its easier if its mapped to the world and not the uvs
like that
Then it should be fine
With texturing as coarse as that you could box project their UVs in a modeling program, so they don't need triplanar projection
Box projection easily creates seams, but they would not be noticeable with that kind of artstyle
which one would that be
is there any major preformance reasons not to use triplanar though?
It's more expensive than using mesh UVs but it usually doesn't make a difference, especially if not targeting mobile
ah ok. as i said before is it the "package samples'" or the "render graph samples"
Neither of those
Starter Assets is, yes
I recommend importing it into a different project since you only need the shader and it comes with a lot of stuff
ah okay could i not just move it out then remove the package though?
sorry to be a pain but could you send a link maybe i cant seem to find it
The package has other packages as dependencies and may change your project settings so it's a bit tedious
ah i see yeah ill put in in a different project first if its a whole movement thing lol
Shader Graph's importable samples have an example of triplanar mapping, but it's not in a directly useful format since it has no material properties for you to change, only demonstrating how various types of projection can be set up
Ah, you are right
They removed it from the package at some point
i did this and it works at least until i can make something better lol
Sorry for the wild goose chase
It really is no more complex than that
But it would be nice to save the work of having to set up every property that needs to be exposed
ill probably expose the metalic and smoothness ect
If the property names match what the Lit shader uses, you could swap the shader of a material without having to reassign any textures or values
That would've been the advantage of a fully premade triplanar shader
anyways this works so thank you so much fellow internet hooman
Good luck! ^^ Shader graph is luckily one of the more intuitive tools, and importable examples you find in packages are always very useful
- It's all saved so yeah, the star, each planet, and each moon always look the same.
- I don't know, that's what I'm trying to do. lol
If the same star is always the same why not use images?
Or do you want them turning?
Images work fine. But how would I do that?
is there way to make this look better? lightning is looking kind of blocky rn
It looks like those meshes are not using baked lightmapping so the settings on the right do not do anything
Not that it would make a big difference here, light is just light, how it looks like is up to how your mesh is shaped and how your material utilizes it
The lighting is blocky because your mesh is blocky, and it looks pretty shallow too probably because your material is not using any texture maps for metallicness, smoothness or normals
Was trying to find the best place to put this but. I have an issue where I get a stutter every time GC incremental kicks in - I am not generating any garbage as I can tell from the deep profiling. This happens in build. It can be a scene with nothing but a camera. This is really causing headaches because I have a pretty nice project going but this hiccup every X when the GC kicks in really makes it horrible and not smooth. Any ideas? I am on the latest LTS (tried going back a few versions but still the same)
0 garbage to collect, spikes up to around 10ms when it triggers. Causes a big stutter and makes it janky.
Probably not here in #archived-urp
Unless if you make a build without urp and the issue stops occurring?
If it happens in an empty scene I would test if it happens in an empty project of the same template as well
My only idea is process of elimination basically
You'd want to figure out if the issue seems localized to your code/assets, the render pipeline, or the project itself individually
It could even be something that the dev build does but a final one does not
If you can categorically isolate the issue, that should tell you where you should be asking help for relevant experience
I tried it in a new project without urp also. still the same. very annoying. literally blank project
I will have to try on my other laptop later just to eliminate anything that side.
That's a very important clue
I might try with different editors next, maybe earlier version of the same LTS and with earlier and later feature versions
Could still have something to do with being a dev build if that is one
Since it happens so quickly on an empty project, it'd be very easy to file a bug report and for QA to verify what's actually happening
well well well, it doesnt happen on my other system in build or in editor.
so has to be something external to the build and unity. ah... has been a very long time since I reinstalled my system - maybe its that time. scorched earth
Hi everyone 🙂 I need to deal with thousands of identical mesh/material pairs and I would like to take benefit of GPU instancing. The thing is, I don't see myself with having thousands of single game objects for each instance. I've thought of combining all theses meshes into one (using MeshCombine API) but I'm not sure if it would benefit from GPU instancing as meshes wouldn't be the same anymore...
Have you identified them as being a bottleneck that batching cannot optimize enough? Instancing is typically less optimal than batching.
Nope, but I ignored batching was usually more optimal than instancing! I'm just worried of the number of game objects in that case. I'm procedurally generating railroad tracks and my concern is about railroad ties, which might be pretty numerous.
If they share the same shader/material and mesh you don’t need to worry (rule of thumb) for a long while.
I would appreciate some advice for optimizing a scene
Using 2022.3.33f1 with URP and the Universal 3D (SRP) project template
Working on a virtrual production setup (part streaming part general mocap) and no matter what I do it takes 30% of my GPU give or take a few percent for play mode and build
I'm looking at the profiler and it's listed most of the usage as "other"
I have two cameras at 720p or 1080p based on what quality I set and the usage is still the same.
the spikes seem to match on the CPU other and the GPU other so I wonder if it's some setting I put too high
the packages I have too, if that becomes important (the Klak and uDesktop/Window are for getting my screen in, I was experimenting to see which has better performance)
I get the same GPU usage (around 30% on a 2080 super) on a sample scene lmao
you need to profile that in a build, editor will always produce spikes
I'll try that right now, builds are like 50% gpu and editor is 30%
maybe it might shed some more light
this is a bit better, the spikes are from SSAO apparently so I'll have to bake the AO, scene doesn't exactly move that much
the CPU stuff is RenderCameraStack and PurgeUnusedResources
I'm using URP, not sure if that's the reason for this, but why do the shadows look so unnatural?
Maybe it's not the shadow that's the problem, it just looks like he's not actually standing on the ground
Change the depth and normal bias in the shadow settings @visual spindle
And of course make sure he actually is on the ground if not haha
Didn't do too much but helped a bit. Thank you 
If you share your shadow settings maybe I can help more
And on the directional light use 'use render pipeline asset' as well for the settings
You can also play around with your shadow cascade and its resolution. Shorter distances make shadows more accurate
Does anyone have any solution for the pink texture problem??? Pls tell me
Use a shader that is compatible with the active render pipeline.
hm trying to pass depth to a compute shader within my custom pass but it seems to be the depth texture from the viewport camera and not the players main scene camera any ideas on what I might have screwed up?
Texture depthTexture = Shader.GetGlobalTexture("_CameraDepthTexture");
buffer.SetComputeTextureParam(shader, kernel, "depthTexture", depthTexture);
I even tried setting the texture every frame in execute and early exiting if scene view camera
welp im a bit dumb it existed in RenderingData ignore that
Hello! So I Have something called ACES On my map i was wondering how to make individual items lighter? my shelves become very dark because of the ACES Darker is this possible?
ACES isn’t that great for use in games due to its high contrast that often makes things hard to see/read as you’ve discovered. Its aimed at use in film & studio-production. It’s often best to use a neutral/linear tone mapping curve (instead of aces) and apply custom corrections to color, exposure and contrast befitting your game. Alternatively You can find a lot of great looking LUTs on the web that you can use instead of ACES. You can also make your own in photoshop (or similar DCC app).
Okay thank you so much.
Hey everyone,
I'm posting this here because of the warnings I got in the console referencing URP, but I'm not entirely sure what the cause of the issue is.
I recently switched to Unity 6. While it seems mostly stable, it occasionally throws errors out of the blue.
One issue I’m experiencing is that my character animates correctly in the engine, but looks very weird in the build. During the build process, I also noticed some warnings in the console, which you can see in the second part of the video.
Does anyone know where this issue might be coming from and how to fix it?
I have a black/white simple line texture.
I want to use this inside a particle lit material and control it's transparency from particle system.
But whenever i decrease the alpha, sprite is disappearing.
It seems it works without emission
Yeah, fixed it by configuring a value that is not too glowly
Does anyone have any experience with HDRP and RenderTexture? I am trying to determine why my Planar Reflection Probe is being rendered into a completely separate RenderTexture, no matter what my culling or Render Layer settings are.
can i improve the lightning? that face is fully black which is not real at all
Hey @everyone, I'm experiencing a frustrating issue in the game. When I attach a trailer to my truck, the truck starts moving slightly forward on its own, disrupting the position of both the truck and trailer. This happens with all 5 trailers I've tried. I'm wondering if there's an issue with the colliders or trailer joints? Has anyone else encountered this problem? Any help or suggestions would be greatly appreciated!
bro pinged everyone
most definitely worth the attention of all 100k members
Its not an even a URP related question
hey so im changing the skybox and the ambient mode through script and the game looks much different when i do it through the editor and during playtime through code. (im also enabling a different directional light)
public void ChangeToNight()
{
directionalLight.SetActive(false);
newDirectionalLight.SetActive(true);
RenderSettings.skybox = nightCubemap;
RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Flat;
RenderSettings.ambientLight = Color.black;
night = true;
}
Afaik the editor updates the reflection probe to match the sky, but play mode does not
is there a way to do it?
also i dont have any reflection probes in my scene, unless there is a hidden one i didint know about lol
There is one associated with the scene sky
Or the environmental lighting as a whole, rather
If you believe the docs, this method will update it
https://docs.unity3d.com/ScriptReference/DynamicGI.UpdateEnvironment.html
When you use this signature, Unity schedules an update of the environment cubemap.
But every time I've tested it, it specifically does not do that
It updates the ambient probe, not the cubemap
Let me know how it works
A workaround is to have a reflection probe, either in realtime or scripted update mode
Optionally with a culling mask to only render the sky
The environmental lighting comes from the ambient light probe and the reflection cubemap together, one for diffuse lighting and other for specular, which PBR material rendering use in various ways in materials with differing shininess and metallicness
I expect so
It worked! thank you so much
Hi everyone,
I’m trying to apply materials with textures to walls in Unity, but I'm encountering an issue where the textures get stretched depending on the wall's length. How can I fix this problem so that the textures tile correctly without stretching?
You are scaling objects stretching uvs. Either texture using world space projection or edit models without scaling them. You can do that in Unity with ProBuilder.
Can someone explain me why my shadows are behaving like this ?
to verify, the URP Lit does not support a secondary Alpha map, correct?
i would have to make my own shadergraph, or Shader, or use another, etc?
Directional light near plane setting
I dont understand what this is
Your directional light should have a setting for "near plane" which you should try adjusting to see if the problem changes
Ha yes thx!
I wasn't sure if this or shaders would be a better place to ask, possibly even some where else.
How are you all handling rendering lines of a path but for a xz plane?
The built in LineRenderer seems to have issues when using flat mode and trying to align to a plane, there are work arounds that im sorta aware of, but they all dont seem ideal.
I know Shapes and ALine exist, however neither accomplish flat draw lines on a specific plane.
I'm trying to render the path of an object along the terrain following a list of rasterized points from the path.
I was thinking about using a bunch of line decals and just spawning those, however I wasn't sure of the performance implications.
What are people doing to achieve this?
Shapes rendering a volumetric transparent line in overlay/overdraw mode should work just fine.
Would that work in relation to projecting the line over the surface? I'm trying to avoid the 3d look mainly
you need to project your line segment vertices on the surface
you can do something complicated with a render texture/camera, custom render feature and all sorts of trickery, but a simple solution, if you have Shapes/ALine, would be to just use them with an overdraw/overlay shader
you can ofc also generate the line-mesh yourself.
do you think it'd also be fine to place a bunch of decals? or are those not fast enough to work for so many segments
they aren't great for lines, but one solution could be a decal with a custom shader that draws the line shape
it all depends on how big these lines are relative to the scene/camera-view
personally i think if you want to draw lines, just use meshes for lines until that doesn't work anymore, then make something custom.
Alright thanks, Ill give the Shapes and overlay/overdraw mode a try first!
bruh it worked fine yesterday
I would try to isolate the cause to the reflection probe, the script you're using to update time of day, or other systems involved
For example by turning them on and off, checking what the reflection probe's preview shows, changing its update mode and so on
Or even just restarting the editor, since it seems to have broken quite randomly
[FIXED] Hey I am new here. I'm trying to make a shader that makes terrain on a planet different color based on how high up it is. I am following Sebastian Lague's tutorial on procedural planets (ep5 at 8:50) but I came across an issue that PBR shaders aren't available any longer. I used a Lit shader with target set to Universal. I kept following but now have this problem that my inverse lerp node errors and turns pink while it works in the tutorial. It turns pink when I put my G(1) value into the B(1) value. Any idea how to fix it or just let me know why it does that and I'll try to fix it myself. Thanks!
nevermind i fixed it myself
what is a secondary alpha map
yeah, that was worded very poorly,. i must have been half asleep. I mean, right now, URP Lit uses the Alpha channel of the Albedo. I am trying to use a totally separate Texture as an Alpha Mask. Perhaps even a Channel of a Packed Mask. I was wondering if there is a built in switch to expose these slightly more involved things directly in URP Lit, or if i needed to make a shader/shadergraph of my own
If I'm using the TransformWorldToShadowCoord macro in a shader, what coordinate space is the returned shadowcoord in? When I look at the URP code it seems to be using a ShadowTransform matrix and not the view matrix
Hi , question how i can put this render Features without lag? cause i remove it and the game increases in FPS on mobile
you need to make a custom shader for this, since you're not trying to expose some existing functionality, this would be totally new functionality, since the alpha is sampled directly from the w component of the float4 read from the rgba texture
by default
Ok, cool deal. thanks for the info. I will go that route then
Hi I'm looking for an example or some direction on a render feature which renders objects to a texture. Similar to Unity's own "Render Objects" feature but rather than blitting to the camera it should draw the objects to a texture that can be fetched with a global shader property. I've tried writing my own but am having trouble with it.
The feature you're looking for: https://docs.unity3d.com/Manual/class-RenderTexture.html
An example for how to use it for rendering object "previews": https://openupm.com/packages/com.yasirkula.runtimepreviewgenerator/
Is this using a separate camera? I'm looking to use Render Features and the newer RTHandles
all rendering has to use a camera of some kind
render features happen before you write to a render-texture
and a render texture is just an output-target for a camera
I'm looking for guidance on writing the actual render feature itself. Or help with what I've started. The ScriptableRenderPass.
ic, maybe someone else can help with that.
Not sure if just URP - but with shadow cascades, and soft shadows in particular, there is such a nasty step between cascades. Not sure I see the point in soft shadows when size of any soft bit is dependent on shadow texture size and which cascade it is in!
The point of soft shadows mainly is not having hard shadows
Because you certainly will notice hard shadows
Shadow filtering is kinda tough, and expensive
Cascade blending likewise
this is true - perhaps it should be AA shadows!
If you want high quality shadow filtering you have the option to use HDRP
If you really need that level of quality, instead of trying to implement it in URP, HDRP is probably the more suitable choice
Since in that situation you're probably not supporting any very low end platforms anyway
I am supporting low end so it is a problem, but so is the fixed lighting model so I will have to customise some stuff if required
I think light falloff went from linear to exp. from builtin to URP?
It did
Depending on what "low end" means, the low end might not have the performance for shadows of any kind
HDRP can be light if you disable its rendering features as well, so the difference between the two isn't so clearcut
Before trying to implement a lot of HDRP features into URP, consider that
HDRP does not do webgl does it?
Nop
Webgl barely supports URP
yeah it sucks as a platform but it needed in this case - but anything it struggles with in URP?
It's a bit hard to know in advance
https://docs.unity3d.com/Manual/webgl-graphics.html
Webgl 1.0 has a lot of limitations but I think most devices support 2.0 now
Even in 2.0 you might find that decal rendering features are limited, APVs are not supported, any modern features like those should be tested for if they work, or perform poorly
Especially GPU related
Compute shaders might not be supported at all but I'm not totally sure
yeah v2 is on everything. Shader support is good. Decal should work but I am not using. Compute shaders are a no but I do not need
They are not
it sucks
There probably aren't many ways to do high quality shadow filtering without compute shaders, at least not performantly
Yes I will stick with whatever for shadows - maybe an asset somewhere. But will hope to customise lighting - not the only one who wants customisable falloff at a minimum!
keep in mind that if the user runs your game / app on a laptop it will use the integrated graphics
it depends... that sometimes happens
Do you mean to say webgl doesn't leverage the dedicated GPU even if the laptop has one in that situation?
Any user can specify the dedicated GPU for the browser - the default used to be questionable - not sure now
It's best to ask about webgl support beforehand if the assets do not mention it, as not to end up with an asset that's not usable for you
Most of them will utilize compute shaders, I'd wager
Worth to note that WebGPU support is released in some form
https://discussions.unity.com/t/early-access-to-the-new-webgpu-backend-in-unity-2023-3/933493
Which should fix these limitations of webgl
yes
chrome defaults to igpu
theres nothing to switch it automatically
it is also a hassle for the user so they wont switch it either
its not unitys fault this time tho
seriously? how can all the webgl engines show off fancy graphics if the core browser does not even default to the right GPU?
well I have not seen elden ring ran in a browser so theres that
also
fancy != expensive
you can do all sorts of fancy hackery on low power gpus
look up shadertoy
the composition matters way more than realism
Question about URP lit shader
yo
can i ask a question here? its quite simple
sorry for being so pushy but i think its a really easy to fix question so im just asking here
when i create a urp lit shader graph the preview is pink, how can i make it look like the normal unity mat?
i saw that when a guy from a tutorial 5 years ago 😅 created a "pbr graph" which is i believe is now a "urp lit shader graph", he got it looking like that before editing the graph at all:
fixed.
now i have a different problem, that it doesn't glow, i made a glow shader but it just makes the object brighter
this is what it looks like with the "glow shader"
You may be describing what you would expect to get with post processing bloom
I forgot to mention that, but basically when i try to do that (i did now) it works fine in the game view, but i am currently making a mod for a game, the mods will be compressed into a smaller .mod file from (mod.io), i already tried that, but after building the mod and exporting it into the game, the view goes to the camera that is needed for the pp bloom effect which i cannot use since it changes the players view.
There is a also another issue i have which is that everything in the whole scene gets the bloom effect.
A solution for this that i have in mind could be a independant material for example that has all the needed things in it and will display the bloom based on the sprite/particle/object.
:::::::::::
So basically im trying to add a material that can for instance be added to a particle which i can then put into a particles system so only that particles system's particles are golwing.
Bloom is always a full screen camera effect
It could alternatively be faked with additive billboard sprites in some scenarios
Modding is not a relevant topic to this server though
The limitations and features that are relevant to your work are impossible for us to guess
There is no other way of achieving bloom other than post processing and additive billboard sprites?, im ngl but it seems so easy to just make a bloom that only goes on the things you want it to effect for example particles without some kinda post processing camera thing, im kinda shocked that this isn't a feature but if there really is no other solution, its alright.
Particles often are using billboarding, and soft particle rendering helps them blend in when used that way
oh yea i heard about that, but i think if i use the unity standard soft particle its always a round bloom so no "custom/normal" bloom
for example*
Per object bloom is not technically harder than full screen bloom
There may be reasons why they decided not to support it
It'll be different, but also you're not limited to using just one glow sprite, nor only round glow sprites
Alright ill peep in again if i need help, right now it seems a little "impossible" because the solution you presented is good, but i kinda need "a different one" cuz i like things to be simple and not complicated every time, thanks a lot for your help though!
Does anyone have any idea what could be causing something like this? I can't provide more details because this is all Unity is giving me to work with. I have checked the assets I'm working with in fresh installs on the same version, with no issues. I have no idea how to debug this...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Share the full quality and graphics settings @hidden arrow
Thanks for getting back to me, I did manage to solve it. There was a quality setting for dedicated servers that was referencing the wrong pipeline.
a question, why in the URP example, the Oasis and Garden terrains are mesh instead of choosing to use terrain?
And another thing, the water shader has a problem with the fog (OasisFog) it does not render if there is no object between the water shader and the Oasisfog script that generates the fog.
I'd like to achieve something like this in 2022 LTS:
- Render opaque geometry as usual
- Invoke a callback on a component to temporarily modify meshes
- Draw the modified meshes to a RT in a custom render pass
- Revert the meshes afterwards
I'm not sure how to receive callbacks from URP renderer features in the first place. Is it possible?
Simply calling a function from Execute in a render pass doesn't seem to work
If I had to guess it's because Terrain is a bit archaic in every way
I think the same, I don't want to criticize Unity, but it is so difficult to create canyons and holes from very high up, both for a waterfall and for a cliff.
Are there any techniques you can use to generally improve the graphics of your game without having to modify textures or models or anything? For example, changing a project setting, adding a new field to a shader you use on everything, improving the general URP settings, etc.
like I added some fresnel to a shader I'm using and it made it look better, so I'm looking for things like that
Anything that improves the lighting will have a strong impact. ambient occlusion, global illumination, better placement of sources etc. Then some tone mapping and color grading. If your shaders have fresnel, fuzzy shading, subsurface scattering, rim light options, among others, use those too where the material needs it.
if you have displacement maps for your materials/models, you can add parallax occlusion mapping or tessellated displacement
Finally you can add realtime reflections via screen space post processing, probes or ray tracing.
You are expected to supplement the Terrain with mershes for cliffs and other sharp features, which means you'll probably be modeling anyway
It's good to have a tool built in that can quickly be used to create a terrain and it does have a decent selection of features, but it's rarely the best fit for any one project's needs and can't be extended at all as far as I know
This is how terrain in most engines work. Unity’s shortcomings in regard to terrain are mostly performance related and don’t quite come up in small games. Besides the memory problems however, Unity terrains can have custom rendering and shaders to fix those performance issues. With terrain holes it is also possible to extend the terrain locally with seamless meshes that then allow for overhangs and caves.
What kind of fixes do you mean?
"Improvement" is very subjective
If you are going for something like realism, or just anything visually interesting you would have different methods available to you
Better details and object/tree drawing, more shader effects, more layers, control over texture sample count. What can’t be fixed is that the heightmap and control textures need to be always fully loaded for all terrains in all loaded scenes. There is also some weirdness with collisions and terrain holes and the general difficulty of predicting the auto-LOD when making seamless hole patches
Good to know that the detail drawing can be improved, I thought that was a hardcoded feature as well
Custom Terrain shaders at least in URP seem like quite a pain though
To me the terrain system could obviously be more powerful, support streaming and more complex geometry, blending etc. But that then needs to be a fairly complex system that is almost a requirement for all projects because of its required integration with everything. Then when attempting to do anything else with that system it become very difficult to replace. As it stands the Unity terrains offer basic utility without which one can still live and making one’s own custom system is very much possible (even tentatively encouraged).
A one size fits all terrain feature would be pretty hard to make
Such a system would ideally probably have to be modular to only do what it needs to
I find terrain to be a particularly difficult subject where artistic and design expectations collide forcibly with the technological realities of these ambitions
I think it would end up strongly favoring one type of game or be a pain to use. See unreal
for example one thing they could add that would make Unity way powerful is proper per-particle or chunk based frustrum culling in vfx graph
Then you could fix a lot of terrain issues in a DIY manner (diy meaning ‘quickly’ for a specific project )
One day we'll get a URP (or even HDRP) terrain shader that has the option to toggle on tessellation out-of-the-box
Or triplanar mapping
Expensive stuff
I mean tessellation was a thing back in what, 2009? 😅
I bet what people really would like is non-sucky details rendering ootb
It’s still a frame rate murderer
And not universally supported by hardware
I mean sure, a calculator doesn't support DX11, but any even vaguely modern hardware does. Obviously it's not something you throw into a mid-low range android build but outside of that it's very well supported.
also I find triplanar often unnecessary if you put meshes over steep sections anyway
I just mean, all that stuff adds up.
Pretty sure unity is working on a fantastic new terrain and streaming system internally
Not always practical to have a lot of meshes if you have a lot of hills
Could be biplanar as well
Preferably as an option so the default shader doesn't need to support every feature ever
They’ve been showing/investing into demos that show ‘big’ scenes in recent years so moving so builtin support for open worlds would make sense
I mean I use microsplat and all these issues go away. Builtin terrain rendering is honestly useless to me.
There's a lot of good third party solutions, especially for more specific uses
Which is why I think they probably aren't investing heavily into a new one built-in feature to rule them all
I would hope they invest in better infrastructure so these assets can achieve more
like a streaming system would just make assets go away that shouldn’t need to exist anyway
That certainly would be nice
Streaming also needs a lot of editor tooling that these assets barely provide
Imagine you have to write your entire game without start, enable and awake, potentially even update
What's the relationship between BatchRendererGroup, ScriptableRenderPass, and CommandBuffers?
I've mostly only used the last two, and I'm not entirely sure how these interact with each other and what the limitations are
it looks like BatchRenderGroup is SRP exclusive at least, but I'm not sure if it's only compatible in projects using DOTS or if that's even a thing?
does DOTS have a specific "mode" of using editor kinda like the render pipelines, or does it just layer on top of whatever you're already using, game objects or otherwise?
(I'm out of the loop I've been a built-in RP kind of gal for ages
)
it kinda seems like BatchRendererGroup is doing similar things as both ScriptableRenderPass and CommandBuffers, but I'm not sure how much they can work together
Afaik it doesn't require DOTS, it just uses the same kind of "DOTS Instancing" type shaders. But I haven't looked into it all that much - BatchRenderGroup kinda scares me
You also still can use CommandBuffers inside a ScriptableRenderPass, typically for the cmd.DrawRendererList after creating a RendererList on the ScriptableRenderContext
right now I use command buffers in the scriptable render pass
for context, I'm considering modernizing Shapes, which would likely take me down either the BatchRendererGroup road or the compute shader road
right now I use GPU instancing for batching
but if I do BatchRendererGroup then I may have to drop my beloved built in RP, after all these years 😔
the nice thing with command buffers was that it was relatively easy to port/use across all three RPs
BatchRendererGroup seems a little too modern tbh
So, does Graphics.RenderMeshInstanced not work in URP?
I've got this piece of code I've done, that works perfectly in built-in with shader graph, and RenderMeshIndirect. However it doesn't seem to render anything in URP
No idea where this goes, so urp seemed like the right place. Having these red lines appear randomly at runtime AND in the scene view in our new 2D game, any known issues? Haven't found anything online yet. It seems to be happening when my cinemachine virtual camera moves. It's only appearing with the tilemap enabled tho
@dry willow Do you happen to have an example of a working RenderMeshIndirect in URP that works? I don't know but I remember you having one but can't find the link
I haven't used the newer functions, but I have one for DrawMeshInstancedIndirect which is basically the same I think
https://www.cyanilux.com/faq/#sg-drawmeshinstancedindirect
And that should work in URP right?
I used URP for that yes
It's so weird because I followed that to make shader graph work in built in, but for some reason in URP I directly don't have any graphics call on the frame debugger
Like there's no call of the draw
and im just using this small thing now to test it out
using UnityEngine;
[ExecuteAlways]
public class LetsRenderMeshInstanced : MonoBehaviour
{
[SerializeField] Mesh _mesh = null;
[SerializeField] Material _material = null;
Matrix4x4[] _matrices = new Matrix4x4[100];
private RenderParams _renderParams;
void Update()
{
if (_mesh != null && _material != null)
{
if (_renderParams.material != _material)
{
_renderParams.material = _material;
}
UpdateMatrices();
Graphics.RenderMeshInstanced(_renderParams, _mesh, 0, _matrices);
}
}
void UpdateMatrices()
{
Vector3 origin = transform.position;
float time = Time.time;
const float tau = Mathf.PI * 2f;
int numMatrices = _matrices.Length;
for (int i = 0; i < numMatrices; i++)
{
float theta = (float)i / (float)(numMatrices - 1) * tau;
_matrices[i] *= Matrix4x4.TRS(
origin + new Vector3(0, Mathf.Sin(theta), Mathf.Cos(theta)) * 10f,
Quaternion.Euler(new Vector3(333f, 10f, 333f) * time),
Vector3.one
);
}
}
}
Idk, if you have a repo with a working example that I could look at?
Oh, so it seems to be working now with your example, okay, thanks! I will be trying to dissect that and see if i can make mine work again...
Figured out the issue
You can't do this
renderParams = new RenderParams(){
material = lod.materials[lm],
matProps = propertyBlock,
receiveShadows = true,
shadowCastingMode = ShadowCastingMode.ShadowsOnly,
worldBounds = bounds
};
you must do this
renderParams = new RenderParams(lod.materials[lm]){
matProps = propertyBlock,
receiveShadows = true,
shadowCastingMode = ShadowCastingMode.ShadowsOnly,
worldBounds = bounds
};
Now I need to get it working in HDRP....
I'm currently using this to try and create custom cel shading, and I've managed to mostly get it working, except for one major problem. For some reason, "GetAdditionalLight" does not handle Point or Spot lights at all, so none of them apply to this when trying to calculate secondary lighting.
I can't find any information on this online at all, other than that apparently Point and Spot lights use something different from directional lights?
https://github.com/Cyanilux/URP_ShaderGraphCustomLighting
Give this a go and add the right keywords @rare goblet
This is still an issue. Does anyone know how to get "Always Included Shaders" to actually be included when the project uses URP?
Ah, I finally found the answer on reddit (by Safe-Instruction4844). If anyone has run into the same issue:
Yes, I did! Look at this: https://forum.unity.com/threads/renderpipeline-tag-changed.1468196/
Seems like Unity chnaged the RenderPipeline Tag for the URP from "UniversalRenderPipeline" to "UniversalPipeline". Due to this shaders tagged as "UniversalRenderPipeline" are not included into the builds, because the tag is "UniversalPipeline" now.
To fix this, you will first need to make sure that your shader is in your assets folder and not in the packages folder so you can edit the shader file (files in packages folder are read only). Then inside the shader file change the line that defines the tags of the shader. It looks something like this:
Tags{... "RenderPipeline" = "UniversalRenderPipeline" ...}
Change the tag to "UniversalPipeline" and the shader should work now (dont forget to add it to Always Included Shaders).
I think the tag was actually always UniversalPipeline (at least publicly). But there was a bug/quirk before 2020 versions where if there was only one SubShader it would try to use it regardless of the RenderPipeline tag. Meant that there was some incorrect examples/tutorials floating around - even in the official docs at one point
Frankly, it was already a revelation to me that the tag was needed at all for the "Always included shaders" to pick up the shader, independent of the exact spelling 😅
Hey there everyone.
I wanted to find out how I can Override the DrawOpeques or adjust it in some way ?
For instance, I have these three passes and each one stacks ontop of the other so no matter what, they players are always On Top of the the previous pass.
But as you can see, the DrawOpeques dose another rener ? and sets it based on the depth 🤔 🤷♂️
So, a quick thought was to move the Passes to render after Opeques and its giving me the disired look but, I now wonder... Am I doing double rendering 🤔
It could not be double rendering now that I think about it 🤔 as I am Getting the current Camera Colour, then using a layer mask in the FilteringSettings...
But I would like to ask others that know more than I do 😄
i'm looking to write a fullscreen shader for a pixelated effect, for my prototype I just put the renderscale of the Renderer to 0.25 which looks pretty good. But its not resolution independent, for example, somebody at 4k resolution would get different graphics from somebody playing at full HD (1080p). Now the obvious solution is to simply downscale the image to the "art" resolution and then blow it up again to the original resolution. But that is a huge waste of resources because why would I render at 4K if i only need a 640x320 image to blow up to 4K. I looked at if i can set the render scale dynamically, but it seems that renderScale property is not easily adjustable at runtime, other than changing the whole renderer (which would mean making a specific renderer for each resolution, really not optimal). I also looked at "URP dynamic resolution" but that does not seem to work if you also have Overlay cameras (which i need for a 3D HUD).
Any hints on how to do this?
- render at low res
- blow up to high res for pixelated effect
a. should work with Overlay camera as well
b. Canvas/text UI should not be affected and rendered at native resolution instead
c. (strongly against in scene render texture due to developer experience and performance)
for reference
Hey, I have a problem with reflection probes in URP. I have a bathroom scene that has a transition from unfinished to finished state. These are in separate scenes with baked light and probes. The transition loads additively the finished bathroom, does resolve effect (is reversed dissolve a resolve? :D), and when it fully animates it disables the old environment. But.. The scene has a mirror, and even though the probes are baked and their culling mask is set to other layers, the probes from unfinished bathroom reflect in the mirror rather than from the finished bathroom (until disabled). How can I solve this? Here's a quick gif of the problem and the mirror / probe settings
can I somehow set a priority of which reflection probe should be used for that object?
there's the importance setting which is somewhat what I need, but it works for the reflection probe and not the object, which means when the finished scene loads, the probe from that scene takes over everything in the unfinished scene, and there is a noticeable flicker
So the scene isn't fully loaded as the dissolve happens? If that's the case then it does look like the baked textures aren't applied until the scene is fully loaded, so unless there's some specific method calls to apply it beforehand, I'd just load the scene first then do the dissolve.
Ah, but I guess you'd run into issues of overlapping environments if that's what you're trying to solve.
That's tricky... maybe need to just bake it onto the textures themselves
no, the scene is loaded fully, which is a bit smaller so that there is no z-fighting, then it resolves covering the old environment, and when it's on 100% the old environment is disabled completely, which is when the new reflection probe finally takes priority
but I don't understand, what's the purpose of culling mask on reflection probes, because I have them set to separate layers and they still affect the other environment
yeah, this would probably be the best option, is it possible to do in unity?
Been a while but I've light baked onto prefabs before and took them into other scenes
actually wondering how I did that now, but I do remember having to disable them before baking the current scene with them inside of it
as for taking that texture and just hard baking it, I'm not entirely sure as I think it bakes it with world uvs
could be some utility plugins for that
just baking won't help, I have the finished enviro in a separate scene and baked and I load the whole scene (which is just the enviro actually), I also thought that the reflection would bake onto the mirror but it's baked onto the probe I guess because it doesn't work. What I need is what you said "hard baking" onto the textire itself. I know some models from 3D software come just like that, everything is baked onto the texture - light and reflections, but not sure if it's doable inside Unity.
I'll check asset store
thanks for the help!
Does someone know how to get the shadow texture of an object onto the CPU?
The culling mask on the Reflection Probe component is for setting which layers the reflection probe camera sees when it's baked, it's not for filtering which objects can use the reflection probe.
gotcha, thanks!
The Renderer asset has a section for renderer features
They are features that render something
If you can believe it
You may need to create and assign a new URP asset with a Renderer asset to replace the imported HighFidelity ones
Ok thx
Trying to upgrade to unity 6… and some of my materials won’t upgrade to URP, ones from a bought asset using toon shaders. Any suggestions? >.<
Using RenderObjects and the SSAO gives this result, where the AO is visible over something it shouldn't be
You can't upgrade non-standard shaders automatically
Hi! I am trying to paint trees on terrain but the leaves don't show up. The tree is a prefab and the leaves are a child in this prefab. When I manually add the tree to the scene, the leaves do show up
I am asking here as well as in the terrain channel because i get this warning: The tree Tree2 must use the Nature/Soft Occlusion shader. Otherwise billboarding/lighting will not work correctly. But that shader doesn't work with urp so idk if it has something to do with the leaves not showing up
I think there's some specific configuration with stencil overrides that fixes this but I can't remember off the top of my head
this is frustrating though
I will never forgive who broke graphics.blit
I take it back. I just won't forgive whoever "wrote" the documentation for its replacement.
I've found the cheesiest workaround.
i keep getting
KiUserExceptionDispatcher
crash on playmode. When i build i dont crash at all. What are some good starter points on debuging this
is anyone familiar with how I'd go about rendering from the camera to a render texture, then back to a camera again (urp 17)? my idea here is rendering a 960x540 block at the center of your screen (where your character is) and scaling that up to match whatever resolution
to keep pixel size consistent
but trying to do a simple full screen shader of a camera's render texture to another camera causes... issues, to say the least
it just captures one frame (then infinitely recurses it, I assume)
i mean this is just insane, that the default recommendation is to render it to a quad and put it "within view of the camera"
I'm doing some performance testing between BiRP and URP, using a large scene from a Synty Pack asset. I'm kind of surprised by the results though.
BiRP Forward = 25 fps Deferred = 105 fps while URP Forward = 70 fps ( and fwd+) Deferred = 72 fps.
I'm impressed by the impressive performance of the URP forward path over BiRP, but I'm puzzled to see Deferred suffer so badly in comparison. I guess maybe there was more room for optimsiation in forward path, but its really odd to see deferred actually deminish in performance! I've gone over the settings and while there might be a few that affect performance in URP that aren't in BiRP, but those would likely affect all render Paths in URP and not explain why deferred is so poor.
Anyone got any thoughts?
Try again with 1000 lights in the scene
synty assets are also not representative of an actual game other than one that uses synty assets, they have minuscule textures and many of them use the exact same material
you will see differences in SRP only when you actually use its optimizations, so in a scene with no lights, forward will be faster, in a scene with 1000s it won’t
The scene has 100 lights which is plenty. Plus you seem to be missing in BiRP deferred is showing a massive 5x increase over forward due to that paths efficiency with large number of lights, but that efficency is lost in URP.
My issue is that in BiRP Forward is slower than deferred as one would expect, but in URP deffered is slower than Forward/+ which it should not be!
I used cavity shader and shape contrast to clearly separate whites and blacks in urp, and I may have exaggerated the AO a bit to get a slightly more full image 😄 How do you think it turned out?
You can’t easily get very high framerates out of SRPs but you also can do more before you get low ones. There is a significant CPU overhead for setting up the rendering each frame that often masks the actual time spent rendering and throws your intuition off.
But the whole selling point of URP is that its meant to be superior to BiRP, performance among them. However perhaps you right that in this specific case the Synty assets are working against it. I always knew that in terms of throughput, it wouldn't be efficient as each Synty model is lowish polygon. So its very likely it could push 10x more polygon/details than it currently is without affecting performance. Still i'm finding it hard to determine what specifically could cause URL deferred to be 30% less than BiRP deferred.
Max fps as the only performance indicator is not really meaningful. I’d aim to figure out how fps is dynamically affected as you add more and different things, how stable it is and whether it even changes if you add more stuff.
The problem with SRPs for me is partially that difficulty in figuring out why performance isn’t responding as you would intuitively expect it to.
Like A Short Hike?
But my whole point is why would forward, forward+ and deferred all be the roughly the same framerate - that does not make sense. Now there might well be some weird edge case in the demo map, use of something unrelated like particles that is screwing up URP Deferred, but that was my QUESTION! I wanted to know what if any known reasons there are for that to be a problem. I can go through it all myself, but I thought the whole point of discord was to be able to fire off a quick question, as it sucks for meaningfull discussions or searching for topics.
Because you are looking at the base frame rate that isn’t yet strongly affected by how much you draw
Then URP deferred sucks as its base rate is 30% worse than BiRP. 70 fps @ 1080p with zero post processing, no fancy effects and approx 10k objects on a 3060TI is appalling. But yeah I get your point, if as you say URP deferred does have an unusually low base point thats good to know. Stupidly I forgot to mention these stats are from the worse case view on the level (i.e. everything is rendered/in view, no occlusion culling, lots of overdraw etc ). Yet still it feels a bit on low side. Thanks for your assistance, i'll give it some more thought.
hi I asked a question in #✨┃vfx-and-particles about decals in URP and only just noticed this channel, please check it out if you haven't seen it
Did you test in build?
Also when comparing perfomance you should measure frame time(in ms), not FPS.
Nope, but that is irrelevant as I'm not asking why deferred is slow - i'm asking why is URP deferred the same speed as URP Forwad/+ and slower than BiRP Deferred.
If your tests were in the editor, the results are meaningless 💀
They are not meaningless as i'm compare relative of one renderpath to the other. Again there would have to be something momumentally broken if URP deferred in the editor was massivily adversely affected but forward was not.
FPS and ms can be read in exactly the same, you just have to understand relative differences between numbers are at a different scale.
But again i'm looking at this from the relative position of the performance of Deferred compared to forward/+ and forward/deferred in BiRP. Actual numbers are irrelevant when dealing with such a large difference in performance between the two URL rendering paths.
Oh look at that! Made two builds of the URP and the results are the same as in the editor!
Build URP Deferred = 100 fps URP Forward 102 fps
Editor URP Deferred = 72 fps URP Forward = 70 fps
Actually not quite the same, deferred has ended up being slower than Forward now!
Yes the performance increased from 70 to 100 fps ( 13.9ms vs 10.0 ms) but it did so for BOTH Forward and Deferred just as I said it would. I don't care about the actual numbers, I care about the relative similarity or difference of URP deferred compared to URP forward and BiRP.
The more i've been looking into this the more I think @iron compass might be right, that URP Deferred has such a high setup that the test scene cannot push it far enough. Its surprising since Forward is neck and neck with it, not even needing to use forward+ which is better for lights performance. However that is not to say i'm not disappointed to find URP deferred is slower than BiRP Deferred, that stil puzzles me as i'm not aware of many major changes to the deferred alogrithm used.
I'll have to just go and dig into the profiler myself. I only asked here in case there was some common mistake or known gotchas when switching to URP, but as no one has mentioned anything I guess not.
Yes but is just that weird situation that you can push BiRP to higher fps but you can do less at 60 fps in BiRP than in URP
I’ve been trying to learn the scriptable render pipeline recently and have made lots of great progress, but I’ve been having a problem where objects rendered with “Render Objects” are not writing to the depth texture or buffer (i’m not sure which one my shaders try to access) and consequently my effects are not able to see the depth of the objects that were rendered. Does anybody know how to work around this? I can be a little more specific in a moment when i turn my computer on
My first thought was to use an additional render objects pass that runs after opaques, using a shader override to try render only to the depth texture. This would solve my issue where I need them to not render to the colour but do need them to render to the depth at that stage, but my attempts to get that working weren’t working out, and I would still be a little concerned about the performance impact of rendering things more than once
the objects on this layer that I render later with “render objects” are all character models that have upwards of like 20 materials because they’re quite detailed
i think it would be better if I just demonstrated the issue
I have this dropshadow effect I made that needs the depth to work
however ive also got these bars added in post that certain objects need to always render over
now it's working right now, but thats only because I'm actually rendering everything that's meant to go over the the bars twice
and as soon as I stop doing that you can see not only does the drop shadow stop working, but things like the outline for the characters (they use an asset store shader, its called RealToon) also stop working
and to kinda exacerbate the problem, I have another effect that grabs the screen and blurs it that I also don't want the things that render on top of the bars to be included in
it's not like the pass isn't doing any form of depth at all though? So evidently theres some part of how depth sampling works that I just do not understand
i should clarify this is unity 6 with urp 17.0.3 and everything i've written uses the render graph
To be more specific, I tried using the shader posted here as the "override shader" in a render objects pass queued at "BeforeRenderingOpaques" and enabling write depth, but trying it with different pass indexes, it wasn't working like i was hoping
oh correction, it's working exactly as it's meant to I think, it's just because it's writing depth but nothing else, nothing else writes to the colour texture as a consequence, so that approach is not gonna work here
maybe I could render both colour and depth into a temporary texture and copy it over manually
alright new idea is to render everything together once, and render only the overlay depth to a texture, setting all the pixels where the value differs from the camera's depth texture to 0
but deferred IS slower than forward+
generally speaking
fw+ is superior in most cases
Yeah i've been excited to try fwd+. Though in this test it performed exactly the same as fwd. Like I said overall just very confusing results with URP all round, though with very impressive gains in forward over BiRP.
what you are experiencing could be due to shadows, it's drastically different how urp and birp handles them on different lights
it could be that additional birp shadows preserve a bit more quality
or it could be additional buffers set up by urp deferred
that the normal birp deferred does not have
it's not an apples to apples comparison as the features are different even on the very barebones settings
Thanks for that insight. I'll try a disabled shadows test at some point and see what changes that leads to. I guess i'm disappointed that deferred is slower when I was expecting some improvements due to being able to completely rewrite the rendering path - though obviously that also provides oppertunity for Unity to add more bells and whistles, so identifying those new features that adversely afect performance is what i'm trying to.
Trying to get to grips with all the various URP Assets and PipelineAssets. Figured out that whatever quality level you have selected assigns its URPAsset to be the one that Cameras assign their active render from. However i'm at a loss as to what, if anything assigning a URPAsset to Graphics-ScriptableRenderPipelineSettings does. Maybe it doesn't matter and Quality ones override it? But in that case why have it assignable at all?
"Graphics" defines the defaults, "Quality" defines overrides based on quality targets
If that's the case its still needlessly confusing. Could just use the first setting in the quality list
that would couple the quality-system to the graphics-system or put them in a hierarchicaly dependency of each other
and maybe there are historical and other reasons why they are separate
its really not the primary stumbling block when dealing with quality and graphics settings 😉
I found it very confusing to have multiple reference to the same pipeline dotted through the setting systems. You are probably right on some level it needs to stay with Graphics, I just wish it wasn't as I wasted far too much time trying to work out all the various relationships between assets and scenes and cameras.
Actually thinking about it, maybe a better header or name would have helped, something to indicate its just the default, followed by a msg box stating its overriden by quality settings.
So I've been using the recommended no compression, no filtering settings for my mobile game's sprite sheets, in an Atlas. But now I'd like to add diagonal sprites, and in doing so will blow up my memory budget. It occurs to me I have no need of 24-bit formats, as much of the sprite art follows a limited pallet. Does Unity URP natively (or via an asset) support a reduced bit format (not compression) to aid with sprite sheet sizes in low memory environments? My understanding is compression would introduce artifacts, and still take up space on disk which are both undesirable.
URP is not involved in texture compression
You can set the format per-texture and per-platform to what you wish as long as your platform supports it
https://docs.unity3d.com/Manual/class-TextureImporterOverride.html
Crunch compression would reduce the size on disk
Ok, I wasn't sure if the render pipeline had anything to do with it. I'm not looking for compression though, as I tried to illustrate in my comment. Every article I've ever read, including numerous discussions here, argues against any form of compression for pixel artwork as it tends to introduce artifacts. Yet most games from the 90s used an 8-bit color scheme, and so comparatively they took up much, much less memory and disk space. Re-reading this though I need to try some things. Thanks for the feedback!
I expected you probably don't want compression anyway, but I wanted to make sure you know there is a type of compression that does reduce size on disk
That's not what the docs link is about though
You can find formats with different bitrates there
Maybe different memory use otherwise too
But it probably depends on how each platform handles them
So this list shows RGBA16-bit being a thing, but I don't see it as an option.
Sprites do tend to need an alpha channel, so that really limits whats usable here.
Did you try ARGB 16
Oh, ARGB 16 bit isn't available under Default.
This one is still twice as big and perceptually barely better than RGB(A) Compressed BC7 with Best quality
Well, its more that this wouldn't use compression and so might avoid some of the alpha channel issues folks report.
Are these sprites really the cause of your memory issue
I'd imagine pixel art rarely can be big enough to make a difference
Yeah they are :nod:
The cell size is 64px, so my tilemap consists of two 2048x2048 textures in an atlas that's consuming 48MB total.
You don't have to have every sprite ever on the same atlas, only as many as possible that are displayed at once
The Android devices I'm testing on just don't have much memory. And these are only a couple of years old. Massive range in quality across the ecosystem.
For an RTS map it is conceivable, likely even, that all those tiles will be visible at once.
I've not atlassed the creature tilemaps. Those are 35 tiles maps of 1024^2
Or in other words, another 100MB or so total. Then the UI/UX adds about another 25MB. It just adds up.
Then I expect you'll want at least the Best compression of BC7
Seems like a lot of Android devices have 1GB of memory, and the Unity runtime uses about half that plus other stuff. Leaving about 500MB, and so it is just about being conservative here. I've definately noticed a performance improvement since I've cleaned up the texture usage.
I'm going to experiment with compression and just see if I can notice any issues.
Appreciate your chatting with me about it!
Also, atlasing is meant to reduce draw calls and texture loads
Modern versions of URP have SRP batching for sprites so draw calls should not be an issue
If texture loads don't cause a performance issue either, that may open up some opportunity to juggle the sprites in and out of memory
Yeah I spent many weeks getting the draw calls down to just 6 or so for the base tilemap + all the UI
However, because there is lighting and normal maps, the draw calls explode. This isn't an issue on iOS devices or PCs generally speaking.
But a single light source can reduce most Android devices to single digits. I use quality settings to swap out the materials and disable all the lighting and effects on low end devices.
Its just been a series of incremental improvements working towards a solution that works well (even if it looks worse) on Android devices sold in the last couple of years. Its incredible how different the performance is from device to device even at the same price point.
Normal maps and the RTs for lighting certainly aren't easy on the texture memory budget
I'm doing real time shadows on the 2D sprites as well, which requires read/write access to the textures for the shader calls - and that also doubles the texture usage.
I should investigate if that can be adjusted at run time actually.
The shadows get disabled on low quality settings. But if the read/write flag is kept on that is wasteful.
Am I comprehending this correct? The World and Absolute World option for Position node are the same in URP? How do I get the camera relative world position in that case?
I'm having issues with canvas.sendwillrendercanvases consuming 500% of my frame time when zooming. Panning is fine. Profiling it shows perhaps some Text Mesh Pro stuff is causing the issue. Thousands of calls to Graphic.OnRectTransformDimensionsChange and TextMeshProUGUI.OnRectTransformDimensionsChange . I can kind of understand this, while visually the UI doesn't change size, as the ortho adjusts the entire UI is also being adjusted to match. This seems inefficient. What might a better approach be?
can someone tell me why the lightning map doesn't get applied to the walls?
hi nice to meet you
does anyone for any advice or feedback for this scene I made,trying to make it looking more realistic.
Thank you
At a glance, there's really no shadows, baked or otherwise. You could argue the good light coverage would prevent them, but that contriburs to the unrealistic look perhaps. If you rendered it in-game on high quality with the effects turned up some things may look better such as the jaggies going away and everything being sharper. Additional sharpness may make it look more believable. A texture on the wood shelf would be good. Adjusting the orange and light green solid-color liquid holders would also be good. Containers of mono-color liquid that's opaque just seems unrealistic. Finally, while it is a lab, some wear and tear on the cabinets or counter top would break up the repetition.
It is interesting how the middle drawer is a lighter color than the bottom or top drawers in the front cabinet. But then its the bottom two drawers are lighter with the back cabinet.
Clearly they assembled them wrong and accidentally used one of each other's drawers.
IKEA special
Does anyone know if it's possible to have material instancing on a canvas shader material?
Hi, I tried enabling Camera and Objects in motion blur settings and I keep getting this+a frozen blurred scene, am I missing something because I can't find anything online?
Thank you
I dont really know why its happen hahaha
Im fairly new for lighting in unity its not supposed to have different color working to find a fix for it
@random bramble Any news how your struggles with 2D urp ended up?
hello everyone, i have a realy bad problem i need to fix it urgently, so in my game i used Luminate as a Sky and Fog solution, it works flawlessly in the unity editor but after i build it it just fks itself
the first image is what i dont want, the second is what i want and what its supposed to do
ive spend countless hours running through the code and logs, i cant seem to find anything that could cause this issue
any help will greatly be appreciated. ping me to relpy. Thanks
Did you confirm that editor and build are using the same quality settings
yes
Tried making an entirely new HDRP asset and using that?
im using URP
Ah, misread
A new URP asset in that case
If a fresh URP asset + renderer won't help, then I'd guess it's something in Luminate itself
yea
Thank you so much
Can I ask what the depth that you mention is it a node in shader or something different?
Real life definitely has ambient occlusion, but not the quite distinct screen space AO which can be weird but I think it's doing more good than harm here
I'd agree using fresnel for refraction index of the glass, but not just for transparency if refraction is not an option
I agree the liquids could be much better, and they'd benefit from depth and refraction effects but implementing those is pretty complicated especially for "realism"
Vignette and chromatic aberration might not boost realism points but maybe won't detract either, totally a choice of preference
I agree about box projected reflection probes and baking
What do you mean by custom reflection texture?
And maybe just adding I have reflection probe and the light is baked maybe the intensity i too high so the shadow is not visible
Thank you for the advice
Sorry to dig this one up from last year...
I've been getting lots of reports about seemingly random crashes with no helpful info in the logs.
In fact it seems like the graphics card driver may even be crashing -- someone said Discord fully crashed when it happened to them as well. And others say they need to restart their PC after.
All the reports seem to be coming from Nvidia cards, although I suppose that might just be because they are more common.
I'm on Unity 2022.3.x, using URP.
I did get a log shouting about a null ref re: render textures. IE:
"RenderTexture: Resolving a destination texture that is NULL.
D3D11: Failed to create RenderTexture (2560 x 1440 fmt 26 aa 8), error 0x887a0005"
So I explored the hunch that it could be related to running out of VRAM. But that log came from a pretty beefy modern computer. And I tried profiling the memory on my machine & couldn't find any leaks.
Has anyone else experienced issues like this? Any leads on a fix?
Not sure if this is related, but one slightly unusual thing I am doing is using lots of Render Objects in my pipeline?
I fixed this by upgrading to Unity 2021.3.33
Nice. Thanks for the reply 🙏
I must have a different issue then as I'm currently on 2022.3.41
Update
fixing the shadow
I dont really know about how to make the glass based on the feedback about depth and refraction
now trying to make the glass by tweaking the fresnel
URP doesn't give you refractive glass out of the box, but you may be able to find some assets for it
Or examples
thank you
Which one look good Soft Shadow or hard shadow?
I think I found specific topics that confirmed that the issue I was having were Unity specific and Unity 2021.3.33 was the update that fixed that one specifically. I tried different Unity versions back then, but only waiting for that one to be released finally helped me. I think I had to work for something like 1 month with a build of the game released on Steam that was gathering a looot of hate from RTX users lol
So yeah maybe your issue is a different one
I don't really see any, but soft shadows are always the higher quality option
Oke
And Thank you so much for all the advice
Have a nice day
@noble stirrup Don't spam on the server.
Hi i wanted to check in if i'm on the right track for my issue,
I want to render the game in a pixelation fashion, (see screenshot), right now i'm using renderScale which is good, but it does not allow much control, for example it is a percentage which would make it not resolution independent.
So from my research I think doing a custom render pipeline should do the trick, first i render the scene into a texture of a specific size (lets say 640) and then blow it up to the screen resolution. A lot of "pixelation" effect are rendered at full resolution which i want to avoid, because i don't want to render the camera to 8K then scale it back to 640 pixel and then back to 8K.
So a custom render pipeline would be able to solve this problem relatively easy right? Or should I look into Full Screen Shader. Another thing is that it should not downscale the GUI elements.
Can I recreate the renderScale but at a fixed resolution with a custom render pipeline? It would be amazing to just adjust the existing pipeline if that was possible.
I don't really know about the fancy ways of using a custom render pipeline, but the way I'd do it, is make a camera with a render target set to a render texture with set size, and then assign that render texture to a full-screen UI raw image
you can try it and see if it achieves the result you want
that's how I do pixelated minimaps, it should work for full-screen no problem, and you can build your UI however you want around it
you can assign a material to it as well, and put a shader on it, like any other ui shader
thanks! I think thats a good use case for a minimap indeed, however for a full screen render texture, it is a bit too much hacky for me. I'm actually pretty close to getting it to work.
https://github.com/Unity-Technologies/Graphics/blob/master/Packages/com.unity.render-pipelines.universal/Runtime/UniversalRenderPipeline.cs#L1400
i need to somehow figure out how to overwrite this in either a custom render pass, or maybe even just completely copy that file and just adjust that line to calculate the wanted scale based on the current resolution compared to a fixed resolution.
Hi all, has anyone gotten this error after switching to URP? I did a bit of googling apparently it's fixed? But the error still recurringly pop up on my console
Question about RenderTexture mipmap generation. If you have the RT set to automatically generate mipmaps, will it do this process immediately after rendering into it? I'd like to render into the RT early in update via CommandBuffer. Will this invoke the mipmap generation straight away? Hope so as the GPU should be pretty idle during game Update. The docs imply it happens straight away, but just want to check if that still happens via CommandBuffer style rendering.
Rendering into it isn't done during Update, though. It's after lateupdate, if I remember correctly, just like with any other camera
or during lateupdate? I forget
oh right, even via CommandBuffer, I assumed that was just kicked off/scheduled when the buffer is told to execute? Any way to make use of the GPU during this time (for rendering, rather than just Compute Shaders etc.)
is there a specific reason why you suspect your gpu is idling during that time and you really need to squeeze out that bit of preformance?
if I'm not mistaken, gpus don't really just chill while your cpu's doing the work
they are working on previous frames
your code is about a frame or two ahead of gpu, otherwise it would be hella inefficient with the (relatively) ridiculously slow data transfer between the two
gpu is usually chumming along, all the time
Right ok... bad assumption on my part there. tbh, whenever the GPU wants to do it, it should be fine. It might be a large (2K/4K) texture, but only one channel so hopefully that means its quicker at generating the mips
depends what you're rendering
it's pretty much exactly like rendering another 2k/4k screen
but yeah unless you're doing fancy shit, it should be fine
Yeah, nothing fancy and I don't clear the RT each time... and limited geometry being rendered to it - which presumably means it only renders the pixels covered by that geometry.
it shouldn't be an issue then. if it's so simple, then it's like plugging in a second display and playing a yt video on it, while playing your game
which is pretty much nothing
how to disable adding a camera to a stack in urp, one camera Overlay, the second base
because of this my UI menu is drawn over splash ui?
trying to get a low res looking by changing the render scale in the URP settings. first image is the render scale at0.3333333 with perfectly aligned pixels. the second image is at 0.6666667 and is a unaligned pixel mess. i have tried a lot of different numbers but couldnt get rid of the things. is there a solution or something?
Best way is usually by making a post processing effect or rendering to a render texture and processing that one before displaying it. The render scale is intended for performance/quality control. If you like it’s janky raw look, you can use it for style ofc.
I'm rendering a mesh into a rendertexture using a CommandBuffer. Should I expect to be able to see that in the Frame Debugger somewhere or not?
You should be able to see all draw calls in the frame debugger yeah
Okay. I couldn't find it at all earlier.
Unity keep getting stuck on compiling this specific shader for no apparent reason, only ending it in task manager stop it. Running it again, it works. Then randomly decides to compile this shader for eternity again.
Using 6000.13
Next issue... I'm rendering a mesh into a rendertexture using a CommandBuffer. In the shader I need to read the existing rendertexture value at the u,v. For a camera based render into RT, I just did float4 grabTex = tex2Dlod(_CameraOpaqueTexture, float4(uv, 0, 0)); but this doesn't seem to be working when rendering via commandbuffer. Is there some additional command I need to push? Do I need to set it manually somehow?
I guess I could try passing in the rendertexture (that is also being rendered into) as a texture source in the shader? Maybe that's safe to do.
that didn't work... has anybody setup a shader that reads from the rendertarget when rendering via a CommandBuffer?
Can you help? I have URP Lit transparent material and it's totally invisible, but alpha isn't 0.
Maybe did I turn off something?
Okay, I found an issue, Transparent Layer Mask in Renderer Data.
That's not allowed in many cases. From what I know reading from the render target you're writing to is a feature only on tiled mobile GPUs.
You can definitely do it via camera's rendering in RenderTargets by sampling the _CameraOpaqueTexture. I've already got that setup working. It's just via CommandBuffers where there is not Camera object that I'm struggling.
In the case of the camera, _CameraOpaqueTexture isn't the same target that objects would be rendered into - it's a copy.
To replicate that sort of behaviour you could create a temporary RT via the CommandBuffer, call cmd.Blit to copy the RT to the tempRT and pass that to the shader
Right, yeah, I guess that works... shame I have to do a copy. 😦
Are there any nice free URP night vision post processing shaders? I want to add it as an effect here.
Maybe you know of another way of doing this? What I'm trying to do is accumulate values in the texture on top of whatevers already in there (hence wanting to read the target, then color = existing + newTexSample). Can I just use blend mode 'add' maybe, or do I need to read the RT?
Yes for that you'd use Blend modes, Additive is very common (Blend One One in shaderlab)
great, ok... not sure why I didn't think about that in the first place! Thank you!
This looks like sobel filter
Not usually what night vision looks like though
anyone knows a way that i can offset a dot product
like i don't want it to be centered
what do you mean "centred"? As in, perpendicular vectors don't produce 0.0?
yea something like that, i want to customise its offset
That's not really possible with a dot product. I don't even think "offset" and "centred" are valid terms for it. It's basically just giving you the angle between two vectors. Usually people only care about certain ranges of angles and then disregard results below a certain value etc.
i wanna create a rim light effect with no actual lighting but only on one side of my objects, so that may explain it better
im using the one minus node to invert the dot product for the rim effect
but im not sure how can i make the rim appear only on a specific side
You can rotate either of the two vectors a bit
Is it possible for a freeform 2d light to have rounded edges?
Oh I see. So you need to do another dot product for that, taking the surface normal and dotting it with the direction you want it to appear. You'll then take the upper range of that i.e. 0.8 to 1.0 to give you only the surfaces really pointing in that direction. Then multiply both numbers together - rim value * side value.
I'm trying to replicate the behavior of "renderScale" in a custom render pass, but i'm really not sure how to set the size of this texture before it is getting created by Draw Opaque Objects. I want to make sure that even though the game resolution is 1920x1080 this texture is created and rendered at lets say 960x540. My understanding of SRP has increased a lot, but it looks like I'm still having issues fitting the exact puzzle pieces together.
Hey, for screen space reflection i need to be able to sample the color buffer of the previous rendererd scene in a shader. my solution to this was to render the scene into a render texture, add a RenderPipelineManager.endContextRendering callback, which executes following code:
private void DoRendering(ScriptableRenderContext context, List<Camera> cameras)
{
RenderTexture currentTexture = RenderTexture.active;
Graphics.Blit(sceneBuffer, null, blitMaterial, -1);
RenderTexture.active = currentTexture;
}
Blitting the content of the scene render texture to the main framebuffer.
The game renders correctly in the game view, but in the scene view the toolbar is overwritten by the contents of the scene render texture.
Why is this happening, and what would be the correct way to do this?
i got the desired effect so far i just cant figue how to make it move along the view direction..
So if I'm understanding you right, you want the rim to appear on the same side no matter where you view it from? If so, the first dot needs to just be the full "rim" effect around the object/character... so that will just be normal.dot(viewdirection)... then if you want the rim only the right, do another dot between normal and view right - normal.dot(camera.right).
couldn't figure this out 😭
😦 I think I'm confused with some of the terminology you're using with dot products etc... without the maths, just describe what you're trying to achieve visually and how it should behave when you move the camera around the object/character.
i want it exactly how you said it, i want the rim to always be on the same side like in this video
https://youtube.com/shorts/zBrCMHYdWuY?si=peFShzGWflM8VpAR
✨ Visit my main channel for the full tutorial! ✨
► https://youtu.be/jcMRaFF9RRI
Rim lighting is a shading technique that highlights the edges of a model. It's useful to add a moody atmosphere or help an object stand out from a dark background. This effect gets the main light in a custom function node to emphasize the shadowed side of a model.
...
but the thing is, the video creator uses actual lighting, but i don't wanna use any real lighting, all visual tricks
I mean technically this kinda is lighting. It's lighting or shadowing or something based on some perceived light source. Can't really avoid that aspect of it to achieve the look in that video. His full video does explain it well.... but essentially you do need two parts to your graph, 1. the rim light around the whole object, and 2. the part that isolates just the side you want... then multiply together so the rim light appears in just the isolated area.
the thing is i couldn't get the getlightsource thing to work, so i thought about switching to a different route to achieve the effect
start with getting a rim around the whole object, that would be 1.0f - saturate(view.dot(normal)); (you may want to limit the range of the result to get a sharper rim). Then to always get the rim on the right... it needs to be done relative to the camera.... so another set of nodes that does saturate(cameraright.dot(normal). Then multiply together... that float can then be used to lerp to the rim colour.
alright ill try
thank you so much for sticking with me to help
i really appreciate it
https://www.youtube.com/watch?v=flu2PNRUAso
does anyone know if this is urp3d or not lol
In this brief video tutorial, we'll take a look at how to get 2D sprites to display shadows and receive lighting in 3D similar to the Square Enix game Octopath Traveler.
Unity Default Sprite Shader: https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/DefaultResourcesExtra/Sprites-Diffuse.shader
Complete Shader: https://pastebin....
some of the comments say they are stuck with the pink error texture and then ppl reply with it being not for urp but for hdrp
i get the pink error with his script too and im using urp3d
It's 3D
i got another tutorial working lol
It is possible to get pseudo shadows in a pure 2D project with an asset like this: https://assetstore.unity.com/packages/tools/particles-effects/modern-2d-shadows-229634 but there are a few things to be aware of, such as this not working with tile Atlases or Crunch compression without doing some code work yourself. They have a decent Discord channel for asking questions and getting support at least.
Does anyone know, if it's even possible, to schedule a ScriptableRenderPass to execute between two events in DrawTransparentObjects? As far as I can tell, you can place it before DrawTransparentObjects, you can place it after DrawTransparentObjects. But if you want to execute a ScriptableRenderPass just before rendering a ScreenSpaceCamera canvas you're just SOL?
Is it something that is only possible with Render Graph?
Would anyone be able to help me troubleshoot a shader graph im learning how to use them but mine do nothing, I dont even know where to begin troubleshooting followed this tutorialhttps://www.youtube.com/watch?v=OEFJQ1cB6IQ
My sprites just disappear when i put this material on them
oh thanks lolo that looks good ill check it out
I learned a bit too late that the best looking sprite shadows requires a full 3D project, but given how that is generally too heavy for mainstream mobile devices, it was probably for the best. An example would be Dungeon of the Endless for iPad. https://www.youtube.com/watch?v=zPQOHX9hiL0 That is a really good deep-dive by the developers on how they got Unity to do what they wanted. Granted, it is a bit old but still relevant.
Sébastien Dubois (Amplitude Studios) covers the unique visuals and procedural dungeon generator in Dungeon of the Endless. Slides: https://docs.google.com/file/d/0B8b_2q6ofSSWUEd0RWdVc193Vms/edit
Help us caption & translate this video!
oh lol thats a nice coincidence cuz im already using full 3d project, its just that my sprites and tilemaps are 2d sprites
ill watch that while i eat
does anyone know why this isnt continous, I want the texture to just keep going without the blank spot
For URP pipeline using camera stacking:
https://github.com/Unity-Technologies/UniversalRenderingExamples/wiki/3D-Skybox
Would a technique like this work with having transparent VFX on the main level? i.e. the main scene that isn't the skybox/background. I've tried various techniques but trying to have a 3d skybox render to the back and have transparency/opaques in front is quite difficult.
The idea is to imitate a cube map but have it 3d so 3d stuff like rotation/space can be applied inside of a special camera.
A classic physical skybox dome isn't going to work because large structures clip through it and they render in front. Plus needing to add massive render distance to try and fake placing it behind large structures, will still run into the same issues of objects passing through eachother.
Any ideas on how to render 3d objects/vfx inside an overlay camera, then force it to be behind the default base camera (main camera)?
This article: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.2/manual/camera-stacking.html
...says "Camera Stacking allows you to create effects such as a 3D model in a 2D UI, or the cockpit of a vehicle"
...but as soon as I stack a camera with a URP 2D Renderer on top of a 3d camera (or vice versa), I get the following error:
Am I missing something obvious? Is there a better way to get a 3d object into a 2d scene (with appropriate lighting)?
Here's my Pipeline Asset:
Here's the 3d URP renderer (attached to the base camera)
and the URP 2d Renderer (attached to the overlay camera)
Thanks for any pointers!
Nevermind. Apparently they disallow that as of my unity version and the latest docs (here: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/cameras/camera-stacking-concepts.html)
say "You cannot use a mix of different types of renderers (2D and 3D) for cameras in a camera stack." (right after they same on the same page it can be used to mix 2d and 3d assets)
Hello i have probleme with occlusion culling that don't draw the stuff just behind the door if anyone have similar issue thank a lot !
I don't remember deleting anything, maybe I have deleted something but probably not
(the problem is that URP post processing doesn't work in my project)
I wanted to test URP on a new project because I thought the previous one was cursed so I wanted to test on a new one, AAAAAAAND even tho I imported Universal RP and restarted the project there's no Post Processing option inside my Camera. This is horrible
This inspector suggests you haven't set up URP correctly. There is more to just installing the package - see the first few links in pinned messages
I think I have set it up now but it still doesn't work even tho I messed with stuff
"2D UI" isn't "2D"
I hope this helps
"2D Renderer" is also not always the same as "2D"
Yah defienitely understand that. I'm just looking for a way to have 2d lights affect my sprites/tilemap, and also have a 3d mesh in the scene. That requires 3d lights to light the mesh.
That leaves four options:
- Figure out how to get sprite materials to work with 3d lights or vice-versa.
- Camera Stacking (great solution, but no longer supported by Unity)
- Render the 3d camera to a renderTexture, then apply that texture to a sprite (which I'm playing with now)
- Just render the mesh animations to a spritesheet and keep everything truly 2d in Unity (super tempting)
All of these seem like hacky workarounds and I'm surprised that there's not an out-of-the-box way to drop a mesh and a 3d light into a scene that also has sprites and 2d lights
#3 is probably the closest thing you have to an official solution, but it still seems like a hack
Another hack is to use a sprite shader with the 3D mesh, though that requires re-rendering the mesh with an [empty pass](#archived-shaders message) shader to fix issues from the mesh being forced to be transparent
The interesting thing about using a sprite shader for the mesh is that with custom lit sprite graph you can apply the 2D light texture any whichever way on the mesh
Including using the mesh normals
SOMEHOW in another new project I can now do post processing
why does it not work when I create a "Post Processing" layer and assign both camera and gameobject I attach these components to to it?
Camera's Volume Mask by default is Default, and so also in your screenshot
yes, but here I set both PostProcessing and it doesn't work, however when I set both to default it works
Volume Mask is still Default
why?
Because you haven't changed it
That means the camera looks for Volumes on the Default layer, not PostProcessing or any other
oh, that's now completely different thing than what urp thing told me, it works on my 2 testing projects now
Do you have link to the page with the misleading information?
To save you some trouble I can say once is not fine either
Hey is it possible to write custom post processing code for URP? I want to create cloud shaders and underwater shaders, which I've done for godot before. But I cannot find much on the internet, and most information I do find conflicts a lot with each other
You can do anything, it has Renderer Features which is a framework for writing custom rendering where you can plug rendering commands into a command buffer.
Yup, thats the keyword I was looking for. Thanks!
why nearby floor is getting shadowed as well?
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/post-processing/custom-post-processing.html
Two useful links here, note these techniques are rapidly changing so find docs for the version you use
Before 2022.3. you have to use this third party method:
https://www.febucci.com/2022/05/custom-post-processing-in-urp/
Shadow limits are not distances, they are brightness ranges if that's what you're referring to
the question is why they're shadowing a part that doesn't have any shadow?
The shadows of Shadows, Midtones and Highlights are not the actual shadows
It refers darker parts of the image that are more likely to be shadows
ahhhhhh, so it's just editing the image?
is urp post processing only about editing the image?
All post processing is doing just that
Although some of them can also utilize depth and motion information, as DoF and motion blur do
But other than that the effects don't really know what anything "is"
Bloom also is based only on how bright something is, not whether it's actually emissive or not
Got the renderTexture working. Lots of guessing and testing, but working great now!
I have this standard Image Effect Shader:
Shader "WaterPostProcessing"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
// No culling or depth
Cull Off ZWrite Off ZTest Always
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float2 uv : TEXCOORD0;
};
struct v2f
{
float2 uv : TEXCOORD0;
float4 vertex : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.uv = v.uv;
return o;
}
sampler2D _MainTex;
fixed4 frag (v2f i) : SV_Target
{
fixed4 col = tex2D(_MainTex, i.uv);
// just invert the colors
col.rgb = 1 - col.rgb;
return col;
}
ENDCG
}
}
}
And I have it on a material and I have the material set in the renderer. But for some reason It's not doing anything. It does work if I set the material to the build-in "FullscreenInvertColors"
Im going to bed now. Feel free to ping me if you know how to help in anyway
Hi any quick way to add a material to a camera to do a full screen effect? In Built In Render Pipeline it was as easy as doing:
using UnityEngine;
[ExecuteInEditMode]
public class MaterialForCamera : MonoBehaviour
{
public Material material;
public void OnRenderImage(RenderTexture source, RenderTexture destination)
{
Graphics.Blit(source, destination, material);
}
}
but this doesnt work anymore for URP
how?
blit: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/customize/blit-overview.html
custom post processing: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@17.0/manual/post-processing/custom-post-processing.html
third party post processing for versions prior to 2022.3.
https://www.febucci.com/2022/05/custom-post-processing-in-urp/
Note that the techniques and documentation have rapidly changed between 2022.3. and Unity 6 versions so find the pages for your appropriate version
Thank you that seems like a massive amount of code instead of the line of code in built in... Isn't there a simpler way?
Just looking to palettize the screen
Not that I know of
The extra code comes from how URP expect these effects to work as Renderer Features
And in case of post processing effects for them to be compatible with the Volume framework as well
It's better in the long run that they are compatible with those systems
I have set up post proc, maybe I can use it for that
At minimum you just need to do more copypasting from the example scripts to get it working
hi, i was baking my lightmap and this has been going for 1 and a half hours. Is this normal?
Tried clicking the dialog or any part of the editor?
Sounds like it broke
The lightmap may be incomplete, it's hard to say
If the project becomes corrupted, it should be fixable by reimporting it or by deleting Library
.Paint as far as I know is only related to rendering the editor interface
Definitely not supposed to spend any considerable time on that
Corruptions in the Library are one cause of hang-ups like these
right
ive decided to let my frined bake them with his gpu
hes got a 3070 shouldnt be an issue at all
any way to remove those compression lines
the red and green and purple ones
or is it just how game view works
also every object has weird messe d up realtime shadows
etc
You'd want to show the light component's properties
Outer spot angles above 90° cause the kind of shadow distortion you see
ahhhhhhhhhh thanks
im tryna make a flashlight so i need a higher range, is there a fix
Not range, angle
I messed with urp settings a bit, changed stuff in them and for some unknown reason I don't see any shadows now. Any fix?
yeah I made settings exactly the same as default ones and I still can't see shadows
alright, the lighting and stuff on the scene mode is basically broken
nvm, the fix was simply clicking 1 button 🗣️ 🗣️ 🗣️ 🗣️ 🗣️
It's about post processing and urp. How can I make post processing not work on some gameobjects and skybox? And how can I make it work for specific gameobjects? #💥┃post-processing message
Depends what you're trying to do.
Hi, I changed my pipeline to URP 2D, and now if i check 'post processing' under the camera the game view turns black (scene view is fine). Any ideas? Cheers
I need some help
I've got this shader I made for built in and im transitioning to URP and checking out HDRP. It makes use of ColorMask and BlendModes for specific pass. Is there any way to use it by translating it to URP/HDRP?
According to wik, it should work on all three of the pipelines.
(the operatios i mean=
Also, this is part of an asset, so I would like to avoid users having to setup render features
I'm trying to reduce colours from a pixel art scene
You mean like having an indexed colour palette?
Hello! I am trying to use URP to darken the environment and turn my player into a light. This is intended as a gameplay elemenmt where the player can only see what is within the radius of their light and move to it. My current problem is that while I managed to get the Global Light 2D working. Every other Light fails to brighten the scene. Very confused by this and can't seem to find resources that address this.
Does anyone know why the lights are not brightening the scene?
What in the word did it do to my screenshots 🤔
Here are the images
Hello, does anyone know how to render UI on top the base render with the RenderPipeline.SubmitRenderRequest function ? Or if there is an equivalent method that will render ui?
Looks like you're using a 3d light. That won't illuminate 2d objects. Make sure you only use 2d lights
Haven't used that method, but I think camera stacking with a 2d overlay camera is the recommended approach?
(or if you're using more recent versions that disabled 2d/3d mixed stacks, using RenderTextures is the preferred 'new' way)
That was correct it seem 🤦♂️ Thank you so much!
That's what I do, canvas element are not rendered though, and I'm searching for a way to make it happen.
Grab screenshots of the canvas, camera, and urp renderer in the inspector so we can see if you're missing something
It should 'just work' without anything complicated
Is it possible to convert this to a lit/texture in my URP project? I cant find a shader that works that way
Universal Render Pipeline/Unlit can take a texture
Or simple lit or lit works as well
Otherwise be more specific what you want
Is it intended behavior for an object in my scene to count lights on different Rendering Layers towards it's 'Additional Lights' maximum? I am using a modified version of a shader I got off the Asset Store, and a quick skim of its lighting code does not suggest the shader is causing the issue.
Of course, I can not say that for certain, but I would just like to confirm that this behavior is abnormal (or not) before I toil away at much more in depth troubleshooting. I'd hate to waste hours pulling apart the shader to find the cause of the bug only to realize that its not a bug at all.
I haven't experimented much with it, but I think so yeah @digital plaza
Using Forward+ might be a workaround
Ah ok, thank you!
Simple lit worked! Thank you!
Hi, general question, how do you render into 3D rendertextures in Unity? Essentially I want to have one that encases a volume of space and I want to render into it to add density to that volume in places - think drawing a sphere that is density 1.0 in the centre and 0.0 at the edge. It's straightforward to render a mesh into a 2D rendertexture, but I'm not sure how you render into a 3D one. I'd rather not use a compute shader that simply does distance checks from every pixel to the sphere each time - Ideally there would be something more localised to just the affected pixels within the sphere or its bounding box. Thanks!
Meshes don't have any volume information, they are just polygon surfaces
To get volume information I think you probably will need a system that does distance checks against your meshes like an SDF generator
Or use distance field functions to approximate the meshes
Yeah, so I would have check every pixel of the 3D rendertexture against this mesh SDF/distance... hmmm.
https://discussions.unity.com/t/custom-dynamic-lighting-attenuation/941456
Yesterday I stumbled on this Unity Forums post that fixed a huge style issue I've had with URP lighting - are there any general lists or resources for other simple yet effective modifications to URP code? I know that the customizability of the Pipeline is its main selling point, but I can't say I was too interested in messing with it before yesterday, so I am unsure where to look.
Anyone know anything for this?
how can i remove the lines?
some people talked about dithering, but im not sure what to do with it
Colour banding is a subtle form of posterization in digital images, caused by the colour of each pixel being rounded to the nearest of the digital colour levels. While posterization is often done for artistic effect, colour banding is an undesired artifact. In 24-bit colour modes, 8 bits per channel is usually considered sufficient to render ima...
so how can i remove the colour anding
Did you read the article?
Hi, is it possible to batch render world space canvas?
In my 2D URP game I have many enemies each with a world space UI to show hp bar and things. I see in frame debugger, the enemy sprites are batched but their UIs are not
The draw calls are likely not the bottleneck in dynamically updated canvas ui
I'd rather you investigate why you have those bands
Your whole image seems to have no more color depth than 8 bits
Are you rendering to a RT Texture or something
There is no way to avoid banding in scenes like this when targeting 24bit output. The only option ist to use dithering. For lighting in URP there is a checkbox on the camera, for textures you need to enable dithering in the source software.
Adding color correction on top of 24bit data will amplify the negative effect
For optimal quality render to 10bit per pixel (or more), then compress to 8bit using dithering and a S-log like tonemapper
Isn't this waaay worse than 24 bit banding
If you posterize the screenshot to 256 colors per channel, it's unchanged
It probably has color correction applied to 24bit input
Does that strip most of the color depth outright
Or does it just make the bands appear more easily
In most compressed formats light and dark values are crushed and often contrast is reduced yielding way less info than raw 24bit
It emphasizes the effect in some tones and reduces it in others
It’s usually only noticeable in high contrast, smooth gradients since they map across the full range so any defect becomes glaringly obvious
I agree but in that case I wouldn't expect the image to remain completely unchanged when reduced to just 8 bit color depth
We should know more about rendering settings, post processing used here and renderer features or RTs, if any
agreed
Hi, is it possible to have ShaderGraph shaders that work with custom data streams, i.e.
{
float3 positionWS;
float2 uv;
};
StructuredBuffer<DrawVertex> _DrawVertices;```
This data comes via Graphics.DrawProcedural() call, with data filled in by Compute Shaders.
hmm, seems its "under consideration" in the roadmap still. https://unity.com/roadmap/unity-platform/rendering-visual-effects
Can probably use a Custom Function. I've done something similar for DrawMeshInstancedIndirect : https://www.cyanilux.com/faq/#sg-drawmeshinstancedindirect
Oooh! Thank you! I will give that a go!
Struggling to get this working. I think the issue is I'm just rendering one mesh and my buffer is just the vertices (rather than instances of a mesh).
hi, when i try to bake lights, it gets frozen, or stuck in appstatusbar.paint. Im using progressive gpu with an rtx 3050
You should include what troubleshooting steps you've done and what clues you've found
Since you've been advised on this before
it gets stech on usually around 6% and my entire pc slows down and unity just gets frozen. I havent tried many troubleshooting steps since idk what to do
I suggested previously that you delete the Library of the project in case it's corrupted
You mentioned that you had someone else to try to bake the scene and they had the same issue, that's important information to bring up
At least I think that's what you meant
So, you can try baking another test scene made of just simple cubes to confirm that baking does work in the project and on your machine
If that doesn't work, try the test scene bake in a fresh project
We'd also like follow up information on your color banding issue since you kinda left that topic hanging
ill delete library first, i forgot to do that
same issue, i didnt see any solutions in the follow ups
if i delete library will my project corrupt
if it will ill need a few mins to back it up
We did not have enough information and need to see what post processing you have, what rendering settings you have and what renderer features and potentially render target textures you have
There's not much point in asking questions if you're not following up when we try to help
Less point to repeat the original question
this weird but i dont hv banding anymore, but now my spotlight seems to just stop
ive delted libaraies
ill try to
bake it
Anybody know if there's some subtle internal difference between RenderPrimitivesIndexed and DrawProcedural? DrawProcedural works and I see my mesh rendered, but using RenderPrimitivesIndexed does not (I don't even see it in the frame debugger). I've filled out the renderparams with the material, bounds etc. Top call doesn't work, bottom does. I would have thought (by their API's) that these two are equivalent.
//Graphics.DrawProcedural(m_InstantiatedWaterMaterial, m_Bounds, MeshTopology.Triangles, m_IndexBuffer, m_IndexBuffer.count);```
(my vertices exist in a ComputeBuffer, and are updated via Compute Shader)
Why is my Shadow Caster 2D not producing a shadow? They are set to the Same target layer.
ok im back
No mention if you did any of the troubleshooting for the light baking as I suggested?
i deleted libraries
And did test bakes in other scenes and/or projects?
Some of those images could be helpful in solving the color banding issue, but I think you offhandedly mentioned that the issue is gone
It's unclear
Just bumping this message. If I missed out on providing any needed info I'll go fetch it. The walls have a composite collider 2D on them made from the Tilemap Collider. When light 2D hits the walls its meant to produce a shadow but instead the light bleeds through. Followed a video to make this, looked to be the same setup except this part wasn't working. Hoping somebody sees what I did wrong as I couldn't find solutions that worked online. Such as changing the shadow strength, the light order, and sorting layer.
Edit: I think it works now? Idk why but after restarting Unity a few times it finally rendered them
hi spaziu, do you have any updates on this
If test bakes are fine, that points to an issue in your original scene
Too much dense high poly geometry included in a bake can cause exponentially ballooning bake time
In some versions of the editor animated shaders can cause infinite bake times
Note that Realtime GI and Baked GI are entirely different systems that can have their separate issues
Usually you look at what shaders your objects are using to see if they're animating
i dont have any animated objects ewither
Animated objects have no effect on baking
Anyway, you basically have to figure out what in your scene is causing the issue as it seems most likely that it's something in there
By process of elimination
I'm having a weird issue where I can't get a Graphics.DrawMeshInstanced(...) call to work for a specific camera/layer. I have the following code:
rp.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
rp.worldBounds = new Bounds(Vector3.zero, new Vector3(1000.0f, 1000.0f, 1000.0f));
Graphics.RenderMeshInstanced(rp, m_ParticleMesh, 0, m_RenderMatrixArray, m_ActiveParticleCount[0]);
if (m_WaterCamera != null)
{
RenderParams rp2 = new RenderParams(m_ParticleMaterial);
rp2.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
rp2.camera = m_WaterCamera;
rp2.layer = 1 << m_ParticleRenderLayerMask;
rp2.worldBounds = new Bounds(Vector3.zero, new Vector3(1000.0f, 1000.0f, 1000.0f));
Graphics.RenderMeshInstanced(rp2, m_ParticleMesh, 0, m_RenderMatrixArray, m_ActiveParticleCount[0]);
}```
The first Graphics.RenderMeshInstanced(...) works for the main camera and I see the particles rendered. The second block, for the water camera, doesn't, and nothing I try seems to work. I know it's going into the block (m_WaterCamera is set). This camera has culling mask set to "water interaction" layer, and is the same as m_ParticleRenderLayerMask. Still nothing. I tried removing the rp2.camera setting so it renders into all cameras - still nothing. I made the bounds huge incase Unity was culling it... still nothing. It isn't showing up in the frame debugger too. Am I overlooking something here?!?!
does anyone know what I can do to decrease the processing time of the scriptable renderer/camera stack or whatever is causing these spikes?
I'm using the URP 2d lighting system for context
there is a baseline cost you cannot optimize away, often looking at the profiler will only show you this baseline cost and your actual draw-cost is so small it doesn't actually factor yet. You can try using fewer features, that should reduce the frame-setup-cost but if you expect very high FPS (120+, as you would see in the built-in RP), that is not what URP seems to be aiming for.
Seems like the actual spikes arise from scripts, not the rendering (but they could be interlinked)
That just seems like a ridiculously high baseline cost considering it's a 2d game and I have a fairly powerful computer. I was hoping to be able to optimize it to run on most pcs
Any idea how I can find those specific scripts?
baseline means its independent of all these things
you could also try profiling in a build
Look more through the profiler at spikes
Still can't figure this out. Just tried using a CommandBuffer.DrawMeshInstanced and adding the CommandBuffer to the camera specifically. Still no rendering and nothing in frame debugger. This is driving me nuts 😄
Hi
I am new to unity and I am trying to build a plugin using URP, I have a pipeline that has 4 shaders. I am using the RendererFeature class (just 1 class for the whole project) bit I am wondering which is best:
- Use 4 RenderPass for each shader and then enqueue them in the AddRenderPasses function
Or - Have just 1 RenderPass that will call all shaders in its execute overridden function?
@everyone @here
@lucid lantern Don't spam, your question is quite visible. If you want it answered add more context or detail and have some patience.
My question is really understandable and don’t need to add anything.
Then be patient and don't spam.
Hello everyone!
I'm trying to add a field of view to my 2D game. I managed to do it in the 3D URP using stencil, but I also need to use the 2D sorting layer on the Y axis. So, I need to switch to the 2D URP. However, I'm not seeing the "Default Layer Mask" field. Any ideas to achive this effect ?
Is it possible to have 2 render features impacting the same layer but not each other?
Anyone know how I can mask out certain objects from a full screen render feature?
Help! When I export my project, stuff doesn't work, when it does in the editor! There's no errors in the console. AnimationEvents don't seem to work in playmode! I'm using a timeline to show dialogues and play footstep sounds via scripts. This works just fine in the editor but not in build! Could someone help me please? This is becoming really frustrating.
This doesn't seem like something that URP is responsible for, since it handles only graphics
Well, I wouldn't know where to ask this, it was driving me crazy, do you think this is a better topic for #🏃┃animation ?
More appropriate yes
Hi, can I just sanity check that this is possible with URP. I think it is via a Render Feature maybe? I would like to render an opaque object after all other opaques are rendered (so before transparents). But I need this object to have access to the CameraOpaqueTexture and CameraDepthTexture. This object would also write to the depth buffer. Is that possible - rendering after CameraOpaqueTexture and CameraDepthTexture have been copied, and still writing to the main z-buffer for that frame?
Hey guy's .. how can i make the lens flare reflect on the objecte .. help me plz
I realise this may be an artistic choice, but just in case, technically lens flares cannot be reflected by anything, because they happen in the lens, as the name implies, and not on the source object.
Is there another similar way??
Hey man, can I talk to u DM? @polar cipher
Sure
Thax
Screen space lens flares are your only option
They are based on brightness, not on specific origin points like traditional lens flare renderers
Sorry, but I'm a beginner 😕
Do u have a photo or video that illustrates that?
for some reason unity is hard capped at 80 fps max
Game window has its own vsync settings under the aspect ratio dropdown
I see, thanks! The default seems to be deactivated and still is a hard 80fps cap
I guess it's also possible that your GPU is overriding that with its own default syncing settings
Nvidia settings are set to have a max fps cap for 160 fps and vsync set to let the 3D app decide
Maybe it has to do with the max fps
There is a target framerate variable that can be set from scripts
Could also be that something is slowing your game down
The stats window suggests that the CPU is taking time, not that the GPU is waiting, if I read it correctly
Just found the solution, it was due to the Nvidia settings max fps. Changing it from max of 160 to none solved it
If I'm making a mobile game, do you think I should use URP or Built-in Render Pipeline, in regards to performance?
When researching, I found many people saying how URP is much slower than BiRP for mobile (https://discussions.unity.com/t/urp-on-mobile-incredibly-slow/866901), but then others say it's faster.
Does anyone with experience using both for mobile games know a more definitive answer?
One common "debunking" of URP's worse performance, is that by default, URP has enabled more high quality settings compared to BiRP project. What settings exactly should I change in URP to make it perform more like BiRP? Any optimization tips/settings to change for better performance are appreciated.
Also, can I switch from URP back to Built-in render pipeline? Ideally I want to make a backup of my URP project, then convert back to BiRP, so I can compare performance difference for my project.
There's no included converter to go from urp to birp, only the other way around
Version control tools make are a good alternative though
URP template starts out with renderer features like SSAO and decals
URP asset defines light and shadow quality and enables HDR color space by default
Player settings in all modern editor versions use linear color space rather than gamma
updating graphic drivers helps too
what would be the proper way to get a renderer feature from the current urp render asset ? All I can find online is with reflection.
I'm always using the latest studio drivers
heya, is anyone aware of the best way to scale the display resolution up without increasing pixel count? I'm trying to preserve a low res aesthetic
I believe you're supposed to be able to just record a camera to a render texture, then use that as a full screen renderer feature, but it isn't working for me
since the camera just records itself in that case
and i'd prefer not just casting it onto a ui image
for reference, here's how it looks right now
as you can see, the screen is enormous and the player is tiny. if i change the ortho size, the pixels change size as well, which is undesirable (then, zooming in makes them almost imperceptible)
what i'd like is to be able to "zoom in", so to speak, without changing pixel size
so my assumption is upscaling it after rendering is done
and using a render scale of 0.5x and doubling the ortho isn't an option either, as you can see here
it distorts the pixel outlines since they're being downscaled
vs. the bottom, which is just doubling the in-editor scale with normal ortho size
the documentation for this is insane also, it suggests to just render to a quad in the game and "put another camera in view of the quad"..?
i figured it out, for future reference (because in my search i've realized people ask about this a lot)
for discord search keywords: upscale render texture multiple cameras pixelation pixel art
you can create a second, barebones renderer. throw on a fullscreen renderer feature. make the material -> a fullscreen shader graph that does nothing but sample a render texture and output it as its color value. then, make sure you have both renderers in your renderer data asset, and assign the barebones blit renderer to a "main" camera. assign your normal renderer to another camera that renders to the render texture
the second camera (the one that renders to a RT) is the one that needs post processing shadows, depth/opaque textures, etc., the first camera just renders the RT and therefore you can (and should) disable all of that
then you just make your render texture whatever size you want and it'll fill your screen regardless of the player resolution
it's technically not that great for performance but the reality is that you're rendering an absolutely tiny portion of the screen, so whatever is lost in upscaling it is probably regained in not having to render 4x as much area (or more)
Anyone know why i dont have render options to set my camera to overlay?
My project is URP and the package in the package manager is fully updated
The camera looks like this when BiRP is in use, not URP
There's more steps than installing the package
okay, ill look up a conversion process
Instructions are pinned on this channel
ah perfect! thanks
is this ai generated??
i was talking about two urp renderers and assigning one to each camera, not two different render pipelines
Having spent much of my first couple years with Unity focusing on mobile performance, my impression is URP performance is fine. There were even some well-organized benchmarks posted a while back that proved as much. But as with most things, it can easily perform worse if you don't spent time understanding the system and optimizing accordingly.
My understanding is BiRP will not be supported going forward, so it probably makes sense to gain experience in URP should your interest be anything more than pure hobby level. URP also provides the capability for graphical enhancements over BiRP. If your goal is to be cross-platform, this can be very useful as PC gamers expect more than mobile. Unity 6 has added new features that, on paper, would significantly improve performance over BiRP for those 3D applications that can take advantage of it. I'm thinking of resident drawer and occlusion culling for a And I believe URP has assets for enabling FSR and DLSS that possibly don't work in BiRP, thus allowing more fps gain with the appropriate video cards on PC platforms.
The unfortunate truth is many mobile devices are utter crap in terms of performance. And many suffer from esoteric things like the CPU jumping 25% when you touch the screen. Or dropping 50% of your FPS if you try and force the framerate. Unity's profiler also takes some experience to use properly. I've had to pretty much optimize every other piece of code to get to a point where rendering bottlenecks are observable. If your desire is to make a good looking game that spans the gamut of devices you'll need to do this regardless of the render pipe.
Sorry about that.
I'm almost insulted you thought that was an AI post :weeps:
Gotta fight for our humanity!
Hello all. Had some questions about SRP. I basically get how blitting from a source to a destination works. Does anyone know what BlitTexture(RasterCommandBuffer, RTHandle, Vector4, float, bool) does?
Hello all. Had some questions about SRP
is there any good quality free urp tree/nature/vegetation assets?'
The Unity demo projects like book of the dead and Viking village have some.
arent botd for hdrp
Good and free doesn’t really compute when the it comes to assets
haha
you can easily convert between hdrp and URP
i'v planned to buy in future, but rn i need to learn use unity
i didnt know abt that, can u teach me ?
my forest looks like this hahha
its ugly and low in quality, but got no clue how i can make it better in quality
u didnt mean: Book Of The Dead: Environment | HDRP ?
0 Z width = this? (Unity 6000.0.17f1) Disabling Bloom fixes it.
Hi, I tried importing this:
https://assetstore.unity.com/packages/3d/vegetation/trees/tree-collection-pack-2017-76974
Which should support urp but it's all just pink.
I tried to do rendering -> convert materials but that failed.
Hey, you can use:
1.Post Processing
Its a way to add effect's like bloom(glow), color adjustments ect.
How to add:
Just right click the hierarchy then Volume>>Global Volume
How to use:
Create a new profile for the setting in inspector, then add effect's according to your scene. You can watch Brakeys tutorial.
2.Use Grass Texture
Adding grass texture close to trees adds extra realsm.
How to use:
Select your terrain and navigate to paint terrain section and select paint texture then add the texture.
3.Use Small deformation
Add small holes bumps and grainy deformations to make it more natural
How to:
Use stamp tool in paint terrain. Just select the tool and check the subtract box and set height then select a pattern and just paint terrain.
Because, they are using custom shaders
To fix this search for the support they are providing, it should be in the imported files named "URP Support" something like that and just import the package.
ah, thanks
Is there a more performant way to make it so certain objects are always visible on top? Right now I use a second overlay camera that only renders the "always on top" layer, but I know additional cameras is bad for performance.
They're not terrible in URP
You also have the Render Objects renderer feature though
I need some good free asset packs for my VR game for unity 6
anyone have any recommendations?
free & good doesn't exist
bruh
is quixel bridge not an opton
maybe you know some asset packs that are good at a ok price?
hmm thats pretty good
my games genre is horror do you think those will work or maybe you have something else
if you need specific things you need to $++
😭
regardless, horror is in the story, not in the artwork
make it dark, use regular assets --> horror 😄
yh i currently just have a working flashlight and xr toolkit
when trying to find assets it keeps destroying my game, so yh rip if i wanna use unity i gotta throw money at assets
you always have to throw money at assets, thats just reality everywhere
its also fair, since most of your palyer's engagement derives from those to a large extent
not in unreal with quixel
i used to be a unreal developer and i always used quixel
but unity is nicer to develop in
@iron compass do you think this is alright?
or do you think ill have more problems again
i wouldn't get my hopes up, but maybe it works for you. Naturally you can't compare actually free assets with the quality and consistency of Quixel assets. Maybe unity should do something similar.
yea i mean ideally i want an environment like alien isolation
which quixel cant provide in circumstances like that anyway
yeah, suppose thats an issue you'll always have unless you DIY everything, its the price you pay
yeah and im a broke uni student so rip lol
Yes, you can do this with a custom render feature. Bind a separate clean color and depth target(needs a separate depth target so the objects can depth test against themselves but not the "main" world objects), clear the color target with a transparent color, clear the depth target, then render the objects on the layers you want, then blit the color target with an alpha blended shader to the camera target.
Though I guess binding the camera target as a color target from the start can make the color target management steps I described redundant.
the simple way is this:
@iron compass uhm, not if your always drawn geometry has backfaces, you're not going to get an opaque closed mesh render properly with ZTest set to Always 