Cell Shading Using 2D Renderer?
Hi! I've been messing around with ShaderLab and ShaderGraph, trying to make a 2D Cell/Toon Shader, that replicate the one in [Laigter][1]. (awesome software btw) ### Where I'm at: ### Currently I have...
View ArticleHow can I add Color property To This Shader
I want to change the color of material. Texture is working But how can i add COLOR property to change material color. Thanks. Shader "Custom/Jelly" { Properties { _MainTex ("Base (RGB)", 2D) = "white"...
View ArticleTrying to make a raymarching shader
I'm trying to make a raymarching shader in unity thats currently only meant to display a simple circle. But for some reason it just doesn't want to work and is only showing the background colour i set....
View ArticleSharing code between shader and c# - how?
Hi Everyone, With the new Unity.mathematics library we can now write more or less identical code for (compute) shaders and c#. Fantastic! But *really* great would be if I could use a single source file...
View ArticleHow to learn HLSL?
I am trying to make a custom lighting system for Unity to solve some strange problems I have had with the native lighting system. For this I have opted for a script partnered with a shader, and for...
View ArticleIs there a default / built-in vertex shader so I can avoid the boilerplate?
I'm writing a custom shader, but the crux of the code is present in the fragment function. The vertex function is pretty much just boilerplate and "wasted space". When writing a post-processing shader,...
View ArticleSplat Map with transition texture?
Hi! I have been following [catlikecoding's tutorial][1] on this terrain editor and i need help figuring out how or where i would add a texture to the shader in order to transition from one texture to...
View Articlehow to debug shader on android
is there anyone who helps me to do debugging hlsl shader on an android device? In case of window, I have been debugging it with renderdoc as below. ![alt text][1] And now, I've tried to debug it on...
View ArticleHow to not have custom node variables be global across all material instances
Hi there! I wrote a shader in HLSL but I needed to switch to Shader Graph cause I wanted easy, flexible lighting. I'm working in URP with Unity version 2020.3.25f1. However I needed to put some of the...
View ArticleHow to use the compute shader to sample the depth map under URP and calculate...
Here is my code, but the output is always weird. compute shader: #pragma kernel WaterSplash struct Particle { float3 position; float lifetime; float showScale; }; RWStructuredBuffer particleBuffer;...
View ArticleShader - Cant use TransformObjectToWorldNormal and TransformObjectToWorld
Hi i created an unlit shader and i trying to use the functions TransformObjectToWorldNormal() and TransformObjectToWorld(), and i keep having console erro of: undeclared identifier...
View Articlewhat is criteria shader requires loop unrolling?
Hello, everyone, I'm implementing Volume Rendering using [this](https://github.com/mlavik1/UnityVolumeRendering). And then, this example code uses the `tex3dlod` function to sample 3d texture. When I...
View ArticleIs there a list of Shader input struct naming conventions?
Warning: I don't know much about shaders, so please bear with me. I was trying to go through the default Unity shader, and encountered the following code: struct Input { float2 uv_MainTex; }; From a...
View ArticleNormal edge mapping with neighbouring heightmaps
Hey All! I have a question that has been dogging me for a while. I'm working on a project using extremely high resolution (5cm) Digital Surface Models (DSMs) with 5cm orthomosaics over a ~5km^2. I'm...
View ArticleDefining extra vertex data in image effect shader v2f struct?
In the vertex to fragment struct of this image effect shader, I want to add a float3 that represents the direction between the camera and the vertex. But I'm still new to shaders so I don't really know...
View ArticleSmoke simulation has many jaggers only on the emission entry.
I tried to simulate the smoke emission process with compute shader. After calculating the density of particles with NS equation, I used ray marching to display the animation for each frame. However,...
View ArticleHow do I get the depth texture from a hlsl shader? (HDRP)
I'm trying to simply sample the camera's depth texture from an hlsl shader. Supposedly all you need to do is declare a sampler2d "_CameraDepthTexture" but this has not worked for me. I've tried...
View ArticleCompute Shader cannot unroll loops,Compute shader cant untroll loops
Hey! I've been working on outsourcing neural networks onto the GPU. Since I am a beginner with hlsl (but I think I got a basic idea of hlsl etc now), this takes me so much time. While I thought I'd be...
View ArticleCanvas Image UV change on play mode (Shader Lab)
Hello everyone, i need help regarding shader so i just wanna lerp 2 image using main texture uv. its working in editor mode but its not working in play mode. anybody knows something about this ? Editor...
View ArticleNvidia HLSL extensions
Is there a way to use [Nvidia's HLSL Extensions][1] in Unity shaders? Specifically I'm interested in [timer instrumentation][2] and [shader execution reordering][3] in ray tracing shaders. I can...
View Article