#archived-urp

1 messages · Page 16 of 1

placid pelican
#

I have fixed it now though, changed my URP rendering path to deferred and apparently all of the issues have been resolved. Thanks anyway.

ocean hinge
wraith totem
#

im looking for physical sky based assets for urp

sinful gorge
wraith totem
#

low end gpu

#

cant run hdrp

sinful gorge
#

Reduce resolution?
Many HDRIs are just a cube texture

wraith totem
#

no

#

it crashes

sinful gorge
#

That is another issue, check the crash logs

wraith totem
#

dx11 error

sinful gorge
#

That is not the error, that is the type of error

wraith totem
#

unity 6 works but 3 fps

sinful gorge
#

If it only is on your machine update unity and gpu drivers

sinful gorge
#

Propbably SSAO or HDR or something which is on by default

wraith totem
#

its empty scene at performance setting

sinful gorge
#

Same thing, run the profiler

#

Optimization can be tricky sometimes, especially for low hardware

#

And check where the issue is. In task manager check if the GPU or 1 CPU core is at 100%

cosmic marsh
# ocean hinge https://www.youtube.com/watch?v=y_vw-jzuNs0

Out of curiosity, does this imply games in the style of Kenshi, Manor Lords or your typical MMO would have to go deferred rendering to get around the light limits? I feel like so many games today feature hundreds of dynamic lights that most folks have to address this at some point. Alternatively does HDRP not have this limit? Perhaps other game engines do not? Just learning, and didn’t know if folks had some insight.

marble vigil
#

One additional workaround BiRP has is to swap to vertex shading for "unimportant" lights

#

HDRP segments the meshes at runtime in screen space, like URP's forward+ rendering path does, so their light limits are per screen tile

zealous wren
#

i have an image on my UI , it dosent look the same in build and play mode

#

the left one is the build photo and right one is the windows build

ocean hinge
gaunt garden
#

I'm getting a bit of a problem, once i import URP into my project, i do the convertion, my materials are not pink and are working fine, however my default material is pink and i've tried researching about this but i can't find a solution.
Is there any way to fix this problem?

sharp sun
#

Is there a way to render after temporal anti-aliasing? I have UI that needs to do this. Screen Space Overlay and UI Toolkit do the behaviour I want, but I cannot use the former as this is a splitscreen game and the latter doesn't have all the features we really would like.

ripe lava
#

so I don't like the baked lighting in urp, how do I make it real-time with the same look?

ripe lava
#

aww

upper viper
#

Hello, anyone knows how to convert a material of a GLB model to URP pipeline?

indigo dirge
#

Baking Lightning Missing Function:

Problem:
I want to bake URP Lightning and that also for a cave.
The cave gets completely enligted because everything is being affected.

Question:
Is there any method how to disable generate lightning map for certain areas like caves?

vivid dock
#

Hey there awesome people, it is normal to things works on one way on editor playmode and another on runtime webgl build ?

zinc oracle
upper viper
#

Hello, i switched the render pipeline to URP in my project now the point lights are overexposed and range value doesn't change anything. How can i fix this?

gaunt garden
#

I'm getting a bit of a problem, once i import URP into my project, i do the convertion, my materials are not pink and are working fine, however my default material is pink and i've tried researching about this but i can't find a solution.
Is there any way to fix this problem?

crude elk
#

Why is there 0 "saved by batching" in this scene?

#

also I feel like it should have more fps than that? Seems like not very high for a scene with practically nothing

small hinge
#

why is my decal all stretched out like that?

sour abyss
#

why in mobile my unlit transparent doesnt work (for leaves ) as it should.

#

its urp project

sinful gorge
sinful gorge
sinful gorge
sinful gorge
crude elk
sinful gorge
#

Pretty much all CPU performance things are faster in builds

gaunt garden
sinful gorge
gaunt garden
#

does that work?

covert sandal
#

How can I make these weird crisp edges go away? anti fast anti aliasing

#

im using fast approximate anti aliasing but it does not change it

sour abyss
sinful gorge
sour cradle
#

I'm using Unity 2022.3, URP. The car casts shadows, and the ground receives, where I can see under the car, it looks like no shadow is being applied to the ground. Any tips to improve that? This is using real time lighting and soft shadows. Particularly at the screen shot from 21 seconds in. There is a certain amount of environment sky box that shows up in the reflections on the ground. Perhaps that's it?

sour cradle
#

Hmmm... its not the skybox reflections. I turned those off, and set its starting color to black. I pin pointed it down to a light.

#

GOT IT! That one light didn't cast shadows.

gaunt garden
sinful gorge
#

The timing to fix any running issues

#

It's a preview, so not always fully stable atm

eternal yew
#

How do you make sprites who have transparent parts be affected by light without like getting all mixed up and weird looking

sinful gorge
eternal yew
wanton elm
#

what's the URP equivalent of UnityCustomRenderTexture.cginc ?

#

can't find anything in docs

wanton elm
#

urp docs are a mess with barely any information

nova bear
# covert sandal

That's specular aliasing not triangle rasterization aliasing, FXAA won't do much for you there. TAA can help hide it, but the only real solution is some kind of specular AA. Unfortunately only HDRP supports that right now. It would be possible to port the feature to the URP/Lit shader but it would require a reasonably in depth understanding of shader programming

blazing lichen
#

hey guy is there a way to enable/disable post processing here at runtime ?

violet bison
blazing lichen
violet bison
#

even when not used huh?

violet bison
blazing lichen
warm ember
#

hi i'm using the URP high fidelity pipeline and wanted to use a spotlight but i noticed it wasn't working. I didn't tweak any lighting settings so unsure why it isn't doing anything?

#

nvm found out. Intensity and range had to be around 50 and 100

#

dunno why those aren't default values dough

quick echo
#

I'm using the LWRP which is a URP asset so I think this is an alright place to post this. Does anyone know why this takes so much time? I'm deep profiling and this pops up as a lot of assets/areas are loaded

cyan talon
#

As you can see in that stack trace, you are using URP

quick echo
#

ah dope so this was the right place to ask then

quick echo
median bay
#

Hello guys, i have this problem in URP,
I have a world space canvas that is the screen of a monitor in the game, and it get's affected by the Volume Post Processing, and i dont want that. There are a few solutions (like add a new camera and render the canvas in the new camera, but this make +1 on the camera counts and its a bad idea..... ) I was expecting a layer select so that the volume will not affect that layer and cannot find something like this

haughty garnet
#

but otherwise I doubt a second camera is an issue as long as you only render the UI

warm ember
ocean hinge
# ebon karma Realtime lighting limit?

This video deals with the common problem of flickering or invisible lights in Unity.
If you also have the problem that your Unity lights flicker or become invisible depending on the viewing angle, this is the video for you.

Fixing the problem of flickering or invisible lights in a few seconds with a few mouse clicks

If you are interested in g...

▶ Play video
ruby marsh
#

hey, does anyone know why light cookies don't work in the URP project? I have a cookie image, 512x512, black border, correct settings and the light doesn't react to it in any way - it's still as flat as it was before...

dry willow
ruby marsh
#

oh my god, I had the wrong URP settings enabled and they had cookies disabled

#

thank you!

vapid pumice
#

it does if i scale it down a lot and if i look at particular angle

ocean hinge
#

Do you have several realtime lights in your scene?

ocean hinge
vapid pumice
#

i js tested out doesnt render lighting in game

vapid pumice
ocean hinge
vapid pumice
dry quarry
#

why my visual is like this?

next lynx
#

isnt that just an object in front of your camera

marble vigil
# dry quarry why my visual is like this?

Near clipping plane of your scene viewport is too close
With dynamic clipping enabled as per default you can readjust it by focusing on an object by hitting F in scene view or by double clicking an object in the hierarchy

#

That issue occurs when you focus on a huge object and then move camera very close to another object, so the clipping planes are still adjusted for the huge object's bounds

dry quarry
vapid pumice
#

is there any way i could do per vertex lighting for a particular light source?

#

or how can i reduce per pixel lighting resoultion in urp?

copper pilot
#

Use a vertex lit shader

errant cloud
#

Anyone know where to disable all Raytracing stuff in URP?
I have a "RayTracingAccelerationStructureManager" in "PostLateUpdate.UpdateAllRenderers" that's taking 2.5ms every frame for some reason.

nova bear
errant cloud
#

Nope, only URP. Which is why I'm kinda confused to have this thing in my profiler.

nova bear
#

it's basically either HDRP or the lightmapper that could call it

forest yoke
#

Hi, does anyone know how to deal with URP warnings/errors on the dedicated server build? Everything is working fine but I get a huge error trace on server start

twin jay
#

I set the URP a Rendering as Forwad but the Overlay option in the camera still disabled, why is that?

#

I mean what could interfere with the option in the camera 🤔
Unity 2022.3.30
I try

  • Forward and Forward++ and even Deferred.
  • Set environment as Unitilized
  • Removing the Post Process from the main camera and on the Overlay camera.
twin jay
#

¯_(ツ)_/¯

thorn rampart
#

getting this error with cyanlux sg custom lighting, any ideas on how to fix?

light garnet
#

does anybody have any suggestions for lighting explosions in urp? I'm using VFX graph for the actual effect, is there a more efficient way than just putting a point light on it?

dry willow
bronze briar
#

How do you make transparency work in a shader graph for UI

dry willow
bronze briar
#

Oh, I'm on 2022.3

#

Should probably upgrade

haughty garnet
#

Also, I don't really understand the sprite packer/atlas tool. You can't seem to edit those packed in there like you can do with the sprite editor or maybe im missing something about it. I feel like you should be able to use that THEN use the sprite editor to configure sprites.

#

So, it's like I've been just using a bunch of old (non-unity) sprite tools to combine my sheets to throw into the sprite editor /shrug

thorn rampart
#

Target is also urp, although the fork is urp v12

#

But the urp v12 branch of the custom lighting has alot more errors so im using the v8 branch

soft lion
haughty garnet
#

My guess is the pivot is just too far below the camera frustum bounds

soft lion
# haughty garnet I'm actually not too sure why it's being fully culled. It's an opaque shader wit...

