Questions tagged [shaderlab]

ShaderLab is a declarative language for writing shaders used in the Unity3D game engine.

ShaderLab is a declarative language used in all shaders for Unity3D. By itself, ShaderLab can only be used to write simplistic fixed function shaders that are compatible with older devices. However, it is often used in conjunction with and inside of CGPROGRAM snippets to write more complex surface shaders or vertex and fragment shaders.

References

79 questions
0
votes
1 answer

Unity3d Shader does not take alpha channel of color into effect

So i managed to put together this shader that will render a outline of a object and render the rest of the object with some transparency. Here is the entire code: Shader "Outlined/Outline with transperancy" { Properties { _OutlineColor…
Uri Popov
  • 2,127
  • 2
  • 25
  • 43
0
votes
1 answer

How do I get a Light's Range value in Shader?

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. Therefore, I need to compare the distance between…
LeftRight92
  • 256
  • 3
  • 14
0
votes
2 answers

how do I give an array a set of initial values in the unity shading language?

I'm trying to find a way to give a set of initial values to an array within the unity shader. I'm basically tring to do this: static int p[256] = {151,160,137,91,90,15, …
Thijser
  • 2,625
  • 1
  • 36
  • 71
-1
votes
1 answer

How to implement water clipping plane in Unity

https://youtu.be/0NH9k4zTAqk I am using a camera for water reflection. Is there a way to not render as height below the water level? like the youtube video above. Sorry for my bad english.
Coma
  • 1
  • 1
1 2 3 4 5
6