P
P
Pavel2018-05-28 21:39:54
Shaders
Pavel, 2018-05-28 21:39:54

How to get time dependency in HLSL?

I understand shaders.
I want the fragment shader to return the X gradient from 0 to the given color.
At the same time, I want to insert a dependency on time into the alpha channel (so that the shader ... blinks)
skrinshoter.ru/s/280518/BPV9umbB?a
So: where can I get a variable with a changing time? What would the input data change.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2018-05-28
@youkerni

Actually in the unit, the global variable is called
_Time.
is a float4 . xyzw - each of them represents time with a multiplier ..
well, in general, the set of built-in variables is described here
https://docs.unity3d.com/Manual/SL-UnityShaderVari...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question