Ah yeah, sorry, misunderstood what you meant. Modifying vertices on vertex shader does not change the bounding box so the object will be culled as if the vertices were unmodified. If the billboarding effect on the shader is necessary, you can set your own bounding box with Renderer.localBounds by increasing the bounds so that the object is not culled when it shouldn't. You can either calculate the correct value with some math (smallest box necessary to cull correctly on all cases) or just increase it to some value that's for sure large enough (like take the largest component of the bounds extends and use that for all the axes multiplied by some arbitrary value). Note that if you have a ton of those sprites, the latter might be bit slower. Rendering few sprites out of the frustum isn't very expensive though as the rasterizer culls the pixels outside of the frustum independently and regardless of the CPU side frustum culler

haughty garnet
vagrant knoll
#

what does XR stand for here?

normal orbit
#

i'm still on urp 10 appSW which works minus vfx graph and UI text

clear oracle
#

Hi, having an issue with URP. I must've touched somehting, but I don't know how. The idea is that by default, GOs use a material (transparent), but if hovered, the Layer changes, so the pipeline overrides the material for another one. Now, the layer changes, but the material stays the same, and don't know why. Can someone help?

#

Layer changes, material does not

marble vigil
clear oracle
#

If it helps, here's the code changing the layer

marble vigil
#

Important thing to note is that Render Objects doesn't change how an object is rendered, it renders it another time

clear oracle
marble vigil
#

It sounds like you might want to change the material in your script instead, rather than the layer and rather than using Render Objects

clear oracle
#

I was felling the same thing, but I'm trying to learn something new. Worked before, but I must've changed something. Trying to debug this particular issue, in case it happens again

#

Really feels like something here is misconfigged

marble vigil
clear oracle
#

By process of elimination: if the layer changes, code is fine. Materials applied manually look ok, so the rendering doesn't seem the issue. The override seems at fault

#

So you'd add Hover to Filtering > Transparent Layer Mask, assuming the shader is transparent
It is transparent. But I added a transparent rule/filter

clear oracle
#

Can't find a solution. Forced the material change by code for now 😦

#

Not clean in any way, but it'll do

balmy forge
#

Hello 👋

I'm updating from 2021.3.37f1 to 2022.3.30f1. Now I get a mysterious crash on Android, in CoreUtils.cs

managed backtrace:
      #00 (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
      #01 System.Reflection.Assembly:GetTypes () <0x5b>
      #02 UnityEngine.Rendering.CoreUtils/<>c:<GetAllAssemblyTypes>b__87_0 (System.Reflection.Assembly) <.\Library\PackageCache\com.unity.render-pipelines.core@14.0.11\Runtime\Utilities\CoreUtils.cs:1174>
      #03 System.Linq.Enumerable/SelectManySingleSelectorIterator`2<TSource_REF, TResult_REF>:MoveNext () <0x25f>
      #04 System.Linq.Enumerable/WhereEnumerableIterator`1<TSource_REF>:ToArray () <0x2cf>
      #05 System.Linq.Enumerable:ToArray<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>) <0x1ab>
      #06 UnityEngine.Rendering.VolumeManager:ReloadBaseTypes () <.\Library\PackageCache\com.unity.render-pipelines.core@14.0.11\Runtime\Volume\VolumeManager.cs:206>

