Имплементация энергии фонаря, уменьшение энергии со временем, возможности восполнить энергию, а также шейдера для симуляции прозрачности (ослабления света фонаря) с помощью дизеринга
This commit is contained in:
parent
434493578c
commit
fdb4fc40cc
6 changed files with 97 additions and 28 deletions
|
@ -7,13 +7,13 @@ using System;
|
|||
[Tool]
|
||||
public partial class PointLight2DWorkaround : PointLight2D
|
||||
{
|
||||
[Export] public Viewport LightViewport;
|
||||
[Export] public Viewport LightViewport;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
base._Process(delta);
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
base._Process(delta);
|
||||
|
||||
Texture = null;
|
||||
Texture = LightViewport.GetTexture();
|
||||
}
|
||||
Texture = null;
|
||||
Texture = LightViewport.GetTexture();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue