#archived-urp

1 messages · Page 17 of 1

random bramble
#

It used to be in the graphics settings

#

Now it's in the URP 2D

#

But I can't find it in the "normal" URP

marble vigil
#

Oof, I guess that's a problem

random bramble
#

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 🙂

dry willow
#

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

random bramble
marble vigil
random bramble
blazing crest
#

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.

daring jewel
#

is expecting 144+fps in 1440p using volumetric fog and clouds, ssgi deluded?

#

all realtime lighting

marble vigil
pseudo jacinth
#

So I've set up a render feature, how can I obtain and send the depth and view space normals texture to the shader?

pseudo jacinth
blazing crest
#

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

blazing crest
iron compass
humble ember
#

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?

patent mauve
#

is there any tricks to remove or add things from a custom shader scrip or graph to make it compataible for URP

toxic forum
#

Turn off "enable lag" on the URP Render asset.

#

||You need to use the profiler to actually find the source of the lag||

midnight cairn
#

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

ocean hinge
midnight cairn
#

Is there any solution, please suggest @ocean hinge

#

How do I solve it

shut bough
#

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.

toxic forum
dry willow
timber pagoda
#

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

solemn viper
#

Is there any way to shove code into a command buffer via some sort of callback or something?

iron compass
solemn viper
#

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

deep schooner
#

idk what the Problem is like it shouldnt be pink

marble vigil
#

But you'd have to check

deep schooner
#

there were pngs XD

marble vigil
# deep schooner 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

reef hemlock
#

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

marble vigil
hazy niche
#

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!
grave oasis
#

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?

marble vigil
simple python
marble vigil
simple python
#

this is the material

marble vigil
#

I assume the pixel glare disappears or is significantly reduced if you toggle off Emission

simple python
#

but i want the emission

marble vigil
# simple python 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

simple python
marble vigil
hazy niche
river fable
#

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?

queen bronze
median hull
#

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

marble vigil
#

The cropped screenshot doesn't give much in the way of context since "normal map space" is used in many places

median hull
#

yeah im sorry this is what im trying to get

#

im porting my project from hdrp and i dont see the option in urp

marble vigil
median hull
#

ah so i cant put off learning shader graph anymore lol

marble vigil
#

But I think it's pretty limited

median hull
#

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

marble vigil
#

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

median hull
#

which one would that be

median hull
marble vigil
median hull
median hull
#

oh lol

#

is it on the actual asset store

marble vigil
median hull
#

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

marble vigil
median hull
#

ah i see yeah ill put in in a different project first if its a whole movement thing lol

marble vigil
#

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

median hull
#

i dont see any shaders in here?

#

ill just make one lol

marble vigil
median hull
#

i did this and it works at least until i can make something better lol

marble vigil
#

Sorry for the wild goose chase

marble vigil
#

But it would be nice to save the work of having to set up every property that needs to be exposed

median hull
#

ill probably expose the metalic and smoothness ect

marble vigil
#

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

median hull
#

anyways this works so thank you so much fellow internet hooman

marble vigil
river fable
queen bronze
#

Or do you want them turning?

river fable
#

Images work fine. But how would I do that?

simple python
#

is there way to make this look better? lightning is looking kind of blocky rn

marble vigil
# simple python 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

vagrant orchid
#

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.

marble vigil
#

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

vagrant orchid
#

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.

marble vigil
#

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

vagrant orchid
#

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

eternal hawk
#

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...

iron compass
eternal hawk
iron compass
versed granite
#

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)

versed granite
#

I get the same GPU usage (around 30% on a 2080 super) on a sample scene lmao

iron compass
versed granite
versed granite
#

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

visual spindle
#

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

sinful gorge
#

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

visual spindle
sinful gorge
iron compass
sullen prism
#

Does anyone have any solution for the pink texture problem??? Pls tell me

iron compass
solemn viper
#

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

placid laurel
#

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?

iron compass
# placid laurel Hello! So I Have something called ACES On my map i was wondering how to make ind...

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).

waxen plume
#

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?

https://streamable.com/1lo1kn

Watch "UnityBug" on Streamable.

▶ Play video
placid laurel
#

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

sullen dune
#

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.

simple python
#

can i improve the lightning? that face is fully black which is not real at all

native yarrow
#

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!

trim iron
#

bro pinged everyone

soft lion
#

most definitely worth the attention of all 100k members

sullen dune
#

Its not an even a URP related question

spark pumice
#

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;
    }
