Unity 2D shader graph not correct colored - unity3d

I tried to create outline shader for my Sprite:
I watched tutorials on YouTube (CodeMonkey and Brackeys) about this, but it worked by half. In Scene Graph I see preview:
But outline color I so faded:
And also I can't see this shader on Scene Preview:
What am I doing wrong?
Thanks for your attention
P.S.: Of course I set render pipeline like on this video
P.P.S: Material settings:
P.P.P.S: Shader file

Ok first of all you hadn't set the color in the according Outline Color slot int he Material settings.
Then what you are using is Add which results in additive color combining towards white.
Since your original texture isn't fully black but grey-ish the outline color is added to the already existing color(s) making it also lighter!
Instead you could use a Blend node and re-use the output of the Substract node as blend texture (Opacity).
Then you have to play a bit with the mode but I think maybe Overwrite or PinLight would be what you want.
(Actually you wouldn't need the additional Multiply node for the Outline Color)
Btw before you added your file I just reproduced one from scratch and it is way less complex than yours ;)

Related

I want to change a specific gradient color to the color or effect I want in Unity Shader Graph or with Shader

First of all, my English skills are immature, so the translation may be awkward as it was written using a translator. Please pardon this part.
I am an aspiring developer who dreams of becoming a game developer in Korea. I am in the process of creating a portfolio for employment and I have chosen CultOfTheLamb as my portfolio game.
However, an issue occurred while making a game mockup, so I have a question.
The question is: Shader issue occurred while trying to create a copy of CultOfTheLamb..
https://i.stack.imgur.com/L1MLJ.png
This image is an attack motion created by unpacking resources from CultOfTheLamb.
However, since there is a gradation image in the animation, I want to change the image with a shader as shown in the picture below.
https://i.stack.imgur.com/s9acl.png
https://i.stack.imgur.com/ij23S.jpg
This is the player sprite atlas for this game. At the bottom of the image, there is a gradient image. My guess is that the image is converted into an effect by masking the gradient color in the shader. So I looked for information on color masking in shaders and tried color masking with Shader Graph in Unity. However, I wonder if the method I found was wrong, and the color masking didn't work properly, and I was a bit confused about how to mask the gradation color... I just studied shaders for the first time yesterday, so I don't have any relevant knowledge. Any help with a detailed explanation would be greatly appreciated.
The expected result is to change the gradient color to the specific effect or color I want.

All shaders render black while using shadergraph in unity 2020 1.10f

I am doing a simple animation in unity and I wanted to add portal efecct using shadergraph 8.2.0 and everything renders black
like this
shader setings
I have no clue whatsoever what it is
I'm still learning the pipeline, however, I would think you need to scale up the texture on the top left, I can't read its name from the image. But you are getting the red/yellow mix, getting the swirl, but the area that's being blacked out is comparable to the texture I mentioned. Sorry I don't know how to put it exactly, but the white to grey to black gradient is not large enough so you are rendering the center fine just need to expand the white-grey area, I think scaling the texture up would produce the effect you want.

Blending more than 3 materials in Unreal Engine 4

I'm trying to make an auto landscape material with 4 materials. If I use 3 materials it blends as expected but if I try blending a 4th I get the default texture when I compile. There are no compilation errors.
The really odd thing is that my normal maps and displacement maps still blend properly. If I put a solid color into the base color output and light the scene I can see that the materials are where I want them to be, but if I put the blended base color I get the default texture with no normals/displacement.
Is this expected behavior or is it a bug? I'm not using landscape layer blend since I want to set the masks procedurally.
I solved this. If anyone is looking for a solution to this, the issue was I needed to set the sampler source to "Shared:wrap" on my texture samples.

Unity - Guidelines for color isolation effect

I would like to highlight two objects in Unity so that they stand out. But instead of actually highlighting them, which I already know how to do, I would instead like to have some kind of color isolation effect, like the one we can see in the picture below :
However, I really have no idea about how I could acheive this !
Could I use some post processing effects to remove the saturation, expect for a set of objects ?
Should I instead desaturate all the materials of all the objects in the scene and also desaturate the sun color ?
Should I apply to all the other objects in the scene a shader that only renders grayscale colors ?
Could you point me into the right direction ? Thank you.
One approach would be:
- Add a desaturate post process to your main camera and set its culling mask to everything(but turn off the effect)
- Create a second camera, make it a child of the first one (so it keeps the same rotation and position) and set its culling mask to something else (a layer where you will place your highlighted objects)
- When an object needs to be highlighted, add it to the highlights layer and desaturate the main camera. The object will stay colored because it is rendered by the camera that does not have the desaturation effect.
You'll have to play with the "Clear Flags" option of both cameras to get this to work correctly
Still using LWRP Post Processing stack, but I'd add a Color Grading effect and use that to 'tune' your unwanted colours to grey.

Skybox affecting sprites

The default skybox affects the sprites colour. I'm not sure how to stop this from happening. You can see below that the outline of the sprite is brown instead of grey.
If I set the main camera clear flags and background to Solid colour & black respectively, the brown from the skybox still shows through.
I'm not sure what information would be useful for others to assist me with this, so if there is any info I can add, just let me know and I'll update accordingly.
What you're seeing here is alpha blending, your 'outline' pixels have low alpha, so when rendered Unity will blend their color with the background. It generally represents transparency, but in this case it's behaving as a kind of anti-aliasing (it makes your sprites look smoother and less pixely) In that sense, it's working as intended. Look at your sprites at normal resolution and you'll notice they should look good.
If you prefer the pixelated look and really don't want this behaviour, you need to edit your sprites to have full alpha on those pixels.
I'm not sure about Empty's answer:
Are you using the standard shader? That shader uses the environment map as an ambient color on top of the diffuse color (albedo). This is perfectly normal behaviour and makes colors of everything blend nicely with each other. (with an orange sky white objects will look onage-ish. ) This is part of "physically correct lighting" (PBL). It is not at all physically correct, but it comes close enough for now.
If you don't want the environment to affect the colro that mucha you could either alter the environment map to a less dramatic color (normal blue/white sky) or use an unlit shader/material.
Window->Rendering->Lighting Settings
Under Debug Settings, select Generate Lighting.
De-select Auto Generate.
From the Baked Lightmaps set Lighting Data Asset to None.
Remove generated Lighting from the project.