From b776f76fad6d249dd8c26b1035d2485e779bc699 Mon Sep 17 00:00:00 2001 From: Josef Date: Fri, 26 Sep 2025 14:00:59 +0200 Subject: [PATCH] Shader Generation --- .../Procedural/Grass/grass-albedo.jpg.import | 6 + .../Procedural/Grass/grass-normal.jpg.import | 6 + Assets/Procedural/Grass/grass-orm.jpg.import | 6 + .../rokojori-base-floor-4x4m.svg.import | 6 + .../rokojori-action-library-splash.png.import | 6 + Assets/Textures/black.svg.import | 6 + Assets/Textures/white.svg.import | 6 + Icons/1stPersonCamera.svg.import | 6 + Icons/3rdPersonCamera.svg.import | 6 + Icons/Action.svg.import | 6 + Icons/ActionList.svg.import | 6 + Icons/ActionSequence.svg.import | 6 + Icons/App.svg.import | 6 + Icons/AudioManager.svg.import | 6 + Icons/AxisSensor.svg.import | 6 + Icons/CCGravity.svg.import | 6 + Icons/CCGroundReset.svg.import | 6 + Icons/CCJump.svg.import | 6 + Icons/CCMoveAndSlide.svg.import | 6 + Icons/CharacterController.svg.import | 6 + Icons/CharacterControllerAction.svg.import | 6 + Icons/Condition.svg.import | 6 + Icons/ConditionalAction.svg.import | 6 + Icons/EditorCamera.svg.import | 6 + Icons/FollowCamera.svg.import | 6 + Icons/Grabbable.svg.import | 6 + Icons/Grabber.svg.import | 6 + Icons/Help.svg.import | 6 + Icons/Icon.svg.import | 6 + Icons/Interactable.svg.import | 6 + Icons/Interaction.svg.import | 6 + Icons/Interactor.svg.import | 6 + Icons/KeySensor.svg.import | 6 + Icons/LocaleManager.svg.import | 6 + Icons/LocalizedString.svg.import | 6 + Icons/LookAtCamera.svg.import | 6 + Icons/MouseSensor.svg.import | 6 + Icons/NetworkManager.svg.import | 6 + Icons/OnEvent.svg.import | 6 + Icons/Parallel.svg.import | 6 + Icons/Pointable.svg.import | 6 + Icons/Pointer.svg.import | 6 + Icons/PostProcess.svg.import | 6 + Icons/RemoveVirtualCamera3D.svg.import | 6 + Icons/Rokojori-Action-Library-Logo.svg.import | 6 + Icons/Scatterer.svg.import | 6 + Icons/Selector.svg.import | 6 + Icons/Sensor.svg.import | 6 + Icons/SensorGroup.svg.import | 6 + Icons/SensorManager.svg.import | 6 + Icons/SequenceAction.svg.import | 6 + Icons/SetActiveVirtualCamera3D.svg.import | 6 + Icons/Spline.svg.import | 6 + Icons/StrategyTopDownCamera.svg.import | 6 + Icons/TimeLineManager.svg.import | 6 + Icons/UI.svg.import | 6 + Icons/UIBorderImage.svg.import | 6 + Icons/UIBreak.svg.import | 6 + Icons/UIImage.svg.import | 6 + Icons/UIInputIcon.svg.import | 6 + Icons/UIRegion.svg.import | 6 + Icons/UISpace.svg.import | 6 + Icons/UIText.svg.import | 6 + Icons/VirtualCamera3D.svg.import | 6 + Icons/VirtualCamera3DSlot.svg.import | 6 + Icons/VirtualCameraManager.svg.import | 6 + Icons/WorldMap.svg.import | 6 + Icons/WorldMapLayer.svg.import | 6 + Runtime/Actions/ActionSequence.cs | 8 + Runtime/Actions/OnReady.cs | 8 + Runtime/Actions/OnTick.cs | 4 +- Runtime/Actions/RemoveNode.cs | 2 +- Runtime/Actions/SequenceAction.cs | 3 +- .../Visual/TweenFloatShaderProperty.cs | 115 +++++++ .../Visual/TweenFloatShaderProperty.cs.uid | 1 + Runtime/Actions/Visual/TweenLight.cs | 6 + Runtime/Actions/Visual/TweenParticles.cs | 6 + Runtime/Actions/Visual/TweenPosition.cs | 6 + Runtime/Actions/Visual/TweenScale.cs | 83 +++++ Runtime/Actions/Visual/TweenScale.cs.uid | 1 + .../Flash/Presets/Orange Boost - Flash.tres | 8 - Runtime/Animation/Sky/SkyAnimator.cs | 60 ++++ Runtime/Animation/Sky/SkyAnimator.cs.uid | 1 + .../Animation/Transform/AnimateTransform.cs | 13 + Runtime/Cameras/CameraManager.cs | 2 +- .../StrategyTopDownCamera.cs | 6 + ...nt_adjustments_3d_lut_template.webp.import | 2 + Runtime/Colors/ColorChannelType.cs | 69 ++++ Runtime/Godot/Nodes.cs | 85 +++++ Runtime/Math/Geometry/Box2.cs | 15 + Runtime/Math/Geometry/Box3.cs | 2 + Runtime/Math/Geometry/Overlap2D.cs | 24 ++ Runtime/Math/Geometry/Overlap2D.cs.uid | 1 + Runtime/Math/Math2D.cs | 31 ++ Runtime/Math/Math3D.cs | 22 ++ Runtime/Math/MathX.cs | 9 + Runtime/Procedural/Assets/Grass/GrassPatch.cs | 10 + Runtime/Procedural/Mesh/MeshGeometry.cs | 5 + .../Procedural/Noise/RGB 3D Noise.png.import | 6 + Runtime/Random/RandomEngine.cs | 16 + .../Assets/Foliage/FoliageRenderer.cs | 6 +- .../SingleShaderCompositorEffect.cs | 2 +- Runtime/Rendering/Objects/RDProgram.cs | 38 +-- .../RenderGraph/RDShaderProcessor.cs | 2 +- .../Mouse/Mouse-Button Middle.tres | 11 +- .../Mouse/Mouse-Button Right.tres | 11 +- .../GamePad-Axis-Background.svg.import | 6 + .../GamePad-Axis-Left + Right.svg.import | 6 + .../Graphics/GamePad-Axis-Pressed.svg.import | 6 + .../GamePad-Axis-Up + Down.svg.import | 6 + .../Graphics/GamePad-Axis-Up.svg.import | 6 + .../GamePad-DPad-Background.svg.import | 6 + .../GamePad-DPad-Left + Right.svg.import | 6 + .../GamePad-DPad-Up + Down.svg.import | 6 + .../Graphics/GamePad-DPad-Up.svg.import | 6 + .../GamePad-Left-Shoulder-Button.svg.import | 6 + .../Graphics/GamePad-MainButton.svg.import | 6 + .../GamePad-Right-Shoulder-Button.svg.import | 6 + .../Graphics/Keyboard-EnterKey.svg.import | 6 + .../Graphics/Keyboard-Indicator.svg.import | 6 + .../Graphics/Keyboard-SpaceKey.svg.import | 6 + .../InputIcons/Graphics/Keyboard.svg.import | 6 + .../Graphics/Mouse-Left Button.svg.import | 6 + .../Graphics/Mouse-Middle Button.svg.import | 6 + .../Graphics/Mouse-Right Button.svg.import | 6 + .../Graphics/Mouse-Wheel Down.svg.import | 6 + .../Graphics/Mouse-Wheel Up & Down.svg.import | 6 + .../Graphics/Mouse-Wheel Up.svg.import | 6 + .../_Combined/GamePad-Axis.svg.import | 6 + .../_Combined/GamePad-DPad.svg.import | 6 + .../Graphics/_Combined/Mouse.svg.import | 6 + .../Generic/ShaderGenerationModule.cs | 49 +++ .../Generators/Generic/ShaderGenerator.cs | 12 +- .../Generators/Generic/ShaderVariant.cs | 84 ++++- .../Generators/Spatial/Albedo/AlbedoModule.cs | 68 +++- .../Spatial/Albedo/AlbedoOverlayLayer.cs | 37 +++ .../Spatial/Albedo/AlbedoOverlayLayer.cs.uid | 1 + .../Generators/Spatial/Alpha/AlphaFade.cs | 44 ++- .../Spatial/Emission/EmissionModule.cs | 32 ++ .../Spatial/Emission/EmissionOverlayLayer.cs | 37 +++ .../Emission/EmissionOverlayLayer.cs.uid | 1 + .../Spatial/Fading/Dissolve/DissolveFading.cs | 71 ++++ .../Fading/Dissolve/DissolveFading.cs.uid | 1 + .../Generators/Spatial/Fading/FadingModule.cs | 3 +- .../Spatial/Fading/Fresnel/FresnelFading.cs | 2 +- .../Spatial/Geometry/GeometryModule.cs | 1 + .../Generators/Spatial/Masks/AxisMask.cs | 111 +++++++ .../Generators/Spatial/Masks/AxisMask.cs.uid | 1 + .../Generators/Spatial/Masks/ConstantMask.cs | 26 ++ .../Spatial/Masks/ConstantMask.cs.uid | 1 + .../Generators/Spatial/Masks/FresnelMask.cs | 64 ++++ .../Spatial/Masks/FresnelMask.cs.uid | 1 + .../Spatial/Masks/MaskFormulaType.cs | 98 ++++++ .../Spatial/Masks/MaskFormulaType.cs.uid | 1 + .../Generators/Spatial/Masks/MaskReference.cs | 25 ++ .../Spatial/Masks/MaskReference.cs.uid | 1 + .../Generators/Spatial/Masks/SpatialMask.cs | 14 + .../Spatial/Masks/SpatialMask.cs.uid | 1 + .../Spatial/Masks/SpatialMaskVariable.cs | 58 ++++ .../Spatial/Masks/SpatialMaskVariable.cs.uid | 1 + .../Spatial/Masks/SpatialMasksModule.cs | 53 +++ .../Spatial/Masks/SpatialMasksModule.cs.uid | 1 + .../Generators/Spatial/Masks/TextureMask.cs | 81 +++++ .../Spatial/Masks/TextureMask.cs.uid | 1 + .../Generators/Spatial/Masks/ValueMask.cs | 43 +++ .../Generators/Spatial/Masks/ValueMask.cs.uid | 1 + .../Generators/Spatial/Masks/VaryingMask.cs | 38 +++ .../Spatial/Masks/VaryingMask.cs.uid | 1 + .../Spatial/Overlays/SpatialOverlayLayer.cs | 157 +++++++++ .../Overlays/SpatialOverlayLayer.cs.uid | 1 + .../Generators/Spatial/SpatialShaderData.cs | 10 +- .../Spatial/SpatialShaderGenerator.cs | 6 +- .../Generators/Spatial/TextureModule.cs | 85 ++++- .../Generators/Spatial/UV/UVChannel.cs | 9 + .../Shading/Generators/Spatial/UV/UVModule.cs | 3 + .../Generators/Spatial/UV/UVScaleOffset.cs | 33 +- .../Spatial/UV/UVSource/MeshUVSource.cs | 4 +- .../Spatial/UV/UVSource/UVSource.cs | 2 +- .../Spatial/UV/UVSource/VertexUVSource.cs | 20 +- .../Spatial/Varyings/MeshAttributVarying.cs | 35 ++ .../Varyings/MeshAttributVarying.cs.uid | 1 + .../Spatial/Varyings/SpatialVariyngSource.cs | 14 + .../Varyings/SpatialVariyngSource.cs.uid | 1 + .../Spatial/Varyings/SpatialVarying.cs | 40 +++ .../Spatial/Varyings/SpatialVarying.cs.uid | 1 + .../Varyings/SpatialVaryingVariable.cs | 34 ++ .../Varyings/SpatialVaryingVariable.cs.uid | 1 + Runtime/Shading/Library/Transform.gdshaderinc | 22 ++ Runtime/Shading/Library/UV.gdshaderinc | 2 +- .../Properties/Properties/FloatProperty.cs | 2 + Runtime/Shading/ShaderTransformSpace.cs | 124 +++++++ Runtime/Shading/ShaderTransformSpace.cs.uid | 1 + .../debug-compositor-font-table.svg.import | 6 + Runtime/Structures/Spatial/Grid2D.cs | 70 +++- .../Structures/Spatial/QuadTree/QuadTree.cs | 310 ++++++++++++++++++ .../Spatial/QuadTree/QuadTree.cs.uid | 1 + .../Spatial/QuadTree/QuadTreeCell.cs | 243 ++++++++++++++ .../Spatial/QuadTree/QuadTreeCell.cs.uid | 1 + .../Spatial/QuadTree/QuadTreeNode.cs | 14 + .../Spatial/QuadTree/QuadTreeNode.cs.uid | 1 + .../Spatial/QuadTree/QuadTreeWalker.cs | 53 +++ .../Spatial/QuadTree/QuadTreeWalker.cs.uid | 1 + .../JSON/Serializers/BigIntegerSerializer.cs | 7 +- .../JSON/Serializers/JSONAlwaysProcessable.cs | 8 - .../Text/JSON/Serializers/JSONDeserializer.cs | 7 + .../Text/JSON/Serializers/JSONSerializer.cs | 17 +- Runtime/Text/Lexing/Lexer.cs | 29 ++ Runtime/Text/Lexing/LexerEvent.cs | 3 + Runtime/Text/Lexing/LexerList.cs | 35 ++ .../Lexing/Selectors/LexerEventSelector.cs | 14 + .../Selectors/LexerEventSelector.cs.uid | 1 + .../Text/Lexing/Selectors/SelectsAnyType.cs | 26 ++ .../Lexing/Selectors/SelectsAnyType.cs.uid | 1 + Runtime/Text/Lexing/Selectors/SelectsMatch.cs | 19 ++ .../Text/Lexing/Selectors/SelectsMatch.cs.uid | 1 + .../Text/Lexing/Selectors/SelectsMatchType.cs | 20 ++ .../Lexing/Selectors/SelectsMatchType.cs.uid | 1 + Runtime/Text/Lexing/Selectors/SelectsType.cs | 19 ++ .../Text/Lexing/Selectors/SelectsType.cs.uid | 1 + Runtime/Time/Duration/Duration.cs | 2 +- Runtime/Time/TimeLineRunner.cs | 1 + Runtime/Time/TimeLines/GameTime.tres | 7 +- Runtime/Tools/Arrays.cs | 14 +- Runtime/UI/UI-Settings-Default.tres | 6 +- Runtime/XML/SVG/Arc-Test.svg.import | 6 + 225 files changed, 3726 insertions(+), 150 deletions(-) create mode 100644 Runtime/Actions/Visual/TweenFloatShaderProperty.cs create mode 100644 Runtime/Actions/Visual/TweenFloatShaderProperty.cs.uid create mode 100644 Runtime/Actions/Visual/TweenScale.cs create mode 100644 Runtime/Actions/Visual/TweenScale.cs.uid create mode 100644 Runtime/Animation/Sky/SkyAnimator.cs create mode 100644 Runtime/Animation/Sky/SkyAnimator.cs.uid create mode 100644 Runtime/Math/Geometry/Overlap2D.cs create mode 100644 Runtime/Math/Geometry/Overlap2D.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs create mode 100644 Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs create mode 100644 Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs create mode 100644 Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs create mode 100644 Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs create mode 100644 Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs.uid create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs create mode 100644 Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs.uid create mode 100644 Runtime/Shading/ShaderTransformSpace.cs create mode 100644 Runtime/Shading/ShaderTransformSpace.cs.uid create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTree.cs create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTree.cs.uid create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs.uid create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs.uid create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs create mode 100644 Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs.uid create mode 100644 Runtime/Text/Lexing/Selectors/LexerEventSelector.cs create mode 100644 Runtime/Text/Lexing/Selectors/LexerEventSelector.cs.uid create mode 100644 Runtime/Text/Lexing/Selectors/SelectsAnyType.cs create mode 100644 Runtime/Text/Lexing/Selectors/SelectsAnyType.cs.uid create mode 100644 Runtime/Text/Lexing/Selectors/SelectsMatch.cs create mode 100644 Runtime/Text/Lexing/Selectors/SelectsMatch.cs.uid create mode 100644 Runtime/Text/Lexing/Selectors/SelectsMatchType.cs create mode 100644 Runtime/Text/Lexing/Selectors/SelectsMatchType.cs.uid create mode 100644 Runtime/Text/Lexing/Selectors/SelectsType.cs create mode 100644 Runtime/Text/Lexing/Selectors/SelectsType.cs.uid diff --git a/Assets/Procedural/Grass/grass-albedo.jpg.import b/Assets/Procedural/Grass/grass-albedo.jpg.import index 8e67350..0e54675 100644 --- a/Assets/Procedural/Grass/grass-albedo.jpg.import +++ b/Assets/Procedural/Grass/grass-albedo.jpg.import @@ -19,6 +19,8 @@ dest_files=["res://.godot/imported/grass-albedo.jpg-c84cfed4e689cec916b830b5e61c compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -26,6 +28,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Assets/Procedural/Grass/grass-normal.jpg.import b/Assets/Procedural/Grass/grass-normal.jpg.import index f5f50b7..714ec14 100644 --- a/Assets/Procedural/Grass/grass-normal.jpg.import +++ b/Assets/Procedural/Grass/grass-normal.jpg.import @@ -19,6 +19,8 @@ dest_files=["res://.godot/imported/grass-normal.jpg-161cf607f42dce5cf9be332a6b82 compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=1 compress/channel_pack=0 @@ -26,6 +28,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="res://addons/rokojori_action_library/Runtime/Procedural/Assets/Grass/grass-normal.jpg" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Assets/Procedural/Grass/grass-orm.jpg.import b/Assets/Procedural/Grass/grass-orm.jpg.import index 6cd70cb..662ea3f 100644 --- a/Assets/Procedural/Grass/grass-orm.jpg.import +++ b/Assets/Procedural/Grass/grass-orm.jpg.import @@ -19,6 +19,8 @@ dest_files=["res://.godot/imported/grass-orm.jpg-c21643a740d42c09c2f89b7bf2e82ed compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -26,6 +28,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Assets/Research/rokojori-base-floor-4x4m.svg.import b/Assets/Research/rokojori-base-floor-4x4m.svg.import index 923ddfe..0043005 100644 --- a/Assets/Research/rokojori-base-floor-4x4m.svg.import +++ b/Assets/Research/rokojori-base-floor-4x4m.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/rokojori-base-floor-4x4m.svg-e9ac60d16f594c8a compress/mode=0 compress/high_quality=true compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Assets/Splash/rokojori-action-library-splash.png.import b/Assets/Splash/rokojori-action-library-splash.png.import index 94848a1..6d7f35f 100644 --- a/Assets/Splash/rokojori-action-library-splash.png.import +++ b/Assets/Splash/rokojori-action-library-splash.png.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/rokojori-action-library-splash.png-4ebf88d03e compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Assets/Textures/black.svg.import b/Assets/Textures/black.svg.import index 3170822..885085d 100644 --- a/Assets/Textures/black.svg.import +++ b/Assets/Textures/black.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/black.svg-e64c1ca690c6ed521c021a0c289dbfcc.ct compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Assets/Textures/white.svg.import b/Assets/Textures/white.svg.import index b5844f5..bd78bf3 100644 --- a/Assets/Textures/white.svg.import +++ b/Assets/Textures/white.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/white.svg-6515ccdbdfcea435b23d45ef68955f3e.ct compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/1stPersonCamera.svg.import b/Icons/1stPersonCamera.svg.import index ea85676..4a09e0b 100644 --- a/Icons/1stPersonCamera.svg.import +++ b/Icons/1stPersonCamera.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/1stPersonCamera.svg-5780039fa0f577bdcb3cebdee compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/3rdPersonCamera.svg.import b/Icons/3rdPersonCamera.svg.import index 5cc61a8..d340fb9 100644 --- a/Icons/3rdPersonCamera.svg.import +++ b/Icons/3rdPersonCamera.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/3rdPersonCamera.svg-b43310ef7b96c4b20d3a94a7a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Action.svg.import b/Icons/Action.svg.import index a0383ac..1562364 100644 --- a/Icons/Action.svg.import +++ b/Icons/Action.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Action.svg-82c50845f88e9ab1e6fe6837ddec7bbe.c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/ActionList.svg.import b/Icons/ActionList.svg.import index 6304ec6..0fae87e 100644 --- a/Icons/ActionList.svg.import +++ b/Icons/ActionList.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/ActionList.svg-9a9777047b7a7f6d64d6e0d451bdc1 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/ActionSequence.svg.import b/Icons/ActionSequence.svg.import index 8e961f9..c2a610f 100644 --- a/Icons/ActionSequence.svg.import +++ b/Icons/ActionSequence.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/ActionSequence.svg-ece8edf3a7454b70d9fbe1ac56 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/App.svg.import b/Icons/App.svg.import index 663491c..99236cb 100644 --- a/Icons/App.svg.import +++ b/Icons/App.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/App.svg-f7901091f65f647809fad5646e1473c9.ctex compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/AudioManager.svg.import b/Icons/AudioManager.svg.import index 7dfb601..2e9cfa8 100644 --- a/Icons/AudioManager.svg.import +++ b/Icons/AudioManager.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/AudioManager.svg-f71d6864097b95764d9bb5386b19 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/AxisSensor.svg.import b/Icons/AxisSensor.svg.import index f9748e5..8d42beb 100644 --- a/Icons/AxisSensor.svg.import +++ b/Icons/AxisSensor.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/AxisSensor.svg-6cf7367c831e5be6a9ae1879d08a33 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/CCGravity.svg.import b/Icons/CCGravity.svg.import index f3ee92a..18cc9cc 100644 --- a/Icons/CCGravity.svg.import +++ b/Icons/CCGravity.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/CCGravity.svg-9cb591af352b26110ddc1d7ca25182f compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/CCGroundReset.svg.import b/Icons/CCGroundReset.svg.import index aa4cfa5..3d83d79 100644 --- a/Icons/CCGroundReset.svg.import +++ b/Icons/CCGroundReset.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/CCGroundReset.svg-6d47bcba42901d6735ba7735060 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/CCJump.svg.import b/Icons/CCJump.svg.import index f858323..b681bb2 100644 --- a/Icons/CCJump.svg.import +++ b/Icons/CCJump.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/CCJump.svg-b429c49be4900431b553e8c232dfef1e.c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/CCMoveAndSlide.svg.import b/Icons/CCMoveAndSlide.svg.import index 9532966..9e08aab 100644 --- a/Icons/CCMoveAndSlide.svg.import +++ b/Icons/CCMoveAndSlide.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/CCMoveAndSlide.svg-021bc0e44172455e1156ae90bb compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/CharacterController.svg.import b/Icons/CharacterController.svg.import index 27d0cee..3b19743 100644 --- a/Icons/CharacterController.svg.import +++ b/Icons/CharacterController.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/CharacterController.svg-5ae94b07988eaca9593c8 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/CharacterControllerAction.svg.import b/Icons/CharacterControllerAction.svg.import index 2b1b627..a26d3da 100644 --- a/Icons/CharacterControllerAction.svg.import +++ b/Icons/CharacterControllerAction.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/CharacterControllerAction.svg-d55c6bb5da46c8b compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Condition.svg.import b/Icons/Condition.svg.import index f587c39..c89a94b 100644 --- a/Icons/Condition.svg.import +++ b/Icons/Condition.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Condition.svg-6dd416703043dcbb435a8398bb0c00c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/ConditionalAction.svg.import b/Icons/ConditionalAction.svg.import index 2b5531a..05a4267 100644 --- a/Icons/ConditionalAction.svg.import +++ b/Icons/ConditionalAction.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/ConditionalAction.svg-7a2b32ad844d70cf4623367 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/EditorCamera.svg.import b/Icons/EditorCamera.svg.import index 41838b8..e518d68 100644 --- a/Icons/EditorCamera.svg.import +++ b/Icons/EditorCamera.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/EditorCamera.svg-43cdf6f8dc7b68d182e82963eaf7 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/FollowCamera.svg.import b/Icons/FollowCamera.svg.import index 5de38c2..c7daee0 100644 --- a/Icons/FollowCamera.svg.import +++ b/Icons/FollowCamera.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/FollowCamera.svg-2d02c63e5396da01c254b582b773 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Grabbable.svg.import b/Icons/Grabbable.svg.import index 53913e9..8b2cf5c 100644 --- a/Icons/Grabbable.svg.import +++ b/Icons/Grabbable.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Grabbable.svg-0da8653c83f15d592aa8168e8c70026 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Grabber.svg.import b/Icons/Grabber.svg.import index 961753f..5d99906 100644 --- a/Icons/Grabber.svg.import +++ b/Icons/Grabber.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Grabber.svg-5aeb5a68ec069e01c9e593ca3f4dfb38. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Help.svg.import b/Icons/Help.svg.import index 641850e..169343a 100644 --- a/Icons/Help.svg.import +++ b/Icons/Help.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Help.svg-73996934a1ef8b9c260e47a975f69d9d.cte compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Icon.svg.import b/Icons/Icon.svg.import index 97c00f6..987ed8e 100644 --- a/Icons/Icon.svg.import +++ b/Icons/Icon.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Icon.svg-51e38493cf1aa16c6588c41e0b74c97c.cte compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Interactable.svg.import b/Icons/Interactable.svg.import index ef6b445..d3f5b76 100644 --- a/Icons/Interactable.svg.import +++ b/Icons/Interactable.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Interactable.svg-37e8f66f2c59d8ded3bc6d723fc6 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Interaction.svg.import b/Icons/Interaction.svg.import index 2c05ed6..1b67ca8 100644 --- a/Icons/Interaction.svg.import +++ b/Icons/Interaction.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Interaction.svg-7abdbdd0fe83e6790fa81986a0e87 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Interactor.svg.import b/Icons/Interactor.svg.import index d1f06b1..c0245c2 100644 --- a/Icons/Interactor.svg.import +++ b/Icons/Interactor.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Interactor.svg-65cac0aa4d67078d692a28311fbf53 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/KeySensor.svg.import b/Icons/KeySensor.svg.import index c131469..0848124 100644 --- a/Icons/KeySensor.svg.import +++ b/Icons/KeySensor.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/KeySensor.svg-c9fe6581695a6d92058e029f8791451 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/LocaleManager.svg.import b/Icons/LocaleManager.svg.import index fde17d2..8c69831 100644 --- a/Icons/LocaleManager.svg.import +++ b/Icons/LocaleManager.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/LocaleManager.svg-99f36ef341f5e7ee54b895bbac3 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/LocalizedString.svg.import b/Icons/LocalizedString.svg.import index c0f1dac..48da8ea 100644 --- a/Icons/LocalizedString.svg.import +++ b/Icons/LocalizedString.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/LocalizedString.svg-3a59d02d2bc7086c51a04f8a6 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/LookAtCamera.svg.import b/Icons/LookAtCamera.svg.import index 0ed5c34..c008142 100644 --- a/Icons/LookAtCamera.svg.import +++ b/Icons/LookAtCamera.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/LookAtCamera.svg-e132258383111453e13a4bf0c03e compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/MouseSensor.svg.import b/Icons/MouseSensor.svg.import index 6518122..215df3e 100644 --- a/Icons/MouseSensor.svg.import +++ b/Icons/MouseSensor.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/MouseSensor.svg-59beb8baad0a5cba47ed3ae1207d3 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/NetworkManager.svg.import b/Icons/NetworkManager.svg.import index 16886c8..5e401ac 100644 --- a/Icons/NetworkManager.svg.import +++ b/Icons/NetworkManager.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/NetworkManager.svg-3db3dd7763b4849d5383410aef compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/OnEvent.svg.import b/Icons/OnEvent.svg.import index 1c7c283..f4dd19e 100644 --- a/Icons/OnEvent.svg.import +++ b/Icons/OnEvent.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/OnEvent.svg-338a6884bd84489ec6cf8280c7936bdb. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Parallel.svg.import b/Icons/Parallel.svg.import index 7822944..6cc306d 100644 --- a/Icons/Parallel.svg.import +++ b/Icons/Parallel.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Parallel.svg-17a3b7f341c0cfd7d69668a21ce1825c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Pointable.svg.import b/Icons/Pointable.svg.import index 0876a21..c78b733 100644 --- a/Icons/Pointable.svg.import +++ b/Icons/Pointable.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Pointable.svg-0c0959824fd80e294261cbdd655ab01 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Pointer.svg.import b/Icons/Pointer.svg.import index a633bb5..6744e87 100644 --- a/Icons/Pointer.svg.import +++ b/Icons/Pointer.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Pointer.svg-b3749204433b52763a9824e4f7fd7336. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/PostProcess.svg.import b/Icons/PostProcess.svg.import index bed225d..1164ff3 100644 --- a/Icons/PostProcess.svg.import +++ b/Icons/PostProcess.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/PostProcess.svg-9bd595bde45601bf2c44bb02a5f52 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/RemoveVirtualCamera3D.svg.import b/Icons/RemoveVirtualCamera3D.svg.import index c2ed1a8..a6bbdfc 100644 --- a/Icons/RemoveVirtualCamera3D.svg.import +++ b/Icons/RemoveVirtualCamera3D.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/RemoveVirtualCamera3D.svg-b229129ca4dd411d22a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Rokojori-Action-Library-Logo.svg.import b/Icons/Rokojori-Action-Library-Logo.svg.import index 877d6bc..20a6e6c 100644 --- a/Icons/Rokojori-Action-Library-Logo.svg.import +++ b/Icons/Rokojori-Action-Library-Logo.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Rokojori-Action-Library-Logo.svg-3dd4acc27920 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Scatterer.svg.import b/Icons/Scatterer.svg.import index 359609a..e3b3342 100644 --- a/Icons/Scatterer.svg.import +++ b/Icons/Scatterer.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Scatterer.svg-47ada0ad4359cdaef937276acc71b3c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Selector.svg.import b/Icons/Selector.svg.import index 2883b34..eb6ac86 100644 --- a/Icons/Selector.svg.import +++ b/Icons/Selector.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Selector.svg-2f568de1b2ffd67ad0677b1a0c6c971b compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Sensor.svg.import b/Icons/Sensor.svg.import index 6da9930..d401dad 100644 --- a/Icons/Sensor.svg.import +++ b/Icons/Sensor.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Sensor.svg-065ff7d96e1a9bba60d30792650f2335.c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/SensorGroup.svg.import b/Icons/SensorGroup.svg.import index 1b9a6b8..9f2c39e 100644 --- a/Icons/SensorGroup.svg.import +++ b/Icons/SensorGroup.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/SensorGroup.svg-ad5ecf9af912b8be221cb2da94be3 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/SensorManager.svg.import b/Icons/SensorManager.svg.import index 9c4e9a7..bbea255 100644 --- a/Icons/SensorManager.svg.import +++ b/Icons/SensorManager.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/SensorManager.svg-5556fbf7de09405281f6d8a1bff compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/SequenceAction.svg.import b/Icons/SequenceAction.svg.import index 007315f..ce17599 100644 --- a/Icons/SequenceAction.svg.import +++ b/Icons/SequenceAction.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/SequenceAction.svg-e3f1802807a3426cb386b3e51e compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/SetActiveVirtualCamera3D.svg.import b/Icons/SetActiveVirtualCamera3D.svg.import index df7cdda..fbe5a8c 100644 --- a/Icons/SetActiveVirtualCamera3D.svg.import +++ b/Icons/SetActiveVirtualCamera3D.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/SetActiveVirtualCamera3D.svg-daa089c09a78ae1c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/Spline.svg.import b/Icons/Spline.svg.import index dbfecc4..4415dda 100644 --- a/Icons/Spline.svg.import +++ b/Icons/Spline.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Spline.svg-1e2b9f874c3ee57ea8b3834092dfaef8.c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/StrategyTopDownCamera.svg.import b/Icons/StrategyTopDownCamera.svg.import index abc387f..12734ee 100644 --- a/Icons/StrategyTopDownCamera.svg.import +++ b/Icons/StrategyTopDownCamera.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/StrategyTopDownCamera.svg-9941bec42760ab8979a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/TimeLineManager.svg.import b/Icons/TimeLineManager.svg.import index 6209620..902e9fa 100644 --- a/Icons/TimeLineManager.svg.import +++ b/Icons/TimeLineManager.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/TimeLineManager.svg-dd6b4ada11f698cccbfe51b89 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UI.svg.import b/Icons/UI.svg.import index 5514a88..3c030e0 100644 --- a/Icons/UI.svg.import +++ b/Icons/UI.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UI.svg-2c1dbd29acf8bed567f460a1a3f0addd.ctex" compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UIBorderImage.svg.import b/Icons/UIBorderImage.svg.import index ef693d7..d328df0 100644 --- a/Icons/UIBorderImage.svg.import +++ b/Icons/UIBorderImage.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UIBorderImage.svg-f6615c79aa5e9b955ba62ad71b1 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UIBreak.svg.import b/Icons/UIBreak.svg.import index 33fc65d..4c45801 100644 --- a/Icons/UIBreak.svg.import +++ b/Icons/UIBreak.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UIBreak.svg-0f0f122342064fcefe62ba29fed1cd20. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UIImage.svg.import b/Icons/UIImage.svg.import index 4691dcb..a35d86d 100644 --- a/Icons/UIImage.svg.import +++ b/Icons/UIImage.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UIImage.svg-6f379e8066b7c9ce860269da60e5f378. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UIInputIcon.svg.import b/Icons/UIInputIcon.svg.import index 0f124c6..25d04c8 100644 --- a/Icons/UIInputIcon.svg.import +++ b/Icons/UIInputIcon.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UIInputIcon.svg-a74c1ff64f04f884d6c9c1865a8a9 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UIRegion.svg.import b/Icons/UIRegion.svg.import index 56bf6e3..7954a58 100644 --- a/Icons/UIRegion.svg.import +++ b/Icons/UIRegion.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UIRegion.svg-742ebe6956a1a25b816d45d4e44b7631 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UISpace.svg.import b/Icons/UISpace.svg.import index 548b99c..23e5c09 100644 --- a/Icons/UISpace.svg.import +++ b/Icons/UISpace.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UISpace.svg-1c2449c73a72290a0d81eb9ad67033f8. compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/UIText.svg.import b/Icons/UIText.svg.import index a342d01..7fee5f0 100644 --- a/Icons/UIText.svg.import +++ b/Icons/UIText.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/UIText.svg-3361615dbe2bc7106602a6f3edf78cb7.c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/VirtualCamera3D.svg.import b/Icons/VirtualCamera3D.svg.import index 9b9b3c3..9d44fa1 100644 --- a/Icons/VirtualCamera3D.svg.import +++ b/Icons/VirtualCamera3D.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/VirtualCamera3D.svg-75ca30fbde42c7b5db4a27c9b compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/VirtualCamera3DSlot.svg.import b/Icons/VirtualCamera3DSlot.svg.import index 25ac473..33c7660 100644 --- a/Icons/VirtualCamera3DSlot.svg.import +++ b/Icons/VirtualCamera3DSlot.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/VirtualCamera3DSlot.svg-86ba6841a565711cf6f67 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/VirtualCameraManager.svg.import b/Icons/VirtualCameraManager.svg.import index a44d50b..20e4b64 100644 --- a/Icons/VirtualCameraManager.svg.import +++ b/Icons/VirtualCameraManager.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/VirtualCameraManager.svg-26f8fa343c5a3dae871a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/WorldMap.svg.import b/Icons/WorldMap.svg.import index dcdfcfe..cd8a28c 100644 --- a/Icons/WorldMap.svg.import +++ b/Icons/WorldMap.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/WorldMap.svg-f53933db960d94846c09fcda614ad68d compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Icons/WorldMapLayer.svg.import b/Icons/WorldMapLayer.svg.import index 694057f..abbc8d1 100644 --- a/Icons/WorldMapLayer.svg.import +++ b/Icons/WorldMapLayer.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/WorldMapLayer.svg-f9e4a287695d4348ffbd491fa4c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Actions/ActionSequence.cs b/Runtime/Actions/ActionSequence.cs index 9dea778..f8cbe6b 100644 --- a/Runtime/Actions/ActionSequence.cs +++ b/Runtime/Actions/ActionSequence.cs @@ -201,8 +201,16 @@ namespace Rokojori List running = new List(); + [Export] + public bool noOverlays = false; + protected override void _OnTrigger() { + if ( noOverlays && running.Count > 0 ) + { + return; + } + var run = new ActionSequenceRunner(); run.sequence = this; run.actions = new List( actions ); diff --git a/Runtime/Actions/OnReady.cs b/Runtime/Actions/OnReady.cs index 5d2194b..036e206 100644 --- a/Runtime/Actions/OnReady.cs +++ b/Runtime/Actions/OnReady.cs @@ -15,8 +15,16 @@ namespace Rokojori [Export] public bool triggerDirectChildren = true; + [Export] + public bool triggerInsideEditor = false; + public override void _Ready() { + if ( Engine.IsEditorHint() && ! triggerInsideEditor ) + { + return; + } + Action.TriggerAll( actions, this, triggerDirectChildren ); } } diff --git a/Runtime/Actions/OnTick.cs b/Runtime/Actions/OnTick.cs index 1516b95..ae0862f 100644 --- a/Runtime/Actions/OnTick.cs +++ b/Runtime/Actions/OnTick.cs @@ -41,12 +41,12 @@ namespace Rokojori _active = active; - var timeLine = tickDuration.timeLine; + var timeLine = tickDuration.timeLine; if ( _active ) { var duration = tickDuration.GetDurationInSeconds(); - var offset = offsetDuration.GetDurationInSeconds(); + var offset = offsetDuration == null ? 0 : offsetDuration.GetDurationInSeconds(); // this.LogInfo( "duration", duration, "offset", offset ); diff --git a/Runtime/Actions/RemoveNode.cs b/Runtime/Actions/RemoveNode.cs index 8e383a5..4ddff4d 100644 --- a/Runtime/Actions/RemoveNode.cs +++ b/Runtime/Actions/RemoveNode.cs @@ -20,7 +20,7 @@ namespace Rokojori return; } - this.LogInfo( "Remove", HierarchyName.Of( target ) ); + // this.LogInfo( "Remove", HierarchyName.Of( target ) ); target.SelfDestroy( queue ); diff --git a/Runtime/Actions/SequenceAction.cs b/Runtime/Actions/SequenceAction.cs index 7003b32..59bb96c 100644 --- a/Runtime/Actions/SequenceAction.cs +++ b/Runtime/Actions/SequenceAction.cs @@ -11,8 +11,9 @@ namespace Rokojori public bool success; } + [Tool] [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SequenceAction.svg")] - public partial class SequenceAction : Action + public abstract partial class SequenceAction : Action { diff --git a/Runtime/Actions/Visual/TweenFloatShaderProperty.cs b/Runtime/Actions/Visual/TweenFloatShaderProperty.cs new file mode 100644 index 0000000..ef3a3c4 --- /dev/null +++ b/Runtime/Actions/Visual/TweenFloatShaderProperty.cs @@ -0,0 +1,115 @@ + +using System; +using Godot; + + +namespace Rokojori +{ + [Tool] + [GlobalClass ] + public partial class TweenFloatShaderProperty:SequenceAction, Animator + { + [Export] + public Material material; + + [Export] + public FloatPropertyName propertyName; + + [Export] + public float endValue; + + [Export] + public Duration duration; + + [Export] + public Curve curve; + + public void OnAnimatorStart(){} + public void OnAnimatorEnd(){} + public void OnAnimatorCancel(){} + + int _actionID = -1; + int _timeID = -1; + + [Export] + public bool interruptCurrent = true; + + protected override void _OnTrigger() + { + + if ( ! interruptCurrent && _actionID != -1 ) + { + // this.LogInfo( "Already running" ); + return; + } + + // this.LogInfo( "Started Float Tween" ); + + + if ( Engine.IsEditorHint() ) + { + return; + } + + + + if ( _actionID != -1 ) + { + CancelAction( _actionID ); + } + + _actionID = DispatchStart(); + + var startValue = propertyName.Get( material ); + + AnimationManager.StartAnimation( this, material, propertyName ); + + // this.LogInfo( "Get Float Tween", startValue ); + + _timeID = TimeLineManager.ScheduleSpanWith( duration, + ( span, type )=> + { + + // this.LogInfo( "Update Float Tween", startValue ); + if ( span.id != _timeID ) + { + return; + } + + if ( ! AnimationManager.IsAnimating( this, material, propertyName ) ) + { + return; + } + + var phase = span.phase; + + if ( curve != null ) + { + phase = curve.Sample( phase ); + } + + var value = Mathf.Lerp( startValue, endValue, phase ); + + // this.LogInfo( "Updating Float Tween", "phase:", phase, "value:", value, target ); + + propertyName.Set( material, value ); + // ReflectionHelper.SetValue( material, propertyName , value ); + + if ( type == TimeLineSpanUpdateType.End ) + { + // this.LogInfo( "End Float Tween", endValue ); + + // target._Set( targetMember, endValue ); + + propertyName.Set( material, endValue ); + AnimationManager.EndAnimation( this, material, propertyName ); + DispatchEnd( _actionID ); + _actionID = -1; + _timeID = -1; + } + } + ).id; + } + + } +} \ No newline at end of file diff --git a/Runtime/Actions/Visual/TweenFloatShaderProperty.cs.uid b/Runtime/Actions/Visual/TweenFloatShaderProperty.cs.uid new file mode 100644 index 0000000..bff44e3 --- /dev/null +++ b/Runtime/Actions/Visual/TweenFloatShaderProperty.cs.uid @@ -0,0 +1 @@ +uid://b8entq7j3pe3i diff --git a/Runtime/Actions/Visual/TweenLight.cs b/Runtime/Actions/Visual/TweenLight.cs index de2856b..f3db835 100644 --- a/Runtime/Actions/Visual/TweenLight.cs +++ b/Runtime/Actions/Visual/TweenLight.cs @@ -54,6 +54,12 @@ namespace Rokojori TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { + if ( ! GodotObject.IsInstanceValid( light3D ) ) + { + DispatchEnd( sequenceID ); + return; + } + var timeNow = tl.position; var elapsed = timeNow - start; diff --git a/Runtime/Actions/Visual/TweenParticles.cs b/Runtime/Actions/Visual/TweenParticles.cs index 185b404..c73029c 100644 --- a/Runtime/Actions/Visual/TweenParticles.cs +++ b/Runtime/Actions/Visual/TweenParticles.cs @@ -54,6 +54,12 @@ namespace Rokojori TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { + if ( ! GodotObject.IsInstanceValid( particles3D ) ) + { + DispatchEnd( sequenceID ); + return; + } + var timeNow = tl.position; var elapsed = timeNow - start; diff --git a/Runtime/Actions/Visual/TweenPosition.cs b/Runtime/Actions/Visual/TweenPosition.cs index a151642..8e4d306 100644 --- a/Runtime/Actions/Visual/TweenPosition.cs +++ b/Runtime/Actions/Visual/TweenPosition.cs @@ -94,6 +94,12 @@ namespace Rokojori TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), ( span, type )=> { + if ( ! GodotObject.IsInstanceValid( target ) ) + { + DispatchEnd( sequenceID ); + return; + } + var timeNow = tl.position; var elapsed = timeNow - start; diff --git a/Runtime/Actions/Visual/TweenScale.cs b/Runtime/Actions/Visual/TweenScale.cs new file mode 100644 index 0000000..d52eec3 --- /dev/null +++ b/Runtime/Actions/Visual/TweenScale.cs @@ -0,0 +1,83 @@ + +using System; +using Godot; + + +namespace Rokojori +{ + [Tool] + [GlobalClass ] + public partial class TweenScale:SequenceAction + { + [Export] + public Node3D target; + + [Export] + public Vector3 endScale = Vector3.One; + + [Export] + public TweenType tweenType = new TweenTimeCurve(); + + [Export] + public bool cacheEndPositionOnStart = true; + + [Export] + public TimeLine timeLine; + + + protected override void _OnTrigger() + { + if ( target == null ) + { + return; + } + + var tl = TimeLineManager.Ensure( timeLine ); + + var start = tl.position; + + var fromScale = target.Scale; + var toScale = endScale; + + var sequenceID = DispatchStart(); + + var tweenType = this.tweenType; + + if ( tweenType == null ) + { + tweenType = TweenTimeCurve.defaultCurve; + } + + TimeLineManager.ScheduleSpanIn( tl, 0, tweenType.GetTweenDuration(), + ( span, type )=> + { + if ( ! GodotObject.IsInstanceValid( target ) ) + { + DispatchEnd( sequenceID ); + return; + } + + var timeNow = tl.position; + var elapsed = timeNow - start; + + var state = tweenType.GetTweenPhaseForPhase( span.phase ); + + if ( ! cacheEndPositionOnStart ) + { + var toScale = endScale; + } + + var lerpedScale = fromScale.Lerp( toScale, state ); + + target.Scale = lerpedScale; + + if ( type == TimeLineSpanUpdateType.End ) + { + DispatchEnd( sequenceID ); + } + } + ); + } + + } +} \ No newline at end of file diff --git a/Runtime/Actions/Visual/TweenScale.cs.uid b/Runtime/Actions/Visual/TweenScale.cs.uid new file mode 100644 index 0000000..8b79c9a --- /dev/null +++ b/Runtime/Actions/Visual/TweenScale.cs.uid @@ -0,0 +1 @@ +uid://csgk6d2jvferv diff --git a/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres b/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres index 32506f6..b2d6777 100644 --- a/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres +++ b/Runtime/Animation/Flash/Presets/Orange Boost - Flash.tres @@ -8,9 +8,7 @@ [sub_resource type="Resource" id="Resource_ny3sx"] script = ExtResource("1_c8lnw") color = Color(1, 0.472686, 0.335587, 1) -colorMultiply = 1.0 rgbMultiply = 4.0 -alphaMultiply = 1.0 [sub_resource type="Curve" id="Curve_tp3r5"] _data = [Vector2(0, 1), 0.0, -1.0, 0, 1, Vector2(1, 0), -1.0, 0.0, 1, 0] @@ -19,12 +17,7 @@ point_count = 2 [sub_resource type="Resource" id="Resource_pwp07"] script = ExtResource("2_w323b") duration = 0.5 -durationRandomRange = 0.0 -delay = 0.0 -delayRandomRange = 0.0 curve = SubResource("Curve_tp3r5") -scaleY = 1.0 -scaleRandomRange = 0.0 [resource] script = ExtResource("3_eqd4c") @@ -34,5 +27,4 @@ color = SubResource("Resource_ny3sx") lightMode = 1 lightRange = 4.0 lightFlashCurveScale = 1.0 -lightHasShadows = false materialMode = 1 diff --git a/Runtime/Animation/Sky/SkyAnimator.cs b/Runtime/Animation/Sky/SkyAnimator.cs new file mode 100644 index 0000000..a200b0e --- /dev/null +++ b/Runtime/Animation/Sky/SkyAnimator.cs @@ -0,0 +1,60 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; +using System.Linq; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class SkyAnimator:Node + { + [Export] + public Camera3D camera; + + [Export] + public WorldEnvironment environment; + + [Export] + public float minFov = 60; + + [Export] + public float maxFov = 60; + + [Export] + public float minFovCameraY = 10; + + [Export] + public float maxFovCameraY = 200; + + [Export] + public float maxRotationX = 10; + + [Export] + public float cameraToRotationX = 100; + + [Export] + public float maxRotationZ = 10; + + [Export] + public float cameraToRotationZ = 100; + + + + public override void _Process( double delta ) + { + var fov = MathX.MapClamped( camera.GlobalPosition.Y, minFovCameraY, maxFovCameraY, minFov, maxFov ); + environment.Environment.SkyCustomFov = fov; + + + if ( ! Engine.IsEditorHint() ) + { + // this.LogInfo( "FOV:", camera.GlobalPosition.Y + "m" , fov ); + } + + // var rotX = MathX.MapClamped( camera.GlobalPosition.X, -cameraToRotationX, cameraToRotationX, -maxRotationX, maxRotationX ); + // environment.Environment.SkyRotation = new Vector3( rotX, 0, 0 ); + + } + } +} \ No newline at end of file diff --git a/Runtime/Animation/Sky/SkyAnimator.cs.uid b/Runtime/Animation/Sky/SkyAnimator.cs.uid new file mode 100644 index 0000000..a5691f8 --- /dev/null +++ b/Runtime/Animation/Sky/SkyAnimator.cs.uid @@ -0,0 +1 @@ +uid://dev2hr3eae1ia diff --git a/Runtime/Animation/Transform/AnimateTransform.cs b/Runtime/Animation/Transform/AnimateTransform.cs index f0aac36..2110131 100644 --- a/Runtime/Animation/Transform/AnimateTransform.cs +++ b/Runtime/Animation/Transform/AnimateTransform.cs @@ -17,6 +17,9 @@ namespace Rokojori [Export] public Node3D target; + [Export] + public bool interruptCurrent = true; + List _frameValues; List _randomizations; @@ -24,9 +27,15 @@ namespace Rokojori public void OnAnimatorEnd(){} public void OnAnimatorCancel(){} + bool _running = false; protected override void _OnTrigger() { + if ( ! interruptCurrent && _running ) + { + return; + } + _frameValues = new List(); _randomizations = new List(); @@ -44,6 +53,8 @@ namespace Rokojori var actionID = DispatchStart(); + _running = true; + foreach ( var c in animations.curves ) { AnimationManager.StartAnimation( c, target, c.animationMember ); @@ -61,6 +72,7 @@ namespace Rokojori { DispatchCancelled( actionID ); actionID = -1; + _running = false; return; } @@ -87,6 +99,7 @@ namespace Rokojori } DispatchEnd( actionID ); + _running = false; } } ); diff --git a/Runtime/Cameras/CameraManager.cs b/Runtime/Cameras/CameraManager.cs index 4353928..3eb314a 100644 --- a/Runtime/Cameras/CameraManager.cs +++ b/Runtime/Cameras/CameraManager.cs @@ -74,7 +74,7 @@ namespace Rokojori lerpingCameras = _lerpingCameras; _cameraLerpCounter = minimalLerpFrames; - this.LogInfo( "Started Lerping" ); + // this.LogInfo( "Started Lerping" ); } List prios = new List(); diff --git a/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs b/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs index 9ba9dc0..9e31aae 100644 --- a/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs +++ b/Runtime/Cameras/CameraTypes/StrategyTopDownCamera/StrategyTopDownCamera.cs @@ -197,6 +197,8 @@ namespace Rokojori deltaY = Sensors.PolarAxis( moveUpButton, moveDownButton ) + borderMoveVertical * moveAtBorderSpeed; } + + var forward = Math3D.GetYPlaneForward( this ); var right = Math3D.GetYPlaneRight( this ); @@ -206,6 +208,8 @@ namespace Rokojori var xAmount = deltaX * smoothDistance * right * flipH; var zAmount = deltaY * smoothDistance * forward * flipV; + // this.LogInfo( "delta", deltaX, deltaY, "xz", xAmount, zAmount ); + target += ( xAmount + zAmount ); ConstrainTarget(); @@ -275,6 +279,8 @@ namespace Rokojori GlobalRotation = new Vector3( Mathf.DegToRad( pitch ), Mathf.DegToRad( yaw ), 0 ); var forward = Math3D.GetGlobalForward( this ) * smoothDistance; + + // this.LogInfo( forward, smoothDistance ); GlobalPosition = target + forward; } } diff --git a/Runtime/Cameras/PostProcess/environment_adjustments_3d_lut_template.webp.import b/Runtime/Cameras/PostProcess/environment_adjustments_3d_lut_template.webp.import index c19ba34..827fbe6 100644 --- a/Runtime/Cameras/PostProcess/environment_adjustments_3d_lut_template.webp.import +++ b/Runtime/Cameras/PostProcess/environment_adjustments_3d_lut_template.webp.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/environment_adjustments_3d_lut_template.webp- compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/channel_pack=0 mipmaps/generate=false diff --git a/Runtime/Colors/ColorChannelType.cs b/Runtime/Colors/ColorChannelType.cs index fe5b8b5..1617dd3 100644 --- a/Runtime/Colors/ColorChannelType.cs +++ b/Runtime/Colors/ColorChannelType.cs @@ -13,4 +13,73 @@ namespace Rokojori Luminance, Alpha } + + public static class ColorChannelTypeUtility + { + public static bool NeedsIncludesForGLSLMember( ColorChannelType colorChannelType ) + { + if ( ColorChannelType.Red == colorChannelType ) + { + return false; + } + + if ( ColorChannelType.Green == colorChannelType ) + { + return false; + } + + if ( ColorChannelType.Blue == colorChannelType ) + { + return false; + } + + if ( ColorChannelType.Alpha == colorChannelType ) + { + return false; + } + + return true; + } + + public static string ToGLSLMember( string source, ColorChannelType colorChannelType ) + { + if ( ColorChannelType.Red == colorChannelType ) + { + return $"{source}.r"; + } + + if ( ColorChannelType.Green == colorChannelType ) + { + return $"{source}.g"; + } + + if ( ColorChannelType.Blue == colorChannelType ) + { + return $"{source}.b"; + } + + if ( ColorChannelType.Alpha == colorChannelType ) + { + return $"{source}.a"; + } + + + if ( ColorChannelType.Hue == colorChannelType ) + { + return $"RGBtoHSL( {source} ).x"; + } + + if ( ColorChannelType.Saturation == colorChannelType ) + { + return $"RGBtoHSL( {source} ).y"; + } + + if ( ColorChannelType.Luminance == colorChannelType ) + { + return $"RGBtoHSL( {source} ).u"; + } + + return null; + } + } } diff --git a/Runtime/Godot/Nodes.cs b/Runtime/Godot/Nodes.cs index c392f3d..fedad03 100644 --- a/Runtime/Godot/Nodes.cs +++ b/Runtime/Godot/Nodes.cs @@ -220,6 +220,7 @@ namespace Rokojori walker.Iterate( root, ( n )=> { + var t = n as T; if ( t == null ) @@ -289,6 +290,42 @@ namespace Rokojori t.Name = name; + return t; + } + + public static Node CreateChildFromPath( this Node parent, NodePath nodePath, string name = null ) + { + var t = parent.GetNode( nodePath ).Duplicate(); + parent.AddChild( t ); + + t.Owner = parent.Owner == null ? parent : parent.Owner; + + if ( name == null ) + { + name = t.GetType().Name; + } + + t.Name = name; + + + return t; + } + + public static Node CreateChildFromDuplicate( this Node parent, Node nodeToDuplicate, string name = null ) + { + var t = nodeToDuplicate.Duplicate( (int)Node.DuplicateFlags.Scripts ); + parent.AddChild( t ); + + t.Owner = parent.Owner == null ? parent : parent.Owner; + + if ( name == null ) + { + name = t.GetType().Name; + } + + t.Name = name; + + return t; } @@ -354,8 +391,28 @@ namespace Rokojori } return c; + } + + + public static int CountAll( this Node node, Predicate predicate ) where T:Node + { + var number = 0; + + ForEach( node, + ( n )=> + { + if ( predicate( n ) ) + { + number ++; + } + } + ); + + return number; } + + public static T CreateChildGlobal3D( this Node parent, Vector3 position, Quaternion? rotation, string name = null ) where T:Node3D,new() { var c = CreateChildIn( parent, name ); @@ -370,6 +427,34 @@ namespace Rokojori return c; } + public static Node3D CreateChildFromPathGlobal3D( this Node parent, NodePath path, Vector3 position, Quaternion? rotation, string name = null ) + { + var c = CreateChildFromPath( parent, path, name ) as Node3D; + + c.GlobalPosition = position; + + if ( rotation != null ) + { + Math3D.SetGlobalQuaternion( c, (Quaternion)rotation ); + } + + return c; + } + + public static Node3D CreateChildFromDuplicateGlobal3D( this Node parent, Node nodeToDuplicate, Vector3 position, Quaternion? rotation, string name = null ) + { + var c = CreateChildFromDuplicate( parent, nodeToDuplicate, name ) as Node3D; + + c.GlobalPosition = position; + + if ( rotation != null ) + { + Math3D.SetGlobalQuaternion( c, (Quaternion)rotation ); + } + + return c; + } + public static Node CreateChildWithType( this Node parent, Type type, string name = null ) { return CreateChildInWithType( parent, type, name ); diff --git a/Runtime/Math/Geometry/Box2.cs b/Runtime/Math/Geometry/Box2.cs index 28d105a..5a5c21f 100644 --- a/Runtime/Math/Geometry/Box2.cs +++ b/Runtime/Math/Geometry/Box2.cs @@ -15,11 +15,21 @@ namespace Rokojori this.max = max; } + public static Box2 Create( Vector2 min, Vector2 max ) + { + return new Box2( min, max ); + } + public static Box2 With( float width, float height, float x = 0, float y = 0 ) { return new Box2( new Vector2( x, y ), new Vector2( x + width, y + height ) ); } + public static Box2 FromPointWithSize( Vector2 position, float size ) + { + return new Box2( position - Vector2.One * size / 2f, position + Vector2.One * size / 2f ); + } + public Box2() {} @@ -107,6 +117,11 @@ namespace Rokojori } + public bool Overlaps( Box2 other ) + { + return Overlap2D.Has( this, other ); + } + } } \ No newline at end of file diff --git a/Runtime/Math/Geometry/Box3.cs b/Runtime/Math/Geometry/Box3.cs index 795379b..08d3b67 100644 --- a/Runtime/Math/Geometry/Box3.cs +++ b/Runtime/Math/Geometry/Box3.cs @@ -112,9 +112,11 @@ namespace Rokojori public static Vector3 Constrain( Vector3 point, Vector3 min, Vector3 max ) { + var before = point; point = min.Max( point ); point = max.Min( point ); + // RJLog.Log( before, point, min, max ); return point; } diff --git a/Runtime/Math/Geometry/Overlap2D.cs b/Runtime/Math/Geometry/Overlap2D.cs new file mode 100644 index 0000000..2c6287b --- /dev/null +++ b/Runtime/Math/Geometry/Overlap2D.cs @@ -0,0 +1,24 @@ +using Godot; +using System.Collections; +using System.Collections.Generic; + +namespace Rokojori +{ + public class Overlap2D + { + public static bool Has( Box2 a, Box2 b ) + { + if ( ! Range.Overlap( a.min.Y, a.max.Y, b.min.Y, b.max.Y ) ) + { + return false; + } + + if ( ! Range.Overlap( a.min.X, a.max.X, b.min.X, b.max.X ) ) + { + return false; + } + + return true; + } + } +} diff --git a/Runtime/Math/Geometry/Overlap2D.cs.uid b/Runtime/Math/Geometry/Overlap2D.cs.uid new file mode 100644 index 0000000..e357b78 --- /dev/null +++ b/Runtime/Math/Geometry/Overlap2D.cs.uid @@ -0,0 +1 @@ +uid://cm157e4eaavnk diff --git a/Runtime/Math/Math2D.cs b/Runtime/Math/Math2D.cs index c2f8f88..1c7129a 100644 --- a/Runtime/Math/Math2D.cs +++ b/Runtime/Math/Math2D.cs @@ -8,6 +8,11 @@ namespace Rokojori { public static class Math2D { + public enum Axis + { + X, Y + } + public static Vector2I RoundToInt( this Vector2 v ) { return new Vector2I( Mathf.RoundToInt( v.X ), Mathf.RoundToInt( v.Y ) ); @@ -23,6 +28,22 @@ namespace Rokojori return new Vector2I( Mathf.CeilToInt( v.X ), Mathf.CeilToInt( v.Y ) ); } + public static Vector2 SnapFloored( this Vector2 v, Vector2 snapping ) + { + v.X = MathX.SnapFloored( v.X, snapping.X ); + v.Y = MathX.SnapFloored( v.Y, snapping.Y ); + + return v; + } + + public static Vector2 SnapCeiled( this Vector2 v, Vector2 snapping ) + { + v.X = MathX.SnapCeiled( v.X, snapping.X ); + v.Y = MathX.SnapCeiled( v.Y, snapping.Y ); + + return v; + } + public static float LookingAtEachOtherAngle( Vector2 lookDirectionA, Vector2 lookDirectionB ) { return Dot( lookDirectionA, lookDirectionB ); @@ -53,6 +74,16 @@ namespace Rokojori return new Vector2( v.X, v.Z ); } + public static Vector3 To3DXZ( this Vector2 v, float y = 0 ) + { + return new Vector3( v.X, y, v.Y ); + } + + public static Vector3 To3DXY( this Vector2 v, float z = 0 ) + { + return new Vector3( v.X, v.Y, z ); + } + public static Vector2 Map( Vector2 value, Vector2 inMin, Vector2 inMax, Vector2 outMin, Vector2 outMax ) { return new Vector2( diff --git a/Runtime/Math/Math3D.cs b/Runtime/Math/Math3D.cs index 4d36cbe..4067185 100644 --- a/Runtime/Math/Math3D.cs +++ b/Runtime/Math/Math3D.cs @@ -8,6 +8,11 @@ namespace Rokojori { public static class Math3D { + public enum Axis + { + X, Y, Z + } + public static float LookingAtEachOtherAngle( Vector3 lookDirectionA, Vector3 lookDirectionB ) { return Dot( lookDirectionA, lookDirectionB ); @@ -460,6 +465,8 @@ namespace Rokojori return v; } + + public static Vector3I RoundToInt( this Vector3 v ) { return new Vector3I( Mathf.RoundToInt( v.X ) , Mathf.RoundToInt( v.Y ), Mathf.RoundToInt( v.Z ) ); @@ -490,6 +497,21 @@ namespace Rokojori return new Vector2( v.X, v.Z ); } + public static Vector2 GlobalXZ( this Node3D n ) + { + var v = n.GlobalPosition; + return new Vector2( v.X, v.Z ); + } + + public static void SetGlobalXZ( this Node3D n, Vector2 xz ) + { + var p = n.GlobalPosition; + p.X = xz.X; + p.Z = xz.Y; + + n.GlobalPosition = p; + } + public static Vector2 ZX( this Vector3 v ) { return new Vector2( v.Z, v.X ); diff --git a/Runtime/Math/MathX.cs b/Runtime/Math/MathX.cs index ec1bdc4..9562abc 100644 --- a/Runtime/Math/MathX.cs +++ b/Runtime/Math/MathX.cs @@ -175,6 +175,15 @@ namespace Rokojori return index; } + public static int MultiIndexToFlatIndex( Vector2I indices, Vector2I sizes ) + { + var index = 0; + + index += indices.Y; + index += sizes.X * sizes.Y; + return index; + } + public static List FlatIndexToMultiIndex( int index, List sizes, List multiIndex = null ) { multiIndex = multiIndex == null ? new List( new int[ sizes.Count ] ) : multiIndex; diff --git a/Runtime/Procedural/Assets/Grass/GrassPatch.cs b/Runtime/Procedural/Assets/Grass/GrassPatch.cs index 89f64af..277b009 100644 --- a/Runtime/Procedural/Assets/Grass/GrassPatch.cs +++ b/Runtime/Procedural/Assets/Grass/GrassPatch.cs @@ -81,6 +81,10 @@ namespace Rokojori [Export] public bool centerPatch = false; + /** Scales the complete mesh with patchScale*/ + [Export] + public float patchScale = 1.0f; + /** If on, this determines which vertices should be counted to compute the center of the patch. @@ -710,6 +714,12 @@ namespace Rokojori mg.ScaleZForY( scaleZForY ); } + + if ( patchScale != 1.0f ) + { + mg.ApplyScale( patchScale ); + } + return mg; } diff --git a/Runtime/Procedural/Mesh/MeshGeometry.cs b/Runtime/Procedural/Mesh/MeshGeometry.cs index da1e13e..bc5f705 100644 --- a/Runtime/Procedural/Mesh/MeshGeometry.cs +++ b/Runtime/Procedural/Mesh/MeshGeometry.cs @@ -391,6 +391,11 @@ namespace Rokojori ApplyTransform( Math3D.TRS( translation, rotation, scale ), start, length ); } + public void ApplyScale( float scale, int start = 0, int length = -1 ) + { + ApplyTransform( Math3D.TRS( Vector3.Zero, Quaternion.Identity, Vector3.One * scale ), start, length ); + } + public void ApplyTranslation( Vector3 translation, int start = 0, int length = -1 ) { if ( start < 0 ) diff --git a/Runtime/Procedural/Noise/RGB 3D Noise.png.import b/Runtime/Procedural/Noise/RGB 3D Noise.png.import index f536fa5..9056d69 100644 --- a/Runtime/Procedural/Noise/RGB 3D Noise.png.import +++ b/Runtime/Procedural/Noise/RGB 3D Noise.png.import @@ -19,6 +19,8 @@ dest_files=["res://.godot/imported/RGB 3D Noise.png-daebfe00d2f3fcd5d3bc528f8a39 compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -26,6 +28,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Random/RandomEngine.cs b/Runtime/Random/RandomEngine.cs index 014b1ae..fea771b 100644 --- a/Runtime/Random/RandomEngine.cs +++ b/Runtime/Random/RandomEngine.cs @@ -140,6 +140,22 @@ namespace Rokojori return inCube; } + public Vector2 OnCircle( float size = 1 ) + { + var angle = Mathf.Pi * 2.0f * Next(); + + return new Vector2( Mathf.Cos( angle ), Mathf.Sin( angle ) ) * size ; + } + + public Vector2 InsideCircle( float maxSize = 1, float minSize = 0f ) + { + var size = Next() * ( maxSize - minSize ) + minSize; + var angle = Mathf.Pi * 2.0f * Next(); + + return new Vector2( Mathf.Cos( angle ), Mathf.Sin( angle ) ) * size ; + } + + public Vector3 OnSphere( float size ) { return OnSphere() * size; diff --git a/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs b/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs index bf185c7..89f7f7e 100644 --- a/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs +++ b/Runtime/Rendering/Assets/Foliage/FoliageRenderer.cs @@ -49,7 +49,11 @@ namespace Rokojori [Export] public Camera3D camera; - + public override void _Ready() + { + updateLayers = true; + } + [Export] public Vector2 globalMapSizeXZ; diff --git a/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs b/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs index 67d728c..78eb454 100644 --- a/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs +++ b/Runtime/Rendering/Compositor/SingleShaderCompositorEffect.cs @@ -40,7 +40,7 @@ namespace Rokojori return; } - _pipeline = RDPipeline.CreateRender( context, _shader ); + _pipeline = RDPipeline.CreateCompute( context, _shader ); if ( _shader == null ) { diff --git a/Runtime/Rendering/Objects/RDProgram.cs b/Runtime/Rendering/Objects/RDProgram.cs index d4199df..621f578 100644 --- a/Runtime/Rendering/Objects/RDProgram.cs +++ b/Runtime/Rendering/Objects/RDProgram.cs @@ -54,28 +54,28 @@ namespace Rokojori } } - public static RDProgram RenderFromPath( RDContext context, string path, RDRenderPipelineSetup setup ) - { - var p = new RDProgram( context ); +// public static RDProgram RenderFromPath( RDContext context, string path, RDRenderPipelineSetup setup ) +// { +// var p = new RDProgram( context ); - p._shader = RDShader.FromPath( context, path ); +// p._shader = RDShader.FromPath( context, path ); - if ( p._shader == null || ! p._shader.rid.IsValid ) - { - context.Error( "Invalid shader", path ); - return null; - } +// if ( p._shader == null || ! p._shader.rid.IsValid ) +// { +// context.Error( "Invalid shader", path ); +// return null; +// } - p._pipeline = RDPipeline.CreateRender( context, p._shader, setup ); +// p._pipeline = RDPipeline.CreateRender( context, p._shader, setup ); - if ( p._pipeline == null || ! p._pipeline.rid.IsValid ) - { - context.Error( "Invalid pipeline", path ); - return null; - } +// if ( p._pipeline == null || ! p._pipeline.rid.IsValid ) +// { +// context.Error( "Invalid pipeline", path ); +// return null; +// } - return p; - } - } -} +// return p; +// } +// } +// } } \ No newline at end of file diff --git a/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs b/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs index 14eb72b..0181ab5 100644 --- a/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs +++ b/Runtime/Rendering/RenderGraph/RDShaderProcessor.cs @@ -46,7 +46,7 @@ namespace Rokojori return; } - _pipeline = RDPipeline.CreateRender( graph.context, _shader ); + _pipeline = RDPipeline.CreateCompute( graph.context, _shader ); if ( _shader == null ) { diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Middle.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Middle.tres index c9ce177..addabf2 100644 --- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Middle.tres +++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Middle.tres @@ -4,13 +4,4 @@ [resource] script = ExtResource("1_baalg") -button = 2 -ctrlHold = 2 -altHold = 2 -shiftHold = 2 -modifiersMode = 0 -continous = false -_value = 0.0 -_wasActive = false -_active = false -_activeTreshold = 0.5 +button = 3 diff --git a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Right.tres b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Right.tres index a4700db..7adf89f 100644 --- a/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Right.tres +++ b/Runtime/Sensors/Default-Sensors/Keyboard & Mouse/Mouse/Mouse-Button Right.tres @@ -4,13 +4,4 @@ [resource] script = ExtResource("1_4clle") -button = 3 -ctrlHold = 2 -altHold = 2 -shiftHold = 2 -modifiersMode = 0 -continous = false -_value = 0.0 -_wasActive = false -_active = false -_activeTreshold = 0.5 +button = 2 diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import index d9689ae..3525f2b 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Background.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Axis-Background.svg-b018ae62e7a4eebc4 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import index eb12d63..914d2c3 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Left + Right.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Axis-Left + Right.svg-b8527ae0a49506c compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import index 30999f5..b431a72 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Pressed.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Axis-Pressed.svg-ec6e7b829d0a337f3618 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import index c0087b7..0840f56 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up + Down.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Axis-Up + Down.svg-bfc4f86d39b6afa439 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import index 5121236..1e7c6b6 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Axis-Up.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Axis-Up.svg-7180da91f8b02e4246a73bcc0 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import index 7e0c92c..a57452b 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Background.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-DPad-Background.svg-178c2d0245821ea21 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import index 356ec3f..a432450 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Left + Right.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-DPad-Left + Right.svg-f9f881c8150d9fe compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import index 9a16333..a7bf754 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up + Down.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-DPad-Up + Down.svg-249b18f4f4b74a86f1 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import index db19b1d..02e6041 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-DPad-Up.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-DPad-Up.svg-88b76b15bcaba72455d2e57e2 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import index eb4d220..c33be43 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Left-Shoulder-Button.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Left-Shoulder-Button.svg-861d2a6e9d5a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import index aa62a64..b28f7c5 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-MainButton.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-MainButton.svg-6e8af81bd24219cce6491f compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import index f8bae7e..e281b00 100644 --- a/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/GamePad-Right-Shoulder-Button.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Right-Shoulder-Button.svg-748f2a59a56 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import index 5c00448..5f601eb 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-EnterKey.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Keyboard-EnterKey.svg-df0c9a28f7bf6eef40bef1b compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import index f1155a6..7e3af86 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-Indicator.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Keyboard-Indicator.svg-25ac02782892c97b7da3cb compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import index 0979928..4df9b4a 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard-SpaceKey.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Keyboard-SpaceKey.svg-5b109688b82a51368664674 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import b/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import index 1179b07..27699e6 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Keyboard.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Keyboard.svg-a70d9c256bdc77fc346c117efc258c32 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import index aa4d159..6980a99 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Left Button.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse-Left Button.svg-31ddaaa05bab8c797fa3c94 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import index ac942b1..cc50ab5 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Middle Button.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse-Middle Button.svg-a4aeeb1173df7e3f524df compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import index e929248..fd65316 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Right Button.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse-Right Button.svg-918a87670c33f9a9fde018 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import index b6b4952..09851ea 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Down.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse-Wheel Down.svg-bedd1d77ac6b5c7b8def3e53 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import index f85cef1..9ad0a97 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up & Down.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse-Wheel Up & Down.svg-a7428dcea335d364f2a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import index 7ba5ec6..375d0c6 100644 --- a/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/Mouse-Wheel Up.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse-Wheel Up.svg-4a8f86710c89e72aec9c176585 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=true mipmaps/limit=-1 roughness/mode=1 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import index 3d556a3..3a7c038 100644 --- a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-Axis.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-Axis.svg-12c971ecda8ec77c46bf9c73d368 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import index e1b7dab..862eaee 100644 --- a/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/GamePad-DPad.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/GamePad-DPad.svg-b9f2b0701dd376673653efa44826 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import b/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import index d94870a..3a8651a 100644 --- a/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import +++ b/Runtime/Sensors/InputIcons/Graphics/_Combined/Mouse.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Mouse.svg-dda12d953145ea4771e0e41818a6abb2.ct compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs b/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs index 655e0ef..3a397f9 100644 --- a/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs +++ b/Runtime/Shading/Generators/Generic/ShaderGenerationModule.cs @@ -11,6 +11,7 @@ namespace Rokojori public abstract partial class ShaderGenerationModule:Resource { public bool sortableCode = true; + public string uniformGroup; public virtual bool CodeIsSortable( ShaderPhase phase ) { @@ -89,6 +90,8 @@ namespace Rokojori public static List IncludeUVLibrary(){ return IncludeFromLibrary( "UV" ); } + public static List IncludeColorsLibrary(){ return IncludeFromLibrary( "Colors" ); } + public static ShaderVariant ToVariant( List code ) { var variant = new ShaderVariant(); @@ -117,8 +120,24 @@ namespace Rokojori return Lists.From( (ShaderCode)new StringShaderCode( value ) ); } + public static List ToUnsortableCode( string value ) + { + var code = ToCode( value ); + + code.ForEach( c => c.sortableCode = false ); + + return code; + } + public List AsUniformGroup( string name, string value ) { + name = name.Replace( ".", "" ); + + if ( uniformGroup != null && uniformGroup != "" ) + { + name = uniformGroup + "." + name; + } + var wideName = RegexUtility.UpperCaseAndWide( name ); var blockCode = value.Indent( " ", false ); @@ -139,6 +158,13 @@ namespace Rokojori public List AsUniformGroup( string name, List code ) { + name = name.Replace( ".", "" ); + + if ( uniformGroup != null && uniformGroup != "" ) + { + name = uniformGroup + "." + name; + } + var wideName = RegexUtility.UpperCaseAndWide( name ); var codeBefore = @@ -205,6 +231,29 @@ namespace Rokojori return Lists.From( (ShaderCode)new StringShaderCode( Lists.From( values ).Join( "" ) ) ); } + public static string UniformFor( ShaderProperty property ) + { + if ( property is FloatProperty fp ) + { + return Uniform( fp ); + } + + if ( property is Vector2Property v2 ) + { + return Uniform( v2 ); + } + + return null; + } + + public static string Uniform( FloatProperty property ) + { + var name = property.propertyName.propertyName; + var value = property.value._G(); + + return @$"uniform float {name} = {value};"; + } + public static string Uniform( Vector2Property property ) { var name = property.propertyName.propertyName; diff --git a/Runtime/Shading/Generators/Generic/ShaderGenerator.cs b/Runtime/Shading/Generators/Generic/ShaderGenerator.cs index accc178..b4f5264 100644 --- a/Runtime/Shading/Generators/Generic/ShaderGenerator.cs +++ b/Runtime/Shading/Generators/Generic/ShaderGenerator.cs @@ -83,7 +83,7 @@ namespace Rokojori cs => { cs.phase = phase; - cs.sortableCode = m.CodeIsSortable( phase ); + cs.sortableCode = cs.sortableCode && m.CodeIsSortable( phase ); } ); } @@ -135,7 +135,15 @@ namespace Rokojori if ( first ) { - shader = ResourceLoader.Load( filePath ); + if ( shader != null ) + { + shader.Code = shaderCode; + } + else + { + shader = ResourceLoader.Load( filePath ); + } + } first =false; diff --git a/Runtime/Shading/Generators/Generic/ShaderVariant.cs b/Runtime/Shading/Generators/Generic/ShaderVariant.cs index ea4b8bd..8ce062b 100644 --- a/Runtime/Shading/Generators/Generic/ShaderVariant.cs +++ b/Runtime/Shading/Generators/Generic/ShaderVariant.cs @@ -1,6 +1,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using System.Text; namespace Rokojori { @@ -57,6 +58,8 @@ namespace Rokojori + + if ( hasNormalRoughness ) { cleanedUpCode.Insert( insertionIndex, ShaderGenerationModule.ToCode( "\n" )[ 0 ] ); @@ -97,7 +100,86 @@ namespace Rokojori } ); - return sortedCode.Map( s => s.GetCode( context ) ).Join( "" ); + var code = sortedCode.Map( s => s.GetCode( context ) ).Join( "" ); + + code = PostProcess( code ); + + return code; + } + + string PostProcess( string code ) + { + var lexed = GDShaderLexer.Lex( code ); + + var uniformsStack = new List(); + var list = LexerList.Create( lexed ); + var currentNameSpace = ""; + + var replacements = new Dictionary(); + + for ( var i = 0; i < lexed.Count; i++ ) + { + if ( lexed[ i ].isErrorOrDone ) + { + continue; + } + + if ( lexed[ i ].Is( LexerMatcherLibrary.CwordMatcher, "group_uniforms" ) ) + { + var nextResult = list.Find( i + 1, [ Lexer.Selects( ";" ), Lexer.SelectsCWord() ], [ Lexer.Ignore ] ); + + if ( ! nextResult.found ) + { + throw new System.Exception( "No closing or name for group_uniforms found"); + } + + var nextToken = lexed[ nextResult.index ]; + var isClosing = lexed[ nextResult.index ].match == ";" ; + + if ( isClosing ) + { + uniformsStack.Pop(); + } + else + { + uniformsStack.Add( nextToken.match ); + } + + currentNameSpace = uniformsStack.Join( "." ); + + if ( isClosing ) + { + if ( uniformsStack.Count <= 1 ) + { + replacements[ lexed[ i ] ] = ""; + replacements[ nextToken ] = ""; + } + } + else + { + replacements[ nextToken ] = currentNameSpace; + } + } + } + + var builder = new StringBuilder(); + + lexed.ForEach( + ( le )=> + { + if ( replacements.ContainsKey( le ) ) + { + builder.Append( replacements[ le ] ); + } + else + { + builder.Append( le.match ); + } + } + ); + + return builder.ToString(); + } void ResolveVariableOccurances( ShaderGenerationContext context ) diff --git a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs index cbc67fb..e2c29e5 100644 --- a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs +++ b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoModule.cs @@ -10,16 +10,16 @@ namespace Rokojori { public AlbedoModule() { - _domainName = "albedo"; - _domainScaleName = "albedo"; - _domainValueName = "albedo"; - + SetDomainNames( "albedo" ); + _target = "ALBEDO"; _srgb = true; _type = TextureChannelType.RGB; scaleType = TextureChannelType.RGB; } + + [Export] public TextureFilter filter = TextureFilter.Linear_MipMap_Anisotropic; @@ -30,21 +30,25 @@ namespace Rokojori public bool srgb = true; [Export] - public bool writeAlpha = true; + public bool writeAlpha = false; [Export] public bool repeat = true; + [Export] + public string tintVarying = ""; + [Export] public string uvChannel = "UV"; [Export] public TextureDefault textureDefault = TextureDefault.White; - [Export] public AssignmentType assignmentType = AssignmentType.Set; + [Export] + public AlbedoOverlayLayer[] overlayLayers = []; public override void GrabValues() @@ -64,20 +68,56 @@ namespace Rokojori { var variants = base.GetVariants( context ); - if ( ! writeAlpha || ShaderPhase.Fragment != context.phase ) + + + if ( ShaderPhase.Fragment == context.phase ) { - return variants; + if ( tintVarying != null && tintVarying != "" ) + { + var tinting = $"ALBEDO *= {tintVarying}.rgb;\n"; + variants = ShaderVariant.CombineVariants( variants, ToVariants( ToCode( tinting ) ) ); + } + + if ( writeAlpha ) + { + var value = GetSampledName() + ".a" ; + + if ( useTint ) + { + value += " * albedo.a"; + } + + if ( tintVarying != null && tintVarying != "" ) + { + value += $" * {tintVarying}.a"; + } + + var assignment = " ALPHA *= " + value + ";\n\n"; + variants = ShaderVariant.CombineVariants( variants, ToVariants( ToCode( assignment ) ) ); + } } - var value = GetSampledName() + ".a" ; - - if ( useTint ) + if ( overlayLayers != null ) { - value += " * albedo.a"; + overlayLayers.ForEach( + ( layer )=> + { + var layerName = "albedo" + ( overlayLayers.IndexOf( layer ) + 2 ); + var uniformGroup = "albedo" + ( overlayLayers.IndexOf( layer ) + 2 ); + layer.uniformGroup = uniformGroup; + var shaderCode = layer.GetOverlayCode( context, layerName, "ALBEDO", "ALBEDO" ); + + if ( shaderCode == null ) + { + return; + } + + variants = ShaderVariant.CombineVariants( variants, ToVariants( shaderCode ) ); + } + ); } - var assignment = " ALPHA *= " + value + ";\n\n"; - return ShaderVariant.CombineVariants( variants, ToVariants( ToCode( assignment ) ) ); + return variants; } diff --git a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs new file mode 100644 index 0000000..a00c78a --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs @@ -0,0 +1,37 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class AlbedoOverlayLayer:SpatialOverlayLayer + { + [Export] + public AlbedoModule layer = new AlbedoModule(); + + public AlbedoOverlayLayer() + { + channelType = ChannelType.RGB; + } + + public override List GetLayerCode( ShaderGenerationContext context, string name, string currentValueName ) + { + layer.SetDomainNames( name ); + layer._target = currentValueName; + + layer.uniformGroup = ""; + + var variants = layer.GetVariants( context ); + + if ( variants == null || variants.Count == 0 ) + { + return null; + } + + return variants[ 0 ].shaderCode; + + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs.uid b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs.uid new file mode 100644 index 0000000..09f53d1 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Albedo/AlbedoOverlayLayer.cs.uid @@ -0,0 +1 @@ +uid://c66d71an78m6m diff --git a/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs b/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs index 511464e..2521bbe 100644 --- a/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs +++ b/Runtime/Shading/Generators/Spatial/Alpha/AlphaFade.cs @@ -8,7 +8,10 @@ namespace Rokojori { ___, Alpha, - NoiseDitherDiscard + NoiseDitherDiscard, + DiscardTresholdZero, + DiscardTresholdHalf, + DiscardTresholdOne } @@ -33,6 +36,45 @@ namespace Rokojori return " ALPHA *= " + variableName + ";\n"; } + if ( AlphaFadeMode.DiscardTresholdZero == mode ) + { + var code = + $@" + if ( {variableName} <= 0.001 ) + {{ + discard; + }} + "; + + return code.Indent( " "); + } + + if ( AlphaFadeMode.DiscardTresholdOne == mode ) + { + var code = + $@" + if ( {variableName} < 1.0 ) + {{ + discard; + }} + "; + + return code.Indent( " "); + } + + if ( AlphaFadeMode.DiscardTresholdHalf == mode ) + { + var code = + $@" + if ( {variableName} <= 0.5 ) + {{ + discard; + }} + "; + + return code.Indent( " "); + } + if ( AlphaFadeMode.NoiseDitherDiscard == mode ) { diff --git a/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs b/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs index f10df76..aa569b5 100644 --- a/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs +++ b/Runtime/Shading/Generators/Spatial/Emission/EmissionModule.cs @@ -49,6 +49,9 @@ namespace Rokojori [Export] public AssignmentType assignmentType = AssignmentType.Set; + + [Export] + public EmissionOverlayLayer[] overlayLayers = []; public override void GrabValues() { @@ -64,5 +67,34 @@ namespace Rokojori _assignmentType = assignmentType; } + + + public override List GetVariants( ShaderGenerationContext context ) + { + var variants = base.GetVariants( context ); + + if ( overlayLayers != null ) + { + overlayLayers.ForEach( + ( layer )=> + { + var layerName = "emission" + ( overlayLayers.IndexOf( layer ) + 2 ); + var uniformGroup = "emission" + ( overlayLayers.IndexOf( layer ) + 2 ); + layer.uniformGroup = uniformGroup; + var shaderCode = layer.GetOverlayCode( context, layerName, "EMISSION", "EMISSION" ); + + if ( shaderCode == null ) + { + return; + } + + variants = ShaderVariant.CombineVariants( variants, ToVariants( shaderCode ) ); + } + ); + } + + return variants; + + } } } \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs b/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs new file mode 100644 index 0000000..b6163ae --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs @@ -0,0 +1,37 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class EmissionOverlayLayer:SpatialOverlayLayer + { + [Export] + public EmissionModule layer = new EmissionModule(); + + public EmissionOverlayLayer() + { + channelType = ChannelType.RGB; + } + + public override List GetLayerCode( ShaderGenerationContext context, string name, string currentValueName ) + { + layer.SetDomainNames( name ); + layer._target = currentValueName; + + layer.uniformGroup = ""; + + var variants = layer.GetVariants( context ); + + if ( variants == null || variants.Count == 0 ) + { + return null; + } + + return variants[ 0 ].shaderCode; + + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs.uid b/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs.uid new file mode 100644 index 0000000..a9e5653 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Emission/EmissionOverlayLayer.cs.uid @@ -0,0 +1 @@ +uid://dqpeuvyif7mir diff --git a/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs b/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs new file mode 100644 index 0000000..8a577cb --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs @@ -0,0 +1,71 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; +using System.Linq; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class DissolveFading:FadingModifier + { + [Export] + public string UV = "UV"; + + [Export] + public bool srgb = true; + + [Export] + public bool repeat = true; + + [Export] + public TextureModule.TextureFilter filter; + + [Export] + public TextureModule.TextureDefault textureDefault = TextureModule.TextureDefault.White; + + + public override List GetFadingCode( ShaderGenerationContext context, int offsetIndex, AlphaFadeMode parentFadeMode ) + { + var alphaFadeMode = GetFadeMode( parentFadeMode ); + var suffix = GetSuffix( offsetIndex ); + + if ( context.isIncludesPhase ) + { + return IncludeMathLibrary(); + } + + if ( context.isVariablesPhase ) + { + var hints = TextureModule.GetTextureHints( srgb, false, repeat, filter, textureDefault ); + + var code = + $@" + uniform float dissolveState{suffix}:hint_range(0,1) = 1.0f; + uniform sampler2D dissolveTexture{suffix}:{hints.Join()}; + "; + return ToCode( code.Indent( " " ) ); + } + + + if ( context.isFragmentPhase ) + { + var code = + $@" + + + float sampledDissolveTexture{suffix} = texture( dissolveTexture{suffix}, {UV} ).r; + float dissolveAlpha{suffix} = clamp01( sampledDissolveTexture + ( dissolveState{suffix} * 2.0 - 1.0 ) ); + + "; + + + return ToCode( code.Indent( " " ) ).Concat( ToCode( AlphaFade.Fragment( "dissolveAlpha" + suffix, alphaFadeMode ) ) ); + } + + return []; + } + + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs.uid b/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs.uid new file mode 100644 index 0000000..82d7aa9 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Fading/Dissolve/DissolveFading.cs.uid @@ -0,0 +1 @@ +uid://bwu55ls0tadsi diff --git a/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs b/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs index 2272a3d..66d4e7f 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/FadingModule.cs @@ -54,7 +54,8 @@ namespace Rokojori if ( ShaderPhase.Variables == context.phase && fm.createUniformGroup ) { shaderCode.Add( EndUniformGroup() ); - fCode = AsUniformGroup( fm.GetType().Name + fm.GetSuffix( fIndex ), fCode ); + fm.uniformGroup = "Fading"; + fCode = fm.AsUniformGroup( fm.GetType().Name + fm.GetSuffix( fIndex ), fCode ); } shaderCode.Add( fCode ); diff --git a/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs b/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs index 7c27163..f3d9bc8 100644 --- a/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs +++ b/Runtime/Shading/Generators/Spatial/Fading/Fresnel/FresnelFading.cs @@ -94,7 +94,7 @@ namespace Rokojori uniform float advancedFresnelFadingPower{suffix} = 1.0f; uniform float advancedFresnelFadingPostScale{suffix} = 1.0f; uniform float advancedFresnelFadingPostOffset{suffix} = 0.0f; - uniform bool advancedFresnelFadingInverse = false; + uniform bool advancedFresnelFadingInverse{suffix} = false; "; return ToCode( code.Indent( "" ) ); diff --git a/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs b/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs index 1c3af0e..c8d5766 100644 --- a/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs +++ b/Runtime/Shading/Generators/Spatial/Geometry/GeometryModule.cs @@ -21,6 +21,7 @@ namespace Rokojori ( m )=> { var offsetIndex = allModifiers.Filter( l => l.IsSameType( m ) ).IndexOf( m ); + m.uniformGroup = "Geometry"; var geometryCode = m.GetGeometryCode( context, offsetIndex ); if ( geometryCode == null ) diff --git a/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs b/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs new file mode 100644 index 0000000..8ea5c30 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs @@ -0,0 +1,111 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class AxisMask:SpatialMask + { + public enum Source + { + Vertex, + Uniform + } + + [Export] + public Source fromSource = Source.Vertex; + + [Export] + public ShaderTransformSpace uniformSourceFromSpace; + + [Export] + public ShaderTransformSpace toSpace; + + [Export] + public Math3D.Axis toAxis; + + [Export] + public bool eulerRotation = true; + + [Export] + public bool clamp = true; + + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + if ( ShaderPhase.Includes == context.phase ) + { + return IncludeTransformLibrary().Concat( IncludeMathLibrary() ); + } + + var ownName = contextName + "AxisMask"; + var nameMin = ownName + "_Min"; + var nameMax = ownName + "_Max"; + var uniformPosition = ownName + "_AxisPosition"; + var uniformRotation = ownName + "_AxisRotation"; + + var uniformGroup = contextName + "AxisMask"; + + + if ( ShaderPhase.Variables == context.phase ) + { + var code = new List(); + code.AddRange( ToCode( Uniform( nameMin, 0 ) + "\n" ) ); + code.AddRange( ToCode( Uniform( nameMax, 0 ) + "\n" ) ); + + if ( Source.Uniform == fromSource ) + { + code.AddRange( ToCode( Uniform( uniformPosition, Vector3.Zero ) ) ); + } + + if ( eulerRotation ) + { + code.AddRange( ToCode( Uniform( uniformRotation, Vector3.Zero ) ) ); + } + + + + return AsUniformGroup( uniformGroup, code ); + } + + if ( context.isFragmentPhase ) + { + var variableName = Source.Vertex == fromSource ? "VERTEX" : uniformPosition; + + if ( eulerRotation ) + { + variableName = $"rotateEulerDegrees( {variableName}, {uniformRotation} )"; + } + + var fromSpace = Source.Vertex == fromSource ? ShaderTransformSpace.View : uniformSourceFromSpace; + var position = ShaderTransformSpaceUtility.FromPoint( fromSpace, toSpace, variableName ); + var member = $"({position})." + ( toAxis + "" ).ToLower(); + + var func = "normalizeToRange01"; + + if ( ! clamp ) + { + func = "normalizeToRange"; + } + + var code = + @$" + + {{ + + float {contextName}_AxisValue = {member}; + float {contextName}_normalizedValue = {func}( {contextName}_AxisValue, {nameMin}, {nameMax } ); + + {maskName} = {contextName}_normalizedValue; + }} + "; + return ToCode( code.Indent( " " ) + "\n" ); + } + + return null; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs.uid new file mode 100644 index 0000000..21c69c7 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/AxisMask.cs.uid @@ -0,0 +1 @@ +uid://cmo0q35ehg2is diff --git a/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs b/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs new file mode 100644 index 0000000..1c3c44c --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs @@ -0,0 +1,26 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class ConstantMask:SpatialMask + { + [Export] + public float constantValue = 0.5f; + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + if ( context.isFragmentPhase ) + { + var code = $"{maskName} = {constantValue};\n"; + return ToCode( code.Indent( " " ) ); + } + + return null; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs.uid new file mode 100644 index 0000000..832d2ff --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/ConstantMask.cs.uid @@ -0,0 +1 @@ +uid://bdusu1ho2aw2d diff --git a/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs b/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs new file mode 100644 index 0000000..61120c0 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs @@ -0,0 +1,64 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class FresnelMask:SpatialMask + { + [Export] + public string name = "FresnelMask"; + + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + var prefix = contextName + name; + var uniformGroup = contextName + "FresnelMask"; + + if ( ShaderPhase.Includes == context.phase ) + { + return IncludeLightLibrary(); + } + else if ( ShaderPhase.Variables == context.phase ) + { + var fresnelVariablesCode = + + $@" + uniform float {prefix}FresnelZOffset = 0.0f; + uniform float {prefix}FresnelPower = 1.0f; + uniform float {prefix}FresnelPostScale = 1.0f; + uniform float {prefix}FresnelPostOffset = 0.0f; + uniform bool {prefix}FresnelInverse = false; + + "; + + return AsUniformGroup( uniformGroup, ToCode( fresnelVariablesCode.Indent( "" ) ) ); + } + else if ( context.isFragmentPhase ) + { + var code = + @$" + + {maskName} = clamp01( fresnelNormalizedFromViewAdvanced( + NORMAL, + {prefix}FresnelZOffset, + {prefix}FresnelPower, + {prefix}FresnelPostScale, + {prefix}FresnelPostOffset + ) ); + + if ( ! {prefix}FresnelInverse ) + {{ {maskName} = 1.0 - {maskName}; }} + + + ;"; + return ToCode( code.Indent( " " ) ); + } + + return null; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs.uid new file mode 100644 index 0000000..5653fb4 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/FresnelMask.cs.uid @@ -0,0 +1 @@ +uid://csrcyamfmhnr8 diff --git a/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs b/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs new file mode 100644 index 0000000..3e97cc7 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs @@ -0,0 +1,98 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + public enum SpatialMaskFormulaType + { + Multiply, + Add, + Custom + } + + public static class SpatialMaskFormulaTypeUtility + { + public static string GetCombiningCode( + SpatialMaskFormulaType maskFormula, string customMaskFormula, + string combinedMaskName, string contextPrefix, int numMasks + ) + { + var combiningCode = $"float {combinedMaskName} = "; + + if ( numMasks == 0 ) + { + combiningCode += "1.0"; + } + + if ( SpatialMaskFormulaType.Add == maskFormula || SpatialMaskFormulaType.Multiply == maskFormula ) + { + var op = SpatialMaskFormulaType.Add == maskFormula ? " + " : " * "; + + for ( int i = 0; i < numMasks; i++ ) + { + var maskName = $"{contextPrefix}Mask{i}"; + + combiningCode += maskName; + + if ( i != ( numMasks - 1 ) ) + { + combiningCode += op; + } + } + + } + else + { + var replacedFormula = customMaskFormula; + + for ( int i = 0; i < numMasks; i++ ) + { + var maskName = $"{contextPrefix}Mask{i}"; + replacedFormula = replacedFormula.Replace( "_m" + i + "_", maskName ); + } + } + + return combiningCode; + } + + public static List GetFragmentMaskCode( + ShaderGenerationContext context, + SpatialMaskFormulaType type, string formula, + SpatialMask[] masks, + string contextPrefix, string combinedMaskName + ) + { + var list = new List(); + var maskIndex = 0; + + masks.ForEach( + ( m )=> + { + var maskName = $"{contextPrefix}Mask{maskIndex}"; + list.Add( ShaderGenerationModule.ToCode( $" float {maskName} = 0.0;\n" ) ); + list.Add( ShaderGenerationModule.ToCode( $" {{\n" ) ); + var maskCode = m.GetMaskCode( context, contextPrefix, maskName ); + if ( maskCode != null ) + { + list.Add( maskCode ); + } + + list.Add( ShaderGenerationModule.ToCode( $" }}\n" ) ); + maskIndex++; + } + ); + + var combiningCode = GetCombiningCode( type, formula, combinedMaskName, contextPrefix, masks.Length ); + + + combiningCode += ";\n"; + + + list.Add( ShaderGenerationModule.ToCode( combiningCode.Indent( " " ) ) ); + + return list; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs.uid new file mode 100644 index 0000000..4fcfa74 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/MaskFormulaType.cs.uid @@ -0,0 +1 @@ +uid://cretxc55a074w diff --git a/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs b/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs new file mode 100644 index 0000000..d7107cc --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs @@ -0,0 +1,25 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class MaskReference:SpatialMask + { + [Export] + public string maskReference; + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + if ( context.isFragmentPhase ) + { + var code = $"{maskName} = {maskReference};\n"; + return ToCode( code.Indent( " " ) ); + } + + return null; + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs.uid new file mode 100644 index 0000000..0398d60 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/MaskReference.cs.uid @@ -0,0 +1 @@ +uid://i8cxjpjwhubc diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs b/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs new file mode 100644 index 0000000..2b7e7a1 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs @@ -0,0 +1,14 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class SpatialMask:ShaderGenerationModule + { + + public abstract List GetMaskCode( ShaderGenerationContext context, string maskContextName, string maskTemporary ); + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs.uid new file mode 100644 index 0000000..99d3c4b --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMask.cs.uid @@ -0,0 +1 @@ +uid://db1mpv51jwmah diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs b/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs new file mode 100644 index 0000000..94fcc1f --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs @@ -0,0 +1,58 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class SpatialMaskVariable:ShaderGenerationModule + { + [Export] + public string maskName = "mask"; + + [Export] + public SpatialMaskFormulaType maskFormulaType = SpatialMaskFormulaType.Multiply; + + [Export] + public string customMaskFormula; + + [Export] + public SpatialMask[] masks = []; + + + public List GetShaderCode( ShaderGenerationContext context ) + { + var contextName = maskName; + + if ( context.isFragmentPhase ) + { + var maskCode = SpatialMaskFormulaTypeUtility.GetFragmentMaskCode( + context, maskFormulaType, customMaskFormula, masks, contextName, maskName ); + + return maskCode; + } + + var list = new List(); + + masks.ForEach( + ( m )=> + { + var c = m.GetMaskCode( context, maskName, maskName ); + + if ( c == null ) + { + return; + } + + list.Add( c ); + } + ); + + + return list; + } + + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs.uid new file mode 100644 index 0000000..72bf95a --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMaskVariable.cs.uid @@ -0,0 +1 @@ +uid://ct0ciw3quxl4g diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs b/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs new file mode 100644 index 0000000..dbbb3ec --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs @@ -0,0 +1,53 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; +using System.Linq; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class SpatialMasksModule:ShaderGenerationModule + { + [Export] + public SpatialMaskVariable[] maskVariables = []; + + public override List GetVariants( ShaderGenerationContext context ) + { + if ( maskVariables == null ) + { + return null; + } + + var variables = maskVariables.ToList().FilterNulls(); + + if ( variables.Count == 0 ) + { + return null; + } + + var list = new List(); + + variables.ForEach( + ( v )=> + { + var code = v.GetShaderCode( context ); + + if ( code == null ) + { + return; + } + + list.Add( code ); + } + ); + + if ( context.isVariablesPhase ) + { + list = AsUniformGroup( "Masks", list ); + } + + return ToVariants( list ); + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs.uid new file mode 100644 index 0000000..41d4b69 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/SpatialMasksModule.cs.uid @@ -0,0 +1 @@ +uid://yoc4tx8ahe6b diff --git a/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs b/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs new file mode 100644 index 0000000..359bb6b --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs @@ -0,0 +1,81 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class TextureMask:SpatialMask + { + [Export] + public string name = "TextureMask"; + + [Export] + public string UV = "UV"; + + [Export] + public ColorChannelType colorChannel = ColorChannelType.Red; + + [Export] + public bool srgb = true; + + [Export] + public bool repeat = true; + + [Export] + public TextureModule.TextureFilter filter; + + [Export] + public TextureModule.TextureDefault textureDefault = TextureModule.TextureDefault.White; + + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + var prefix = contextName + name; + var uniformGroup = contextName + "TextureMask"; + + if ( ShaderPhase.Includes == context.phase ) + { + var list = IncludeLightLibrary(); + + if ( ColorChannelTypeUtility.NeedsIncludesForGLSLMember( colorChannel ) ) + { + list.AddRange( IncludeColorsLibrary() ); + } + + return list; + } + else if ( ShaderPhase.Variables == context.phase ) + { + var hints = TextureModule.GetTextureHints( srgb, false, repeat, filter, textureDefault ); + var fresnelVariablesCode = + + $@" + uniform sampler2D {prefix}TextureMask:{hints.Join()}; + + "; + + return AsUniformGroup( uniformGroup, ToCode( fresnelVariablesCode.Indent( "" ) ) ); + } + else if ( context.isFragmentPhase ) + { + var member = ColorChannelTypeUtility.ToGLSLMember( "textureValue", colorChannel ); + var code = + @$" + + {{ + + vec4 textureValue = texture( {prefix}TextureMask, {UV} ); + {maskName} = {member}; + }} + + ;"; + return ToCode( code.Indent( " " ) ); + } + + return null; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs.uid new file mode 100644 index 0000000..4e4b133 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/TextureMask.cs.uid @@ -0,0 +1 @@ +uid://cmoht643rvpda diff --git a/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs b/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs new file mode 100644 index 0000000..2b01564 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs @@ -0,0 +1,43 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class ValueMask:SpatialMask + { + [Export] + public string name = "ValueMask"; + + [Export] + public float defaultValue = 0.5f; + + [Export] + public float min = 0f; + + [Export] + public float max = 1f; + + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + if ( ShaderPhase.Variables == context.phase ) + { + var uniformGroupName = contextName + "." + name; + + return AsUniformGroup( uniformGroupName, Uniform( contextName + name, defaultValue, min, max ) ) ; + } + + if ( context.isFragmentPhase ) + { + var code = $"{maskName} = {contextName + name};\n"; + return ToCode( code.Indent( " " ) ); + } + + return null; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs.uid new file mode 100644 index 0000000..4ed9784 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/ValueMask.cs.uid @@ -0,0 +1 @@ +uid://bkq23neeybysf diff --git a/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs b/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs new file mode 100644 index 0000000..ea7e7a7 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs @@ -0,0 +1,38 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class VaryingMask:SpatialMask + { + [Export] + public string varyingName; + + [Export] + public ColorChannelType colorChannelType; + + public override List GetMaskCode( ShaderGenerationContext context, string contextName, string maskName ) + { + if ( context.isIncludesPhase ) + { + if ( ColorChannelTypeUtility.NeedsIncludesForGLSLMember( colorChannelType ) ) + { + return IncludeColorsLibrary(); + } + } + + if ( context.isFragmentPhase ) + { + var colorChannelValue = ColorChannelTypeUtility.ToGLSLMember( varyingName, colorChannelType ); + + return ToCode( $"{maskName} = {colorChannelValue};" ); + } + + return null; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs.uid b/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs.uid new file mode 100644 index 0000000..0dba441 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Masks/VaryingMask.cs.uid @@ -0,0 +1 @@ +uid://da75p8b00dpgv diff --git a/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs b/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs new file mode 100644 index 0000000..d9ddace --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs @@ -0,0 +1,157 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; +using System.Linq; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class SpatialOverlayLayer:ShaderGenerationModule + { + [Export] + public SpatialMask[] masks; + + [Export] + public SpatialMaskFormulaType maskFormulaType = SpatialMaskFormulaType.Multiply; + + [Export] + public string customMaskFormula; + + public enum OverlayMode + { + Mix, + Blend_Alpha + } + + [Export] + public OverlayMode overlayMode; + + public enum ChannelType + { + RGBA, + RGB, + RG, + R, + G, + B, + A, + Float + } + + public ChannelType channelType = ChannelType.RGB; + + public string GetDataType() + { + if ( ChannelType.RGBA == channelType ) + { + return "vec4"; + } + + if ( ChannelType.RGB == channelType ) + { + return "vec3"; + } + + if ( ChannelType.RG == channelType ) + { + return "vec2"; + } + + return "float"; + } + + + public bool IsColorBlendMode() + { + List modes = + [ + OverlayMode.Blend_Alpha + ]; + + return modes.IndexOf( overlayMode ) != -1; + } + + + public List GetOverlayCode( ShaderGenerationContext context, string name, string oldValue, string targetValue ) + { + var list = new List(); + var currentValueName = $"{name}Value"; + + if ( context.isFragmentPhase ) + { + var dataType = GetDataType(); + var initData = $"{dataType} {currentValueName};\n"; + list.Add( ToCode( initData.Indent( " " ) ) ); + + var valueCode = GetLayerCode( context, name, currentValueName ); + list.Add( valueCode ); + var maskName = $"{name}CombinedMask"; + var maskCode = SpatialMaskFormulaTypeUtility.GetFragmentMaskCode( + context, maskFormulaType, customMaskFormula, masks, name, maskName ); + list.Add( maskCode ); + + + + + if ( OverlayMode.Mix == overlayMode ) + { + var blendCode = + @$" + + {targetValue} = mix( {oldValue}, {currentValueName}, {maskName} ); + + "; + + list.Add( ToCode( blendCode.Indent( " " ) ) ); + } + else if ( IsColorBlendMode() ) + { + var blendModeFunction = ( overlayMode + "" ).Replace( "Blend_", "" ).ToLower(); + + var blendCode = + @$" + + {targetValue} = blend_{blendModeFunction}( {oldValue}, fade( {currentValueName} * {maskName} ) ); + + "; + + list.Add( ToCode( blendCode.Indent( " " ) ) ); + } + } + else + { + var maskIndex = 0; + + masks.ForEach( + ( m )=> + { + var maskName = $"{name}Mask{maskIndex}"; + var maskCode = m.GetMaskCode( context, name, maskName ); + + if ( maskCode != null ) + { + list.Add( maskCode ); + } + + maskIndex++; + } + ); + + var layerCode = GetLayerCode( context, name, currentValueName ); + + if ( layerCode != null ) + { + list.Add( layerCode ); + } + + + } + + return list; + } + + public abstract List GetLayerCode( ShaderGenerationContext context, string name, string currentValueName ); + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs.uid b/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs.uid new file mode 100644 index 0000000..f712d44 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Overlays/SpatialOverlayLayer.cs.uid @@ -0,0 +1 @@ +uid://b4wq1k1tbar0g diff --git a/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs b/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs index ebb3d10..9c1075e 100644 --- a/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs +++ b/Runtime/Shading/Generators/Spatial/SpatialShaderData.cs @@ -40,12 +40,17 @@ namespace Rokojori [Export] public StencilModule stencil = null; + [Export] + public UVModule uv = new UVModule(); + [Export] public GeometryModule geometry = new GeometryModule(); [Export] - public UVModule uv = new UVModule(); + public SpatialVarying varying = new SpatialVarying(); + [Export] + public SpatialMasksModule masks = new SpatialMasksModule(); [Export] public AlbedoModule albedo = new AlbedoModule(); @@ -82,6 +87,9 @@ namespace Rokojori [Export] public SubsurfaceScatteringModule subsurfaceScattering = null; + [Export] + public SpatialOverlayLayer[] layers; + public void PBR_All_Starter() { transparency = new TransparencyModule(); diff --git a/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs b/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs index 76868a9..54f8bba 100644 --- a/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs +++ b/Runtime/Shading/Generators/Spatial/SpatialShaderGenerator.cs @@ -55,9 +55,11 @@ namespace Rokojori List GetMainModules() { - List list = [ - data.geometry, + List list = [ data.uv, + data.geometry, + data.varying, + data.masks, data.albedo, data.alpha, data.fading, diff --git a/Runtime/Shading/Generators/Spatial/TextureModule.cs b/Runtime/Shading/Generators/Spatial/TextureModule.cs index a87f8a8..5689a44 100644 --- a/Runtime/Shading/Generators/Spatial/TextureModule.cs +++ b/Runtime/Shading/Generators/Spatial/TextureModule.cs @@ -58,7 +58,7 @@ namespace Rokojori public float domainOffsetMax = 1; public float domainIntensityDefault = 1; - public float domainIntensityMin = 1; + public float domainIntensityMin = 0; public float domainIntensityMax = 20; public float domainValueDefault = 0.5f; @@ -82,6 +82,31 @@ namespace Rokojori public AssignmentType _assignmentType = AssignmentType.Set; + public void SetDomainNames( string name, bool scale = true, bool value=true, bool offset = true, bool intensity = true ) + { + _domainName = name; + + if ( scale ) + { + _domainScaleName = name; + } + + if ( value ) + { + _domainValueName = name; + } + + if ( offset ) + { + _domainOffsetName = name; + } + + if ( intensity ) + { + _domainIntensityName = name + "Intensity"; + } + } + public string assignmentOperator { get @@ -119,7 +144,8 @@ namespace Rokojori public enum TextureDefault { White, - Black + Black, + None } public TextureDefault _textureDefault = TextureDefault.White; @@ -152,6 +178,31 @@ namespace Rokojori } + public static List GetTextureHints( bool srgb, bool normal, bool repeat, TextureFilter filter, TextureDefault textureDefault ) + { + var hints = new List(); + + if ( srgb ) + { + hints.Add( "source_color" ); + } + + if ( normal ) + { + hints.Add( "hint_normal" ); + } + else if ( TextureDefault.None != textureDefault ) + { + hints.Add( TextureDefault.Black == textureDefault ? "hint_default_black" : "hint_default_white" ); + } + + + hints.Add( repeat ? "repeat_enable" : "repeat_disable" ); + hints.Add( "filter_" + ( filter + "" ).ToLower() ); + + return hints; + } + public override List GetVariants( ShaderGenerationContext context ) { GrabValues(); @@ -171,25 +222,25 @@ namespace Rokojori if ( DomainMode.Value != _domainMode ) { - var hints = new List(); + var hints = GetTextureHints( _srgb, _normal, _repeat, _textureFilter, _textureDefault ); - if ( _srgb ) - { - hints.Add( "source_color" ); - } + // if ( _srgb ) + // { + // hints.Add( "source_color" ); + // } - if ( _normal ) - { - hints.Add( "hint_normal" ); - } - else - { - hints.Add( TextureDefault.Black == _textureDefault ? "hint_default_black" : "hint_default_white" ); - } + // if ( _normal ) + // { + // hints.Add( "hint_normal" ); + // } + // else + // { + // hints.Add( TextureDefault.Black == _textureDefault ? "hint_default_black" : "hint_default_white" ); + // } - hints.Add( _repeat ? "repeat_enable" : "repeat_disable" ); - hints.Add( "filter_" + ( _textureFilter + "" ).ToLower() ); + // hints.Add( _repeat ? "repeat_enable" : "repeat_disable" ); + // hints.Add( "filter_" + ( _textureFilter + "" ).ToLower() ); var textureSamplerName = _domainName + "Texture"; diff --git a/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs b/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs index a6921bf..29bb559 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVChannel.cs @@ -20,6 +20,10 @@ namespace Rokojori public List GetShaderCode( ShaderGenerationContext context ) { + + uvSource.uniformGroup = uniformGroup; + modifier.uniformGroup = uniformGroup; + var sourceCode = uvSource.GetUV( context, uvTarget, 0 ); var modifierCode = modifier.ModifyUV( context, uvTarget ); @@ -40,6 +44,11 @@ namespace Rokojori list.AddRange( modifierCode ); } + if ( ShaderPhase.Variables == context.phase && ! ( uvTarget == "UV" || uvTarget == "UV2" ) ) + { + list.Add( ToCode( VaryingVec2( uvTarget ) + "\n" ) ); + } + return list; } } diff --git a/Runtime/Shading/Generators/Spatial/UV/UVModule.cs b/Runtime/Shading/Generators/Spatial/UV/UVModule.cs index 02dab1b..7bfdc0e 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVModule.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVModule.cs @@ -24,6 +24,7 @@ namespace Rokojori channels.ForEach( ( c )=> { + c.uniformGroup = "UVChannels"; var code = c.GetShaderCode( context ); if ( code == null ) @@ -34,6 +35,8 @@ namespace Rokojori list.AddRange( code ); } ); + + list.ForEach( sc => sc.sortableCode = false ); // var list = new List(); // var allModifiers = Lists.From( modifiers ).FilterNulls(); diff --git a/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs b/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs index e5fa6d8..fee03ea 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVScaleOffset.cs @@ -9,60 +9,69 @@ namespace Rokojori public partial class UVScaleOffset:UVModifier { [Export] - public Vector2Property uvScale = Vector2Property.Create( "uv_scale", Vector2.One ); + public bool uvScale = true; [Export] - public Vector2Property uvOffset = Vector2Property.Create( "uv_offset", Vector2.Zero ); + public bool uvUniScale = false; [Export] - public Vector2Property uvScrolling = Vector2Property.Create( "uv_scrolling", Vector2.Zero ); + public bool uvOffset = true; [Export] - public string target = "UV"; - + public bool uvScrolling = true; public override List ModifyUV( ShaderGenerationContext context, string uvTarget ) { + var uvScale = ! this.uvScale ? null : Vector2Property.Create( uvTarget + "_scale", Vector2.One ); + var uvUniScale = ! this.uvUniScale ? null : FloatProperty.Create( uvTarget + "_scaleAll", 1f ); + var uvOffset = ! this.uvOffset ? null : Vector2Property.Create( uvTarget + "_offset", Vector2.Zero ); + var uvScrolling = ! this.uvScrolling ? null : Vector2Property.Create( uvTarget + "_scrolling", Vector2.Zero ); + if ( ShaderPhase.Variables == context.phase ) { var lines = new List(); - Lists.From( uvScale, uvOffset, uvScrolling ).FilterNulls().ForEach( + Lists.From( uvScale, uvUniScale, uvOffset, uvScrolling ).FilterNulls().ForEach( ( p )=> { - lines.Add( Uniform( p ) + "\n" ); + lines.Add( UniformFor( p ) + "\n" ); } ); - return AsUniformGroup( "UV", lines.Join( "" ) ); + return AsUniformGroup( uvTarget, lines.Join( "" ) ); } if ( ShaderPhase.Vertex == context.phase ) { - var expression = target + " = " + target; + var expression = uvTarget + " = " + uvTarget; if ( uvScale != null ) { expression += " * " + uvScale.name; } + if ( uvUniScale != null ) + { + expression += " * " + uvUniScale.name; + } + if ( uvOffset != null ) { expression += " + " + uvOffset.name; } if ( uvScrolling != null ) - { + { expression += " + TIME * " + uvScrolling.name; } - expression += ";"; + expression += ";\n"; - return ToCode( expression ); + return ToUnsortableCode( expression.Indent( " " ) ); } diff --git a/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs b/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs index bd34a97..344a5df 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVSource/MeshUVSource.cs @@ -36,13 +36,13 @@ namespace Rokojori var meshUVstring = meshUV + ""; - if ( meshUVstring[ meshUVstring.Length - 3 ] == '_' ) + if ( meshUVstring.Length > 3 && meshUVstring[ meshUVstring.Length - 3 ] == '_' ) { var member = "." + meshUVstring.Substring( meshUVstring.Length - 2 ); meshUVstring = meshUVstring.Substring( 0, meshUVstring.Length - 3 ) + member; } - return ShaderGenerationModule.ToCode( $"{target} = {meshUVstring};" ); + return ShaderGenerationModule.ToUnsortableCode( $"{target} = {meshUVstring};" ); } } } \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs b/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs index 4dbaae3..4292428 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVSource/UVSource.cs @@ -6,7 +6,7 @@ namespace Rokojori { [Tool] [GlobalClass] - public abstract partial class UVSource:Resource + public abstract partial class UVSource:ShaderGenerationModule { public abstract List GetUV( ShaderGenerationContext context, string target, int offsetIndex ); } diff --git a/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs b/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs index b0f9610..7dab995 100644 --- a/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs +++ b/Runtime/Shading/Generators/Spatial/UV/UVSource/VertexUVSource.cs @@ -14,6 +14,12 @@ namespace Rokojori [Export] public VertexSwizzleType dimensions; + [Export] + public bool useDimensionsOffset = false; + + [Export] + public VertexSwizzleType dimensionsOffset; + [Export] public string sizeCustomName; @@ -22,8 +28,8 @@ namespace Rokojori public override List GetUV( ShaderGenerationContext context, string target, int offsetIndex ) { - var size = sizeCustomName == null ? "vertexUVSourceSize" : sizeCustomName; - var center = centerCustomName == null ? "vertexUVSourceCenter" : centerCustomName; + var size = sizeCustomName == null || sizeCustomName == "" ? "vertexUVSourceSize" : sizeCustomName; + var center = centerCustomName == null || centerCustomName == "" ? "vertexUVSourceCenter" : centerCustomName; var suffix = offsetIndex == 0 ? "" : ( "_" + ( offsetIndex + 1 ) ); @@ -33,7 +39,7 @@ namespace Rokojori if ( ShaderPhase.Includes == context.phase ) { - return ShaderGenerationModule.IncludeUVLibrary(); + return ShaderGenerationModule.IncludeUVLibrary().Concat( IncludeTransformLibrary() ); } else if ( ShaderPhase.Variables == context.phase ) { @@ -54,6 +60,12 @@ namespace Rokojori } var member = ( dimensions + "" ).ToLower(); + var offset = " + vertex." + ( dimensionsOffset + "" ).ToLower(); + + if ( ! useDimensionsOffset ) + { + offset = ""; + } var vertex = "VERTEX"; if ( VertexTransformSpace.World == space ) @@ -71,7 +83,7 @@ namespace Rokojori {{ vec3 vertex = {vertex}; - {target} = mapUV( vertex.{member}, {size}, {center} ); + {target} = mapUV( vertex.{member}{offset}, {size}, {center} ); }} diff --git a/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs b/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs new file mode 100644 index 0000000..a044b8d --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs @@ -0,0 +1,35 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class MeshAttributVarying: SpatialVaryingSource + { + public enum MeshAttribute + { + COLOR, + CUSTOM0, + CUSTOM1, + CUSTOM2, + CUSTOM3, + INSTANCE_CUSTOM + } + + [Export] + public MeshAttribute meshAttribute; + + public override List GetVaryingSource( ShaderGenerationContext context, string varyingName ) + { + if ( ! context.isVertexPhase ) + { + return null; + } + + return ToCode( $"{varyingName} = {meshAttribute + ""};\n"); + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs.uid b/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs.uid new file mode 100644 index 0000000..88598ec --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/MeshAttributVarying.cs.uid @@ -0,0 +1 @@ +uid://c0rs65kix6rdu diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs new file mode 100644 index 0000000..7db8c02 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs @@ -0,0 +1,14 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class SpatialVaryingSource:ShaderGenerationModule + { + public abstract List GetVaryingSource( ShaderGenerationContext context, string varyingName ); + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs.uid b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs.uid new file mode 100644 index 0000000..80de34d --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVariyngSource.cs.uid @@ -0,0 +1 @@ +uid://bug6wudm7ptdl diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs new file mode 100644 index 0000000..39ef919 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs @@ -0,0 +1,40 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class SpatialVarying:ShaderGenerationModule + { + + [Export] + public SpatialVaryingVariable[] variables = []; + + public override List GetVariants( ShaderGenerationContext context ) + { + var list = new List(); + variables.ForEach( + ( v )=> + { + var vCode = v.GetVariants( context ); + + if ( vCode == null ) + { + return; + } + + list = ShaderVariant.CombineVariants( list, vCode ); + + } + ); + + return list; + + } + + + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs.uid b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs.uid new file mode 100644 index 0000000..7414a95 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVarying.cs.uid @@ -0,0 +1 @@ +uid://7bnmdhvno7ua diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs new file mode 100644 index 0000000..8bc2762 --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs @@ -0,0 +1,34 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class SpatialVaryingVariable:ShaderGenerationModule + { + [Export] + public string variableName; + + [Export] + public SpatialVaryingSource variableSource; + + public override List GetVariants( ShaderGenerationContext context ) + { + var list = new List(); + + if ( context.isVariablesPhase ) + { + list.Add( ToCode( $"varying vec4 {variableName};" ) ); + } + else if ( context.isVertexPhase ) + { + list.Add( variableSource.GetVaryingSource( context, variableName ) ); + } + + + return ToVariants( list ); + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs.uid b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs.uid new file mode 100644 index 0000000..d1a064c --- /dev/null +++ b/Runtime/Shading/Generators/Spatial/Varyings/SpatialVaryingVariable.cs.uid @@ -0,0 +1 @@ +uid://c1umekk1e0pb8 diff --git a/Runtime/Shading/Library/Transform.gdshaderinc b/Runtime/Shading/Library/Transform.gdshaderinc index ffdfdae..74a1dbe 100644 --- a/Runtime/Shading/Library/Transform.gdshaderinc +++ b/Runtime/Shading/Library/Transform.gdshaderinc @@ -82,6 +82,18 @@ vec3 viewToLocal( vec3 view, mat4 _INV_VIEW_MATRIX, mat4 _MODEL_MATRIX ) return worldToLocal( world, _MODEL_MATRIX ); } +vec3 viewToLocal( vec3 view, mat4 _MODELVIEW_MATRIX ) +{ + mat4 inversedMatrix = inverse( _MODELVIEW_MATRIX ); + return applyMatrix( view, inversedMatrix ); +} + +vec3 viewToLocalDirection( vec3 viewDirection, mat4 _MODELVIEW_MATRIX ) +{ + mat4 inversedMatrix = inverse( _MODELVIEW_MATRIX ); + return applyMatrixWithoutTranslation( viewDirection, inversedMatrix ); +} + vec3 viewToLocalDirection( vec3 view, mat4 _INV_VIEW_MATRIX, mat4 _MODEL_MATRIX ) { vec3 world = viewToWorldDirection( view, _INV_VIEW_MATRIX ); @@ -504,6 +516,16 @@ mat4 eulerRotation( vec3 eulerRadians ) return rotationX_m4( eulerRadians.x ) * rotationY_m4( eulerRadians.y ) * rotationZ_m4( eulerRadians.z ); } +vec3 rotateEuler( vec3 position, vec3 euler ) +{ + return applyMatrix( position, eulerRotation( euler ) ); +} + +vec3 rotateEulerDegrees( vec3 position, vec3 euler ) +{ + return rotateEuler( position, euler * PI/180.0 ); +} + mat3 quaternionToRotationMatrix( vec4 q ) { float x = q.x; diff --git a/Runtime/Shading/Library/UV.gdshaderinc b/Runtime/Shading/Library/UV.gdshaderinc index 68db790..39c2690 100644 --- a/Runtime/Shading/Library/UV.gdshaderinc +++ b/Runtime/Shading/Library/UV.gdshaderinc @@ -3,7 +3,7 @@ vec2 mapUV( vec2 position, vec2 size, vec2 center ) { vec2 offset = center - size/2.0; - vec2 uv = ( position - offset ) / mapSize; + vec2 uv = ( position - offset ) / size; return uv; } \ No newline at end of file diff --git a/Runtime/Shading/Properties/Properties/FloatProperty.cs b/Runtime/Shading/Properties/Properties/FloatProperty.cs index 98d2b19..8ecbfb3 100644 --- a/Runtime/Shading/Properties/Properties/FloatProperty.cs +++ b/Runtime/Shading/Properties/Properties/FloatProperty.cs @@ -11,6 +11,8 @@ namespace Rokojori [Export] public FloatPropertyName propertyName; + public string name => propertyName.propertyName; + [Export] public float value; diff --git a/Runtime/Shading/ShaderTransformSpace.cs b/Runtime/Shading/ShaderTransformSpace.cs new file mode 100644 index 0000000..c0df798 --- /dev/null +++ b/Runtime/Shading/ShaderTransformSpace.cs @@ -0,0 +1,124 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + public enum ShaderTransformSpace + { + Local, + World, + View + } + + public enum ShaderStage + { + Vertex, + Fragment + } + + public static class ShaderTransformSpaceUtility + { + public static string Convert( + ShaderTransformSpace fromSpace, + ShaderTransformSpace toSpace, + bool isDirection, + ShaderStage shaderStage, + string varName + ) + { + if ( ShaderTransformSpace.Local == fromSpace ) + { + return ConvertFromLocal( toSpace, isDirection, shaderStage, varName ); + } + + if ( ShaderTransformSpace.World == fromSpace ) + { + return ConvertFromWorld( toSpace, isDirection, varName ); + } + + if ( ShaderTransformSpace.View == fromSpace ) + { + return ConvertFromView( toSpace, isDirection, shaderStage, varName ); + } + + return null; + } + + public static string FromViewPoint( ShaderTransformSpace toSpace, string varName = "VERTEX" ) + { + return ConvertFromView( toSpace, false, ShaderStage.Fragment, varName ); + } + + public static string FromPoint( ShaderTransformSpace fromSpace, ShaderTransformSpace toSpace, string varName = "VERTEX" ) + { + return Convert( fromSpace, toSpace, false, ShaderStage.Fragment, varName ); + } + + public static string FromViewDirection( ShaderTransformSpace toSpace, string varName = "VERTEX" ) + { + return ConvertFromView( toSpace, false, ShaderStage.Fragment, varName ); + } + + public static string ConvertFromLocal( ShaderTransformSpace toSpace, bool isDirection, + ShaderStage shaderStage, string varName ) + { + if ( ShaderTransformSpace.Local == toSpace ) + { + return varName; + } + + var target = ShaderTransformSpace.World == toSpace ? "World" : "View"; + var matrix = ShaderTransformSpace.World == toSpace ? "MODEL_MATRIX" : "MODELVIEW_MATRIX"; + + if ( ShaderStage.Fragment == shaderStage ) + { + matrix = ShaderTransformSpace.World == toSpace ? "MODEL_MATRIX" : "VIEW_MATRIX * MODEL_MATRIX"; + } + + var direction = isDirection ? "Direction" : ""; + + + return $"localTo{target}{direction}( {varName}, {matrix} )"; + } + + public static string ConvertFromWorld( ShaderTransformSpace toSpace, bool isDirection, string varName ) + { + if ( ShaderTransformSpace.World == toSpace ) + { + return varName; + } + + var target = ShaderTransformSpace.Local == toSpace ? "Local" : "View"; + var matrix = ShaderTransformSpace.Local == toSpace ? "MODEL_MATRIX" : "VIEW_MATRIX"; + var direction = isDirection ? "Direction" : ""; + + + return $"worldTo{target}{direction}( {varName}, {matrix} )"; + } + + + + public static string ConvertFromView( ShaderTransformSpace toSpace, bool isDirection, + ShaderStage shaderStage, string varName ) + { + if ( ShaderTransformSpace.View == toSpace ) + { + return varName; + } + + var target = ShaderTransformSpace.Local == toSpace ? "Local" : "World"; + var matrix = ShaderTransformSpace.Local == toSpace ? "MODELVIEW_MATRIX " : "INV_VIEW_MATRIX"; + + if ( ShaderStage.Fragment == shaderStage ) + { + matrix = ShaderTransformSpace.Local == toSpace ? "INV_VIEW_MATRIX, MODEL_MATRIX" : "INV_VIEW_MATRIX"; + } + + var direction = isDirection ? "Direction" : ""; + + + return $"viewTo{target}{direction}( {varName}, {matrix} )"; + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/ShaderTransformSpace.cs.uid b/Runtime/Shading/ShaderTransformSpace.cs.uid new file mode 100644 index 0000000..e939b99 --- /dev/null +++ b/Runtime/Shading/ShaderTransformSpace.cs.uid @@ -0,0 +1 @@ +uid://clyrifx2dru6s diff --git a/Runtime/Shading/Tools/DebugCompositor/debug-compositor-font-table.svg.import b/Runtime/Shading/Tools/DebugCompositor/debug-compositor-font-table.svg.import index c89a132..3e01ddd 100644 --- a/Runtime/Shading/Tools/DebugCompositor/debug-compositor-font-table.svg.import +++ b/Runtime/Shading/Tools/DebugCompositor/debug-compositor-font-table.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/debug-compositor-font-table.svg-90d2dfaed765a compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false diff --git a/Runtime/Structures/Spatial/Grid2D.cs b/Runtime/Structures/Spatial/Grid2D.cs index bd2aac8..9e1a906 100644 --- a/Runtime/Structures/Spatial/Grid2D.cs +++ b/Runtime/Structures/Spatial/Grid2D.cs @@ -12,6 +12,7 @@ namespace Rokojori { float _gridX; float _gridY; + MapList _cells = new MapList(); Dictionary _objectsInCell = new Dictionary(); @@ -24,7 +25,7 @@ namespace Rokojori _getPosition = getPosition; } - public static Grid2D XZfromNode3D( float x, float z ) where N:MeshInstance3D + public static Grid2D XZfromNode3D( float x, float z ) where N:Node3D { return new Grid2D( x, z, t => Math2D.XZ( t.GlobalPosition ) ); } @@ -36,7 +37,7 @@ namespace Rokojori public float WorldToGridY( float y ) { - return y / _gridY; + return y / _gridY; } public int WorldToGridIDX( float x ) @@ -58,7 +59,7 @@ namespace Rokojori public Vector2 GridIDtoWorld( Vector2I id ) { - return new Vector2( id.X * _gridX, id.Y * _gridY ); + return new Vector2( id.X * _gridX, id.Y * _gridY ); } public bool Has( T obj ) @@ -66,6 +67,7 @@ namespace Rokojori return _objectsInCell.ContainsKey( obj ); } + public Vector2I? GetRegistratedCell( T t ) { if ( ! _objectsInCell.ContainsKey( t ) ) @@ -86,6 +88,29 @@ namespace Rokojori var cell = _objectsInCell[ obj ]; _objectsInCell.Remove( obj ); _cells.Remove( cell, obj ); + } + + public void UpdateAfterPositionChange( T obj ) + { + if ( ! Has( obj ) ) + { + Add( obj ); + return; + } + + var position = _getPosition( obj ); + var id = WorldToGridID( position ); + + var currentID = _objectsInCell[ obj ]; + + if ( currentID == id ) + { + return; + } + + _objectsInCell[ obj ] = id; + _cells.Remove( currentID, obj ); + _cells.Add( id, obj ); } @@ -156,5 +181,44 @@ namespace Rokojori } + public void Iterate( Box2 box, Action callback ) + { + var start = box.min; + var end = box.max; + + var minID = WorldToGridID( start ); + var maxID = WorldToGridID( end ) + Vector2I.One; + + for ( int i = minID.X; i < maxID.X; i++ ) + { + for ( int j = minID.Y; j < maxID.Y; j++ ) + { + var id = new Vector2I( i, j ); + + if ( ! _cells.ContainsKey( id ) ) + { + continue; + } + + var entries = _cells[ id ]; + + entries.ForEach( + ( e )=> + { + var p = _getPosition( e ); + + if ( ! box.ContainsPoint( p ) ) + { + return; + } + + callback( e ); + } + ); + } + } + + } + } } \ No newline at end of file diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTree.cs b/Runtime/Structures/Spatial/QuadTree/QuadTree.cs new file mode 100644 index 0000000..1012a36 --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTree.cs @@ -0,0 +1,310 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; +using System.Linq; + + + +namespace Rokojori +{ + public class QuadTree:QuadTreeNode + { + protected Func _getPosition; + protected Func,List> _combinePoints; + protected Func,List, float,List> _smoothPoints; + + protected Vector2 _min; + protected Vector2 _max; + protected float _rootCellSize; + + protected int _maxDepth = 64; + public int maxDepth => _maxDepth; + + public QuadTree( Func getPosition, Vector2 min, Vector2 max, float rootCellSize, int maxDepth ) + { + this._getPosition = getPosition; + this._min = min; + this._max = max; + this._rootCellSize = rootCellSize; + this._maxDepth = maxDepth; + + CreateRootCells(); + + } + + public QuadTree( Vector2 center, float rootCellSize, int maxDepth ) + { + this._min = center - Vector2.One * rootCellSize / 2f; + this._max = center + Vector2.One * rootCellSize / 2f; + this._rootCellSize = rootCellSize; + this._maxDepth = maxDepth; + + CreateRootCells(); + + } + + public void SetCombiner( Func,List> combinePoints ) + { + this._combinePoints = combinePoints; + } + + public void SetSmoother( Func,List,float,List> smoothPoints ) + { + this._smoothPoints = smoothPoints; + } + + + public List CombinePoints( List values ) + { + return _combinePoints( values ); + } + + public List SmoothPoints( List targetValues, List sourceSmoothing, float amount ) + { + return _smoothPoints( targetValues, sourceSmoothing, amount ); + } + + + + + List> _rootCells = new List>(); + public List> rootCells => _rootCells; + + public bool Insert( List data ) + { + var result = true; + + data.ForEach( + ( d )=> + { + result = result && Insert( d ); + } + ); + + return result; + } + + public List GetInsideBox( Box2 box, List list = null ) + { + list = list == null ? new List() : list; + + GetInsideBoxWithDuplicates( box, list ); + + var set = new HashSet( [ .. list ] ); + return set.ToList(); + } + + public List GetInsideBoxWithDuplicates( Box2 box, List list = null ) + { + list = list == null ? new List() : list; + var rootIndexMin = PositionToRootIndex( box.min ); + var rootIndexMax = PositionToRootIndex( box.max ); + + for ( int x = rootIndexMin.X; x <= rootIndexMax.X; x++ ) + { + for ( int y = rootIndexMin.Y; y <= rootIndexMax.Y; y++ ) + { + + var rootIndex = new Vector2I( x, y ); + var rootCell = GetRootCellByRootIndex( rootIndex ); + + rootCell.GetInsideBox( box, list ); + + } + } + + return list; + + } + + public bool Insert( T data ) + { + var rootCell = GetRootCell( _getPosition( data ) ); + + if ( rootCell == null ) + { + return false; + } + + if ( ! rootCell.box.ContainsPoint( GetPosition( data ) ) ) + { + RJLog.Log( "Box not containing point", rootCell.rootCellIndex ); + } + + return rootCell.Insert( data ); + } + + public void BoxInsert( T data, Box2 box ) + { + var rootIndexMin = PositionToRootIndex( box.min ); + var rootIndexMax = PositionToRootIndex( box.max ); + + for ( int x = rootIndexMin.X; x <= rootIndexMax.X; x++ ) + { + for ( int y = rootIndexMin.Y; y <= rootIndexMax.Y; y++ ) + { + + var rootIndex = new Vector2I( x, y ); + var rootCell = GetRootCellByRootIndex( rootIndex ); + + rootCell.BoxInsert( data, box ); + + } + } + } + + public int GetLevelForSize( float size ) + { + var level = 0; + var it = _rootCellSize; + + while ( it > size ) + { + level ++; + it /= 2f; + } + + return level; + } + + public float GetSizeForLevel( int level ) + { + var it = 0; + var size = _rootCellSize; + + while ( it < level ) + { + size /= 2f; + it ++; + } + + return size; + } + + public void CombineUntilSize( float size ) + { + CombineUntilLevel( GetLevelForSize( size ) ); + } + + + public void CombineUntilLevel( int minLevel, float smoothDown = 0.2f ) + { + var levelMap = GetLevelMap(); + var levels = levelMap.Keys.ToList(); + levels.Sort(); + var maxLevel = levels.Last(); + + for ( int i = maxLevel - 1; i > minLevel; i-- ) + { + levelMap[ i ].ForEach( + ( c )=> + { + c.Combine(); + } + ); + } + + if ( smoothDown > 0 ) + { + for ( int i = minLevel + 1; i < maxLevel - 1; i++ ) + { + levelMap[ i ].ForEach( + ( c )=> + { + c.SmoothDown( smoothDown ); + } + ); + } + } + } + + public MapList> GetLevelMap() + { + var walker = new QuadTreeWalker(); + + var levelMap = new MapList>(); + + walker.Iterate( + this, + ( n )=> + { + if ( n is QuadTree tree ) + { + return; + } + + var c = n as QuadTreeCell; + + levelMap.Add( c.depth, c ); + } + ); + + return levelMap; + } + + Vector2 _startOffset = Vector2.Zero; + Vector2I _rootCellDimensions = Vector2I.Zero; + + public Vector2I PositionToRootIndex( Vector2 position ) + { + position -= _startOffset; + + var index = ( position / ( Vector2.One * _rootCellSize ) ).FloorToInt(); + + return index; + } + + public Vector2 GetPosition( T data ) + { + return _getPosition( data ); + } + + public QuadTreeCell GetRootCell( Vector2 position ) + { + var rootIndex = PositionToRootIndex( position ); + return GetRootCellByRootIndex( rootIndex ); + } + + public QuadTreeCell GetRootCellByRootIndex( Vector2I rootCellIndex ) + { + var rootCellFlatIndex = MathX.MultiIndexToFlatIndex( rootCellIndex, _rootCellDimensions ); + + if ( rootCellFlatIndex < 0 || rootCellFlatIndex >= _rootCells.Count ) + { + return null; + } + + return _rootCells[ rootCellFlatIndex ]; + } + + + void CreateRootCells() + { + var rootCellSize3 = Vector2.One * _rootCellSize; + var start = _min.SnapFloored( rootCellSize3 ); + var end = _max.SnapCeiled( rootCellSize3 ); + + var num = ( ( end - start ) / rootCellSize3 ).RoundToInt(); + + _rootCellDimensions = num; + _startOffset = start; + + for ( int x = 0; x < num.X ; x ++ ) + { + for ( int y = 0; y < num.Y; y++ ) + { + var rootIndex = new Vector2I( x, y ); + var min = rootIndex * rootCellSize3 + start; + var max = min + rootCellSize3; + + var cell = QuadTreeCell.Create( this, min, max, _rootCells.Count ); + + _rootCells.Add( cell ); + + } + } + } + + } +} \ No newline at end of file diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTree.cs.uid b/Runtime/Structures/Spatial/QuadTree/QuadTree.cs.uid new file mode 100644 index 0000000..cb8ac81 --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTree.cs.uid @@ -0,0 +1 @@ +uid://ch2bxxjs7ixm0 diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs b/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs new file mode 100644 index 0000000..131e5e3 --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs @@ -0,0 +1,243 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; + + + +namespace Rokojori +{ + public class QuadTreeCell:QuadTreeNode + { + QuadTreeCell _parent; + public QuadTreeCell parent => _parent; + + QuadTree _tree; + public QuadTree tree => _tree; + + List> _cells; + public List> cells => _cells; + + + public int numCells => _cells == null ? 0 : cells.Count; + + List _values; + public List values => _values; + + int _depth; + public int depth => _depth; + + Vector2 _center; + public Vector2 center => _center; + + Vector2 _size; + public Vector2 size => _size; + + bool _isCombined = false; + public bool isCombined => _isCombined; + public bool canBeCombined => ! isLeaf && ! isCombined && numCells > 0; + + + public bool isRoot => _parent == null; + public bool isEmpty => _cells == null || _cells.Count == 0; + public bool isLeaf => _depth == tree.maxDepth; + + Box2 _box; + public Box2 box => _box; + + int _rootCellIndex = -1; + public int rootCellIndex => _rootCellIndex; + + + public void GetInsideBox( Box2 box, List list ) + { + if ( ! _box.Overlaps( box ) ) + { + return; + } + + if ( _values != null ) + { + list.AddRange( _values ); + } + + if ( _cells == null ) + { + return; + } + + _cells.ForEach( c => c.GetInsideBox( box, list ) ); + + } + + public static QuadTreeCell Create( QuadTree tree, Vector2 min, Vector2 max, int rootIndex ) + { + var cell = new QuadTreeCell(); + cell._tree = tree; + cell._center = (max + min ) / 2f; + cell._size = ( max - min ); + cell._depth = 0; + cell._box = Box2.Create( min, max ); + cell._rootCellIndex = rootIndex; + + return cell; + } + + public static QuadTreeCell Create( QuadTreeCell parent, int depth, Vector2 min, Vector2 max ) + { + var cell = new QuadTreeCell(); + cell._parent = parent; + cell._tree = parent.tree; + cell._center = (max + min ) / 2f; + cell._size = ( max - min ); + cell._depth = depth; + cell._box = Box2.Create( min, max ); + cell._rootCellIndex = parent.rootCellIndex; + + return cell; + } + + public Vector2 GetPointWithPolarUV( Vector2 polarUV ) + { + var halfSize = _size / 2f; + + return _center + halfSize * polarUV; + } + + public void BoxInsert( T data, Box2 box ) + { + if ( ! _box.Overlaps( box ) ) + { + return; + } + + if ( isLeaf ) + { + if ( _values == null ) + { + _values = new List(); + } + + values.Add( data ); + return; + } + + Nest(); + + cells.ForEach( c => c.BoxInsert( data, box ) ); + + return; + } + + + public bool Insert( T data ) + { + if ( isLeaf ) + { + if ( _values == null ) + { + _values = new List(); + } + + values.Add( data ); + return true; + } + + Nest(); + + var position = tree.GetPosition( data ); + + var cell = GetChildCellFor( position ); + + if ( cell == null ) + { + RJLog.Log( "No cell found in:", this.depth, this.center, ">> for: ", position ); + + return false; + } + + return cell.Insert( data ); + } + + public void SmoothDown( float amount ) + { + if ( isLeaf || cells == null ) + { + return; + } + + cells.ForEach( + ( c )=> + { + c._values = tree.SmoothPoints( c.values, values, amount ); + } + ); + + } + + public void Combine() + { + if ( isLeaf || isCombined ) + { + return; + } + + if ( numCells == 0 ) + { + _isCombined = true; + return; + } + + var cellPoints = new List(); + cells.ForEach( + c => + { + if ( c.values == null ) + { + return; + } + + cellPoints.AddRange( c.values ); + } + ); + + _values = tree.CombinePoints( cellPoints ); + _isCombined = true; + } + + public QuadTreeCell GetChildCellFor( Vector2 position ) + { + return _cells.Find( c => c.box.ContainsPoint( position ) ); + } + + + public void Nest() + { + if ( _cells != null && _cells.Count == 8 ) + { + return; + } + + _cells = new List>(); + + for ( int x = -1; x < 1; x ++ ) + { + var x0 = x; + var x1 = x + 1; + + for ( int y = -1; y < 1; y ++ ) + { + var y0 = y; + var y1 = y + 1; + + + var min = GetPointWithPolarUV( new Vector2( x0, y0 ) ); + var max = GetPointWithPolarUV( new Vector2( x1, y1 ) ); + + _cells.Add( Create( this, depth + 1, min, max ) ); + + } + } + } + } +} \ No newline at end of file diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs.uid b/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs.uid new file mode 100644 index 0000000..5583b18 --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeCell.cs.uid @@ -0,0 +1 @@ +uid://b6o3ugetoc2ge diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs b/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs new file mode 100644 index 0000000..aca2323 --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; + + + +namespace Rokojori +{ + public class QuadTreeNode + { + + } +} \ No newline at end of file diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs.uid b/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs.uid new file mode 100644 index 0000000..b44f902 --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeNode.cs.uid @@ -0,0 +1 @@ +uid://ct4x6xr0db1n2 diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs b/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs new file mode 100644 index 0000000..ac39dfa --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs @@ -0,0 +1,53 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; + + + +namespace Rokojori +{ + public class QuadTreeWalker:TreeWalker> + { + public override QuadTreeNode Parent( QuadTreeNode node ) + { + if ( node is QuadTree ) + { + return null; + } + + var cell = node as QuadTreeCell; + + return cell.isRoot ? cell.tree : cell.parent; + } + + public override int NumChildren( QuadTreeNode node ) + { + if ( node is QuadTree tree ) + { + return tree.rootCells.Count; + } + + var cell = node as QuadTreeCell; + + return cell.numCells; + } + + public override QuadTreeNode ChildAt( QuadTreeNode node, int index ) + { + if ( index < 0 || index >= NumChildren( node ) ) + { + return null; + } + + if ( node is QuadTree tree ) + { + return tree.rootCells[ index ]; + } + + var cell = node as QuadTreeCell; + + return cell.cells[ index ]; + } + } +} \ No newline at end of file diff --git a/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs.uid b/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs.uid new file mode 100644 index 0000000..8dee85e --- /dev/null +++ b/Runtime/Structures/Spatial/QuadTree/QuadTreeWalker.cs.uid @@ -0,0 +1 @@ +uid://cig8kxc0slwst diff --git a/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs b/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs index d90b42f..8d5dc1a 100644 --- a/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs +++ b/Runtime/Text/JSON/Serializers/BigIntegerSerializer.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Text; using System.Globalization; using System; -using System.Numerics; @@ -15,13 +14,13 @@ namespace Rokojori { public override List HandlingTypes() { - return new List(){ typeof( BigInteger ) }; + return new List(){ typeof( System.Numerics.BigInteger ) }; } public override JSONData Serialize( object value ) { - var bigInteger = (BigInteger) value; + var bigInteger = (System.Numerics.BigInteger) value; return new JSONValue( bigInteger.ToString( "R" ) ); } @@ -32,7 +31,7 @@ namespace Rokojori return; } - var bigInteger = BigInteger.Parse( data.stringValue ); + var bigInteger = System.Numerics.BigInteger.Parse( data.stringValue ); referenceRelation.AssignValue( bigInteger ); } diff --git a/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs b/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs index f18a663..762dadd 100644 --- a/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs +++ b/Runtime/Text/JSON/Serializers/JSONAlwaysProcessable.cs @@ -1,14 +1,6 @@ -using System.Collections; -using System.Collections.Generic; - -using System.Text; -using System; - -using System.Numerics; - namespace Rokojori { public class JSONAlwaysProcessable: System.Attribute diff --git a/Runtime/Text/JSON/Serializers/JSONDeserializer.cs b/Runtime/Text/JSON/Serializers/JSONDeserializer.cs index 2047b5c..4242ac9 100644 --- a/Runtime/Text/JSON/Serializers/JSONDeserializer.cs +++ b/Runtime/Text/JSON/Serializers/JSONDeserializer.cs @@ -62,6 +62,11 @@ namespace Rokojori void DeserializeMemberField( JSONData data, object parent, string name ) { + if ( "__class__" == name ) + { + return; + } + if ( data.isNull ) { SetMemberValue( parent, name, null ); @@ -71,6 +76,8 @@ namespace Rokojori var type = parent.GetType(); var field = type.GetField( name ); + + if ( field == null ) { RJLog.Log( "Field not present: " + name ); diff --git a/Runtime/Text/JSON/Serializers/JSONSerializer.cs b/Runtime/Text/JSON/Serializers/JSONSerializer.cs index 4ea304b..a9b5687 100644 --- a/Runtime/Text/JSON/Serializers/JSONSerializer.cs +++ b/Runtime/Text/JSON/Serializers/JSONSerializer.cs @@ -1,14 +1,12 @@ using System.Collections; using System.Collections.Generic; -using System.Text; +using Godot; using System; -using System.Linq; -using System.Numerics; namespace Rokojori { @@ -18,7 +16,7 @@ namespace Rokojori HashSet processedObjects = new HashSet(); HashSet alwaysReprocessTypes = new HashSet() { - typeof( DateTime ), typeof( BigInteger ) + typeof( DateTime ) }; public JSONSerializer ( JSONSerializationSettings settings = null ) @@ -200,8 +198,11 @@ namespace Rokojori bool IsProcessableObject( object value ) { if ( - value is int intValue || - value is long longValue + value is int || + value is long || + value is Vector2 || + value is Vector3 || + value is Vector4 ) { return true; @@ -219,7 +220,7 @@ namespace Rokojori if ( processedObjects.Contains( value ) ) { - RJLog.Error( "Cycle detected: " + value, value.GetType() ); + RJLog.Error( "Cycle detected: " + value, value.GetType(), value is Vector2 ); var interfaces = typeof( object ).GetInterfaces(); for ( int i = 0; i < interfaces.Length; i++ ) @@ -227,8 +228,6 @@ namespace Rokojori RJLog.Error( "Interfaces[" + i + "]" + interfaces[ i ].Name ); } - - if ( settings.throwErrorOnCycles ) { throw new System.Exception( "Cycle detected: " + value ); diff --git a/Runtime/Text/Lexing/Lexer.cs b/Runtime/Text/Lexing/Lexer.cs index 6dfe88e..9b66233 100644 --- a/Runtime/Text/Lexing/Lexer.cs +++ b/Runtime/Text/Lexing/Lexer.cs @@ -6,6 +6,35 @@ namespace Rokojori { public class Lexer { + public static LexerEventSelector Selects( string m ) + { + var matchSelector = new SelectsMatch(); + matchSelector.match = m; + return matchSelector; + } + + public static LexerEventSelector SelectsCWord( string match = null) + { + return Selects( LexerMatcherLibrary.CwordMatcher, match ); + } + + public static LexerEventSelector Selects( LexerMatcher matcher, string match = null ) + { + if ( match != null ) + { + var matchTypeSelector = new SelectsMatchType(); + matchTypeSelector.match = match; + matchTypeSelector.type = matcher.type; + return matchTypeSelector; + } + + var matchSelector = new SelectsType(); + matchSelector.type = matcher.type; + return matchSelector; + } + + public static LexerEventSelector Ignore => SelectsAnyType.Ignore(); + public static readonly string Default_Mode = ""; Dictionary> _modes = new Dictionary>(); diff --git a/Runtime/Text/Lexing/LexerEvent.cs b/Runtime/Text/Lexing/LexerEvent.cs index 252292b..afe9b97 100644 --- a/Runtime/Text/Lexing/LexerEvent.cs +++ b/Runtime/Text/Lexing/LexerEvent.cs @@ -61,6 +61,9 @@ namespace Rokojori get { return this.length == -2; } } + public bool isErrorOrDone => isError || isDone; + + public void Set( string type, int offset, int length ) { this._type = type; diff --git a/Runtime/Text/Lexing/LexerList.cs b/Runtime/Text/Lexing/LexerList.cs index 543645a..d5ff0a7 100644 --- a/Runtime/Text/Lexing/LexerList.cs +++ b/Runtime/Text/Lexing/LexerList.cs @@ -95,6 +95,41 @@ namespace Rokojori { return LexerEvent.Find( _events, offset, evaluator, true ); } + + public LexerEvent.FindResult Find( int offset, List found, + List keepSearching = null, List errors = null ) + { + return Find( + offset, + ( le )=> + { + var errorItem = errors == null ? null : errors.Find( s => s.Selects( le ) ); + + if ( errorItem != null ) + { + return LexerEvent.FindResultType.Error; + } + + var foundItem = found.Find( s => s.Selects( le ) ); + + if ( foundItem != null ) + { + return LexerEvent.FindResultType.Found; + } + + + if ( keepSearching == null ) + { + return LexerEvent.FindResultType.KeepSearching; + } + + var keepSearchingItem = keepSearching.Find( s => s.Selects( le ) ); + + return keepSearchingItem == null ? LexerEvent.FindResultType.Error : LexerEvent.FindResultType.KeepSearching; + + } + ); + } public List> FindSequences( System.Func matcher ) { diff --git a/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs b/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs new file mode 100644 index 0000000..1135676 --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + + +namespace Rokojori +{ + public abstract class LexerEventSelector + { + public abstract bool Selects( LexerEvent e ); + } + +} \ No newline at end of file diff --git a/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs.uid b/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs.uid new file mode 100644 index 0000000..2bb082e --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/LexerEventSelector.cs.uid @@ -0,0 +1 @@ +uid://c61ago0jfwxc6 diff --git a/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs b/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs new file mode 100644 index 0000000..1b0c039 --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + + +namespace Rokojori +{ + public class SelectsAnyType:LexerEventSelector + { + public LexerMatcher[] types; + + public override bool Selects( LexerEvent e ) + { + return e.IsAnyOf( types ); + } + + public static SelectsAnyType Ignore() + { + var s = new SelectsAnyType(); + s.types = LexerMatcherLibrary.Ignore; + return s; + } + } + +} \ No newline at end of file diff --git a/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs.uid b/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs.uid new file mode 100644 index 0000000..3e58620 --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsAnyType.cs.uid @@ -0,0 +1 @@ +uid://c34jcs20glfok diff --git a/Runtime/Text/Lexing/Selectors/SelectsMatch.cs b/Runtime/Text/Lexing/Selectors/SelectsMatch.cs new file mode 100644 index 0000000..eb6813e --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsMatch.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + + +namespace Rokojori +{ + public class SelectsMatch:LexerEventSelector + { + public string match; + + public override bool Selects( LexerEvent e ) + { + return e.match == match; + } + } + +} \ No newline at end of file diff --git a/Runtime/Text/Lexing/Selectors/SelectsMatch.cs.uid b/Runtime/Text/Lexing/Selectors/SelectsMatch.cs.uid new file mode 100644 index 0000000..3a25bea --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsMatch.cs.uid @@ -0,0 +1 @@ +uid://cl8wue7w2bpj3 diff --git a/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs b/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs new file mode 100644 index 0000000..e13c8fe --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs @@ -0,0 +1,20 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + + +namespace Rokojori +{ + public class SelectsMatchType:LexerEventSelector + { + public string match; + public string type; + + public override bool Selects( LexerEvent e ) + { + return e.Is( type, match ); + } + } + +} \ No newline at end of file diff --git a/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs.uid b/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs.uid new file mode 100644 index 0000000..c8fd1b6 --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsMatchType.cs.uid @@ -0,0 +1 @@ +uid://ctcjhc2enhklx diff --git a/Runtime/Text/Lexing/Selectors/SelectsType.cs b/Runtime/Text/Lexing/Selectors/SelectsType.cs new file mode 100644 index 0000000..cbc5ade --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsType.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using System.Text.RegularExpressions; +using System.Text; + + +namespace Rokojori +{ + public class SelectsType:LexerEventSelector + { + public string type; + + public override bool Selects( LexerEvent e ) + { + return e.type == type; + } + } + +} \ No newline at end of file diff --git a/Runtime/Text/Lexing/Selectors/SelectsType.cs.uid b/Runtime/Text/Lexing/Selectors/SelectsType.cs.uid new file mode 100644 index 0000000..a197626 --- /dev/null +++ b/Runtime/Text/Lexing/Selectors/SelectsType.cs.uid @@ -0,0 +1 @@ +uid://cy4jqjmqeptxu diff --git a/Runtime/Time/Duration/Duration.cs b/Runtime/Time/Duration/Duration.cs index 736c43f..3fa6c20 100644 --- a/Runtime/Time/Duration/Duration.cs +++ b/Runtime/Time/Duration/Duration.cs @@ -10,7 +10,7 @@ namespace Rokojori { [Tool] [GlobalClass] - public partial class Duration:Resource + public abstract partial class Duration:Resource { [Export] public TimeLine timeLine; diff --git a/Runtime/Time/TimeLineRunner.cs b/Runtime/Time/TimeLineRunner.cs index bba6dba..3cdb7ca 100644 --- a/Runtime/Time/TimeLineRunner.cs +++ b/Runtime/Time/TimeLineRunner.cs @@ -37,6 +37,7 @@ namespace Rokojori { this.timeLine = timeLine; this.manager = manager; + this.speed = timeLine.startSpeed; playing = timeLine.autoStart; } diff --git a/Runtime/Time/TimeLines/GameTime.tres b/Runtime/Time/TimeLines/GameTime.tres index d47344c..634a120 100644 --- a/Runtime/Time/TimeLines/GameTime.tres +++ b/Runtime/Time/TimeLines/GameTime.tres @@ -1,11 +1,8 @@ [gd_resource type="Resource" script_class="TimeLine" load_steps=2 format=3 uid="uid://ch5nsa6yafs5l"] -[ext_resource type="Script" path="res://addons/rokojori_action_library/Runtime/Time/TimeLine.cs" id="1_lxe8k"] +[ext_resource type="Script" uid="uid://fqm54rn8fnnl" path="res://addons/rokojori_action_library/Runtime/Time/TimeLine.cs" id="1_lxe8k"] [resource] script = ExtResource("1_lxe8k") -isLooping = false -loopStart = 0.0 loopEnd = 0.0 -startSpeed = 0.0 -autoStart = true +startSpeed = 0.5 diff --git a/Runtime/Tools/Arrays.cs b/Runtime/Tools/Arrays.cs index ea325dd..1243641 100644 --- a/Runtime/Tools/Arrays.cs +++ b/Runtime/Tools/Arrays.cs @@ -118,9 +118,21 @@ namespace Rokojori public static T[] Add( this T[] values, T other ) { return AddEntry( values, other ); + } + + public static T[] Remove( this T[] values, T value ) + { + var index = values.IndexOf( value ); + + if ( index == -1 ) + { + return values; + } + + return values.RemoveIndex( index ); } - public static T[] RemoveIndex( T[] values, int index ) + public static T[] RemoveIndex( this T[] values, int index ) { if ( index <= -1 || index >= values.Length ) { diff --git a/Runtime/UI/UI-Settings-Default.tres b/Runtime/UI/UI-Settings-Default.tres index 1052cbc..14ea497 100644 --- a/Runtime/UI/UI-Settings-Default.tres +++ b/Runtime/UI/UI-Settings-Default.tres @@ -1,6 +1,5 @@ -[gd_resource type="Resource" script_class="UISettings" load_steps=10 format=3 uid="uid://dp57o0ykhkqfj"] +[gd_resource type="Resource" script_class="UISettings" load_steps=9 format=3 uid="uid://dp57o0ykhkqfj"] -[ext_resource type="SystemFont" uid="uid://s1pi67tbxu24" path="res://3rdPerson/Inputs/Jost-Font.tres" id="1_0wska"] [ext_resource type="Script" uid="uid://cgdxalxhdbmjn" path="res://addons/rokojori_action_library/Runtime/UI/UISettings.cs" id="1_5a283"] [ext_resource type="Resource" uid="uid://b4iykcwesp1y6" path="res://addons/rokojori_action_library/Runtime/Time/TimeLines/UITime.tres" id="1_6vky0"] [ext_resource type="Resource" uid="uid://bhy8b3gopkq4m" path="res://addons/rokojori_action_library/Runtime/UI/ShaderProperties/Vector2/Size.tres" id="2_cdd3u"] @@ -10,7 +9,7 @@ [sub_resource type="Resource" id="Resource_wm644"] script = ExtResource("3_xon8j") -value = 1.0 +value = 0.5 unit = "vw" metadata/_custom_type_script = "uid://cnkyynboxg1qg" @@ -23,7 +22,6 @@ metadata/_custom_type_script = "uid://cebfjne1ewhnm" script = ExtResource("1_5a283") inputIconsLibrary = ExtResource("4_v6r6i") fontSize = SubResource("Resource_wm644") -defaultFont = ExtResource("1_0wska") sizePropertyName = ExtResource("2_cdd3u") textureSizePropertyName = SubResource("Resource_6vky0") defaultTimeline = ExtResource("1_6vky0") diff --git a/Runtime/XML/SVG/Arc-Test.svg.import b/Runtime/XML/SVG/Arc-Test.svg.import index e566e91..95f5fee 100644 --- a/Runtime/XML/SVG/Arc-Test.svg.import +++ b/Runtime/XML/SVG/Arc-Test.svg.import @@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Arc-Test.svg-e4176aa927bd6cb6b7e8759e912fa4a8 compress/mode=0 compress/high_quality=false compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 @@ -25,6 +27,10 @@ mipmaps/generate=false mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 process/fix_alpha_border=true process/premult_alpha=false process/normal_map_invert_y=false