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.
93
questions
0
votes
0
answers
23
views
Change width/height of ellipse to always be circular, independent of viewing angle
I have the following shader graph attached to a quad that draws two circles at some position.
Naturally, when viewed at an angle, the circles appear to be ellipses.
I'd like to know how to adjust ...
2
votes
0
answers
55
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)
...
0
votes
0
answers
37
views
Align Cubemap OR Texture2D moon with Unity light rotation?
I am trying to make a custom skybox shader in Unity Shadergraph. I am having difficulty implementing the solutions find here and here.
The solutions themselves are fantastic and work as advertised; ...
0
votes
1
answer
120
views
Make night sky with moon
I want to make skybox with moon (texture 2d) with shader graph and be able to modify moon radius.
Moon Texture 2d :
0
votes
1
answer
149
views
Make moon using cubemap in shadergraph
I'm trying to make moon with a cubemap texture in shadergraph.
I made it, but the texture is incorrect.
I'm using a cubemap from NASA as a texture and it works, but it's bigger than moon shape and ...
0
votes
1
answer
61
views
Cubemap rotation
I have a skybox with stars cubemap
So, how can I rotate stars cubemap on Z axis using "Rotate About Axis"?
1
vote
0
answers
31
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 ...
2
votes
1
answer
253
views
How can I map a texture around a sphere without a seam?
I am attempting to wrap a texture around a sphere without any warping using Unity's Shader Graph. I have been following this StackExchange answer, and have semi-successfully converted their shader ...
0
votes
1
answer
37
views
Apply a shader to the right face of a mesh
Given that I don't have the basic concepts to work with 3d, I would still like to experiment and learn.
What have I done:
I imported an SVG of the world map into Blender
I extruded the SVG
I ...
0
votes
1
answer
635
views
How to rotate a mesh in shader graph?
I want to rotate a mesh in a way that the Z axis arrow always points towards the camera. For a script I would do something like this:
...
0
votes
0
answers
54
views
SoftLight blending of images with Unity Shader Graph Scene Color Node
I am trying to emulate Photoshops "SoftLight" blending with a custom shader made in shadergraph. I would like to add that shader to an image or sprite, so it gets blended with the effect ...
0
votes
0
answers
370
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
1
answer
319
views
Why do my game objects become invisible as soon as I attach the material to which this shader script is applied?
I wrote a shader script that is an extension of the Sprite-Lit shader in previous Unity versions' standard assets in an attempt to feather the edges of a sprite using additive blending. Here is the ...
0
votes
1
answer
237
views
How can I remove dither effect on player's shadow?
I am trying to make a dithering effect on the player so that when the camera comes below or very close to the player he will be dotted or transparent like in Genshin Impact. So, I followed a tutorial ...
0
votes
0
answers
49
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
1k
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
2
answers
957
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 ...
0
votes
0
answers
92
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 ...
1
vote
1
answer
1k
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 ...
3
votes
1
answer
2k
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 ...
0
votes
0
answers
95
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
163
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 ...
1
vote
1
answer
991
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
0
answers
368
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
608
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, ...
1
vote
1
answer
1k
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
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-...
0
votes
0
answers
216
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
1
answer
4k
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, ...
0
votes
0
answers
158
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 ...
1
vote
1
answer
193
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 ...
0
votes
0
answers
110
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
1
answer
395
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....
3
votes
0
answers
987
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 ...
1
vote
0
answers
244
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
1
answer
613
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 ...
1
vote
0
answers
21
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.stack.imgur.com/6XkRo.gif
Basically, it's a painting ...
1
vote
1
answer
146
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
0
answers
43
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 ...
2
votes
0
answers
1k
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
1
answer
628
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 ...
0
votes
1
answer
2k
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 ...
0
votes
1
answer
470
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 ...
0
votes
0
answers
1k
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
1
answer
744
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, ...
0
votes
1
answer
98
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 ...
0
votes
0
answers
25
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
1
answer
402
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 ...
0
votes
1
answer
325
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 ...
1
vote
2
answers
571
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, ...