Questions tagged [shader-graph]

115 questions
0
votes
1 answer

How make shader for dashed outline of rounded rectangle?

How make dashed outline for rounded rectangle like in figma? I tried wrote this, but I did only part with rounded rectangle and outline based on subtraction two rounded rectangles with different sizes. I know about distance, frac and step, but how…
deadbit
  • 1
  • 2
0
votes
0 answers

Problem with custom shader for blending textures in Unity URP project 2021.3.16f

I have a problem with custom shaders in Unity 2021.3.16f which blends two textures 1 - (1 - target) / blend I needed the effect of enhancing one texture on another, but as a result, I got this effect: But the effect in the shader view window…
0
votes
0 answers

Texturing a moving mask in Unity URP

I am trying to create an unlit shader graph in unity for a simple plane object that works like an X-ray showing position of a target object passing behind it by masking it into a sphere. enter image description here Everything works fine until I try…
0
votes
0 answers

How to create intersections between transparent 3d models in Unity?

I'm having trouble intersecting two quads or 3d models in unity. If the material is set to Opaque, there is no problem at all. This is the result: However, just set the same material to transparent and the weird stuff starts happening: Always…
Vandervals
  • 5,774
  • 6
  • 48
  • 94
0
votes
0 answers

Unity Shader Graph: how to combine lit and unlit rendering in one single shader (is it possible)? Custom (individual per object) fog effect

I'm using Unity 2021.3 (URP). I'm using ShaderGraph. I'm working on custom fog effect, agile and individual for each 3D lit object of some category. I want to be able to turn some part of lit-shader-based object into unlit, by some factor [0...1]. I…
0
votes
1 answer

Unity 2021.3.20 Built-in ShaderGraph 12.1.10 Fog Density inverted in linear fog and showing wrong fog colors on far objects

Unity Shader Graph Fog node shows density inverted when using Linear Fog. Also not properly showing the color of the fog on far objects.
Iroqas
  • 65
  • 9
0
votes
1 answer

Unity - Border around opaque area of transparent texture

I've made a transparent texture to use on a glass jar model. (1024 x 1024 PNG) I've applied the following settings to the texture and the preview looks good. But when I sample the texture in shader graph there's a sort of alpha padding around the…
0
votes
0 answers

How do I find the coordinate points of a single picture inside of a Texture2D, and then sample that texture at that specific pixel?

I'm fairly new to programming and this is the first time I've ever messed with Unity shaders. I have a texture composed of differently shaped pixel blobs, each of which has a unique color. (Sort of like the way Paradox games do map generation.) I…
Augie
  • 11
  • 1
0
votes
0 answers

Unity SampleTexture2D messed up colors

Today when I was following a tutorial to make a simple highlight shader, I found sampleTexture2d messed up the colors inside the image, and to simplify the problem, I deleted all other nodes, you can see the pictures for detail.It's a URP unlit…
li yixiao
  • 59
  • 4
0
votes
0 answers

Some Materials are greyed out in inpector

Im using Unity and I have several shader graphs in my project. Although all of the objects in my scene each have a assigned material I find that there are several materials which can be edited in the inspector and several that can not! Is there a…
0
votes
0 answers

How to distribute a regularly spaced pattern across arbitrary geometry?

Does anyone know how to distribute a regularly spaced pattern across arbitrary geometry in Unity Shadergraph or HLSL? Here are the requirements: The geometry will all have the same shader We know world-space vertex position and geometry…
0
votes
0 answers

How do I render the depth map using Unity URP?

I want to recreate the "Moebius" style in Unity. I have found this video where someone achieves it, but he only shares the concept and the result and not the source code. Here are some snippets from that video: Original scene: Depth map: Sobel…
bob0815
  • 21
  • 4
0
votes
0 answers

Unity Shader Graph - Custom Function ArgumentOutOfRangeException

Didn't find a solution after a bit of searching so I thought about asking here... Inside Shader Graph, deleting a Custom Function causes a Index out of range: -1. When this happens, I'm unable to save the shader. The exception is thrown in…
0
votes
1 answer

Sprite occlusion sequence error occurs when using Sprite Shader

I tried to render Sprite shadow with the Shader Graph. But as you can see, the tree is rendered mistakenly before the house. The tree is rendered before the house You can see that the tree is actually at the end of these sprites And here's the…
0
votes
0 answers

Unity Shader Graph Package Installation Error

I had reached for here while struggling with some problems about applying a Package to Unity. Problem I’m trying to apply “Shader Graph [v. 12.1.10]” package into Unity [v. 2021.3.20.f1] but there is a problem like…
J4BEZ
  • 374
  • 4
  • 17