I can see that URP core has updated as part of a dependency (and it doesn't look like I can downgrade): "com.unity.render-pipelines.core": "14.0.11" (from "12.1.14"). And strangely enough that method was there before, nothing seems to have changed 🤔 maybe the call is new? (I could not find a public repo to double check, lemeknow!). So, is there some new weirdness I should expect from usages of System.Reflection.Assembly ? I'm building with Mono and .Net Standard 2.1. The SDK/JDK are the built-in ones.

Thanks in advance 🙏

raven cape
#

How can I get the current view direction without knowing the position it's pointing to?

#

I've only got the camera position so I guess it's the other way around

#

not sure tho

haughty garnet
raven cape
#

Very dumb of me not to clarify that when asking, that was a urp shader question

#

Thank you tho

haughty garnet
#

Ah, there's a camera nodein the shader graph

#

otherwise some macro in HLSL if you're doing it that way

raven cape
#

I've only found ones that require the point it's looking at

haughty garnet
raven cape
#

Ok, thank you

glacial dune
#

Could find almost no info on the topic so will ask -
How do I make enemy with URP Light2D sight area(spot light, but I can change it I if needed) trigger fpr anything that is inside the light?
Note that I use ShadowCaster2Ds in my scene so I need to somehow update my polygon collider 2d to match the Light2D shape, but I coudn't figure out how

marble vigil
glacial dune
marble vigil
#

I'd check if the target objects are in light's range with an Overlap method, raycast from the light's origin to multiple points in the target's volume, and compare the angle of the raycasts to the light's forward vector against the light angle to know if the raycast is in the cone

marble vigil
#

Beats having to generate a polygon collider at runtime in my opinion though, if you're not into that kind of stuff

glacial dune
marble vigil
#

As C# scripts can't know what the GPU is precisely doing

charred brook
#

I want to disable this grey fog so that the flat polygons (which you can see when I zoom in) are ALWAYS visible and not fogged out to flat grey. Where is the setting for this?

#

Ok I found RenderSettings.fog = false; you can call from any script and this disables it, but what about in the Editor view?

dry willow
charred brook
dry willow
#

menu at the top, under Window -> Rendering iirc

charred brook
balmy forge
#

Very dumb of me not to clarify that when

sage bluff
#

Is anyone facing memory leak and light flickering issue in unity 2022.3.30 version?(mobile build)

ocean hinge
# sage bluff Is anyone facing memory leak and light flickering issue in unity 2022.3.30 versi...

light flickers may be fixed by this:
https://www.youtube.com/watch?v=y_vw-jzuNs0

This video deals with the common problem of flickering or invisible lights in Unity.
If you also have the problem that your Unity lights flicker or become invisible depending on the viewing angle, this is the video for you.

Fixing the problem of flickering or invisible lights in a few seconds with a few mouse clicks

If you are interested in g...

▶ Play video
sage bluff
glossy tiger
#

Is it usual for the renderer to be this intensive in the editor? (This is while moving the camera)
Is there a way to see what objects are causing so much strain or a graphics setting for the editor that could help?

~100 objects with a Medium poly count
~6500 objects with a low poly count (squares + rectangles made with ProBuilder)

System Details:
CPU: 11th Gen Intel(R) Core(TM) i9-11900KF
RAM: 32 gigs DDR4
Graphics: Nvidia 3070```
marble vigil
marble vigil
#

If you want to optimize a scene it matters more how many objects are being rendered at a time (and with what polycount / LOD level) than how many exist in the scene total

sage bluff
marble vigil
#

There are many causes for both memory leaks and light flickers

sage bluff
civic yarrow
#

how do i make png textures not be so blury and parts of them transparent
im making a voxel game similar to minecraft and im using blockbench to design the character and other models
and the transparent parts of the model are black for some reason as well as the whole model being blury

marble vigil
rustic flicker
#

hi, i don't know if this is the right place to ask but i think its related to URP. im trying to make an isometric POV for my game. Following a tutorial, i've set the main camera projection to orthographic and fixed the rotation values to my liking.But when i walk behind a wall, the walls glitch and become invisible. how could i fix this?

wide kestrel
#

anyone have any experience with render features on quest 2 native builds? I'm running into a weird double vision bug that only crops up when we build to the device, and objects with the layer in question get doubled up in the left eye. kind of feels like drunk vision. This doesn't happen in a windows build or in the editor. we are trying to have a collection of props standout from the film noir post processing we applied to a scene. here's a screen snip of the render feature

jolly quail
#

change it to other technique

sage bluff
#

Does anyone know about Malloc (Persistent) in memory Profiler?

fervent rock
#

Anyone using Kawase Blur with URP? I followed a tutorial but mine ends up like this with darker shade blur. I want it to become neutral color like glass. Anyone had this issue?

tawdry grotto
sharp saddle
#

How can i enable shadows on a Transparent material in URP/lit?

#

Or fade out an object

ocean hinge
# tawdry grotto Why am I getting this flickering light? I'm using Forward+ and only have around ...

This video deals with the common problem of flickering or invisible lights in Unity.
If you also have the problem that your Unity lights flicker or become invisible depending on the viewing angle, this is the video for you.

Fixing the problem of flickering or invisible lights in a few seconds with a few mouse clicks

If you are interested in g...

▶ Play video
signal fractal
#

Hey, what's more performant (for pooled Bullet Holes)?

  • Prefabs with the default URP Decal
  • Prefabs with a 2d Plane with a bullet hole material (GPU Instanced of course)
    Any help would be great
strong aspen
#

2D plane, but is a tradeoff of performance and quality

#

if you have the decals dissapear after a while there shouldnt be a problem

nimble mirage
#

Has anyone noticed a decrease in performance when trying to use GPU resident drawer and GPU occlusion culling in Unity 6 URP?

#

I'm seeing like 30-40% worse FPS when trying to use these features.

spring depot
#

Is there a way in Shadergraph to set a Lit shader to ignore lighting for specific parts of it?
I want a pure black that ignores light sources on the visible backfaces shown here

#

Black emmision doesn't seem to work to 'ignore' light

#

I want to remove all visible light from these backfaces

dry willow
spring depot
#

To avoid xy question problems, what I am ACTUALLY trying to achieve is to slice away the entire world to be able to see characters inside of rooms and behind walls type stuff

#

ala like old sims, except capped off in black

#

maybe its black enough, because immediately there's a further problem that this method culls shadows so I can't even go ahead with this 🤔

#

good enough for now I guess UnityChanThink

marble vigil
#

I don't see any obvious cause for the nonblack color
It might help to branch Metallic to 1 for the dark parts as well

#

I'd personally use a float of 0 rather than a HDR color field for the black just to have visual confirmation that it really is 0

spring depot
#

Ill look into that double mesh shadow caster next like you and the above suggested

marble vigil
# spring depot Ill look into that double mesh shadow caster next like you and the above suggest...

It can be a bit cumbersome to have so many meshes and keep them together, even if you could do the normals calculations directly from import settings, though I think it's beneficial in the long run if you at all have light leaks or other bias weirdness with sharp geometry
I think it's alternatively possible to specify a different shader to use for shadow casting passes but I don't know how that's done

wide kestrel
jolly quail
wide kestrel
jolly quail
void comet
#

I'm playing around with Unity 6 (using URP), and have noticed that each identical sprite has its own drawcall. We're talking literally same sprite, material, color, etc... with solely a different position. I tried the same thing in Unity 2022 LTS which has the expected behaviour: there they get properly batched into the same drawcall.

Is this simply a regression in version 6 (yes I know, not LTS, blah blah), or did they move some settings somewhere? I've been looking around but can't find any

sinful gorge
#

If it is not something correct, you can file a bug report

merry radish
#

Hello. I'm trying to recreate the "pixelization effect" in a 3D scene.
I'm rendering the camera view to a lower resolution render texture and scaling that up.
But I'm struggling with solving the edge flickering problem that every object has when moved (or when the camera moves)
I've tried snapping the camera to a grid(with different values), but I had not luck there.
Is there any other say to fix the issue?
Or could this be a problem related to a wrong RT resolution/ortho size/snap value?
Thanks in advance for any suggestions!

marble vigil
merry radish
marble vigil
#

Different parts of the geometry may be snapping to pixels at different intervals so it may look like flicker

marble vigil
untold wyvern
#

guys we can't import URP shader graph on a normal 3D Core project right ?

#

or can we ?

marble vigil
#

But not every node will work

merry radish
untold wyvern
marble vigil
marble vigil
merry radish
marble vigil
#

The RT texture dimensions must match whatever the user's display size is in that case however, unless you want stretchy pixels

merry radish
marble vigil
#

That's not what causes the "flicker" you see anyhow
I don't see any flicker, just how I expect pixel colors to shift when something pixelated moves smoothly

merry radish
#

As far as calculating what distance in the scene a single pixel on the RT represents

marble vigil
merry radish
#

I'll give that a try and see what comes out

#

I could then smooth out the movement by offsetting the image itself if that makes sense

marble vigil
#

If this kind of math seems hard, I usually first simplify it with 1:1 aspect ratios and very small resolutions

marble vigil
#

Perhaps you really want just some type of (hardware) antialiasing

#

It would also show you what kind of movement is really happening behind the pixels

merry radish
marble vigil
#

You have multiple cameras so you can specify different renderers to them and so different hardware AA

merry radish
#

Sounds interesting tho

marble vigil
#

I recommend you try out all the options for both cameras, but note the two different categories of AA
PP AA does not really know when your geometry is between pixels, it can only guess and approximate
Hardware AA does know, but is more expensive

#

Increased render scale is also a type of hardware AA

merry radish
marble vigil
haughty garnet
#

Besides resolution scale, are there any other settings that help with 2D images / sprites in a 3D setting that I should be aware of?

#

or ways I can obtain that pixel perfect quality

#

I mean cranking up render scale to the max (2) it seems pretty perfect, but not sure if that's the way I should go about it

marble vigil
#

It means a specific thing

haughty garnet
#

Ah, alright. The render scale stuff does seem to work pretty well then

marble vigil
#

For quality in general cranking up the render scale a whole lot is probably your simplest option, but inefficient

haughty garnet
#

yeah it's unfortunate but I've nothing too complex in my scene if that matters

marble vigil
haughty garnet
#

Ah, pretty neat. Maybe ill look into something like that on my next project

marble vigil
#

I guess you can also superscale your sprites and enable bilinear (or trilinear) filtering for the same effect

haughty garnet
#

need to figure out how to make this billboard shader into shader graph first cause hlsl is just a pain to work with when I want to make this large master sprite shader

haughty garnet
#

maybe ill play around with it a bit.

marble vigil
bronze briar
#

Is there any reason to not use GPU instancing on every material?

#

Besides on meshes with less than 256 vertices

haughty garnet
marble vigil
bronze briar
#

I see

#

I keep seeing tutorials suggesting you turn on GPU instancing to reduce draw calls

#

But maybe SRP batching wasn’t on by default yet?

haughty garnet
#

It may be off, so check your rendering asset. I forget if you have to turn on debug or right click on the asset to expose it.

#

also, you can mark your gameobjects as static if you don't expect them to move, but that too also breaks instancing. So, use it in conjuction with SRP batching

marble vigil
marble vigil
haughty garnet
#

But yeah, that side effect may be a bigger problem if you do have a lot of static batched objects.

#

GPU instancing as well is hard to gauge as the profile tools aren't enough, but I think Unity 6 does offer some more to GPU profiling so I'll want to check that out.

blazing gull
#

i was testing this with debris meshes

#

instancing was performing better than the batcher

normal orbit
#

when flattening a 3D texture into a 2D texture, is there a way to get interpolation between discrete pixels in the W dimension?

soft lion
# blazing gull GPU instancing definitely wins when you are spamming hundreds or thousands of co...

From what I understand, the GPU instancing implementation is somewhat slow on CPU because the data from different game objects needs to collected and combined into buffers before the rendering command can be sent to the GPU. I highly doubt Unity can handle hundreds of thousands of individual game objects with GPU instancing either. When people talk about GPU instanced grass or something similar, it's usually done by manually calling Graphics.RenderMeshIndirect or similar method which would make it possible to actually draw hundreds of thousands of copies. SRP batcher is generally faster than Unity's GPU instancer (the checkbox on material) though there will obviously be cases where it's the other way around

dusty sequoia
#

Does anyone know how to force Unity to wait/block until all rendering commands are complete? Texture2D::ReadPixels will do this, but I would like to do this outside of a texture readback. It looks like WaitForEndOfFrame is also not great cause I would like to execute this code in either a CLI script or as part of editor UI

pure kelp
#

Trying to paint holes in terrain and was met with this

Looked into Quality settings saw no issues and tried different qualities with no help*, I am on URP, Unity 2022.3.31

pure kelp
regal torrent
#

Is there no way to get a post-processing volume to affect UI when it is set to Screen Space - Overlay? I really would prefer not to change it

light garnet
#

have been debating whether or not I just make a world space canvas and glue it to the camera

regal torrent
light garnet
#

yeah it was too much of a hassle for me to spend time immediately fixing it

light garnet
regal torrent
light garnet
#

yeah I'm too dumb to touch too much of that right now lol

#

but we'll see

#

is there a better practice for adding light to explosions, etc instead of just putting a point light on the transform and changing emission? I'm working with big airstrikes and stuff like that so need to do a lot of real-time lighting all at once

lost basalt
#

performance and quality-wise if you have forward+ enabled in your urp settings you should be good

#

keep in mind forward+ is a bit more expensive on standalone VR (quest 2 and 3) at least in my experience, not sure if u plan on releasing it on there

light garnet
#

I'm not sure myself

#

I'm using VFXgraph for my explosions, though

lost basalt
#

oh

light garnet
#

I'm not sure if they have lighting in their particles

#

tbh I'm not even sure if VFX is the correct usecase for explosions

lost basalt
#

yeah I'm not sure if those can have lights attached somehow

#

vfx graph is good for whatever idea you have, just keep in mind that it's not enough if 1 vfx has good performance, test it with the worst-case scenario

light garnet
#

yeah I'll do some benchmarking, there's quite a lot going on in the scene - ideally I should have 1 master vfx/particle system doing my effects, but I'm not smart enough to fiddle with multiple emission sources just yet haha

haughty garnet
#

vfx graph surpasses particle system very quickly if you only need limited communication/population of the gpu buffers

#

of course it's not always device/platform compatible which is really its greatest downside

#

so any type of oneshot effects that include thousands of particles is perfect for it

#

or ambient particles like leaves/rain where a lot of it is predefined, or randomly positioned gpu side

iron compass
light garnet
#

so I could have like 100 vfx gameobjects

#

and that's supposed to be a vallid usecase for it

#

I'm only really doing five particles per vfx object too

lost basalt
iron compass
#

Naturally you need to consider the overhead of the GO that holds the vfx

lost basalt
#

its like magic but with a price

iron compass
#

it’s just terribly annoying to make a vfx that is not a simple local instance

light garnet
#

yeah, Mao linked me to a github page for advanced usecases which seemed to have a solution for it, but I'm not that well versed in the topic to tackle it just yet lol

iron compass
#

Use it in simple ways before doing advanced stuff

light garnet
#

rn my vfx use cases are rendering a lot of missiles flying around = a lot of smoke + explosions

#

so far it runs okay but it's about like 60% of my expectations in terms of visuals

iron compass
#

it all depends on what the fx is

#

Usually the boundary for your fx is determined by what gameplay interaction you need

light garnet
#

by boundary do you mean like the expected parameters/limits for each fx - like a design question or are you talking the actual physical bounds of the vfxgraph

iron compass
#

mind also that vfx have no culling of particles inside their bounds

light garnet
#

right so it's the latter

#

yeah, my smoke effects have very large boundaries, like 10k

iron compass
#

so if you make a large system it will always render all parties, even those outside the camera’s view

light garnet
#

for reference I'm doing a flight sim, so the distances are very large, something like this

iron compass
#

distance doesn’t matter

light garnet
#

but doesn't the bounds correspond to the distance at which you need to see the particles?>

iron compass
#

you need to make sure the 10km away particles are actually visible

#

No point in drawing stuff that can’t be seen with the same fidelity as close up stuff

#

a faraway missile might render as a simple trail while a close up one gets a cloudy appearance

light garnet
#

oh true

#

that's a good idea

#

well that's something for me to chew on, I think I got some learning points out of this

#

even though I still don't know what's best to light vfx explosions with haha

stable island
#

Hi can I have a camera rendering to a render texture use a different Renderer? Currently it only shows the current & default Renderer in the dropdown on the camera - I can not see the others I have

dry willow
dry willow
#

The one assigned under Project Settings -> Graphics. Might also have multiple per quality setting

stable island
#

I see what you mean but if that renderer draws to a render texture, what happens with the asset quality settings like MSAA setting etc. I don't know why some settings are shared across renderers

#

thats all kind of weird that way - the camera rendering to a render textures renders UI also it seems

#

ah that is a post process screw up as had one on it

dry willow
stable island
dry willow
#

If post processing is enabled on the camera and it's volume layer mask is set sure.

stable island
#

both the renderer and the volumes can have post processing assets - should you use the volume only to selectively apply them?

#

doh ok so you add post process features required to asset and then apply them in a volume...

gaunt pawn
#

Hello Everyone! which shader in the urp support alpha textures ? Help me please

marble vigil
#

My crystal ball says you want to be told to enable transparency (or alpha clipping for opaque) in your URP shaders to enable alpha channel to be utilized for transparency
And that 80% of the time you'll be using URP Lit and Unlit as well as URP Particle Lit and Unlit shaders

gaunt pawn
#

you and your cristal are right so help me fix this

marble vigil
gaunt pawn
#

I did it but no result

marble vigil
#

It's most likely missing it to begin with, but if you're sure it has alpha and can verify it by opening it in an image editor, then the problem might be that the texture format has changed to RGB from RGBA

gaunt pawn
#

Thank you @marble vigil I add the alpha on it and it work

#

Tell me ; is there a way to separate all the textures channels ?

marble vigil
gaunt pawn
#

Sure I want it for my scene optimization ; it cost less in ressources

haughty garnet
# iron compass It is designed for many individually spawned vfx systems not for one big instanc...

The use case for vfx graphs are both, multiple instance or having larger central systems which are driven by event calls (as seen in their demos). The overall problem with these master systems though is like you said with the culling. If that's not handled correctly you could be spawning stuff outside of the camera, so there needs to be some extra consideration or camera positional logic placed into these graphs.

#

In general, there's a lot of extra optimizations you can make to your graphs which aren't presented to you right out of the box.

#

Rather, requiring some more scripting logic from you to really get the most out of them.

#

It really comes down to if you want to object pool the systems or not.

final parcel
#

using URP unlit particle shader, and the system is invisible if there is a mesh behind it. how can i fix this?

haughty garnet
final parcel
#

i can't get any sorting to do anything. But, i just discovered this (video was meant for someone on my team)

haughty garnet
#

how I would solve this is to actually displace the sorting pivot out a bit (actually this idea would only work if they both are transparent or if both only compare by sorting axis)

#

meaning, displace the actual particle, but continue sorting by the depth

#

depth texture stuff sounds like an idea too, but I've not much experience besides doing some full screen outline stuff

#

changing the pixel depth is probably the right way about it

#

or, dynamically change the sorting via script depending where the camera is, but that may be more of a pain

haughty garnet
#

im here thinking you want it to illuminate on the side

#

Are you sure both your objects aren't transparent

final parcel
#

the particle system is transparent. All the materials on the blimp are opaque

haughty garnet
#

something isn't sorting by depth here between the two shaders

#

or writing for that matter

#

Blimp should write to depth and depth sorting as Less Equal then

#

The transparent shouldn't sort or write

marble vigil
haughty garnet
#

Im curious how games sort these particle quads in older games because I remember them usually popping out on the sides

final parcel
signal fractal
#

Hey, I need the Built-In render pipeline projector component in URP. I tried using the decal renderer feature, but it doesn't work, I'm trying to make a flashlight that doesn't use actual lights.

rustic flicker
#

Hi, trying to use the Flooded Grounds asset but everything is pink when i imported it and switched to the scene. i did convert materials (window>rendering>render pipeline converter), a bunch of stuff was fixed but there is still lots of assets that are pink. any help?

#

(idk if this helps but from a distance everything is normal but the closer i get the more assets become pink)

signal fractal
rustic flicker
signal fractal
rustic flicker
#

ive tried with hdrp also, its the same thing

#

so it must be compatible with built-in right?

signal fractal
unique phoenix
#

For the life of me, I cant find a normal base outline shader that works on the Oculus Quest (Meta) and am using URP for my game. Does anyone have any suggestions?

verbal stream
#

Hi guys, i'm asking so that maybe someone can help me fix this thing. I just ripped off a shader from a Scriptable Render Feature tutorial that pixelizes every frame to simulate the "A Short Hike" visuals. The thing is that when I add the renderer feature to the URP renderer, I get a NullPointer on the first Blit call that I make in the Render pass. I can send some pics with the code if it is needed.

#

I know ripping off assets/shaders/scripts is not ideal for learning, but I'm not very experienced with HLSL and Unity in general and I just want to experiment a bit.

soft lion
# signal fractal Hey, I **need** the Built-In render pipeline projector component in URP. I tried...

Because you can't figure out how to make something work, you shouldn't change to workaround that literally doesn't exist, there's no projector feature in URP besides decals. Period. How about trying to fix whatever problem you faced with the decal system instead, we can likely help you with that. As far as I know, the projector component in built-in render pipeline was terrible system anyways that caused a lot of extra draw calls (basically anything the projector hits needed to be rendered again for the projector) and wouldn't likely have improved your performance at all if that's what you are trying to do. Could you clarify why you want to fake the flashlight instead of using an actual light source?

signal fractal
soft lion
#

I assume you also tried to play around with the light range, I think it can have drastic impact on performance? In any case, real time lighting is tough task for mobile devices to handle and faking it might be required. I think you should try the decal system but I think even that can have significant enough performance impact depending on the render technique

signal fractal
# soft lion I assume you also tried to play around with the light range, I think it can have...

My idea was to use a real-time light for the player and fake it for long distances and other players. I do know a game that has managed to pull something like this off, it's called Tactical Assault VR and every gun has working flashlights and they are synced - as far as I remember. So it must be possible. I tried using the default URP decal, but my results were all ugly and unrealistic. I tried using a different decal system and the same thing happened. I tried using various shaders on a 2d plane, but had no success.

#

Lights are incredible crucial for my game and I need them for every player

soft lion
signal fractal
soft lion
signal fractal
soft lion
#

I'd try combination of decal and that

#

Affect Emission property atleast seems promising

signal fractal
#

Is there any way I can make a shader that just illuminates objects in a cone. I don't need shadows or anything like that, it just needs to mimic how a flashlight would act and preferably have a falloff and cookie

signal fractal
soft lion
soft lion
signal fractal
soft lion
signal fractal
soft lion
#

Something I haven't heard of, how would that work?

signal fractal
soft lion
sudden siren
#

Does anyone know any way to add a layermask to the decals in 2021.3? I just want the decal to show up on the ground but not on the enemy like it is in this screenshot. I know they added layers in the 2022 release, but that release breaks my project in multiple different ways.

haughty garnet
#

and enable them on the render asset in the lighting section

sudden siren
#

nvm i found it, but i still dont see how to layer the decals

sudden siren
haughty garnet
#

Seems like you could just use the normal layers

sudden siren
haughty garnet
#

IgnoreDecals should be the layer your player is on if you want the decals to ignore them

#

You're basically taking control of when that layer should render

#

I assume by rendering your opaque character after rendering all other opaques (when the decal renders), it probably skips that decal being rendered on them

sudden siren
#

if you meant that i should put the decal layer on the model shown on in the first screenshot, it just made the model transparent

haughty garnet
#

IgnoreDecal is the layer your player should be on. Decal layer should be on another layer that is rendered apart of IgnoreDecal

#

Your player should be opaque so you must have touched something else if it became transparent

sudden siren
#

for context the model in the image is an enemy, not the player. I tried putting the player layer in place of the ignore decals layer but its still not working correctly. It kind of works with the previous screenshot, i just can figure out how to make it so the enemy isnt transparent.

#

(enemy layer is in place of the decal layer)

haughty garnet
#

Are you sure you're not using any transparent materials? Flipping layers shouldnt make your guys alpha blend at all

sudden siren
#

the material is set to opaque

haughty garnet
#

It's not like a skin renderer where it has some transparent stuff?

sudden siren
#

no, its just one material using the default lit shader

haughty garnet
#

I'm confused then unless there's some dithering going on, but to me it does look like there's blending going on. IMO, take out a plane and two cubes and test out the decals with that.

#

get it to work on primitives before touching these materials

sudden siren
#

figured it out actually, instead of BeforeRenderingTransparents i used AfterRenderingPrePasses

#

thanks for all the help, i would have never thought of doing all this lol

haughty garnet
#

Huh, I'm still kinda curious why it's faded in like that. Anyway, that's usually what I tend to do too with those render objects. Just mess around with them until something works.

#

Ideally, use the plane and primitive idea if you do want to use these features in the future as it helps with clarity

sudden siren
#

will do

sudden siren
dim prairie
#

hello guys, any idea why my shadows look like this using URP?

marble vigil
cinder kindle
#

Hi, we've made a forest environment in URP for VR, where we use the Simple Lit shader with alpha clipping for the branches. However we're getting a lot of aliasing on the Quest. Anyone got any thoughts on ways to alleviate this? I can grab a video as well

gilded token
#

hi, some of the grass in the distance is blue but if i move closer to them, they turn back to normal. any idea how can i fix this?

bronze briar
#

I imported a HDR skybox, but it seems like the sun affects the environment lighting way too strongly, and with the default bloom, it looks like it's exploding

#

Am I using it wrong? Would it be better to use something that's not HDR?

cinder kindle
nova bear
cinder kindle
#

Ah great thank you!!

weary peak
marble vigil
#

Since it's a rendering related bug you could try to rule out post processing, renderer features and the whole current quality level

nova bear
forest rapids
#

can anyone know what's causing this problem in the video

marble vigil
forest rapids
#

thank you so much

shrewd perch
shrewd perch
swift verge
#

Any idea how to create an additional binding for the main shadow map with ShadowSamplingMode.RawDepth instead of ShadowSamplingMode.CompareDepths?
I need this because on WebGL, trying to access the main shadow map with a non-comparison sampler results in an error.

#

Ideally, I can do this without creating a copy of the texture data itself: that's a pretty large memory overhead to store completely redundant data.

The other option would be to create a custom render pass with a light mode that specifies that shadow depth should be sampled, but that breaks compatibility with regular transparent shaders (due to sorting issues).

dim prairie
marble vigil
#

If they do, you know it's likely concerning your ground and character shaders or renderer components
If they don't, it's an issue with quality levels, renderer assets or project as a whole

dim prairie
#

One thing is that im using a lit shader graph, but on a sprite renderer

marble vigil
haughty garnet
#

I think I've done this before, but using legacy text because I couldn't bother digging through tmp's shader code

#

was for some world-space combat text using built-in pipeline

velvet kestrel
#

someone please help me figure this out, i have been trying to find some help for weeks and nobody knows how to fix it.

grizzled crag
copper pilot
marble vigil
velvet kestrel
#

when im in game, it doesnt work even with lighting enabled.

marble vigil
#

This will pinpoint if the issue is with meshes or materials

velvet kestrel
#

AIGHT

#

ty

velvet kestrel
marble vigil
#

Normal maps must be marked as "normal map" in the import settings, and must contain valid normal data

austere hemlock
#

Hello. I was wondering what maximum texture size you would recommend for meta quest 3 game. I want my graphics to look sharp as possible. Do you think 4k textures are too over the top?

marble vigil
dusty gate
#

I am importing pixel art into unity URP but it still is compressed.
I have changed the filter mode to point no filter, and turned off compression

velvet kestrel
swift trout
#

click on the normal map in project window (where you see assets), import settings will be in the inspector (where you would normall have transform, scripts etc.)

velvet kestrel
#

this is my post processing settings

shut bough
#

Ya'll I got the purple problem >_< I imported the asset from unity asset store and both my project and it are URP I'v reimported it a few times but to no avail any suggestions?

shut bough
sudden siren
#

really annoying considering it looked fine in the editor

#

is there any third party decal system on the asset store that someone can vouch for, i dont think theres any way i can get around this

haughty garnet
#

there's a chance that in quality(?) settings it's using another render asset

haughty garnet
#

there's two places I should say. One, being in the typical render slot in the settings, but if you look around you'll see platform specific settings for each profile

sudden siren
#

the issue doesnt occur on my lower quality level but does on my high quality level

#

both levels are set to the correct asset

pseudo jacinth
#

I'm looking to do posterized hue shifted lighting like this, in what way can I do so?

marble vigil
pseudo jacinth
marble vigil
pseudo jacinth
#

Very nice, thx hollowparty

stable matrix
#

How to make alpha clipping work on lit opaque material?

#

and why does other materials work????????????

#

Ahhhhhhhhhhhh I seeeeeeeeeeeeeeeeeee

#

I made Specular Map Source to Specular Alpha and it worked

#

Thanks everyone

nimble mirage
#

Anyone know how to implement an outline render feature using render layers in the latest URP? The API update deprecated basically everything and I'm not sure where to start with porting.

chrome stone
#

so while building my game with urp, in unity it looks fine, but in oculus, it looks pink
like urp didn't load
i put it as standard before building, and it worked fine

stable island
#

I still do not know what the undocumented "Fetch Color Buffer" is on a FullScreenPassRendererFeature (nice name!) though...

#

Ah see code - "Specifies whether the assigned material will need to use the current screen contents as an input texture"

cunning kelp
#

Hello, someone have a Optimizer of texture for my project in URP (VR). I need a make atlas for optimize my static assets and i try with "Mesh Baker" and "ProDrawCallOptimizer". Just it's png atlas and i need tga atlas.

cunning kelp
#

because it's for a game ^^'

torn venture
#

Hello, so I have a problem with decals.
In editor it work fine, but when I build my game for Android, it does'nt work.
If I choose the technique Dbuffer, it just doesn't appear at all, if I choose the technique ScreenSpace, it does appear, but in flashy pink, like when a shader is not compatible.
I'm at lack of options here, I tried everything I found on google.
Anyone would have a solution for this please ?

Thank you very much.

marble vigil
#

When a texture is imported into unity it's converted into an entirely different format anyway

#

So any image compression will be nullified, but any lossy compression artifacts from it will remain

#

TGA and PNG are both lossless formats

#

PNG is losslessly compressed so it's slower to open and save in an external image editors, but not by much

spring depot
#

Is there a way to make a URP renderer feature render AFTER the canvas UI ugui stuff? I need to post proccess the canvas UI ugui elements but I can't figure out how to set it to occur after they've been rendered.

#

Ive currently tried to hard code it to render after the canvas

    public static class CustomRenderPassEvents
    {
        public const RenderPassEvent AfterRenderingUI = (RenderPassEvent)600;
    }```
#

but this didnt do the trick

#

Is there any way to write a unity URP renderer feature that occurs after the canvas UI ugui elements are rendered?

#

This thing is written entirely around a camera concept and I am trying to make it work for canvas ui ugui elements that do not use a camera, and I cannot set the Canvas layer to camera either because that breaks other elements of the UI that cannot be fixed any other way that I am able to solve or personally fix because I am too stupid to figure it out despite many attempts my best efforts just arent good enough

haughty garnet
#

overlay is like a secondary camera, so rendering objects would be less useful, but if you stick to screenspace/world camera then you can override them as if you were overriding transparents

spring depot
haughty garnet
#

not too sure how you would apply PP on overlay (if that's what you're trying to do), but try it with screen space and see if you can manage the results you want

#

can always just do a secondary camera with a screen space gui and add a volume to that

placid laurel
#

Hello, im new to Unity and im trying to make an fps game
After building and compiling my project the render texture seems to be glitching or something
I dont know why it works fine in my editor

spring depot
#

I dont want an overlay

#

I am trying to fix it to match my use case, which is to bloom just everything, post proccess the whole thing

#

re "a secondary camera with a screen space gui" - As I said above I'm fairly certain we 'had' to make it overlay for some technical reasons that I don't remember in this exact moment
When running the project with the gui set to camera, it just doesnt' render at all, completely gone vanished

haughty garnet
#

Yeah, I'm not too sure about the overlay and its ordering. Usually cameras give you more control on rendering order as well. As to why it's not rendering I could only guess the render objects could be responsible as it may not be targeted to render

placid laurel
#

Nvm enabling opaque textures in the render asset fixed it

bronze briar
#

Why does this blend like this? How could I make these blend like regular Photoshop layers

little sapphire
#

@spring depot did you ever solve the shadow artifacts/acne issue in URP you had last year that changing the URP asset shadow bias didn't fix?

marble vigil
bronze briar
#

But now there's another issue

#

I reworked it to where it looks like this (will bring back the gradient stuff later) but now it has the jaggy edges from the color layer

#

And if I swap around the base and blend textures, it fixes the jagginess but colors the edges of the sprite

#

The issue seems to be that the color texture sampling "bleeds" outside the actual alpha of the texture

bronze briar
#

I had a feeling

marble vigil
#

3D rendered graphics work in some decisive ways differently from 2D image editors

bronze briar
#

I'm basically just trying to make a sprite shader where one texture's colors is used to lookup a palette (another texture) to allow for palette swaps

#

Unfortunately there's no resources on that online

#

Just replacing colors one by one for pixel art

spring depot
bronze briar
#

This may be naive, but why can't it just tell that "the palette texture's alpha is zero here, so just use the other color"

marble vigil
#

Especially due to bilinear filtering and mip maps

bronze briar
#

Right

#

So I guess image editing software does something like what you see in the article

bronze briar
#

This looks better, though there is some artifacting

marble vigil
haughty garnet
bronze briar
#

Not sure how good it’ll look with no filtering, but I’ll try it

haughty garnet
#

I guess it's up to preference, but sometimes I notice bilinear will smooth pixels over my outlines

#

but in your case it does seem like compression because pixels wouldn't jump that far with filtering like that

copper pilot
marble vigil
copper pilot
#

Well, most people never understood premultiplied alpha

vocal halo
#

In URP using camera stacking I can not have pixel perfect?

I have to choose between camera stacking or pixel perfect?

Anyone found a workaround to this.

mystic delta
#

See if you can ignore the warning. It might be fine if they are identical.

marble vigil
#

Iirc a hard limitation of the 2D renderer at the moment, unless one of the newer editors implemented it

soft lion
#

Haven't had literally anything going on the 2D roadmap for ages so highly doubt

odd estuary
#

Why do i get this glitch when i use URP? I can use built-in with no issue like this but when i use urp i have this weird thing

#

I dont know if its with unity, is it because of my os? gpu?

#

the weird thing is that when i switch to game it looks normal

dry willow
odd estuary
#

im using intel hd graphics 5500

odd estuary
#

Can it be because of im using Linux?

#

Im not using windows so maybe thats the issue

soft lion
ripe void
#

How i can get random point at mesh and get world pos and normal from this object at this point?
I can imagine how to get a random point, but with world position and normals - no idea

ripe void
ripe void
odd estuary
#

I do have vulkan support because im using linux

#

so vulkan support isnt a issue for me i think

ripe void
#

And did you have some other GPU at your laptop? Like Nvidia or something, you can try use that gpu instead

odd estuary
#

because i can use godot (godot uses vulkan)

odd estuary
#

but no worries

#

im not gonna switch to URP now

#

because i think i found someone make a edge detection shader for built-in

ripe void
ripe void
odd estuary
#

Well i have been working on this for 2 days but i came across a lot of stuff, im not really good at shaders

odd estuary
#

because i somehow ran godot with vulkan

ripe void
odd estuary
#

idk, lemme test it

ripe void
#

You can just type vulkaninfo in console btw

#

Or vkcube

odd estuary
#

oh yea

#

youre also using linux?

ripe void
odd estuary
#

nice

#

it works

#

vulkaninfo

ripe void
#

And vkcube?

odd estuary
#

vkcube also works

ripe void
#

Haswell and newer supports Vulkan on Linux. So yes

#

Well, you can change renderer to vulkan and test urp

#

OpenGL doesn't support frame debugger for example, but used by default for some reason

odd estuary
#

Its no problem, ill use built-in. I dont really wanna deal with shaders 😅

ripe void
#

I think using URP it's easier, but ok

odd estuary
#

Yeah maybe, but i will just combine a toon shader with this outline and then thats all i need

glacial dune
#

How do I implement a closed-shape shadow caster 2d in unity urp 2d? I get this awful glitch when I try to do it.
Is it better to switch to non-2d lighting and if so - how to do it?

signal fractal
#

Hey, I'm experiencing whatever this is, when I use a spectator camera, instead of my normal camera that's used by the player. This only happens in build.

signal fractal
#

This also only happens when setting the target eye to "none"

vocal halo
#

I ended up using rendertextures since it did break pixel perfect
Had to do some pretty weird hack to deduce the alpha of the camera output lol

ripe void
soft lion
shut bough
#

By chance has anyone ever seen this before? I just changed my game from no render pipline to URP and this is the last bug I need to fix (supposedly)

shut bough
#

this is my error message: Unity IsCameraProjectionMatrixFlipped is being called outside camera rendering scope

sinful gorge
#

Upgrading pipelines needs, well, some upgrading.
Maybe replace the camera, check the settings, delete the library folder to clear caches, and google around @shut bough

#

And if unity is not updated, update

tawdry grotto
#

I'm getting these weird lines JUST after baking, I don't know what the problem is...

ocean hinge
# tawdry grotto

Thats more a realtime lighting problem names "Shadow acne" and is caused by to low bias on the light source

tawdry grotto
#

Yes

#

I see it's coming from my sun's directional light, but I don't know how to fix it. My resolution for shadows is 4096.

signal fractal
#

Hey, I combined textures for a model in blender, and now, when I set the metalness value to 1 or apply the metallic map, the object just gets darker (the top one), the one below is perfectly fine. Yes, I have reflection probes in my scenes, other objects work just fine, it's just this one specifically.

#

It's like that in blender too

#

And everything is set to "non color"

signal fractal
#

Finally found a fix! When baking, I had to disconnect the metallic map and set the metallic value to 0, now the gun looks as expected.

vague gale
#

any idea why custom render texture does not apply the material ? texture keeps initial color...

#

i would expect it to be red now ?

dry willow
# vague gale

That shader probably isn't suitable for Custom Render Textures. It needs a specific vertex shader to work iirc

vague gale
#

are there any docs for this ? is it possible to use this with shadergraphs ?

dry willow
#

iirc there's a "Custom Render Texture" option on the Create -> Shader Graph dropdown, though I've never used/tested it

vague gale
#

but i still need a material + shader

#

always the simple things, that dont work in unity -.-

#

hm custom shader code works tho

vague gale
#

i guess i have it now ...

#

wow

fading seal
#

baked lights shouldnt contribute to any meaningful performance hit at runtime vs a realtime or mixed light right?

haughty garnet
#

it's probably not that big of an issue if you do use multiple scenes to split up the world.

fading seal
#

thanks, so its gotta be a bug with entities graphics(deleting 20 lights set to baked lighting yields a 5-7ms speedup)

fresh kelp
#

Hello everyone,

I'm using URP 15.0.6, I am making a render feature and in my pass I need to draw my visible objects with a specific shader.

The issue is my objects material have the same shader but the properties, they may vary, so I need to use the Renderer.SetPropertyBlock to adjust those values.

I have tried to simply get the renderers of the objects visible and use cmd.DrawRenderer but I end up with 200+ draw calls, yeah no thanks.

I was previously using cmd.DrawRendererList, but how can I access the renderers from the RendererList??? There is no mentions of a list of Renderer I could access

fair relic
#

Hello,

I'm experiencing a strange bug with my project. I am using URP , but I get an error message when rendering, even if it's just a blank scene with nothing in it. I believe the issue might be with the project itself, not the scene or the assets, but I can't pinpoint the problem. If anyone has any clues, I'd really appreciate your help!

i get this error : Build completed with a result of 'Failed' in 7 seconds (7003 ms) Building Player failed UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Thank you very much.

vague gale
crude elk
#

am I misunderstanding the purpose of this "Render Objects" thing? It seems that no matter what values I play with here, nothing happens. Even the material override does nothing.

#

the only thing I can get to work is the camera fov

blazing gull
#

AfterRenderingPrePasses is before opaque and transparent objects are rendered

#

also, your Depth Test is set to "Never", which never passes

#

and the compare Function on your Stencil is also set to Never

#

although you have both Pass and Fail set to Keep, so that shouldn't matter

#

I would suggest resetting the render feature to the default settings

crude elk
blazing gull
#

no, because then opaque objects draw on top

#

(although Write Depth is checked, so I'd expect it to at least not get covered up)

#

but i'm not sure if/when the depth buffer gets cleared

crude elk
blazing gull
#

because you presumably want to be able to actually see the rendered object

crude elk
#

oh, I misunderstood you.

#

So, why on none of the options does "Equal" for depth test work? Is depth test not suppose to control when an oject is rendered?

#

it just doesn't seem to be working how it works in shaders which is confusing me. For example setting it to "Greater" renders the entire object, not just parts of the object that are behind something else.

#

For example, the left (green) is a shader that just colors the object green. Its depth test mode is set to "Greater". On the right (red) is an object with the urp lit shader on the "Test" layer. This is the render objects feature that is targeting that layer. Why does the rest of the red object render?

dry willow
crude elk
marble vigil
#

Any reasonable way to not have bloom override downscale at all? The default options are half and quarter, but with pixel perfect resolution around 320x180 half is not good enough and causes aggressive flickering

crystal parcel
#

Hi guys, I'm working on a 3D game project for mobile platforms using urp with shadows and post processing. Currently my game is very laggy when I run it on my phone (not emulator). Do you have any way to optimize my game, or will I have to use built-in?

autumn cobalt
#

Hi o/, is it possible to have depth offset in Unity Urp? is it complicated? (trying to do vfx with floor cracks and the POM seems to be flat)

agile mortar
#

Anyone know why I might be seeing a huge vysnc block in profiler despite attempting to disable it with

    Application.targetFrameRate = -1;
    QualitySettings.vSyncCount = 0;

Is this profiler time actually time in something else and not really vsync waiting? Or how do I actually get vsync disabled?

heady yarrow
marble vigil
karmic iron
agile mortar
#

is there are good article for best practices optimizing urp usage? I can large amounts of time in particular calls under the DoRenderLoop_Internal stack in profiler but I'm not sure what the fix/mitigation would be for these various things eating up time

cursive pecan
#

Hey there! I have a problem related to light casting (not sure if this is the correct channel for this).
I am currently working on a 2D top down game, similar to Hotline miami. In there i want to use 2D lights. And outside of the level (in the same scene) I want to have 3D objects placed around, which then use the "normal" 3D lights. I am using 2 cameras, one for the 2D and the other one for 3D rendering. But i can't figure out how to combine both renderers. Does anybody know what the problem here is? When i set my main camera to render 2D Data and the other cam to 3D, i can't stack the 3D camera to the base one. I am using Unity version 2022.3.22f1 and URP version 14.0.10

marble vigil
marble vigil
#

Or more specifically 2D renderer disables shaders required for lighting calculations, but they still work fine if you re-implement the same or similar calculations in a custom shader

#

Or inversely stick to 3D lighting with a third party 2D lighting asset

cursive pecan
#

thank you for your response, these suggestions don't really satisfy me, maybe unity will update this in the future to allow working with both rendering types at the same time. will stick to 2d lights for now

marble vigil
limber hound
#

Is there a good way to distort transparents in the recent Unity version ?

#

Last time I checked, it was impossible to distort transparents behind a given shader

magic stone
#

Hi all, in the Scene window my game looks correct, but in the Game window, it looks all blue, I ran the auto-update tools for Built-In to URP, does anyone know what may be causing this? Google has a few random forum threads pop up but none have a solution.

naive niche
#

whats good fps for 1.6M verts in unity

last arrow
#

Hi everybody! Realtime GI sometimes doesn't work at all and I don't understand why. As you can see this building is just completely black while same prefab somewhere else works just fine. What am I doing wrong?

soft lion
# naive niche whats good fps for 1.6M verts in unity

Vertex count and fps are quite independent from each other, there's a lot of factors that affect performance. Are you having performance problems or why are you asking? You could target framerates anything between 60 and 1000 depending on lot of factors and the target device is one of the most important ones.

naive niche
soft lion
naive niche
#

I get 90-120 FPS on a build

#

I have occulsion and LODs

soft lion
#

1.6M doesn't sound too bad. Doesn't seem like the vertex shaders causes the issue so it must be something else.

naive niche
#

idk if that helps

#

oh also I was getting 120 fps on low settings, high I am getting 70ish

#

its bad

soft lion
#

Try to figure out exactly what is the slowest part of your game and optimize that. You could temporarily hide elements like trees and grass to see whether they drastically change the performance. Since rendering seems to take quite much CPU resources, I'd guess the draw call count could be an issue

naive niche
#

okay

soft lion
#

Generally rendering should be the part that takes much more from the GPU than from the CPU and the latter should take care of the game logic itself

naive niche
#

went from 40-60FPS went it was there, to 160-220FPS when it wasn't

soft lion
#

Not unexpected. Look up some different ways to increase grass performance. Depending what exactly about the grass is slow there is many different ways to improve, as I said in your case the batching might be the biggest problem

naive niche
soft lion
#

Stats window will show you the batch count. How you create the grass can also indicate the batch count (unity terrain, individual objects, etc.)

last arrow
rare goblet
#

Hi, I'm currently trying to figure out a good way to render decals, ala unity's Decal Renderer Feature, but am having an issue.

Namely, I want a method where I can restrict a decal to a single gameobject, but the Decals packaged with unity use Layers to handle it, and I'm not totally sure if you can modify those during runtime or not.

naive nacelle
#

im not sure if thats the right channel but does anybody know why my objects are fading to grey even if fog is deactivated?

gaunt pawn
#

Hello every one 👋 please help me on this. My "Game" assets are not looking like the "Scene" ones. How can I fix that ? Thanks

marble vigil
wide fern
#

I'm working on a multi-display application and am trying to use the frame debugger, but I don't see a way to debug a specific display/camera. Is this not possible?

thick hinge
#

are you not just getting a stack of stuff for every camera that renders to a screen in there

#

ah tested for me its just following the selected display in the game tab, not really sure how to do that for device though, find it really odd it does not act the same way is when using multiple camears for 1 screen

bleak quail
#

Hi! So I've been trying to implement a laser like attack for one of my enemies, and I've been running into some issues with the my line renderer. Pretty much I want my laser to have pixel graphics/animations. I made my custom material and set it as the line renderer's material. It works fine in stretch mode, however, when I set it to tiling, the line renderer's length remains the same no matter what I scale the 2nd point to. Is this a common issue?

violet holly
#

So, URP seems to ignore the "Always Included Shaders" array in ProjectSettings -> Graphics. So I guess that means I will have to use a ShaderVariantCollection instead if I want to make sure all variants of a particular shader are included in a build? Is there a way to automatically include ALL possible Shader variants in a ShaderVariantCollection? One of my shaders has so many that adding them manually doesn't seem possible. And recording them during game would also be unfeasible. It seems like it should be easy to include all variants, it is basically what "Always Included Shaders" used to do.

bold yew
#

Hi guys ! I have this issue and i dont know how can i fix it, any ideas ? 😄

copper burrow
bold yew
#

Yes aha i've found that like 30s after i send the message, but thank's 😄

fading tinsel
#

Hey everyone, does anyone know how to apply a volume profile to a seperate camera that doesn't use the main renderer?

vast sonnet
#

hi guys, i'm currently having a problem with the lights i've created, when i put a light near my glowing object, it adds intensity to it, making it glow excessively, i don't know what to do

#

the light from the object itself seems to work fine without nearby lights

marble vigil
vast sonnet
#

yes, at first I thought of that possibility, but my glowing object doesn't have a 2d light itself, it's actually an object created from a shader, combining the main texture with the emission texture. Because of this, I can't separate the light from the object (I don't even know if this is the right channel to talk about this).

#

that's the shader by the way

shadow quail
#

Hey for the hell of me I can not find out why my player is flying off into the void.

This is the playermovement script.

(yes the player moves with w a s and d and rotates to the oriantation to the mouse position)

using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public float moveSpeed = 1.5f;
    public float rotationSpeed = 4f;
    public Vector2 pivotOffset = new Vector2(-0.4f, -0.1f);

    private Rigidbody2D rb;
    private Vector2 movement;

    void Start()
    {
        rb = GetComponent<Rigidbody2D>();
    }

    void Update()
    {
        movement.x = Input.GetAxisRaw("Horizontal");
        movement.y = Input.GetAxisRaw("Vertical");
    }

    void FixedUpdate()
    {
        rb.MovePosition(rb.position + movement * moveSpeed * Time.fixedDeltaTime);
        RotateToMouse();
    }

    void RotateToMouse()
    {
        Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
        mousePosition.z = 0f;

        Vector2 direction = (mousePosition - transform.position) - (Vector3)pivotOffset;
        float targetAngle = Mathf.Atan2(direction.y, direction.x) * Mathf.Rad2Deg;
        float currentAngle = rb.rotation;
        float angle = Mathf.LerpAngle(currentAngle, targetAngle, rotationSpeed * Time.deltaTime);
        rb.rotation = angle;
        transform.position = rb.position - pivotOffset;
    }

    void OnCollisionEnter2D(Collision2D collision)
    {
        Debug.Log("Player collided with: " + collision.gameObject.name);
    }

    void OnCollisionStay2D(Collision2D collision)
    {
        Debug.Log("Player is colliding with: " + collision.gameObject.name);
    }

    void OnCollisionExit2D(Collision2D collision)
    {
        Debug.Log("Player stopped colliding with: " + collision.gameObject.name);
    }
}
nova bear
# shadow quail Hey for the hell of me I can not find out why my player is flying off into the v...

