Questions tagged [shader-graph]
115 questions
0
votes
1 answer
Shader graph error - 'PBRDeferredFragment': cannot convert from 'struct v2f_surf' to 'struct SurfaceDescription'
I started using shader graph and created one shader, then I tried building my game however I get this error:
Shader error in 'Shader Graphs/blend': 'PBRDeferredFragment': cannot convert from 'struct v2f_surf' to 'struct SurfaceDescription' at…

Jekuper
- 25
- 3
0
votes
1 answer
Shader graph connections not visible in Unity3D
About a week ago I opened shader graph in one of my projects when I noticed the connections between nodes are just gone (like shown in the image). The shader still works just fine as if the connections are there, but it's impossible to work with…

MajklDove
- 3
- 1
0
votes
0 answers
Shader graph bloom effect not working on Unity Oculus Quest 2 Build
I have been experimenting with shader graphs bloom effect with URP in unity which is coming out well on my laptop but not on Oculus Quest 2 build. Is there any way I can get that effect?
Note: I have already tried Post Processing bloom

Aarti Dhiman
- 75
- 1
- 9
0
votes
0 answers
How do you get the distance between each particle and its source in Unity VFX graph?
I am trying to use the distance of each particle from the source as a parameter to determinate its color through a gradient.
This is how I am using the nodes in Unity's VFX Graph
However, even if I use the result of the "lenght" node directly into…
0
votes
1 answer
Using Tag to define transform for Material.SetVector
I have a shadergraph where I pass position of gameobject as a value. Below is the code I tried for that but I get NullReferenceException.
public Material m;
private Transform player;
private GameObject character =…

prkash
- 427
- 1
- 5
- 23
0
votes
0 answers
Change mesh in Shader Graph based on object position
I have a Texture2D that represent the grayscale heightmap of my terrain in the scene. Over the terrain, I have different assets (plants) rendered by my custom shader that modify their meshes (against wind, deformations, etc.)
My custom shader graph…

edualvarado
- 353
- 2
- 12
0
votes
0 answers
Unity shader graph very slow on Xbox X
(Unity version 2020.3.27f1)
Hello,
I have created a gerstner wave shader for my game, but after exporting the game to Xbox X and trying it out, it is incredibly slow, getting 5-10 fps. Disabling the waves and exporting to Xbox gets me back to 60…
0
votes
0 answers
Is there a way to create multiple clipping planes in shader graph (Unity 2021.3.6f1 URP)?
I am trying to create two clipping planes so that a cube is visually reduced in size from both ends when I change two floats. Currently no matter what I try it clips from the inside out.
Here is the current method of…

Greg Quirk
- 1
- 1
0
votes
0 answers
Something wrong with custom function GetLighningInformation in Shader Graph
void GetLightingInformation_float(out float3 Direction, out float3 Color,out float Attenuation)
{
#ifdef SHADERGRAPH_PREVIEW
Direction = float3(-0.5,0.5,-0.5);
Color = float3(1,1,1);
Attenuation = 0.4;
#else
…

B16D0N
- 1
- 3
0
votes
0 answers
Evaluate depth for orthographic camera
I have a post processing shader. For simplicity, my post processing shader only shows the _CameraDepthTexture at the given uv. This shader is written in code.
I'm moving to shader graph and I want to have a material for all of my objects and achieve…

Daniel
- 7,357
- 7
- 32
- 84
0
votes
1 answer
Unity Shader Graph Odd Tiling
I'm trying to create a shader that tiles a texture on an object, But I am Running into an issue. When trying to tile with this Shader Graph, It looks good from the front but looks wrong from the side. this is a 3x3x1 object and all of the squares…

Itayo
- 21
- 2
0
votes
0 answers
Shader Graph Making A Wall Transparent If There's An Object Behind
I'm trying to make a shader graph, which makes the object transparent if the player is behind it.
My approach was giving the player's(represented as a sphere here) depth as a parameter, and comparing it with the scene depth. Here is my shader and…

dreamend
- 59
- 4
- 19
0
votes
1 answer
How to get a pixel color from texture by the position of the object in shader graph?
I want to create a shader that will grab a pixel color by the object position
Basically Texture2D.GetPixel(transform.position.x,transform.position.z), but in shader.

cooluser
- 3
- 3
0
votes
2 answers
Why is Shader Graph Transform node affected by UV mapping?
I've had an issue with normal maps not behaving correctly in my custom shader and finally managed to find the cause. It turns out it was the way UV of my objects were mapped. In UV0 I stored a mapping to a color palette texture - the UVs were all…

Wojtek Wencel
- 2,257
- 6
- 31
- 65
0
votes
1 answer
Unity URP to WebGL is ignoring Sampler State
The Sampler State is being ignored once exported to WebGL. I have a plane that has one of its faces setup as to over extend the UV's 0-1 space, so the effect would make the texture applyied to it look smaller... it looks ok in the editor, but once…

Bandinopla
- 33
- 1
- 1
- 7