bonne planche de sprite

This commit is contained in:
Antoine
2021-06-17 20:42:16 +02:00
parent adfcf068e6
commit 0c24eea79f
2 changed files with 11 additions and 2 deletions

View File

@ -14,8 +14,14 @@ void main()
{ //Rectangle plus large que haut
vec4 colorTemp = color;
float ouverture = 0.8f;
// Effet "tube"
float lum = -pow(fragCoord.y + height/2f, 2f) * 5f /height + ouverture;
colorTemp.xyz *= lum;
// Effet flash sur la surface
float flash = abs(sin(time)) + 0.4f;
colorTemp.xyz *= flash;
if (leftToRight){
if (fill > fragCoord.x){
FragColor = colorTemp;