Questions tagged [shaderlab]
The shaderlab tag has no summary.
42 questions
0
votes
0
answers
367
views
Overlapping geometry (Z - Fighting) solution with shader in Unity
I have geometry that is overlapping with other geometry (the floor). So, I used a shader to bring my desired mesh to the top. However, a new problem arose: the shader was rendering not only on top of ...
2
votes
1
answer
2k
views
How to support Texture Tiling + Offset for custom shader
I've written a custom shader (with help) and I'm not sure why it does not have tiling & offset capabilities. What is the simplest way to add that feature to my shader?
current shader code
...
0
votes
0
answers
65
views
Discarding pixels of a 2D game object based on its properties in camera render texture
I have a C# script and a shader script that is supposed to create two game objects and discard pixels of the second game object based on whether or not the b value of the pixel as shown in a camera's ...
0
votes
0
answers
806
views
Render only part of mesh that is intersected into inother Mesh in Unity
How can i make ZTest only happen inside a object not behind it?
my shader is simple unlit with two pass one is ZTest Greater as red one and one is ...
0
votes
0
answers
181
views
Why is the back layer sometimes rendering in front?
I have a layer rendering issue, where the top layer of content will sometimes not render to screen as it appears that the bottom layer is rendering on top (even though it's behind in world space). It ...
0
votes
1
answer
536
views
OUT.worldPosition effect on shader
I am trying to follow a shader tutorial from 2016 for unity.
I reached the point where the author is distorting the text by changing OUT.wordPosition
...
0
votes
0
answers
56
views
How to make it possible to change the width of the stripes?
I am making a shader to create stripes based on this tutorial, but I cannot set the width for each stripe and make a shader that accepts light.
...
0
votes
1
answer
2k
views
How to do "Screen Space Texture" mapping on a Unity UI Image?
So I'm fairly new to the shader and I've been trying to achieve this kind of effect from Ronja Tutorials, but instead of using it for normal mesh object, I'm trying to use it for Screen Space UI Image ...
0
votes
0
answers
245
views
Stencil test doesn't work at all in Unity when I am using a custom shader
I am using Unity 2019.3 and I have a custom shader A which contains the code
Stencil{
Ref 5
Comp Equal
Pass Keep
}
And the other custom shader B ...
2
votes
1
answer
1k
views
how are semantics used when declaring a struct?
I don't understand how semantics are used in shaders. While reading Unity's shader tutorials, I come across this
...
1
vote
1
answer
3k
views
Morphing a 3D model into a sphere or cube using a vertex shader
I want to morph between 3d models.I found a simple OpenGL code to morphing In Graphics Shaders: Theory and Practice(page 456) but I couldn't Implement it correctly in unity.
...
1
vote
1
answer
3k
views
Custom shadow mapping works with perspective light view but not with orthographic
About a week ago, I decided to make my own shadow mapping technique in Unity based on my understanding of the whole thing. The entire experience was somewhat successful. I learned a lot and I get to ...
0
votes
1
answer
5k
views
How to add emission to texture in shader?
I want a texture to emit itself by 1, not more. In Standard Shader I enable Emission and set texture to Color and Color to 1. I don't need emission to go beyond the object, I only need the texture to ...
0
votes
2
answers
335
views
GPU Gems Chapter 1, update normal
Had plans to follow GPU Gems to gain knowledge in Shaders - but my journey came to an abrupt end.
...
0
votes
0
answers
316
views
Half-shaded pixel artifacts on 2d dynamic lighting shader
I'm working on a shader for dynamic lighting in a 2 unity game. I'm new to shaders but I've managed to get something close to the effect I was looking for, although not 100%.
As you can see in the ...