#archived-urp
1 messages · Page 3 of 1
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/rendering/deferred-rendering-path.html
The documentation page here includes most of the differences
#archived-lighting message
Here's also this quick list by me
supplying mesh filter with mesh containing loose vertices causes the mesh to be broken
why is that?
Broken in what way? Having vertices with no triangles connected to them shouldnt be a problem as far as I know (but why would you include them?)
thanks, so other than a higher light count(that doesnt approach deferred), it still is essentially the same as the old forward?
As far as I know it is the same as old forward with the light tiling/clustering, though it's so new I'm not sure there's even documentation for it yet proper
Not having the limitations of deferred is the advantage
found out whats the problem
if i didnt remove loose vertices
yeah, I get that, I just thought there would be more to it than a higher light count. All documentation still points to 12.x and a quick glance at the beta forum doesnt yield more info either. Sort of wondering what the drawback if any between forward/+ or if its strictly a low end mobile reason that the original forward is left as it is
i would break the 65k vertice limit
It will also allow for additional features, like more than 2 reflection probes per object. I asked about Forward+ in the SRP Dev Blitz going on right now:
https://forum.unity.com/threads/urp-forward-tiled-vs-clustered.1342517/
Sorry, meant to reply to @fading seal
thanks!
You can have up to 4 billion vertices if you change Mesh.indexFormat to the 32 bit one. Having loose vertices is obviously just waste of resources, you should remove them anyways when theres no specific reason to have them
I cant find a quick method to detect and remove them. My fastest approach takes about as much time as splitting the mesh in 2 pieces.
for exmaple for a 300k triangle mesh it takes about 45ms to split it and 45ms to remove loose vertices (from one piece, so in total its 90ms for both sides)
Share the code on #archived-code-general so we could try to optimize it together
Has anyone used OmniShade PBR?
Give me your vote guys!
How to reproduce: 1. Open the user's attached project "URP empty project.zip" 2. Observe Scene/Game View Expected result: Baked Shad...
this has been reported a while back but it seems it hasnt been touched
does anyone have any advice on how to have certain cameras have the render get darker the farther away from the camera its looking?
what are the best and most essential libraries that work with URP? I know of shader graph and effects graph... is there anything else?
Hey guys, posting this here as I’m a little lost on what the issue is. This issue is only occurring on a build.
When I use forward rendering on my project, the map appears to appear rainbow from 0,0 like the image below.
When I use deferred rendering, none of the light sources are working except for emissive objects.
This would probably be easy to figure out if it was happening directly in Unity but it’s only occurring once I build the project.
Just wondering if anyone has saw this before?
Are you using any custom shaders on these objects?
No. All of these objects do come from a pack however even objects not in the pack that I know are using the standard Lit/Unlit shaders are experiencing the same.
No idea then, sorry. Perhaps try remaking your URP settings/renderer if it's not going to be too much work
Would those even matter if it’s only happening on a finished build? I figured any shader issues would be in-editor too.
It seems very very much like some debugging mode. I dont think any shader issue would produce that
Yeah that's why I decided to pop it here instead as it's definitely something renderer/build related. I took a dig through settings and I didn't find anything related to debugging mode that would affect this in particular. I do know that I brought it up again some time ago in this chat (what I'm replying to) however that does not seem to have fixed it in this case so it must be something else.
I think the fact that my previous solution/fix was nothing to do with debugging mode and was rather something to do with G-buffers, I believe does cancel that out.
Forward rendering doesnt use g buffer
Proly a fog can do the job here
Ah yes, I did switch to deferred at that point, unfortunately deferred is causing point lights and spot lights to not work in any scene.
Any idea why I have this weird flickering effect happening from time to time? Camera is ortho and Anti Aliasing is disabled
Its also not the background color cause that is #110F1A
AH I needed a sprite atlas it appears
Margins/padding for the sprites, which is one feature of sprite atlasing
@marble vigil happen to have any idea on this issue I’m having now? #archived-urp message
I think I've seen this kind of problem a few times in the past few months in #archived-shaders, but I couldn't find those posts when I looked earlier and I can't remember at all what the cause was
Except that it probably was an actual rendering problem, not a debug view or something like that even if it deceptively looks like one
If you can switch around some render pipeline settings and find what affects it, that could narrow down the terms to google for and find other cases for advice
If you scroll down a little bit past that post I figured that if you switch it to deferred rendering, the entire scenes point and spot lights don’t work.
I wasn’t able to see any results for that.
At this point I don’t care what renderer I wanna use I just want it to not be rainbow and have working scene lights.
It’s so strange because it’s only on the built project. Not when I just hit play.
@static shadow Settings you could try flipping are ones like "Accurate G-Buffer normals" and shader stripping
https://forum.unity.com/threads/shader-graph-material-not-rendering-in-build-using-urp-with-deferred-rendering.1241575/ as suggested with a kind of a similar problem here
I'm not finding the same issue by googling, but if you find the specific problematic setting or circumstances under deferred rendering, that would narrow down the search a lot
Like in the lightings tab or a camera thingy?
Deferred with no accurate g-buffer: no lighting
Deferred with accurate g-buffer: no lighting
Forward rendering with native renderpass: rainbow
Forward rendering without native renderpass: rainbow
I’m trying the shader stripping now
Shader Stripping did the trick. Took 5 hours for a build lol
Hi all, I'm trying to learn how to do custom post-processing in Unity and I'm following this tutorial in the URP manual for doing a fullscreen blit, ignoring the XR-specific stuff
https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/renderer-features/how-to-fullscreen-blit-in-xr-spi.html
I'm getting the error You can only call cameraColorTarget inside the scope of a ScriptableRenderPass though, how can I get around that?
My code for setting up the renderer feature is the exact same as the code in the tutorial itself btw, though I'm using renderer.cameraColorTargetHandle instead of renderer.cameraColorTarget in AddRenderPasses since the latter is deprecated, apparently
Are there official resources to learn all of these settings, features and functions? I have a vague idea of what they all do and can generally achieve desired results by just messing with it but I would love to start really understanding what is going on in order to make more complex SRP features
where can I learn about this stuff
Update: I've changed the tutorial code to pass the ScriptableRenderer in SetTarget rather than the camera colour target, which got me better results but I'm still getting the same error which is preventing the whole frame's green channel being isolated
found the answer nvm
how do i make (using nodes) a variable that goes from 0 to 1 and stops (at a specific speed)
Another update: Rewrote the C# code according to https://github.com/Unity-Technologies/UniversalRenderingExamples/tree/master/Assets/Scripts/Runtime/RenderPasses, which got rid of the errors, but now only the top-right of the frame is a colour other than black, and it's not affecting the green channel of the frame like it should do
another solved mystery for me 😂
If you're using 2022, this is due to the updated API, and yeah, it breaks lotta things especially the render features https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@13.1/manual/upgrade-guide-2022-1.html
kinda sucks tbh 😐
Yeah, you’re not wrong 😢
Thanks for that link though, that should be useful!!
Hi, is it possible to find out which editor version is used for the current state of urp repo in official unity github?
i need help i am making a vr game in urp the problom i am having is that when i build it my camera goes werid like in old tvs where random stuff shows up on the screen but its on the camera so yea idk
hey guys. sorry for the noob question, but why am I missing the Forward Renderer under graphics in project settings and no option to create new rendering asset (forward renderer). I don't even have the option to select Universal RP - High Quatility. I'm using unity 2021.3.11f1
Don't cross-post or send unsolicited DMs, please.
If you don't have an option to create URP files make sure your Unity version installed correctly. Easiest way to start project with URP already activated is through template that uses it.
Professional. Thanks you 🙂
@fleet birch Also make sure that Universal RP was installed in the Package Manager in the first place, tutorial should've covered that.
Thanks, but i literally started the project in URP 3d. it SHOULD be there. im using URP-HighFidelity, and as i can see, the forward renderer assed can be found in Universal RP-HighQuality. but i am missing this also
im trying to copy paste the assets from someone else straight into my project and modify it there
Also note that if you're on newer versions the Forward Renderer asset was renamed to "Universal Renderer", as it can be used for both Forward and Deferred rendering
nice! thank you @dry willow . This info i couldn't find anywhere
What can be done about URP decal projectors rendering infront of custom render object features, seemingly ignoring the setup
Is there a setting I'm missing when adding the decal render pass feature
someone know why the lighting on the floor looks so weird?
When I added a camera to the stack of my base (main) camera my raycasts based on OnMouseDown stopped working, any ideas why?
While using 2D URP pipeline, when I put my spriterenderers on a different Sorting Layer, they go completly black
Maybe you changed which one is the main camera
The new one has render type overlay and it is untagged
idk then
hi all, i'm having an issue when I try to add a Decal renderer feature: "Only universal renderer supports Decal renderer feature." I'm pretty sure I'm using URP everywhere so not sure what's up -- thoughts?
(this is URP 12.1.7)
You could give some info, like showing how URP is set up in the project settings and what the renderer asset looks like
welp, I fixed it. I was using "URP 2D Renderer" instead of "URP Universal Renderer"
I have just added some vertex colors to a very basic mesh and im looking at this extreme slowdown when building:
this is absolutely not worth it and also not at all what I expected. How can I undo the vertex coloring and/or what is the right way to use this? Should I just make material variants with some preset tints instead? 🤔
I have since deleted the objects with the vertex colors yet it still does this when building. It did not do so before and is making the build process extremely slow with no benefit whatsoever (no vertex colors are used in my scene). How can I get rid of this in my project?
i had that problem with one of my projects too but no one asnwered me before
I let it run once and it seems not to bother me anymore now 🤷
alright
My guess is once that process starts going it needs to finish at least once. Afterwards it noticed I no longer used vertex colors so it did not bother me again. While I still like to use them its not so important in the big scheme of things. I still have a lot of trouble with basic things such as baking lighting and the like so 😅 Enough other stuff to focus on
Can anyone else confirm for me that on 2022.2 URP (v 14.0.3) the depth buffer in the game view for gizmos is upside down?
(I'm drawing where the meshes would be if they were flipped in white wireframe, highlighting where the depth tested fade is happening)
how do i make post processing not affect a layer in URP?
i added a new UI camera and created a new layer, then just uncheck post processing. that seems to work, but now i have an issue where there's some items inside a canvas i want to have post and others i dont (screen space camera canvas), is there some way to have some affected and not others? or do i need to go and create a new canvas and separate things out?
i can i recreate that?
just a normal scene with a sphere and a cube?
Anything in the scene should do it, objects seem to occlude the gizmos upside down
mmm seems not to do it for me
Move the sphere/cube over the gizmos
I think it's URP-specific nonsense
interesting what you all can see with renderdoc much more then with the frame debugger allone
the lower one is the result of the copy depth texture
the input texture is the same
so its messed up before that
Yeah, I've taken a gander in renderdoc. I thought I was to blame (or there was something I needed to do to fix it) because I was doing some of my own rendering around the gizmo phase. But no, it's just straight up borked
Bug has been reported, so they can hopefully fix it and I won't have to take bug reports that my own package is broken 😛
i can see how you would thing that is your own fault at first^^ but that the beta for you 🙂
I set the value of the grid snapping on the upscale render texture and the camera began to show the pink screen if you return it back, then everything becomes normal. Can someone help what could be a mistake?
Since lights are per-pixel, to make them cheaper, could I make them like “per 10 pixels”
So the lighting looks kinda blocky
No
They're not per pixel like that
Oh alright
before i cry, i need to know. does the oculus quest support URP textures?
URP handles lighting and shaders, it doesn't touch textures exactly
It looks to me that URP does support Quest
Performance mileage may vary, though
thank you. i'm messing around with it to get a feel for it. but i might just switch to mobile
URP runs perfectly fine on Quest
Hey guys, how can i make a sphere be rendered from the inside on unity 2021? i'm a complete noob. I have a sphere, created a "universe" shader material to it, and i want to put an object inside of it, and when it spins inside the sphere, the background should be the stars from the sphere itself
either flip the normal or just set the material to be two-sided
and you'll still have an issue with camera's clipping
Hi. I have a very specific issue and please keep in mind that I'm a modeler, not a programmer at all.
I need to use 2019.4 for my projects, and only "3D" one, not a URP or any other, it's not for discussion.
If I'm right, shader graph and VFX graph are not supported there.
So I thought if it's still the code, can I just make what I need in URP project and then transfer the code itself to my project? Would this work in theory?
No, it would not work, not even in theory...
HI 🙂 i wanted to make a demobuild of my project today in 3DURP unity 2021.9f1 and my build is way darker than in unity editor scene view
can someone help?
Generate lighting from lighting window
Editor generates it temporarily
why can't I connect this to the vertex?
Because normal from height requires partial derivatives (which are available only in fragment shader)
Can someone help me optimize a scene?
i have a procedurally generated scene (which doesn't allow for baked lighting for all I know) with worse case amount of point lights being 2500
I currently have a culling script that stops rendering anything out of a set render distance and out of the camera frustrum
If someone could help me out that would be awesome! I’ve been having a huge problem where my point lights keep disappearing and reappearing depending on my camera’s/scene view’s position. I have a prefab of a wall torch. This prefab has two point lights. One light where the fire is, to get a nice looking shadow from the metal cage surrounding it. And another point light a small bit away from the torch to light the environment some more. Both lights are set to be real-time. The problem starts when I have 3 or more of these torch prefabs in a scene. They all seemingly turn on and off as I move the camera around. Please help. Thank you.
Is it possible to make lights shine through the fog? Right now only if you make the intensity very high you can see light through fog but is it possible to change how it works
you mean as in light streaks/god rays?
it requires certain light densities to achieve that, or just fake it through custom render feature
Mostly just the light itself not specifically rays or anything
But something like volumetric lights is interesting i think
Thank you so much man I’ll try that now🙏
It's kinda good, the problem is I want good lighting on my office ceiling tiles which the point lights provide. Will light map do the same thing?
Btw thats called frustum culling and is something unity does anyways
I did manual culling for lights because of shadow map limitations
I turned down the resolution and disbled lights out of view.
I would've expected unity to cull shadowmaps for lights that have all their affected meshes culled by culling methods
Nope, once the camera views a light. That shadow map persists which causes the "too many shadow maps" warning.
i'm having some trouble using a framebuffer texture that blits after rendering transparents. i wanna use it on an object that will explicitly and exclusively render last, but i can't get it to not be included in the transparents group when rendering, so it always has a one-frame-older version of itself always appearing in the texture it's using.
i tried several approaches, including using an overlay camera that would be used to render just that cylinder, but i can't get it to do a depth-only clear, so then my cylinder renders on top of everything.
in another i tried tagging the shader of this particular object as an overlay type, rather than transparent type and queue, but that had no effect.
Sorry if this is answered elsewhere (I have googled a bit) but where can I find high level pros and cons of using URP vs. the built in render pipeline for a 2d game? For example, can you use either for development for all platforms, does URP let you get certain graphics/aesthetics that built in cant, etc. Thanks
URP gives you access to the shader graph editor, which can make it easier to develop and iterate on shader effects. On the other hand, it has some restrictions that I am struggling with right now in the shader space (see my above post 😫).
as far as I know, all 2D rendering is effectively the same between URP and legacy
Thank 🙂
why is the decal looking so weird?
like shouldnt it only put the lightning on top of whats behind and not that weird white square?
it's probably not using a transparent material
its using the default decal mat
Could custom fog be implemented with a render feature and be made so it allows bright lights to shine through it?
You mean lens flare?
How do I fix this?
I have already converted all of the materials in my project to URP
All of the other materials on the object are normal
Could always just create a new material and replace it with that one. You probably have to extract materials to get access to it from the import settings of the object otherwise
Change shader from “Standard” to “Lit”
You can override the imported material with your own
is there anyway to optimize transparency for mobile?
i wanted to do something like a low resolution glass
just wondering if that even helps
ok i just found a really popular method for fake transparency that is frequently used in the 90s
dithering
It could be used yeah, its far from perfect but depending on the case can look good enough
ok so i got this result, it doesn't look accurate compared to through the lenses
i think it looks decent enough
I think dithering could be made work with vr too, not sure how
Id try different ways to map the dithering texture/similiar like screen space/uv space etc.
well
that screenshot kind of shows it
i haven't tried it on build tho
only in editor for now
next time when i discuss about it, im going to do it in the #archived-shaders channel instead
how do i disable the urp template fog
ty
Hi guys,
How can i make the fog also "fog" the skybox? I cant effort any store assets and seen some vids for shaders but where would i inject that shader? Can someone help me?
I just made the skybox to unlit shader and made the color match the color of the fog
This is basically the same as having fog affect the skybox
Since the skybox is an "infinite" distance away, it'd always be purely the fog's color (so, no skybox)
Usually the most practical compromise is to draw a gradient of the fog's color over the horizon in the skybox image (if not using the procedural one), this way you can have skies above and far away objects blending with the skybox in the horizon
Another approach is to (usually to supplement the above option) implement a shader that fades geometry to fog color just like normal fog, but also fades geometry to skybox color at larger distances, effectively fading them seamlessly
I'm not totally sure where such shader needs to be implemented in URP in current year
thanks for the input! im now trying to use a mesh with multiple cylinder and apply a transparent material to it, so its transparence adds together so it becomes opaque. but it seems it never gets quite opaque because i can see distance things shimmer through lightly. do you know what i mean and would u know a solution for that?
looks like this
This approach seems quite prone to problems, I recommend the fog color gradient on skybox texture instead
But if you insist on the mesh, then have gradients of different transparency on the texture UV mapped to each layer, with more opaque gradients on the outer ring
the problem i have with the normal fog is, when i rotate the player camera things that were in fog come into view. the mesh thing eliminates that but it comes with other problems like you said ... i remember i used in the past deferred fog but deferred rendering doesnt seem to work in urp and googling about fog you find something about globalfog but that is deprecated. why is fog such a complicated thing 😩
Deferred rendering is available in modern URP versions, but that's not related to deferred fog at all
Fog is calculated using the depth texture which is distance to camera plane, so it's really noticeable with linear fog but less so with exponential and exponential squared modes
The calculation to change that to "distance to camera" is expensive, but not sure if it's so expensive that you wouldn't want it as an option
Surely possible if you end up implementing your own fog
Why isn't all of this simpler to reach and change, that I don't know
Do you know some resources to make your own fog implementation? how do these assets do that? would that be a shader? and then, who would "get" that shader?
I don't know if there's a tutorial for that exact thing
You'd have to look for both how to render custom post effects in URP and how to make that kind of custom fog shader
is it possible to have 2 cameras seeing the same object but with different materials?
Anyone know how to fix this shit
I understand you're frustrated but it's not productive to keep posting this in every other channel
sorry, does anybody know how can i add light cookies support in custom Shaders?
Seems like only Lit shaders support light cookies in URP.
i come from built in where all shaders supported it
Hi all, i have designed a 3D model its unwrapped and it has materials with normal, height, base, metallic, smoothness, emissive maps , id like to publish it on unity asset store, how can i determine and know on what pipelines it is going to be compatible on ? (if its not right channel to ask lmk pls where to post this, and ill delete)
Is URP not recommend for VR ?
It is recommended
https://cdn.discordapp.com/attachments/288887968960086016/1028753139052073041/sw6A3yUj5p.webm
Can anyone tell me what kind of issue this is? I've changed the rendering orders and it seems to only work when the camera is centered, but once I start moving around, you'll notice the sprite start rendering completely over the mesh even when it's still slightly behind it.
The sprite renderer is behind the mesh btw
Being behind the mesh doesnt mean its further away from the camera (measured from the center points)
Does it not? I would assume a quad that's positioned in different coordinates to that of a square would be easily identifiable on its positions. But then again I've not experience on how this stuff renders.
Why is the VR template build in renderer
It can be but its not guaranteed. In this example you can see how the orange wall is clearly closer to the camera (compare the blue lined) but we humans can easily see that the purple wall should be rendered first
URP and BiRP are both viable for VR
Most likely the template was made back before URP had the necessary features and stability to compete and hasn't been given a do-over since, but does it matter?
Yeah, I can kinda see what's going on. It will even render through the mesh if it completely obscures the sprite if the center is far enough away.
and if the mesh itself is very small but directly center to the sprite, this wouldnt occur
No but just wanted the make sure URP is supported, the template threw me off.
for unity trees you have to use a different shader in URP or else they'll be pink
try changing the shader to URP>Nature>speedtree 8
Can you change the transparency of an object with "Render Objects" renderer features?
Tree doesn't accept it
Ok, so apparently this problem derives from transparency sorting since both, the sprite and glass, are transparent. Seems pretty hard to solve for the 2.5D game I'm making, so the only thing I can think of is making my sprites opaque and use alpha clipping to solve this. Otherwise, changing render orderings depending on camera positioning, but that's probably too hard to optimize.
wdym
It says this material does not use a tree shader
And forces me to use tree creator bark
So what do I do
hold on I just tested this
are you doing it like this?
Oh so you didn't have to make a separate material-
youre just changing the shader
Trying to fix this weird foggy/lightning issue on faces of objects- this effect is fixed to the sides of the model and doesnt seem to be a symptom of lightning (changing lighting in any form has not changed the effect at all)
I believe it to be an issue with the Mesh provided to the mesh filter, or something with a UV map...
Its important to note that the models these occur on are not Cube Meshes, but rather imported from PICOCAD. Picocad exports the texture png, a .MTL file, and an .obj file. AS you can see with the brick "standard cube" in the top URP example, the bug doesnt occur on that one at all. Thats just a unity cube model. (That weird gray cube next to it is using the same texture, but appears different due to the default UV from pico8. This isn't too important)
I hear that .mtl files arent supported by unity, but after deleting the .mtl files the objects were completely unaffected, nothing disappeared, so it seems as if they were irrelevant.
This issue does not occur on standard 3D projects..
solved now. Issue with how the normals were set up.
Does light intensity affect performance at all? I know Range does
No, range can affect perf in a forward renderer since more object will have to calculate that light but intensity is just a value used in all affected objects anyway so it does not matter if its 0.01 or 10000
I think all other lighting metgods gets affected by range too (not only forward)
I think you are wrong. Deffered scales with the number of visible lights*per pixel evaluation. Range will not affect performance since lights are calculated per pixel against the g buffer
Unlike forward where it is per object * per light * per fragment
But the amount of pixels processed gets higher when the range is larger?
I think we are confusing range and size here
Ofc a wider spot light for example will illuminate more pixels and hence cost more performance
Range will affect how far the light reaches and cause more object to be hit by that light but in the end the number of pixels in the gbuffer will not change
Both variables have an impact on the number of pixels illuminated, do they not?
Ofcourse there can be a edge case where a really long and narrow spot light for example would illuminate a pixel in the distance, causing more operations to be calculated. However (for me at least) range mainly affect the number of objects being light and that number is not a factor in deffered.
I think the way you think deferred works, every pixel on gbuffer is processed once and list of lights is used to determine how much light each pixel should receive right? However thats not the way deferred works. In reality, every light is rendered using a mesh that represents the light shape (sphere for point light etc.) so that it takes different buffer values and light properties into account (similiar to decal projection). If the camera is inside the light source, the light is rendered as fullscreen quad which obviously is somewhat heavy. The bigger the range, the bigger the light source mesh is and therefore that mesh covers more pixels on the screen -> more fragments.
is it set in the Quality tab
wheres that
have you tried clearing the console output to make sure it isn't an old message?
👍
so i am trying to make a triplaner stochastic shader,but for some reason i can't figure out how to do it,there is nothing on google and multiplying them doesn't seem to work(it makes the color darker)
This is so frustrating. As far as I can tell, it’s impossible to achieve the Depth of Field (blurring in the distance) effect in 2D games if you are using URP. This is such an important/basic visual IMO (makes games like Hollow Knight look great)
- If you use a post-process depth-of-field in 2D, it just blurs everything, the Gaussian/bokeh knobs don’t work (see https://forum.unity.com/threads/2d-urp-and-depth-of-field-post-process.964520/#post-8501321). So some people use two separate cameras, and apply depth-of-field post processing to only the background camera. This is a workaround that works for non-URP
- But sadly in URP, you can’t even do multiple camera rendering EXCEPT “Base” and “overlay”. But for the blur, you need a background camera, not an “overlay” camera in front. You can’t move the overlay camera in back of the base. This was easily doable before URP with the “depth” property. (See https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.2/manual/camera-stacking.html). Sigh.
Has anyone else experienced this?
hello anyone know hoe to solve this error ? Mounting archive file system for lighting data asset failed ? i fount only option to run unity as administratot but it doesnt help :/
is it possible to change the alpha of a specific renderlayer, per camera?
hey guys, is there a modifiable fullscreen roughness texture that i can manipulate with a render feature/ fullscreen pass?
if stuff doesnt work, delete your library folder and restart unity. it will rebuild. That is most common thing to fix stuff. It it doesnt help, then you need to check editor logs to see specific errir,
Yes it is possible. However it will be a bit more like workaround than anything. One apporach to have two bojects which are rendered only in different layers and jsut have different alpha. That duplicates game objects but works as you want. Another one, is to create smart shader , here is an example:
https://assetstore.unity.com/packages/tools/sprite-management/3d-mask-227655?aid=1101l96nj&pubref=sep22tools&utm_campaign=unity_affiliate&utm_medium=affiliate&utm_source=partnerize-linkmaker
Sorry no idea what you want to do. You can just add canvas full screen with texture. To have super simple veriant. you can use Cameras stacking, so render something on one camera and then combine both cameras into one.
https://www.youtube.com/watch?v=OmCjPctKkjw&t=1s&ab_channel=Unity
Other way is just to edit your rendering pipeline , depending on what you are using. But I dont understand your problem exactly, so cant say anything else
In this video we're going to take a look at Camera Stacking with the Universal Render Pipeline, in short URP, using Unity! Using Camera Stacking you can layer game UI in Unity very quickly, and author high quality user experience.
Download the Cockpit demo, along with other URP example projects here!
https://on.unity.com/3jUFeQm
More info on...
Hey, why is my character not rendered as outlined in red? I followed Brackeys tutorial (https://youtu.be/szsWx9IQVDI) so the sprites remain visible as outlines when they are occluded. Any ideas? Of course my sprites are on the layer sprites as set up here. In fact I double checked with the tutorial and it should work. Do I have to check a box in the URP-render settings that I missed?
Let's learn how to render characters behind other objects using Scriptable Render Passes!
This video is sponsored by Unity
● Download Project: https://ole.unity.com/occlusiondemo
● More on Lightweight: https://ole.unity.com/lightweight
····················································································
♥ Subscribe: http://b...
Are sprites rendered in a way that prevents what I want to do from happening?
I'm trying to use this feature in 2022.2 Beta: https://portal.productboard.com/unity/1-unity-platform-rendering-visual-effects/c/1076-decal-layers But the "Rendering Layers" does not seem to have any affect. The decal is still projected onto every mesh, even if the mesh is set to a different light layer than the decal rending layers. Is this a bug? Has anyone used this feature?
it is working, make sure you enable the rendering layer in your urp asset
thanks! Yeah that was the issue
no, not related to camera stacking. I want to modify the fullscreen roughness and normals buffer before lighting is calculated.
in HDRP you can modify the NormalRoughness texture in a custom pass before lighting
i wanna do that in urp
What's the equivalent of LayerMask.GetMask("Some Layer") for the Rendering LayerMask?
Can I do this? (uint)LightLayerEnum.LightLayer1
any of you fine lads know a function that behaves like OnRenderImage() but works with URP? I'm trying to make a function that records each frame (from a specific camera) as it's rendered.
First of all, you need to distinguish between the urp 2d renderer and urp- the former doesn't support stacked cameras and the latter does. 2d renderer is all about 2d lighting, but you absolutely can do 2d games with standard URP.
Second, if you look at Hollow Knight in particular, they aren't using depth of field. They use a single blur not based on depth. So no, the 'depth of field effect' in the effect list isn't what you want, because it is based on the depth buffer sprites aren't writing to.
You could use sprite shaders with depth if you wanted to, but more practically you can just stack cameras and blur the background ones.
Of course, and by far the easiest method, you could just use blurry assets in the background. That's the method I use. 😄
Damn you smart!
You could use a Renderer Feature, specifically one using a Blit (camera source to custom texture ID destination). For example : https://github.com/Cyanilux/URP_BlitRenderFeature
Though if you need to actually save multiple frames that might get a bit more difficult, that feature might be a starting place to look at still.
Since you only want it on a specific camera, if you have multiple cameras can also provide multiple Forward/Universal Renderer assets on the URP asset (i.e. one without the feature and one with) and select which Renderer to use per-Camera.
Alternatively could use RenderPipelineManager delegates to EnqueuePass on the ScriptableRenderContext (similar way you would in a feature, just contained in C# rather than needing to mess with the assets)
https://docs.unity3d.com/ScriptReference/Rendering.RenderPipelineManager.html
i know how to use render features, i just want to know if i can modify the fullscreen roughness and normal buffer before lighting calcs. i dont see anything about it in the docs. @dry willow you probably know
Hi everyone i cant download URP e-book for a while. Unity's website have issues i guess. Can someone share with me ?
The download link on the website seems fine
My day night cycle stopped working correctly when I switched to URP, the lighting stays on whatever i started it on as it switches time of day. But when I manually switch it in scene view it updates correctly. Any fix for this? (dont know if i explained it very well)
Like in play mode the lighting doesnt change as the sun moves
Your materials look like they're reflecting the old sky, you'll need to either make them less smooth or update the reflection probes
Is there a way to just turn off reflections
reduce the smoothness on the materials
Set smoothness to 0 yet the reflections are still on the grass
presumably metallic is also 0?
yes
No idea then
Figured out how to turn them down a lot but my materials still arent updating as the sun moves
Is your normal map texture actually marked as a normal map? I can't see why it would look so shiny if the material looked like that
Apparently i had my normal map as concrete for some reason. I did some other stuff and now the ground is actually changing color but the reflections look weird
Shouldve started the project on urp, but I didnt know what it was before
set lower number of your smoothness
just set it to 0 and see
btw just hop in without seeing the context/conversation above
It's already 0, in the screenshot above
His maskmap doesnt look properly mapped
you'd get yellow-ish color if it's correctly mapped
Proly just a dummy maskmap which I often see people do in #⛰️┃terrain-3d , by just putting a flat greyscale texture which can f'd up lotta things
You must change it via terrain inspector, or it will do nothing, which i dont know why they made it like that
oh now that I think about, proly that behavior due to DrawInstanced terrain... hmm now that makes sense
Thank you for the reply, I appreciate the help. I guess if I want to make an 2D game but with perspective, ambiance, “natural lighting” (sprites are lit based on lights in scene not always lit up) etc., is it recommended to use URP and the 2d renderer, or just a 2D URP game without the 2d renderer?
2D renderer is obviously made exactly for 2D rendering and is the recommended option for 2D games. Id not switch from 2D renderer just to overcome this issue
I haven't seen any reason to move to the 2drp from URP for my 2d game. It would depend on the kind of lighting you want- if you want to use unity's 2d lights, then that's what 2drp is for. If you want to use basically everything else(including camera stacking) use regular urp or built-in.
Though I believe that you can stack 2d and 3d renderers in a single scene(or, at least, that is a planned feature- I'm not sure if that is the case yet since a lot of the 2drp stuff is still experimental)
Also, you need to be using 2021.2 or higher, so if you need a fully stable version of unity that might give you reason to wait 😄
To update scene lighting use DynamicGI.UpdateEnvironment(); this will cause lighting system to update reflection probe and others, the reflections will be prevelant on Metallic materials still, for that you can use RenderSettings.reflectionIntensity = 0-1 to control reflections in your scene. Using RenderSettings.ambientIntensity = 0-1 can be usefull also to better and more smoothly control the transition of ambient illumination.
can I get a little help with lighting my level?
this is currently what I have lit up
as you can see there are quite a few dynamic objects that don't have lighting baked into em, and I want them to receive lighting
I've tried using a light probe group, but it had limited success and tbh using it scares me, idk why they all stay connected and it made the lighting a bit jank
this is quite literally my only experience in lighting a scene in unity so I'm very inexperienced... drop a ping if you can help 😁 👍
What do you mean by this? Light probes (and reflection probes) are the correct solutions
Light probes are like little invisible light sensors you place in places where the light can reach (not inside static geometry) so when you bake they evaluate lighting at their position and at runtime apply that to nearest dynamic objects
Reflection probes do much the same but with omnidirectional cameras to create specular environment reflections
Where are the properties to set the materials colour in URP?
It was here before but not its not
Oh nvm, it seems to be with the shader. Why can't I change the colour on the default URP 2d shader?
Because normally the sprite renderer (or any other 2d renderer) should be taking care of this.
They simply did not expose the property to be editable in the material inspector.
I still don't understand? How should I be editing the properties such as the colour?
Any ideas why im getting jaggered edges in my game? i have AA set to 8x but i can still notice it a lot, even on the shadows you can see the jaggered edges
does it show up in the game view?
if it does, if you're using deferred msaa wont work
in that case use smaa
Sprite Renderer component's color field, which defines vertex color that the sprite shader uses internally for the color blend
Yeah same in game view and built game. How do I find out if I'm using deferred?
check your renderer asset in Assets/Settings
if it's forward and still not working there might be some renderer features that somehow interfere with msaa, in which case you can use smaa in the camera component instead
it's faster too
Thanks guys, will try it out when I'm back on
Hey there guys!
Quick Question: I created my project using 3D URP template. Do i need to keep the URP_Template default files in my project?
I feel i have to keep at least the settings?
You require at least one quality setting asset and a URP renderer to accompany it for URP to work, but you can recreate them if you wish
Hey folks, is anyone familiar with reflection probes? The issue I'm having is in URP and built in pipelines, reflections probes can't be rotated. That means interiors in my game have to sit at 90 degree angles or the box shape of the probe wont fit. That seems like it must be a common issue. Anyone have suggestions?
Hey thnx! That helps a lot
Thanks for the information, I will consider that
Yeah it is set to forward, i have no render features on either
yeah if you have problems with msaa use the camera's aa options
and disable msaa altogether
I've been trial and erroring these things for the past 4 days and it always results in a dysfunctional mess
the engine keeps connecting to probes in other rooms
some rooms have dark spots when I walk through them
are all the different probes supposed to be connected?
should I just use one?
Yes, dynamic mesh renderers always use the nearest probe for their lighting
This means you usually need ambient probes near walls but not inside of anything
Perhaps it's better to find guides or examples
tried that as well, didnt make any difference :/ running out of options here
Hi hi, I got handed an old project (version 2020.3.33f) a couple of days ago, but I noticed that it uses HDRP and I can't make a WebGL build with it. Is there any reasonable way to change those assets to work with URP? I'm very new to Unity, so I'm kind of lost and any hint would really help. Thanks in advance!
The error before building tells me to use the Vulkan API for it but I have found nothing about it online.
Why do these rings appear? is it just my monitor
We can see those too so not just your monitor atleast
So I have this custom render feature / custom render pass that pixelates and dithers and applies a LUT to my frame. I have set the pass event to 'Before rendering Post Processing'. Now traditionally, an event that is labelled 'Before rendering post processing' I would expect to occur before rendering post processing. However it seems to disable post processing, as opposed to simply being drawn before post processing. Anyone have any advice for someone trying to learn SRP stuff ?
Long story short,
I have this gameObject
It simply uses a sprite Renderer and Animator to play a image sequence
How in gods name do I make it render in FRONT of all other objects 😭
I tried adding this in the URP renderer assets
didn't work though, i was just following some youtube tutorial
Also keep in mind I am making this for VR, so i'm not sure if having 2 cameras is ideal for performance
FIXED IT : by setting URP-Renderer > RenderObjects > Filters > Queue to transparent
Is there an auto exposure post processing effect or a way to use the post processing stack in URP?
does any1 know why my overlay camera does not work
i even looked at the video unity has and it still didn't work
There's Post exposure in ColorAdjustment, I think having an auto-toggle for exposure is a terrible idea to begin with 😉
what you want is setup another Volume as local and with your own predefined exposure so you can switch back and forth to your heart content
is there a reason that the frame debugger shows 3 Clear passes at the start of each frame? the third sets the camera's background, as expected, but the first 2 dont seem to do anything.
im currently using URP 12.1.7 with Unity 2021.3.10f1 on macOS
they might be clearing the depth buffer, the opaque buffer or such
check the buffer name if it has one
the first 2 are TempBuffer XXXX where Xs are numbers.
the third is _CameraColorAttachmentA (again, as expected)
perhaps, but it definitely doesn't seem optimal
why so? clear calls are very cheap, they dont copy any data
i suppose. just feels like a waste if it's not actually doing anything
Anybody have an idea how I would go about changing the falloff or attenuation of baked lights? I find that URP's point lights are not responsive to the range setting at all, and I cant light up distances without setting the intensity super high, but that turns the center into a solar flare.
I figured out how to change the attenuation for realtime lights using a youtube tutorial, but cannot for the life of me how to change it for baked lights. I would love to give baked point lights more of a linear falloff. Im using 2021 LTS
Hey! so, I have this scene. All assets are sharing 1 trimsheet texture and duplicated a few times to make a modular environment. When adding simple lighting I get very inconsistent lighting and material from random pieces of geometry (Ignore the untextured assets)
I have tried deleting the lightmaps and rebaking
bumping up the res
ensuring the actual UV's of the asset is not overlapping
removing all lighting and re adding it
Any help would be amazing
yeah.... I did find that. It didn't seem to change anything unfortunately. I'll play around with it some more though
^ Finally was able to solve this. In the event that anybody who has a similar issue, I used the code mentioned in this thread https://forum.unity.com/threads/how-to-override-urp-lighting-lightmapper-to-legacy-fall-off.912116/
URP uses inversesquared lightmapper falloff:
https://docs.unity3d.com/2020.1/Documentation/Manual/ProgressiveLightmapper-CustomFallOff.html
But...
My game got a HUGE glow up
looks like texture mapping issues
Dont crosspost please
where should i post then because im using urp
Isnt it the same post as in #archived-lighting ? If yes, delete one or if not, then sorry to blame you
ok sorry
No worries, its just not productive to have two times the same case, cause people dont know where to continue to help and then dont help at all
Im still trying to figure that out
check your smoothness
Hey all,
I've got a problem with a text (not shader graph) based URP shader - it'll recognise point light shadows (Which I'm grabbing using 'AdditionalLightRealtimeShadow') if the shader mode is opaque but not if it's transparent. I'm sure there's some magic hidden switch or #def I need to apply but no idea what.
the inner hair layer has shadows, the outer does not - different matrial, same shader. If I switch the mode to opaque on the outer one I lose blending but gain shadows:
I should note that the main directional shadow - that's fine, that's recognised. It's just the point/additional lights that are not
If only it were that easy (finally found a solution lets go)
Hi, I'm trying to set up light layers, but our custom shader is not respecting the renderer's light layer.
Can someone advise how we should set up our shader to get the correct light?
We're using GetMainLight to get the light right now.
Do you think this related to the thing I posted above? I'm not sure what 'lightlayers' are tbh but to get what unity calls 'additional lights' (i.e. anything other than the main light), you use
GetAdditionalLightsCount();
and GetAdditionalLight(idx, worldPos);
Ideally the shader shouldn't be to be hard coded, it should only see lights that are on its layer, like the built in shaders
What is a 'layer' in this context? Is it a higher level system feeding in a list of lights that the shader can see?
@polar light on that point, do you know where I can find a 'canonical', minimal custom lit shader for URP, one that iterates through all the lights correctly and replicates the standard metal/rough pipeline as a drop in replacement for a shader graph version? I need to run through the lights myself to implement custom BDRFs to do SSS, anisotropy and all that but it's harder to get Unity to do something slightly off-piste than it is to code it all from scratch in my own toy engine code.
Sorry, light layers.
tbh I'm not the shader guy on the team, I'm just doing some higher level systems.
We're just using URP for the first time also.
Hi, I have a question about the SRP Batch for renderer, I'm currently doing a forest and for a reason I can't understand, some of my trees or rendered on the second SRP Batch but not constantly. Like, I try to have this all the time (I have 4 distinct material in my scene but my trees have 2 so normaly they will be rendered on only 2 batch) (first screen).
And some times, randomly I have a fifth batch who spawn out of no where and split my draw calls in 2 Batch (like on the second and third screen), is this a basic behaviour of the SRP batch in urp, or I have done something wrong ?
it the same material, shader and even same mesh (I have 3 distinct mesh duplicated 300 times for test purpose and to understanding how this works), I only have mooved the camera in my scene
I set up a camera with a render texture and for some reason it doesn't render any of the post processing on that camera.
is the render texture supposed to be using a specific format for it to work?
tried some float varieties but they come out too dark
I have upgraded all of the materials but my trees, bushes and terrain are still pink
everything else is normal
Pipeline converter for materials only works for a specific set of Unity's own shaders
Yea got it fixed
Although now i got a new problem with lighting
My DoF settings are to Start at 250. The cube and sphere are ~10 units from the camera. Can I prevent the edges of these from being blurry? The tree is very far away, ignore it.
post processing from unity registry is not working , i see that anti aliasing is working from default unity but not the imported PP
The post processing stack doesn't work in URP. You need to use URP's own post processing volumes or switch to built-in.
oh thanks brother
🫡
Hi everyone, my players are reporting a strange rendering issue. Happens only to some users, we have still no idea why.
The render game freezes and gets very dark (like a post processing happening there).
They still can move the mouse and use the UI. They can chat with players and do everything else.
If they try to move around other players see them move around. So the game did not crash or freeze.
What can it be? I was never able to reproduce it on our computers
so i have created a simple shader to saturate a given image,and it works in the editor scene,but in gameplay it has an ugly background,any idea why?
I figured out how to do it using RenderPipelineManager, thanks!
Depth Of Field isn't working correctly and I can't figure out why. The white icosphere is the same distance from the camera as the cubes used for the ground, yet it is blurry while the ground is not. The tree is rather far away and should be blurry. What's going on?
This is the same scene with DoF turned off
Can the Global Volume be restricted to certain layers? I tried using the PostProcessing package but it didn't apply DoF blur at all, probably because it doesn't like URP?
DoF uses the depth buffer. If you're using transparent materials (which generally don't write to depth) then they'll be blurred at the same level of the objects behind them.
Its blurring the edges of objects that have an opaque shadergraph shader on their material as well.
DoF off:
DoF on:
I think it's likely you'll just be resigned to that sort of behaviour, as the DoF algorithm can't see behind objects and has to take pixels form somewhere. Depending on the implementation, that may be partially from the foreground. DoF is best for 3D textured games, not this sort of scenario where you can't hide any imperfections
Unless your assets are actually going between depths you should probably just hard code the blur at the asset level at some point
yeah dof doesnt make much sense for 2d
unless you have some sort of parallax going on
Is this a normal amount of processing time for the Built-in to URP converter? It's been processing already for 35 minutes after clicking the "Initialize Converters" button
Had to kill the process and tried again without the Post-processing converter, then it worked ok
How do I switch my project from URP to HDRP?
I'm aware that I have to manually change the materials myself, but how do I switch to the different rp
Cant remove urp package
Says that something depends on it
Im just starting a new project on HDRP and work my way from there. Will take quite a while to get everything back but yeah
Cant
Or, I couldnt find it
This is 3d, I just zoomed in really far in the game view to show off the blur creeping into the 3d model. Can the urp volume be applied to only certain layers like the hdrp post processing? That would make it much easier.
Can I use normal unlit shaders under the URP pipeline?
or do I need to remove the render from the graphics settings?
You would use URP's own unlit shader when using URP
I don't understand the second part of the question
How do I stop my diffgerent resolutions showing different areas while using pixel perfect camera?
is there a way for the material override in a renderer feature to inherit the texture from the objects original material?
Someone know why decals look so messed up for me?
like there shouldn't be that black square around it
I had to set decal option in rendereing asset from automatic to the other one
But how do i fix this case :
the bullet hole stretches :|
couldnt find any fix ugh
I had the dark square issue a while back. I can't remember exactly what I did to fix it, but it was something to do with either adjusting the material or texture alpha setting.
It was something to do where the material wasn't making the alpha part 100% transparent. In your decal material, try playing with all the sliders to see which one can help fix it.
yea i tried all but what ultimately helped is making my code place it just above (according to normal of hitpoint) the surface and reducing depth to really low value too
nothing else worked ^^
getting an extra universal additional camera data script on my camera that i think is causing my scene not to render
any tips?
won't let me remove them
wait fixed it clicked revert on my prefab
It's been a long while since I've looked into realtime dynamic GI for URP, is it still on the roadmap?
Im not sure what you mean by dynamic. Enlighten Realtime Global Illumination exists on 21.2 and later but its not truly realtime/dynamic. Any plans on further improving the options for realtime global illumination I havent heard of (URP doesnt support SSGI like HDRP does etc.)
Does the option allow for updating the GI for the sun position and skybox at runtime at all?
Not sure about skybox, changing the sun direction should be supported atleast
Cool, thanks for the info.
Hey guys, I'm working on a project with a futuristic cyberpunky city. It's at night and raining, and this is within URP. As a tonne of surfaces are very reflective from the rain, and there are a lot of neon lights all around, I feel it would be a huge plus to have screen-space reflections or something similar in the project. Only problem is I haven't been able to find a good solution. Does anybody know from experience a good post-processing/renderfeature asset or something that allows for screen-space reflections within URP?
or if there's just a better approach than SSR in general
it doesnt necessarily have to be free, im just looking for an effective solution with as low an impact on performance as possible
and would really prefer if it didnt mean I had to use a shader and change my materials, as a lot of the objects had shaders created with amplify shader editor to add raindrops and such
2021.3.9f1 with URP 12.1.7 but i'd be fine with moving to a newer unity version if it meant resolving this
oh lmao i was just about to say
i was considering that first one
one of the reviews says that its not ideal for outdoors though
which is my use case, and I'm not sure if that's going to be a problem with all screen-space reflection solutions or just with this asset
the 2nd one requires I use their shaders
or like change my materials to the shader that was created for that
yeah
I don't see what's the difference with using SSR indoors or outdoors, but in any case you're probably not going to find anything "ideal" with these options
yeah
Something worth investigating is if these work for non-planar surfaces as well
the other problem is that $50 usd is a fairly hefty sum since im still in high school (final exams are very soon) and dont have a job
and the international transaction fees every time I try to buy stuff since the asset store wont let me pay in AUD is brutal
yeah that im not sure
i miss HDRP when i could just slap it onto my volume and it just worked
lmfao
BiRP supports SSR as well
For URP that feature is officially at least a year or two away, still
yeah ive just seen unity pushing for people to not use SSR
that and the entire project is already built on URP
cos im already using RealToon and this other funky shader that came with the environment
which wasn't exactyl designed for URP but since it was with the amplify shader editor I could just change it (im worried thats not how its meant to work though)
and im also already using camera stacking which I believe BiRP doesnt have
maybe it does but its not as pretty in the inspector as with URP
ive had to use camera stacking to avoid an annoying side effect of the outline render feature that RealToon has where I cant exclude certain objects from the effect
You don't have much practical options, unless you're into coding your own SSR from scratch
💀
while I am kinda interested in getting better with creating shaders
i have no clue at the moment and dont have enough time to put aside so I can learn it
developing post processing effects is conceptually dope tho
It's really complex stuff
id imagine
looking at the tomb raider games and how those engines got improved from the 2013 reboot to shadow definitely made me very interested in learning more
i could maybe try moving to HDRP because mobile support isnt exactly a priority with this game
im not sure if thats a great idea however
does hdrp get much support
Sure, URP and HDRP are being developed very actively
And they're not nearly as incompatible with each other as they are with BiRP
Still there's a bunch of stuff to rework and I recommend having a general grasp of HDRP before putting a live project through it
that they were maybe considering or working on better like conversion between HDRP and URP
ive used it before as a bit of a meme
it wasnt a super serious project but im a tiny bit farmiliar with it
They are working on that feature currently, called Scriptable Render Pipeline Coexistence
yeah that was it
the last time I used HDRP was 2021.2.17f1
but i had issues with it
like i didnt fully understand how lighting worked
specifically how the light from the sky affected the light in the scene
because id be making new scenes and things would be changing
Mostly HDRP expects you to understand industry standard light and rendering concepts, and everything's a bit more complex
And some features work differently, such as in HDRP you wouldn't use camera stacking, but custom passes instead
at some point the clouds started rendering on top of everything for no reason
out of curiousity, are these close to what you'd be expected to know when working with unreal?
Yes, same stuff for the most part
hmmmmmmmm
my style has always been rather reckless
in that i jump into things i dont fully understand and try to figure it out as I go
cos like otherwise how else do you start game development
im not sure if thats the best idea here but ig i gotta learn somehow
ill make a backup first
If working with complex systems like HDRP or Unreal I recommend starting with very small projects
Or ramping up the complexity by working first with simpler engines or rendering systems like URP and using them within their limits
HDRP does not hold your hand or stop you from messing stuff up
yeah
Worth a try, I suppose
Maybe it'll go smoothly
But I'd expect pain
i mean i've done what I think to be a fair few small projects in BiRP and more frequently recently URP
mhm
*referring to if you plan to convert your project from URP to HDRP
god i reopened that older HDRP project i did and am remembering the nightmare that was the sheer quantity of parameters available
there were so many settings that I had no idea what to do with most of them
like I understand intensity and radius in ambient occlusion for example, and I kinda get qhat the quality section would do, but then like the other half of settings are just foreign
am I meant to need the options to be using HDRP?
because you say that you should be rubbing up against the limitations of URP or BiRP before I start using HDRP, and I'm not sure if wanting screen-space reflections and also the ability to stack cameras at the same time counts as rubbing up against those limitations
hmmm this does seem to imply that this asset would also work for my use case 🤔
i wish there was a practical way to offer demos of stuff like this so I could see if it would work the way I need it to
You will need to at least understand them to be able to fix issues related to them when/if they rise
like they have demo projects which i am downloading
yeah i feel like i dont have enough of an eye for visual effects specifics and graphical weirdness to be able to understand how to fix things that look weird using those parameters
unless I dont know what planar surfaces are, I feel like this implies that it will work just fine
I mean you probably shouldn't be trying to expand beyond URP's limits when you're still learning it
It's fine to do try to hack URP to do something it normally can't, or to swap to a more complicated pipeline to get specific features, but I would only recommend doing that if the project itself isn't big and demanding also
the project is just me, at least for now
If you're kinda pushing your game dev skills to the limit just making the game, converting it to another pipeline and dealing with the incompatibilities is much harder
but there is a decently sized world im assembling using modular assets
its not open world or anything but its not too smalle ither
to be fair I havent gotten very far in terms of scenes and locations
its been mostly planning and creating the basic gameplay systems
You make your own decisions but I suggest doing it in a smallest project you can when expanding into unknown rendering territory
oh you mean the ssrr 2 thing that i was considering?
or with HDRP
cos im not to sure i should try HDRP anymore
lmfao
Both, more or less
mmm
i just gotta figure out how to get basically $100 aud since thatll probably be what it costs after all the markups and extra fees
oh and u dont have to include GST in the price in america so theres that too 
The SSRR stuff may not seem like a big change, but I feel you might end up spending a sizeable chunk of time and effort wrangling all the shader effects together, and there isn't nearly as much official support for custom assets
Refers to flat planes, so no curved surface reflections
Feels like every simple decision has some kind of ripple effect down the line if the project takes more than a week or two
this is intended to be fairly long term
Which is why I recommend a cautious approach
yeah thats kinda why I wish there was some sorta way to demo this within my own project
so I can know if it would work
id be okay with forking the money if i have it on me i just need affirmation that its not going to be wasted
cos even if I do try to get a refund it'll be in USD anyway and like so much of it will be lost in conversion
and i dont even know if ur allowed to do that
That kind of certainty is a luxury you can't really get in game dev
game dev is so expensive
id feel better if the asset store let me pay in aud but i assume unity sees the australian market as dead or something
cant really speak tho cos idk what the logistics are of allowing different currencies in payment
$50 USD turns into $90.42 AUD 💀💀💀💀💀💀 $12 more than if it was at the exchange rate
oh nevermind only $6 cos i forgot about the tax
alright ig ill have to figure this out myself
thank you for your help and advice @marble vigil
Good luck
Hey
i am facing a problem
i dont know how to add multiple colors in the gradient node
I can only have 2 colors at once which is annoying cuz i need like 8 different colors
anyone ?
nvm
i found it
Is there something like 9 slice for 3d object surfaces?
for example this, i want the middle to repeat and the borders to be at the actual borders of a cube
rn its like this, but i dont want the thick lines everywhere, only on the border, and the middle should repeat the thin lines for a grid pattern
How do I use 2D sprites in a 3D environment with 3D lighting affecting the sprites using URP?
nvm, i guess i just use the simple lit shade model
The usual lit shaders work, but not 2D ones aka lit sprite shaders
I don't think you can use 3D lighting at all with a 2D renderer
For some reason, this Sprite isn't being lit by the light even though the path it's walking on is being lit
The light is set to realtime
Even while in the editor and the game isn't running, the sprite isn't lit, but path is
you need to use a mesh renderer
But why would the path get lit up, then?
Also, adding a mesh renderer conflicts with the sprite renderer
I'm not sure why this happens
Giving 3D lit materials to sprites isn't an intended way to use them so they might work weird
Sprite renderers will definitely behave weirdly if you use a perspective camera or add perspective rotation to them
Is there a way I can convert my sprite renders into flat mesh renderers that just have the sprite on both sides?
Actually, I got it to work by removing the sprite renderer and adding it back again, but it seems pretty janky still so my previous question still stands
On a second thought there's a bigger problem
what's that
Sprite shader is responsible for choosing the sprite by index from the sprite sheet
A 3D lit shader doesn't do any of that
Those two behaviours can't be achieved without a new shader, but they're necessary for the effect you need
Ok, so isn’t the solution to just convert these from sprite renderers to mesh renderers?
Sure
There's no automated process to do that by default though
I’m not very experienced with 3d modeling, can I just use one mesh for all of them since it’s just a plane, right?
shader graph has a flip book node fore chosing sprites
A quad will work
Hmm, ok so I create a separate material for each sprite and set the base map to the sprite texture?
Yes
Help
All my textures are purple
I tried upgrading the URP thing but it didn't fix it
If this is what you set out to do, you need to follow every step of the instructions of upgrading the URP thing
you can slice however you like by creating that surface in 3d software like Blender and creating the UVs yourself
Does anyone have a list of all the depth buffer targets URP uses, e.g. for post processing effects? I've just done a minor update through URP versions, and the depth buffer name has changed again - e.g. on most up to date 2021 it's now CameraDepthAttachment_widthxheight, but I swear only a month ago it was CameraDepthAttachment_widthxheight_Depth
I see.. i was using probuilder because thats fairly easy to use. I'll try to do blender after i learn it 
I'm not sure if you can edit UVs with probuilder
Are you just applying it on a cube/quad?
its a probuilder cube yea
you can but i think i have to add more edges to the cube right?
If the UVs are set up on the cube, you could do step(0.5 - abs(0.5 - UV.rg), {thickness}) for the thick borders, and replace UV.rg with fract(UV.rg * {number of lines}) for the thin lines
(Assuming each face has UVs going from 0 on one side to 1 on the other)
(then add and saturate, and lerp between the two colors you want, or if one is black, just multiply by the other color)
My lights and shadows are only being rendered on one eye in VR. Using URP so I'm wondering if there's a setting or something i've missed
Is there a way to have hdrp shaders in URP, not to actually have them be used, but so I can use the settings from them?
Basically I have a script that takes all the textures from a material to do stuff with, and I have a model that is available in HDRP, where it uses the HDRP shader for everything which makes it really easy to tear apart
However, HDRP doesnt have access to OnRenderImage, hence why I cant just use HDRP for this
Hi guys, I'm trying to figure out how to fix the transparency on these trees in URP? Up close they look really good, but maybe 20feet away and further the edges of the leaves have this white noise.
Hope I'm making sense...
I've tried reducing the clipping of the alpha and it just makes the trees bald
I have this little plane with a render texture connected to a camera, but it will only show one flat color at a time. I've applied it to other objects/planes, and it worked on them. Does anyone know what could be causing this bug?
here's my inspector for the render texture and the object it's attached to
Have you checked the models UVs? Make sure that part is flat
How would i set the model's UVs to flat? I'm looking at it rn and can't find anything to tick or change
I'm fairly new to importing models, i've been working almost exclusively with code for the past couple of months
can anyone help me with this?
Yes there are plenty of ways to do that actually. Easiest and free way is to open the model up in blender. Follow a guide on UV's, a lot of simple guides on youtube, and basically follow along with your model.
I have a question. I have this metallic, roughness and specular texture but do not now how to get it working in unity any one help. I tried splitting the texture to red green blue to control the metallic, roughness, and specular. with Red being metallic green being roughness and blue being specular. In shader graph there is no where to plug in the specular. Also the gold is not reflective because of this any help?
This is what its supposed to look like
It might actually be smoothness under pbr master. So you would use a sample texture, what ever the channel you need and plug it into that. You might be able to experiment from there. Good luck
So got a somewhat silly question. The base map's color in the universal render pipeline is still named "_Color" internally right?
This looks like "alpha fringing" which happens when an image editor wipes transparent pixels white when saving the file, so the whiteness bleeds over on higher mip map levels
You can view the imported texture without transparency with the inspector to see if there's white outside of the leaves
oh wait I just realized my question would fit better in vr
Hi there, I try to used the camera stacking to apply 2 different post process, one for my character and the other for the landscape.
My problem is that "The opaque texture" only contains objects rendered by the (base) MainCamera and not for the camera overlay.
Is there any tips to fix that?
hey all, I'm using some render object renderer features, and when I tick the "depth texture" box in the Universal render pipeline asset, the objects im giving a material override start drawing on top of everything, can someone help me understand why it's doing this and how I can get around it?
normal view-
with depth texture enabled-
https://github.com/Unity-Technologies/Graphics
How do I figure out what branch/tag I am currently using? I am on Unity 2021.3.11f1 with Universal RP 12.1.7
I don't see tags for either 12.1.7 or 2021.3.11f1
Based on the instructions, it sounds like I want 2021.3/staging but that seem sketch, there are several patch versions after the .3 what exactly does this tag track
do i neef to aszign pipeline to.all the qualities?
To all of the ones you'll be using, yes
It should only become volumetric if fog is in the way. It should require moisture or something in the air to reflect.
It would be weird to be volumetric all the time. But it would also be ideal to have volumetric when (say) a player breaths in front of the flashlight.
Is there a way to enable multipass in 2021.3?
Hello, new to URP. I am making a stream overlay inside of Unity and I am having trouble getting my background to be transparent. When utilizing the built in pipeline, the background maintained its transparency when built. Inside of URP, I am running a two camera setup. I expected my base camera to be transparent as I set its alpha to 0, however it is a black background when building. Why is this?
is the material set to transparent and the texture is set to use alpha as transparency?
how can i set the color of a 2D experimental light in script ?
you can use multipass
only with 2 passes though
and they have to have different lightmode tags
To add to this discussion on multipass: While you can use UniversalForward and SRPDefaultUnlit, it's not recommended as it breaks SRP batcher compatibility.
Better to use multiple separate shaders/materials or RenderObjects features - either with override material or just to reference a custom LightMode tag.
(I don't know where to ask that : )
Is there a way to know, when I click on a sprite, which prefabs use this sprite ?
(I have some Sprites I think I do not use anymore, but am not sure. I would like to clean them up from my project folder, but don't want to break anything and realize it in 2 weeks 😄 )
This asset is great for exactly that https://assetstore.unity.com/packages/tools/utilities/find-reference-2-59092
Why does the Terrain in URP say that a tree must use the Nature/Soft Occulsion shader, when that shader itself isn't supported in URP?
Is there a way to change the color format of the_CameraOpaqueTexture? It's ARGB32, I would like it to be R5B6G5A1
is urp postprocessing scripts the same as the other postprocessing scripts? i couldn't find the documentation about urp's
Hey everyone. I'm working on a desktop VR game using Unity 2022 and URP. If I create a blank scene except for a plane to walk on and the XR Origin player, Im getting 60 FPS. When I change MSAA from x4 to x2, I get 120 fps. Is MSAA that performant heavy? I thought that was the best anti-aliasing for VR. Im running a pretty decent rig with a 3070.
I have the same issue with .21 and URP. I get two errors about shader graph so I had to reinstall .20.
Same deal for me, submitting a bug report now (several posts on forums as well -- e.g.: https://forum.unity.com/threads/unity-2022-1-21f1-errors-while-creating-a-project-using-a-template.1354277/)
you folks should come support this guy: unity dev teams saying they can't do what a solo dev managed to do https://forum.unity.com/threads/block-shaders-surface-shaders-for-srps-and-more-public-demo-now-available.1350497/page-2#post-8528396
Anyone know of any asset or literature on creating a per object see through wall effect? EG, mask obstructing objects between a camera and another designed object such as a player.
I'm aware of how this can be done with shaders, but that's not really a practical solution given how overly packed our custom terrain shaders already are. I feel like this should be possible with like a second render pass or something, and while I have found assets that do this, they all seem to be fairly old and non-URP compatible.
I don't know how many up to date tutorials there are for it but look into Render Objects feature
Its just me or latest stable Unity is screwed up? I get tons of errors on a fresh URP project
i am using 2d urp and for some reason i cant find point light 2d
It was renamed to "Spot Light 2D"
Anyone who uses Blender, do you know why the Unity import doesn't respect the lit/unlit import for materials? Everything is being imported as lit even though in blender it's clearly an unlit material.
That's because the export format only supports very limited material descriptions
Not exactly the fault of either program
RIP
Hi all! Does anyone know of an example Renderer Feature that renders to an auxiliary buffer and then combines that buffer with the camera image in another pass? Everything I find either uses deprecated RenderTargetHandle or doesn't support XR. I tried using RTHandles but z sorting of objects doesn't work for some reason when I use it with the Render Objects Renderer Feature.
Anyone here have experience with importing textures like this into unity? Can't get it to work properly
Worst case scenario i have to just blend the text of the book into the uv map instead of using as a mask, but then i lose the golden reflection:/
You'd rework it into a pbr standard setup
Meaning you'd have textures for base color, metallicness and roughness (or smoothness in Unity's case) to express the values you're using two separate shaders for here
I'm trying to blit material on my camera texture, but getting a assertion fails at the second blit. Any clue what I'm doing wrong?
class RenderPass : ScriptableRenderPass
{
private string profilingName;
private Material material;
private int materialPassIndex;
private RTHandle source;
private RTHandle temp;
public RenderPass(string profilingName, Material material, int passIndex) : base()
{
this.profilingName = profilingName;
this.material = material;
this.materialPassIndex = passIndex;
}
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
{
this.source = renderingData.cameraData.renderer.cameraColorTargetHandle;
this.temp = RTHandles.Alloc
(
tex: new RenderTargetIdentifier("_TempTexture"),
name: "_TempTexture"
);
}
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
{
CommandBuffer cmd = CommandBufferPool.Get(profilingName);
RenderTextureDescriptor cameraTextureDesc = renderingData.cameraData.cameraTargetDescriptor;
cameraTextureDesc.depthBufferBits = 0;
cmd.GetTemporaryRT(Shader.PropertyToID(temp.name), cameraTextureDesc, FilterMode.Bilinear);
Blitter.BlitCameraTexture(cmd, source, temp, material, materialPassIndex);
Blitter.BlitCameraTexture(cmd, temp, source);
context.ExecuteCommandBuffer(cmd);
CommandBufferPool.Release(cmd);
}
public override void OnCameraCleanup(CommandBuffer cmd)
{
temp.Release();
}
}```
I havent touched unity in a while, but ive started a 3d project with URP and imported a test scene, how do i stop everything from being pink? i forgot
Instructions how to upgrade a project in pinned messages
oh thanks
which one is it, is it configuration/upgrade?
Seems sort of complicated, i have multiple books i want to texture and seems sort of overkill for the purpose, but thanks
I experimented with this recently in 2022.1 and had the same issue... I'm not too sure what causes it - I think that version of the Blitter API just doesn't like RenderTargetIdentifiers?
But instead you can use RenderingUtils.ReAllocateIfNeeded(ref temp, cameraTextureDesc, name: "_TempTexture");, also don't need GetTemporaryRT then.
https://github.com/Cyanilux/URP_BlitRenderFeature/blob/2022.1/Blit.cs
Thanks! 😄 At least no errors now, but I have to figure out why it makes everything black. 😅
Since you have the texture already in an easily modifiable format it's probably quicker than the second option which is to use baking to generate those pbr maps
And possibly quicker still than the third option which is to make a new shader in Unity which uses just one texture map and remaps it to give all the necessary pbr information
The problem with using blender's mix shader to make the materials is that it's not directly compatible with anything else
Yea i am sure you are right, but i have no idea how to do either of those things though, so will not be quick for me
The first option I suggested is not terribly complex
If you have a black&white texture of the book, you could fairly easily map it to be red&yellow for the base color, rough&smooth for the smoothness and use as-is for the metallic
(or invert it, depending which way the mask map is)
I can remap the texture to be red & yellow within blender?
Is it possible to set a material value by script to individual objects when the material is set as a render object in the render features?
I'm guessing that the material override doesn't create material instances therefore it would change the value for every objects at the same time?
So the metallic texture will tell the BSDF where to be metallic?
Would be quicker in an image editor, which blender is not
Blender would require you to do it in the shader and then bake that into a texture, or have a compositor setup for it
Idk if i need the texture for roughness, so one red and yellow for base col and one black and white for metallic
I'll start there
Yes
Blender's and Unity's shaders (as well as PBR shaders of other engines) are very much compatible if you use them the same way, by defining inputs with floats or texture maps
If you have more questions I recommend moving over to #🔀┃art-asset-workflow
Even if it did create an instance, it'd use that instance for every object it renders
Yeah right😕
Is there an alternative or I'm I completely screwed?
Depends what the desired effect is
I don't know at all how the render objects feature can be scripted, might even have something for the purpose
If not, I guess you could swap out select objects from one render objects feature to another, which has another material you control by script
Changing material properties by script isn't the only way to change object appearance if you know your way around shaders a bit
The problem is that my objects pop in when they spawn behind walls. When they spawn in front of the walls they have a fade in effect. I was wondering I could replicate the effect with the see through material.
There seems to be a gigantic bug with the 3D (URP) template right now. You literally can't create new projects with it using the newest Tech Stream version, because you'll get the "Enter Safe Mode?" box and are then spammed with error messages telling you that the folders from your urp package are immutable. I feel like this needs a very urgent fix, as creating new projects just doesn't work... no idea where to report this. There's already a thread about it in the URP forum
I'm having an issue where spotlights' shadows are a much lower quality than the light's
What exactly am I missing?
You can use the bug reporter
If there's already a thread about it with traffic, they probably are aware of it
This is the last place the devs are likely to look
Directional lights and punctual lights have separate quality settings, which can be defined in the URP asset as well as per light
Additionally punctual lights are unaffected by cascades
ok well after messing around a bit more it would seem maxing out the range of the light screws up shadows
Right, spotlights had that kind of quirk
More angle causes perspective distortion on the shadow caster texture
Similarly to a camera when you increase the FoV a lot
I'm really starting to hate unity's lighting system lol
Realtime lights and shadows especially are hacky and complicated in every engine out there, due to their nature
I want to have a 2nd camera show a "bird's eye" view of the entire scene (think the top portion of the screen in the arcade class "Defender". Is there a good example of doing this as a split-screen? My project is using URP.
how can i make partciles emit light with URP? I can't drag URP lights into light field in particle system
I think you'd need to create a material for the particles and set it's Emission.
hmm, it still doesn't emit any light, just is lit
from what i read emissive materials must be static to illuminate objects, so i'll have to use normal lights, but after adding URP to the project normal lights don't work anymore, anyone know why?
@stable wraith is it URP 2D?
yes
URP 2D disables all 3D related things, iirc, including lights
You'd have to use 2D lights
But since particle system doesn't recognize 2D lights you'll need a workaround such as one here
Not sure if this is even the right to post this since 99.99% chance this is just Unity being a buggy mess. But anyone know how to get this error to go away? Default renderer is clearly set and all the cameras using it are behaving as expected. Restarting Unity has not helped.
(not sure where to ask i just joined) i tried to optimise some shader variants and add a logo (after a successful compile) then unity showed me this
(unity ver : 2021.3.2f1 and DX11 on URP)
(edit :
I removed my 2 shader variants and the 2 shaders from always include and it fixed it(>200M variants).
However, should i report it as bug or?)
I mean.., One shader can indeed make a lot of variants. Did the shader contain a lot of branching that would cause all those variations?
Hello! I'm porting a level from an already built unity game into... well unity. I'm having a lot of trouble with the textures, there are loads of meshes and i really don't want to assign the correct material to each one by hand. Any Idea how i can do this without wasting days of my life?
I'm on 2021.3.5f1
I believe so, yeah. they're all in the shaders folder, lol
Sorry haha, i'm really new to 3d stuff but I'm really good with computers otherwise
i had a closer look and a lot of stuff is assigned, yet still pink and black squares in appearance.
do you have any files under the root Assets/ that have a rainbow gradient with an S in the middle as an icon?
Nope, sadly. No loose files at all
not in the level folder or the actual whole project folders assets, i mean
as in, across the entire project 🙂
lmao whoops. I can't see any, is there any keyword i can search? there's a whole lotta files and folders.
oh my god sorry dude
all in the shaders folder
jesus christ lol sorry
did you write them?
nope, i'm trying to port a scene from a game into another game
they all have parse errors if that's relevant
ah... they are surface shaders though aren't they
possibly.... they all have an s and rainbow on the icon
The game i'm porting them to doesn't have code mod support yet, so shaders wouldn't translate regardless, right?
can you open one and paste a sample here?
just a chunk of the text?
preferably the top, before you see a cgprogram or hlslprogram
Properties {
_MainTex ("Base", 2D) = "" {}
}
SubShader {
Pass {
ZTest Always
ZWrite Off
Cull Off
Fog { Mode Off }
Program "vp" {
SubProgram "opengl " {
Bind "vertex" Vertex
Bind "texcoord" TexCoord0
"!!ARBvp1.0```
down a bit, do you see a #pragma surface?
ah no probably not with this file though
try searching through the different shaders and see if you can find a pragma surface
i cannot find any, i've looked through about 6 by now, and with the above thought considered, would it be a better idea to just delete the shaders from the unity project?
well i have both great news and bad news
lol, yeah?
essentially you're trying to convert a BiRP (built-in pipeline) project to a urp project... the main issue with this is that all custom shaders for BiRP will not work out of the box if they're just thrown into a urp project
ahhhh, right
the good news is, all of your shaders are either postprocessing shaders or unlit shaders
even though they are incompatible out of the box, they are pretty easy to convert into urp
for the rest of the materials in your scene that don't use custom shaders, you just have to select all of them and use the 1st party conversion tool
i'm honestly quite fine without them atm, i'm super new to modding and i might go ahead and add them when i'm 100 percent sure they'll work, when code mods are finally added to the game. Main priority is 'making texture work gooder'
alright
Also just to let you know rn, thank you so much for helping me
if you want to get the custom shaders to work, you either convert them to use urp's unlit shader syntax or you convert them to shadergraph, both needing basic shader knowledge
christ
I've got no experience with any of this stuff, until about 3 months ago. i'm only doing 3d stuff just so i can play my favourite maps in a vr game, haha
anyway, where can i find that conversion tool?
good news and bad news
good news is, no more squares! bad news is, completely pink
the screen? or the scene?
all objects in the scene
can you show it? it's probably your postprocessing shaders
I recommend we move to a thread
done!
Anyone know why my skybox is different for each eye in VR?
It's rotated for one eye and I'm not sure why
Hi! I am having an issue with URP. So in the scene my light looks like this but the game screen shows the light on this weird side bar. I do not know how to approach the issue, so I am asking here
I got this when upgrade unity from 2021 -> 2022 (even got it when creating a new 3d URP project from template). does anyone know how to fix it?
Having some weird transparency issues regarding trees with alpha textures
anyone know how to fix
You mean the grid? That won't even show up in game
Looks fine
Also, does anyone know how to deal with back side of doubleside texture being too bright?
Does anyone know why the reflections disappear when I pass it to the Meta Quest 2 on an Android project? Thanks!
Why can I see gaps between my objects when they are perfectly next to eachother?
how do i make this less blurry? im using urp and this is what it looks like on game start
does anyone know how to fix it? I still got it with a new empty project on 2022.
Haven’t seen any useful responses on the forum yet, and bug I filed on this last week is still yet to be assigned, so think the solution is just wait for the next version update where they (hopefully) fix
See #archived-urp message + a little bit up from there for more discussion on it
Please do not crosspost so people don't spend twice the time answering
on sprite, select it as filet Point (no filter)
thank you
im so lost i imported a package and it was all pink
then i installed the urp package
and tried to update some of the materials and now they are gone pink too
does anyone know how to fix this
does urp not support custom .cginc?
which render pipeline ar eyou using currently?
Trying to setup urp and make a simple shader - am getting these errors:
Am also having the pink thing happen, but that might just be because of these errors
Also fyi this is unity2D and I'm using the 2d urp and renderer
using 2d unlit shader graph, if that matters
Also here's that line 21
So after deleting library and reimporting everything, that problem went away. But the other issue is, since hooking up urp in 'Graphics,' my camera can't see anything in game view
Try remaking the camera. URP puts a specific component on cameras that I can't remember off the top of my head. Making a camera will automatically set it up for URP.
Universal additional camera data component
i went to project settings there was no render pipeline asset selected
so then i installed urp
idk what i did ibr
but it doesn’t matter now i deleted the project
That means you were using the built-in pipeline
So urp materials wouldn't work
Until you actually switch to urp
i believe i did that
when i installed it
and used it
Installing the urp package alone will not do anything. You have to do all these steps to make it work: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@7.1/manual/InstallURPIntoAProject.html
yeye i did this
its fine now tho whatever
Hmmm, I actually have that component on the camera, and still can't see the game view. It's an orthographic 2d camera for reference. Strangely, it shows things in the preview:
but then the actual game view:
The UI still shows, but that's a different camera. And the only apparent difference between that camera and this one is the culling mask and priority
In URP you need to use the camera stack feature to stack rendered images from multiple cameras
Guess that means no UI camera
Do verify that the scene shows up correctly with just one camera
Oh wtf, despite that, I changed the UI camera to overlay and now it all works
nvm, fixed.
Hmm, so I'm in shader graph, with a _MainTex which is basically the whole sprite, and a _SecondaryTex which is a secondary texture that should be overlayed on the main sprite that I can color change. What is the right way to Blend them to make the secondary texture sit on top of the main texture? I've tried Overwrite and Overlay on the Blend node and neither seem to work
(I'm taking the secondary sprite and color changing it before blending)
Should be Overwrite mode, with the Opacity set to the A output from the _SecondaryTex
Or can use a Lerp node
Yeah, it works. I just had to mess around with the order and such
So, can't you grab the exposed properties from the material itself?
Ah, you have to do 'SetX("stringName", value);
So I recently brought this URP asset that I want to use as a shader for a mesh, but the shader is in shadergraph format. Is there a way for me to convert it into a usable shader?
Select the shader and in the Inspector panel there should be a 'View generated shader' button.
Not sure what you mean by 'useable' shader though.
I got it! I had to switch the pipeline to URP since it doesn't work with the default one, but now I have different issue
Is there a way to sort of "shack" a shader on top of another? Because I want to add this aura effect to my mesh, but when I do, it replaces the original texture to the one with the aura
This is how it originally looks like
I can't seem to be able to paint textures onto my terrain, i've got a brush that isn't "read only"
The textures just aren't going on tha dang thing
Thing is, the terrain is only showing what i set the material as, nothing else. painting everything else works bonzer yknow
just add them
Anyone know why my grass is mysteriously darker sometimes?
It seems to be related to how its rotated somehow but I don't want that
Hey all, is there a way to set a material to fade/cutout within URP? I'm looking to be able to fade an object in or out at runtime and I only seem to be able to set a URP material as opaque or transparent, and transparent leaves the material partly transparent.
The rendering modes were renamed to be more (or perhaps less) standard
Cutout -> Alpha Clip
Transparent -> Premultiply
Fade -> Alpha
All I see are Opaque and Transparent when using any URP shader though
They receive global illumination from lightmaps
Which is really not well suited for detail meshes like grass, and causes them to self-shadow inaccurately
I'm using Universal Render Pipeline/Lit currently, and any of the alternatives still only give Opaque or Transparent as the Surface Type options. When using Opaque, blending modes aren't available
Opaque materials don't do any blending, how would they?
Hence you don't see blending mode options for them
I don't expect them to necessarily, but setting the Surface Type to Transparent always seems to leave the object semi-transparent regardless of the blending mode
Perhaps the transparent areas of your texture aren't perfectly transparent
As it stands "premultiply" renders shading from light for fully transparent regions, "alpha" does not
As it is I'm going off of the preview window inside the inspector and the objects/enemies seem somewhat spectral. I'll try opening it in play mode and see how it renders then
Verify the transparency of the texture
hello, i'm new with rendering in Unity. i'm following a URP tutorial and it said that i have to create a render setting(?) and choose the "Pipeline Asset (Forward Renderer)"
but i'm on a much later version than the tutorial. here are the options.
what is the equivalent for "Pipeline Asset (Forward Renderer)"?
Urp Asset (with Universal Renderer)
i see. thank you very much!
I tried again and did some more digging online but so far haven't come up with anything. When the Surface Type is set to Opaque, the only way to make the object transparent is by enabling Alpha Clipping, and that has a hard threshold. Essentially when the shader is set to URP/Lit and the Render Mode is set to Alpha (the equivalent of Fade, as you mentioned), objects look kind of like their normals are flipped or something.
The textures themselves don't have transparency, so I would expect them to look fully opaque when the alpha is maxed (255). If I decrease the alpha I can fade the object out, but even when the alpha is at max the object doesn't seem to render properly. I've included one such enemy (with alpha set to max) as an example.
I have 2d sprites in a 3d URP project, when the camera moves they disappear/reaper and I'm not sure why, example:
at Z: -3.4
Z -6.27 (camera)
This is a limitation of transparent rendering, faces within a mesh aren't sorted by depth
You'll see it in countless older games, they tend to minimize it by swapping to a transparent material only when fading out the solid object
You can improve alpha sorting within the mesh with a shader that forces ZWrite on, though that can cause unpredictable results when depth sorting multiple meshes
Having a material transparent at all is a bunch more expensive to render and probably will exhibit some depth sorting weirdness so you'll want to use it sparingly anyhow
Is the ground a sprite as well? If so, I assume it's being depth sorted by its pivot point like all sprites, so the trees disappear behind it when their pivot point is further from the camera than the ground's
Its a plane with a texture
I fixed it by setting the tree sprites to default layer
But now if I move the camera there's a weird parallax effect where the ground moves at a slightly different speed than the trees
Which shader?
Thank you! I think what I might do instead is switch to a transparent material when fading objects in/out then (and save the object's default mesh renderer to a variable so I can switch to it after), that might be the best way to do it.
hey, is it possible to create new material types for URP shaders that'd then go in this list? I wanna create a physically accurate water shader but it's pretty hard to implement proper refraction and transparency when using the metallic & smoothness in a regular lit shader
(the goal is to create something like unreal's single layer water shading model btw)
thanks
actually that doesn't seem quite like what I'm asking for
this is to create "child" materials
I want to create an actual new shading model to replace the regular lit one, so I can properly integrate refraction during the final lighting calculations instead of having it go into the color output and then having smoothness/metallic ruin it if they're anything other than 0
implementing multiple lights is going to be quite hard
right now I don't think I can do that other than straight up writing a shader in hlsl myself and not only is that pretty tedious in URP right now, it also won't let me use that shader as a base for any other shader unless those are directly written in hlsl too
oh I think I misunderstood you
you can do it though https://www.youtube.com/watch?v=GQyCPaThQnA
✔️ Tested in 2020.3 & 2021.1
Do you have a material that doesn't look quite right in Unity's URP lit shader graph? Or would you like to experiment with stylized art styles with the convenience of the shader graph? In this tutorial, I show how to implement custom lighting, allowing you to solve both those problems. Afterwards, you could extend t...
multiple lights shouldn't be complicated, I'll just do it the same as unity's default shaders
I just want to do the refraction directly in the final calculations with metallic, roughness, etc so it's done properly
then the above video should work
okay
as you're trying to avoid calling the urp internal phong shade function
cause rn if my surface is opaque and I sample screen color to fake transparency and do refraction, the whole surface will be treated as opaque when unity does its own calculations afterwards, resulting in something like this
So a game project I'm working on uses baked lighting for the most part as the primary lighting method,
but we want to have a procedural/alternating room layout system
to change between player deaths or level resets.
The problem with this is having different room layouts would require
different lightmaps, how would I go about making several different lightmaps for
one scene and have it switch for different layouts
I've tried using realtime lights as an alternative, but the results are not the best
I added a urp unlit shader as the material for my sprite, and now whenever I flip the x axis the sprite disappears completely.
Is that normal?
(also if I flip y axis)
Oop, figured it out.
Sorry for the late ping. How should I set up the prefab to make it look good? I set the mesh renderer to light probes and it still doesn't work.
You probably don't want grass meshes or any other small detail meshes to "contribute to global illumination"
Or if you do, to not recieve lighting from lightmaps
Does it happen only when baking or with purely dynamic lights also? I would try to verify that in a new scene with default lighting
If it 's not shadowing in the grass's baked lightmaps, I'm not sure what it could be
It seems I answered a different question than from the one you asked
The lighting looks different when rotated because a two-sided material only calculates lighting on the "out" side
Which is then duplicated
Contribute/receive GI is irrelevant if you're not using baked lighting, sorry about that wild goose chase
no worries
Still got an opportunity to learn some stuff about unity
Is there any way to get the effect I intend out of this grass?
I expect that instead of using "two-sided" material you'd duplicate the faces and flip them (or preferably just the normals) to make them two-sided manually
Alternatively you could use a shader that flips the normal when the face is viewed from behind
I have no idea why the two-sided option doesn't do that normally
Ok that seemed to have done the trick
Is there any downside to GPU instancing?
How do I add?
Assuming the second is unlit, just add the fragment colours of the shaders together in the combined shader. If it's lit, then put the top one as emission
are there tools in URP right now to set up planar reflections or is this something I gotta implement myself?
is there a way to make a UI image shiny? (like when you have a material and you give it emission)