You're probably going to get more answers in #archived-code-general than the URP channel (your question isn't related to URP) But from a quick glance it looks like you're setting positiont twice in two different ways and just hoping it will work, once in FixedUpdate and once again in RotateToMouse. It would be less error prone to calculate the combined position once and set it once at the end of fixedUpdate using the rigidbody methods. (also as a rule of thumb don't mix and match rigidbody move methods and transform.position, you're asking for trouble and desynced transforms)

Also try just setting pivotoffset to zero and seeing if the problem goes away. If it does, congratulations, you've just narrowed it down to an incorrect pivot algorithm.

shadow quail
#

Thanks again tho

marble vigil
#

That kind of glow shader is the only one you find tutorials for but it's not correct

#

There are two correct methods, one of which is to use a sprite masked global light, another to lerp to unlit sprite shading using the sprite mask with custom lit sprite graph

#

You'll want the second technique because lerping to unlit prevents over-exposure

#

Speaking of the thing @snow dew how did the sprite emission work out with the example

snow dew
#

I still have it laying on my desktop ready to try/

marble vigil
modest shale
#

I can't seem to get the URP Decal Projectors to work at all in 2022.3 =o= They work in the editor, but no matter what I do they're not working my Win64 builds. I've set them to DBuffer per Reddit suggestions, I've force included the shader, etc?

