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.
50 questions with no upvoted or accepted answers
4
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
0
answers
295
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)
...
2
votes
0
answers
2k
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), ...
1
vote
0
answers
46
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
66
views
How to hide a Sprite unless it is illuminated by a Light 2D?
I want to have a sprite that is invisible when outside of light, and visible when inside of light.
I created a new Custom Lit Shader Graph in Unity 6 with the following setup:
I then created a player ...
1
vote
0
answers
79
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
96
views
My shadergraph animation gets extremely faster during in the actual game compared to the editor
Currently I'm using a shadergraph for an animated material, for some reason as long as I don't have any input it works as intended and with the correct speed, while if I do any action/input the ...
1
vote
0
answers
118
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
0
answers
643
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 ...
1
vote
1
answer
937
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
493
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 ...
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
99
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 ...
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
0
answers
779
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 ...
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
412
views
Unity Shader-Graph randomly tiled sprite
Lets say I have a shader with a clean white tile. Then I use it on a wall and tile it a few times.
I also have a sprite with numbers.
Now, is it possible and if yes how. To put a random sprite number ...
1
vote
0
answers
78
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
0
answers
3k
views
Draw a perfect circle in UI
This is the problem I have. I have created a shader that draws circle. But depending on the distance from the camera thickness changes.
Is it possible to keep thickness constant?
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-...
1
vote
1
answer
1k
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 ...
0
votes
0
answers
117
views
How to project textures on to the mesh and overlap them like in Let’s Play Pottery?
I want to learn how to project textures on to the mesh and overlap them like in Let’s Play Pottery. I have an idea for game. I created Models, 3d viewer but I can’t figure out how to implement texture ...
0
votes
0
answers
40
views
How can I sync the volume of an audiosource with how a material change alpha?
I am making a flickering light prefab, and have already made a shader and a material that make it turn on and off erratically.
I also want the light to emit a buzzing sound when it's turned on, but I ...
0
votes
1
answer
388
views
Set Shader Graph out position in clip space
Is it possible to set the output vertex position in a space other than object space?
0
votes
1
answer
601
views
How to make this Triplanar Shader Graph follow object rotation
I have what is essentially a double triplanar shader. The first triplanar is a base rock texture, and the second triplanar is going to be an accent texture, such as grass, sand, etc, which is always ...
0
votes
0
answers
60
views
Why do my shaders render differently in the simulator?
I am using simple shaders on the cards in my game. The shader is assigned as a material to a white image the covers the whole card.
They render as intended in the scene view, but do not in IOS ...
0
votes
0
answers
209
views
How to add a toon / cel shader to a URP 3D project?
I'm new to Unity and I've been frustrated for the last 5 days. I'm trying to apply a toon / cel shader to my object which I've imported from Blender. It already has a default material called ...
0
votes
0
answers
50
views
Problem with light in Unity2D
I'm new to working with lights in Unity, I watched a lot of tutorials and decided to use URP. It seems like I have everything set up, but when I set the lighting, the light doesn’t fall on the ...
0
votes
0
answers
210
views
Object-bending shader graph keeps disappearing nearby objects in portrait mode but not landscape mode
As you can see from this video,
the shader graph was used to curve the path. In landscape mode, it works as expected but in portrait mode nearby objects (the buildings and other objects) disappear ...
0
votes
0
answers
898
views
How to make shader graph RenderTexture deform effect more accurate?
I have followed a PolyToots tutorial (https://www.youtube.com/watch?v=3T8cKTQrMxk) to make a 'rug deform' effect.
This is great except for that the vertices aren't deforming faithfully enough to ...
0
votes
0
answers
110
views
Get vertices back from shadergraph?
I am making waterwaves in shadergraph and i want to make a boat that will bop around on those waves, but to do that i need to get those vertices back into the CPU.
I am unable to replicate those waves ...
0
votes
0
answers
2k
views
Unity Shader Graph Alpha Clip Threshold not acting as expected
EDIT: I have tried opening the shader in an empty project to test if there were some strange settings in the project, but it is the same issue.
I am creating a power bar which wipes from left to right....
0
votes
0
answers
181
views
Blend different size textures in Shader Graph
Say I've got a character model where part of the face has two UV maps: one's mapped to the generic body texture, the other covers a small area on the face to allow for a highly detailed tattoo.
I want ...
0
votes
0
answers
166
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 ...
0
votes
0
answers
241
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 ...
0
votes
0
answers
307
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 ...
0
votes
0
answers
272
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 ...
0
votes
0
answers
175
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 ...
0
votes
0
answers
2k
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 ...
0
votes
0
answers
84
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 ...
0
votes
0
answers
159
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 ...
0
votes
0
answers
403
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 ...
0
votes
0
answers
194
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 ...
0
votes
0
answers
1k
views
UV Tiling & Offset input values from World Position - incorrect behavior?
I'm using ShaderGraph in 2020.1.0f1. I have some shader experience, but it's all been handwriting shaders. I have experience with node-based things of this nature by way of Substance Designer. I'm ...
0
votes
0
answers
315
views
How to make borders glow in a 2D game?
How can I make the borders (stationary / non moving) of my 2d Unity game glow?
I need a method that is not so expensive. I've read that post processing is very expensive, but I quite liked adding ...
0
votes
0
answers
1k
views
How to rotate a skybox cubemap using Unity Shadergraph
@Seyed Morteza Kamali solved his own problem of rotating a mesh cubemap with shadergraph here: How can I rotate cubemap in shadergraph?
However, I have a starry night cubemap inside my Skybox shader ...
0
votes
0
answers
2k
views
How can I apply a fullscreen shader on a specific layer?
How do I apply a full screen shader on one layer of objects using LWRP/URP and shader graph? I want to pixelate only my particlesystems, but nothing else. I want the effect of pixelcamera, but only on ...
0
votes
1
answer
4k
views
Using ShaderGraph for UI elements with transparency
I am trying to design some UI elements using shader graph. In this case specifically a life bar that is transparent where empty.
For a normal life bar with a filled and empty color I got it working ...
0
votes
1
answer
256
views
Interactive texture modification (such as swirling) in Unity
I am working on a game where I want to allow users to mix multiple colors (similar to shown in this video): https://youtu.be/11UFYyv8hjs?t=316.
I have the following questions:
I am expecting that ...