combining two shaders?
i have two shaders - one that is for my water, another that is a stensal shader used to remove water in the hull f a ship. stenal shader - Shader "Custom/Stencil/Diffuse NotEqualOne" { Properties {...
View ArticleworldPos not correct in surface shader
Hello! I am writing a custom Unity Shader where the mesh data is constructed in a Compute Shader and then drawn using Graphics.DrawProceduralIndirect. The problem I have is, that the shader I want to...
View Articleshadertoy to unity,Shadertoy to unity
https://www.shadertoy.com/view/wtSfDK# this shader convert to unity Shader "Hidden/Gravity Racer X " { Properties { _MainTex("Texture", 2D) = "white" {} iResolution("iResolution",vector) = (1,1,1,1)...
View ArticleWhy doesn't my new shader property show up in the inspector?
Hi, I'm trying to create a new shader based on the standard shader code that Unity provides. I copied and pasted Unity's standard shader code into a new shader called "Custom/Outline" and added a new...
View ArticleSetting custom camera projection matrix
Hi. I am trying to set "*unity_CameraProjection*" parameter of the shader for material to use different FOV but unity prevents me just setting it directly. I know i can set it to a different float4x4...
View ArticleHow to add normal map to "color" shader?
Hello all, I have a shader which interpolates between the gradient values (0, 255) and renders the colors. Its a vert and frag shader. All I need to do is add a normal map to the surface these colors...
View ArticleShader Graph Gore Shader
hi. I came across this cool shader on GitHub the other day https://github.com/zulubo/SkinGore .how would I be able to pull off something like this using shader-graph?
View ArticleShader Programming Missing Texture
Hello. I am trying to write an outline shader for my 3D game but the problem is that my material only works for projects not using URP. For projects that use URP, the only thing I can see is the...
View ArticleRaymarching heightmap for volumetric display
Hey, I am trying to implement raymarching into a heightmap in a shader to display a volume of this heightmap. I was thinking to create a cube to raymarch into and then check whether or not the current...
View ArticleDevelop tessellation shader using shader grapgh in URP project
I'm using unity 2019.4.20f & try implement tessellation shader using shader graph in URP project. I have refer the unity documentation ([tessellation][1]) as well. Also I go though this [thread][2]...
View Article"Stencil Operation" property setup?
I know when declaring the properties for a shader there are some types of "input": float, range, color, 2D. but when I try to set up a Stencil Operation as a property. how to do this? I mean what I...
View ArticleHow to make a 2d pixel art shader for a glass window that show outer space?
I want to make some glass windows in a spaceship that show outer space. Each window would have a shader that randomly generated a bunch of starts, each start changes its brightness overtime (some...
View ArticleHow to get the value of a pixel of a noise node if it's greater than some...
I want to randomly generate some pixels on a shader, each with different brightness. I came up with a graph that has 1 simple noise node and a step node that only took the pixel of the noise if it...
View ArticleShader graph node that return the value of the input node if it's greater...
Are there any nodes that like the step node but rather than return 0 or 1, it returns the exact value of the input if it's greater than some threshold?
View ArticleSurface Shader w/ Modified Vertex Shader
Hello, I have been working on some new vertex compression techniques for mobile devices, and I wanted to see if there was a way that I could make my new vertex format compatible with the existing...
View ArticleSet a single float in a FloatArray on a shader
In shader code I have a float array: float _X[250]; Doing this in a script then works fine: material.SetFloatArray("_X", x); However, for each update I only want to change a single value of the array....
View ArticleStretching when using world coordinates
Hi, I've just started to work with shaders and I am completely lost. I've now created a vertex shader (?) that uses world coordinates, but they only work in one direction and appear streched when...
View ArticleOnly render stencil mask when behind maskable object
![screenshot of the described issue][1] So I basically want only the mask behind the wall to render. I've solved this by doing a raycast to detect whether the mask should be visible or not, but this...
View ArticleHow to multiply a float4x4 and a float4 in unity shaders?
I'm trying to make a post-processing shader to simulate what a colorblind person would see. In glsl you should just need to multiply the color by a mat4 but unity shaders doesn't have this since I...
View ArticleOverlaying a Darkening Texture over Certain UVs with a Shader
I have a base material that has a texture with multiple sprites that overlay onto a mesh by assigning the proper uvs. I'm a complete and utter noob when it comes to shader programming, but I need to...
View Article