vast sonnet
# marble vigil <@674766960382181407> here's the sample for you as well https://cdn.discordapp.c...

ok, i saw the example and i really understood what i was doing wrong. There really should be proper tutorials on this sort of thing. I'd prefer to use the emissive map example because it has more autonomy over each of the objects that glow, whereas in the case of the masked light all the objects would be connected and consequently it would be more annoying to adjust their lights individually. But gee, thanks for the example, it really helped a lot

sleek ravine
#

Anyone know how to make the transparent shader recieve shadows? look at the ring on this planet, the planet isnt casting any shadows on the ring and the ring is like either fully lit or not lit at all

#

I want like this effect

#

anyone have experience with this?

#

I have set this in the shader graph settings but no dice

queen juniper
#

Hello ! I'm trying to create a Fog of War system for my RTS from scratch. It needs to be well-optimized because the base game is required to handle a lot of entities. However, I can't find good documentation or resources on it, only already made package that look stunning but ican't find any info on how to do it . Can someone provide documentation or videos that cover this topic? I have found some basic ones, like using shaders over multiple entities, but I'm worried it might hinder performance a lot.

vast sonnet
#

@marble vigil hi, so, the advice you gave me and the sample worked perfectly, but when I went to put it to work with a sprite of a lamp, it lit up only the parts that I marked to shine, the "glow" of the sprite itself does not affect nearby objects and not even the object itself, which ends up looking unrealistic, do you know how to fix this? I would only put a 2d lamp in the sprite, but I made a lerp of the intensity of it, so it would be a bit of a pain to undo everything and replace the intensity with a 2d lamp, even because it would be more beautiful to use the shader itself as you can see in this image that I will send here

