#archived-urp

1 messages · Page 7 of 1

rare fern
#

let me check if entities have access to this value

#

there is

#

wait a sec

twin forge
#

though I'm not sure how filter is working
you can tag multiple layers on renderer, but it depends how DrawRenderers works. like it could probably filter objects only if renderer have all layers (so basically is it all or any)

rare fern
#

isn't that value is one that is recommended to be kept as low as possible?

twin forge
#

really? not sure

rare fern
#

I remember reading something about

twin forge
#

it's just a tag afaik

rare fern
#

some value being divided by 8

#

so increasing to 9

#

will decrease performance

#

until 17

#

and etc

#

well, not much of an issue I think

#

I'm not tied by GPU anyway

#

Do you happen to have a ready implementation for RenderObjects with this layer's support?

twin forge
#

very messy one

rare fern
#

hmm

#

on the other hand

twin forge
#

it contains some game specific stuff (horde renderer, but it's just couple of lines)

rare fern
#

maybe I can just override RenderObjects

#

built in one

#

and modify settings

twin forge
#

yeah may be
I've just done this, it also supports multiple object passes

rare fern
#

yeah, I think it's totally doable

twin forge
#

(I also did it based on builtin one and some code I've found on github)

rare fern
#

they read settings in OnCreate

#

or maybe not...

#

I guess, with a little help of reflection it'll do

#

huh

#

There are bunch of downsides to it

#

related to lights

tulip juniper
#

Ask, after I upgrade to urp render, the tree asset becomes pink like this, how to fix it, version 2021?

#

i try to fix this by learning from yt but i don't know how to open this creen

sinful gorge
marble vigil
void venture
#

I'm having same issue.

slender bone
#

Hey folks, I know this is a bit of an odd question but I couldn't seem to find a more fitting channel for it other than #archived-urp. How do I get a material to tile relative to the scale of the object it is tiling on? I have here 2 road gameObjects (which are just cubes scaled up), the closer one is exactly half the length of the farther one, hence the farther ones material looks stretched out. How do I get the material to tile relative to the scale of the gameobjects, so the materials would be equal in visible length with each road segment beside the other?

copper pilot
slender bone
copper pilot
#

Yes.

#

Alternatively, you could use a script to alter the UVs or the tiling of the texture.

#

Though both of those options have their own drawbacks.

slender bone
#

damn it would probably make more sense for me just to make a couple different materials for different sized road segments

#

thanks anyways

void venture
#

I'm having an issue when I build my game where all "Shader Graph / Decals" are not being built into my game, resulting in pink textures.

#

all of the textures for my decals are empty? theres no diffuse texure.

#

Anyone know how to fix this?

sinful gorge
#

And is unity updated?

copper pilot
fiery grove
#

Hello im new in pipelines. I creating 2d project for now. And i use shader graph. It works fine in built in. But i always see that Unity is more like me to go to urp. Because many features is start be more for urp. Is it good for 2d and performance? Because i want to try to use hdr colors. And maybe some light on some scenes.

void venture
#

I think was missing a renderer but also my pack was missing texture I had to remove them

#

Imma test my build today

marble vigil
hidden dagger
#

Can someone please help me? Im struggling alot with URP and 2D shadows, and now my sprite is black and the shadows are still not working

violet flint
#

Anyone know why the weird green distance effect is happening? Either there's no solution online or I'm not searching it correctly. Using URP in Unity 2021.3.16f1. I already tried looking in the URP settings and the camera in the inspector.

dry willow
violet flint
#

hmmm... no apparently it's none of those

#

fog is disabled, played around with the lighting a bit to see if it would change

#

something that does influence it is the render scale in the URP settings

hot smelt
#

Hey, so Ive been trying to add a texture to this cave that I made in blender, its my first time ever using it and I am having trouble with it. When I add the texture it streaches, and im trying to make it repeating, or painted on like the Unity terrain system. What do I do to fix it? Pics for refrence

blazing gull
#

ok, cave time

#

yeah, you want a triplanar shader for this

#

the idea is that, instead of having a texture coordinate for each vertex

#

(that's what the UV map is)

#

you just compute it from your position in the world

hot smelt
#

ah i see

blazing gull
#

Create a new Lit material in unity

#

(so, just create a material; pretty sure it'll default to Lit)

#

oh wait, i don't know if the default URP shader does this

#

let me open a URP project...

#

ok, yeah, it doesn't have that option built in

#

fortunately, it's very easy to set this up in the shader graph

dry willow
#

It doesn't, but you could create a shader graph. There's a Triplanar node.
Or you could UV map the model (should be tutorials if you search "blender uv unwrapping")

blazing gull
#

This is all you'll need.

hot smelt
#

im guessing it would be easier to do the triplanar graph?

blazing gull
#

yeah, I'd go for the triplanar mapping

hot smelt
#

okay, cool

#

thank yoh so much for the help!!

blazing gull
#

no prob

#

but yeah, triplanar mapping is good for uniform-looking surfaces that are hard to uv unwrap

#

e.g. terrain!

hot smelt
#

good to know!

blazing gull
#

if you're curious, the triplanar node works by deciding whether the surface is closest to the XY, YZ, or XZ plane

#

and then just just uses those two coordinates for the 2D UV coordinates

#

it does some blending to cover up the seams

#

I wish there was a node that spat out the blended UV coordinates

#

I've had to rebuild it by hand at least once so that I could use it to sample, say, a Voronoi node

#

i used that to make mineral graphics for a game

hot smelt
#

very cool!

blazing gull
#

triplanar mapping works best with stuff that's kinda random and noisy already

hot smelt
blazing gull
#

that means the shader is broken

#

show me your shader graph

hot smelt
blazing gull
#

you need to drag that Texture2D property into the shader graph

#

and then plug it into the Texture input of the Triplanar node

#

also, i'm not sure why the entire thing looks grayed-out...

dry willow
#

Might want to check the Target assigned under Graph Settings. Make sure it matches the render pipeline you're using

blazing gull
#

how did you create this shader graph?

hot smelt
#

I realized its not the default render pipeline, but i dont think it should change anything as its still the default one, and i created it by right clicking in the assets and navigating to create new shader graph

#

i fixed the the render pipleline its using, and its not pink anymore, but its still not the texture i need

blazing gull
#

you will now need to assign the texture to the Texture2D property on the material

#

you'd want "Lit Shader Graph" in here, rather than going into Builtin or something

hot smelt
#

actually im pretty sure thats what I did

#

its working now, but im getting this error

blazing gull
#

ah, that's probably why it's all grayed out

#

i'm not sure how you did that..

hot smelt
#

haha thats ok

#

ill try to ffigure it out

#

thank you so much for the help!!

#

i turned on debugger mode and it fixed it

#

its not greyed out anymore either

jolly quail
#

For the love of god,how long until they implement planar reflection to URP

dry willow
jolly quail
marble vigil
fierce crown
#

why is my cameralayerhand not overlaying on top of the main camera? It is in a simple camera stack and i cannot seem to be able to find an answer. I know how to use the regular depth to render an overlay but i just want to test this out

muted ginkgo
#

sorry - i did in fact misunderstand your question

wanton marsh
#

hii, is there a way to do this type of lighting in unity URP? since we can't have more than 8 light I don't really know how I can I do it, any tips/video ?

cyan talon
#

Both with Forward+ and Deferred you can have more than 8 lights

wanton marsh
#

Thanks you! I will try deferred (since I'm doing a XR program, I can't use Forward+)

sinful gorge
#

Or baked lighting if it doesn't have to be realtime :p

hidden dagger
#

Can someone help me? My 2D lights says this all of the sudden, even though It worked fine yesterday. (I changed nothing)

#

and its litteraly assigned

placid frigate
#

Does anyone know why my world is pink?

placid frigate
#

Thanks. I did install the URP and did this:

#

Yet my world remains pink

rare marten
#

Hey, I created game in unity and I have problem after I built game. In editor all works fine but in build version of game all textures are purple. It’s using URP and I set urp in Graphic settings and idk why I got that. Tried all 😦

nova wind
#

what can i do with those ugly bloom jaggies?

#

high quality filtering isn't enough

rare marten
#

Anyone? Need to fix that fast 😦

cold ingot
#

@rare marten you rwprocessed all the materials as URP right? Or did you start the project in urp?

#

Either way pink means there is a shader compilation error, does anything show if you look at the console error log after building?

hollow flame
#

I've been looking into quad overdraw, I was wondering if geomerty behind other opaque geometrly doesn't cause it?

#

I made a test scene with renderedoc and the sphere behind the cube isn't showing up in the quad overdraw overlay

sinful gorge
#

Instead of a texture

sinful gorge
winged grail
#

Alright, so I am using URP obviously and I want pixel lighting, in playtest and scene view it is well..pixel lighting. But when I build it, it changes into vertex lighting, how can I resolve that?

marble vigil
winged grail
#

It is android, it probably is the graphics quality now that I think about it.

marble vigil
indigo ruin
#

this is my shader graph, I'm really proud of it!
but I have a question, is it possible to have both, color 1 and color 2, randomize it's shade a little so some appear darker and lighter?

oblique pier
primal skiff
#

I've been far gone too long to use URP. How can I make a in editor camera post processing effects? I can't use OnRenderImage() method implementation because URP disables it. What other method can I use that lets me render a shader effect in the viewport?

Or is this more of a coding question than urp question?

versed vector
#

Why are my shadows doing this?

#

If I move the camera backwards the shadows reappear

#

And it changes based on angle

#

If I lower cascade count to 2 it fixes it, but then my shadows aren't as sharp as I'd like them to be

dry willow
marble vigil
versed vector
cold ingot
blazing gull
#

ColorBlit is, indeed, running (upside-down, for whatever reason)

#

(i guess it gets flipped right side up again later)

#

it looks like the result just gets ignored

#

I do not understand the code in the ScriptableRenderPass. Notably --

cmd.SetRenderTarget(new RenderTargetIdentifier(m_CameraColorTarget, 0, CubemapFace.Unknown, -1));

I don't get this. I guess it's supposed to write back to the camera's color buffer?

#

it does seem weird that the rendertarget name is <No name>, which every other step has some kind of name

#

this is in VR/XR, URP 12.1, Unity 2021 LTS

#

i wonder if the subsequent post processing step is looking at the wrong texture

#

it says it's reading from _CameraColorAttachmentA

#

whilst my custom pass is going to...uh, <No name>, which definitely feels wrong now

dry willow
# blazing gull I am following this example in the docs: https://docs.unity3d.com/Packages/com.u...

It might require the "Opaque Texture" to be enabled on the URP Asset.
Honestly I kinda hate this example, I really don't know why it's trying to even use the opaque texture. Usually you blit (or DrawMesh / use new Blitter API) from camera target to a temporary, then back to camera.
If it helps, I've got https://github.com/Cyanilux/URP_BlitRenderFeature (it has cmd-DrawMesh and 2022.1 branches which should work with XR)
(URP 2022.2+ also has a fullscreen graph & renderer feature built-in, which I would assume works with XR. But idk)

blazing gull
#

I tried toggling that already, yeah

#

It looks like the render feature asks for an opaque texture anyway

#

and I do see that pass running

#

And yes, that's exactly what I was expecting -- blit from camera, to temporary, to camera

#

Apparently, the old Blit function mangles XR rendering, hence the separate example using a full-screen quad

#

and lemme give that a look!

#

I'm on 2021 LTS because I kept crashing with 2022, for...reasons, idk!

#

ah, that results in an image that looks very familiar -- i ran into a thread on the unity forums

blazing gull
#

oh, I had a brain fart and did the former

dry willow
#

Yh the main one is still using cmd.Blit

blazing gull
#

same behavior, though

#

oh hang on

#

ah, I copied the same git url twice

dry willow
#

Lmao

blazing gull
#

i forget if you can ask for a specific branch when installing from a git url

dry willow
#

Use https://github.com/Cyanilux/URP_BlitRenderFeature.git#cmd-drawMesh

blazing gull
#

gotcha

#

I had tried going to the branch and then asking for the git link again

#

it doesn't like that url

dry willow
#

I think you've got a space at the start

blazing gull
#

ooh, yeah, that was it

dry willow
#

Nice to know the package manager doesn't auto-trim spaces 🤦

blazing gull
#

grumble grumble

#

it works, though!

#

thanks a bunch

dry willow
#

Awesome 👍

blazing gull
#

i was about to give up and go back to Actually Making The Video Game for this jam

#

now i can spend an hour making pretty visuals

#

🤪

dry willow
#

Good luck?

blazing gull
#

:p

#

actually, one other thing: how can I sample the depth buffer in here?

dry willow
# blazing gull actually, one other thing: how can I sample the depth buffer in here?

You mean depth texture in shader? You'd usually include DeclareDepthTexture.hlsl from the URP ShaderLibrary, that sets it up for you. Then use the SampleSceneDepth with the screen position.
https://github.com/Unity-Technologies/Graphics/blob/master/Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl

Can also use graphs if the "Override View/Projection" is ticked on the feature. Can use Scene Depth node as usual.

blazing gull
#

Ah, I should try this again with a shader graph. I'm not the biggest fan of HLSL, haha

#

I did try this, I think...but the odds of an error are high :p

#

yep, bingo

#

thanks again! i think that's everything i needed.

#

i'll have to come back and study this more closely when i'm not running around with my hair on fire

#

excellent, it's all working now -- I had to make the shader graph Transparent so that Scene Color would work

#

I have clutter flying around in the background, and to make it look more..."cyber", I wanted them to flash white as they went in and out of the far clip plane

#

...and I now realize that this is way less effective than just making the clutter's material change colors when it spawns and despawns

#

Oops!

dry willow
#

Yeah that would likely be more performant than a fullscreen pass, especially for XR

blazing gull
#

I was originally thinking of making it a fog effect that also made the objects flash, but then that got dropped

#

so now it's just flashing

#

thanks a ton regardless (:

versed vector
tepid salmon
#

is there a UV node for the fullscreen shader graph?

#

or am I supposed to "join" the color output with a vector2?

tepid salmon
#

why is it so wobbly?

#

also the pixels appear rounded

#

this is the graph I made

blazing gull
#

are you trying to make a pixelate filter?

#

you can use the Posterize node

real lichen
#

Does anybody know why my render pass is causing my scene view UI to do this? I've managed to trace it back to this ConfigureClear call. If I remove it, then I end up with a different effect.

real lichen
dry willow
real lichen
#

Oh I get what you're saying. Yeah, I'm disposing it in OnCameraCleanup. Why would that cause the UI to bug though?

blazing gull
#

this is gonna be an infuriatingly vague question, but...I want to get a better handle on how to work with the whole scriptable render pipeline thing. I've done a few custom renderer features before, but it was a LOT of blind copy-pasting from examples.

#

should I dig around in the documentation more? it seems like a lot of stuff isn't terribly well-documented...

#

I guess I need to get way more familiar with the Frame Debugger.

rancid coral
#

Just take your time. don't rush to fancy feature. try follow the sample code step by step. Check the ducoment of each API in the sample if you've never seen it before. eventually you will have a better understand of it

#

And if something look super magical to you and hard to understand. just google it or ask the community.

blazing gull
blazing gull
blazing gull
full arrow
#

Hey guys, the color of my sprites isn't right using URP 2D. Can someone help me?

real lichen
#

Is there a way to make a ScriptableRenderFeature not render in the scene view and only render when the game is run (or in the game preview)?

knotty nova
#

Hi there! I recently switched my Unity project to URP (Universal Render Pipeline). After using the Render Pipeline Converter, the pink rendering issue was resolved, but I'm facing problems with some models from the Unity Asset Store. Despite my limited knowledge of shader scripting, I managed to restore their colors, but now they appear darker and lack proper lighting compared to how they looked before the URP update. I've been searching online for a solution for the past 9 days, but haven't had any luck. Can anyone help me fix this issue?

The first image is the model that is on the scene that appears with no lighting

The second image is the model how it used to be and how its supposed to be
This is the asset (https://assetstore.unity.com/packages/3d/props/exterior/low-poly-brick-houses-131899)

The third image is the shader script that is attached to the models

Any help will be greatly appreciated!

meager hare
#

for some reason when I switch to URP it seems like the range setting of point lights doesn't do anything

#

I can only make them have a bigger range by increasing intensity, which creates a big ugly white spot

pearl parrot
#

why does these outlines appear when i enable anti aliasing on the render texture?

real lichen
#

Well I did something and now every time I open Unity, it just softlocks on this. Does anybody know a fix?

#

I also get a NullReferenceException which I think was caused when I messed with materials on my render pass but I can't check because Unity is softlocked.

real lichen
#

I mean I didn't figure out what was happening but I fixed the softlock by renaming my URP settings file so that it wouldn't try to load them on launch.

marble vigil
dry willow
pearl parrot
blazing gull
#

oh, Cyan got it already

real lichen
#

I think you can do renderingData.cameraData.isSceneViewCamera but I'm not home to test it right now

dry willow
real lichen
devout heath
#

anybody know why Im getting these kinds of fragments on a realtime point light? Im using urp and unity 2021.3.11f1

#

heres a better example

blazing gull
#

is the light getting occluded by the object?

#

could cause some weirdness

#

make sure it's not casting shadows

devout heath
#

the object shouldnt be affecting it. it happens regardless if the mesh is there or not ):

blazing gull
#

hm

#

does it happen if the light isn't animated up and down?

devout heath
#

it doesnt flicker, but the fragments are still there, kinda like the first picture

blazing gull
#

is that at an ortho camera?

#

the effect reminds me of z-fighting

devout heath
#

you're right it does kind of look like z-fighting

#

it should be a perspective camera tho

#

oh wait you may have actually put me on track to fix it

#

it looks like the problem was being caused by a really low value on the "depth" field for the light

#

looks that fixed it! thank you so much!

blazing gull
#

ah yeah, that would make sense

real lichen
#

First prototype of an isometric pixel shader for 3d I made. Really happy with the look so far.

low parcel
#

I can't for the life of me get blitting to full screen in a renderer feature to work with the stencil buffer

low parcel
#

follow tutorial to the letter:

#

(not specifically stencil buffer, just blitting)

#

the upgrade guide uses a method that is internal

low parcel
#

That's a good one, thanks. Upgrading to 2022.2 (from 2022.1) also helped

#

there's way too many APIs and examples that are either deprecated or never worked as advertised floating around

#

I've been on this since yesterday

#

Urgh, it works now. Both ways that I tried that didn't work in 2022.1

paper folio
#

How do I always include a URP shader in builds in Unity 2022.2.15f1?

#

I can't add any shader from the URP package in Edit -> Project Settings -> Graphics -> Always Included Shaders

#

I want to add "Universal Render Pipeline/Terrain/Lit" and "Universal Render Pipeline/Terrain/SpeedTree8_PBRLit"

low parcel
#

the Blitter class which is now apparently the recommended API for texture blitting has a method void BlitCameraTexture(CommandBuffer, RTHandle source, RTHandle dest), but elsewhere it's stated that RTHandles can only point to a color OR a depth texture. Is the right approach to Blit twice? Once with cameraColorTargetHandle and once with cameraDepthTargetHandle?

cold ingot
real lichen
rapid pumice
#

Hey, i'm currently experiencing some strange visual artifacts that only appear in builds of my game. It never has any issue while in the editor, but as soon as it's a build version, the strange artifacts appear, on a multitude of different devices (windows, mac AND linux). Does it seem familiar to anyone?

rapid pumice
half storm
#

The below occurs when there are 2+ base camera in the scene and the render pipeline settings render scale is != 1

Any idea why?

simple python
#

why is my tree so black, the image is normal and the rest of the objects are good

simple python
#

it seems normal when i turn the light intensity to 1.5 but the other objects are then lighter than normal

#

the camera preview seems normal

#

Oh, it was just shadows on my post processing

marsh swan
#

I need to create a green outline effect for some of my objects in a 2D top-down game, I'm mainly a programmer so I don't know anything about graphics. Can you please help or at least guide me in the right direction? Thanks!

I'm using Unity 2022.2, URP

PS. I asked ChatGPT and he confidently gave me several ways to do it that were all wrong, and googling gave me virtually nothing.

marble vigil
#

If 2D means you're using sprites, you might want to search for sprite outline shaders specifically

#

They exist in many permutations as well

rich drift
#

I'm having this weird issue with shadows where the closer I get to a mesh these weird shadows start appearing around the mesh's edges

marble vigil
# rich drift

Seems like a problem with screen space ambient occlusion
You could try toggling that on and off to confirm

rich drift
#

I don't even remember adding that render feature

#

thanks

marble vigil
rich drift
#

well who ever set it, needs their eyes checked, those settings are way too strong

dreamy river
#

On a slightly-older editor version, I had this very simple debug function that changes the _BaseMap property of a material that is used by a number of different meshes, and even though it also carried over to editor time, not just runtime, I was content with working with that. Well, it seems to no longer function, I think because of something to do with shader scope or something like that. Any suggestions?

The code:

public void MaterialTest()
    {
        materialInstance = new Material(material);
        materialInstance.SetTexture("_BaseMap", texture);
        Debug.Log("Material (" + materialInstance.ToString() + ") albedo map changed to (" + texture.ToString() + ").");
    }
#

Right now it doesn't output any errors or anything and it does parse, but it doesn't change the material's texture property.

#

I'm thinking that it might also have something to do with instantiation of it through the script, that doesn't carry the reference over.

#

Nevermind I found that the solution was indeed the instantiation of the material.

#

Although I think the reason why I tried to instantiate it in the first place was so that it wouldn't carry over to editor time.

misty abyss
#

So I want to add an additive mateiral (mouse hover highlight) atop an objects material without changing it's layers (so render objects won't work). What is traditionally the best way to combine an additive efect over an object while the mouse is over it and remove it when the mouse isnt?

dusty wind
#

Hey, I have a bunch of materials that turn pink. I have googled it and any of the solutions don't work. I get a bunch of errors when I try to convert from standard to URP. I am using the 2022.2.10 version.

dusty wind
#

Its specifically trees that are affected by this. Could it be that trees designed to be used with the paint trees feature in the terrain tools are the ones getting messed up?

teal totem
#

Guys i have question why when my camera follow player my background jitter my game reasultion is free aspect 1101x519 my background resoultion is 2000x2000 even with lower background resoultion it still do this my camera skript is fine i rlly don't know whats wrong i use 2d defualt URP Project and my camera is orthoraphic what can it be maybe my unity version its 2021.3.16f1

azure forge
#

struggling a bit with GPU instancing, no matter what i do it seems like GPU instancing isnt working

screenshot is 10,000 of the same object spawned (also done it eith 50, 100, 1000, 2000, 5000) but never worked

  • its not the mesh size
  • its not shaders being too complex or not supporting gpu instancing
  • my gpu is powerfull enough and supports GPU instancing
  • theres no animation on the object
  • no lighting being cast or recieved on object
  • no texture on object

theres no difference between it being on or off

am i just missing something?

vague junco
#

Hey Guys,

I got a problem with a URP Build.

A user gets a Native Crash - KiUserExceptionDispatcher.
I was able to identify the SkinnedMeshRenderer causing this issues on a NVIDIA GeForce GTX 1660 SUPER. On Systems with other GPU´s it works without an issue.
Before updating to URP it worked on the machine. Any Ideas on how to tackle this issue down ?

sinful gorge
sinful gorge
# azure forge struggling a bit with GPU instancing, no matter what i do it seems like GPU inst...

The setpass calls are the actual draw calls being done, check the frame debugger to see the actual draw calls. If the shader is compatible with SRP batching, it will use that instead of dynamic batching (unless you remove the support for it in the shader, or disable srp batcher).
That many objects is terrible for performance, especially if all in 1 place, so I suggest to use drawMeshInstanced instead to remove overhead https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstanced.html

sinful gorge
vague junco
sinful gorge
#

Hmm weird.
Does changing the culling/update mode on the skinned mesh change anything?

And does it happen in a debug build?
Then you can read out any errors in the Unity console

vague junco
# sinful gorge Hmm weird. Does changing the culling/update mode on the skinned mesh change anyt...

Not sure, but I enabled changed every option on the skinned mesh renderer.
It even appear on a fresh character without any script or animation on it.

A Error which might Result is this : Unknown bonesPerVertex in GetBoneWeights()
In a newer build I get in addition Kernel index (-4) out of range

yeah also happen in a debug build. But it crash the same way without any additional informations

I had changed every API without a difference. At some point, the Unity crash handler also stopped appearing when there was a crash.

Not sure if its a local client problem with some driver setup or a hardware related issure to the 1660 super

sinful gorge
#

I suggest to make a bug report woth this with all the info you can give. Although if it's hard to reproduce it might not get through (but it shouldn't crash ofc).
Changing the skin weight limit also might help depending on how the model is setup

vague junco
#

Thanks. I also will try to troubleshout it with the tester might init a fresh windows setup to make sure its not a weird driver /OS Issue.
Also might check if its also with another GPU on the same system.

real lichen
#

Is there a way to get a texture of just the objects rendered in the transparent pass in a scriptable render pass? (So not opaques or anything else)

real lichen
dry willow
# real lichen Is there a way to get a texture of just the objects rendered in the transparent ...

Could probably use a feature/pass to render all the transparents objects into a custom buffer rather than the screen. Then remove all layers from the Transparent Layer Mask at the top of the renderer (so you aren't rendering them twice).
Then apply a fullscreen blit to composite, as you mention.

Probably very similar to this example I have (for 2022+) : https://gist.github.com/Cyanilux/3e723b923c4f43d315ad5a55685b5cb9
But that's for opaque queue. You'd want to use RenderQueueRange.transparent and SortingCriteria.CommonTransparent instead.

real lichen
modern prism
#

Hi i've stared using URP. Im trying to add glow effect to my particles. How can i do that? I can;t find any good reference to this

marble vigil
modern prism
#

Do I need global light for it?

marble vigil
#

Make sure the camera has post processing enabled and set Threshold to 0 and Intensity up to exaggerate the effect for testing

modern prism
#

Do i Need global light?

modern prism
marble vigil
#

Since you're likely using the 2D renderer, the particle shader must be unlit

modern prism
#

I didn't work with it before, and Im kinda confused

marble vigil
modern prism
#

It works

marble vigil
#

Increasing emission color intensity makes materials "bloom" more

modern prism
#

What type of shaders should have material?

#

URP/what

#

Or something else than URP/*

marble vigil
#

Sorry for cropping that part out

modern prism
# marble vigil

Thanks you, I'll try it tommorow then. Thanks for your time

real lichen
real lichen
#

I think I figured it out. Nevermind, sorry for the ping

hushed dirge
#

my transparent objects are clipping through each other, how do I do something like a depth prepass in URP?

novel igloo
#

Is there any way to write custom image sampling filters? I have a shader for downsampling images in a very specific way, but I’m curious if I’d be able to simply make a custom image sampler for this that can be applied via import settings instead

placid laurel
#

Do you guys know of any tutorials that explain how to enable opaque texture in the shader graph on modern unity version? Any links i find online are dead and any there is no updated videos on the subject

dry willow
placid laurel
#

is it in like a folder do i have to create it? and how do i make it work for shader graph because i need to make a transparent shader

marble vigil
# placid laurel where i cant find it

Project Settings>Quality have a reference to your URP asset
You can click on that reference to reveal it in the Project window
From there you can select it to reveal its settings in the Inspector

placid laurel
#

i dont understand

marble vigil
placid laurel
#

i just wish i had the resources to teach me how to make a simple transparent shader and i cant do that without urp because its updated and old tutorials use lightweight rp and so i cant

marble vigil
paper willow
#

Hey, I'm not entirely sure, but it feels like enabling GPU instancing does nothing.

#

I'm trying to use noise functions to generate a kind of Minecraft-like terrain made out of cubes:

#

However, the problem is, it really starts to lag with any large amount of cubes. The most I can reasonably do is 20000 (it's a 100x200 map in the screenshot above), after that the FPS quickly falls to below 20.

#

I have created a custom material with the GPU instancing box toggled on and dragged it into the cube prefab. Checking the spawned prefabs, each of the cube's material says that GPU instancing is on. Yet there seems to be no FPS difference.

#

I checked using the Unity profiler, and this is 100% a CPU botleneck.

#

Ideally I would like to render up to dozens of millions of cubes at once, but I'd be happy if I could run 2 million FPS so I can do 1000x2000...

#

I know that what Minecraft does when rendering is it first combines all the blocks in a chunk into one mesh, then renders that, which definitely sounds like a good way to improve performance of rendering many cubes at once. However, I have completely no idea how to do any of that. I'm a complete beginner when it comes to any form of rendering and graphics.

marble vigil
paper willow
#

I know, but the question is, how do I shift it from the CPU to the GPU?

marble vigil
#

Are they gameobjects?

paper willow
#

Yes

marble vigil
#

The simple answer is they shouldn't be

iron compass
#

there is also no simple recipe for how to do it, only principles

paper willow
marble vigil
#

Some options for paths to start from that I know of would be

  1. generating and modifying a mesh using the Mesh API
  2. using Graphics.DrawMesh and related methods to render and instance the cubes at runtime
  3. getting into DOTS/ECS and having the cubes as entities
paper willow
#

Yeah, I guess there's no easy way out of my predicament. I'll have to look into those things whenever I have time.

#

Thanks for pointing me towards something.

surreal jungle
#

Can I somehow optimize my rendering when I have a ton of instances of the same model with many triangles? Perhaps something rendering them together or something along these lines

low parcel
#

I want to render two layers with the same camera and combine them after the fact. What is the best approach here? Simplest to get up and running would probably be two identical cameras each to a rendertexture and combine those in a shader. However, that feels a bit hacky.
Can I create a second RenderTarget in a custom RenderFeature and then use a RenderObjects feature to render to it? Or is there an easier way I'm missing?

#

And can someone explain the difference between a RenderTargetIdentifier and an RTHandle?

brisk pike
#

hi all. i'm a little confused about how to mix reflection probe blending with box projection.

since urp refl probes blend inward, objects lose the probe's reflections as they approach the edges of the box. However, with a box projected probe, its objects near the edges of the probe where the benefits of box projection are most visible. Is there any way I can blend box-projected probes while preventing objects from losing reflections near the edges?

I set up this example to show the issue with an ugly reflection to make it easier to see the problem

bronze briar
#

The URP default shaders just aren't rendering for me

iron compass
bronze briar
#

I thought of that

Object layer: Default
Camera culling mask:

oblique blaze
fierce crown
#

How can I make it so that the shadows are always being rendered at full quality? It seems that when i get close to a shadow the quality increases but if i step back the slightest bit the quality decreases. I have tried playing with shadow cascades but that does not seem to do anything.

real lichen
#

I asked this question a few days ago but just realized the answer isnt quite what i need. I need to apply a fullscreen shader to only the transparent objects in a scene. I was able to do this with setting a FilteringSettings RenderQueueRange to only draw transparents. The problem with this is that the objects will still appear on the buffer even if there is an opaque object blocking it. How can I get just the transparent objects so that when I overlay it with the scene it would look identical to how it normally would look except I can apply a fullscreen shader to it.

modest horizon
quasi drum
#

I am using URP 2D and i dont know how to make the player and enemy sprites affected by the lights.

violet bison
# quasi drum I am using URP 2D and i dont know how to make the player and enemy sprites affec...

This video should still be relevant.

https://www.youtube.com/watch?v=nkgGyO9VG54

Let's learn how to make 2D lights using the new 2D Renderer in Unity!

● Check out Zenva Academy’s curriculums: https://academy.zenva.com?zva_src=sponsored-brackeys
● Sign up for the free boot camp: https://academy.zenva.com/brackeys

● Project Files: https://github.com/Brackeys/2D-Lights

● Unity Samples: https://bit.ly/31vdQ2w

● 2D Light Foru...

▶ Play video
lavish onyx
#

If i'm wanting to use context.DrawRenderers to do some shader replacement, and i want the result to go into a different render texture than the main camera color one, should i be using public override void Configure( ... ConfigureTarget( myRTHandle),

or should i be blitting the current state of the camera color to a separate RT handle?

Because in the case of the former, the frame debugger is showing me a depth render version of the object, rather than my colors.

And in the case of the latter - do I need to make a pass that separates the DrawRenderers from the blit call? Basically, am i ok to blit right after the DrawRenderers call?

real lichen
bronze briar
steady whale
#

Has anyone got any tips when it comes to URP and mobile?

soft lion
steady whale
#

Performance, keeping the frame per second down

#

well fps up

#

tick per frame down 😅

modest horizon
# bronze briar It's not

🤔 is it possible that the cube has the same color with the ground? try changing the cube's color, or lower the camera so the cube is above horizon

flint widget
#

are you using newer version of unity?@bronze briar if so then switch to lower LTS version of unity, I had same problem in newer version of unity. but when I switch to old version with LTS it was working.

bronze briar
dry willow
dry willow
# lavish onyx If i'm wanting to use context.DrawRenderers to do some shader replacement, and i...

Yes you want to use ConfigureTarget to change which target you draw renderers into.
After that, you don't need to blit unless you want to combine that target with the screen somehow. But it is okay to blit straight after, they don't need to be separate passes/features.

I've got a post going over some renderer feature setup in detail, might help : https://www.cyanilux.com/tutorials/custom-renderer-features/
There's a full example section too which does a DrawRenderers + Blit call

quasi drum
marble vigil
#

Looks like you already have some 2D lights up and working

low parcel
#

Thanks @dry willow. I know you weren't replying to me, but that looks like exactly what I was looking for

#

Your tutorial is the only good up-to-date overview of custom renderer features. The documentation is all over the place (and sometimes even wrong) and the API has changed so often it's been incredibly frustrating to figure out.

quasi drum
marble vigil
quasi drum
#

The actual environmental sprites are affected, but I think that's because those have materials on them that allows light to effect them. I don't know how I can make a material work on the player sprites.

#

The rectangle in the top left is going to be a enemy.

#

But it is as easy to see in the darkness as it is in the light.

marble vigil
#

Or any material with the Sprite Lit Default shader

modern prism
#

How can I make only the particles glow? For now i had Global Volume in scene

#

For now every object is glowing

marble vigil
modern prism
#

Ok, then How can i make only stars glow?

marble vigil
#

The usual trick to get around that is to increase bloom threshold and also increase the emissive intensity or specific materials in turn

low parcel
#

Thanks @dry willow. I've not only got it working, but you also gave me a good lead on how to improve my pipeline with MTR.

marble vigil
#

With HDR rendering enabled material brightness can go above 0 to 1 range, so then can bloom threshold too

low parcel
#

One thing though, UniversalRendererData objects have the option to filter by layer in the main renderer (which lets you do certain layers in a custom renderer pass), but Renderer2DData seems to be missing that. Is there any way to do that for the 2D renderer?

#

Not yet sure I actually need the 2D renderer though

real lichen
#

The 2D renderer seemed very incomplete to me but idk maybe I was just doing something wrong.

lime bluff
blazing gull
#

okay, so that's definitely an intense color

lime bluff
#

yes

blazing gull
#

do you also have the Bloom post-processing effect turned on? It would be on the "Global Volume" object by default

lime bluff
#

i removed urp and now i redo all i think i made something not good

blazing gull
#

you...removed the URP?

#

do you mean you uninstalled the package?

lime bluff
#

yes i uninstalled and reinstalled

blazing gull
#

it's very possible that you now have broken project settings

lime bluff
blazing gull
#

notably, these two menus should have something assigned

lime bluff
blazing gull
#

you should be able to just select the existing one

#

unless you also deleted that asset

lime bluff
#

i just have to create a urp asset?

lime bluff
blazing gull
#

the default one is probably fine

lime bluff
#

no maybe not

#

it s in package?

blazing gull
#

if you are using version control, then just go back to before you did this

#

otherwise, you'll need to fix this

#

I migrated a project from HDRP to URP recently

#

I just copied the URP asset from the default URP template and plugged it in

#

same for the quality settings

lime bluff
#

heuuu

#

where is the default urp asset?

real lichen
#

It's in the rendering section when you create a new asset I think

lime bluff
#

ah ok and which do i choose (2D)?

blazing gull
#

i'd just go create a new project from the same template and copy its assets over, tbh

#

i'm not sure if the default values in a new asset match the reasonable defaults you get from a template

lime bluff
#

hmm...

blazing gull
lime bluff
#

i don t wan t to loose all what i did

blazing gull
#

that worked great when I was converting HDRP to URP

#

i had to fix a few materials and crank down the sun intensity

#

and that was about it

#

(and fix my custom post-processing)

lime bluff
#

i don t think my project settings are broken

blazing gull
#

well, you currently have no URP asset...

#

the engine fell out of your car

#

it is broken

lime bluff
#

and i will have to do again all the hierachy?

blazing gull
#

no, you are literally just stealing the URP assets from a new URP project

#

and pasting them into your existing project

#

and plugging them in

lime bluff
#

ahhh ok

#

so i keep the package in my current project

blazing gull
#

yeah

lime bluff
#

ok

blazing gull
#

make a new one, call it something random, and grab two things from it

#

1: UniversalRenderPipelineGlobalSettings
2: the Settings folder

lime bluff
#

i just make a backup before

blazing gull
#

the first one is the global settings asset; the second one contains quality settings

lime bluff
#

but in the new project i have to install urp?

blazing gull
#

you may need to plug the quality settings assets in here

blazing gull
lime bluff
#

ok

#

i hope it will work

#

@blazing gull ok i imported the package

blazing gull
#

you "imported the package"?

lime bluff
#

yes

#

URP

real lichen
#

Just use the urp template, don't worry about the package

blazing gull
#

i said to create a new project with the same template you used for your original project?

real lichen
#

For the project to copy the things from

blazing gull
#

or did you also install URP only after creating your main project?

lime bluff
blazing gull
#

ah.

#

this could be particularly annoying, then, since you might have materials that use the built-in RP shaders

#

this sounds more like a complete render pipeline switch, rather than just repairing broken settings

blazing gull
lime bluff
#

ok i try

#

there is no 2D URP

#

ah ok there is sorry

lavish onyx
lime bluff
#

@blazing gull all that?

blazing gull
#

Yeah, that seems reasonable.

#

It shouldn't matter if you copy the meta files or not. Unity will import the assets if they aren't included

lime bluff
#

with also .ùmeto?

#

ok

#

and now... let s see if it works

blazing gull
#

you'll then need to plug the assets in in the appropriate places

lime bluff
#

i plugged 1 asset

blazing gull
#

at the bare minimum, check that "URP Global Settings" menu, then the individual Levels here

#

i dunno if they will still exist or not

lime bluff
#

ok the second also

blazing gull
#

if they do, click on the name to select it, then make sure there is an asset assigned below

lime bluff
#

where?

#

@blazing gull post processing don t work but it worked

blazing gull
#

did you also configure the Quality menu?

blazing gull
lime bluff
blazing gull
#

yes.

#

Although, since you made this project with the built-in RP

#

it's gonna have a bunch of quality levels

#

I'd just delete them and create three new ones based on the defaults from the URP project

#

high-fidelity, balanced, performant

#

and then assign the assets

lime bluff
#

i just need high quality

#

ultra*

#

bc i won t share it

#

it s a game that i have 1 day to make

blazing gull
#

ah

#

then you can just assign one

lime bluff
blazing gull
#

Yes.

lime bluff
#

ok do,ne

#

now the postProcessing don t work...

#

@blazing gull

blazing gull
#

yes, because you don't use post process layers and volumes in the URP

#

I'm pretty sure these are all from the built-in RP

#

you should have a "Sample Scene Profile" asset in the Settings folder

#

create a new empty game object, attach a Volume component, and then assign that asset in the "profile" field

#

this should enable bloom

lime bluff
#

i create a new game object in my current scene?

blazing gull
#

Yes. That's what "create a new empty game object" means :p

#

This is what you get by default from the URP template (at least, the 3D one)

#

notice that it has a Volume component, and that the SampleSceneProfile is plugged into it

quasi dove
#

I'm trying to create a way for transparent objects to receive shadows but remain transparent in urp and I'm having some issues. Right now I have a material with transparency + multiply blending which almost works. But as you can see has some additional issues(shaded sides are visible, shadows pass through and still cast on the floor)

lime bluff
#

@blazing gull aaaa i have a volume ok

#

and in my camera i put what?

blazing gull
#

zap

#

the volume system is used to decide which post-processing effects are used

#

global volumes affect the entire world

lime bluff
#

ah another question, @blazing gull why are the spikes glowing?

blazing gull
#

they must also have bright colors on them

#

check the intensity of their emission colors

lime bluff
radiant current
#

Bloom effect basically looks at bright stuff and makes it look glowy to the camera.
So all bright things become shiny.

#

Can't get much brighter than pure white.

lime bluff
#

ahh ok

#

i can t change that? (not a problem)

blazing gull
#

the bloom threshold might be too low

#

you can check that on the volume component you just created

lime bluff
#

.9

#

.8 and that s good

blazing gull
#

you can also adjust the intensity

#

i dunno exactly how those two play together

#

i'm guessing it's something like "subtract the threshold from the brightness, then blur it based on the intensity"

lime bluff
#

Hey, how to make glow works in UI?

marble vigil
lime bluff
#

thanks!

real lichen
dry willow
real lichen
#

do I keep the GetTemporaryRT in the configure function, or is there some way I can get the cameraTextureDescriptor in the OnCameraSetup function

#

oh wait I got it nvm

#

I updated my Configure function to this and it still doesn't get blocked by opaque objects

        {
            cmd.GetTemporaryRT(Shader.PropertyToID(transparentsTexture.name), renderingData.cameraData.cameraTargetDescriptor, FilterMode.Point);
            ConfigureTarget(transparentsTexture, renderingData.cameraData.renderer.cameraDepthTargetHandle);
            ConfigureClear(ClearFlag.All, new Color(0, 0, 0));
        }```
dry willow
real lichen
#

That fixed it! Thanks!

olive eagle
#

im new to urp shader graphs. read the urp documentation saying that a greyed out node block is inactivated, but idk how to activate it. thanks

soft lion
olive eagle
#

i needed to change to blending mode alpha and surface type transparent

#

but no matter what i tried couldn't get any outline shader to work anyway

#

so just got got an outlining asset from the asset store and its been painless

#

lol

rapid pumice
#

Hey! Trying again here to see if anyone can help out with the issue I am facing. I'm using URP for my game, and encounter these strange light/shadow artifacts ONLY in builds. There are no issues when running in editor. Both build version and editor version has been tested on multiple computers, and multiple OS, and the issue still persists, but only in build mode. I'll drop two videos showing the issue in hopes that someone here might recognise the problem.

sinful gorge
low parcel
#

I can see that my multi target rendering pass is working, but it doesn't show up in the FrameDebugger 🤔 does it not support MRT?

#

that is, the pass shows up, but it just has rendertarget cameraColor_A or whatever it's called

dry willow
#

top left?

low parcel
#

Ah, you're right! Thanks!

errant shell
#

Hello, I'm new and a beginner to unity and I currently am making a project for a class. I have a problem where all my stuff are either purple, black, or gray. It was fine before but when I relaunched it, it updated to this after installing hdrp. (i was trying to do a lidar scanner tutorial)... I tried looking for tutorials on how to get back to urp or the default when I first started it but I can't seem to find it. Would anyone be so kind to help me figure the problem out?

autumn thunder
#

Hey all, anyone familiar with gun clipping and urp able to help a bit with an issue? I'm experiencing weird rendering of my first person models when rendering it via another layer and renderer feature. In particular, enabling the "depth override" allows the first person models to not clip through objects, but renders submeshes weirdly. Disabling the depth override renders the first person models correctly but the models will clip through other objects. None of the other Depth test options provide the correct effect either. Here is what they do:

  • Disabled, Always, Not equal: Renders always on top, but weird depth issue
  • Never, Equal: Doesn't render
  • Less, Less equal: No weird depth issue but gun clipping, same as if depth override was disabled
  • Greater, Greater equal: Renders only the part that would be clipped into another object

I've also tried the double pass outlined here but nothing different happened: https://www.linkedin.com/pulse/how-prevent-weapon-clipping-unity-urp-without-/

Does anyone have any ideas? This model was made in blockbench and has animations on it already so I don't think I'd be able to combine the submeshes together to "fix" the depth, and I'm not sure if that would be a proper solution either.

Edit: Of course the solution (Or in this case a simple hack) always comes right after posting the question. I decided to create two passes, one using the "greater/greater equal" effect where the clipped in portion renders, and one using the "less/less equal" where the non clipped portion renders, and this allows the whole model to be rendered. I do wonder how this will work with transparents, but thats not something I'm worried about right now.

quasi dove
errant shell
fierce crown
#

What is this pixel thin line that is only visible in build?

real lichen
autumn thunder
# real lichen I'm not sure what you are doing currently, but you could try to use URP camera s...

Thanks for the reply. I wanted to avoid camera stacking due to three main reasons:

  • World shadows arent applied on the weapon and the weapon doesn't cast shadows back
  • Performance issues with re-rendering / culling the entire scene
  • Already using render passes for the fov override, so wanted to keep the functionality in the same "system" so to speak

As for my hack, I just combined the intersecting culled pass with the non-intersecting pass and it gave me the desired result. I'm not sure exactly why as you can see both images overlayed on top of each other wouldn't have resulted in the proper result, but I'm not complaining 🤷

true swallow
#

I think this a URP issue. I have a 3d object on my UI canvas, with a stacked second camera - and I've imported an .obj with it's own material but it's only showing up as Blue on the UI canvas element. Any ideas?

#

when the object is placed in the scene not on the UI camera it's correctly shaded.

#

I suspect its something to do with the shader, but it's grayed out to edit and I'm trying to make my MagicaVoxel workflow efficient by just generating an obj file as an asset.

true swallow
#

Update - the only way I can get it to try and render something close is extracting the material from the obj, and applying as a URP/2D/Sprite-Unlit-Default but then it has some transparency issues

marble vigil
true swallow
#

yeah think that's the issue. I guess that's why 2d sprite shader seems to work partially

true swallow
#

Just annoyingly part way there! Wanted a 3d compass on the screen that rotates on the UI

cloud night
#

Hi, so I have this highway tunnel scene but as you can see it's like all of my realtime lights overlap themselves or just aren't lighting the new objects I add to the scene, but I need all of the lights to be realtime since I need realtime shadows cuz cinematics, how can I fix this? Pixel count is already at max (8), all of the lighting settings are on High but everything keeps looking like this.

Ping when reply thanks.

marble vigil
#

Sprites aren't meant to be UI either

true swallow
# marble vigil An overlay camera will probably be the best way to do that

That's what I've got. Just won't render the 3d object texture in URP I think. Compared to tutorial I watched. https://www.youtube.com/watch?v=8yzpjkoE0YA

Ever wondered how to add a 3D object to your Unity canvas? This is great for screens like weapon select, inventories, skins, etc.

I see this question asked a lot so figured I'd make a quick tutorial on the matter.

❤️ Become a Tarobro on Patreon: https://www.patreon.com/tarodev

=========

🔔 SUBSCRIBE: https://bit.ly/3eqG1Z6
🗨️ DISCORD: https:/...

▶ Play video
marble vigil
#

As comments point out too

#

I feel like he skimmed over every complexity and possible issue of making a setup like this

true swallow
#

It's not a major blocker, I'll revisit. I'm not used to URP tbh so I'm just trying to prototype with what I can. I just went with inserting a 3d object and have it follow the camera for now!

modest horizon
true swallow
#

@modest horizon https://youtu.be/lN9mHYJtc5M like this?

A quick guide to using a render texture to show a 3d object in your UI. This is a real-time object you can light, rotate, scale, etc as needed.

In the video I'm using a pirate ship from Synty Studios - Polygon Pirates.

Leave a comment below and let me know what you think and any content you'd love to see in future videos.

Grab yourself some ...

▶ Play video
sinful gorge
#

Or camera stacking works as well

dim prairie
#

Hello guys, not sure if this should go on ⁠2d-tools or here.
Im looking into ways to optimize my 2d lighting

What is happening is that, on my scene, im using 30 2d spotlights without normal maps, only 1 blend style and it is already lowering my fps from 650 to 250. So, not great.
Been searching the internet for answers and i did all i could and it doesnt really change

Using URP of course

sinful gorge
dim prairie
#

Yeah i have. Im thinking if there is any way to bake the 2d lighting in the editor and not calculating them at real time maybe?

#

I'm not using normal maps, using only 1 blend style, i have 6 sorting layers counting the default one. Light render texture scale is set to 0.238

#

And 30 light sources don't seem like a lot to be honest

#

The only thing i can think about if i cant bake, or do a lightmap or something like that, is to create a script to check the distance between the light and the camera to automatically enable/disable light sources
@sinful gorge

true swallow
#

The render texture video above worked - though for some reason if I set the layer to a custom UICanvas layer the cube wouldn't render - is there a URP setting for specific layers I need to sort?

marble vigil
quartz steppe
#

My 2d URP project isnt actually affected by URP:

#

wtf am I doing wrong?

#

Nvm

#

Im using 3d lights 🤦‍♂️

modest horizon
winged berry
#

I have two cameras. One that is assigned to my canvas and a main camera. but as soon as I add URP asset to the graphics settings the two just dont overlay anymore. I am able to display them both on their own but not together. does anyone know what the problem could be?

marble vigil
winged berry
#

oh, great thanks, its working now

orchid leaf
#

I just disabled urp and re-enabled urp and now non of my materials with emission are doing anything

marble vigil
#

Do you mean post processing bloom?

#

You'd check that the volumes and the overrides are as they should, and that cameras have post processing enabled

orchid leaf
#

I have no idea what the volumes and overrides are

#

Camera does have post processing

#

well the "main camera" does idk if there's anything I have to do on the cinemachine cameras

orchid leaf
#

How did it work before without a volume object

marble vigil
# orchid leaf How did it work before without a volume object

I'm only guesstimating what's happening in your end but assuming you mean bloom it seems likely that disabling URP may have reset cameras and volume components or profiles to their default settings, so check those again
If you uninstalled URP and then reinstalled it wholly, those components might've gotten removed from the scene entirely

#

Bloom cannot work without a volume component with the bloom override and post processing enabled on the camera

orchid leaf
#

Alright I think I fixed it by just adding the volume object with the SampleSceneProfile and it just worked

#

I have no idea why nobody on the internet even brought this up once but thanks

#

I hate Unity so much lol

spark pumice
#

Im having this weird problem

#

can anyone help?

fickle helm
#

Left: Happens when using low/medium quality settings
Right: Normal with High/Ultra quality settings.

Does anyone see anything that would cause this behaviour?

wary citrus
#

Where can I find the URP compatible shaders?

#

wait ok I think I found them. How do I apply them to an object though? It won't seem to let me.

wary citrus
#

like the shader here is greyed out and I can't change it to a different one

soft lion
real lichen
#

If i'm using a custom render pass to render all transparent objects to a render texture, how do I make it where the alpha values on the texture match the alpha values of the objects?

fickle helm
sinful gorge
# fickle helm Anyone know a solution to this?

Is the post processing using HDR in 1 and SDR in the other maybe? (not just the HDR output check, scroll down)
Does it happen if you put the same urp asset into both tiers?
If not, duplicate the working one and change it until it breaks

sinful gorge
#

And if you change it...?

fickle helm
#

gimmie 5 mins, only happens in builds so lemme build

sinful gorge
#

Then that could be a striping issue, that's a very important detail

#

It doesnt happen in editor when you change the active tier?

fickle helm
#

I'll try in editor now

#

ok so in editor: it flashes the blue colour for a couple frames, then sorts itself out

marble vigil
fickle helm
#

So I should untick these and see whats what?

fickle helm
#

oh boy this build is taking long -> I left tripping debug varients on

marble vigil
#

But I'm not sure why that would be dependent on quality levels

sinful gorge
fickle helm
#

I've not updated editor for a while no

sinful gorge
#

You could try?
Maybe it will be a lucky upgrade

#

Im not too sure where the issue could be

fickle helm
#

asfter testing stripping yea I'll update see if tha helps

fickle helm
#

ok so it's this

#

If I untick this, behaves normally

marble vigil
# fickle helm ok so it's this

Good to know!
Supposedly stripping unused variants is a good thing especially for the final build, but it obviously shouldn't strip a variant that's in use

spark pumice
fickle helm
#

but atleast for now it is fixed

marble vigil
#

You're probably not creating the tower procedurally

marble vigil
fickle helm
spark pumice
marble vigil
spark pumice
#

the problem is

#

that the path that the error gives me

#

does not even exist

#

there is no .tmp folder

marble vigil
spark pumice
#

i tried looking for them

#

i only found them while it was installing

#

the URP

#

but none of them were the one that is shown in this error

marble vigil
#

That's not really unusual
Try closing all the programs mentioned in the thread that could interfere with the package manager, restart Unity, try again
You can also reimport the project / delete Library folder entirely

marble vigil
# spark pumice i did all of thoose things

You can also restart your computer to maximize the chances that truly no program is using the files unneededly
If all else fails you can make a new project using the URP template directly and import your assets into that

spark pumice
marble vigil
#

That could be another cause for the error

spark pumice
cyan swallow
#

If I wanted to discard some objects from being rendered in URP, what are my options? As far as I can tell, it's (i) Use layers, (ii) Use render layers (some statements in the user guide that it may take a performance hit, though I'm not sure why. It doesn't support openGL though, so I have to rule this out)

marble vigil
cyan swallow
#

what I'm actually trying to do is have one set of objects rendered to one target, and another set of objects rendered to another

#

otherwise that would be great!

#

so they need to keep the render components, I need to somehow turn them off for the opaque forward rendered pass and then render them into my separate buffer

true token
#

Hello (I think this is the correct channel for this)

I am trying to make a special 3rd-person camera that uses the near clip plane to avoid rendering stuff in between the camera and the player. But I'm having a problem where the near clip plane will cut through the player model if it gets too close.

Does anyone know how I could render the full player model correctly in the camera view while still using the near clip plane (or something similar) to cut out other undesired objects (even if it would also cut through the player model)?

cyan swallow
#

(you could possible also use stencils, but I have no experience to advise with there)

true token
marble vigil
#

And optionally control that fade/clip with scripts to fade out whole objects

true token
marble vigil
true token
marble vigil
true token
true token
#

Basically what I'm wanting to do is to change the near clip plane of the camera without changing the depth buffer at all (so I can properly combine two cameras with different near clip planes)

real lichen
true token
real lichen
#

I just had to set the camera descriptor color format to something which supported alpha. Might be a better way but idk it worked.

undone oak
#

Hi guys! Does anyone know what is the proper way to animate material properties without breaking SRP Batcher?
I have been using animations to control the distort amount of my distortion meshes in the scene, but it seems that the material property block created under hood breaks SRP Batching.

Things I tried:

  • Double checked my shader is compatible with SRP Batch
  • Use GPU Instancing + Material Property Block instead (it works if all meshes are using the same property block, but unluckily it isn't possible in my case)

I know creating material instances & animating through scripts will properly work, but this sounds so hackynotlikethis I wonder if there is a better solution 🥲

placid laurel
#

Hi everybody after upgrade to URP I'm having problems with lights: in the android build the spotlights have sharp outlined border, but in the editor they are ok. Can anyone help me ?

iron compass
undone oak
#

Will try it out if the script + material instance approach doesn't work🥲 thanks tons!

marble vigil
shut wedge
#

Hi im creating basic forest but im having some white things problems
could anyone explain me what could that possible been the cause of this problem

warm island
shut wedge
warm island
# shut wedge and wdym lighting setup

Ok, it's still a really small, dark image and difficult to see anything, but it looks like an issue with the alpha mask on far away LODs. I've had this issue a few years ago but can't remember what I did to fix it.

spring depot
#

What can I do to reduce janked up shadows like this? Here are my URP settings, but it feels like no matter what values I try, I still get the weird shadow jank

#

it gets even worse when you move the camera

solemn zodiac
spring depot
solemn zodiac
#

I wish they added a shadows blending in, which would make it a sort of transition than a hard stop, even tho it is 2x more expensive to sample shadows like that, it would definitely be nice to have that option.

knotty tide
#

any tips why some shadow is mising ?

copper pilot
#

So, anyone know what's up with scene view going gray when enabling deferred rendering? (Game view is as normal)

sinful gorge
# knotty tide any tips why some shadow is mising ?

Which specifically?
I suggest to bake the lighting with this many spotlights. Otherwise check them if shadow casting is enabled on realtime and use deferred for faster calculations with multiple lights.

sinful gorge
copper pilot
#

Restarting fixed it. but was quite weird for a bit. 2021.1

mellow radish
#

Anyone know how i can work around the use of OnRenderImage? Because it doesnt get called in urp afaik. This is the part of the code where it is being used:

        {
            if (_material == null)
            {
                _material = new Material(_shader);
                _material.hideFlags = HideFlags.DontSave;
            }

            _verticalJumpTime += Time.deltaTime * _verticalJump * 11.3f;

            var sl_thresh = Mathf.Clamp01(1.0f - _scanLineJitter * 1.2f);
            var sl_disp = 0.002f + Mathf.Pow(_scanLineJitter, 3) * 0.05f;
            _material.SetVector("_ScanLineJitter", new Vector2(sl_disp, sl_thresh));

            var vj = new Vector2(_verticalJump, _verticalJumpTime);
            _material.SetVector("_VerticalJump", vj);

            _material.SetFloat("_HorizontalShake", _horizontalShake * 0.2f);

            var cd = new Vector2(_colorDrift * 0.04f, Time.time * 606.11f);
            _material.SetVector("_ColorDrift", cd);

            Graphics.Blit(source, destination, _material);
        }```
mellow radish
#

Thanks a lot @dawn raptor ! Ill go through these and try using them, hopefully it works 🤞

low parcel
#

In the Scene Depth node, what is 'eye' sampling?

#

Depth converted to eye space units what's eye space? How does it relate to clip space or camera space

dry willow
floral cove
#

Do I need to use autodesk material just for not dealing with adding the roughness map into the alpha channel of albefo or metalic?

real lichen
#

Is there a way to switch out the URP asset at runtime with code. I want to make a game that can use both the 3D URP graphics in some scenes, but the 2D ones in other scenes.

iron compass
#

you can switch the renderer on your camera at any time

real lichen
#

Ah, Thanks

placid laurel
#

Hello! I have a question about filtering/bluring textures.
In my top down tile based game every tile has a light level.
I want to blend light levels smoothly, but I don't know how.

1st image is raw light texture.
2nd image is light texture with biliniear filtering.

But as you can see blinear filtering is not enough, it looks werid.
I have tried the bicubic filtering (through the shader), but it does not look much better than bilinear.

Please help me to find the way to make smooth transition between light levels!

iron compass
placid laurel
#

I wonder how it is done in minecraft?

iron compass
placid laurel
#

This is minecraft with disabled "smooth lightning"

#

But usually it is smothed somehow

#

You can see different light levels on the picture

#

And there is no blur for sure

iron compass
#

It’s probably a 3d texture ore more sophisticated data structure that the renderer has access to to calculate lighting

#

You have to give the gpu the info in some way each frame, no way around it. You should just attempt to make it as coarse/lowres as possible

placid laurel
#

I've tried to find info about smoothing of light levels in minecraft and it looks like it's somehow related to ambient occlusion

real sun
#

Im looking to make low poly terrain for my game, any suggestions on the best way to make such terrain?

iron compass
#

iirc Minecraft light is effectively baked and does only partially update when e.g. a torch is placed

#

So the ‘texture’ that encodes the light info is infrequently pushed to the gpu

placid laurel
#

Sure, it's a good place to make an optimization, but my current problem is an inability to smoothly blur that texture anyhow

#

Without artifacts

iron compass
#

It’s the same idea behind real-time GI and also unity’s dynamic lights in a scene. Just that with lights the info that the gpu needs is just a position and a level, all the rest is calculated

#

You can do this too: Generate/calculate your light values on the gpu, no need to smooth a texture, as you can immediately calculate the smooth value for each pixel

solemn zodiac
sinful gorge
#

I personally see many people complain that Unity doesn't listen to the needs of mid-big sized games, but most mid-big sized game studios I've heard just do everything in-house and never make a feature request or bug report.

ember plinth
#

Hi, I'm currently working with URP and Assetbundle to make some stuff.
I know Addressable is available but I cannot apply it to my project.

Anyway, The first image is a project that has not been built into Assetbundle, and the second image is when it has been loaded after being built into Assetbundle.
It's seems like shadows are gone.
Any solutions? Thank you

ember plinth
#

Solved Thx

marble vigil
willow rivet
#

hey do someone knows why I have some reflections up here ?

#

I'm trying to make a a sort of outline for my playable zone

dry willow
willow rivet
rare trail
#

hey I'm having an issue with an inverse mesh hull at distance. I can see the backfacing on some triangles at distance basically.

#

im curious if anyone has a quick fix for this or if i have to fix it in the shader

rare trail
#

Same issue as the one before me actually, adjsting the compression of the texture driving it fixed it

lusty quartz
#

I'm having an issue issue with my transparent materials in an active scene constantly writing updates to disk causing a lot of issues with source control. Is this standard behavior?

#

Notably, when actually checking for changes in material, there is nothing. Unity is just causing constant lock-out operation issues with this.

lusty quartz
#

Okay, I think the issue is further narrowed down to any material using "Preserve Specular Light" as a blending mode.

wide shore
#

I'm trying to make a script that can filter materials depending on whether they cast shadows or not.
Tried to use Material.GetPassName/FindPass/etc, but impossible to get a positive for "ShadowCaster". Those materials are all using URP shaders made in ShaderGraph. GetPassCount return only 1 pass and calling GetPassName(0) return "<Unnamed Pass 0>". Best info I can get is with GetTag("RenderType") which correctly return Opaque/Cutout/etc, but that doesn't tell me much about shadows.
Is this normal behavior for URP's surface shader, a bug, or I'm doing something wrong?

low parcel
#

although that's a pass tag, not a shader tag, so you might need something like Shader.FindPassTagValue

#

not sure, I haven't used this API

wide shore
#

Sadly, both return an empty string without raising errors.

mint stratus
#

hello guys! Does anyone know if there are any Histogram/vectroscope that works in URP?
or do we need to capture the image and go to another software...

leaden mango
#

anyone knows what is happening here?

marble vigil
leaden mango
#

oh

noble igloo
#

is there any way to put more than 8 lighths in urp?

icy dagger
#

Or used Deferred rendering, or use Forward+, each come with limitations.

noble igloo
#

wich one would you recomend me

icy dagger
marble vigil
#

Splitting meshes and limiting light ranges can get you a lot of mileage even with the light limit (since light limits are per mesh)
That's how most games out there do

magic oracle
#

How can i blending floor?

#

i dont want to my grass be in one color

noble igloo
wicked vector
sinful gorge
icy dagger
jolly quail
#

hi, i have problem for my VR project urp, so when i use anti aliasing suddenly the UI and some costume shader wont render, already tried to revert the render pipeline to default setting but it didnt works (UI using world space and didnt use any post processing)

sinful gorge
jolly quail
sinful gorge
jolly quail
sinful gorge
#

Possible that version still has the bug yeah

jolly quail
hollow eagle
#

hi guys does anyone know how to make point lights cast shadows in URP

dry willow
hollow eagle
#

oh cool thanks

lost latch
#

Hey, does anyone know why this is happening on things with layer 8? I can't seem to find much info on this online

lost latch
#

I think I figured it out

marble vigil
wicked barn
#

I am trying to set the URP quality level in-game on my HTC Vive Focus 3 headset. So I created several renderpipeline assets with different settings, created quality levels. I'm setting the level with a script at runtime. Every time I trigger the change of the quality settings, the screen turns black.

It doesn't happen in Editor or in a Desktop build, only on the Focus 3/Android.

wicked barn
worthy snow
#

Then I don't know :/ Had the same when HDR was enabled haha Only way I see is try to enable/disable things ...

wicked barn
#

I made progress on the error. It only happens when I change the MSAA setting. If I only change the render scale it works.

lost latch
lethal dawn
#

Hi, I'm wondering something about the Frame Debugger. I use something like this (see screenshot #1) to configure the rendering target. Why doesn't the Frame Debugger show the name of the texture (screenshot#2)? It may seem unimportant, but I have rendering problems right now and I'm starting to question everything I think I know and reality itself, so maybe that would be a good starting point lol (using URP 14.0.7 and Unity 2022.2.18)

gaunt barn
#

Hello, I just created a 2D urp project, and none of the 2D lights or post processing effects anything? I also dont have the lit materials which I see on alot of peoples 2D projects which uses lighting

marble vigil
#

In addition to double checking your post processing setup instructions, do the same to URP 2D setup instructions

true veldt
#

soo

#

I created a shader

#

the coding one

#

and it's using SRP

#

and I don't know how to upgrade

#

I've tried upgrating the material using this shader

#

but do not work

#

I can only create shader graphs for shaders?

#

on urp?

#

other pre-built shaders besides the surface one are working properly

dry willow
true veldt
true veldt
lethal dawn
dry willow
lethal dawn
#

does anyone uses URP 14.x? Is it considered stable? I'm running into some weeeeeird issues

#

the exact version is 14.0.7

#

or should i use an older stable version?

true veldt
#

In my experience, Always the last update of the last version posted last year

#

Does not follow any logic, It's just something I do that gave me some luck with engine related Bugs

dry willow
#

Usually best to stick to LTS versions

lethal dawn
#

yeah ok makes sense

#

thx

#

time to downgrade. I'll let you know if it fixes my weird issues... 😅

dry willow
lethal dawn
#

@dry willow thx, I'll look into that! I'm just trying to draw some objects onto a custom texture, using the depth buffer. Nothing works so far. I'll try URP 12.x, but if it's not working either, I may post here more details. I just can't make ConfigureTarget work for some reason. Thx for asking! ^^

#

your documentation seem incredibly useful, it might come in handy @_@ Bookmarked!

raw gust
#

Cleanup Blit
UnityEngine.Rendering.RenderPipelineManager:CleanupRenderPipeline ()

Anyone happen to know anything about this?

It happens on a very new project when I hit play or exit play. I barely have anything in the project.

I'm on Unity 2021.3.25f1, and it's a Unity3D URP project.

#

I haven't really imported any weird plugins. It's just the new input system, Cinemachine, 2D Sprite..

It also continues to happen even if I turn off the only script that exists or turn off the Player character entirely. At that point it's just a Cinemachine cam, a plane, and a cube left in the entire project.

true veldt
#

hey people, does any one knows if I can access a static function of a scriptable object via custom functions in shader graph?, I wanna simplify my life, and if I manage to create a function that access my little array of colors and parameters, my life would be easier

sinful gorge
halcyon crane
#

Hi! So I just bought a pack from the asset store and I wanted to try it out a bit but I have some problems... So, you can see in the photo that I provided that I can see the shadows of the trees but not the tree... Also I can't see most of the assets from the pack ( trees, rocks, bushes, etc.) If anyone could help me it would be awesome! Also if you need any further details I will bring them here as fast as possible ( The name of the pack is Pure Nature by BK )

placid laurel
#

should the setting be "Always Include"?

true veldt
#

becouse I'm trying to access a c# script via the shader script

sinful gorge
sinful gorge
true veldt
#

hmmm, but here is the thing, I wanna build a kinda complex shader graph, where I can make use of a struct of color/(float)location/texture to create a gradient, the texture it's not relevant to the gradient but will be for a following part of the shader, and I don't want to have to create a new color or go directly to the shader to change something when I wanna put a new color or remove it in this gradient, there is any way for me to do that?

#

without getting too conveluted? I know I can find a way around making a lot of color parameters and floats but that's not very... good looking on the UI

sinful gorge
true veldt
#

hmmm, okay, I'm gonna do the hard way then, but thanks for the help

past spruce
#

Hey folks, has anyone encountered the error below when working on an Intel-based Mac? Any idea how to avoid this error? I've seen a few folks mention it in various places online, but I haven't seen any specific details as to the root cause

-[MTLIGAccelCommandBuffer blitCommandEncoder]:403: failed assertion `Already have uncommitted encoder'

analog sentinel
#

I was just trying out unity's decal projector in URP and the stats window actually displays the batches/saved batches accurately for it for some reason, it doesn't work for anything else though afaik. Any idea what's up with that?

lethal dawn
#

@dry willow dude @_@ Your tutorial is soooo good! My understanding of the piepline is so much better now haha Fixed all my problems. There was a few problems in my code, and now everything seems to work! Thx a lot!!

strong lynx
#

does anyone know why my editor slider takes so much height?

        SerializedProperty colorSpreadProperty = property.FindPropertyRelative("colorSpread");
        float colorSpreadValue = colorSpreadProperty.floatValue;
        EditorGUI.Slider(position, colorSPreadLabel, colorSpreadValue, minColorSpread, maxColorSpread);
        colorSpreadProperty.floatValue = colorSpreadValue;
        position.y += EditorGUIUtility.singleLineHeight;
dry willow
worn hamlet
#

hey so I'm trying to optimize texture rendering, currently using URP and I thought of changing the renderer from HighFidelity to Performant but only for the cameras that are rendering the textures not the main camera, but the option doesn't appear (only the HighFidelity appears)

#

the issue is that I'm rendering several textures that have very high resolutions (on purpose) and I'm looking for ways to speed up the rendering without interfering with the resolution.

worn hamlet
#

I figured it out and now I got no more framedrops

copper pilot
pearl salmon
#

Not sure if this is the best place, But I have stuff in my scene with lightmaps and some without. The SRP Batching is causing them to be out of order like

With Lightmap
No Lightmap
With Lightmap
No Lightmap

what should I be doing to have the lightmapped ones go first so they batch

sinful gorge
pearl salmon
#

i just want all the lightmap stuff to render first then all the non lightmap stuff or something

#

Maybe I’m misunderstanding how it’s meant to work, just getting way more srp batches than I think I should

brave tide
#

Hello, I have problem with shadows, or lights. It's not clear and hard to search because I don't know the cause of this. I want to remove the sharp line between the objects.
Could you let me know which settings to change? It's been a long time since I used Unity and quite hard to find solution alone.

Thanks!

sinful gorge
#

And if performance is fine it doesn't matter much

pearl salmon
#

I see

worn hamlet
#

I am rendering the auxiliary cameras using the performant renderer and I went from having 50-60 framedrops every time I render to having 5-6 fps drops which is not even noticeable since it runs at over 300 fps

copper pilot
#

Nice

queen sonnet
#

I have a question referencing URP.
I have a 2d sprite and what I am trying to do is get certain parts of it to light up, that seems easy enough (I separated them out via photoshop, and divided them into 2 separate sprites, a sprite renderer on an empty game object and then added the light2d script), but I also want to do falloff so that its not just intensity to try and make it "glow", how do I go about that?
I have done it on other sprites by using pointlights, but the pattern on this sprite is too complex for that imo.

dry willow
copper pilot
marble vigil
copper pilot
#

Of course they do

#

I don't recall if the default one has it active, but the sprite lit master node has emission

#

I mean, I prefer not to use the 2d lighting renderer at all but if you must...

dry willow
#

I think you're misremembering. The Sprite Lit does not have the Emission port

#

But you can set the Sprite Mask port, then have a Global 2D Light with Blend Style of Multiply/Additive with Mask(R) to somewhat simulate it.

marble vigil
#

Good to know that's an option
Shouldn't an emissive texture be technically pretty trivial?

dry willow
#

It should just need to add the value on top of the shaded result like the Lit shader does. I really don't know why the Sprite Lit doesn't have that. 😔

primal lily
#

I'm trying to add a probe volume to my scene in Unity 2023.2 and am seeing this error message. Any idea what I need to change? APV doesn't seem to be very well documented for URP right now:

sinful gorge
#

The second means you need to (re) bake the lights

The first not too sure. Did you make an asset for this scene's lighting settings?

primal lily
autumn jasper
#

hi, i have deadline till tomorrow and i need this picture for portrait of my hero, can someone spend a minute to fix the eyes? I lack graphic skills

sharp shell
#

we wont do stuff for you for nothing, why would we

#

also wrong channel

autumn jasper
#

which one is the good one? also i asked for a thing that takes a minute for someone who knows what are they doing, soo....

past capeBOT
knotty tide
#

any tips how to remove this artifact ?

knotty tide
#

i not using it

#

is this mean i need to do something with mesh on 3d software ?

#

yeah. this is baked light for VR
i using baked light to get better performence

marble vigil
#

Enabling lightmap UV stitching may help

#

But more likely it's that your lightmap is too cramped if you have too many complex meshes with lightmapping

#

The chairs for example could be lit by probes instead of the lightmap

knotty tide
#

thanks
i will try it

marble vigil
knotty tide
#

ok

marble vigil
#

To diagnose the problem exactly you'd have to look at the baked lightmap data and find problems there, like some meshes taking up too much space by causing too many islands or islands being too close to each other

knotty tide
#

i still dont know where the problem
so can you mark it for me if you dont mind ?

#

because after i using light probe the result get worse

marble vigil
knotty tide
#

my lightmap padding is 4

#

if that because my large mesh, what should i do then ?

marble vigil
#

An ideal mesh for baked lightmapping consists of angular geometry, if that's an option, doesn't have overlapping geometry and has contiguous connections between geometry
So no loose parts or seams

knotty tide
marble vigil
knotty tide
#

yes