marble vigil
spark pumice
#

also i dont have any reflection probes in my scene, unless there is a hidden one i didint know about lol

marble vigil
#

Or the environmental lighting as a whole, rather

spark pumice
#

right

#

well is there a way to update it?

marble vigil
#

But every time I've tested it, it specifically does not do that
It updates the ambient probe, not the cubemap

spark pumice
#

0-0

#

well i guess i will see

marble vigil
# spark pumice well i guess i will see

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

spark pumice
#

it didint work :(

#

i guess i have to do the reflection probe?

marble vigil
spark pumice
#

thx for the help

#

ill try to fix it

spark pumice
raw marsh
#

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?

mystic delta
signal orchid
noble moat
#

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?

marble vigil
signal orchid
marble vigil
abstract cloak
#

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?

iron compass
abstract cloak
iron compass
#

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.

abstract cloak
#

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

iron compass
#

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.

abstract cloak
#

Alright thanks, Ill give the Shapes and overlay/overdraw mode a try first!

spark pumice
marble vigil
# spark pumice 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

spark pumice
#

alr

#

thx

cunning quest
#

[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!

cunning quest
#

nevermind i fixed it myself

lost basalt
noble moat
# lost basalt 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

scarlet spindle
#

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

round pawn
#

Hi , question how i can put this render Features without lag? cause i remove it and the game increases in FPS on mobile

lost basalt
#

by default

noble moat
#

Ok, cool deal. thanks for the info. I will go that route then

opaque sinew
#

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.

iron compass
opaque sinew
iron compass
#

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

opaque sinew
#

I'm looking for guidance on writing the actual render feature itself. Or help with what I've started. The ScriptableRenderPass.

iron compass
stable island
#

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!

marble vigil
#

Because you certainly will notice hard shadows

#

Shadow filtering is kinda tough, and expensive
Cascade blending likewise

stable island
#

this is true - perhaps it should be AA shadows!

marble vigil
#

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

stable island
#

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?

marble vigil
#

Before trying to implement a lot of HDRP features into URP, consider that

stable island
#

HDRP does not do webgl does it?

marble vigil
#

Nop
Webgl barely supports URP

stable island
#

yeah it sucks as a platform but it needed in this case - but anything it struggles with in URP?

marble vigil
#

Especially GPU related
Compute shaders might not be supported at all but I'm not totally sure

stable island
marble vigil
#

There probably aren't many ways to do high quality shadow filtering without compute shaders, at least not performantly

stable island
#

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!

lost basalt
#

keep in mind that if the user runs your game / app on a laptop it will use the integrated graphics

stable island
marble vigil
stable island
#

Any user can specify the dedicated GPU for the browser - the default used to be questionable - not sure now

marble vigil
#

Which should fix these limitations of webgl

lost basalt
#

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

stable island
lost basalt
#

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

flat siren
#

Question about URP lit shader

storm niche
#

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"

marble vigil
storm niche
# marble vigil 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.

marble vigil
#

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

storm niche
marble vigil
storm niche
#

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*

marble vigil
#

Per object bloom is not technically harder than full screen bloom
There may be reasons why they decided not to support it

marble vigil
storm niche
hidden arrow
#

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...

sinful gorge
#

Share the full quality and graphics settings @hidden arrow

hidden arrow
mint goblet
#

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.

desert vale
#

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

marble vigil
mint goblet
brittle pivot
#

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

iron compass
#

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.

marble vigil
iron compass
#

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.

marble vigil
marble vigil
iron compass
# marble vigil What kind of fixes do you mean?

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

marble vigil
#

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

iron compass
#

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).

marble vigil
#

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

iron compass
iron compass
#

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 )

karmic iron
#

One day we'll get a URP (or even HDRP) terrain shader that has the option to toggle on tessellation out-of-the-box

marble vigil
#

Or triplanar mapping

iron compass
#

Expensive stuff

karmic iron
#

I mean tessellation was a thing back in what, 2009? 😅

iron compass
#

I bet what people really would like is non-sucky details rendering ootb

iron compass
#

And not universally supported by hardware

karmic iron
#

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.

iron compass
#

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

marble vigil
#

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

iron compass
#

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

iron compass
marble vigil
iron compass
#

like a streaming system would just make assets go away that shouldn’t need to exist anyway

marble vigil
#

That certainly would be nice

iron compass
#

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

brisk reef
#

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 SCWWcrying )

#

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

dry willow
dry willow
brisk reef
#

catnod 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