#

this is with the lamp

#

and this is without it

#

as you can see, however weak the light, I think it would look better with the shader illuminating it rather than another light itself

vast sonnet
#

In fact, I already solved the issue with 2dlights with some lerp in the intensity anyway, I think it really was the easiest method

marble vigil
#

A glow mask / map can include a pixels between black and white for self-illuminated parts of the sprite which can improve the look, but that cannot affect other objects either

soft lion
hazy prairie
sleek ravine
soft lion
sleek ravine
astral arch
#

I have a layer called "front bg". When I set a light2D component's Target Layer to "front bg" through the inspector, I can see the light in my scene. However, if the Target layer is set to anything else, my light doesn't show.

signal fractal
#

it's the colors btw, they are not supposed to be there and don't show up in VR

naive nacelle
copper pilot
#

(And you want detail textures to fade at distance to avoid noise)

oblique briar
#

Where do I enable Rendering Layers? I was told it's here

But there is nothing here?

dry willow
oblique briar
#

Ok, and I found out those lights dont' cause the issue. Even if I completly disable them, I still have the issue

oblique briar
#

Ok, is it possible that eventhough a light does not affect a certain mesh, that mesh is still affected by the lights that don't render on it, but affect the amount of allowed lights in the shader? What I mean is... lights can be disabled depending on importance, if there is too many lights. But... the lights that don't rendenred, are sitll counted as part of the total lights that have affect on that mesh?

