Questions tagged [unity-shader-graph]

Unity Shader Graph is a Unity tool that allows users to create shaders using a drag-and-drop graphical interface without writing any code.

Filter by
Sorted by
Tagged with
0 votes
1 answer
29 views

Why does setting blend mode in Unity shader graph to Multiply create artifacts on sprite?

I want my sprite to use a blend mode based on the background (like in Adobe programs) so I set shader graph blend mode to Multiply. The blend works, but I get strange artifacts on my sprite. In this ...
user avatar
  • 129
1 vote
1 answer
119 views

How to deal with insane amount of shader variants waiting to be compiled in Unity >= 2021.2 / URP >= 12?

Since Unity 2021.2.0b7 (that is, URP 12.0.0), there has been a well known problem with absurd number of shader variants wanting to be compiled for even a somewhat simple shader (i.e. shaders generated ...
user avatar
  • 78
0 votes
0 answers
22 views

Read the result value of alpha blend

I am playing a bit with the shader graph (I am fairly new to shaders) but I am completely lost at the moment. What I'd like to obtain is to somehow retrieve the alpha value after the blended operation ...
user avatar
  • 1
0 votes
0 answers
90 views

Single pixel disappears in outlining shader

I've recently (11 hours ago, to be precise😅) started to work with shaders and it's going pretty well. I've created a simple shader to create an outline and I tested it on a simple object to see how ...
user avatar
  • 654
1 vote
1 answer
197 views

Cloud based fog of war

I'm working on a Unity 3D game that requires fog of war. It is seen from above. I was looking for help and found this: (I dont know what game it is though) This would perfectly fit my needs but I don'...
user avatar
1 vote
0 answers
51 views

(URP Shader Graph) Why can´t I connect a float into another float 'slot'? Are there different types of floats?

So, here I´m just trying to take in a Vector3 (resulting from multiplying some noise and a sample texture) and putting it as the vertex position, but for some ...
user avatar
1 vote
1 answer
186 views

Vertex Displacement Shader Graph With The Camera Moving Issue

I have a foliage sway shader, that works well. But when the camera moves the vertex displacement stops: And the weird thing also is that if I move the camera to the right nothing seems to happen, ...
user avatar
0 votes
0 answers
39 views

How can I make the inside of a mesh solid?

I followed this tutorial to create a simple liquid effect. I am trying to modify it to make an effect where it looks like the liquid is covering an object. I have a shader that changes the alpha of an ...
user avatar
  • 1
1 vote
1 answer
232 views

Unity Shaders: Why is it recommended to use Time to animate things inside of a shader instead of DeltaTime?

In the "Built-in shader variables" section of the Unity Manual, underneath the Time header, there is a table that provides information about each time variable: _Time; _SinTime; _CosTime; ...
user avatar
1 vote
1 answer
357 views

Do not cast shadows when transparent in unity

I am developing a game for WebGL and I have a shader that makes parts of an object in specific ranges of coordinates transparent, like so: This shader makes all parts of an object with an absolute Y-...
user avatar
  • 111
0 votes
0 answers
43 views

Why do we still see infinity vector space after normalizing World space? ( Unity Shader Graph)

Why do we still see infinity space after normalizing vector space? I assumed that some kind of effect would be obtained. As I see what happens to the space after it is normalized and how this ...
user avatar
0 votes
0 answers
7 views

Why do we see such effect after Normalize X value from Position Node ( in World Space )? ( Unity Shader Graph ) [duplicate]

Why do we see such effect after normalize X coordiante from Position Node ( in World Space )? How does it works? What Normalize node do with X Coordinate? Do we normalize X value of vector or length ...
user avatar
0 votes
0 answers
78 views

How to check output value in Remap Node?

I started to deal with Shader Graf in Unity. I make test shaders, understand how nodes work. Sometimes I want to check the value that I get after a series of operations. I would like to see, for ...
user avatar
0 votes
0 answers
78 views

In Unity Shader graph Get object top left corner position and it's color through it

I have a Shader graph in which I am using "Scene Color" node to do processing on camera feed, It is Unity AR foundation project Until now I was passing color to be used using a property, Now ...
user avatar
0 votes
1 answer
1k views

How to add random offset to sine time in Unity's Shader Graph?

I have created a shader using Unity's shaderGraph to move my clouds back and forth. I'm using Sine Time to alter the x-position of all the pixels in my sprite. Now, all the clouds are moving in sync, ...
user avatar
  • 224
0 votes
0 answers
65 views

Shader from urp shader graph turns gray on webgl1 build

When I build my game while graphics API is set to webgl1 the shader is just a gray texture. It works fine if graphics API is set to webgl2 but I need it to work on webgl1. Can shader graph shader ...
user avatar
  • 129
1 vote
0 answers
56 views

Ensuring world curving shader is not affected by object scale

I've made a shader shown below which essentially acts as a "world bend / curve" shader by "bending" objects depending on their position from camera. It's a subgraph that outputs ...
user avatar
  • 143
0 votes
0 answers
57 views

How to generate a randomly-positioned leaf quads with a geometry shader?

Does anyone have any idea how to implement a shader that manages to make this effect in Unity? I found a post that explains, but I'm still learning shaders so I didn't really understood how to go ...
user avatar
0 votes
1 answer
143 views

Unity world curve shader graph, how to start curving from a specific distance?

I've made simple world curving shader following some online tutorials and cleaning few things up. It's doing its job, however I have small issue where it curves objects that are very close to a camera....
user avatar
  • 143
3 votes
0 answers
382 views

How to check if Texture 2D was provided in shader graph?

I have following section in my shader graph, that I want to simplify. At the moment I have to set manual boolean Use Normal Map in order to decide if I want to use a Normal Map texture or default ...
user avatar
  • 143
1 vote
0 answers
128 views

How to create a seamlessly wrapping procedural brick material with a shader?

How do you create a shader that seamlessly wraps a brick pattern around the whole object, so that there are no "Stitches" at any edges/corners? Take this screenshot for example: On the left ...
user avatar
1 vote
1 answer
256 views

Adding a shader graph material as a second material

I'm attempting to make an outline shader that I can attach to selected objects by following this guide. After making a new material and assigning the new Shader Graph as the shader, I'm not sure how ...
user avatar
1 vote
0 answers
15 views

I have a problem with updating a RenderTexture being used in combination with a shader

I just can't seem to figure out why I can't save the image I've drawn onto an orthographic RenderTexture. Here's how my scene works: https://i.imgur.com/jAWO2V8.gif Basically, it's a painting effect ...
user avatar
0 votes
0 answers
40 views

Can I use Unity's free assets for commercial purposes?

i have a question, if someone is developing a game on unity for commercial purposes, can free or even paid assets be used in the game even if it is to sell the game? are assets not subject to ...
user avatar
  • 1
1 vote
0 answers
31 views

Unity shader graph slow

Unity 2020.3.12f1 HDRP Whenever I add a single node in Shader Graph, the progress bar "compiling shader" takes around 20 seconds to complete. Multiply that by dozens of nodes and we're ...
user avatar
  • 111
2 votes
0 answers
542 views

Collapse a 3D model to 2d with Shader?

I'm trying to recreate an effect of 3D sprites similar to Ocotpath Traveler (2d sprite similar to billboards/imposters in 3D space, showing 8 sides of the character based on where they're facing), ...
user avatar
1 vote
1 answer
315 views

