Introduce a small effect today
Novice boot, we will need a full screen black out, only one area lit effect
Don't say much nonsense, look at the effect first
Http://lightszero.github.io/focuswin/focuswin.html
?
First, let's set up a basic test environment.
Establishment of two quad
Configure the camera like this
Configure the quad as such.
Configure the quadover as such.
This time quad is in the center of the screen, and the screen looks as high
That's what it looks like.
Make such a PNG image
I'll get a background picture.
Then give the background map a unlit material, give quad
Give Quadover a unlit transparent material, give quadover
That's what it looks like.
Let's add a script to quad to keep it full-screen at all times.
Second, let the hollow area move up
Let the hollow area move, so it is possible, this is the multiplication and addition of UV.
If you write a shader,tiling and offset, it should look like this.
You can get an effect like this
Smart you will find the problem, why so much.
Here to mention texture's filtermode, let's revise
This place unity is wrong again, this clamp is actually border, that is, when the UV is out of the 0~1 range, take the edge color of the map.
To adjust.
You get the
Such an effect
Three, drive the skeleton position and size
And then we're going to do a conversion, and calculate the corresponding tiling and offset according to the area we want.
Add the following script to Quadover
You can drag the cutout area with your mouse.
Use the mouse wheel to change the size of the cutout area
Sword English to accompany you to play graphics (v) focus (draft)