#

This with the combination that I control light intensity witha script, cause lights to turn on and off for other meshes, like a disco

mint linden
#

i swapped to HDRP for about 1 second before abandoning ship and going back to URP... now when I'm in play mode, it looks extremely posterized, even when there's no post processing effect... anyone know what might be causing it? (first pic is play mode, second pic is in scene view (which used to look the same))

waxen pewter
#

I'm developing a 2d platformer game.
I have an issue with rendering: on older mobile phones, complete black color seems to have transparency.
So on the screenshot I've attached, when a map overlaps another one we can see that they are transparent.
I tried both built-in RP and URP.

austere hemlock
#

Does anyone know why I am not getting shadows in my scene? I beleive i have done everything right. My point light is set to hard shadows. And my objects in the scene have cast shadows on. Any advice is massively appreciated.

humble snow
#

Hey guys how do I switch from urp to built in?

dusty gate
#

How do I make global volume only effect certain layers in 2d urp?

old cedar
#

I am doing some SRP stuff and i have got a RTHandle which i want to import to a shader graph so i can modify it.
I came to know you can set the texture as a global texture with a reference name that you can call inside shader graph.

But this isnt doing anything, the material/shader is simply showing a whole white texture. Im not sure what im doing is wrong.
(the last image is the proof that _textureHandle indeed has info which is being blit as shown in the first image)

marble vigil
#

@austere hemlock It's quite enough to post on one relevant channel

austere hemlock
marble vigil
finite loom
#

Hey there! Im having some problems with the correct settings for a flashlight. Its either not seing anything ore overexposing the moment i look at something three feet ahead. Im also using Bloom to make Lanterns etc look much nicer. But this (obviously) makes my flashlight problem even worse.

iron compass
stable island
#

Hi does Tonemapping ever make a bright game look better? - the neutral and ACES presets just seem to make things gloomier. How useful is it really? And is neutral ever a good setting?!

marble vigil
#

Tonemapping is extremely useful with adaptive exposure, which URP does not have, but you can have volumes (local even) with overrides for post exposure to achieve similar effects

stable island
#

Yes the way the default template has just tonemapping and not any of the other color adjustments or shadows/midtones/highlights, white balance etc does not help. Maybe their sample scenes show better.

wide fern
#

Any ideas as to why the transparency of my camera's render texture is wrong? (see gif)

I have a standard setup: Camera w/ clear bg color and a render texture assigned to its output, post processing disabled.
I've tried different color/depth-stencil formats in the rt but the transparency issue persists.

I've done this a million times, so not sure what I managed to mess up here 🤔 Any ideas?

wide fern
#

Looks like it's due to the asset Better Fog. Even with post processing disabled, it's messing up alpha. Frustrating, but mystery solved at least

spark pumice
#

Hey so im having some weird lighting problems, like this light near a wall just shining through for no reason, and the whole basement being just lit up even though its fully enclosed

#

If i put a large plane over the house and look at it from a bit further away, everything is fine, but when i come closer the shadow seems to dissapear

marble vigil
spark pumice
marble vigil
spark pumice
gritty bough
#

why my spotlight don't show up when baked?

sand linden
#

URP question: when putting objects in the scene all with the same shader, but different material, they will get batched using the SRP batcher in a single SRP batch.

When using ScriptableRenderContext.DrawRenderers, you can set an overrideMaterial on the drawingsettings and all those renderers will also get batched in a single SRP batch. However, that's only with a single material!

How can you draw renderers using a URP renderer feature, with multiple materials, and have them all be batched in a single SRP batch?

marble vigil
gritty bough
marble vigil
gritty bough
#

or wait

marble vigil
gritty bough
#

Ok that was it I'm rly f stupid XD

#

Can I change the material or smth to let the light through?

marble vigil
#

Not per material, afaik

sand linden
# marble vigil Did the frame debugger seem to provide any answers to this question?

Nope, not really.

option 1: When I use DrawRenderers, it ends up in a single SRP batch, but I can only set a single overrideMaterial. (picture 1)

option 2: I use DrawRenderers multiple times after each other (but in different passes), each time with a different overrideMaterial -> ends up going in 2 separate SRP batches (picture 2)

option 3: I use DrawRenderers multiple times after each other, in the same pass -> still ends up going in 2 separate SRP batches (picture 3)

option 4: I use CommandBuffer.DrawRenderer in a loop for each renderer -> not batched at all, shows no reason for the batch to be broken (picture 4)

sand linden
#

@dry willow if this rings a bell, would appreciate it 😅 sorry to tag you