desert vale
#

BatchRendererGroup seems a little too modern tbh

humble ember
#

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

pseudo fog
#

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

humble ember
dry willow
humble ember
#

And that should work in URP right?

dry willow
#

I used URP for that yes

humble ember
#

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...

humble ember
#

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....

rare goblet
#

https://github.com/Unity-Technologies/ShaderGraph-Custom-Lighting/blob/master/Assets/Includes/CustomLighting.hlsl

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.

GitHub

A sample project showcasing a simple method to calculate custom lighting inside of Shader Graph for the Lightweight Render Pipeline. Includes a sample toon shaded scene and example assets. Built fo...

#

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?

sinful gorge
violet holly
#

This is still an issue. Does anyone know how to get "Always Included Shaders" to actually be included when the project uses URP?

violet holly
# violet holly This is still an issue. Does anyone know how to get "Always Included Shaders" to...

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).
dry willow
violet holly
oblique pollen
#

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 😄

olive sage
#

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?

  1. render at low res
  2. 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

lament axle
#

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

haughty garnet
#

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

lament axle
#

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

lament axle
haughty garnet
#

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

lament axle
#

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!

sinful gorge
#

Does someone know how to get the shadow texture of an object onto the CPU?

hearty tundra
cosmic light
#

what is RendererFeatures?

marble vigil
#

If you can believe it

cosmic light
#

it happened after I imported these 2

#

can i undo it?

marble vigil
magic cairn
#

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? >.<

stark nova
#

Using RenderObjects and the SSAO gives this result, where the AO is visible over something it shouldn't be

stark nova
snow igloo
#

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

desert vale
#

this is frustrating though

runic sparrow
#

I will never forgive who broke graphics.blit

runic sparrow
#

I take it back. I just won't forgive whoever "wrote" the documentation for its replacement.

#

I've found the cheesiest workaround.

fluid sapphire
#

i keep getting

KiUserExceptionDispatcher

crash on playmode. When i build i dont crash at all. What are some good starter points on debuging this

hard talon
#

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)

hard talon
#

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"

wraith monolith
#

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?

iron compass
#

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

wraith monolith
silk trail
#

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?

iron compass
wraith monolith
# iron compass You can’t easily get very high framerates out of SRPs but you also can do more b...

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.

iron compass
#

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.

wraith monolith
# iron compass The problem with SRPs for me is partially that difficulty in figuring out why pe...

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.

iron compass
wraith monolith
#

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.

molten jungle
#

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

hearty tundra
#

Also when comparing perfomance you should measure frame time(in ms), not FPS.

wraith monolith
#

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.

hearty tundra
#

If your tests were in the editor, the results are meaningless 💀

wraith monolith
#

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.

wraith monolith
#

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.

iron compass
sour bronze
#

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

sour bronze
#

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

sour bronze
#

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

lost basalt
#

generally speaking

#

fw+ is superior in most cases

wraith monolith
# lost basalt but deferred IS slower than forward+

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.

lost basalt
#

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

wraith monolith
# lost basalt or it could be additional buffers set up by urp deferred

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.

wraith monolith
#

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?

iron compass
wraith monolith
iron compass
#

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 😉

wraith monolith
#

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.

cosmic marsh
#

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.

marble vigil
#

Crunch compression would reduce the size on disk

cosmic marsh
# marble vigil URP is not involved in texture compression You can set the format per-texture an...

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!

marble vigil
#

You can find formats with different bitrates there

#

Maybe different memory use otherwise too

#

But it probably depends on how each platform handles them

cosmic marsh
#

Sprites do tend to need an alpha channel, so that really limits whats usable here.

cosmic marsh
#

This is what I'm seeing?

marble vigil
cosmic marsh
#

Oh, ARGB 16 bit isn't available under Default.

marble vigil
#

This one is still twice as big and perceptually barely better than RGB(A) Compressed BC7 with Best quality

cosmic marsh
#

Well, its more that this wouldn't use compression and so might avoid some of the alpha channel issues folks report.

marble vigil
#

Are these sprites really the cause of your memory issue
I'd imagine pixel art rarely can be big enough to make a difference

cosmic marsh
#

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.

marble vigil
#

You don't have to have every sprite ever on the same atlas, only as many as possible that are displayed at once

cosmic marsh
#

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.

marble vigil
#

Then I expect you'll want at least the Best compression of BC7

cosmic marsh
#

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!

marble vigil
cosmic marsh
#

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.

