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.
112 questions
5
votes
2
answers
4k
views
Material is flickering in Unity
I'm trying to make a grid like, light up floor using Unity's Shader Graph. However, I am having an issue where the lines are flicking after a really short distance when the camera is moving.
The ...
3
votes
1
answer
6k
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 ...
3
votes
1
answer
21k
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 &...
3
votes
1
answer
738
views
Procedural mesh comes out black in any shader
I wrote a script that Creates a mesh procedurally
...
3
votes
0
answers
2k
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 ...
2
votes
3
answers
10k
views
Convert shader that uses a texture array to ShaderGraph
I am working on procedural generation in Unity, and am now a bit stuck. I am using Perlin noise to generate a heightmap, including lacunarity, persistence, octaves and frequencies.
Today I have been ...
2
votes
0
answers
293
views
How to get wave height of a gerstner wave made in shader graph?
I have followed a gerstner wave shader graph tutorial. (YouTube Tutorial)
I am now trying to implement buoyancy by attaching the following script to a gameobject. (YouTube Tutorial)
...
1
vote
2
answers
3k
views
Sprite Shape & URP Custom 2D Lighting Shader
I've been losing my mind over this for a couple of days now, and can't find any concrete information about it.
I am trying to write a custom shader (shader graph to be specific) to light sprite shape ...
1
vote
1
answer
2k
views
How to sample from six cubemap images for a skybox in Shader Graph?
I'm trying to update a skybox shader to URP and reimplement it in Shader Graph. The shader code itself is pretty straightforward, but I don't know enough about Shader Graph yet to set up the basic ...
1
vote
1
answer
542
views
Unity shader to give thickness to flat plane
I have this hexagonal grate floor:
Which is a flat plane with the following shader:
The hex lattice created using the method by Andrew Hung. Albedo and metallic/smoothness shader are just simple ...
1
vote
1
answer
3k
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; ...
1
vote
1
answer
432
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 ...
1
vote
1
answer
5k
views
How to add mesh collider which updates with water wave vertex offset?
I have written a shader (in the new LWRP shader graph) which simulates an ocean with vertices which offset to create a moving "waves" effect.
I believe that in order to have objects "float" on my ...
1
vote
1
answer
2k
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'...
1
vote
1
answer
340
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 ...
1
vote
0
answers
45
views
What is the best way to move a mask in a shader in a square path in Unity Shader Graph?
I would like to make the square move strictly along a square trajectory. The square will later be used to mask the main sprite.
How to achieve this result? How to move the square along the square's ...
1
vote
0
answers
78
views
How to create a laser in discontinuous lines?
Via Shader Graph, how to create a shader that, applied to a continuous line renderer, transforms it into this:
1
vote
0
answers
117
views
How to create intersection shader that simulates squishing?
I want to create a shader that will make spheres/circles look like a blob when colliding.
I don't understand shadergraph at all, but I tried to follow intersection shader tutorials.
The problem is ...
1
vote
1
answer
924
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, but ...
1
vote
0
answers
59
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.sstatic.net/6XkRo.gif
Basically, it's a painting effect ...
1
vote
0
answers
101
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 ...
1
vote
0
answers
2k
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 ...
1
vote
2
answers
2k
views
How do you get the world position from the screen position in a URP shader graph used in a ScriptableRenderPass?
I'm using a shader graph in the Universal Shader Pipeline (URP) to do some post-processing in a ScriptableRenderPass. How do I get the world coordinates of the screen position?
I have tried using the ...
1
vote
0
answers
77
views
Aligning cube faces Unity
I am using a shader that uses a gradient noise node and time to add a wavy effect to a grid like texture. The issue with doing this is that it causes the lines to be misaligned on the different faces ...
1
vote
1
answer
1k
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-...