dry willow
buoyant notch
#

I've spawned 20,000 entities in ECS. they are not moving yet my fps is sitting at 30fps. all the work is being done byu the RenderLoop.Draw as you can see.

#

I've enabled GPU instancing as well as SRP Batcher and Dynamic Batching. Whats causing this poor performance?

#

I am referencing this and we seem to be getting difference results : https://www.youtube.com/watch?v=IrYPkSIvpIw

A short video on how to improve your frame rate in Unity. This video covers various optimizations to reduce draw calls such as combining meshes, batching and gpu instancing.

Music Credit: LAKEY INSPIRED
Track Name: "The Process"
Music By: LAKEY INSPIRED
Official SoundCloud https://soundcloud.com/lakeyinspired
Official YouTube Channel:https:/...

▶ Play video
marble vigil
pseudo jacinth
#

How can I get lighting information into 2022's shader graph?

#

there's main directional light is easy ofc, but i need point & spotlights too

sand linden
pseudo jacinth
#

Thanks :3

pseudo jacinth
#

Wow that package is absolutely amazing

daring jewel
#

guys, I'm in 2022.3.10f1 and I'm using radiant GI from the asset store becaue enlighten seem to not be available in this version and up. I'm facing a problem where, the envionment lighting isn't recalculated at runtime on directional light moving/rotation. Can it ever be achieved? I'd like to keep all lightings realtime in my game

marble vigil
#

It's not called Enlighten in the editor but "realtime GI"

daring jewel
#

but it doesn't seem to be working when I check its checkbox in the scene lighting tab

#

and there's also no realtime lightmaps options available at all:

pseudo jacinth
#

@dry willow Is point light shadow mapping also available?

dry willow
pseudo jacinth
#

I see, makes sense. I'll look into it

marble vigil
daring jewel
#

well that's good to know yes ahah

#

at least I know there's an issue

marble vigil
#

When it works, environmental light is occluded from interiors, and directional light does bounce around

daring jewel
#

I see, I'll try some other 2022 versions to see if it persists

#

thank you for the help

marble vigil
daring jewel
#

delete library?

marble vigil
#

Library is a folder containing project's temporary editor-generated files

#

Might solve vague problems

#

Though if you've upgraded the project between major unity versions, it may have caused some stuff to mysteriously break that even a Library deletion won't fix

daring jewel
#

alright, thank you very much for the clarifications

halcyon sphinx
#

does anyone know how I could combine these materials into a single material for my skinned mesh

marble vigil
halcyon sphinx
#

would I do this is in blender?

#

do yk of any assets that can do this in unity

marble vigil
queen juniper
#

did any one tried to upragade a shader from built in to urp by hand ?

sand linden
naive nacelle
#

does somebody know how to set up luts in unity?

queen juniper
#

Idk how hlsl work

#

And idk the equivalents of the function and variable

oblique briar
#

Is there a way to put shader code snippets into a shader graph? For instance, just for a certain node?

oblique briar
#

Nice, thanks

old cedar
#

Hey guys!! I made a custom render feature that acts similar to the default render objects feature in URP. You tell which layer to capture, it captures it using RT, and the pass is stored.

But if there are only 2 layers captured, I want to material override both of the layers differently. I simply want to capture color of one layer and want the other to be render black, as if it has unlit black material. Is this possible?

TLDR: want to capture 2 layer using render feature but render one of them as black

spark pumice
#

OOOHHHH

#

NVM

#

i had to make my model Double-Sided

#

but for some reason there is still light leaking through

#

actually nvm

#

i have a fix for this

#

thanks again

lean haven
#

Does anyone have an idea why this could be happening? When rotating the player ingame or editor, the side of the gun gets completely dark, obviously its on the other side where the sun is pointing, but realistically that should no where be near that dark. Any fixes?

Aces tonmapping makes it darker of course

sand linden
vocal dragon
#

im using the Render Objects feature in URP i have a material which i use to override for a specific layer, but i would like to also be able to control values on that material such as fade the base map color overtime via code, how do i access the material reference in the render feature to do this ?

old cedar
old cedar
old cedar
past tide
#

guys, know somebody a list of real game showcases what use URP ?
Is URP ready for mobile devices or better use a built-in render ?
we have big city in our game and running into cpu bottleneck on mobile devices, hit overheating and throttling after, result is 15-25 fps on low quality settings, no post effect, no antialising, no shadows.
we use version 2023.3.3
render takes between 30-60% cpu time

rare cove
#

Hi! I've been trying to implement a shadow receiver shader in URP which lerps between main texture and pitch black based on whether it's illuminated by any additional light. I've attached my attempt at implementing such a shader. It mostly works as imagined, but sometimes artifacts occur, and they sort of look like the AABB of the observed light (pic attached).

Am I doing some rookie mistake?

buoyant notch
#

any idea why this code doesn't work?


matrices = new Matrix4x4[size];
       



renderParams.material.enableInstancing = true;
material.enableInstancing = true;






for (int i = 0; i < size; ++i)
    matrices[i] = Matrix4x4.Translate(new Vector3(-4.5f + i, 0.0f, 5.0f));
       

Graphics.RenderMeshInstanced(renderParams, mesh, 0, matrices);```
shut bough
#

Does anyone know how to fix this pixely isometric thing? I have no idea what happened it supposed to be a normal 3d URP game.

nimble mirage
#

"pixely isometric thing"?

marble vigil
#

"normal" 3d urp game?

shut bough
#

😂 There not supposed to be low-quality and in the game mode it shouldnt be at the angle of an isometric game but be using my RTS camera script where the person can freely move around in a 3d space

#

It should look more like this ignoring the baked terrain

#

this is the scene view

marble vigil
shut bough
#

Nope there is this though it wont let me uncheck it

marble vigil
shut bough
#

Like this?

#

Thanks for helping me btw!

shut bough
#

This is my quality settings also

marble vigil
shut bough
#

Origanlly in game view you would see a tree like this and be able to move around it to look at it all you want

#

Now trees look like this in game view and in the right side you can see my camra scrip that has all the things an RTS camra has to prove its not supposed to be 2d

#

If you change the FOV to far it looks like this

marble vigil
marble vigil
shut bough
#

Well not sure what was wrong but I fixed it by creating a new camera

ornate yew
#

Hello, my apologies if i don't have terminology very correct, i'm new to shaders and shader graph. What i'm trying to accomplish is something like a decal shader (projector).
Instead of projecting an image however, I'm just looking for like an outline AND a solid interior color, and to accomplish this i'm fine with even rendering 2 meshes.

The reason i want to use meshes instead of a procedural texture and cube decal is because it would be easier later with the physics system to detect the same overlaps that the camera does.

What would be the buzzwords i'm looking for to find help on doing something like this in URP?

iron compass
oblique pollen
#

Hey All,
I am trying to replace a camera (Extra) with a Render Feature and Render Pass but I am struggling to understand some things.
I am using: Unity 2022.3 LTS

The Docs are quite strange and I feel dont give ample explanations and found that this site was a really good point to go through:
https://www.cyanilux.com/tutorials/custom-renderer-features/#ConfigureInput

Are there any other really great docs out there that I should be looking into or Papers ?

Goes through examples of Renderer Features and explains how to write Custom Renderer Features and Scriptable Render Passes for Universal RP

oblique pollen
#

I have this kinda working.
So I have multiple cameras Currently. I want to get the cameras into a features so I can save on some CPU usage.

My pass renders just the background objects but, straight after that DrawOpaqueObjects runs and renders everything else. I am not sure if I need to tweak the DrawOpaqueObjects Feature perhaps ?

dry willow
oblique pollen
# dry willow The Opaque and Transparent Layer Masks at the top of the renderer asset will let...

Dude... Your here 👀 I should not be Surprised... But I am 🤔

Anyways 😁
Cool, So that could be what I want but to be honest I am really new to the rendering side of Unity so I think I just need some Clarity.

So, I have the following Cameras: Background, Foreground, Player and UI
These live in the Camera stack and Under the Primary Camera an use the Culling Mask to render specific layers to each camera.

I essentially want to remove them the cameras and replace them with a Feature.
I found that the FilteringSettings, SortingCriteria and DrawSettings is what gave me the ability to have the background only come through... 🤔

Anyways, yes, I just want each Feature to render an Opaque and Transparency pass.

dry willow
#

Though I think the camera stacking is meant to be quite optimised anyway. I don't use if often so not sure if swapping it out for features is worth it or not

oblique pollen
oblique pollen
dry willow
oblique pollen
waxen plume
#

Hey everyone,

I'm currently developing a 2D pixel art game with a global light to simulate day-night cycles, using URP. This global light affects every sprite in the game.

However, the UI looks strange at night because the entire game is dark while the UI maintains its original brightness, creating an ugly contrast.

I've experimented with setting the material of my UI images to Lit-Default, which makes them affected by light. Visually, this works well, but it causes issues: images with that material no longer work with RectMask2D or register cursor hovers. I'm sure there are more problems I haven't encountered yet, as I assume the Lit-Default material isn't designed for UI.

Does anyone know a practical way to make the UI respond to lighting?

random bramble
#

hello folks!

I am trying to achieve this see through effect, following this nice tutorial:

https://youtu.be/GAh225QNpm0?t=125

The tutorial is using unity 2020 URP, but my project is 2022 URP 2D based.
I can't find the filtering options for the renderer.

Any ideas about where these opaque and transparent masks were moved in 2022?

Thanks in advance!

In this Unity game development tutorial we're going to look at how we can use URP Renderer Features to create a silhouette of a character when they're hidden by an obstacle.

We'll start looking at how to remove the rendering of the character completely by assigning it to a layer and removing this layer from the renderer.

Then we'll add two ren...

▶ Play video
random bramble
dry willow
#

I think the 2D renderer just never had them, which is annoying

marble vigil
#

For a similar effect in 2D you'd use Mask components

random bramble
dry willow
#

Remove isn't really the correct word, it just wasn't implemented I guess

random bramble
random bramble
marble vigil
random bramble
# marble vigil Yes

oh, this sounds as an optimization nightmare, I would need to manage double the objects for every enemy, NPC and the player itself. I was looking into a shader/render pass based solution. Do you know of any lighter ways to investigate?

random bramble
#

I guess I'm gonna find soon that normal URP can't do custom axis sorting, because they removed it and now it only exists in URP 2D 😅

marble vigil
random bramble
random bramble
marble vigil