From b3808f0c654471157fad06e893984a7387c77e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henri=20Hyyryl=C3=A4inen?= Date: Tue, 30 Jul 2024 14:35:20 +0300 Subject: [PATCH] Fixed shader check not running (was a problem leftover from Godot 4 update) (#5303) * Fixed shader checks not running anymore * Add info on good practices to run CI checks in CONTRIBUTING.md * Fixed a long line in a shader --- CONTRIBUTING.md | 14 ++++++++++++-- RevolutionaryGamesCommon | 2 +- shaders/CompoundCloudPlane.gdshader | 3 ++- shaders/MucocystEffect.gdshader | 4 ++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8a17e15efa9..956047c0294 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,7 @@ create an issue about it. ## Github Issues -Issues on our Github are not meant for general feedback. We only +Issues on our GitHub are not meant for general feedback. We only accept bug reports about something not working. Team members after consulting other team members are allowed to create issues about new or improved features. If someone else creates such an issue, that @@ -113,11 +113,21 @@ sporadically fail without you being at fault. If you are unsure if that's the case (even after using the code checks locally), you can ask someone from the team to look at the situation. -To view CI build logs and other information, press the "details" button on Github in the +To view CI build logs and other information, press the "details" button on GitHub in the checks section. rider godot plugin +When the CI checks fail please try to correct as many issues at once +before pushing new commits as each new push triggers check jobs, which +will take a while if there are many of them (as we don't have infinite +number of CI runners). If there is a need to iterate a lot on fixing +the problems it is also preferable to run the checks locally before +pushing changes to make sure the checks are going to +pass. Instructions for running the checks locally are in the setup +instructions document +[here](doc/setup_instructions.md#running-the-format-checks). + When updating Godot import settings (meaning changing the settings for an existing asset, if you just added a new one, you don't need to do this), or adding new C# dependencies, you should update the cache diff --git a/RevolutionaryGamesCommon b/RevolutionaryGamesCommon index e97113e52f6..f0bde37c8b2 160000 --- a/RevolutionaryGamesCommon +++ b/RevolutionaryGamesCommon @@ -1 +1 @@ -Subproject commit e97113e52f6fcd22b4621fef6d822e037e1c65a8 +Subproject commit f0bde37c8b295c0f94a61d38f559056b8c9be5fa diff --git a/shaders/CompoundCloudPlane.gdshader b/shaders/CompoundCloudPlane.gdshader index a2a3c2dee03..7883e6affbc 100644 --- a/shaders/CompoundCloudPlane.gdshader +++ b/shaders/CompoundCloudPlane.gdshader @@ -59,7 +59,8 @@ void fragment() { colour3 * cloud3 + colour4 * cloud4; - float adjustedAlpha = min(cloud1 + cloud2 + cloud3 + cloud4, 1.0) * clamp(min(cloud1 + cloud2 + cloud3 + cloud4, 1.0) * 0.3, 0.3, 0.7); + float adjustedAlpha = min(cloud1 + cloud2 + cloud3 + cloud4, 1.0) * + clamp(min(cloud1 + cloud2 + cloud3 + cloud4, 1.0) * 0.3, 0.3, 0.7); ALPHA = adjustedAlpha; ALBEDO = colour.rgb; diff --git a/shaders/MucocystEffect.gdshader b/shaders/MucocystEffect.gdshader index 3158aac7663..af31b624413 100644 --- a/shaders/MucocystEffect.gdshader +++ b/shaders/MucocystEffect.gdshader @@ -22,8 +22,8 @@ void vertex(){ void fragment() { float outer_edge = UV.y - 0.45f; - float inner_edge = (0.5f - UV.y) - 0.1f; - + float inner_edge = (0.5f - UV.y) - 0.1f; + float mask = max(0.f, outer_edge * 10.f); float mask2 = max(0.f, inner_edge * (1.f + fade));