Skip to main content

Questions tagged [shaderlab]

Filter by
Sorted by
Tagged with
0 votes
0 answers
437 views

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 ...
Muhammad Faizan Khan's user avatar
2 votes
1 answer
2k views

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 ...
Jacksonkr's user avatar
  • 259
0 votes
0 answers
88 views

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 ...
rasputin's user avatar
0 votes
0 answers
843 views

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 ...
Cyclone's user avatar
  • 51
0 votes
0 answers
192 views

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 ...
A__'s user avatar
  • 163
0 votes
1 answer
569 views

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 ...
Andrey's user avatar
  • 230
0 votes
0 answers
63 views

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. ...
Aimon Z.'s user avatar
  • 107
0 votes
1 answer
2k views

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 ...
deanrihpee's user avatar
0 votes
0 answers
258 views

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 ...
OtakuFitness's user avatar
2 votes
1 answer
1k views

I don't understand how semantics are used in shaders. While reading Unity's shader tutorials, I come across this ...
Mingheng Wang's user avatar
1 vote
1 answer
3k views

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. ...
Seyed Morteza Kamali's user avatar
1 vote
1 answer
3k views

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 ...
The Oathman's user avatar
0 votes
1 answer
5k views

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 ...
Ziya Jafarov's user avatar
0 votes
2 answers
373 views

Had plans to follow GPU Gems to gain knowledge in Shaders - but my journey came to an abrupt end. ...
Sindri's user avatar
  • 21
0 votes
0 answers
327 views

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 ...
PixelCake Games's user avatar
1 vote
2 answers
2k views

I'm trying to create a shader that will make the object invisible and then with a script a fade in/out effect between invisible and visible. What I tried: ...
Daniel Lip's user avatar
  • 1,785
76 votes
1 answer
25k views

In my game I need to create dynamic water puddles but I cannot find a tutorial that shows how I can make such an effect (an example of which is shown below). How can I do it?
Seyed Morteza Kamali's user avatar
0 votes
1 answer
3k views

I'm trying to make invisible object with shadow by using it's shadow castting pass it additionaly shades back side of object itself. I mean object shades his back side and draws shadow on the ...
Seyed Morteza Kamali's user avatar
9 votes
1 answer
3k views

Divinity Original Sin have beautiful particle effect , When I move around game I see galaxy through particle that move according to my position.how can I make like it? you can see this effect here: ...
Seyed Morteza Kamali's user avatar
13 votes
3 answers
10k views

I'm trying to make rain effect drop with metaballs and trail on screen.I find a clue in shadertoy but I didn't understand how implemented: https://www.shadertoy.com/view/ltffzl unfortunately it have ...
Seyed Morteza Kamali's user avatar
0 votes
1 answer
3k views

my effect is loop but I need have delay between each flash effect.i don't want use c# code because i believe there is easy way to implement delay in shader. ...
Seyed Morteza Kamali's user avatar
3 votes
1 answer
5k views

I have plane that I want to roll up using a vertex shader, like this: I found a math demo that shows the kind of curve I want my mesh to follow. I tried implementing this in my shader code, but the ...
Seyed Morteza Kamali's user avatar
2 votes
0 answers
1k views

So here is what I am trying to do. Given irregular polygon (on the left) I would like to be able to create a shader that would resemble Photoshop inline glow effect with opaque fill (on the right). ...
IndieForger's user avatar
0 votes
0 answers
174 views

This is my flow map shader , it works correctly but I have problem In Rendering. how can I Increase pixels per unit In my shader? ...
Seyed Morteza Kamali's user avatar
0 votes
1 answer
2k views

I can get the vertex Input in vertex shader as follows: o.worldPos = v.vertex.xyz; But how do I get the worldPos directly without filling the out parameter in ...
Seyed Morteza Kamali's user avatar
1 vote
0 answers
117 views

this is my flag: I need to adding shadow effect on my animated flag like below image but I don't know how can I do this: here is my shader: ...
Seyed Morteza Kamali's user avatar
2 votes
1 answer
230 views

I am writing a shader to my Unity game and I want to have effect this type of effect: Base texture, for example, skin of character is a texture that will use shadows, lighting. Second texture, unlit, ...
Michael's user avatar
  • 119
6 votes
1 answer
2k views

In many games there Is section as customize character that you can make your own character.I always love to know how can I make something like It. Even old game have this feature? but how ? For ...
Seyed Morteza Kamali's user avatar
9 votes
1 answer
1k views

I used a vertex shader (based on this example) to animate a flag waving. When I have a single flag in my scene, it works correctly. When I duplicate the flag, all of the copies become wildly ...
Seyed Morteza Kamali's user avatar
0 votes
1 answer
3k views

I've a very sipmle Unity scene. It has two objects in it, which is Sprites, and they both use sipmle black boxes as a textures. Here's two shaders, one should act as a mask, and second as a object, ...
PaulD's user avatar
  • 801
1 vote
0 answers
1k views

I'm experimenting with adding some procedural textures to the unity standard shader. I'd like to add an extra pass (with vert and frag functions), but am unsure about where in the sequence this should ...
UpTheCreek's user avatar
4 votes
0 answers
3k views

I'm trying to create a continuous output of light from an object (like the exhaust of a space ship), and I thought I'd use particles to achieve this. But I'm running into a problem with alpha blending....
eternal's user avatar
  • 341
2 votes
0 answers
476 views

I am looking for definitive information on Shaderlab's API and the Cg language. The documentation I have found so far has been by way of example programs rather than a definition of APIs. Also, ...
user3457326's user avatar
3 votes
1 answer
2k views

I am trying to create an image effect where only a part of the image has the effect applied to. One way I can think of to do this is to define the portion of the image using the stencil buffer. ...
eclmist's user avatar
  • 1,143
4 votes
1 answer
4k views

In Unity's Shader lab, I've read that the Stencil buffer is implemented with a mask, and an object reacting to the mask. The mask may be defined like the following: ...
eclmist's user avatar
  • 1,143
0 votes
0 answers
136 views

I'm trying to achieve the following setup: 2 cubes. In the image attached they are the green and pink cube. They are both rendered culling their front faces, so that they are visible if a camera ...
SaldaVonSchwartz's user avatar
1 vote
1 answer
839 views

I'm trying to write a shader that doesn't blend additively etc etc. I'd like to take whichever of the source or destination colours is brighter and use that and ...
LeftRight92's user avatar
4 votes
2 answers
1k views

I'm trying to write a simple frag/vert shader that, depending on whether it is in the range of a light, will paint the appropriate colour from either the 'lit' texture or from the 'unlit' texture. ...
LeftRight92's user avatar
2 votes
1 answer
2k views

So I have this rather simple surface shader that essentially cuts a hole in the object based on another texture. ...
Uri Popov's user avatar
  • 3,037
1 vote
1 answer
7k views

The objective here is to change the color of the nearest object. (the nearer the object, the more "colorful" the object gets rendered; and the farther away, the more "grey" the ...
OC_Raiz's user avatar
  • 11
0 votes
1 answer
260 views

I am writing a shader to achieve a laser show effect example. For now I am just focusing on the lines. One line ist represented as one triangle. When I save my shadercode, unity gets inactive and I ...
Freshchris's user avatar
7 votes
1 answer
24k views

I'm old in Game Development but very new in shader writing. I just want a shader that transform from 1 texture to another. So I did start learning shader writing and wrote my desired shader. But ...
Hamza Hasan's user avatar
  • 3,397