Questions tagged [shader-graph]

115 questions
2
votes
3 answers

Unity3D - How do you turn off "receive shadows" in a shader made with Shader Graph?

Unlike default URP shaders, custom Shader Graph shaders dont come with a "receive shadows" checkbox as you can see here. How can I disable shadow receiving on my shader? Or alternatively, turn off shadow receiving on any material/object that uses my…
Ezequiel
  • 23
  • 1
  • 1
  • 4
1
vote
0 answers

Shader Graph materials are turning to pink in mobile

I’ve got a problem with my game, I created a transparent material from a shader graph and that worked in the Windows build but turned pink in the Android build. This is the shader I put the shaders into the Always Included shaders list, and move…
1
vote
0 answers

How to reset material properties to default values after game shutdown?

I created a color property in the shader graph and set the color through the unity inspector. Then I changed it with the code: image.material.SetColor("_MainColor", colorNew); However, I noticed that after the game ends, the material color remains…
dezzcore
  • 11
  • 1
1
vote
3 answers

Access alpha attribute of shader graph through script in Unity

I wish to control the transparency of a model during runtime. The model's material is connected to a shader graph. After changing the Surface Type of the shader graph to Transparent, an Alpha attribute became available to control the transparency of…
Amarth Gûl
  • 1,040
  • 2
  • 14
  • 33
1
vote
1 answer

Unity Shader Graph Animations Stop on Editor and Game Windows (when not in focus or playing)

I'm learning shader graphs but my animations stop if I'm not in play mode. Doing anything in the editor/game window causes the animation to play again. Even moving the mouse over the window is enough. But when I stop the animation stops. I'm using…
Doruk
  • 385
  • 2
  • 12
1
vote
3 answers

Set biggest channel of a pixel to 1 and all the other channels to 0

Suppose I have a texture, what I want to do is for each pixel, return only the biggest channel as 1 and the rest as 0. For instance: | INPUT | OUTPUT ------|-------------------------|----------------- RGBA | (0.5, 0.3,…
Daniel
  • 7,357
  • 7
  • 32
  • 84
1
vote
0 answers

How to blend unlit sprite alpha in Unity Shader Graph

I want a material that won't add alpha of 2 renderers if color's alpha is not 1 when overlapping with the same material. This is to be applied in a UI Image component. How can I achieve such result with Unity ShaderGraph ? I use Unity 2020.3.16f1
Martin Faucheux
  • 884
  • 9
  • 26
1
vote
0 answers

How to smooth the border between two different objects

I have two objects, a sea and a river, and each of them with its own shader. In the river delta you can see that they are two different objects and it doesn't look good. Does anyone have any idea what can I do to smooth the edges so that the seam…
kaitoren
  • 65
  • 1
  • 9
1
vote
0 answers

Unity Line Mesh Inward Shader

I am pretty new to shaders in unity and am stuck on a problem. I am using ShaderGraph and unity 2021. I understood the ShaderGraph examples from the unity page and "implemented" an OutlineShader thinking I could simply "inverse" the direction (not…
Reborok
  • 25
  • 6
1
vote
0 answers

How to make Sphere Mask follow the parent?

I'm making a bubble shield. I use the Sphere Mask in Shader Graph to make a collision effect (the Sphere Mask uses global position as Coords). But if I move the shield, the Sphere Mask will be in the same world place, so the collision effect won't…
1
vote
1 answer

Unity Shader Graph - Normal From Height not supported in HDRP DXR

When making a shader graph with HDRP and ray tracing 2021LTS, using the node Normal From Height, i got this error : 'Normal From Height' node is not supported in ray tracing, please provide an alternate implementation, relying for instance on the…
Robot
  • 13
  • 4
1
vote
0 answers

How to add spacing between Shader Graph sprites

I'm using a shader to render movement along a line. How to make a line have more spacing between sprites Shader Line Screenshot
1
vote
0 answers

Unity URP foam shader bug?

When I'm in a scene view I can see the sea foam But when I'm in game I do not see the foam. Why is this? Basic Sea Foam Shader Graph DepthFade subgraph
user1239299
  • 665
  • 8
  • 26
1
vote
0 answers

Making objects smoothly meld into one another in Unity, using Shader Graph or similar?

I'm looking for a way to make two objects smoothly merge together in Unity. I'd like to do it through shaders rather than mesh, thinking that'll be faster as this merging effect needs to happen often at runtime. Initially I looked into raymarching…
1
vote
0 answers

Unity Shader Graph transparency not displayed correctly in-game

I created a simple heat distortion shader graph in Unity. In Shader Graph preview it looks fine: But when I tried to use it in scene, it seems to be messed up: Instead of using alpha value from shader, the sprite is simply clipped to the Outline…