I need help converting Unity .shader to Shader Graph: Bumpy Glass

I've been tasked with converting an older Unity shader which does Bumpy Glass with some alpha modification, to URP. I'm assuming that means using Shader Graph. I'm a bit new to shaders in general, but ...
user avatar
  • 113
0 votes
1 answer
837 views

How to use Texture2DArray with Normal map and Normal Unpack node in Shader Graph

I am extracting Normal Map from Texture2DArray in shader graph and then converting it to normal using ...
user avatar
  • 541
0 votes
1 answer
190 views

make Shader Graph material flow aligned to the mesh UVs (like a river)

i need to add a flow effect to my river so that the water can flow along the path described by the mesh i created. Using ShaderGraph shader i added a time node ...
user avatar
0 votes
0 answers
813 views

Rotating UVs by X degrees

I would like to make a tileable texture with UV noise in Unity Shader Graph only, but I have a problem. After creating simple noise from UV, I want to rotate it by 90 degrees, but the node ...
user avatar
0 votes
1 answer
362 views

Checkerboard using Shadergraph

In Unity Shadergraph, how can I create a checkerboard pattern that works independently of the size of the quad that it is applied to? Here's what I got so far. Since I have set the Frequency to 10x6, ...
user avatar
  • 445
0 votes
1 answer
58 views

Improving the look of a character with solid parts inside a translucent jello exterior

So my problem is a bit hard to explain. I have a character made out of a jello shell, with an internal skeleton. So let me introduce you to ma boi "Chonker McJello" The problem is, that I ...
user avatar
0 votes
0 answers
15 views

Applying a shader operation to an existing shader

My procedural game has blocks that can be selected. When selected, I'd like them to to fade a bit; I can achieve such an effect in Shader Graph by applying a Blend → Lighten operation to the block ...
user avatar
  • 313