marble vigil
cosmic marsh
#

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.

mighty cargo
#

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?

cosmic marsh
#

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?

potent hedge
#

can someone tell me why the lightning map doesn't get applied to the walls?

sharp brook
#

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

cosmic marsh
# sharp brook hi nice to meet you does anyone for any advice or feedback for this scene I made...

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.

copper pilot
cosmic marsh
#

IKEA special

spare lagoon
#

Does anyone know if it's possible to have material instancing on a canvas shader material?

heady jewel
#

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?

sharp brook
marble vigil
#

@random bramble Any news how your struggles with 2D urp ended up?

supple galleon
#

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

marble vigil
marble vigil
#

Tried making an entirely new HDRP asset and using that?

supple galleon
marble vigil
supple galleon
marble vigil
#

If a fresh URP asset + renderer won't help, then I'd guess it's something in Luminate itself

sharp brook
#

Thank you so much
Can I ask what the depth that you mention is it a node in shader or something different?

marble vigil
#

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?

sharp brook
strange pier
#

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?

silk ore
strange pier
sharp brook
marble vigil
#

Or examples

sharp brook
#

Which one look good Soft Shadow or hard shadow?

silk ore
# strange pier Nice. Thanks for the reply 🙏 I must have a different issue then as I'm curren...

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

marble vigil
sharp brook
mystic delta
#

@noble stirrup Don't spam on the server.

olive sage
#

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.

mellow shore
#

you can try it and see if it achieves the result you want

mellow shore
#

you can assign a material to it as well, and put a shader on it, like any other ui shader

olive sage
#

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.

limpid rain
#

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

crystal forge
#

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.

mellow shore
#

or during lateupdate? I forget

crystal forge
mellow shore
#

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

crystal forge
#

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

mellow shore
crystal forge
mellow shore
#

which is pretty much nothing

devout root
#

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?

wraith current
#

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?

iron compass
crystal forge
#

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?

sinful gorge
crystal forge
oblique briar
#

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

crystal forge
#

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.

crystal forge
#

that didn't work... has anybody setup a shader that reads from the rendertarget when rendering via a CommandBuffer?

bleak cave
#

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.

worthy rapids
hearty tundra
crystal forge
dry willow
crystal forge
reef hedge
#

Are there any nice free URP night vision post processing shaders? I want to add it as an effect here.

crystal forge
dry willow
crystal forge
marble vigil
steep bear
#

anyone knows a way that i can offset a dot product

#

like i don't want it to be centered

crystal forge
steep bear
crystal forge
# steep bear 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.

steep bear
#

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

marble vigil
spark sand
#

Is it possible for a freeform 2d light to have rounded edges?

crystal forge
olive sage
#

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.

short sapphire
#

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?

steep bear
crystal forge
steep bear
#

couldn't figure this out 😭

crystal forge
# steep bear 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.

steep bear
#

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.

...

▶ Play video
#

but the thing is, the video creator uses actual lighting, but i don't wanna use any real lighting, all visual tricks

crystal forge
#

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.

steep bear
#

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

crystal forge
#

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.

steep bear
#

alright ill try

#

thank you so much for sticking with me to help

#

i really appreciate it

stuck owl
#

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....

▶ Play video
#

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

toxic forum
#

It's 3D

stuck owl
cosmic marsh
# stuck owl https://www.youtube.com/watch?v=flu2PNRUAso does anyone know if this is urp3d o...

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.

Use the Modern 2D Shadows tool for your next project. Find this and more particle & effect tools on the Unity Asset Store.

old oriole
#

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?

jagged kestrel
#

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

stuck owl
cosmic marsh
# stuck owl 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!

http://amara.org/v/V66U/

▶ Play video
stuck owl
#

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

jagged kestrel
#

does anyone know why this isnt continous, I want the texture to just keep going without the blank spot

glad edge
#

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)?

GitHub

This project contains a collection of Custom Renderer examples. This will be updated as we refine the feature and add more options. - Unity-Technologies/UniversalRenderingExamples

winter oxide
#

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!

winter oxide
fair relic
#

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 !

tawny blaze
#

