115 questions
-2
votes
1
answer
57
views
Unity - Shader Graph - Channel Mixer [closed]
I started learning Unity and Shader Graph. Right now I try to understand, how the Channel Mixer is working internally.
I put in a color R 50,G 100,B 150 and the configuration on the output-R channel ...
1
vote
0
answers
47
views
Seeing both 2 faces of the mesh in Unity
I am using Shader Graph in Unity 6 to create the dissolve effect and its Surface Type is Transparent and Rendering both sides. The problem is that this causes the back faces of the object that are ...
0
votes
1
answer
104
views
(Bi)tangents in Unity Shader Graph when modifying vertices
My current shader makes a linear road mesh follow a bezier.
It also is supposed to allow for both normal uv mapping and worldspace mapping.
I tried to distort the normals and tangents along with the ...
0
votes
0
answers
33
views
How can I Move a texture overlay if the texture is rendered over world space?
I am using a shader created by jess-hammer.
Image of Jess-hammer's shader
I have a very simple TerrainController which controls a tilemap that is using the shader above.
using UnityEngine;
public ...
0
votes
1
answer
130
views
Shader to shader graph unity 6
I have this shader , this is what the code looks like:
Shader "Hidden/FogOfWar"
{
Properties
{
_MainTex ("Main Texture", 2D) = "white" {}
...
0
votes
0
answers
106
views
Vertex displacement shader creating holes in the mesh (UNITY Shader Graph)
I need help with my shader graph I'm offsetting the vertices on their normal axis and somehow it causes tearing in the mesh causing there to be holes in my rock.
I've tried using a world position node ...
0
votes
0
answers
42
views
How to add Distortion Coefficients to Unity Camera?
I am currently working on a Unity Project with HDRP to export Images for the training of a Machine Learning Model. Therefore Unity needs to ouput images with the same distortion as my physical camera ...
0
votes
0
answers
40
views
Unity - Shader Graph & Sorting group Error
I have a question about Unity's Sorting group and Shader Graph.
[interactive 2D water] (https://youtu.be/TbGEKpdsmCI?si=79lD21CmRytbruJF)
I created interactive water after watching this video and ...
0
votes
2
answers
112
views
Unity URP set decal Base Map via script
private void GenerateBrushTexture()
{
int textureSize = Mathf.CeilToInt(radius * 2);
brushTexture = new Texture2D(textureSize, textureSize);
for (int x = 0; x < textureSize; x++)
{
...
1
vote
1
answer
415
views
Updating a material's property in Edit Mode
I have created a simple color swap shader, and then a material from it. Now, I would like to see the effect in action in Edit Mode.
However, I receive the following error:
Instantiating material due ...
1
vote
1
answer
60
views
Unity shader graph converting issue
Does anyone know how to convert this float(actually vector2?) on the image into kinda list or smth like that with just float (not vector2).
I want to use this gaussian noise to randomize my amplitude.
...
0
votes
0
answers
149
views
Swapping palettes using Shader Graph in Unity
What I am trying to do is: Swap between palettes for one character. There is a character imported from .aseprite (via unity aseprite importer) and two other .asperite files that are palette ...
0
votes
2
answers
273
views
Difference between world-normal calculated by sampling view-normal texture and world-normal texture
I have a custom renderer feature that create normal texture and using that.
Normal texture can be view or world space.
If I create view space normal texture and sample with the uv node of the full ...
1
vote
1
answer
359
views
How to apply a different texture to the Back face of the material in Reality Composer Pro?
I would like to apply different textures to the front and back faces of a 3D material. Specifically, when applying a texture that cuts the object in half through opacity, I want to be able to observe ...
3
votes
0
answers
243
views
How to access value of time node in a shader created by Reality Composer Pro?
I am creating a shader in Reality Kit Pro that sets a material's opacity
based on the texture coordinate y-value and how much time has elapsed
since TimeStart. The Time node below is the current ``...
-2
votes
1
answer
2k
views
Unity: trying to set a global shader property using .SetGlobalFloat [duplicate]
Im creating a 3d game in Unity, basically, I have a shader that the in game scanner uses, multiple things are scannable meaning there are multiple materials with the same shader. This shader is ...
0
votes
1
answer
219
views
Unity ShaderGraph: Creating Opacity Hole for Objects Inside Cloud - URP
"Hello, I'm currently working with Unity version 2022.3.11f1 and utilizing Shader Graph. In my project, I have implemented a cloud, as visible in the attached photo. My goal is to enhance the ...
0
votes
0
answers
374
views
Unity URP custom line shader rendering flickering/artifacts, especially at high angle and distance
screenshot
As you can see lines disappear at the end and it also flickers when moving the camera.
I am rendering these lines using shader graph UV node and smoothstep.
there is nothing suspicious ...
-1
votes
1
answer
622
views
Gradient from white to transparent instead shows as white to black
I need how to make a gradient that smoothly transitions from white to transparent for a 2D sprite via a URP shader graph.
It seems like I’m already set up and everything should work, but for some ...
-2
votes
1
answer
694
views
So I made a curve shader in unity shadergraph
I made a curve shader using shadergraph. But it has a flaw. The current version calculates the offset and adds it to object vertex positions. This works well if the objects forward vector is parallel ...
0
votes
1
answer
107
views
Normal map rendering is broken , in Renderer2D using Light2D and shader graph with normal map
there,
Because normal map rendering is broken. I very comfused.
Using Light2D in Renderer2D, And Sprite Lit shader graph with Normal map.
Graph is very simple. Here is this graph.
However this shader ...
0
votes
0
answers
203
views
How can I rotate my material in shader graph
My project that was from tutorial made by Sebastian Lague about procedural generation and I upgraded it to URP
Before upgrade it looked like this:
I needed to recreate the material from scratch using ...
0
votes
0
answers
459
views
issue with the vertex position node when more than one object uses a shared material
I'm using a graph shader to do a simple shift of the vertices of a 2D mesh. When object is in zero coordinates all seems to work, but the further from the center, the stronger the distortion, which ...
3
votes
1
answer
576
views
Possible bug in Reality Composer Pro GeometryModifier?
I don't have experience in Computer Graphics, so I am not sure how the GeometryModifier of the Reality Composer Pro works. But to me there seems to be a bug (Version 1.0 (385.2)).
To test, I created a ...
0
votes
1
answer
746
views
How make shader for dashed outline of rounded rectangle?
How make dashed outline for rounded rectangle like in figma?
I tried wrote this, but I did only part with rounded rectangle and outline based on subtraction two rounded rectangles with different ...
0
votes
0
answers
146
views
Problem with custom shader for blending textures in Unity URP project 2021.3.16f
I have a problem with custom shaders in Unity 2021.3.16f which blends two textures 1 - (1 - target) / blend
I needed the effect of enhancing one texture on another, but as a result, I got this effect:...
1
vote
0
answers
247
views
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 ...
1
vote
0
answers
556
views
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 ...
0
votes
1
answer
1k
views
Unity Shader Graph: how to combine lit and unlit rendering in one single shader (is it possible)? Custom (individual per object) fog effect
I'm using Unity 2021.3 (URP). I'm using ShaderGraph.
I'm working on custom fog effect, agile and individual for each 3D lit object of some category. I want to be able to turn some part of lit-shader-...
0
votes
1
answer
512
views
Unity 2021.3.20 Built-in ShaderGraph 12.1.10 Fog Density inverted in linear fog and showing wrong fog colors on far objects
Unity Shader Graph Fog node shows density inverted when using Linear Fog. Also not properly showing the color of the fog on far objects.
0
votes
1
answer
1k
views
Unity - Border around opaque area of transparent texture
I've made a transparent texture to use on a glass jar model. (1024 x 1024 PNG)
I've applied the following settings to the texture and the preview looks good.
But when I sample the texture in shader ...
0
votes
0
answers
62
views
How to distribute a regularly spaced pattern across arbitrary geometry?
Does anyone know how to distribute a regularly spaced pattern across arbitrary geometry in Unity Shadergraph or HLSL?
Here are the requirements:
The geometry will all have the same shader
We know ...
2
votes
1
answer
582
views
Basic twirl shader 2D pulls other sprites in spritesheet
I've been trying to achieve a basic twirl shader effect and I'm pretty close to achieve it. I'm new to shaders and dont understand what's going on here.
I have a spritesheet with several characters, ...
0
votes
0
answers
2k
views
How do I render the depth map using Unity URP?
I want to recreate the "Moebius" style in Unity. I have found this video where someone achieves it, but he only shares the concept and the result and not the source code.
Here are some ...
0
votes
1
answer
105
views
Sprite occlusion sequence error occurs when using Sprite Shader
I tried to render Sprite shadow with the Shader Graph.
But as you can see, the tree is rendered mistakenly before the house.
The tree is rendered before the house
You can see that the tree is actually ...
1
vote
3
answers
2k
views
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 ...
0
votes
0
answers
745
views
Unity Shader Graph Package Installation Error
I had reached for here while struggling with some problems about applying a Package to Unity.
Problem
I’m trying to apply “Shader Graph [v. 12.1.10]” package into Unity [v. 2021.3.20.f1] but there is ...
0
votes
1
answer
402
views
Camera cant see depth unity shader graph
im making water shader and just realized that i can see water depth effect in editor:
but i cant see it in game window:
how do i fix this?
0
votes
0
answers
73
views
After building in Unity, the shaders that apply to the render list disappear
In Editor, no problem. However, After build, the shader disappeared. How can I solve this problem?
I included it in the always included shader but the results are the same.
Platform is Android.
0
votes
1
answer
102
views
object position node works differentlbased on exported position, and size from Blender
Blender export settings
ShaderGraph
when object origin is object centre in Blender, Object position in shader graph works correctly
same object with above, but bigger size, same export settings, (...
0
votes
1
answer
460
views
Why cant I plug this Vector 1 not into Multiply?
I'm in the Unity ShaderGraph and want to add displacement to my shader. I have this Voronoi setup example, which leaves me with a Vector 1 output.
I can plug that into the multiply and displacement ...
2
votes
1
answer
907
views
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. ...
0
votes
1
answer
458
views
Make Unity Shadergraph output match converted C# output
Context
I've been trying to create a buoyancy script that samples the position of a point, tests if it's under a certain level (the "water level"), and adds a force on that position based on ...
0
votes
1
answer
184
views
Problems with buoyancy and multiple Gertsner-waves. Waves created using Shadergraph and equations recreated in code to try and simulate floatation
Quick summation:
I am attempting to create an ocean comprised of planes that can be easily loaded and unloaded based on distance. On this ocean I want a boat to sail with a player onboard in the first ...
1
vote
2
answers
2k
views
Unity3d - Create Skybox Material with Shader graph
i created a material with shadergraph and want to assign it as skybox material. Now i got the problem, that, if i assign it to the environment -> skybox material in the light settings, it is ...
0
votes
1
answer
155
views
How does an image'alpha transfer so much information to other nodes in Unity Shadergraph?
I have a image:
The upper part of this image, which alpha value is 1 (or 255 in RGBA)
The lower part of this image, which alpha value is 0.3, I used it for shadow in game.
So When I import it to Unity ...
1
vote
1
answer
3k
views
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 ...
0
votes
1
answer
519
views
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 ...
0
votes
1
answer
75
views
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 ...
0
votes
0
answers
154
views
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 ...