0 votes
1 answer
191 views

Make the texture array node work with cubemaps?

I am working on a procedural interior mapping shader in Unity's Shader Graph. Ideally, I'd like to feed it a set of cubemaps it can pick from semi-randomly. However, it seems that by default the ...
user avatar
  • 792
0 votes
1 answer
128 views

Rotate a Polygon node in Shader Graph

I have a hexagon in the Polygon node I would like to rotate so the pointy side is upwards. Applying the rotation nodes, however, simply changes the color of the hexagon from white to a color in the ...
user avatar
  • 313
1 vote
2 answers
423 views

Renaming Texture 2D nodes in Unity's shader graph?

I am new here so thanks for having me. I have a query regarding renaming the Texture 2D nodes I have created in my first Shader graph. I have setup a shader graph with a normal map, base colour, ...
user avatar
  • 11
1 vote
1 answer
12k views

PBR Graph option not showing up in Unity

I downloaded the URP render pipeline into an existing project of mine (created using the 3D template) to try out shader graphs. All of the guides and tutorials I'm following use an option called the &...
user avatar
  • 462
1 vote
0 answers
53 views

How to create fallout intensity on a generated mesh in Unity?

So I was able to generate a circle mesh in Unity to basically see the other characters when they are inside of it, and hide the characters when they are outside of it, and partially hide and show the ...
user avatar
1 vote
2 answers
319 views

How to hide player when in Shadow using Unity 2D Light System?

I have been looking for this for a couple of days now and cant find an answer; how can I hide a player when they are in the shadow when am using Unity 2D Light System? I know I can choose not to cast ...
user avatar
0 votes
0 answers
70 views

Why is there such a difference in between my scene and game?

Here I have 2 screenshots of my problem: By the way my water shader works with Screen position and Scene Depth. I can include ...
user avatar
1 vote
0 answers
842 views

How to randomly change the color of a Shader Graph Material for only a specified GameObject, with C# script?

I'm working on a game, in Unity3D, where the player picks up trash from Trash cans, and dumps the trash from the Trash cans into a Trash Truck. The world of the game itself is randomly generated, with ...
user avatar
0 votes
0 answers
190 views

How to displace a segmented line along a sine wave with Shader Graph?

I have a mesh made of three identical cylinders (conceptually just line segments with a non-zero thickness) crossed over each other at 60 degree angles, so the ends describe the points of a regular ...
user avatar
1 vote
1 answer
939 views

How can I incorporate subsurface scattering into a custom shader graph?

I'm working on some 3D grass in Unity with HDRP (the grass is not a 2D asset on a plane, it's a mesh). I did a shader to make it move following a tutorial, it works great. I would like to add ...
user avatar
  • 11
1 vote
1 answer
1k views

How can I blend the center color of a 2 side gradient so it isn't as harsh looking in Unity Shader Graph?

I am using the gradient node in Unity's Shader Graph. It is 2 sided, with it being black-white-black. The white is quite harsh, it makes a line that stands out. I will be using this as a mask, and ...
user avatar
0 votes
1 answer
124 views

How do I keep vertex position when changing material?

I've created 2 shaders using shader graph which I'm applying to a sphere to simulate a ball of water/ice. The water shader distorts the shape of the sphere over time to look like it's flowing a bit. ...
user avatar
  • 105
0 votes
0 answers
107 views

Shader map in unity

I'd created a shader graph in shader editor of unity. And I applied it to new material also. When I imported a .fbx object(box-like object and vertical slab like object) and applied that material in ...
user avatar
0 votes
1 answer
783 views

Specular reflections shine at the wrong angle when using a normal map

I'm using Unity with URP and I'm trying to include a normal map in my shader graph. Here is a basic graph that just display a normal map, with properties to control tiling and smoothness. When I ...
user avatar
  • 123
0 votes
2 answers
8k views

Understanding Screen Position Node in Unity Shader Graph

I'm struggling to understand what exactly the Screen Position node outputs in Unity's Shader Graph. I'm using the screen position with scene depth to calculate the distance between two objects. Every ...
user avatar
  • 123
1 vote
0 answers
322 views

Shader graph in Oculus (Screen position)

I have created a blur shader graph to blur a material. It works perfectly fine in the scene mode and also in windows application. However it does not work as expected in Oculus VR. That is, the ...
user avatar
  • 153
0 votes
1 answer
765 views

Converting shader to ShaderGraph

Is there a way to convert the below piece of shader code to shader graph? I am not sure how to find float2(i, i) in shader graph. ...
user avatar
  • 153