(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

dry willow
tawny blaze
marble vigil
#

"2D Renderer" is also not always the same as "2D"

winter oxide
#

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:

  1. Figure out how to get sprite materials to work with 3d lights or vice-versa.
  2. Camera Stacking (great solution, but no longer supported by Unity)
  3. Render the 3d camera to a renderTexture, then apply that texture to a sprite (which I'm playing with now)
  4. 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

marble vigil
#

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

tawny blaze
tawny blaze
marble vigil
tawny blaze
tawny blaze
marble vigil
#

That means the camera looks for Volumes on the Default layer, not PostProcessing or any other

tawny blaze
marble vigil
tawny blaze
#

yay now I made urp to work on my project

marble vigil
nova bloom
#

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

hearty tundra
nova bloom
tawny blaze
marble vigil
marble vigil
tawny blaze
marble vigil
tawny blaze
#

is urp post processing only about editing the image?

marble vigil
# tawny blaze 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

winter oxide
nova bloom
#

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"

nova bloom
#

Im going to bed now. Feel free to ping me if you know how to help in anyway

dreamy horizon
#

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

dreamy horizon
marble vigil
# dreamy horizon Hi any quick way to add a material to a camera to do a full screen effect? In Bu...

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

dreamy horizon
#

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

marble vigil
#

It's better in the long run that they are compatible with those systems

dreamy horizon
#

I have set up post proc, maybe I can use it for that

marble vigil
#

At minimum you just need to do more copypasting from the example scripts to get it working

dreamy horizon
#

Yeah that's true 😃

#

Thank you for your help

noble stirrup
#

hi, i was baking my lightmap and this has been going for 1 and a half hours. Is this normal?

marble vigil
noble stirrup
#

i cant really open unity rn

#

i click the icon in taskbar and nothing opens

marble vigil
#

Sounds like it broke

noble stirrup
#

if i close it now will it get corrupted?

#

the lightmap

#

or the game

marble vigil
# noble stirrup the lightmap

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

noble stirrup
#

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

marble vigil
noble stirrup
marble vigil
# noble stirrup

Outer spot angles above 90° cause the kind of shadow distortion you see

noble stirrup
#

ahhhhhhhhhh thanks

#

im tryna make a flashlight so i need a higher range, is there a fix

tawny blaze
#

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?

tawny blaze
#

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

tawny blaze
tawny blaze
#

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

runic sparrow
carmine pivot
#

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

humble ember
#

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

dreamy horizon
runic sparrow
#

You mean like having an indexed colour palette?

autumn zodiac
#

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 🤔

formal wind
#

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?

winter oxide
winter oxide
#

(or if you're using more recent versions that disabled 2d/3d mixed stacks, using RenderTextures is the preferred 'new' way)

autumn zodiac
formal wind
winter oxide
#

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

sterile spear
#

Is it possible to convert this to a lit/texture in my URP project? I cant find a shader that works that way

sinful gorge
#

Or simple lit or lit works as well

#

Otherwise be more specific what you want

digital plaza
#

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.

sinful gorge
#

I haven't experimented much with it, but I think so yeah @digital plaza

Using Forward+ might be a workaround

sterile spear
crystal forge
#

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!

marble vigil
crystal forge
digital plaza
#

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.

carmine pivot
noble stirrup
#

how can i remove the lines?

#

some people talked about dithering, but im not sure what to do with it

iron compass
# noble stirrup 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...

noble stirrup
#

so how can i remove the colour anding

iron compass
#

Did you read the article?

neon gull
#

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

iron compass
#

The draw calls are likely not the bottleneck in dynamically updated canvas ui

marble vigil
#

Are you rendering to a RT Texture or something

iron compass
#

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

marble vigil
#

If you posterize the screenshot to 256 colors per channel, it's unchanged

iron compass
marble vigil
iron compass
#

In most compressed formats light and dark values are crushed and often contrast is reduced yielding way less info than raw 24bit

iron compass
#

It’s usually only noticeable in high contrast, smooth gradients since they map across the full range so any defect becomes glaringly obvious

marble vigil
#

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

iron compass
#

agreed

crystal forge
#

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.
crystal forge
dry willow
crystal forge
crystal forge
noble stirrup
#

hi, when i try to bake lights, it gets frozen, or stuck in appstatusbar.paint. Im using progressive gpu with an rtx 3050

marble vigil
noble stirrup
#

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

marble vigil
#

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

noble stirrup
#

ill delete library first, i forgot to do that

noble stirrup
#

if i delete library will my project corrupt

#

if it will ill need a few mins to back it up

marble vigil
#

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

noble stirrup
#

this weird but i dont hv banding anymore, but now my spotlight seems to just stop

#

ive delted libaraies

#

ill try to

#

bake it

crystal forge
#

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)
autumn zodiac
#

Why is my Shadow Caster 2D not producing a shadow? They are set to the Same target layer.

noble stirrup
marble vigil
noble stirrup
#

i deleted libraries

marble vigil
#

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

noble stirrup
#

the issue is gone, the baking issue remains

#

test bakes r fine

autumn zodiac
# autumn zodiac Why is my Shadow Caster 2D not producing a shadow? They are set to the Same targ...

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

noble stirrup
noble stirrup
noble stirrup
#

same project new scene

marble vigil
# noble stirrup 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

noble stirrup
#

i dont have any high poly objects

#

how can i check is i have animated shaders

marble vigil
#

Usually you look at what shaders your objects are using to see if they're animating

noble stirrup
#

i dont have any animated objects ewither

marble vigil
#

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

crystal forge
#

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?!?!
quick echo
#

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

quick echo
#

(deep profile v)

iron compass
sinful gorge
quick echo
quick echo
iron compass
iron compass
sinful gorge
crystal forge
lucid lantern
#

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:

  1. Use 4 RenderPass for each shader and then enqueue them in the AddRenderPasses function
    Or
  2. Have just 1 RenderPass that will call all shaders in its execute overridden function?
mystic delta
#

@lucid lantern Don't spam, your question is quite visible. If you want it answered add more context or detail and have some patience.

lucid lantern
mystic delta
rocky nova
#

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 ?

terse vector
#

Is it possible to have 2 render features impacting the same layer but not each other?

rose cypress
#

Anyone know how I can mask out certain objects from a full screen render feature?

cloud night
#

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.

marble vigil
cloud night
crystal forge
#

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?

nocturne grove
#

Hey guy's .. how can i make the lens flare reflect on the objecte .. help me plz

polar cipher
nocturne grove
#

Hey man, can I talk to u DM? @polar cipher

nocturne grove
marble vigil
#

They are based on brightness, not on specific origin points like traditional lens flare renderers

nocturne grove
#

Do u have a photo or video that illustrates that?

full stump
#

for some reason unity is hard capped at 80 fps max

marble vigil
full stump
marble vigil
# full stump

I guess it's also possible that your GPU is overriding that with its own default syncing settings

full stump
#

Maybe it has to do with the max fps

marble vigil
#

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

full stump
brisk radish
#

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.

brisk radish
#

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.

marble vigil
marble vigil
sonic gulch
clear goblet
#

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.

full stump
hard talon
#

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

hard talon
#

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"..?

hard talon
#

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)

storm pebble
#

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

marble vigil
#

There's more steps than installing the package

storm pebble
#

okay, ill look up a conversion process

marble vigil
storm pebble
hard talon
#

is this ai generated??

#

i was talking about two urp renderers and assigning one to each camera, not two different render pipelines

cosmic marsh
#

Huh?

#

Oh crap, it responded to the wrong person.

#

Let me fix that.

cosmic marsh
# brisk radish If I'm making a mobile game, do you think I should use URP or Built-in Render Pi...

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.

hard talon
#

oh, no worries hahaha

#

i was super confused, it's all good

cosmic marsh
#

I'm almost insulted you thought that was an AI post :weeps:

#

Gotta fight for our humanity!

livid violet
livid violet
#

Hello all. Had some questions about SRP

potent lotus
#

is there any good quality free urp tree/nature/vegetation assets?'

iron compass
potent lotus
#

arent botd for hdrp

iron compass
#

Good and free doesn’t really compute when the it comes to assets

potent lotus
#

haha

iron compass
#

you can easily convert between hdrp and URP

potent lotus
#

i'v planned to buy in future, but rn i need to learn use unity

iron compass
potent lotus
#

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

potent lotus
oblique quest
heady jewel
little wharf
#

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.

little wharf
brisk radish
#

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.

marble vigil
twin sentinel
#

I need some good free asset packs for my VR game for unity 6
anyone have any recommendations?

twin sentinel
iron compass
twin sentinel
iron compass
twin sentinel
#

😭

iron compass
#

regardless, horror is in the story, not in the artwork

#

make it dark, use regular assets --> horror 😄

twin sentinel
#

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

iron compass
#

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

twin sentinel
#

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

iron compass
twin sentinel
iron compass
#

yeah, suppose thats an issue you'll always have unless you DIY everything, its the price you pay

twin sentinel
#

yeah and im a broke uni student so rip lol

hearty tundra
# brisk radish Is there a more performant way to make it so certain objects are always visible ...

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.

hearty tundra
#

@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 thinksmart