From 537926b0502e9c321f68a709c404c30de5a5d86c Mon Sep 17 00:00:00 2001 From: Josef Date: Fri, 6 Feb 2026 09:59:59 +0100 Subject: [PATCH] v0.5 --- Icons/FlareLayer.svg | 341 ++++++++ Icons/FlareLayer.svg.import | 43 + Icons/FlarePreset.svg | 341 ++++++++ Icons/FlarePreset.svg.import | 43 + Icons/FlareVFX.svg | 341 ++++++++ Icons/FlareVFX.svg.import | 43 + Runtime/Actions/Node3D/SetScreenTransform.cs | 56 ++ .../Actions/Node3D/SetScreenTransform.cs.uid | 1 + Runtime/Actions/UI/SetLabelText.cs | 22 + Runtime/Actions/UI/SetLabelText.cs.uid | 1 + Runtime/Colors/ColorX.cs | 16 + Runtime/Colors/HSLColor.cs | 43 +- Runtime/Files/FilePath.cs | 13 +- Runtime/Files/FilesSync.cs | 5 + Runtime/Godot/ResourceRunner.cs | 12 + Runtime/Godot/ResourceRunner.cs.uid | 1 + Runtime/Paths.cs | 16 + Runtime/Procedural/ExtendedMesh.cs | 14 + Runtime/Procedural/ExtendedMesh.cs.uid | 1 + .../Mesh/Generator/MeshGenerator.cs | 26 + .../Mesh/Generator/MeshGenerator.cs.uid | 1 + .../Mesh/Generator/MeshGeneratorType.cs | 91 +++ .../Mesh/Generator/MeshGeneratorType.cs.uid | 1 + .../Generator/UnitBillboardQuadsGenerator.cs | 27 + .../UnitBillboardQuadsGenerator.cs.uid | 1 + Runtime/Procedural/Mesh/MeshGeometry.cs | 2 +- .../Glow/Green Cinematic Flares.tres | 10 +- .../Glow/Rainbow Star Glow.tres | 22 +- .../Glow/Yellow Cinematic Bloom.tres | 20 +- .../CompositorVFXPresets/Screen/Sketch.tres | 20 +- Runtime/Shading/Library/Colors.gdshaderinc | 10 +- Runtime/Shading/Library/Noise.gdshaderinc | 214 ++--- .../BaseFlare/BaseFlare-Variables.gdshaderinc | 100 +++ .../BaseFlare-Variables.gdshaderinc.uid | 1 + .../BaseFlare-VertexFragment.gdshaderinc | 250 ++++++ .../BaseFlare-VertexFragment.gdshaderinc.uid | 1 + .../Flares/BaseFlare/BaseFlareMaterial.cs | 175 ++++ .../Flares/BaseFlare/BaseFlareMaterial.cs.uid | 1 + .../EllipseType/EllipseTypeFlare.gdshaderinc | 119 +++ .../EllipseTypeFlare.gdshaderinc.uid | 1 + .../Variants/EllipseTypeFlareAdd.gdshader | 4 + .../Variants/EllipseTypeFlareAdd.gdshader.uid | 1 + .../Variants/EllipseTypeFlareAddMaterial.cs | 159 ++++ .../EllipseTypeFlareAddMaterial.cs.uid | 1 + .../Variants/EllipseTypeFlareMix.gdshader | 4 + .../Variants/EllipseTypeFlareMix.gdshader.uid | 1 + .../Variants/EllipseTypeFlareMixMaterial.cs | 159 ++++ .../EllipseTypeFlareMixMaterial.cs.uid | 1 + .../EllipseTypeFlareMultiply.gdshader | 4 + .../EllipseTypeFlareMultiply.gdshader.uid | 1 + .../EllipseTypeFlareMultiplyMaterial.cs | 159 ++++ .../EllipseTypeFlareMultiplyMaterial.cs.uid | 1 + .../EllipseTypeFlareSubtract.gdshader | 4 + .../EllipseTypeFlareSubtract.gdshader.uid | 1 + .../EllipseTypeFlareSubtractMaterial.cs | 159 ++++ .../EllipseTypeFlareSubtractMaterial.cs.uid | 1 + ...xMaterial.cs => FlareSuperBaseMaterial.cs} | 62 +- .../Flares/FlareSuperBaseMaterial.cs.uid | 1 + .../Shading/Shaders/Flares/Flares.gdshaderinc | 67 +- .../GlowFlare/GlowFlareAdd.gdshader.uid | 1 - .../Flares/GlowFlare/GlowFlareAddMaterial.cs | 102 --- .../GlowFlare/GlowFlareAddMaterial.cs.uid | 1 - .../GlowFlare/GlowFlareBase.gdshaderinc | 178 ---- .../GlowFlare/GlowFlareBase.gdshaderinc.uid | 1 - .../GlowFlare/GlowFlareMix.gdshader.uid | 1 - .../GlowFlare/GlowFlareMixMaterial.cs.uid | 1 - .../Flares/SDFType/SDFTypeFlare.gdshaderinc | 89 ++ .../SDFType/SDFTypeFlare.gdshaderinc.uid | 1 + .../Variants/SDFTypeFlareAdd.gdshader} | 2 +- .../Variants/SDFTypeFlareAdd.gdshader.uid | 1 + .../Variants/SDFTypeFlareAddMaterial.cs | 111 +++ .../Variants/SDFTypeFlareAddMaterial.cs.uid | 1 + .../Variants/SDFTypeFlareMix.gdshader} | 2 +- .../Variants/SDFTypeFlareMix.gdshader.uid | 1 + .../Variants/SDFTypeFlareMixMaterial.cs | 111 +++ .../Variants/SDFTypeFlareMixMaterial.cs.uid | 1 + .../Variants/SDFTypeFlareMultiply.gdshader | 4 + .../SDFTypeFlareMultiply.gdshader.uid | 1 + .../Variants/SDFTypeFlareMultiplyMaterial.cs | 111 +++ .../SDFTypeFlareMultiplyMaterial.cs.uid | 1 + .../Variants/SDFTypeFlareSubtract.gdshader | 4 + .../SDFTypeFlareSubtract.gdshader.uid | 1 + .../Variants/SDFTypeFlareSubtractMaterial.cs | 111 +++ .../SDFTypeFlareSubtractMaterial.cs.uid | 1 + .../ShapeFlare/ShapeFlareAdd.gdshader.uid | 1 - .../ShapeFlare/ShapeFlareAddMaterial.cs | 135 ---- .../ShapeFlare/ShapeFlareAddMaterial.cs.uid | 1 - .../ShapeFlare/ShapeFlareBase.gdshaderinc | 241 ------ .../ShapeFlare/ShapeFlareBase.gdshaderinc.uid | 1 - .../ShapeFlare/ShapeFlareMix.gdshader.uid | 1 - .../ShapeFlare/ShapeFlareMixMaterial.cs | 135 ---- .../ShapeFlare/ShapeFlareMixMaterial.cs.uid | 1 - .../Flares/StarType/StarTypeFlare.gdshaderinc | 180 +++++ .../StarType/StarTypeFlare.gdshaderinc.uid | 1 + .../Variants/StarTypeFlareAdd.gdshader} | 2 +- .../Variants/StarTypeFlareAdd.gdshader.uid | 1 + .../Variants/StarTypeFlareAddMaterial.cs | 168 ++++ .../Variants/StarTypeFlareAddMaterial.cs.uid | 1 + .../Variants/StarTypeFlareMix.gdshader} | 2 +- .../Variants/StarTypeFlareMix.gdshader.uid | 1 + .../Variants/StarTypeFlareMixMaterial.cs | 168 ++++ .../Variants/StarTypeFlareMixMaterial.cs.uid | 1 + .../Variants/StarTypeFlareMultiply.gdshader | 4 + .../StarTypeFlareMultiply.gdshader.uid | 1 + .../Variants/StarTypeFlareMultiplyMaterial.cs | 168 ++++ .../StarTypeFlareMultiplyMaterial.cs.uid | 1 + .../Variants/StarTypeFlareSubtract.gdshader | 4 + .../StarTypeFlareSubtract.gdshader.uid | 1 + .../Variants/StarTypeFlareSubtractMaterial.cs | 168 ++++ .../StarTypeFlareSubtractMaterial.cs.uid | 1 + .../TextureType/TextureTypeFlare.gdshaderinc | 56 ++ .../TextureTypeFlare.gdshaderinc.uid | 1 + .../Variants/TextureTypeFlareAdd.gdshader | 4 + .../Variants/TextureTypeFlareAdd.gdshader.uid | 1 + .../Variants/TextureTypeFlareAddMaterial.cs | 99 +++ .../TextureTypeFlareAddMaterial.cs.uid | 1 + .../Variants/TextureTypeFlareMix.gdshader | 4 + .../Variants/TextureTypeFlareMix.gdshader.uid | 1 + .../Variants/TextureTypeFlareMixMaterial.cs | 99 +++ .../TextureTypeFlareMixMaterial.cs.uid | 1 + .../TextureTypeFlareMultiply.gdshader | 4 + .../TextureTypeFlareMultiply.gdshader.uid | 1 + .../TextureTypeFlareMultiplyMaterial.cs | 99 +++ .../TextureTypeFlareMultiplyMaterial.cs.uid | 1 + .../TextureTypeFlareSubtract.gdshader | 4 + .../TextureTypeFlareSubtract.gdshader.uid | 1 + .../TextureTypeFlareSubtractMaterial.cs | 99 +++ .../TextureTypeFlareSubtractMaterial.cs.uid | 1 + Runtime/Shading/Shaders/UniformMember.cs | 15 + .../CSShaderClassGenerator.cs | 187 ++++- .../CSShaderClassTemplate.txt | 8 +- .../CSShaderClassGenerator/CSShaderVariant.cs | 47 ++ .../CSShaderVariant.cs.uid | 1 + .../CSShaderReplacementChange.cs | 33 + .../CSShaderReplacementChange.cs.uid | 1 + .../VariantChanges/CSShaderVariantChange.cs | 13 + .../CSShaderVariantChange.cs.uid | 1 + Runtime/Tools/Arrays.cs | 21 +- Runtime/Tools/Lists.cs | 1 + .../FlareVFX/FlareBlendMode/FlareBlendMode.cs | 20 + .../FlareBlendMode/FlareBlendMode.cs.uid | 1 + .../DirectionalFlareChromaticAberation.cs | 22 + .../DirectionalFlareChromaticAberation.cs.uid | 1 + .../FlareChromaticAberation.cs | 55 ++ .../FlareChromaticAberation.cs.uid | 1 + .../OrientatedFlareChromaticAberation.cs | 26 + .../OrientatedFlareChromaticAberation.cs.uid | 1 + .../FlareVFX/FlareFading/EdgeFlareFading.cs | 27 + .../FlareFading/EdgeFlareFading.cs.uid | 1 + .../VFX/FlareVFX/FlareFading/FlareFading.cs | 12 + .../FlareVFX/FlareFading/FlareFading.cs.uid | 1 + .../FlareFading/ParametricFlareFading.cs | 33 + .../FlareFading/ParametricFlareFading.cs.uid | 1 + .../FlareFading/TextureFlareFading.cs | 50 ++ .../FlareFading/TextureFlareFading.cs.uid | 1 + Runtime/VFX/FlareVFX/FlareLayer.cs | 367 +++++++++ Runtime/VFX/FlareVFX/FlareLayer.cs.uid | 1 + .../FlareOcclusion/FadingFlareOcclusion.cs | 28 + .../FadingFlareOcclusion.cs.uid | 1 + .../FlareVFX/FlareOcclusion/FlareOcclusion.cs | 11 + .../FlareOcclusion/FlareOcclusion.cs.uid | 1 + Runtime/VFX/FlareVFX/FlarePreset.cs | 57 ++ Runtime/VFX/FlareVFX/FlarePreset.cs.uid | 1 + .../FlareStencilMode/FlareStencilMode.cs | 28 + .../FlareStencilMode/FlareStencilMode.cs.uid | 1 + .../FlareVFX/FlareType/EllipseFlareType.cs | 206 +++++ .../FlareType/EllipseFlareType.cs.uid | 1 + Runtime/VFX/FlareVFX/FlareType/FlareType.cs | 14 + .../VFX/FlareVFX/FlareType/FlareType.cs.uid | 1 + .../FlareVFX/FlareType/SDFShapeFlareType.cs | 200 +++++ .../FlareType/SDFShapeFlareType.cs.uid | 1 + .../VFX/FlareVFX/FlareType/StarFlareType.cs | 185 +++++ .../FlareVFX/FlareType/StarFlareType.cs.uid | 1 + .../FlareVFX/FlareType/TextureFlareType.cs | 104 +++ .../FlareType/TextureFlareType.cs.uid | 1 + Runtime/VFX/FlareVFX/FlareVFX.cs | 133 +-- Runtime/VFX/FlareVFX/FlareVFXPreset.cs | 17 - Runtime/VFX/FlareVFX/FlareVFXPreset.cs.uid | 1 - .../FlareVFXPresets/Blue Anamorphic.tres | 756 +++++++++++++++++ .../FlareVFXPresets/Green Streaky X.tres | 588 ++++++++++++++ .../FlareVFXPresets/Red Orange Classic.tres | 762 ++++++++++++++++++ .../FlareVFXPresets/Yellow Pink Magic.tres | 484 +++++++++++ Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs | 25 - .../VFX/FlareVFX/Layers/FlareVFXLayer.cs.uid | 1 - .../VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs | 98 --- .../FlareVFX/Layers/GlowFlareVFXLayer.cs.uid | 1 - .../VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs | 207 ----- .../FlareVFX/Layers/ShapeFlareVFXLayer.cs.uid | 1 - 188 files changed, 9394 insertions(+), 1412 deletions(-) create mode 100644 Icons/FlareLayer.svg create mode 100644 Icons/FlareLayer.svg.import create mode 100644 Icons/FlarePreset.svg create mode 100644 Icons/FlarePreset.svg.import create mode 100644 Icons/FlareVFX.svg create mode 100644 Icons/FlareVFX.svg.import create mode 100644 Runtime/Actions/Node3D/SetScreenTransform.cs create mode 100644 Runtime/Actions/Node3D/SetScreenTransform.cs.uid create mode 100644 Runtime/Actions/UI/SetLabelText.cs create mode 100644 Runtime/Actions/UI/SetLabelText.cs.uid create mode 100644 Runtime/Godot/ResourceRunner.cs create mode 100644 Runtime/Godot/ResourceRunner.cs.uid create mode 100644 Runtime/Procedural/ExtendedMesh.cs create mode 100644 Runtime/Procedural/ExtendedMesh.cs.uid create mode 100644 Runtime/Procedural/Mesh/Generator/MeshGenerator.cs create mode 100644 Runtime/Procedural/Mesh/Generator/MeshGenerator.cs.uid create mode 100644 Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs create mode 100644 Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs.uid create mode 100644 Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs create mode 100644 Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc create mode 100644 Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc.uid create mode 100644 Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc create mode 100644 Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc.uid create mode 100644 Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs.uid rename Runtime/Shading/Shaders/Flares/{GlowFlare/GlowFlareMixMaterial.cs => FlareSuperBaseMaterial.cs} (64%) create mode 100644 Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs.uid delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader.uid delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs.uid delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc.uid delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader.uid delete mode 100644 Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc.uid rename Runtime/Shading/Shaders/Flares/{GlowFlare/GlowFlareAdd.gdshader => SDFType/Variants/SDFTypeFlareAdd.gdshader} (77%) create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs.uid rename Runtime/Shading/Shaders/Flares/{GlowFlare/GlowFlareMix.gdshader => SDFType/Variants/SDFTypeFlareMix.gdshader} (77%) create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs.uid delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader.uid delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs.uid delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc.uid delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader.uid delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs delete mode 100644 Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc create mode 100644 Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc.uid rename Runtime/Shading/Shaders/Flares/{ShapeFlare/ShapeFlareAdd.gdshader => StarType/Variants/StarTypeFlareAdd.gdshader} (76%) create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs.uid rename Runtime/Shading/Shaders/Flares/{ShapeFlare/ShapeFlareMix.gdshader => StarType/Variants/StarTypeFlareMix.gdshader} (76%) create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader.uid create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs create mode 100644 Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs.uid create mode 100644 Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs create mode 100644 Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs.uid create mode 100644 Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs create mode 100644 Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs.uid create mode 100644 Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs create mode 100644 Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs create mode 100644 Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs create mode 100644 Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs create mode 100644 Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs create mode 100644 Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs create mode 100644 Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs create mode 100644 Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs create mode 100644 Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs create mode 100644 Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareLayer.cs create mode 100644 Runtime/VFX/FlareVFX/FlareLayer.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs create mode 100644 Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs create mode 100644 Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlarePreset.cs create mode 100644 Runtime/VFX/FlareVFX/FlarePreset.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs create mode 100644 Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs create mode 100644 Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareType/FlareType.cs create mode 100644 Runtime/VFX/FlareVFX/FlareType/FlareType.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs create mode 100644 Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs create mode 100644 Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs create mode 100644 Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs.uid delete mode 100644 Runtime/VFX/FlareVFX/FlareVFXPreset.cs delete mode 100644 Runtime/VFX/FlareVFX/FlareVFXPreset.cs.uid create mode 100644 Runtime/VFX/FlareVFX/FlareVFXPresets/Blue Anamorphic.tres create mode 100644 Runtime/VFX/FlareVFX/FlareVFXPresets/Green Streaky X.tres create mode 100644 Runtime/VFX/FlareVFX/FlareVFXPresets/Red Orange Classic.tres create mode 100644 Runtime/VFX/FlareVFX/FlareVFXPresets/Yellow Pink Magic.tres delete mode 100644 Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs delete mode 100644 Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs.uid delete mode 100644 Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs delete mode 100644 Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs.uid delete mode 100644 Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs delete mode 100644 Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs.uid diff --git a/Icons/FlareLayer.svg b/Icons/FlareLayer.svg new file mode 100644 index 0000000..fbd3232 --- /dev/null +++ b/Icons/FlareLayer.svg @@ -0,0 +1,341 @@ + + diff --git a/Icons/FlareLayer.svg.import b/Icons/FlareLayer.svg.import new file mode 100644 index 0000000..228a5e7 --- /dev/null +++ b/Icons/FlareLayer.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwi8fojg2liiy" +path="res://.godot/imported/FlareLayer.svg-e1353f58817cb61a716788afff27f399.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/rokojori_action_library/Icons/FlareLayer.svg" +dest_files=["res://.godot/imported/FlareLayer.svg-e1353f58817cb61a716788afff27f399.ctex"] + +[params] + +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 +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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Icons/FlarePreset.svg b/Icons/FlarePreset.svg new file mode 100644 index 0000000..820d1cd --- /dev/null +++ b/Icons/FlarePreset.svg @@ -0,0 +1,341 @@ + + diff --git a/Icons/FlarePreset.svg.import b/Icons/FlarePreset.svg.import new file mode 100644 index 0000000..f534d41 --- /dev/null +++ b/Icons/FlarePreset.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cnlcxdt2wtmkm" +path="res://.godot/imported/FlarePreset.svg-857e6afe476b69ed548435249c549c84.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/rokojori_action_library/Icons/FlarePreset.svg" +dest_files=["res://.godot/imported/FlarePreset.svg-857e6afe476b69ed548435249c549c84.ctex"] + +[params] + +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 +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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Icons/FlareVFX.svg b/Icons/FlareVFX.svg new file mode 100644 index 0000000..b844da0 --- /dev/null +++ b/Icons/FlareVFX.svg @@ -0,0 +1,341 @@ + + diff --git a/Icons/FlareVFX.svg.import b/Icons/FlareVFX.svg.import new file mode 100644 index 0000000..7377265 --- /dev/null +++ b/Icons/FlareVFX.svg.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b7u8spfui08e7" +path="res://.godot/imported/FlareVFX.svg-7c0691138c416c828300e95f7f8b3111.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://addons/rokojori_action_library/Icons/FlareVFX.svg" +dest_files=["res://.godot/imported/FlareVFX.svg-7c0691138c416c828300e95f7f8b3111.ctex"] + +[params] + +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 +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 +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/Runtime/Actions/Node3D/SetScreenTransform.cs b/Runtime/Actions/Node3D/SetScreenTransform.cs new file mode 100644 index 0000000..8d10e8e --- /dev/null +++ b/Runtime/Actions/Node3D/SetScreenTransform.cs @@ -0,0 +1,56 @@ + +using Godot; + + +namespace Rokojori +{ + [Tool][GlobalClass ] + public partial class SetScreenTransform : Action + { + [Export] + public Camera3D source; + + [Export] + public Node3D target; + + [Export] + public Vector3 screenPosition; + + + protected override void _OnTrigger() + { + var applyingSource = source; + + if ( Engine.IsEditorHint() ) + { + #if TOOLS + + applyingSource = EditorInterface.Singleton.GetEditorViewport3D().GetCamera3D(); + + #endif + } + + if ( source == null ) + { + return; + } + + target.GlobalPosition = NormalizedScreenToWorld( applyingSource, screenPosition.XY(), screenPosition.Z ); + target.SetGlobalQuaternion( applyingSource.GlobalQuaternion() ); + + } + + public static Vector3 NormalizedScreenToWorld( Camera3D camera, Vector2 normalizedPos, float depth ) + { + var viewPort = camera.GetViewport(); + var viewportSize = viewPort.GetVisibleRect().Size; + + var screenPixelPos = new Vector2( + normalizedPos.X * viewportSize.X, + normalizedPos.Y * viewportSize.Y + ); + + return camera.ProjectPosition(screenPixelPos, depth); + } + } +} \ No newline at end of file diff --git a/Runtime/Actions/Node3D/SetScreenTransform.cs.uid b/Runtime/Actions/Node3D/SetScreenTransform.cs.uid new file mode 100644 index 0000000..9f57859 --- /dev/null +++ b/Runtime/Actions/Node3D/SetScreenTransform.cs.uid @@ -0,0 +1 @@ +uid://cf5jsfq6agufc diff --git a/Runtime/Actions/UI/SetLabelText.cs b/Runtime/Actions/UI/SetLabelText.cs new file mode 100644 index 0000000..190b19a --- /dev/null +++ b/Runtime/Actions/UI/SetLabelText.cs @@ -0,0 +1,22 @@ + +using Godot; + + +namespace Rokojori +{ + [Tool] + [GlobalClass ] + public partial class SetLabelText : Action + { + [Export] + public Label3D label; + + [Export] + public string text; + + protected override void _OnTrigger() + { + label.Text = text; + } + } +} \ No newline at end of file diff --git a/Runtime/Actions/UI/SetLabelText.cs.uid b/Runtime/Actions/UI/SetLabelText.cs.uid new file mode 100644 index 0000000..d3dfd01 --- /dev/null +++ b/Runtime/Actions/UI/SetLabelText.cs.uid @@ -0,0 +1 @@ +uid://bvomnqpw05n5w diff --git a/Runtime/Colors/ColorX.cs b/Runtime/Colors/ColorX.cs index 513c99c..8e36a6e 100644 --- a/Runtime/Colors/ColorX.cs +++ b/Runtime/Colors/ColorX.cs @@ -5,6 +5,22 @@ namespace Rokojori { public static class ColorX { + public static float GetColorScale( this Color c ) + { + return Mathf.Max( 1f, Mathf.Max( c.R, Mathf.Max( c.G, c.B ) ) ); + } + + public static Color ScaleColor( this Color c, float scale ) + { + return new Color( c.R * scale, c.G * scale, c.B * scale, c.A ); + } + + public static HSLColor ToHSL( this Color c, float scale = 1f ) + { + return HSLColor.FromRGBA( c.ScaleColor( 1f / scale ) ); + } + + public static float r( this Vector4 rgba ) { return rgba.X; diff --git a/Runtime/Colors/HSLColor.cs b/Runtime/Colors/HSLColor.cs index 0fa9198..4f1ecce 100644 --- a/Runtime/Colors/HSLColor.cs +++ b/Runtime/Colors/HSLColor.cs @@ -174,6 +174,43 @@ namespace Rokojori return new HSLColor( h, s, l, a ); } + static float modPolarDegrees( float value ) + { + return MathX.Repeat( value + 180.0f, 360.0f ) - 180.0f; + } + + public static float hue360ToYB( float hue ) + { + return modPolarDegrees( hue - 240.0f ); + } + + public static float ybToHue360( float yb ) + { + return ( yb + 240.0f ) % 360.0f; + } + + public static float changeHue360( float hue, float change ) + { + float yb = hue360ToYB( hue ); + + float absYB = Mathf.Abs( yb ); + + absYB = Mathf.Clamp( absYB + change, 0.0f, 180.0f ); + + float realYB = Mathf.Sign( yb ) * absYB; + + return ybToHue360( realYB ); + } + + public static float ShiftTemparatureOfHue( float hue, float offset, float blendRadius = 60f ) + { + float distanceToYellow = Mathf.Min( 1.0f, Mathf.Abs( hue - 60.0f ) / blendRadius ); + float distanceToBlue = Mathf.Min( 1.0f, Mathf.Abs( hue - 240.0f ) / blendRadius ); + + return changeHue360( hue, offset * distanceToYellow * distanceToBlue ); + + } + public static Color Lerp( Color x, Color y, float t ) { var hx = new HSLColor( x ); @@ -185,7 +222,7 @@ namespace Rokojori } - public Color ToRGBA() + public Color ToRGBA( float scale = 1 ) { var r = 0f; var g = 0f; @@ -208,6 +245,10 @@ namespace Rokojori b = Value( m1, m2, h - 120f ); } + r *= scale; + g *= scale; + b *= scale; + return new Color( r, g, b, a ); } diff --git a/Runtime/Files/FilePath.cs b/Runtime/Files/FilePath.cs index 6846223..3ea41ed 100644 --- a/Runtime/Files/FilePath.cs +++ b/Runtime/Files/FilePath.cs @@ -304,6 +304,15 @@ namespace Rokojori public static string Normalize( string path, bool removeFirst = true, bool removeLast = true ) { + var protocollStart = path.IndexOf( "://" ); + var protocoll = ""; + + if ( protocollStart != -1 ) + { + protocoll = path.Substring( 0, protocollStart + 3 ); + path = path.Substring( protocollStart + 3 ); + } + path = Regex.Replace( path, @"\\", "/" ); path = Regex.Replace( path, @"/+", "/" ); @@ -316,10 +325,8 @@ namespace Rokojori { path = Regex.Replace( path, @"/$", "" ); } - - - return path; + return protocoll + path; } public static string Join( params string[] paths ) diff --git a/Runtime/Files/FilesSync.cs b/Runtime/Files/FilesSync.cs index 5d777ad..4239253 100644 --- a/Runtime/Files/FilesSync.cs +++ b/Runtime/Files/FilesSync.cs @@ -104,6 +104,11 @@ namespace Rokojori public static List GetFiles( string path, System.Func evaluator = null, bool recursive = false ) { + if ( ! Directory.Exists( path ) ) + { + return []; + } + var list = new List(); var files = Directory.GetFiles( path, "*", recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly ); diff --git a/Runtime/Godot/ResourceRunner.cs b/Runtime/Godot/ResourceRunner.cs new file mode 100644 index 0000000..b29764d --- /dev/null +++ b/Runtime/Godot/ResourceRunner.cs @@ -0,0 +1,12 @@ +using Godot; +using System.Text; +using System.Collections.Generic; + +namespace Rokojori +{ + public class ResourceRunner where R:Resource where P:Node + { + public D data; + + } +} \ No newline at end of file diff --git a/Runtime/Godot/ResourceRunner.cs.uid b/Runtime/Godot/ResourceRunner.cs.uid new file mode 100644 index 0000000..ae9fae9 --- /dev/null +++ b/Runtime/Godot/ResourceRunner.cs.uid @@ -0,0 +1 @@ +uid://b0iux3mchi43r diff --git a/Runtime/Paths.cs b/Runtime/Paths.cs index c367469..acb015d 100644 --- a/Runtime/Paths.cs +++ b/Runtime/Paths.cs @@ -12,5 +12,21 @@ namespace Rokojori { public static readonly string AddonLibraryPath = "res://addons/rokojori_action_library/"; public static readonly string RuntimePath = "res://addons/rokojori_action_library/Runtime/"; + + + public static string ProjectPath() + { + return ProjectSettings.GlobalizePath( "res://" ); + } + + public static string ToGlobal( string path ) + { + if ( path.StartsWith( "res://" ) ) + { + return path.Replace( "res://", ProjectPath() ); + } + + return path; + } } } \ No newline at end of file diff --git a/Runtime/Procedural/ExtendedMesh.cs b/Runtime/Procedural/ExtendedMesh.cs new file mode 100644 index 0000000..5880d9b --- /dev/null +++ b/Runtime/Procedural/ExtendedMesh.cs @@ -0,0 +1,14 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; +using System.Threading.Tasks; + +namespace Rokojori +{ + [GlobalClass,Tool] + public partial class ExtendedMesh:Mesh + { + + } +} \ No newline at end of file diff --git a/Runtime/Procedural/ExtendedMesh.cs.uid b/Runtime/Procedural/ExtendedMesh.cs.uid new file mode 100644 index 0000000..0bdc843 --- /dev/null +++ b/Runtime/Procedural/ExtendedMesh.cs.uid @@ -0,0 +1 @@ +uid://lf7pc0al3lb8 diff --git a/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs b/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs new file mode 100644 index 0000000..67e292d --- /dev/null +++ b/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs @@ -0,0 +1,26 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; + + + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class MeshGenerator:Node + { + [Export] + public MeshGeneratorType generator; + + [ExportToolButton( "Generate")] + public Callable generateButton => Callable.From( ()=>{ mesh = generator.Generate(); } ); + + [Export] + public ArrayMesh mesh; + + + + } +} \ No newline at end of file diff --git a/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs.uid b/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs.uid new file mode 100644 index 0000000..c8acbab --- /dev/null +++ b/Runtime/Procedural/Mesh/Generator/MeshGenerator.cs.uid @@ -0,0 +1 @@ +uid://csr18y8chfxwo diff --git a/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs b/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs new file mode 100644 index 0000000..bd694d4 --- /dev/null +++ b/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs @@ -0,0 +1,91 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; + + + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class MeshGeneratorType:Resource + { + [Export] + public bool cacheMeshes = true; + + public static readonly string cachePath = "res://.rokojori/cache/MeshGeneratorType"; + + public static string GetProjectCachePath( string cacheName ) + { + return FilePath.Join( cachePath, cacheName + ".tres" ); + } + + public static ArrayMesh FromCache( string cacheName ) + { + var path = GetProjectCachePath( cacheName ); + var globalPath = Paths.ToGlobal( path ); + + RJLog.Log( path, globalPath ); + + if ( ! FilesSync.FileExists( globalPath ) ) + { + return null; + } + + return GD.Load( path ); + } + + public static void ToCache( string cacheName, ArrayMesh arrayMesh ) + { + + var path = GetProjectCachePath( cacheName ); + var globalPath = Paths.ToGlobal( path ); + + RJLog.Log( path, globalPath ); + + FilesSync.EnsureParentDirectoryExists( globalPath ); + ResourceSaver.Save( arrayMesh, path, ResourceSaver.SaverFlags.Compress ); + } + + + + public ArrayMesh Generate() + { + var cachePath = GetCachePath(); + + if ( cachePath != null && Engine.IsEditorHint() ) + { + this.LogInfo( "Checking cache for:", cachePath ); + var cached = FromCache( cachePath ); + + if ( cached != null ) + { + this.LogInfo( "Found cache for:", cachePath, cached.SurfaceGetArrayLen( 0 ) ); + return cached; + } + + this.LogInfo( "Not cached:", cachePath ); + } + + var mg = _GenerateMeshGeometry(); + + var arrayMesh = mg.GenerateMesh(); + + if ( cachePath != null && Engine.IsEditorHint() ) + { + this.LogInfo( "To cache:", cachePath, arrayMesh.SurfaceGetArrayLen( 0 ) ); + + + ToCache( cachePath, arrayMesh ); + + return FromCache( cachePath ); + } + + return arrayMesh; + } + + protected abstract string GetCachePath(); + protected abstract MeshGeometry _GenerateMeshGeometry(); + } +} \ No newline at end of file diff --git a/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs.uid b/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs.uid new file mode 100644 index 0000000..d98edfc --- /dev/null +++ b/Runtime/Procedural/Mesh/Generator/MeshGeneratorType.cs.uid @@ -0,0 +1 @@ +uid://bv1dvb053gokl diff --git a/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs b/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs new file mode 100644 index 0000000..65164ca --- /dev/null +++ b/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs @@ -0,0 +1,27 @@ +using System.Collections; +using System.Collections.Generic; +using Godot; +using System; + + + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class UnitBillboardQuadsGenerator:MeshGeneratorType + { + [Export] + public int num = 1; + + protected override string GetCachePath() + { + return "UnitBillboardQuadsGenerator-" + num; + } + + protected override MeshGeometry _GenerateMeshGeometry() + { + return MeshGeometry.UnitBillboardQuads( num, 0f, 1f ); + } + } +} \ No newline at end of file diff --git a/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs.uid b/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs.uid new file mode 100644 index 0000000..3f41222 --- /dev/null +++ b/Runtime/Procedural/Mesh/Generator/UnitBillboardQuadsGenerator.cs.uid @@ -0,0 +1 @@ +uid://djb5k01vcut20 diff --git a/Runtime/Procedural/Mesh/MeshGeometry.cs b/Runtime/Procedural/Mesh/MeshGeometry.cs index 7b3d629..07e6ebd 100644 --- a/Runtime/Procedural/Mesh/MeshGeometry.cs +++ b/Runtime/Procedural/Mesh/MeshGeometry.cs @@ -863,7 +863,7 @@ namespace Rokojori for ( int i = 0; i < num; i++ ) { - var t = num == 1 ? 0 : i / ( num - 1f ); + var t = num <= 1 ? 0.5f : i / ( num - 1f ); var z = Mathf.Lerp( zMin, zMax, t ); var quad = BillboardQuad( 1f, z ); diff --git a/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Green Cinematic Flares.tres b/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Green Cinematic Flares.tres index 5633d4b..c46fdb2 100644 --- a/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Green Cinematic Flares.tres +++ b/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Green Cinematic Flares.tres @@ -63,7 +63,7 @@ height = 1 noise = SubResource("FastNoiseLite_gxlxg") seamless = true -[sub_resource type="CompositorEffect" id="CompositorEffect_mdsx3"] +[sub_resource type="CompositorEffect" id="CompositorEffect_fv6nb"] resource_local_to_scene = false resource_name = "" enabled = true @@ -115,7 +115,7 @@ height = 256 noise = SubResource("FastNoiseLite_w6tyf") seamless = true -[sub_resource type="CompositorEffect" id="CompositorEffect_wpvj8"] +[sub_resource type="CompositorEffect" id="CompositorEffect_faje8"] resource_local_to_scene = false resource_name = "" enabled = true @@ -155,7 +155,7 @@ metadata/_custom_type_script = "uid://dvvfvlutisecy" script = ExtResource("3_55j2s") owner = SubResource("Resource_i5utj") -[sub_resource type="CompositorEffect" id="CompositorEffect_ysmsc"] +[sub_resource type="CompositorEffect" id="CompositorEffect_55j2s"] resource_local_to_scene = false resource_name = "" enabled = true @@ -201,7 +201,7 @@ metadata/_custom_type_script = "uid://dvvfvlutisecy" script = ExtResource("3_55j2s") owner = SubResource("Resource_i5utj") -[sub_resource type="CompositorEffect" id="CompositorEffect_t5au6"] +[sub_resource type="CompositorEffect" id="CompositorEffect_rxqvv"] resource_local_to_scene = false resource_name = "" enabled = true @@ -234,5 +234,5 @@ metadata/_custom_type_script = "uid://6jkixa201wux" [resource] script = ExtResource("8_v2hqv") -effects = [SubResource("CompositorEffect_mdsx3"), SubResource("CompositorEffect_wpvj8"), SubResource("CompositorEffect_ysmsc"), SubResource("CompositorEffect_t5au6")] +effects = [SubResource("CompositorEffect_fv6nb"), SubResource("CompositorEffect_faje8"), SubResource("CompositorEffect_55j2s"), SubResource("CompositorEffect_rxqvv")] metadata/_custom_type_script = "uid://ckixweetchlo0" diff --git a/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Rainbow Star Glow.tres b/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Rainbow Star Glow.tres index 313fca8..636c1fc 100644 --- a/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Rainbow Star Glow.tres +++ b/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Rainbow Star Glow.tres @@ -47,7 +47,7 @@ fill_from = Vector2(0.5, 0.50427353) [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_g6idi"] load_path = "res://.godot/imported/star-glow.png-61f0458024aeba1668f3516b3db84782.ctex" -[sub_resource type="CompositorEffect" id="CompositorEffect_ixqtu"] +[sub_resource type="CompositorEffect" id="CompositorEffect_e74ec"] resource_local_to_scene = false resource_name = "" enabled = true @@ -55,7 +55,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("4_chktd") -opacity = 0.5578947 +opacity = 0.0 blendMode = 1 overlayTexture = SubResource("CompressedTexture2D_g6idi") overlayTint = Color(1, 1, 1, 0.050980393) @@ -94,7 +94,7 @@ use_hdr = true fill = 1 fill_from = Vector2(0.5, 0.50427353) -[sub_resource type="CompositorEffect" id="CompositorEffect_m7r8b"] +[sub_resource type="CompositorEffect" id="CompositorEffect_bfksq"] resource_local_to_scene = false resource_name = "" enabled = true @@ -102,7 +102,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("4_chktd") -opacity = 0.5578947 +opacity = 0.0 blendMode = 1 overlayTexture = ExtResource("5_1gqhf") overlayTint = Color(1, 1, 1, 0.21568628) @@ -128,7 +128,7 @@ curve = SubResource("Curve_nxurn") script = ExtResource("3_eyvih") owner = SubResource("Resource_1ntwo") -[sub_resource type="CompositorEffect" id="CompositorEffect_sw5v3"] +[sub_resource type="CompositorEffect" id="CompositorEffect_eyvih"] resource_local_to_scene = false resource_name = "" enabled = true @@ -136,7 +136,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("6_t8xaw") -distortionAmount = 0.12 +distortionAmount = 0.0 ellipseScale = 1.138 ringsDistribution = 0.7727 animationTargets = [SubResource("Resource_35pef")] @@ -156,7 +156,7 @@ curve = SubResource("Curve_71075") script = ExtResource("3_eyvih") owner = SubResource("Resource_1ntwo") -[sub_resource type="CompositorEffect" id="CompositorEffect_wi6eu"] +[sub_resource type="CompositorEffect" id="CompositorEffect_chktd"] resource_local_to_scene = false resource_name = "" enabled = true @@ -164,7 +164,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("7_g2w8j") -amount = 1.0 +amount = 0.0 num = 3 distortionAmount = 0.4369 distortionAngle = 168.8496 @@ -198,7 +198,7 @@ curve = SubResource("Curve_su8gi") script = ExtResource("3_eyvih") owner = SubResource("Resource_1ntwo") -[sub_resource type="CompositorEffect" id="CompositorEffect_7720d"] +[sub_resource type="CompositorEffect" id="CompositorEffect_1gqhf"] resource_local_to_scene = false resource_name = "" enabled = true @@ -206,7 +206,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("8_bfeok") -amount = 1.0 +amount = 0.0 saturationOffset = 30.0 saturationGamma = 37.9747 lightnessOffset = 2.0 @@ -217,5 +217,5 @@ metadata/_custom_type_script = "uid://pevgspwywsxi" [resource] script = ExtResource("9_fgrt2") -effects = [SubResource("CompositorEffect_ixqtu"), SubResource("CompositorEffect_m7r8b"), SubResource("CompositorEffect_sw5v3"), SubResource("CompositorEffect_wi6eu"), SubResource("CompositorEffect_7720d")] +effects = [SubResource("CompositorEffect_e74ec"), SubResource("CompositorEffect_bfksq"), SubResource("CompositorEffect_eyvih"), SubResource("CompositorEffect_chktd"), SubResource("CompositorEffect_1gqhf")] metadata/_custom_type_script = "uid://ckixweetchlo0" diff --git a/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Yellow Cinematic Bloom.tres b/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Yellow Cinematic Bloom.tres index 748f669..092d4f0 100644 --- a/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Yellow Cinematic Bloom.tres +++ b/Runtime/Rendering/Compositor/CompositorVFXPresets/Glow/Yellow Cinematic Bloom.tres @@ -61,7 +61,7 @@ noise = SubResource("FastNoiseLite_3tnad") color_ramp = SubResource("Gradient_0c48d") seamless = true -[sub_resource type="CompositorEffect" id="CompositorEffect_ysmsc"] +[sub_resource type="CompositorEffect" id="CompositorEffect_nnbdi"] resource_local_to_scene = false resource_name = "" enabled = true @@ -69,7 +69,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("4_qyiel") -amount = 0.1 +amount = 0.0 blendMode = 0.0 inputFading = SubResource("GradientTexture2D_i46l2") outputFading = SubResource("GradientTexture2D_d1ujc") @@ -82,7 +82,7 @@ smearingSteps = 10 smearing = 1.5 redShift = 0.1689 blueShift = -0.0889 -lumaTint = Color(0.8206905, 0.5294989, 0.1740212, 1) +lumaTint = Color(2.3825946, 1.5737975, 0.5791954, 1) lumaInputRange = Vector2(1.015, 1.5) lumaOutputRange = Vector2(0, 1) desaturation = 0.0 @@ -143,7 +143,7 @@ colors = PackedColorArray(1, 1, 1, 1) gradient = SubResource("Gradient_ie6m2") width = 2 -[sub_resource type="CompositorEffect" id="CompositorEffect_7axlu"] +[sub_resource type="CompositorEffect" id="CompositorEffect_c6fon"] resource_local_to_scene = false resource_name = "" enabled = true @@ -151,7 +151,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("6_cc1ov") -amount = 1.0 +amount = 0.0 lumaTint = Color(0.26849365, 0.1881681, 0.06346091, 1) blurRadius = 2 lumaInputRange = Vector2(1, 1.5) @@ -179,7 +179,7 @@ metadata/_custom_type_script = "uid://dvvfvlutisecy" script = ExtResource("3_c6fon") owner = SubResource("Resource_d1ujc") -[sub_resource type="CompositorEffect" id="CompositorEffect_frwbc"] +[sub_resource type="CompositorEffect" id="CompositorEffect_qyiel"] resource_local_to_scene = false resource_name = "" enabled = true @@ -187,9 +187,9 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("7_nnbdi") -amount = 1.0 +amount = 0.0 num = 1 -blendMode = 0.7151 +blendMode = 0.51 distortionAmount = 0.3446 distortionAngle = 0.0 distortionAngleSpeed = 0.0 @@ -198,7 +198,7 @@ redShift = 0.0415 blueShift = -0.0065 blurRadiusX = 5 blurRadiusY = 5 -lumaTint = Color(1.340301, 0.78043133, 0, 1) +lumaTint = Color(4.2130003, 3.380445, 0.5407243, 1) downSampling = 3 animationTargets = [SubResource("Resource_22k1k")] compositorEffectID = SubResource("Resource_hpfyh") @@ -206,5 +206,5 @@ metadata/_custom_type_script = "uid://6jkixa201wux" [resource] script = ExtResource("7_txjlu") -effects = [SubResource("CompositorEffect_ysmsc"), SubResource("CompositorEffect_7axlu"), SubResource("CompositorEffect_frwbc")] +effects = [SubResource("CompositorEffect_nnbdi"), SubResource("CompositorEffect_c6fon"), SubResource("CompositorEffect_qyiel")] metadata/_custom_type_script = "uid://ckixweetchlo0" diff --git a/Runtime/Rendering/Compositor/CompositorVFXPresets/Screen/Sketch.tres b/Runtime/Rendering/Compositor/CompositorVFXPresets/Screen/Sketch.tres index 1457584..aeeb691 100644 --- a/Runtime/Rendering/Compositor/CompositorVFXPresets/Screen/Sketch.tres +++ b/Runtime/Rendering/Compositor/CompositorVFXPresets/Screen/Sketch.tres @@ -1,7 +1,8 @@ -[gd_resource type="Resource" script_class="CompositorVFXPreset" load_steps=35 format=3 uid="uid://0blw3yhjw7y0"] +[gd_resource type="Resource" script_class="CompositorVFXPreset" load_steps=36 format=3 uid="uid://0blw3yhjw7y0"] [ext_resource type="Script" uid="uid://cx5qcow1mmd11" path="res://addons/rokojori_action_library/Runtime/Rendering/Compositor/CompositorEffectReferences/CompositorEffectOwner.cs" id="1_0ail8"] [ext_resource type="Script" uid="uid://dvvfvlutisecy" path="res://addons/rokojori_action_library/Runtime/Rendering/Compositor/AnimationTargets/CompFXMemberCurveTarget.cs" id="1_4xviq"] +[ext_resource type="Resource" uid="uid://bwhnq7w0tpgv" path="res://VFX/Action FX Compositor Effect Layer.tres" id="2_4xviq"] [ext_resource type="Script" uid="uid://comuvej4dr22k" path="res://addons/rokojori_action_library/Runtime/Rendering/Compositor/CompositorEffectReferences/RokojoriCompositorEffectID.cs" id="2_tc21q"] [ext_resource type="Script" uid="uid://bx4j8ic80vl7f" path="res://addons/rokojori_action_library/Runtime/Rendering/Compositor/CompositorEffects/Edge/DepthOutlines/DepthOutlinesEffect.cs" id="3_dryyw"] [ext_resource type="Texture2D" uid="uid://c30nul6romace" path="res://addons/rokojori_action_library/Runtime/Procedural/Noise/RGB 3D Noise.png" id="5_orb2s"] @@ -25,6 +26,7 @@ script = ExtResource("1_0ail8") [sub_resource type="Resource" id="Resource_p64cs"] script = ExtResource("2_tc21q") owner = SubResource("Resource_ie6m2") +layer = ExtResource("2_4xviq") [sub_resource type="Curve" id="Curve_7axlu"] _data = [Vector2(0, 1), 0.0, -18.573792, 0, 0, Vector2(0.07774799, 0.15679264), -0.687919, -0.687919, 0, 0, Vector2(1, 0), -0.069252, 0.0, 0, 0] @@ -48,7 +50,7 @@ point_count = 3 [sub_resource type="CurveTexture" id="CurveTexture_hpfyh"] curve = SubResource("Curve_22k1k") -[sub_resource type="CompositorEffect" id="CompositorEffect_ie6m2"] +[sub_resource type="CompositorEffect" id="CompositorEffect_4xviq"] resource_local_to_scene = false resource_name = "" enabled = true @@ -56,6 +58,7 @@ effect_callback_type = 4 needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("3_dryyw") +amount = 0.0 outlineWidth = -0.0516 outlineWidthCurve = SubResource("CurveTexture_p64cs") edgeColor = Color(0.14817011, 0.21073082, 0.29634023, 1) @@ -89,6 +92,7 @@ metadata/_custom_type_script = "uid://dvvfvlutisecy" [sub_resource type="Resource" id="Resource_hpfyh"] script = ExtResource("2_tc21q") owner = SubResource("Resource_ie6m2") +layer = ExtResource("2_4xviq") [sub_resource type="Gradient" id="Gradient_frwbc"] offsets = PackedFloat32Array(1) @@ -97,7 +101,7 @@ colors = PackedColorArray(1, 1, 1, 1) [sub_resource type="GradientTexture2D" id="GradientTexture2D_w6tyf"] gradient = SubResource("Gradient_frwbc") -[sub_resource type="CompositorEffect" id="CompositorEffect_i5utj"] +[sub_resource type="CompositorEffect" id="CompositorEffect_0m0g3"] resource_local_to_scene = false resource_name = "" enabled = true @@ -106,6 +110,7 @@ needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("6_hdnet") distortionAmount = 0.0049 +blendAmount = 0.0 smearingSteps = 1 smearing = 1.0 redShift = 0.0 @@ -132,6 +137,7 @@ metadata/_custom_type_script = "uid://dvvfvlutisecy" [sub_resource type="Resource" id="Resource_gxlxg"] script = ExtResource("2_tc21q") owner = SubResource("Resource_ie6m2") +layer = ExtResource("2_4xviq") [sub_resource type="CompressedTexture2D" id="CompressedTexture2D_4n83u"] load_path = "res://.godot/imported/RGB 3D Noise.png-daebfe00d2f3fcd5d3bc528f8a3972e1.ctex" @@ -143,7 +149,7 @@ colors = PackedColorArray(1, 1, 1, 1) [sub_resource type="GradientTexture2D" id="GradientTexture2D_ixn1d"] gradient = SubResource("Gradient_72jau") -[sub_resource type="CompositorEffect" id="CompositorEffect_22k1k"] +[sub_resource type="CompositorEffect" id="CompositorEffect_orb2s"] resource_local_to_scene = false resource_name = "" enabled = true @@ -152,6 +158,7 @@ needs_motion_vectors = false needs_normal_roughness = false script = ExtResource("6_hdnet") distortionAmount = 0.0026 +blendAmount = 0.0 smearingSteps = 1 smearing = 1.0 redShift = 0.0 @@ -168,8 +175,9 @@ metadata/_custom_type_script = "uid://balixgskgouhm" [sub_resource type="Resource" id="Resource_3tnad"] script = ExtResource("2_tc21q") owner = SubResource("Resource_ie6m2") +layer = ExtResource("2_4xviq") -[sub_resource type="CompositorEffect" id="CompositorEffect_y3g14"] +[sub_resource type="CompositorEffect" id="CompositorEffect_hdnet"] resource_local_to_scene = false resource_name = "" enabled = true @@ -184,5 +192,5 @@ metadata/_custom_type_script = "uid://cjfxcl3cdhnku" [resource] script = ExtResource("6_orb2s") -effects = [SubResource("CompositorEffect_ie6m2"), SubResource("CompositorEffect_i5utj"), SubResource("CompositorEffect_22k1k"), SubResource("CompositorEffect_y3g14")] +effects = [SubResource("CompositorEffect_4xviq"), SubResource("CompositorEffect_0m0g3"), SubResource("CompositorEffect_orb2s"), SubResource("CompositorEffect_hdnet")] metadata/_custom_type_script = "uid://ckixweetchlo0" diff --git a/Runtime/Shading/Library/Colors.gdshaderinc b/Runtime/Shading/Library/Colors.gdshaderinc index 53248e6..1a03634 100644 --- a/Runtime/Shading/Library/Colors.gdshaderinc +++ b/Runtime/Shading/Library/Colors.gdshaderinc @@ -223,10 +223,7 @@ vec4 colorSpaceConversion( vec4 color, int mode ) return mode == 1 ? LINEARtoSRGB( color ) : SRGBtoLINEAR( color ); } -float modPolarDegrees( float value ) -{ - return mod( value + 180.0, 360.0 ) - 180.0; -} + vec3 changeHueOfRGB( vec3 rgb, float hueChange ) @@ -237,6 +234,11 @@ vec3 changeHueOfRGB( vec3 rgb, float hueChange ) return HSLtoRGB( hsl ); } +float modPolarDegrees( float value ) +{ + return mod( value + 180.0, 360.0 ) - 180.0; +} + float hue360ToYB( float hue ) { return modPolarDegrees( hue - 240.0 ); diff --git a/Runtime/Shading/Library/Noise.gdshaderinc b/Runtime/Shading/Library/Noise.gdshaderinc index 8e074ce..ef7b6e8 100644 --- a/Runtime/Shading/Library/Noise.gdshaderinc +++ b/Runtime/Shading/Library/Noise.gdshaderinc @@ -21,7 +21,7 @@ vec2 random_v2( vec2 uv ) vec3 random_v3( vec3 uvw ) { - + uvw = vec3( dot(uvw, vec3(127.1,311.7, 513.7) ), dot(uvw, vec3(269.5,183.3, 396.5) ), dot(uvw, vec3(421.3,314.1, 119.7) ) ); @@ -80,6 +80,7 @@ vec2 seamLessCoordinate( vec2 uv, vec2 seamRange, vec2 seamFade, vec2 type ) return mod( uv - seamFade * type, seamRange ); } + float perlinOctavesSeamless( vec2 uv, int octaves, float scale, float gain, vec2 seamRange, vec2 seamFade ) { // uv = mod( uv , seamRange ); @@ -109,57 +110,90 @@ float perlinOctavesSeamless( vec2 uv, int octaves, float scale, float gain, vec2 } +vec2 seamlessModulo( vec2 divident, vec2 divisor ) +{ + vec2 positiveDivident = mod( divident, divisor ) + divisor; + return mod( positiveDivident, divisor ); +} + +float perlinSeamlessWithRange( vec2 uv, vec2 repeat ) +{ + uv *= repeat; + + vec2 i = floor( uv ); + vec2 f = fract( uv ); + + vec2 fade = f; + + vec2 i00 = mod( i + vec2( 0.0, 0.0 ), repeat ); + vec2 i10 = mod( i + vec2( 1.0, 0.0 ), repeat ); + vec2 i01 = mod( i + vec2( 0.0, 1.0 ), repeat ); + vec2 i11 = mod( i + vec2( 1.0, 1.0 ), repeat ); + + + float a = random( i00 ); + float b = random( i10 ); + float c = random( i01 ); + float d = random( i11 ); + + return mix( + mix(a, b, fade.x), + mix(c, d, fade.x), + fade.y + ); +} + float perlin3D( vec3 uvw ) -{ - vec3 gridIndex = floor( uvw ); - vec3 gridFract = fract( uvw ); - - vec3 blur = smoothstep( 0.0, 1.0, gridFract ); - - vec3 blb = gridIndex + vec3(0.0, 0.0, 0.0); - vec3 brb = gridIndex + vec3(1.0, 0.0, 0.0); - vec3 tlb = gridIndex + vec3(0.0, 1.0, 0.0); - vec3 trb = gridIndex + vec3(1.0, 1.0, 0.0); - vec3 blf = gridIndex + vec3(0.0, 0.0, 1.0); - vec3 brf = gridIndex + vec3(1.0, 0.0, 1.0); - vec3 tlf = gridIndex + vec3(0.0, 1.0, 1.0); - vec3 trf = gridIndex + vec3(1.0, 1.0, 1.0); - - vec3 gradBLB = random_v3( blb ); - vec3 gradBRB = random_v3( brb ); - vec3 gradTLB = random_v3( tlb ); - vec3 gradTRB = random_v3( trb ); - vec3 gradBLF = random_v3( blf ); - vec3 gradBRF = random_v3( brf ); - vec3 gradTLF = random_v3( tlf ); - vec3 gradTRF = random_v3( trf ); - - - vec3 distToPixelFromBLB = gridFract - vec3( 0.0, 0.0, 0.0 ); - vec3 distToPixelFromBRB = gridFract - vec3( 1.0, 0.0, 0.0 ); - vec3 distToPixelFromTLB = gridFract - vec3( 0.0, 1.0, 0.0 ); - vec3 distToPixelFromTRB = gridFract - vec3( 1.0, 1.0, 0.0 ); - vec3 distToPixelFromBLF = gridFract - vec3( 0.0, 0.0, 1.0 ); - vec3 distToPixelFromBRF = gridFract - vec3( 1.0, 0.0, 1.0 ); - vec3 distToPixelFromTLF = gridFract - vec3( 0.0, 1.0, 1.0 ); - vec3 distToPixelFromTRF = gridFract - vec3( 1.0, 1.0, 1.0 ); - - float dotBLB = dot( gradBLB, distToPixelFromBLB ); - float dotBRB = dot( gradBRB, distToPixelFromBRB ); - float dotTLB = dot( gradTLB, distToPixelFromTLB ); - float dotTRB = dot( gradTRB, distToPixelFromTRB ); - float dotBLF = dot( gradBLF, distToPixelFromBLF ); - float dotBRF = dot( gradBRF, distToPixelFromBRF ); - float dotTLF = dot( gradTLF, distToPixelFromTLF ); - float dotTRF = dot( gradTRF, distToPixelFromTRF ); - - - return mix( - mix( mix(dotBLB, dotBRB, blur.x), mix(dotTLB, dotTRB, blur.x), blur.y ), - mix( mix(dotBLF, dotBRF, blur.x), mix(dotTLF, dotTRF, blur.x), blur.y ), +{ + vec3 gridIndex = floor( uvw ); + vec3 gridFract = fract( uvw ); + + vec3 blur = smoothstep( 0.0, 1.0, gridFract ); + + vec3 blb = gridIndex + vec3(0.0, 0.0, 0.0); + vec3 brb = gridIndex + vec3(1.0, 0.0, 0.0); + vec3 tlb = gridIndex + vec3(0.0, 1.0, 0.0); + vec3 trb = gridIndex + vec3(1.0, 1.0, 0.0); + vec3 blf = gridIndex + vec3(0.0, 0.0, 1.0); + vec3 brf = gridIndex + vec3(1.0, 0.0, 1.0); + vec3 tlf = gridIndex + vec3(0.0, 1.0, 1.0); + vec3 trf = gridIndex + vec3(1.0, 1.0, 1.0); + + vec3 gradBLB = random_v3( blb ); + vec3 gradBRB = random_v3( brb ); + vec3 gradTLB = random_v3( tlb ); + vec3 gradTRB = random_v3( trb ); + vec3 gradBLF = random_v3( blf ); + vec3 gradBRF = random_v3( brf ); + vec3 gradTLF = random_v3( tlf ); + vec3 gradTRF = random_v3( trf ); + + + vec3 distToPixelFromBLB = gridFract - vec3( 0.0, 0.0, 0.0 ); + vec3 distToPixelFromBRB = gridFract - vec3( 1.0, 0.0, 0.0 ); + vec3 distToPixelFromTLB = gridFract - vec3( 0.0, 1.0, 0.0 ); + vec3 distToPixelFromTRB = gridFract - vec3( 1.0, 1.0, 0.0 ); + vec3 distToPixelFromBLF = gridFract - vec3( 0.0, 0.0, 1.0 ); + vec3 distToPixelFromBRF = gridFract - vec3( 1.0, 0.0, 1.0 ); + vec3 distToPixelFromTLF = gridFract - vec3( 0.0, 1.0, 1.0 ); + vec3 distToPixelFromTRF = gridFract - vec3( 1.0, 1.0, 1.0 ); + + float dotBLB = dot( gradBLB, distToPixelFromBLB ); + float dotBRB = dot( gradBRB, distToPixelFromBRB ); + float dotTLB = dot( gradTLB, distToPixelFromTLB ); + float dotTRB = dot( gradTRB, distToPixelFromTRB ); + float dotBLF = dot( gradBLF, distToPixelFromBLF ); + float dotBRF = dot( gradBRF, distToPixelFromBRF ); + float dotTLF = dot( gradTLF, distToPixelFromTLF ); + float dotTRF = dot( gradTRF, distToPixelFromTRF ); + + + return mix( + mix( mix(dotBLB, dotBRB, blur.x), mix(dotTLB, dotTRB, blur.x), blur.y ), + mix( mix(dotBLF, dotBRF, blur.x), mix(dotTLF, dotTRF, blur.x), blur.y ), blur.z - ) + 0.5; + ) + 0.5; } @@ -171,57 +205,57 @@ float perlinPolar( vec2 uv ) float worley( vec2 uv, float columns, float rows ) { - - vec2 index_uv = floor( vec2( uv.x * columns, uv.y * rows ) ); - vec2 fract_uv = fract( vec2( uv.x * columns, uv.y * rows ) ); - - float minimum_dist = 1.0; - - for ( int y= -1; y <= 1; y++ ) + + vec2 index_uv = floor( vec2( uv.x * columns, uv.y * rows ) ); + vec2 fract_uv = fract( vec2( uv.x * columns, uv.y * rows ) ); + + float minimum_dist = 1.0; + + for ( int y= -1; y <= 1; y++ ) { - for ( int x= -1; x <= 1; x++ ) + for ( int x= -1; x <= 1; x++ ) { - vec2 neighbor = vec2( float( x ), float( y ) ); - vec2 point = random_v2( index_uv + neighbor ); - - vec2 diff = neighbor + point - fract_uv; - float dist = length (diff ); + vec2 neighbor = vec2( float( x ), float( y ) ); + vec2 point = random_v2( index_uv + neighbor ); + + vec2 diff = neighbor + point - fract_uv; + float dist = length (diff ); - minimum_dist = min( minimum_dist, dist ); - } - } - - return minimum_dist; + minimum_dist = min( minimum_dist, dist ); + } + } + + return minimum_dist; } vec2 voronoi( vec2 uv, float columns, float rows ) -{ - vec2 index_uv = floor( vec2( uv.x * columns, uv.y * rows ) ); - vec2 fract_uv = fract( vec2( uv.x * columns, uv.y * rows ) ); - - float minimum_dist = 1.0; - vec2 minimum_point; - - for ( int y= -1; y <= 1; y++ ) - { - for ( int x= -1; x <= 1; x++ ) - { - vec2 neighbor = vec2( float( x ), float( y ) ); - vec2 point = random_v2( index_uv + neighbor ); - - vec2 diff = neighbor + point - fract_uv; - float dist = length( diff ); +{ + vec2 index_uv = floor( vec2( uv.x * columns, uv.y * rows ) ); + vec2 fract_uv = fract( vec2( uv.x * columns, uv.y * rows ) ); - if ( dist < minimum_dist ) + float minimum_dist = 1.0; + vec2 minimum_point; + + for ( int y= -1; y <= 1; y++ ) + { + for ( int x= -1; x <= 1; x++ ) + { + vec2 neighbor = vec2( float( x ), float( y ) ); + vec2 point = random_v2( index_uv + neighbor ); + + vec2 diff = neighbor + point - fract_uv; + float dist = length( diff ); + + if ( dist < minimum_dist ) { - minimum_dist = dist; - minimum_point = point; - } - } - } + minimum_dist = dist; + minimum_point = point; + } + } + } - return minimum_point; + return minimum_point; } bool ditherDiscard( float ditherFadeValue, vec4 _FRAGCOORD ) diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc new file mode 100644 index 0000000..91bbb95 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc @@ -0,0 +1,100 @@ +// COLOR +group_uniforms Color; + +uniform vec4 color : source_color = vec4( 0.887, 0.434, 0.233, 1.0 ); +uniform float opacity = 1; +uniform sampler2D opacityCurve:source_color; + +uniform float minHueRandom = 0; +uniform float maxHueRandom = 0; + +uniform float shapeNoiseAmount:hint_range(0,1) = 0; +uniform float shapeNoiseScale = 1.0; + +group_uniforms; + + + +// SIZE +group_uniforms Size; +uniform float sizeX:hint_range(1,100) = 1; +uniform float sizeY:hint_range(1,100) = 1; +uniform float worldSizeScale = 1; +uniform float screenSizeScale = 1; +uniform float worldSize_vs_screenSize:hint_range(0,1) = 0.5; +uniform float randomScaleMin = 1.0; +uniform float randomScaleMax = 1.0; +uniform float extension = 1.0; + +group_uniforms; + +// ROTATION +group_uniforms Rotation; +uniform float rotation:hint_range(-360,360) = 0.0; +uniform float rotationOverX:hint_range(-360,360) = 0.0; +uniform float rotationOverY:hint_range(-360,360) = 0.0; +uniform float rotationPerLayer:hint_range(-360,360) = 0.0; +// uniform float vertexRotation:hint_range(-360,360) = 0.0; +// uniform float vertexRotationOverX:hint_range(-360,360) = 0.0; +// uniform float vertexRotationOverY:hint_range(-360,360) = 0.0; +// uniform float vertexRotationPerLayer:hint_range(-360,360) = 0.0; + +group_uniforms; + +// SCREEN OFFSET +group_uniforms ScreenOffset; +uniform vec2 screenOffset = vec2( 0, 0 ); +uniform vec2 screenOffsetScale = vec2( 0, 0 ); +uniform vec2 screenOffsetLayerSpread = vec2( 0, 0 ); +group_uniforms; + +// CHROMATIC ABERATION +group_uniforms ChromaticAberation; +uniform int chromaticAberationMode = 0; +uniform float chromaticAberationAmount:hint_range(0,100) = 0; +uniform int chromaticAberationSteps:hint_range(0,32) = 1; +uniform vec2 chromaticAberationDirection = vec2( 1.0, 1.0 ); +uniform float chromaticAberationDirectionTowardsCenter:hint_range(-1,1) = 1.0; +uniform float chromaticAberationCenterScale:hint_range(0,1000) = 1.0; +uniform float chromaticAberationCenterOffset:hint_range(-1,1) = 1.0; +uniform vec3 chromaticAberationShifts = vec3( 0.95, 1.0, 1.05 ); +uniform float chromaticAberationSmear = 1; + + +group_uniforms; + +// FADING +group_uniforms Fading; +uniform int fadingMode = 0; +uniform sampler2D fading:source_color, repeat_disable, filter_linear; +uniform sampler2D opacityFading:source_color, repeat_disable, filter_linear; +uniform sampler2D sizeXfading:source_color, repeat_disable, filter_linear; +uniform sampler2D sizeYfading:source_color, repeat_disable, filter_linear; +uniform float fadingPower = 1.0; +uniform float opacityFadingPower = 1.0; +uniform float sizeXfadingPower = 1.0; +uniform float sizeYfadingPower = 1.0; + +varying float opacityFadeValue; +group_uniforms; + + +// OCCLUSION +group_uniforms Occlusion; +uniform int occlusionMode = 0; +uniform sampler2D depthTexture:hint_depth_texture; +uniform float occlusionZOffset:hint_range(-30,30) = 0; +uniform int occlusionTestMaxSteps = 10; +uniform float occlusionTestStepStride = 1; +uniform float occlusionTest_ViewDependingScaleAmount:hint_range(0,1) = 0.5; +uniform float occlusionTest_ViewDependingDistance = 100; +uniform float occlusionToSize = 0.5; + +varying float occlusionAlpha; +group_uniforms; + + +varying vec4 combinedColor; +varying vec2 centerDirection; +varying float zIndex; +// varying float nodeRotationOffset; \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc.uid new file mode 100644 index 0000000..9609097 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc.uid @@ -0,0 +1 @@ +uid://dijr3jilsh8ue diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc new file mode 100644 index 0000000..9fb026c --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc @@ -0,0 +1,250 @@ + +void vertex() +{ + float normalizedIndex = VERTEX.z; + VERTEX.z = 0.0; + zIndex = normalizedIndex; + + vec3 viewOffset = viewToWorldDirection( vec3( 0, 0, occlusionZOffset ), INV_VIEW_MATRIX ); + vec3 nodePositionView = worldToView( NODE_POSITION_WORLD + viewOffset, VIEW_MATRIX ); + vec2 screenPosition = viewToScreen( nodePositionView, PROJECTION_MATRIX ); + + float fadeValue = 1.0; + float opacityValue = 1.0; + float sizeXFade = 1.0; + float sizeYFade = 1.0; + + if ( fadingMode == 1 ) + { + float edgeDistance = max( 0.0, -sdBox( screenPosition - vec2( 0.5 ), vec2( 0.5 ) ) ) * 2.0; + + fadeValue = pow( edgeDistance, fadingPower ); + opacityValue = pow( edgeDistance, opacityFadingPower ); + sizeXFade = pow( edgeDistance, sizeXfadingPower ); + sizeYFade = pow( edgeDistance, sizeYfadingPower ); + } + else if ( fadingMode == 2 ) + { + fadeValue = textureLod( fading, screenPosition, 0.0 ).r; + opacityValue = textureLod( opacityFading, screenPosition, 0.0 ).r; + sizeXFade = textureLod( sizeXfading, screenPosition, 0.0 ).r; + sizeYFade = textureLod( sizeYfading, screenPosition, 0.0 ).r; + } + + + float nodeScale = length( extractScale( MODEL_MATRIX ) ); + + float sX = sizeX * sizeXFade; + float sY = sizeY * sizeYFade; + + vec2 uvPixelSize = vec2( 1.0, 1.0 ) / VIEWPORT_SIZE ; + + vec2 scaledUVPixelSize = uvPixelSize * max( 1.0, nodePositionView.z / occlusionTest_ViewDependingDistance ); + uvPixelSize = mix( uvPixelSize, scaledUVPixelSize, occlusionTest_ViewDependingScaleAmount ); + + float occlusionValue = occlusionMode == 0 ? 1.0 : occlusionMode == 1 ? + + getQuickOcclusionAt( depthTexture, nodePositionView, uvPixelSize, + occlusionTestMaxSteps, occlusionTestStepStride, + PROJECTION_MATRIX, INV_PROJECTION_MATRIX ) : + + getOcclusionAt( depthTexture, nodePositionView, uvPixelSize, + occlusionTestMaxSteps, occlusionTestStepStride, + PROJECTION_MATRIX, INV_PROJECTION_MATRIX ); + + occlusionAlpha = occlusionValue * fadeValue; + + float camDist = length( NODE_POSITION_WORLD - CAMERA_POSITION_WORLD ); + + float occlusionSizeFactor = mix( 1.0, occlusionAlpha, occlusionToSize ); + vec2 sizeScaled = vec2( sX, sY ) * occlusionSizeFactor * nodeScale; + vec2 size = mix( sizeScaled * worldSizeScale, sizeScaled * camDist * 0.1 * screenSizeScale, worldSize_vs_screenSize ); + + float randomScale = mix( randomScaleMin, randomScaleMax, random( vec2( normalizedIndex ) ) ); + + size *= randomScale; + size *= extension; + + setFlareOffsetMatrix( + MODELVIEW_MATRIX, VIEW_MATRIX, MAIN_CAM_INV_VIEW_MATRIX, MODEL_MATRIX, + screenOffsetScale + screenOffsetLayerSpread * ( normalizedIndex * 2.0 - 1.0 ), + screenOffset + ); + + vec2 offsetScreenPosition = localToScreen( vec3( 0.0 ), MODELVIEW_MATRIX, PROJECTION_MATRIX ); + + float combinedRotation = rotation; + combinedRotation += rotationPerLayer * ( normalizedIndex * 2.0 - 1.0 ); + combinedRotation += ( offsetScreenPosition.x * 2.0 - 1.0 ) * rotationOverX; + + + float combinedRotationRadians = combinedRotation / 180.0 * PI; + + setFlareScaleRotation( + MODELVIEW_MATRIX, MODELVIEW_NORMAL_MATRIX, MODEL_MATRIX, + vec3( size.x, size.y, 1.0 ), combinedRotationRadians + ); + + + + // nodeRotationOffset = ( offsetScreenPosition.x * 2.0 - 1.0 ) * rotationOverX; + // nodeRotationOffset += rotationPerLayer * ( normalizedIndex * 2.0 - 1.0 ) ; + + centerDirection = ( offsetScreenPosition - screenPosition ); + centerDirection.y *= -1.0; + + centerDirection = -centerDirection; + + centerDirection = rotate_v2( centerDirection, -combinedRotationRadians ); + + combinedColor = color; + + float rgbScale = getRGBScale( combinedColor.rgb ); + + float randomHueOffset = mix( minHueRandom, maxHueRandom, random( vec2( normalizedIndex ) + vec2( 0.23, 0.13 ) ) ); + + combinedColor.rgb = changeHueOfRGB( combinedColor.rgb / rgbScale, randomHueOffset ) * rgbScale; + + GENERATE_FLARE_VERTEX_DATA + + opacityFadeValue = fadeValue * opacityValue; + + float opacityMapValue = textureLod( opacityCurve, vec2( normalizedIndex, 0.0 ), 0.0 ).r; + + opacityFadeValue *= opacityMapValue * occlusionAlpha * opacity; + + UV = ( UV - vec2( 0.5 ) ) * extension + vec2( 0.5 ); + // UV = rotateAround_v2( UV, ( nodeRotationOffset + rotation ) / 180.0 * 3.141592653, vec2(0.5) ); +} + + +float mirrorValue( float x ) +{ + float t = mod( x, 2.0 ); + return ( t <= 1.0 ) ? t : 2.0 - t; +} + +vec2 mirrorUV( vec2 uv ) +{ + return vec2( mirrorValue( uv.x ), mirrorValue( uv.y ) ); +} + +vec2 handleOverflow( vec2 uv ) +{ + return clamp( uv, vec2( 0.0 ), vec2( 1.0 ) ); + // return mirrorUV( uv ); +} + +vec4 sampleChromatic( vec2 uv, vec2 dir, int steps, vec3 shifts, float smear ) +{ + vec4 combinedChromatic = vec4( 0.0 ); + + + float weights = 0.0; + + for ( int i = -steps; i <= steps; i++ ) + { + float t = float( i ) / float( steps ); + float w = 1.0 - abs( t ); + vec2 stepDir = dir * pow( smear, t ); + + vec2 rUV = uv + stepDir * shifts.r; + rUV = handleOverflow( rUV ); + + vec2 gUV = uv + stepDir * shifts.g; + gUV = handleOverflow( gUV ); + + vec2 bUV = uv + stepDir * shifts.b; + bUV = handleOverflow( bUV ); + + vec4 colorR = generateFlare( rUV, color, opacityFadeValue ); + vec4 colorG = generateFlare( gUV, color, opacityFadeValue ); + vec4 colorB = generateFlare( bUV, color, opacityFadeValue ); + + combinedChromatic.r += colorR.r * w; + combinedChromatic.g += colorG.g * w; + combinedChromatic.b += colorB.b * w; + combinedChromatic.a += colorG.a * w; + + weights += w; + } + + combinedChromatic /= weights; + + return combinedChromatic; +} + +void fragment() +{ + + vec4 flareColor = vec4( 0.0 ); + float centerLength = length( centerDirection ); + + + + float caAmount = chromaticAberationAmount; + + if ( abs( chromaticAberationDirectionTowardsCenter ) > 0.0 ) + { + float maxLength = clamp( centerLength * 100.0, 0.0, 1.0 ); + caAmount = maxLength * chromaticAberationAmount; + } + + + vec2 uv = UV; + + + float rx = clamp( perlin( ( vec2( zIndex * 12.03 ) + UV ) * shapeNoiseScale ), 0.0, 1.0 ); + + float noiseOpacity = mix( 1.0, rx, shapeNoiseAmount ); + + if ( chromaticAberationMode != 0 && caAmount > 0.0 && chromaticAberationSteps > 0 ) + { + + vec2 alignedDir = chromaticAberationDirection; + + if ( length( alignedDir ) > 1.0 ) + { + alignedDir = normalize( chromaticAberationDirection ); + } + + vec2 normDir = alignedDir; + + if ( centerLength > 0.0 && chromaticAberationDirectionTowardsCenter != 0.0 ) + { + float amount = chromaticAberationDirectionTowardsCenter; + vec2 normalizedCenterDirection = normalize( centerDirection ); + + vec2 centerDir = normalizedCenterDirection; + + if ( amount < 0.0 ) + { + amount = -amount; + centerDir = -centerDir; + } + + alignedDir = mix( normDir, centerDir, amount ); + alignedDir = normalize( alignedDir ) / vec2( 100.0 ); + } + + float centerScale = 1.0; + float centerTreshold = 0.1; + + if ( centerLength < centerTreshold ) + { + centerScale = centerLength / centerTreshold; + } + + // flareColor.rgb = vec3( centerLength, centerScale, 1.0 ); + // flareColor.a = 1.0; + flareColor = sampleChromatic( uv, alignedDir * caAmount * centerScale, chromaticAberationSteps, chromaticAberationShifts, chromaticAberationSmear ); + } + else + { + flareColor = generateFlare( uv, color, opacityFadeValue ); + } + + ALBEDO = flareColor.rgb; + ALPHA = flareColor.a * noiseOpacity; + +} diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc.uid new file mode 100644 index 0000000..2e59d8e --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc.uid @@ -0,0 +1 @@ +uid://7j2y6whs3pq7 diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs new file mode 100644 index 0000000..a2ba394 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs @@ -0,0 +1,175 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class BaseFlareShader + { + /* + public static readonly CachedResource shader = new CachedResource( + "C:/rokojori/godot-projects/winter-tales/addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare.gdshader" + ); + */ + + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class BaseFlareMaterial:CustomMaterial + { + + + public readonly CustomMaterialProperty color; + public readonly CustomMaterialProperty opacity; + public readonly CustomMaterialProperty opacityCurve; + public readonly CustomMaterialProperty minHueRandom; + public readonly CustomMaterialProperty maxHueRandom; + public readonly CustomMaterialProperty shapeNoiseAmount; + public readonly CustomMaterialProperty shapeNoiseScale; + public readonly CustomMaterialProperty sizeX; + public readonly CustomMaterialProperty sizeY; + public readonly CustomMaterialProperty worldSizeScale; + public readonly CustomMaterialProperty screenSizeScale; + public readonly CustomMaterialProperty worldSizeVsScreenSize; + public readonly CustomMaterialProperty randomScaleMin; + public readonly CustomMaterialProperty randomScaleMax; + public readonly CustomMaterialProperty extension; + public readonly CustomMaterialProperty rotation; + public readonly CustomMaterialProperty rotationOverX; + public readonly CustomMaterialProperty rotationOverY; + public readonly CustomMaterialProperty rotationPerLayer; + public readonly CustomMaterialProperty screenOffset; + public readonly CustomMaterialProperty screenOffsetScale; + public readonly CustomMaterialProperty screenOffsetLayerSpread; + public readonly CustomMaterialProperty chromaticAberationMode; + public readonly CustomMaterialProperty chromaticAberationAmount; + public readonly CustomMaterialProperty chromaticAberationSteps; + public readonly CustomMaterialProperty chromaticAberationDirection; + public readonly CustomMaterialProperty chromaticAberationDirectionTowardsCenter; + public readonly CustomMaterialProperty chromaticAberationCenterScale; + public readonly CustomMaterialProperty chromaticAberationCenterOffset; + public readonly CustomMaterialProperty chromaticAberationShifts; + public readonly CustomMaterialProperty chromaticAberationSmear; + public readonly CustomMaterialProperty fadingMode; + public readonly CustomMaterialProperty fading; + public readonly CustomMaterialProperty opacityFading; + public readonly CustomMaterialProperty sizeXfading; + public readonly CustomMaterialProperty sizeYfading; + public readonly CustomMaterialProperty fadingPower; + public readonly CustomMaterialProperty opacityFadingPower; + public readonly CustomMaterialProperty sizeXfadingPower; + public readonly CustomMaterialProperty sizeYfadingPower; + public readonly CustomMaterialProperty occlusionMode; + public readonly CustomMaterialProperty occlusionZOffset; + public readonly CustomMaterialProperty occlusionTestMaxSteps; + public readonly CustomMaterialProperty occlusionTestStepStride; + public readonly CustomMaterialProperty occlusionTestViewDependingScaleAmount; + public readonly CustomMaterialProperty occlusionTestViewDependingDistance; + public readonly CustomMaterialProperty occlusionToSize; + + public BaseFlareMaterial() + { + /* + Shader = BaseFlareShader.shader.Get(); + */ + + color = new CustomMaterialProperty( this, BaseFlareShader.color ); + opacity = new CustomMaterialProperty( this, BaseFlareShader.opacity ); + opacityCurve = new CustomMaterialProperty( this, BaseFlareShader.opacityCurve ); + minHueRandom = new CustomMaterialProperty( this, BaseFlareShader.minHueRandom ); + maxHueRandom = new CustomMaterialProperty( this, BaseFlareShader.maxHueRandom ); + shapeNoiseAmount = new CustomMaterialProperty( this, BaseFlareShader.shapeNoiseAmount ); + shapeNoiseScale = new CustomMaterialProperty( this, BaseFlareShader.shapeNoiseScale ); + sizeX = new CustomMaterialProperty( this, BaseFlareShader.sizeX ); + sizeY = new CustomMaterialProperty( this, BaseFlareShader.sizeY ); + worldSizeScale = new CustomMaterialProperty( this, BaseFlareShader.worldSizeScale ); + screenSizeScale = new CustomMaterialProperty( this, BaseFlareShader.screenSizeScale ); + worldSizeVsScreenSize = new CustomMaterialProperty( this, BaseFlareShader.worldSizeVsScreenSize ); + randomScaleMin = new CustomMaterialProperty( this, BaseFlareShader.randomScaleMin ); + randomScaleMax = new CustomMaterialProperty( this, BaseFlareShader.randomScaleMax ); + extension = new CustomMaterialProperty( this, BaseFlareShader.extension ); + rotation = new CustomMaterialProperty( this, BaseFlareShader.rotation ); + rotationOverX = new CustomMaterialProperty( this, BaseFlareShader.rotationOverX ); + rotationOverY = new CustomMaterialProperty( this, BaseFlareShader.rotationOverY ); + rotationPerLayer = new CustomMaterialProperty( this, BaseFlareShader.rotationPerLayer ); + screenOffset = new CustomMaterialProperty( this, BaseFlareShader.screenOffset ); + screenOffsetScale = new CustomMaterialProperty( this, BaseFlareShader.screenOffsetScale ); + screenOffsetLayerSpread = new CustomMaterialProperty( this, BaseFlareShader.screenOffsetLayerSpread ); + chromaticAberationMode = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationMode ); + chromaticAberationAmount = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationAmount ); + chromaticAberationSteps = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationSteps ); + chromaticAberationDirection = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationDirection ); + chromaticAberationDirectionTowardsCenter = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationDirectionTowardsCenter ); + chromaticAberationCenterScale = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationCenterScale ); + chromaticAberationCenterOffset = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationCenterOffset ); + chromaticAberationShifts = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationShifts ); + chromaticAberationSmear = new CustomMaterialProperty( this, BaseFlareShader.chromaticAberationSmear ); + fadingMode = new CustomMaterialProperty( this, BaseFlareShader.fadingMode ); + fading = new CustomMaterialProperty( this, BaseFlareShader.fading ); + opacityFading = new CustomMaterialProperty( this, BaseFlareShader.opacityFading ); + sizeXfading = new CustomMaterialProperty( this, BaseFlareShader.sizeXfading ); + sizeYfading = new CustomMaterialProperty( this, BaseFlareShader.sizeYfading ); + fadingPower = new CustomMaterialProperty( this, BaseFlareShader.fadingPower ); + opacityFadingPower = new CustomMaterialProperty( this, BaseFlareShader.opacityFadingPower ); + sizeXfadingPower = new CustomMaterialProperty( this, BaseFlareShader.sizeXfadingPower ); + sizeYfadingPower = new CustomMaterialProperty( this, BaseFlareShader.sizeYfadingPower ); + occlusionMode = new CustomMaterialProperty( this, BaseFlareShader.occlusionMode ); + occlusionZOffset = new CustomMaterialProperty( this, BaseFlareShader.occlusionZOffset ); + occlusionTestMaxSteps = new CustomMaterialProperty( this, BaseFlareShader.occlusionTestMaxSteps ); + occlusionTestStepStride = new CustomMaterialProperty( this, BaseFlareShader.occlusionTestStepStride ); + occlusionTestViewDependingScaleAmount = new CustomMaterialProperty( this, BaseFlareShader.occlusionTestViewDependingScaleAmount ); + occlusionTestViewDependingDistance = new CustomMaterialProperty( this, BaseFlareShader.occlusionTestViewDependingDistance ); + occlusionToSize = new CustomMaterialProperty( this, BaseFlareShader.occlusionToSize ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs.uid new file mode 100644 index 0000000..5d2f08f --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlareMaterial.cs.uid @@ -0,0 +1 @@ +uid://dg6f7yio6bhmg diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc b/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc new file mode 100644 index 0000000..92356b1 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc @@ -0,0 +1,119 @@ +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc" + + + +// SHAPE +group_uniforms Shape; + +uniform float shapeScale = 1.0; +uniform sampler2D radialFill:source_color, filter_linear, repeat_enable; +uniform float radialFillStrength = 1.0; +uniform float radialFillTile = 1.0; +uniform float radialFillOffset = 0.0; +uniform bool radialFillRepeat = false; + +uniform sampler2D conicFill:source_color, filter_linear, repeat_enable; +uniform float conicFillStrength = 1.0; +uniform float conicFillTile = 1.0; +uniform float conicFillOffset = 0.0; +uniform bool conicFillRepeat = false; + +uniform float fillMultiply = 0.0; +uniform float fillAdd = 0.0; + +uniform float shapeColorize:hint_range(0,1) = 0.0; + +uniform sampler2D radialMask:filter_linear, repeat_enable; +uniform float radialMaskStrength = 1.0; +uniform float radialMaskTile = 1.0; +uniform float radialMaskOffset = 0.0; +uniform bool radialMaskRepeat = false; + +uniform sampler2D conicMask: filter_linear, repeat_enable; +uniform float conicMaskStrength = 1.0; +uniform float conicMaskTile = 1.0; +uniform float conicMaskOffset = 1.0; +uniform bool conicMaskRepeat = false; + +uniform float maskMultiply = 0.0; +uniform float maskAdd = 0.0; + +group_uniforms; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc" + +#define GENERATE_FLARE_VERTEX_DATA \ +{ \ + \ + \ +} \ + + +vec3 colorize( vec3 _original, vec3 _color ) +{ + float _grey = ( _original.r + _original.g + _original.b ) / 3.0; + + return _grey < 0.5 ? mix( vec3( 0.0 ), _color, _grey * 2.0 ) : + mix( _color, vec3( 1.0 ), ( _grey - 0.5 ) * 2.0 ); +} + +vec4 blendColor( vec4 _computedColor, vec4 _tintColor, float _colorize ) +{ + vec4 _mixed = _computedColor * _tintColor; + vec4 _colorized = vec4( colorize( _tintColor.rgb, _computedColor.rgb ), _computedColor.a * _tintColor.a ); + + return mix( _mixed, _colorized, _colorize ); +} + +vec2 polarUV( vec2 _uv, float angleOffset ) +{ + vec2 toCenter = _uv - vec2( 0.5 ); + float d = length( toCenter ); + float a = atan( toCenter.y, toCenter.x ); + a = ( PI + a + angleOffset + PI * 2.0 * 0.75 ) / ( 2.0 * PI ); + + vec2 polarUV = vec2( d / 0.5, mod( a, 1.0 ) ); + + return polarUV; +} + +vec4 sample( float x, sampler2D sampler, float strength, float tile, float offset, bool repeat ) +{ + x = x * tile + offset; + + if ( ! repeat ) + { + x = clamp( x, 0.0, 1.0 ); + } + + return textureLod( sampler, vec2( x, 0.0 ), 0 ) * strength; +} + +vec4 generateFlare( vec2 _uv, vec4 _color, float _opacity ) +{ + _uv = ( _uv - vec2( 0.5 ) ) * shapeScale + vec2( 0.5 ); + _uv = polarUV( _uv, 0.0 ); + + vec4 _radialFill = sample( _uv.x, radialFill, radialFillStrength, radialFillTile, radialFillOffset, radialFillRepeat ); + vec4 _conicFill = sample( _uv.y, conicFill, conicFillStrength, conicFillTile, conicFillOffset, conicFillRepeat ); + + float _radialMask = sample( _uv.x, radialMask, radialMaskStrength, radialMaskTile, radialMaskOffset, radialMaskRepeat ).r; + float _conicMask = sample( _uv.y, conicMask, conicMaskStrength, conicMaskTile, conicMaskOffset, conicMaskRepeat ).r; + + vec4 fill = _radialFill * _conicFill * fillMultiply + fillAdd * ( _radialFill + _conicFill ); + float mask = _radialMask * _conicMask * maskMultiply + maskAdd * ( _radialMask + _conicMask ); + + vec4 mixedColor = fill; + mixedColor.a *= mask; + + mixedColor = blendColor( mixedColor, _color, shapeColorize ); + + // mixedColor *= _color; + mixedColor.a *= _opacity; + + // mixedColor = vec4( 1.0, 1.0, 1.0, _uv.x ); + + return mixedColor; +} + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc.uid new file mode 100644 index 0000000..eceb72f --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc.uid @@ -0,0 +1 @@ +uid://bj1s1dgcv5ouu diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader new file mode 100644 index 0000000..269cf47 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_add, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader.uid new file mode 100644 index 0000000..74a61e1 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader.uid @@ -0,0 +1 @@ +uid://bbb3acmgbp5p0 diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs new file mode 100644 index 0000000..d94c759 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs @@ -0,0 +1,159 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class EllipseTypeFlareAddShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAdd.gdshader" + ); + //*/ + + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly Sampler2DPropertyName radialFill = Sampler2DPropertyName.Create( "radialFill" ); + public static readonly FloatPropertyName radialFillStrength = FloatPropertyName.Create( "radialFillStrength" ); + public static readonly FloatPropertyName radialFillTile = FloatPropertyName.Create( "radialFillTile" ); + public static readonly FloatPropertyName radialFillOffset = FloatPropertyName.Create( "radialFillOffset" ); + public static readonly BoolPropertyName radialFillRepeat = BoolPropertyName.Create( "radialFillRepeat" ); + public static readonly Sampler2DPropertyName conicFill = Sampler2DPropertyName.Create( "conicFill" ); + public static readonly FloatPropertyName conicFillStrength = FloatPropertyName.Create( "conicFillStrength" ); + public static readonly FloatPropertyName conicFillTile = FloatPropertyName.Create( "conicFillTile" ); + public static readonly FloatPropertyName conicFillOffset = FloatPropertyName.Create( "conicFillOffset" ); + public static readonly BoolPropertyName conicFillRepeat = BoolPropertyName.Create( "conicFillRepeat" ); + public static readonly FloatPropertyName fillMultiply = FloatPropertyName.Create( "fillMultiply" ); + public static readonly FloatPropertyName fillAdd = FloatPropertyName.Create( "fillAdd" ); + public static readonly FloatPropertyName shapeColorize = FloatPropertyName.Create( "shapeColorize" ); + public static readonly Sampler2DPropertyName radialMask = Sampler2DPropertyName.Create( "radialMask" ); + public static readonly FloatPropertyName radialMaskStrength = FloatPropertyName.Create( "radialMaskStrength" ); + public static readonly FloatPropertyName radialMaskTile = FloatPropertyName.Create( "radialMaskTile" ); + public static readonly FloatPropertyName radialMaskOffset = FloatPropertyName.Create( "radialMaskOffset" ); + public static readonly BoolPropertyName radialMaskRepeat = BoolPropertyName.Create( "radialMaskRepeat" ); + public static readonly Sampler2DPropertyName conicMask = Sampler2DPropertyName.Create( "conicMask" ); + public static readonly FloatPropertyName conicMaskStrength = FloatPropertyName.Create( "conicMaskStrength" ); + public static readonly FloatPropertyName conicMaskTile = FloatPropertyName.Create( "conicMaskTile" ); + public static readonly FloatPropertyName conicMaskOffset = FloatPropertyName.Create( "conicMaskOffset" ); + public static readonly BoolPropertyName conicMaskRepeat = BoolPropertyName.Create( "conicMaskRepeat" ); + public static readonly FloatPropertyName maskMultiply = FloatPropertyName.Create( "maskMultiply" ); + public static readonly FloatPropertyName maskAdd = FloatPropertyName.Create( "maskAdd" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class EllipseTypeFlareAddMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty radialFill; + public readonly CustomMaterialProperty radialFillStrength; + public readonly CustomMaterialProperty radialFillTile; + public readonly CustomMaterialProperty radialFillOffset; + public readonly CustomMaterialProperty radialFillRepeat; + public readonly CustomMaterialProperty conicFill; + public readonly CustomMaterialProperty conicFillStrength; + public readonly CustomMaterialProperty conicFillTile; + public readonly CustomMaterialProperty conicFillOffset; + public readonly CustomMaterialProperty conicFillRepeat; + public readonly CustomMaterialProperty fillMultiply; + public readonly CustomMaterialProperty fillAdd; + public readonly CustomMaterialProperty shapeColorize; + public readonly CustomMaterialProperty radialMask; + public readonly CustomMaterialProperty radialMaskStrength; + public readonly CustomMaterialProperty radialMaskTile; + public readonly CustomMaterialProperty radialMaskOffset; + public readonly CustomMaterialProperty radialMaskRepeat; + public readonly CustomMaterialProperty conicMask; + public readonly CustomMaterialProperty conicMaskStrength; + public readonly CustomMaterialProperty conicMaskTile; + public readonly CustomMaterialProperty conicMaskOffset; + public readonly CustomMaterialProperty conicMaskRepeat; + public readonly CustomMaterialProperty maskMultiply; + public readonly CustomMaterialProperty maskAdd; + + public EllipseTypeFlareAddMaterial() + { + ///* + Shader = EllipseTypeFlareAddShader.shader.Get(); + //*/ + + shapeScale = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.shapeScale ); + radialFill = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialFill ); + radialFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialFillStrength ); + radialFillTile = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialFillTile ); + radialFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialFillOffset ); + radialFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialFillRepeat ); + conicFill = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicFill ); + conicFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicFillStrength ); + conicFillTile = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicFillTile ); + conicFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicFillOffset ); + conicFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicFillRepeat ); + fillMultiply = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.fillMultiply ); + fillAdd = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.fillAdd ); + shapeColorize = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.shapeColorize ); + radialMask = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialMask ); + radialMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialMaskStrength ); + radialMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialMaskTile ); + radialMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialMaskOffset ); + radialMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.radialMaskRepeat ); + conicMask = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicMask ); + conicMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicMaskStrength ); + conicMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicMaskTile ); + conicMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicMaskOffset ); + conicMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.conicMaskRepeat ); + maskMultiply = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.maskMultiply ); + maskAdd = new CustomMaterialProperty( this, EllipseTypeFlareAddShader.maskAdd ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs.uid new file mode 100644 index 0000000..4f99361 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareAddMaterial.cs.uid @@ -0,0 +1 @@ +uid://cc3jq0uc5ukxw diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader new file mode 100644 index 0000000..3db78bc --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_mix, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader.uid new file mode 100644 index 0000000..98e4834 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader.uid @@ -0,0 +1 @@ +uid://dhxsdn5ken8ed diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs new file mode 100644 index 0000000..cdc7a1f --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs @@ -0,0 +1,159 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class EllipseTypeFlareMixShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMix.gdshader" + ); + //*/ + + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly Sampler2DPropertyName radialFill = Sampler2DPropertyName.Create( "radialFill" ); + public static readonly FloatPropertyName radialFillStrength = FloatPropertyName.Create( "radialFillStrength" ); + public static readonly FloatPropertyName radialFillTile = FloatPropertyName.Create( "radialFillTile" ); + public static readonly FloatPropertyName radialFillOffset = FloatPropertyName.Create( "radialFillOffset" ); + public static readonly BoolPropertyName radialFillRepeat = BoolPropertyName.Create( "radialFillRepeat" ); + public static readonly Sampler2DPropertyName conicFill = Sampler2DPropertyName.Create( "conicFill" ); + public static readonly FloatPropertyName conicFillStrength = FloatPropertyName.Create( "conicFillStrength" ); + public static readonly FloatPropertyName conicFillTile = FloatPropertyName.Create( "conicFillTile" ); + public static readonly FloatPropertyName conicFillOffset = FloatPropertyName.Create( "conicFillOffset" ); + public static readonly BoolPropertyName conicFillRepeat = BoolPropertyName.Create( "conicFillRepeat" ); + public static readonly FloatPropertyName fillMultiply = FloatPropertyName.Create( "fillMultiply" ); + public static readonly FloatPropertyName fillAdd = FloatPropertyName.Create( "fillAdd" ); + public static readonly FloatPropertyName shapeColorize = FloatPropertyName.Create( "shapeColorize" ); + public static readonly Sampler2DPropertyName radialMask = Sampler2DPropertyName.Create( "radialMask" ); + public static readonly FloatPropertyName radialMaskStrength = FloatPropertyName.Create( "radialMaskStrength" ); + public static readonly FloatPropertyName radialMaskTile = FloatPropertyName.Create( "radialMaskTile" ); + public static readonly FloatPropertyName radialMaskOffset = FloatPropertyName.Create( "radialMaskOffset" ); + public static readonly BoolPropertyName radialMaskRepeat = BoolPropertyName.Create( "radialMaskRepeat" ); + public static readonly Sampler2DPropertyName conicMask = Sampler2DPropertyName.Create( "conicMask" ); + public static readonly FloatPropertyName conicMaskStrength = FloatPropertyName.Create( "conicMaskStrength" ); + public static readonly FloatPropertyName conicMaskTile = FloatPropertyName.Create( "conicMaskTile" ); + public static readonly FloatPropertyName conicMaskOffset = FloatPropertyName.Create( "conicMaskOffset" ); + public static readonly BoolPropertyName conicMaskRepeat = BoolPropertyName.Create( "conicMaskRepeat" ); + public static readonly FloatPropertyName maskMultiply = FloatPropertyName.Create( "maskMultiply" ); + public static readonly FloatPropertyName maskAdd = FloatPropertyName.Create( "maskAdd" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class EllipseTypeFlareMixMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty radialFill; + public readonly CustomMaterialProperty radialFillStrength; + public readonly CustomMaterialProperty radialFillTile; + public readonly CustomMaterialProperty radialFillOffset; + public readonly CustomMaterialProperty radialFillRepeat; + public readonly CustomMaterialProperty conicFill; + public readonly CustomMaterialProperty conicFillStrength; + public readonly CustomMaterialProperty conicFillTile; + public readonly CustomMaterialProperty conicFillOffset; + public readonly CustomMaterialProperty conicFillRepeat; + public readonly CustomMaterialProperty fillMultiply; + public readonly CustomMaterialProperty fillAdd; + public readonly CustomMaterialProperty shapeColorize; + public readonly CustomMaterialProperty radialMask; + public readonly CustomMaterialProperty radialMaskStrength; + public readonly CustomMaterialProperty radialMaskTile; + public readonly CustomMaterialProperty radialMaskOffset; + public readonly CustomMaterialProperty radialMaskRepeat; + public readonly CustomMaterialProperty conicMask; + public readonly CustomMaterialProperty conicMaskStrength; + public readonly CustomMaterialProperty conicMaskTile; + public readonly CustomMaterialProperty conicMaskOffset; + public readonly CustomMaterialProperty conicMaskRepeat; + public readonly CustomMaterialProperty maskMultiply; + public readonly CustomMaterialProperty maskAdd; + + public EllipseTypeFlareMixMaterial() + { + ///* + Shader = EllipseTypeFlareMixShader.shader.Get(); + //*/ + + shapeScale = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.shapeScale ); + radialFill = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialFill ); + radialFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialFillStrength ); + radialFillTile = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialFillTile ); + radialFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialFillOffset ); + radialFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialFillRepeat ); + conicFill = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicFill ); + conicFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicFillStrength ); + conicFillTile = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicFillTile ); + conicFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicFillOffset ); + conicFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicFillRepeat ); + fillMultiply = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.fillMultiply ); + fillAdd = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.fillAdd ); + shapeColorize = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.shapeColorize ); + radialMask = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialMask ); + radialMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialMaskStrength ); + radialMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialMaskTile ); + radialMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialMaskOffset ); + radialMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.radialMaskRepeat ); + conicMask = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicMask ); + conicMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicMaskStrength ); + conicMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicMaskTile ); + conicMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicMaskOffset ); + conicMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.conicMaskRepeat ); + maskMultiply = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.maskMultiply ); + maskAdd = new CustomMaterialProperty( this, EllipseTypeFlareMixShader.maskAdd ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs.uid new file mode 100644 index 0000000..e82d42a --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMixMaterial.cs.uid @@ -0,0 +1 @@ +uid://bwvyiolbcntu diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader new file mode 100644 index 0000000..ebad498 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_mul, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader.uid new file mode 100644 index 0000000..79bc98f --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader.uid @@ -0,0 +1 @@ +uid://cnw5dyqni2cc3 diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs new file mode 100644 index 0000000..0ed9e9c --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs @@ -0,0 +1,159 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class EllipseTypeFlareMultiplyShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiply.gdshader" + ); + //*/ + + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly Sampler2DPropertyName radialFill = Sampler2DPropertyName.Create( "radialFill" ); + public static readonly FloatPropertyName radialFillStrength = FloatPropertyName.Create( "radialFillStrength" ); + public static readonly FloatPropertyName radialFillTile = FloatPropertyName.Create( "radialFillTile" ); + public static readonly FloatPropertyName radialFillOffset = FloatPropertyName.Create( "radialFillOffset" ); + public static readonly BoolPropertyName radialFillRepeat = BoolPropertyName.Create( "radialFillRepeat" ); + public static readonly Sampler2DPropertyName conicFill = Sampler2DPropertyName.Create( "conicFill" ); + public static readonly FloatPropertyName conicFillStrength = FloatPropertyName.Create( "conicFillStrength" ); + public static readonly FloatPropertyName conicFillTile = FloatPropertyName.Create( "conicFillTile" ); + public static readonly FloatPropertyName conicFillOffset = FloatPropertyName.Create( "conicFillOffset" ); + public static readonly BoolPropertyName conicFillRepeat = BoolPropertyName.Create( "conicFillRepeat" ); + public static readonly FloatPropertyName fillMultiply = FloatPropertyName.Create( "fillMultiply" ); + public static readonly FloatPropertyName fillAdd = FloatPropertyName.Create( "fillAdd" ); + public static readonly FloatPropertyName shapeColorize = FloatPropertyName.Create( "shapeColorize" ); + public static readonly Sampler2DPropertyName radialMask = Sampler2DPropertyName.Create( "radialMask" ); + public static readonly FloatPropertyName radialMaskStrength = FloatPropertyName.Create( "radialMaskStrength" ); + public static readonly FloatPropertyName radialMaskTile = FloatPropertyName.Create( "radialMaskTile" ); + public static readonly FloatPropertyName radialMaskOffset = FloatPropertyName.Create( "radialMaskOffset" ); + public static readonly BoolPropertyName radialMaskRepeat = BoolPropertyName.Create( "radialMaskRepeat" ); + public static readonly Sampler2DPropertyName conicMask = Sampler2DPropertyName.Create( "conicMask" ); + public static readonly FloatPropertyName conicMaskStrength = FloatPropertyName.Create( "conicMaskStrength" ); + public static readonly FloatPropertyName conicMaskTile = FloatPropertyName.Create( "conicMaskTile" ); + public static readonly FloatPropertyName conicMaskOffset = FloatPropertyName.Create( "conicMaskOffset" ); + public static readonly BoolPropertyName conicMaskRepeat = BoolPropertyName.Create( "conicMaskRepeat" ); + public static readonly FloatPropertyName maskMultiply = FloatPropertyName.Create( "maskMultiply" ); + public static readonly FloatPropertyName maskAdd = FloatPropertyName.Create( "maskAdd" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class EllipseTypeFlareMultiplyMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty radialFill; + public readonly CustomMaterialProperty radialFillStrength; + public readonly CustomMaterialProperty radialFillTile; + public readonly CustomMaterialProperty radialFillOffset; + public readonly CustomMaterialProperty radialFillRepeat; + public readonly CustomMaterialProperty conicFill; + public readonly CustomMaterialProperty conicFillStrength; + public readonly CustomMaterialProperty conicFillTile; + public readonly CustomMaterialProperty conicFillOffset; + public readonly CustomMaterialProperty conicFillRepeat; + public readonly CustomMaterialProperty fillMultiply; + public readonly CustomMaterialProperty fillAdd; + public readonly CustomMaterialProperty shapeColorize; + public readonly CustomMaterialProperty radialMask; + public readonly CustomMaterialProperty radialMaskStrength; + public readonly CustomMaterialProperty radialMaskTile; + public readonly CustomMaterialProperty radialMaskOffset; + public readonly CustomMaterialProperty radialMaskRepeat; + public readonly CustomMaterialProperty conicMask; + public readonly CustomMaterialProperty conicMaskStrength; + public readonly CustomMaterialProperty conicMaskTile; + public readonly CustomMaterialProperty conicMaskOffset; + public readonly CustomMaterialProperty conicMaskRepeat; + public readonly CustomMaterialProperty maskMultiply; + public readonly CustomMaterialProperty maskAdd; + + public EllipseTypeFlareMultiplyMaterial() + { + ///* + Shader = EllipseTypeFlareMultiplyShader.shader.Get(); + //*/ + + shapeScale = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.shapeScale ); + radialFill = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialFill ); + radialFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialFillStrength ); + radialFillTile = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialFillTile ); + radialFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialFillOffset ); + radialFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialFillRepeat ); + conicFill = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicFill ); + conicFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicFillStrength ); + conicFillTile = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicFillTile ); + conicFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicFillOffset ); + conicFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicFillRepeat ); + fillMultiply = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.fillMultiply ); + fillAdd = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.fillAdd ); + shapeColorize = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.shapeColorize ); + radialMask = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialMask ); + radialMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialMaskStrength ); + radialMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialMaskTile ); + radialMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialMaskOffset ); + radialMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.radialMaskRepeat ); + conicMask = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicMask ); + conicMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicMaskStrength ); + conicMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicMaskTile ); + conicMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicMaskOffset ); + conicMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.conicMaskRepeat ); + maskMultiply = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.maskMultiply ); + maskAdd = new CustomMaterialProperty( this, EllipseTypeFlareMultiplyShader.maskAdd ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs.uid new file mode 100644 index 0000000..550f818 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareMultiplyMaterial.cs.uid @@ -0,0 +1 @@ +uid://bqgmn4pb6dfxy diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader new file mode 100644 index 0000000..20edece --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_sub, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/EllipseTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader.uid new file mode 100644 index 0000000..626c3f5 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader.uid @@ -0,0 +1 @@ +uid://yiju1m12j0o5 diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs new file mode 100644 index 0000000..4ac103a --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs @@ -0,0 +1,159 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class EllipseTypeFlareSubtractShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtract.gdshader" + ); + //*/ + + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly Sampler2DPropertyName radialFill = Sampler2DPropertyName.Create( "radialFill" ); + public static readonly FloatPropertyName radialFillStrength = FloatPropertyName.Create( "radialFillStrength" ); + public static readonly FloatPropertyName radialFillTile = FloatPropertyName.Create( "radialFillTile" ); + public static readonly FloatPropertyName radialFillOffset = FloatPropertyName.Create( "radialFillOffset" ); + public static readonly BoolPropertyName radialFillRepeat = BoolPropertyName.Create( "radialFillRepeat" ); + public static readonly Sampler2DPropertyName conicFill = Sampler2DPropertyName.Create( "conicFill" ); + public static readonly FloatPropertyName conicFillStrength = FloatPropertyName.Create( "conicFillStrength" ); + public static readonly FloatPropertyName conicFillTile = FloatPropertyName.Create( "conicFillTile" ); + public static readonly FloatPropertyName conicFillOffset = FloatPropertyName.Create( "conicFillOffset" ); + public static readonly BoolPropertyName conicFillRepeat = BoolPropertyName.Create( "conicFillRepeat" ); + public static readonly FloatPropertyName fillMultiply = FloatPropertyName.Create( "fillMultiply" ); + public static readonly FloatPropertyName fillAdd = FloatPropertyName.Create( "fillAdd" ); + public static readonly FloatPropertyName shapeColorize = FloatPropertyName.Create( "shapeColorize" ); + public static readonly Sampler2DPropertyName radialMask = Sampler2DPropertyName.Create( "radialMask" ); + public static readonly FloatPropertyName radialMaskStrength = FloatPropertyName.Create( "radialMaskStrength" ); + public static readonly FloatPropertyName radialMaskTile = FloatPropertyName.Create( "radialMaskTile" ); + public static readonly FloatPropertyName radialMaskOffset = FloatPropertyName.Create( "radialMaskOffset" ); + public static readonly BoolPropertyName radialMaskRepeat = BoolPropertyName.Create( "radialMaskRepeat" ); + public static readonly Sampler2DPropertyName conicMask = Sampler2DPropertyName.Create( "conicMask" ); + public static readonly FloatPropertyName conicMaskStrength = FloatPropertyName.Create( "conicMaskStrength" ); + public static readonly FloatPropertyName conicMaskTile = FloatPropertyName.Create( "conicMaskTile" ); + public static readonly FloatPropertyName conicMaskOffset = FloatPropertyName.Create( "conicMaskOffset" ); + public static readonly BoolPropertyName conicMaskRepeat = BoolPropertyName.Create( "conicMaskRepeat" ); + public static readonly FloatPropertyName maskMultiply = FloatPropertyName.Create( "maskMultiply" ); + public static readonly FloatPropertyName maskAdd = FloatPropertyName.Create( "maskAdd" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class EllipseTypeFlareSubtractMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty radialFill; + public readonly CustomMaterialProperty radialFillStrength; + public readonly CustomMaterialProperty radialFillTile; + public readonly CustomMaterialProperty radialFillOffset; + public readonly CustomMaterialProperty radialFillRepeat; + public readonly CustomMaterialProperty conicFill; + public readonly CustomMaterialProperty conicFillStrength; + public readonly CustomMaterialProperty conicFillTile; + public readonly CustomMaterialProperty conicFillOffset; + public readonly CustomMaterialProperty conicFillRepeat; + public readonly CustomMaterialProperty fillMultiply; + public readonly CustomMaterialProperty fillAdd; + public readonly CustomMaterialProperty shapeColorize; + public readonly CustomMaterialProperty radialMask; + public readonly CustomMaterialProperty radialMaskStrength; + public readonly CustomMaterialProperty radialMaskTile; + public readonly CustomMaterialProperty radialMaskOffset; + public readonly CustomMaterialProperty radialMaskRepeat; + public readonly CustomMaterialProperty conicMask; + public readonly CustomMaterialProperty conicMaskStrength; + public readonly CustomMaterialProperty conicMaskTile; + public readonly CustomMaterialProperty conicMaskOffset; + public readonly CustomMaterialProperty conicMaskRepeat; + public readonly CustomMaterialProperty maskMultiply; + public readonly CustomMaterialProperty maskAdd; + + public EllipseTypeFlareSubtractMaterial() + { + ///* + Shader = EllipseTypeFlareSubtractShader.shader.Get(); + //*/ + + shapeScale = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.shapeScale ); + radialFill = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialFill ); + radialFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialFillStrength ); + radialFillTile = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialFillTile ); + radialFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialFillOffset ); + radialFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialFillRepeat ); + conicFill = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicFill ); + conicFillStrength = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicFillStrength ); + conicFillTile = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicFillTile ); + conicFillOffset = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicFillOffset ); + conicFillRepeat = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicFillRepeat ); + fillMultiply = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.fillMultiply ); + fillAdd = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.fillAdd ); + shapeColorize = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.shapeColorize ); + radialMask = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialMask ); + radialMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialMaskStrength ); + radialMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialMaskTile ); + radialMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialMaskOffset ); + radialMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.radialMaskRepeat ); + conicMask = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicMask ); + conicMaskStrength = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicMaskStrength ); + conicMaskTile = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicMaskTile ); + conicMaskOffset = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicMaskOffset ); + conicMaskRepeat = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.conicMaskRepeat ); + maskMultiply = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.maskMultiply ); + maskAdd = new CustomMaterialProperty( this, EllipseTypeFlareSubtractShader.maskAdd ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs.uid new file mode 100644 index 0000000..19a4ff9 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/EllipseType/Variants/EllipseTypeFlareSubtractMaterial.cs.uid @@ -0,0 +1 @@ +uid://mdm8f3wiuww diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs similarity index 64% rename from Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs rename to Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs index 37fe8ec..2e66265 100644 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs +++ b/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs @@ -4,10 +4,10 @@ namespace Rokojori { // Generated by ShaderClassGenerator - public class GlowFlareMixShader + public class FlareSuperBaseShader { public static readonly CachedResource shader = new CachedResource( - "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader" + "C:/rokojori/godot-projects/winter-tales/addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/FlareSuperBase.gdshader" ); public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); @@ -24,10 +24,6 @@ namespace Rokojori public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); - public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); - public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); - public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); - public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); public static readonly BoolPropertyName useQuickOcclusionTest = BoolPropertyName.Create( "useQuickOcclusionTest" ); public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); @@ -38,7 +34,7 @@ namespace Rokojori } [Tool] - public partial class GlowFlareMixMaterial:CustomMaterial + public partial class FlareSuperBaseMaterial:CustomMaterial { @@ -56,10 +52,6 @@ namespace Rokojori public readonly CustomMaterialProperty worldSizeVsScreenSize; public readonly CustomMaterialProperty screenOffsetScale; public readonly CustomMaterialProperty screenOffsetLayerSpread; - public readonly CustomMaterialProperty fading; - public readonly CustomMaterialProperty opacityFading; - public readonly CustomMaterialProperty sizeXfading; - public readonly CustomMaterialProperty sizeYfading; public readonly CustomMaterialProperty useQuickOcclusionTest; public readonly CustomMaterialProperty occlusionZOffset; public readonly CustomMaterialProperty occlusionTestMaxSteps; @@ -67,34 +59,30 @@ namespace Rokojori public readonly CustomMaterialProperty occlusionTestViewDependingScaleAmount; public readonly CustomMaterialProperty occlusionTestViewDependingDistance; - public GlowFlareMixMaterial() + public FlareSuperBaseMaterial() { - Shader = GlowFlareMixShader.shader.Get(); + Shader = FlareSuperBaseShader.shader.Get(); - color = new CustomMaterialProperty( this, GlowFlareMixShader.color ); - opacity = new CustomMaterialProperty( this, GlowFlareMixShader.opacity ); - opacityCurve = new CustomMaterialProperty( this, GlowFlareMixShader.opacityCurve ); - colorDistortion = new CustomMaterialProperty( this, GlowFlareMixShader.colorDistortion ); - alphaDistortion = new CustomMaterialProperty( this, GlowFlareMixShader.alphaDistortion ); - centerHsl = new CustomMaterialProperty( this, GlowFlareMixShader.centerHsl ); - outsideHsl = new CustomMaterialProperty( this, GlowFlareMixShader.outsideHsl ); - sizeX = new CustomMaterialProperty( this, GlowFlareMixShader.sizeX ); - sizeY = new CustomMaterialProperty( this, GlowFlareMixShader.sizeY ); - worldSizeScale = new CustomMaterialProperty( this, GlowFlareMixShader.worldSizeScale ); - screenSizeScale = new CustomMaterialProperty( this, GlowFlareMixShader.screenSizeScale ); - worldSizeVsScreenSize = new CustomMaterialProperty( this, GlowFlareMixShader.worldSizeVsScreenSize ); - screenOffsetScale = new CustomMaterialProperty( this, GlowFlareMixShader.screenOffsetScale ); - screenOffsetLayerSpread = new CustomMaterialProperty( this, GlowFlareMixShader.screenOffsetLayerSpread ); - fading = new CustomMaterialProperty( this, GlowFlareMixShader.fading ); - opacityFading = new CustomMaterialProperty( this, GlowFlareMixShader.opacityFading ); - sizeXfading = new CustomMaterialProperty( this, GlowFlareMixShader.sizeXfading ); - sizeYfading = new CustomMaterialProperty( this, GlowFlareMixShader.sizeYfading ); - useQuickOcclusionTest = new CustomMaterialProperty( this, GlowFlareMixShader.useQuickOcclusionTest ); - occlusionZOffset = new CustomMaterialProperty( this, GlowFlareMixShader.occlusionZOffset ); - occlusionTestMaxSteps = new CustomMaterialProperty( this, GlowFlareMixShader.occlusionTestMaxSteps ); - occlusionTestStepStride = new CustomMaterialProperty( this, GlowFlareMixShader.occlusionTestStepStride ); - occlusionTestViewDependingScaleAmount = new CustomMaterialProperty( this, GlowFlareMixShader.occlusionTestViewDependingScaleAmount ); - occlusionTestViewDependingDistance = new CustomMaterialProperty( this, GlowFlareMixShader.occlusionTestViewDependingDistance ); + color = new CustomMaterialProperty( this, FlareSuperBaseShader.color ); + opacity = new CustomMaterialProperty( this, FlareSuperBaseShader.opacity ); + opacityCurve = new CustomMaterialProperty( this, FlareSuperBaseShader.opacityCurve ); + colorDistortion = new CustomMaterialProperty( this, FlareSuperBaseShader.colorDistortion ); + alphaDistortion = new CustomMaterialProperty( this, FlareSuperBaseShader.alphaDistortion ); + centerHsl = new CustomMaterialProperty( this, FlareSuperBaseShader.centerHsl ); + outsideHsl = new CustomMaterialProperty( this, FlareSuperBaseShader.outsideHsl ); + sizeX = new CustomMaterialProperty( this, FlareSuperBaseShader.sizeX ); + sizeY = new CustomMaterialProperty( this, FlareSuperBaseShader.sizeY ); + worldSizeScale = new CustomMaterialProperty( this, FlareSuperBaseShader.worldSizeScale ); + screenSizeScale = new CustomMaterialProperty( this, FlareSuperBaseShader.screenSizeScale ); + worldSizeVsScreenSize = new CustomMaterialProperty( this, FlareSuperBaseShader.worldSizeVsScreenSize ); + screenOffsetScale = new CustomMaterialProperty( this, FlareSuperBaseShader.screenOffsetScale ); + screenOffsetLayerSpread = new CustomMaterialProperty( this, FlareSuperBaseShader.screenOffsetLayerSpread ); + useQuickOcclusionTest = new CustomMaterialProperty( this, FlareSuperBaseShader.useQuickOcclusionTest ); + occlusionZOffset = new CustomMaterialProperty( this, FlareSuperBaseShader.occlusionZOffset ); + occlusionTestMaxSteps = new CustomMaterialProperty( this, FlareSuperBaseShader.occlusionTestMaxSteps ); + occlusionTestStepStride = new CustomMaterialProperty( this, FlareSuperBaseShader.occlusionTestStepStride ); + occlusionTestViewDependingScaleAmount = new CustomMaterialProperty( this, FlareSuperBaseShader.occlusionTestViewDependingScaleAmount ); + occlusionTestViewDependingDistance = new CustomMaterialProperty( this, FlareSuperBaseShader.occlusionTestViewDependingDistance ); } } diff --git a/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs.uid new file mode 100644 index 0000000..50f5fd0 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/FlareSuperBaseMaterial.cs.uid @@ -0,0 +1 @@ +uid://ckl8r152vrngh diff --git a/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc b/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc index 6f230d0..e4b54c6 100644 --- a/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc +++ b/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc @@ -1,7 +1,17 @@ -void setFlareBillboard( - inout mat4 _MODELVIEW_MATRIX, inout mat3 _MODELVIEW_NORMAL_MATRIX, - mat4 _VIEW_MATRIX, mat4 _MAIN_CAM_INV_VIEW_MATRIX, mat4 _MODEL_MATRIX, - vec3 scale, vec2 _screenOffsetScale +#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Colors.gdshaderinc" +#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Math.gdshaderinc" +#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Transform.gdshaderinc" +#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Depth.gdshaderinc" +#include "res://addons/rokojori_action_library/Runtime/Shading/Library/SDF.gdshaderinc" +#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Noise.gdshaderinc" + +void setFlareOffsetMatrix( + inout mat4 _MODELVIEW_MATRIX, + mat4 _VIEW_MATRIX, + mat4 _MAIN_CAM_INV_VIEW_MATRIX, + mat4 _MODEL_MATRIX, + vec2 _screenOffsetScale, + vec2 _offset ) { _MODELVIEW_MATRIX = _VIEW_MATRIX * mat4( @@ -11,22 +21,47 @@ void setFlareBillboard( _MODEL_MATRIX[ 3 ] ); - vec3 viewPosition = _MODELVIEW_MATRIX[ 3 ].xyz; + vec3 _viewPosition = _MODELVIEW_MATRIX[ 3 ].xyz; - viewPosition.xy += viewPosition.xy * _screenOffsetScale; + + _viewPosition.xy += _viewPosition.xy * _screenOffsetScale + _offset; + - _MODELVIEW_MATRIX[ 3 ].xyz = viewPosition; + _MODELVIEW_MATRIX[ 3 ].xyz = _viewPosition; +} - float scaleX = length( _MODEL_MATRIX[ 0 ].xyz ) * scale.x; - float scaleY = length( _MODEL_MATRIX[ 1 ].xyz ) * scale.y; - float scaleZ = length( _MODEL_MATRIX[ 2 ].xyz ) * scale.z; +void setFlareScaleRotation( + inout mat4 _MODELVIEW_MATRIX, + inout mat3 _MODELVIEW_NORMAL_MATRIX, + mat4 _MODEL_MATRIX, + vec3 _scale, float _vertexRotation +) +{ + // _MODELVIEW_MATRIX = _VIEW_MATRIX * mat4( + // _MAIN_CAM_INV_VIEW_MATRIX[ 0 ], + // _MAIN_CAM_INV_VIEW_MATRIX[ 1 ], + // _MAIN_CAM_INV_VIEW_MATRIX[ 2 ], + // _MODEL_MATRIX[ 3 ] + // ); - _MODELVIEW_MATRIX = _MODELVIEW_MATRIX * mat4( - vec4( scaleX, 0.0, 0.0, 0.0 ), - vec4( 0.0, scaleY, 0.0, 0.0 ), - vec4( 0.0, 0.0, scaleZ, 0.0 ), + // vec3 _viewPosition = _MODELVIEW_MATRIX[ 3 ].xyz; + + + // _viewPosition.xy += _viewPosition.xy * _screenOffsetScale; + + + // _MODELVIEW_MATRIX[ 3 ].xyz = _viewPosition; + + float _scaleX = length( _MODEL_MATRIX[ 0 ].xyz ) * _scale.x; + float _scaleY = length( _MODEL_MATRIX[ 1 ].xyz ) * _scale.y; + float _scaleZ = length( _MODEL_MATRIX[ 2 ].xyz ) * _scale.z; + + _MODELVIEW_MATRIX = _MODELVIEW_MATRIX * rotationZ_m4( _vertexRotation ) * mat4( + vec4( _scaleX, 0.0, 0.0, 0.0 ), + vec4( 0.0, _scaleY, 0.0, 0.0 ), + vec4( 0.0, 0.0, _scaleZ, 0.0 ), vec4( 0.0, 0.0, 0.0, 1.0 ) - ); + ) ; - _MODELVIEW_NORMAL_MATRIX = mat3( _MODELVIEW_MATRIX); + _MODELVIEW_NORMAL_MATRIX = mat3( _MODELVIEW_MATRIX ); } \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader.uid b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader.uid deleted file mode 100644 index da5aa9d..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cqyc7q1cj6yso diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs deleted file mode 100644 index 2a2a6db..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs +++ /dev/null @@ -1,102 +0,0 @@ -using Godot; - -namespace Rokojori -{ - // Generated by ShaderClassGenerator - - public class GlowFlareAddShader - { - public static readonly CachedResource shader = new CachedResource( - "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader" - ); - - public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); - public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); - public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); - public static readonly FloatPropertyName colorDistortion = FloatPropertyName.Create( "colorDistortion" ); - public static readonly FloatPropertyName alphaDistortion = FloatPropertyName.Create( "alphaDistortion" ); - public static readonly Vector4PropertyName centerHsl = Vector4PropertyName.Create( "centerHSL" ); - public static readonly Vector4PropertyName outsideHsl = Vector4PropertyName.Create( "outsideHSL" ); - public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); - public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); - public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); - public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); - public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); - public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); - public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); - public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); - public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); - public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); - public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); - public static readonly BoolPropertyName useQuickOcclusionTest = BoolPropertyName.Create( "useQuickOcclusionTest" ); - public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); - public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); - public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); - public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); - public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); - - } - - [Tool] - public partial class GlowFlareAddMaterial:CustomMaterial - { - - - public readonly CustomMaterialProperty color; - public readonly CustomMaterialProperty opacity; - public readonly CustomMaterialProperty opacityCurve; - public readonly CustomMaterialProperty colorDistortion; - public readonly CustomMaterialProperty alphaDistortion; - public readonly CustomMaterialProperty centerHsl; - public readonly CustomMaterialProperty outsideHsl; - public readonly CustomMaterialProperty sizeX; - public readonly CustomMaterialProperty sizeY; - public readonly CustomMaterialProperty worldSizeScale; - public readonly CustomMaterialProperty screenSizeScale; - public readonly CustomMaterialProperty worldSizeVsScreenSize; - public readonly CustomMaterialProperty screenOffsetScale; - public readonly CustomMaterialProperty screenOffsetLayerSpread; - public readonly CustomMaterialProperty fading; - public readonly CustomMaterialProperty opacityFading; - public readonly CustomMaterialProperty sizeXfading; - public readonly CustomMaterialProperty sizeYfading; - public readonly CustomMaterialProperty useQuickOcclusionTest; - public readonly CustomMaterialProperty occlusionZOffset; - public readonly CustomMaterialProperty occlusionTestMaxSteps; - public readonly CustomMaterialProperty occlusionTestStepStride; - public readonly CustomMaterialProperty occlusionTestViewDependingScaleAmount; - public readonly CustomMaterialProperty occlusionTestViewDependingDistance; - - public GlowFlareAddMaterial() - { - Shader = GlowFlareAddShader.shader.Get(); - - color = new CustomMaterialProperty( this, GlowFlareAddShader.color ); - opacity = new CustomMaterialProperty( this, GlowFlareAddShader.opacity ); - opacityCurve = new CustomMaterialProperty( this, GlowFlareAddShader.opacityCurve ); - colorDistortion = new CustomMaterialProperty( this, GlowFlareAddShader.colorDistortion ); - alphaDistortion = new CustomMaterialProperty( this, GlowFlareAddShader.alphaDistortion ); - centerHsl = new CustomMaterialProperty( this, GlowFlareAddShader.centerHsl ); - outsideHsl = new CustomMaterialProperty( this, GlowFlareAddShader.outsideHsl ); - sizeX = new CustomMaterialProperty( this, GlowFlareAddShader.sizeX ); - sizeY = new CustomMaterialProperty( this, GlowFlareAddShader.sizeY ); - worldSizeScale = new CustomMaterialProperty( this, GlowFlareAddShader.worldSizeScale ); - screenSizeScale = new CustomMaterialProperty( this, GlowFlareAddShader.screenSizeScale ); - worldSizeVsScreenSize = new CustomMaterialProperty( this, GlowFlareAddShader.worldSizeVsScreenSize ); - screenOffsetScale = new CustomMaterialProperty( this, GlowFlareAddShader.screenOffsetScale ); - screenOffsetLayerSpread = new CustomMaterialProperty( this, GlowFlareAddShader.screenOffsetLayerSpread ); - fading = new CustomMaterialProperty( this, GlowFlareAddShader.fading ); - opacityFading = new CustomMaterialProperty( this, GlowFlareAddShader.opacityFading ); - sizeXfading = new CustomMaterialProperty( this, GlowFlareAddShader.sizeXfading ); - sizeYfading = new CustomMaterialProperty( this, GlowFlareAddShader.sizeYfading ); - useQuickOcclusionTest = new CustomMaterialProperty( this, GlowFlareAddShader.useQuickOcclusionTest ); - occlusionZOffset = new CustomMaterialProperty( this, GlowFlareAddShader.occlusionZOffset ); - occlusionTestMaxSteps = new CustomMaterialProperty( this, GlowFlareAddShader.occlusionTestMaxSteps ); - occlusionTestStepStride = new CustomMaterialProperty( this, GlowFlareAddShader.occlusionTestStepStride ); - occlusionTestViewDependingScaleAmount = new CustomMaterialProperty( this, GlowFlareAddShader.occlusionTestViewDependingScaleAmount ); - occlusionTestViewDependingDistance = new CustomMaterialProperty( this, GlowFlareAddShader.occlusionTestViewDependingDistance ); - } - - } - -} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs.uid deleted file mode 100644 index 4edf20f..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAddMaterial.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://b751ojo6ggfls diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc deleted file mode 100644 index 4da79f5..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc +++ /dev/null @@ -1,178 +0,0 @@ - -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Colors.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Math.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Transform.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Depth.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc" - -// COLOR -group_uniforms Color; -uniform sampler2D depthTexture:hint_depth_texture; -uniform vec4 color : source_color = vec4( 0.887, 0.434, 0.233, 1.0 ); -uniform float opacity = 1; -uniform sampler2D opacityCurve:source_color; - -uniform float colorDistortion:hint_range(0.2,20) = 2; -uniform float alphaDistortion:hint_range(0.2,20) = 2; - -uniform vec4 centerHSL = vec4( 0.08, 0.0, 0.18, 1.0 ); -varying vec4 centerColor; - -uniform vec4 outsideHSL = vec4( -0.05, 1.65, 0.02, 0.0 ); -varying vec4 outsideColor; - -group_uniforms; - -// SIZE -group_uniforms Size; -uniform float sizeX:hint_range(1,100) = 1; -uniform float sizeY:hint_range(1,100) = 1; -uniform float worldSizeScale = 1; -uniform float screenSizeScale = 1; -uniform float worldSize_vs_screenSize:hint_range(0,1) = 0.5; -group_uniforms; - -// SCREEN OFFSET -group_uniforms ScreenOffset; -uniform vec2 screenOffsetScale = vec2( 0, 0 ); -uniform vec2 screenOffsetLayerSpread = vec2( 0, 0 ); - -group_uniforms; - -// Fading -group_uniforms Fading; -uniform sampler2D fading:source_color, repeat_disable, filter_linear; -uniform sampler2D opacityFading:source_color, repeat_disable, filter_linear; -uniform sampler2D sizeXfading:source_color, repeat_disable, filter_linear; -uniform sampler2D sizeYfading:source_color, repeat_disable, filter_linear; -varying float opacityFadeValue; -group_uniforms; - - -// OCCLUSION -group_uniforms Occlusion; -uniform bool useQuickOcclusionTest = false; -uniform float occlusionZOffset:hint_range(-30,30) = 0; -uniform int occlusionTestMaxSteps = 10; -uniform float occlusionTestStepStride = 1; -uniform float occlusionTest_ViewDependingScaleAmount:hint_range(0,1) = 0.5; -uniform float occlusionTest_ViewDependingDistance = 100; -varying float occlusionAlpha; -group_uniforms; - -// void setFlareBillboard( -// inout mat4 _MODELVIEW_MATRIX, inout mat3 _MODELVIEW_NORMAL_MATRIX, -// mat4 _VIEW_MATRIX, mat4 _MAIN_CAM_INV_VIEW_MATRIX, mat4 _MODEL_MATRIX, -// vec3 scale, vec2 _screenOffsetScale -// ) -// { -// _MODELVIEW_MATRIX = _VIEW_MATRIX * mat4( -// _MAIN_CAM_INV_VIEW_MATRIX[ 0 ], -// _MAIN_CAM_INV_VIEW_MATRIX[ 1 ], -// _MAIN_CAM_INV_VIEW_MATRIX[ 2 ], -// _MODEL_MATRIX[ 3 ] -// ); - -// vec3 viewPosition = _MODELVIEW_MATRIX[ 3 ].xyz; - -// viewPosition.xy += viewPosition.xy * _screenOffsetScale; - -// _MODELVIEW_MATRIX[ 3 ].xyz = viewPosition; - -// float scaleX = length( _MODEL_MATRIX[ 0 ].xyz ) * scale.x; -// float scaleY = length( _MODEL_MATRIX[ 1 ].xyz ) * scale.y; -// float scaleZ = length( _MODEL_MATRIX[ 2 ].xyz ) * scale.z; - -// _MODELVIEW_MATRIX = _MODELVIEW_MATRIX * mat4( -// vec4( scaleX, 0.0, 0.0, 0.0 ), -// vec4( 0.0, scaleY, 0.0, 0.0 ), -// vec4( 0.0, 0.0, scaleZ, 0.0 ), -// vec4( 0.0, 0.0, 0.0, 1.0 ) -// ); - -// _MODELVIEW_NORMAL_MATRIX = mat3( _MODELVIEW_MATRIX); -// } - -void vertex() -{ - float normalizedIndex = VERTEX.z; - VERTEX.z = 0.0; - - vec3 viewOffset = viewToWorldDirection( vec3( 0, 0, occlusionZOffset ), INV_VIEW_MATRIX ); - vec3 nodePositionView = worldToView( NODE_POSITION_WORLD + viewOffset, VIEW_MATRIX ); - vec2 screenPosition = viewToScreen( nodePositionView, PROJECTION_MATRIX ); - - float fadeValue = textureLod( fading, screenPosition, 0.0 ).r; - float opacityValue = textureLod( opacityFading, screenPosition, 0.0 ).r; - float sizeXFade = textureLod( sizeXfading, screenPosition, 0.0 ).r; - float sizeYFade = textureLod( sizeYfading, screenPosition, 0.0 ).r; - - float nodeScale = length( extractScale( MODEL_MATRIX ) ); - - float sX = sizeX * sizeXFade; - float sY = sizeY * sizeYFade; - - - vec2 uvPixelSize = vec2( 1.0, 1.0 ) / VIEWPORT_SIZE ; - - vec2 scaledUVPixelSize = uvPixelSize * max( 1.0, nodePositionView.z / occlusionTest_ViewDependingDistance ); - uvPixelSize = mix( uvPixelSize, scaledUVPixelSize, occlusionTest_ViewDependingScaleAmount ); - - float occlusionValue = useQuickOcclusionTest ? - - getQuickOcclusionAt( depthTexture, nodePositionView, uvPixelSize, - occlusionTestMaxSteps, occlusionTestStepStride, - PROJECTION_MATRIX, INV_PROJECTION_MATRIX ) : - - getOcclusionAt( depthTexture, nodePositionView, uvPixelSize, - occlusionTestMaxSteps, occlusionTestStepStride, - PROJECTION_MATRIX, INV_PROJECTION_MATRIX ); - - occlusionAlpha = occlusionValue * fadeValue; - - float camDist = length( NODE_POSITION_WORLD - CAMERA_POSITION_WORLD ); - vec2 sizeScaled = vec2( sX, sY ) * occlusionAlpha * nodeScale; - vec2 size = mix( sizeScaled * worldSizeScale, sizeScaled * camDist * 0.1 * screenSizeScale, worldSize_vs_screenSize ); - - - - setFlareBillboard( - MODELVIEW_MATRIX, MODELVIEW_NORMAL_MATRIX, - VIEW_MATRIX, MAIN_CAM_INV_VIEW_MATRIX, MODEL_MATRIX, - vec3( size.x, size.y, 1.0 ), screenOffsetScale + screenOffsetLayerSpread * ( normalizedIndex * 2.0 - 1.0 ) - ); - - vec3 hsl = RGBtoHSL( color.rgb ); - vec3 shiftedHSL = shiftHSL( hsl, centerHSL.rgb, 60.0 ); - vec3 shiftedRGB = HSLtoRGB( shiftedHSL ); - - centerColor = vec4( shiftRGBwithHSL( color.rgb, centerHSL.rgb, 60.0 ), centerHSL.a * color.a ); - outsideColor = vec4( shiftRGBwithHSL( color.rgb, outsideHSL.rgb, 60.0 ), outsideHSL.a * color.a ); - - opacityFadeValue = fadeValue * opacityValue; - - float opacityMapValue = textureLod( opacityCurve, vec2( normalizedIndex, 0.0 ), 0.0 ).r; - opacityFadeValue *= opacityMapValue; -} - -void fragment() -{ - - float distanceToCircle = 1.0 - min( 1, length( UV - vec2( 0.5, 0.5 ) ) / 0.5 ); - - float alpha = pow( distanceToCircle, alphaDistortion ); - alpha = min( 1, alpha ); - - distanceToCircle = pow( distanceToCircle, colorDistortion ); - - - float t = min( 1, distanceToCircle ); - vec4 mixedColor = mixThreeColors( outsideColor, color, centerColor, t ); - - mixedColor.a *= alpha; - - - ALBEDO = mixedColor.rgb; - ALPHA = mixedColor.a * occlusionAlpha * opacity * opacityFadeValue; - -} diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc.uid deleted file mode 100644 index 4d5f28d..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dv4j06odwqjvu diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader.uid b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader.uid deleted file mode 100644 index aaac975..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader.uid +++ /dev/null @@ -1 +0,0 @@ -uid://bvjxbgnsu8pcj diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs.uid deleted file mode 100644 index 6937a69..0000000 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMixMaterial.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cusgp711ny0pc diff --git a/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc b/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc new file mode 100644 index 0000000..15a7fda --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc @@ -0,0 +1,89 @@ +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc" + + + +// SHAPE +group_uniforms Shape; + +uniform int shapeType:hint_range(0,12); +uniform float shapeScale:hint_range(0,1) = 0.5; + +uniform float minShapeDistance = 0; +uniform float maxShapeDistance = 0.1; + +uniform float minShapeDistanceColor = -0.5; +uniform float maxShapeDistanceColor = 0; + +uniform float shapeColorDistortion:hint_range(0.2,20) = 1; +uniform float shapeAlphaDistortion:hint_range(0.2,20) = 1; + +uniform vec4 innerHSL = vec4( 0.0, 0.0, 0.0, 1.0 ); +uniform vec4 outerHSL = vec4( 0.0, 0.0, 0.0, 1.0 ); + + +group_uniforms; + +varying vec4 innerColor; +varying vec4 outerColor; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc" + +#define GENERATE_FLARE_VERTEX_DATA \ +{ \ + float _rgbScale = getRGBScale( combinedColor ); \ + innerColor = vec4( shiftRGBwithHSL( combinedColor.rgb / _rgbScale, innerHSL.rgb, 60.0) * _rgbScale, innerHSL.a * combinedColor.a ); \ + outerColor = vec4( shiftRGBwithHSL( combinedColor.rgb / _rgbScale, outerHSL.rgb, 60.0) * _rgbScale, outerHSL.a * combinedColor.a ); \ +} \ + +float getShapeDistance( + int _shapeType, float _shapeScale, float _shapeRotation, vec2 _uv, float _minShapeDistance, float _maxShapeDistance ) +{ + float distance = 0.0; + // _shapeRotation += 180.0; + _uv -= vec2( 0.5 ); + _uv = rotate_v2( _uv, _shapeRotation / 180.0 * 3.141592653 ); + _uv /= _shapeScale; + + + if ( _shapeType == 0 ) { distance = sdCircle( _uv, 0.5 ); } + else if ( _shapeType == 1 ) { distance = sdRoundedX( _uv, 0.5, 0.2 ); } + else if ( _shapeType == 2 ) { distance = sdEquilateralTriangle( _uv, 0.666 ); } + else if ( _shapeType == 3 ) { distance = sdBox( _uv, vec2( 0.5 ) ); } + else if ( _shapeType == 4 ) { distance = sdPentagon( _uv, 0.5 ); } + else if ( _shapeType == 5 ) { distance = sdHexagon( _uv, 0.5 ); } + else if ( _shapeType == 6 ) { distance = sdOctogon( _uv, 0.5 ); } + else if ( _shapeType == 7 ) { distance = sdHexagram( _uv, 0.333); } + else if ( _shapeType == 8 ) { distance = sdPentagram( _uv, 0.6666 ); } + else if ( _shapeType == 9 ) { distance = sdMoon( _uv, 0.0, 0.5, 0.4 ); } + else if ( _shapeType == 10 ) { distance = sdMoon( _uv, 0.5, 0.5, 0.4 ); } + else if ( _shapeType == 11 ) { distance = sdMoon( _uv, 0.1, 0.5, 0.3 ); } + else if ( _shapeType == 12 ) { distance = sdHeart( _uv ); } + + + return distance; +} + + +vec4 generateFlare( vec2 _uv, vec4 _color, float _opacity ) +{ + float distance = getShapeDistance( shapeType, shapeScale, 0, _uv, minShapeDistance, maxShapeDistance ); + + float normalizedAlphaDistance = normalizeToRange01( distance, minShapeDistance, maxShapeDistance ); + float alphaT = 1.0 - normalizedAlphaDistance; + + float normalizedColorDistance = normalizeToRange01( distance, minShapeDistanceColor, maxShapeDistanceColor ); + float colorT = 1.0 - normalizedColorDistance; + + colorT = pow( colorT, shapeColorDistortion ); + alphaT = pow( alphaT, shapeAlphaDistortion ); + + float t = min( 1, colorT ); + vec4 mixedColor = mixThreeColors( outerColor, _color, innerColor, t ); + + mixedColor.a *= alphaT * _opacity; + + + return mixedColor; +} + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc.uid new file mode 100644 index 0000000..d18d50a --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc.uid @@ -0,0 +1 @@ +uid://bot3nu2eheylq diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader similarity index 77% rename from Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader rename to Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader index d0335d0..2eadd16 100644 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareAdd.gdshader +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader @@ -1,4 +1,4 @@ shader_type spatial; render_mode blend_add, depth_test_disabled, cull_disabled, unshaded, fog_disabled; -#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc" \ No newline at end of file +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader.uid new file mode 100644 index 0000000..04ea452 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader.uid @@ -0,0 +1 @@ +uid://bghg0b1pecnwd diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs new file mode 100644 index 0000000..3f11927 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs @@ -0,0 +1,111 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class SDFTypeFlareAddShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAdd.gdshader" + ); + //*/ + + public static readonly IntPropertyName shapeType = IntPropertyName.Create( "shapeType" ); + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly FloatPropertyName minShapeDistance = FloatPropertyName.Create( "minShapeDistance" ); + public static readonly FloatPropertyName maxShapeDistance = FloatPropertyName.Create( "maxShapeDistance" ); + public static readonly FloatPropertyName minShapeDistanceColor = FloatPropertyName.Create( "minShapeDistanceColor" ); + public static readonly FloatPropertyName maxShapeDistanceColor = FloatPropertyName.Create( "maxShapeDistanceColor" ); + public static readonly FloatPropertyName shapeColorDistortion = FloatPropertyName.Create( "shapeColorDistortion" ); + public static readonly FloatPropertyName shapeAlphaDistortion = FloatPropertyName.Create( "shapeAlphaDistortion" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class SDFTypeFlareAddMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeType; + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty minShapeDistance; + public readonly CustomMaterialProperty maxShapeDistance; + public readonly CustomMaterialProperty minShapeDistanceColor; + public readonly CustomMaterialProperty maxShapeDistanceColor; + public readonly CustomMaterialProperty shapeColorDistortion; + public readonly CustomMaterialProperty shapeAlphaDistortion; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + + public SDFTypeFlareAddMaterial() + { + ///* + Shader = SDFTypeFlareAddShader.shader.Get(); + //*/ + + shapeType = new CustomMaterialProperty( this, SDFTypeFlareAddShader.shapeType ); + shapeScale = new CustomMaterialProperty( this, SDFTypeFlareAddShader.shapeScale ); + minShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareAddShader.minShapeDistance ); + maxShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareAddShader.maxShapeDistance ); + minShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareAddShader.minShapeDistanceColor ); + maxShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareAddShader.maxShapeDistanceColor ); + shapeColorDistortion = new CustomMaterialProperty( this, SDFTypeFlareAddShader.shapeColorDistortion ); + shapeAlphaDistortion = new CustomMaterialProperty( this, SDFTypeFlareAddShader.shapeAlphaDistortion ); + innerHsl = new CustomMaterialProperty( this, SDFTypeFlareAddShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, SDFTypeFlareAddShader.outerHsl ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs.uid new file mode 100644 index 0000000..7cc2864 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareAddMaterial.cs.uid @@ -0,0 +1 @@ +uid://pitbnp6cpk4f diff --git a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader similarity index 77% rename from Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader rename to Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader index c914f16..4a87a8d 100644 --- a/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareMix.gdshader +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader @@ -1,4 +1,4 @@ shader_type spatial; render_mode blend_mix, depth_test_disabled, cull_disabled, unshaded, fog_disabled; -#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/GlowFlare/GlowFlareBase.gdshaderinc" \ No newline at end of file +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader.uid new file mode 100644 index 0000000..8a36849 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader.uid @@ -0,0 +1 @@ +uid://k5rstlw8ssw8 diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs new file mode 100644 index 0000000..7abc353 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs @@ -0,0 +1,111 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class SDFTypeFlareMixShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMix.gdshader" + ); + //*/ + + public static readonly IntPropertyName shapeType = IntPropertyName.Create( "shapeType" ); + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly FloatPropertyName minShapeDistance = FloatPropertyName.Create( "minShapeDistance" ); + public static readonly FloatPropertyName maxShapeDistance = FloatPropertyName.Create( "maxShapeDistance" ); + public static readonly FloatPropertyName minShapeDistanceColor = FloatPropertyName.Create( "minShapeDistanceColor" ); + public static readonly FloatPropertyName maxShapeDistanceColor = FloatPropertyName.Create( "maxShapeDistanceColor" ); + public static readonly FloatPropertyName shapeColorDistortion = FloatPropertyName.Create( "shapeColorDistortion" ); + public static readonly FloatPropertyName shapeAlphaDistortion = FloatPropertyName.Create( "shapeAlphaDistortion" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class SDFTypeFlareMixMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeType; + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty minShapeDistance; + public readonly CustomMaterialProperty maxShapeDistance; + public readonly CustomMaterialProperty minShapeDistanceColor; + public readonly CustomMaterialProperty maxShapeDistanceColor; + public readonly CustomMaterialProperty shapeColorDistortion; + public readonly CustomMaterialProperty shapeAlphaDistortion; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + + public SDFTypeFlareMixMaterial() + { + ///* + Shader = SDFTypeFlareMixShader.shader.Get(); + //*/ + + shapeType = new CustomMaterialProperty( this, SDFTypeFlareMixShader.shapeType ); + shapeScale = new CustomMaterialProperty( this, SDFTypeFlareMixShader.shapeScale ); + minShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareMixShader.minShapeDistance ); + maxShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareMixShader.maxShapeDistance ); + minShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareMixShader.minShapeDistanceColor ); + maxShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareMixShader.maxShapeDistanceColor ); + shapeColorDistortion = new CustomMaterialProperty( this, SDFTypeFlareMixShader.shapeColorDistortion ); + shapeAlphaDistortion = new CustomMaterialProperty( this, SDFTypeFlareMixShader.shapeAlphaDistortion ); + innerHsl = new CustomMaterialProperty( this, SDFTypeFlareMixShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, SDFTypeFlareMixShader.outerHsl ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs.uid new file mode 100644 index 0000000..6653a5a --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMixMaterial.cs.uid @@ -0,0 +1 @@ +uid://bvoka7aow2t65 diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader new file mode 100644 index 0000000..32a76a3 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_mul, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader.uid new file mode 100644 index 0000000..ab5b6cb --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader.uid @@ -0,0 +1 @@ +uid://gmstpp074nd3 diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs new file mode 100644 index 0000000..7b73c91 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs @@ -0,0 +1,111 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class SDFTypeFlareMultiplyShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiply.gdshader" + ); + //*/ + + public static readonly IntPropertyName shapeType = IntPropertyName.Create( "shapeType" ); + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly FloatPropertyName minShapeDistance = FloatPropertyName.Create( "minShapeDistance" ); + public static readonly FloatPropertyName maxShapeDistance = FloatPropertyName.Create( "maxShapeDistance" ); + public static readonly FloatPropertyName minShapeDistanceColor = FloatPropertyName.Create( "minShapeDistanceColor" ); + public static readonly FloatPropertyName maxShapeDistanceColor = FloatPropertyName.Create( "maxShapeDistanceColor" ); + public static readonly FloatPropertyName shapeColorDistortion = FloatPropertyName.Create( "shapeColorDistortion" ); + public static readonly FloatPropertyName shapeAlphaDistortion = FloatPropertyName.Create( "shapeAlphaDistortion" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class SDFTypeFlareMultiplyMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeType; + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty minShapeDistance; + public readonly CustomMaterialProperty maxShapeDistance; + public readonly CustomMaterialProperty minShapeDistanceColor; + public readonly CustomMaterialProperty maxShapeDistanceColor; + public readonly CustomMaterialProperty shapeColorDistortion; + public readonly CustomMaterialProperty shapeAlphaDistortion; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + + public SDFTypeFlareMultiplyMaterial() + { + ///* + Shader = SDFTypeFlareMultiplyShader.shader.Get(); + //*/ + + shapeType = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.shapeType ); + shapeScale = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.shapeScale ); + minShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.minShapeDistance ); + maxShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.maxShapeDistance ); + minShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.minShapeDistanceColor ); + maxShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.maxShapeDistanceColor ); + shapeColorDistortion = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.shapeColorDistortion ); + shapeAlphaDistortion = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.shapeAlphaDistortion ); + innerHsl = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, SDFTypeFlareMultiplyShader.outerHsl ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs.uid new file mode 100644 index 0000000..cf18bb4 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareMultiplyMaterial.cs.uid @@ -0,0 +1 @@ +uid://dcn3nwgoweygd diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader new file mode 100644 index 0000000..b6f8f23 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_sub, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/SDFTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader.uid new file mode 100644 index 0000000..ae51728 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader.uid @@ -0,0 +1 @@ +uid://cawtys20qq5yx diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs new file mode 100644 index 0000000..08b7fb2 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs @@ -0,0 +1,111 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class SDFTypeFlareSubtractShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtract.gdshader" + ); + //*/ + + public static readonly IntPropertyName shapeType = IntPropertyName.Create( "shapeType" ); + public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); + public static readonly FloatPropertyName minShapeDistance = FloatPropertyName.Create( "minShapeDistance" ); + public static readonly FloatPropertyName maxShapeDistance = FloatPropertyName.Create( "maxShapeDistance" ); + public static readonly FloatPropertyName minShapeDistanceColor = FloatPropertyName.Create( "minShapeDistanceColor" ); + public static readonly FloatPropertyName maxShapeDistanceColor = FloatPropertyName.Create( "maxShapeDistanceColor" ); + public static readonly FloatPropertyName shapeColorDistortion = FloatPropertyName.Create( "shapeColorDistortion" ); + public static readonly FloatPropertyName shapeAlphaDistortion = FloatPropertyName.Create( "shapeAlphaDistortion" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class SDFTypeFlareSubtractMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty shapeType; + public readonly CustomMaterialProperty shapeScale; + public readonly CustomMaterialProperty minShapeDistance; + public readonly CustomMaterialProperty maxShapeDistance; + public readonly CustomMaterialProperty minShapeDistanceColor; + public readonly CustomMaterialProperty maxShapeDistanceColor; + public readonly CustomMaterialProperty shapeColorDistortion; + public readonly CustomMaterialProperty shapeAlphaDistortion; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + + public SDFTypeFlareSubtractMaterial() + { + ///* + Shader = SDFTypeFlareSubtractShader.shader.Get(); + //*/ + + shapeType = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.shapeType ); + shapeScale = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.shapeScale ); + minShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.minShapeDistance ); + maxShapeDistance = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.maxShapeDistance ); + minShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.minShapeDistanceColor ); + maxShapeDistanceColor = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.maxShapeDistanceColor ); + shapeColorDistortion = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.shapeColorDistortion ); + shapeAlphaDistortion = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.shapeAlphaDistortion ); + innerHsl = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, SDFTypeFlareSubtractShader.outerHsl ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs.uid new file mode 100644 index 0000000..62fbfa5 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/SDFType/Variants/SDFTypeFlareSubtractMaterial.cs.uid @@ -0,0 +1 @@ +uid://ctiiphbrfpvk1 diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader.uid b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader.uid deleted file mode 100644 index 07b5484..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ibo7qa8hf6he diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs deleted file mode 100644 index 398e057..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs +++ /dev/null @@ -1,135 +0,0 @@ -using Godot; - -namespace Rokojori -{ - // Generated by ShaderClassGenerator - - public class ShapeFlareAddShader - { - public static readonly CachedResource shader = new CachedResource( - "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader" - ); - - public static readonly IntPropertyName shapeType = IntPropertyName.Create( "shapeType" ); - public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); - public static readonly FloatPropertyName shapeRotation = FloatPropertyName.Create( "shapeRotation" ); - public static readonly FloatPropertyName minShapeDistance = FloatPropertyName.Create( "minShapeDistance" ); - public static readonly FloatPropertyName maxShapeDistance = FloatPropertyName.Create( "maxShapeDistance" ); - public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); - public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); - public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); - public static readonly FloatPropertyName colorDistortion = FloatPropertyName.Create( "colorDistortion" ); - public static readonly FloatPropertyName alphaDistortion = FloatPropertyName.Create( "alphaDistortion" ); - public static readonly Vector4PropertyName centerHsl = Vector4PropertyName.Create( "centerHSL" ); - public static readonly Vector4PropertyName outsideHsl = Vector4PropertyName.Create( "outsideHSL" ); - public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); - public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); - public static readonly FloatPropertyName minShapeDistanceColor = FloatPropertyName.Create( "minShapeDistanceColor" ); - public static readonly FloatPropertyName maxShapeDistanceColor = FloatPropertyName.Create( "maxShapeDistanceColor" ); - public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); - public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); - public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); - public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); - public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); - public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); - public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); - public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); - public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); - public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); - public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); - public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); - public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); - public static readonly BoolPropertyName useQuickOcclusionTest = BoolPropertyName.Create( "useQuickOcclusionTest" ); - public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); - public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); - public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); - public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); - public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); - - } - - [Tool] - public partial class ShapeFlareAddMaterial:CustomMaterial - { - - - public readonly CustomMaterialProperty shapeType; - public readonly CustomMaterialProperty shapeScale; - public readonly CustomMaterialProperty shapeRotation; - public readonly CustomMaterialProperty minShapeDistance; - public readonly CustomMaterialProperty maxShapeDistance; - public readonly CustomMaterialProperty color; - public readonly CustomMaterialProperty opacity; - public readonly CustomMaterialProperty opacityCurve; - public readonly CustomMaterialProperty colorDistortion; - public readonly CustomMaterialProperty alphaDistortion; - public readonly CustomMaterialProperty centerHsl; - public readonly CustomMaterialProperty outsideHsl; - public readonly CustomMaterialProperty minHueRandom; - public readonly CustomMaterialProperty maxHueRandom; - public readonly CustomMaterialProperty minShapeDistanceColor; - public readonly CustomMaterialProperty maxShapeDistanceColor; - public readonly CustomMaterialProperty sizeX; - public readonly CustomMaterialProperty sizeY; - public readonly CustomMaterialProperty worldSizeScale; - public readonly CustomMaterialProperty screenSizeScale; - public readonly CustomMaterialProperty worldSizeVsScreenSize; - public readonly CustomMaterialProperty randomScaleMin; - public readonly CustomMaterialProperty randomScaleMax; - public readonly CustomMaterialProperty screenOffsetScale; - public readonly CustomMaterialProperty screenOffsetLayerSpread; - public readonly CustomMaterialProperty fading; - public readonly CustomMaterialProperty opacityFading; - public readonly CustomMaterialProperty sizeXfading; - public readonly CustomMaterialProperty sizeYfading; - public readonly CustomMaterialProperty useQuickOcclusionTest; - public readonly CustomMaterialProperty occlusionZOffset; - public readonly CustomMaterialProperty occlusionTestMaxSteps; - public readonly CustomMaterialProperty occlusionTestStepStride; - public readonly CustomMaterialProperty occlusionTestViewDependingScaleAmount; - public readonly CustomMaterialProperty occlusionTestViewDependingDistance; - - public ShapeFlareAddMaterial() - { - Shader = ShapeFlareAddShader.shader.Get(); - - shapeType = new CustomMaterialProperty( this, ShapeFlareAddShader.shapeType ); - shapeScale = new CustomMaterialProperty( this, ShapeFlareAddShader.shapeScale ); - shapeRotation = new CustomMaterialProperty( this, ShapeFlareAddShader.shapeRotation ); - minShapeDistance = new CustomMaterialProperty( this, ShapeFlareAddShader.minShapeDistance ); - maxShapeDistance = new CustomMaterialProperty( this, ShapeFlareAddShader.maxShapeDistance ); - color = new CustomMaterialProperty( this, ShapeFlareAddShader.color ); - opacity = new CustomMaterialProperty( this, ShapeFlareAddShader.opacity ); - opacityCurve = new CustomMaterialProperty( this, ShapeFlareAddShader.opacityCurve ); - colorDistortion = new CustomMaterialProperty( this, ShapeFlareAddShader.colorDistortion ); - alphaDistortion = new CustomMaterialProperty( this, ShapeFlareAddShader.alphaDistortion ); - centerHsl = new CustomMaterialProperty( this, ShapeFlareAddShader.centerHsl ); - outsideHsl = new CustomMaterialProperty( this, ShapeFlareAddShader.outsideHsl ); - minHueRandom = new CustomMaterialProperty( this, ShapeFlareAddShader.minHueRandom ); - maxHueRandom = new CustomMaterialProperty( this, ShapeFlareAddShader.maxHueRandom ); - minShapeDistanceColor = new CustomMaterialProperty( this, ShapeFlareAddShader.minShapeDistanceColor ); - maxShapeDistanceColor = new CustomMaterialProperty( this, ShapeFlareAddShader.maxShapeDistanceColor ); - sizeX = new CustomMaterialProperty( this, ShapeFlareAddShader.sizeX ); - sizeY = new CustomMaterialProperty( this, ShapeFlareAddShader.sizeY ); - worldSizeScale = new CustomMaterialProperty( this, ShapeFlareAddShader.worldSizeScale ); - screenSizeScale = new CustomMaterialProperty( this, ShapeFlareAddShader.screenSizeScale ); - worldSizeVsScreenSize = new CustomMaterialProperty( this, ShapeFlareAddShader.worldSizeVsScreenSize ); - randomScaleMin = new CustomMaterialProperty( this, ShapeFlareAddShader.randomScaleMin ); - randomScaleMax = new CustomMaterialProperty( this, ShapeFlareAddShader.randomScaleMax ); - screenOffsetScale = new CustomMaterialProperty( this, ShapeFlareAddShader.screenOffsetScale ); - screenOffsetLayerSpread = new CustomMaterialProperty( this, ShapeFlareAddShader.screenOffsetLayerSpread ); - fading = new CustomMaterialProperty( this, ShapeFlareAddShader.fading ); - opacityFading = new CustomMaterialProperty( this, ShapeFlareAddShader.opacityFading ); - sizeXfading = new CustomMaterialProperty( this, ShapeFlareAddShader.sizeXfading ); - sizeYfading = new CustomMaterialProperty( this, ShapeFlareAddShader.sizeYfading ); - useQuickOcclusionTest = new CustomMaterialProperty( this, ShapeFlareAddShader.useQuickOcclusionTest ); - occlusionZOffset = new CustomMaterialProperty( this, ShapeFlareAddShader.occlusionZOffset ); - occlusionTestMaxSteps = new CustomMaterialProperty( this, ShapeFlareAddShader.occlusionTestMaxSteps ); - occlusionTestStepStride = new CustomMaterialProperty( this, ShapeFlareAddShader.occlusionTestStepStride ); - occlusionTestViewDependingScaleAmount = new CustomMaterialProperty( this, ShapeFlareAddShader.occlusionTestViewDependingScaleAmount ); - occlusionTestViewDependingDistance = new CustomMaterialProperty( this, ShapeFlareAddShader.occlusionTestViewDependingDistance ); - } - - } - -} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs.uid deleted file mode 100644 index 534b447..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAddMaterial.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://btnca61nvu55p diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc deleted file mode 100644 index bdc0c25..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc +++ /dev/null @@ -1,241 +0,0 @@ - -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Colors.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Math.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Transform.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Depth.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/SDF.gdshaderinc" -#include "res://addons/rokojori_action_library/Runtime/Shading/Library/Noise.gdshaderinc" - -#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc" - - -// SHAPE -group_uniforms Shape; - -uniform int shapeType:hint_range(0,12); -uniform float shapeScale:hint_range(0,1) = 0.5; -uniform float shapeRotation:hint_range(-180,180) = 0; -uniform float minShapeDistance = 0; -uniform float maxShapeDistance = 0.05; - - -group_uniforms; - -// COLOR -group_uniforms Color; -uniform sampler2D depthTexture:hint_depth_texture; -uniform vec4 color : source_color = vec4( 0.887, 0.434, 0.233, 1.0 ); -uniform float opacity = 1; -uniform sampler2D opacityCurve:source_color; - -uniform float colorDistortion:hint_range(0.2,20) = 2; -uniform float alphaDistortion:hint_range(0.2,20) = 2; - -uniform vec4 centerHSL = vec4( 0.08, 0.0, 0.18, 1.0 ); -varying vec4 centerColor; - -uniform vec4 outsideHSL = vec4( -0.05, 1.65, 0.02, 0.0 ); -varying vec4 outsideColor; - -uniform float minHueRandom = 0; -uniform float maxHueRandom = 0; - - -uniform float minShapeDistanceColor = 0; -uniform float maxShapeDistanceColor = 0.05; - -group_uniforms; - - - -// SIZE -group_uniforms Size; -uniform float sizeX:hint_range(1,100) = 1; -uniform float sizeY:hint_range(1,100) = 1; -uniform float worldSizeScale = 1; -uniform float screenSizeScale = 1; -uniform float worldSize_vs_screenSize:hint_range(0,1) = 0.5; -uniform float randomScaleMin = 1.0; -uniform float randomScaleMax = 1.0; -group_uniforms; - -// SCREEN OFFSET -group_uniforms ScreenOffset; -uniform vec2 screenOffsetScale = vec2( 0, 0 ); -uniform vec2 screenOffsetLayerSpread = vec2( 0, 0 ); - -group_uniforms; - -// Fading -group_uniforms Fading; -// uniform sampler2D fading:source_color, repeat_disable, filter_linear; -// uniform sampler2D opacityFading:source_color, repeat_disable, filter_linear; -// uniform sampler2D sizeXfading:source_color, repeat_disable, filter_linear; -// uniform sampler2D sizeYfading:source_color, repeat_disable, filter_linear; -uniform float fadingPower = 1.0; -uniform float opacityFadingPower = 1.0; -uniform float sizeXfadingPower = 1.0; -uniform float sizeYfadingPower = 1.0; - -varying float opacityFadeValue; -group_uniforms; - - -// OCCLUSION -group_uniforms Occlusion; -uniform bool useQuickOcclusionTest = false; -uniform float occlusionZOffset:hint_range(-30,30) = 0; -uniform int occlusionTestMaxSteps = 10; -uniform float occlusionTestStepStride = 1; -uniform float occlusionTest_ViewDependingScaleAmount:hint_range(0,1) = 0.5; -uniform float occlusionTest_ViewDependingDistance = 100; -varying float occlusionAlpha; -group_uniforms; - - -float getShapeDistance( - int _shapeType, float _shapeScale, float _shapeRotation, vec2 _uv, float _minShapeDistance, float _maxShapeDistance ) -{ - float distance = 0.0; - _shapeRotation += 180.0; - _uv -= vec2( 0.5 ); - _uv = rotate_v2( _uv, _shapeRotation / 180.0 * 3.141592653 ); - _uv /= _shapeScale; - - - if ( _shapeType == 0 ) { distance = sdCircle( _uv, 0.5 ); } - else if ( _shapeType == 1 ) { distance = sdRoundedX( _uv, 0.5, 0.2 ); } - else if ( _shapeType == 2 ) { distance = sdEquilateralTriangle( _uv, 0.666 ); } - else if ( _shapeType == 3 ) { distance = sdBox( _uv, vec2( 0.5 ) ); } - else if ( _shapeType == 4 ) { distance = sdPentagon( _uv, 0.5 ); } - else if ( _shapeType == 5 ) { distance = sdHexagon( _uv, 0.5 ); } - else if ( _shapeType == 6 ) { distance = sdOctogon( _uv, 0.5 ); } - else if ( _shapeType == 7 ) { distance = sdHexagram( _uv, 0.333); } - else if ( _shapeType == 8 ) { distance = sdPentagram( _uv, 0.6666 ); } - else if ( _shapeType == 9 ) { distance = sdMoon( _uv, 0.0, 0.5, 0.4 ); } - else if ( _shapeType == 10 ) { distance = sdMoon( _uv, 0.5, 0.5, 0.4 ); } - else if ( _shapeType == 11 ) { distance = sdMoon( _uv, 0.1, 0.5, 0.3 ); } - else if ( _shapeType == 12 ) { distance = sdHeart( _uv ); } - - - return distance; - - // float normalizedDistance = normalizeToRange01( distance, _minShapeDistance, _maxShapeDistance ); - - // return 1.0 - normalizedDistance; -} - -varying vec4 combinedColor; - -void vertex() -{ - float normalizedIndex = VERTEX.z; - VERTEX.z = 0.0; - - vec3 viewOffset = viewToWorldDirection( vec3( 0, 0, occlusionZOffset ), INV_VIEW_MATRIX ); - vec3 nodePositionView = worldToView( NODE_POSITION_WORLD + viewOffset, VIEW_MATRIX ); - vec2 screenPosition = viewToScreen( nodePositionView, PROJECTION_MATRIX ); - - float edgeDistance = max( 0.0, -sdBox( screenPosition - vec2( 0.5 ), vec2( 0.5 ) ) ) * 2.0; - - // float fadeValue = textureLod( fading, screenPosition, 0.0 ).r; - // float opacityValue = textureLod( opacityFading, screenPosition, 0.0 ).r; - // float sizeXFade = textureLod( sizeXfading, screenPosition, 0.0 ).r; - // float sizeYFade = textureLod( sizeYfading, screenPosition, 0.0 ).r; - - float fadeValue = pow( edgeDistance, fadingPower ); - float opacityValue = pow( edgeDistance, opacityFadingPower ); - float sizeXFade = pow( edgeDistance, sizeXfadingPower ); - float sizeYFade = pow( edgeDistance, sizeYfadingPower ); - - float nodeScale = length( extractScale( MODEL_MATRIX ) ); - - float sX = sizeX * sizeXFade; - float sY = sizeY * sizeYFade; - - - vec2 uvPixelSize = vec2( 1.0, 1.0 ) / VIEWPORT_SIZE ; - - vec2 scaledUVPixelSize = uvPixelSize * max( 1.0, nodePositionView.z / occlusionTest_ViewDependingDistance ); - uvPixelSize = mix( uvPixelSize, scaledUVPixelSize, occlusionTest_ViewDependingScaleAmount ); - - float occlusionValue = useQuickOcclusionTest ? - - getQuickOcclusionAt( depthTexture, nodePositionView, uvPixelSize, - occlusionTestMaxSteps, occlusionTestStepStride, - PROJECTION_MATRIX, INV_PROJECTION_MATRIX ) : - - getOcclusionAt( depthTexture, nodePositionView, uvPixelSize, - occlusionTestMaxSteps, occlusionTestStepStride, - PROJECTION_MATRIX, INV_PROJECTION_MATRIX ); - - occlusionAlpha = occlusionValue * fadeValue; - - float camDist = length( NODE_POSITION_WORLD - CAMERA_POSITION_WORLD ); - vec2 sizeScaled = vec2( sX, sY ) * occlusionAlpha * nodeScale; - vec2 size = mix( sizeScaled * worldSizeScale, sizeScaled * camDist * 0.1 * screenSizeScale, worldSize_vs_screenSize ); - - float randomScale = mix( randomScaleMin, randomScaleMax, random( vec2( normalizedIndex ) ) ); - - size *= randomScale; - - - setFlareBillboard( - MODELVIEW_MATRIX, MODELVIEW_NORMAL_MATRIX, - VIEW_MATRIX, MAIN_CAM_INV_VIEW_MATRIX, MODEL_MATRIX, - vec3( size.x, size.y, 1.0 ), screenOffsetScale + screenOffsetLayerSpread * ( normalizedIndex * 2.0 - 1.0 ) - ); - - vec3 hsl = RGBtoHSL( color.rgb ); - vec3 shiftedHSL = shiftHSL( hsl, centerHSL.rgb, 60.0 ); - vec3 shiftedRGB = HSLtoRGB( shiftedHSL ); - - combinedColor = color; - - float rgbScale = getRGBScale( combinedColor.rgb ); - - float randomHueOffset = mix( minHueRandom, maxHueRandom, random( vec2( normalizedIndex ) + vec2( 0.23, 0.13 ) ) ); - - combinedColor.rgb = changeHueOfRGB( combinedColor.rgb / rgbScale, randomHueOffset ) * rgbScale; - - rgbScale = getRGBScale( combinedColor.rgb ); - - centerColor = vec4( shiftRGBwithHSL( combinedColor.rgb / rgbScale, centerHSL.rgb, 60.0 ) * rgbScale, centerHSL.a * color.a ); - outsideColor = vec4( shiftRGBwithHSL( combinedColor.rgb / rgbScale, outsideHSL.rgb, 60.0 ) * rgbScale, outsideHSL.a * color.a ); - - opacityFadeValue = fadeValue * opacityValue; - - float opacityMapValue = textureLod( opacityCurve, vec2( normalizedIndex, 0.0 ), 0.0 ).r; - opacityFadeValue *= opacityMapValue; -} - -void fragment() -{ - - // float distanceToCircle = 1.0 - min( 1, length( UV - vec2( 0.5, 0.5 ) ) / 0.5 ); - - // float normalizedDistance = normalizeToRange01( distance, _minShapeDistance, _maxShapeDistance ); - - // return 1.0 - normalizedDistance; - - float distance = getShapeDistance( shapeType, shapeScale, -shapeRotation, UV, minShapeDistance, maxShapeDistance ); - - float normalizedAlphaDistance = normalizeToRange01( distance, minShapeDistance, maxShapeDistance ); - float alphaT = 1.0 - normalizedAlphaDistance; - - float normalizedColorDistance = normalizeToRange01( distance, minShapeDistanceColor, maxShapeDistanceColor ); - float colorT = 1.0 - normalizedColorDistance; - - colorT = pow( colorT, colorDistortion ); - alphaT = pow( alphaT, alphaDistortion ); - - float t = min( 1, colorT ); - vec4 mixedColor = mixThreeColors( outsideColor, combinedColor, centerColor, t ); - // mixedColor = outsideColor; - mixedColor.a *= alphaT; - - - ALBEDO = mixedColor.rgb; - ALPHA = mixedColor.a * occlusionAlpha * opacity * opacityFadeValue; - -} diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc.uid deleted file mode 100644 index 59b8fc4..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc.uid +++ /dev/null @@ -1 +0,0 @@ -uid://vfabwu76j40f diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader.uid b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader.uid deleted file mode 100644 index 10b2f86..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader.uid +++ /dev/null @@ -1 +0,0 @@ -uid://yy2pi2u1bg4n diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs deleted file mode 100644 index f05adcc..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs +++ /dev/null @@ -1,135 +0,0 @@ -using Godot; - -namespace Rokojori -{ - // Generated by ShaderClassGenerator - - public class ShapeFlareMixShader - { - public static readonly CachedResource shader = new CachedResource( - "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader" - ); - - public static readonly IntPropertyName shapeType = IntPropertyName.Create( "shapeType" ); - public static readonly FloatPropertyName shapeScale = FloatPropertyName.Create( "shapeScale" ); - public static readonly FloatPropertyName shapeRotation = FloatPropertyName.Create( "shapeRotation" ); - public static readonly FloatPropertyName minShapeDistance = FloatPropertyName.Create( "minShapeDistance" ); - public static readonly FloatPropertyName maxShapeDistance = FloatPropertyName.Create( "maxShapeDistance" ); - public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); - public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); - public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); - public static readonly FloatPropertyName colorDistortion = FloatPropertyName.Create( "colorDistortion" ); - public static readonly FloatPropertyName alphaDistortion = FloatPropertyName.Create( "alphaDistortion" ); - public static readonly Vector4PropertyName centerHsl = Vector4PropertyName.Create( "centerHSL" ); - public static readonly Vector4PropertyName outsideHsl = Vector4PropertyName.Create( "outsideHSL" ); - public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); - public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); - public static readonly FloatPropertyName minShapeDistanceColor = FloatPropertyName.Create( "minShapeDistanceColor" ); - public static readonly FloatPropertyName maxShapeDistanceColor = FloatPropertyName.Create( "maxShapeDistanceColor" ); - public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); - public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); - public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); - public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); - public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); - public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); - public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); - public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); - public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); - public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); - public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); - public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); - public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); - public static readonly BoolPropertyName useQuickOcclusionTest = BoolPropertyName.Create( "useQuickOcclusionTest" ); - public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); - public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); - public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); - public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); - public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); - - } - - [Tool] - public partial class ShapeFlareMixMaterial:CustomMaterial - { - - - public readonly CustomMaterialProperty shapeType; - public readonly CustomMaterialProperty shapeScale; - public readonly CustomMaterialProperty shapeRotation; - public readonly CustomMaterialProperty minShapeDistance; - public readonly CustomMaterialProperty maxShapeDistance; - public readonly CustomMaterialProperty color; - public readonly CustomMaterialProperty opacity; - public readonly CustomMaterialProperty opacityCurve; - public readonly CustomMaterialProperty colorDistortion; - public readonly CustomMaterialProperty alphaDistortion; - public readonly CustomMaterialProperty centerHsl; - public readonly CustomMaterialProperty outsideHsl; - public readonly CustomMaterialProperty minHueRandom; - public readonly CustomMaterialProperty maxHueRandom; - public readonly CustomMaterialProperty minShapeDistanceColor; - public readonly CustomMaterialProperty maxShapeDistanceColor; - public readonly CustomMaterialProperty sizeX; - public readonly CustomMaterialProperty sizeY; - public readonly CustomMaterialProperty worldSizeScale; - public readonly CustomMaterialProperty screenSizeScale; - public readonly CustomMaterialProperty worldSizeVsScreenSize; - public readonly CustomMaterialProperty randomScaleMin; - public readonly CustomMaterialProperty randomScaleMax; - public readonly CustomMaterialProperty screenOffsetScale; - public readonly CustomMaterialProperty screenOffsetLayerSpread; - public readonly CustomMaterialProperty fading; - public readonly CustomMaterialProperty opacityFading; - public readonly CustomMaterialProperty sizeXfading; - public readonly CustomMaterialProperty sizeYfading; - public readonly CustomMaterialProperty useQuickOcclusionTest; - public readonly CustomMaterialProperty occlusionZOffset; - public readonly CustomMaterialProperty occlusionTestMaxSteps; - public readonly CustomMaterialProperty occlusionTestStepStride; - public readonly CustomMaterialProperty occlusionTestViewDependingScaleAmount; - public readonly CustomMaterialProperty occlusionTestViewDependingDistance; - - public ShapeFlareMixMaterial() - { - Shader = ShapeFlareMixShader.shader.Get(); - - shapeType = new CustomMaterialProperty( this, ShapeFlareMixShader.shapeType ); - shapeScale = new CustomMaterialProperty( this, ShapeFlareMixShader.shapeScale ); - shapeRotation = new CustomMaterialProperty( this, ShapeFlareMixShader.shapeRotation ); - minShapeDistance = new CustomMaterialProperty( this, ShapeFlareMixShader.minShapeDistance ); - maxShapeDistance = new CustomMaterialProperty( this, ShapeFlareMixShader.maxShapeDistance ); - color = new CustomMaterialProperty( this, ShapeFlareMixShader.color ); - opacity = new CustomMaterialProperty( this, ShapeFlareMixShader.opacity ); - opacityCurve = new CustomMaterialProperty( this, ShapeFlareMixShader.opacityCurve ); - colorDistortion = new CustomMaterialProperty( this, ShapeFlareMixShader.colorDistortion ); - alphaDistortion = new CustomMaterialProperty( this, ShapeFlareMixShader.alphaDistortion ); - centerHsl = new CustomMaterialProperty( this, ShapeFlareMixShader.centerHsl ); - outsideHsl = new CustomMaterialProperty( this, ShapeFlareMixShader.outsideHsl ); - minHueRandom = new CustomMaterialProperty( this, ShapeFlareMixShader.minHueRandom ); - maxHueRandom = new CustomMaterialProperty( this, ShapeFlareMixShader.maxHueRandom ); - minShapeDistanceColor = new CustomMaterialProperty( this, ShapeFlareMixShader.minShapeDistanceColor ); - maxShapeDistanceColor = new CustomMaterialProperty( this, ShapeFlareMixShader.maxShapeDistanceColor ); - sizeX = new CustomMaterialProperty( this, ShapeFlareMixShader.sizeX ); - sizeY = new CustomMaterialProperty( this, ShapeFlareMixShader.sizeY ); - worldSizeScale = new CustomMaterialProperty( this, ShapeFlareMixShader.worldSizeScale ); - screenSizeScale = new CustomMaterialProperty( this, ShapeFlareMixShader.screenSizeScale ); - worldSizeVsScreenSize = new CustomMaterialProperty( this, ShapeFlareMixShader.worldSizeVsScreenSize ); - randomScaleMin = new CustomMaterialProperty( this, ShapeFlareMixShader.randomScaleMin ); - randomScaleMax = new CustomMaterialProperty( this, ShapeFlareMixShader.randomScaleMax ); - screenOffsetScale = new CustomMaterialProperty( this, ShapeFlareMixShader.screenOffsetScale ); - screenOffsetLayerSpread = new CustomMaterialProperty( this, ShapeFlareMixShader.screenOffsetLayerSpread ); - fading = new CustomMaterialProperty( this, ShapeFlareMixShader.fading ); - opacityFading = new CustomMaterialProperty( this, ShapeFlareMixShader.opacityFading ); - sizeXfading = new CustomMaterialProperty( this, ShapeFlareMixShader.sizeXfading ); - sizeYfading = new CustomMaterialProperty( this, ShapeFlareMixShader.sizeYfading ); - useQuickOcclusionTest = new CustomMaterialProperty( this, ShapeFlareMixShader.useQuickOcclusionTest ); - occlusionZOffset = new CustomMaterialProperty( this, ShapeFlareMixShader.occlusionZOffset ); - occlusionTestMaxSteps = new CustomMaterialProperty( this, ShapeFlareMixShader.occlusionTestMaxSteps ); - occlusionTestStepStride = new CustomMaterialProperty( this, ShapeFlareMixShader.occlusionTestStepStride ); - occlusionTestViewDependingScaleAmount = new CustomMaterialProperty( this, ShapeFlareMixShader.occlusionTestViewDependingScaleAmount ); - occlusionTestViewDependingDistance = new CustomMaterialProperty( this, ShapeFlareMixShader.occlusionTestViewDependingDistance ); - } - - } - -} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs.uid deleted file mode 100644 index e27a24f..0000000 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMixMaterial.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://chr1ackucqmih diff --git a/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc b/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc new file mode 100644 index 0000000..35ff8d5 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc @@ -0,0 +1,180 @@ +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc" + + + +// SHAPE +group_uniforms Shape; + +uniform float speedMultiply:hint_range(0,1) = 1; + +uniform vec4 innerHSL = vec4( 0.0, 0.0, 0.0, 1.0 ); +uniform vec4 outerHSL = vec4( 0.0, 0.0, 0.0, 1.0 ); +uniform float colorFillRange:hint_range(0,5) = 0.5; +uniform float colorFillDistributionPower:hint_range(0.01,5) = 1.0; + +varying vec4 innerColor; +varying vec4 outerColor; + +group_uniforms Shape.Streaks; +uniform float streaksFrequency:hint_range(0,8) = 1.0; +uniform float streaksRotation:hint_range(0,16) = 0.0; +uniform float streaksRotationSpeed:hint_range(-1,1) = 0.0; + +uniform float streaksNoise:hint_range(0,2) = 0.0; +uniform float streaksNoiseOffset:hint_range(-2,2) = 0.0; +uniform float streaksNoiseScroll:hint_range(-1,1) = 0.0; + +group_uniforms; + +group_uniforms Shape.Streaks2; +uniform bool streaks2enabled = false; +uniform float streaks_add_vs_mult:hint_range(0,1) = 0.0; +uniform float streaks2Multiply:hint_range(0,5) = 1.0; + +uniform float streaksFrequency2:hint_range(0,8) = 0.0; +uniform float streaksRotation2:hint_range(0,16) = 0.0; +uniform float streaksRotationSpeed2:hint_range(-1,1) = 0.0; + +uniform float streaksNoise2:hint_range(0,2) = 0.0; +uniform float streaksNoiseOffset2:hint_range(-2,2) = 0.0; +uniform float streaksNoiseScroll2:hint_range(-1,1) = 0.0; +group_uniforms; + +group_uniforms Shape.Mask; +uniform float maskScale:hint_range(0,1) = 0.5; +uniform float maskRange:hint_range(0,2) = 0.0; +uniform float maskRangeOscillation:hint_range(0,1) = 0.1; +uniform float maskRangeOscillationSpeed:hint_range(0,1) = 0.1; +uniform float maskInnerSize:hint_range(0,2) = 1.0; +uniform float maskFrequency:hint_range(0,2) = 0.0; +uniform float maskRotation:hint_range(0,1) = 0.1; +uniform float maskRotationSpeed:hint_range(-1,1) = 0.0; + +group_uniforms; + +group_uniforms Shape.Blend; +uniform float blendingRange:hint_range(0,0.5) = 0.1; + + + + +group_uniforms; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc" + +#define GENERATE_FLARE_VERTEX_DATA \ +{ \ + float _rgbScale = getRGBScale( combinedColor ); \ + innerColor = vec4( shiftRGBwithHSL( combinedColor.rgb / _rgbScale, innerHSL.rgb, 60.0) * _rgbScale, innerHSL.a * combinedColor.a ); \ + outerColor = vec4( shiftRGBwithHSL( combinedColor.rgb / _rgbScale, outerHSL.rgb, 60.0) * _rgbScale, outerHSL.a * combinedColor.a ); \ +} \ + +vec2 polarUV( vec2 _uv, float angleOffset ) +{ + vec2 toCenter = _uv - vec2( 0.5 ); + float d = length( toCenter ); + float a = atan( toCenter.y, toCenter.x ); + a = ( PI + a + angleOffset + PI * 2.0 * 0.75 ) / ( 2.0 * PI ); + + vec2 polarUV = vec2( d, mod( a, 1.0 ) ); + + return polarUV; +} + +float generateStreaks( + vec2 _polarUV, + vec2 _polarUV2, + float blendAmount, + + float _streaksFrequency, + float _streaksRotation, + float _streaksRotationSpeed, + + float _streaksNoise, + float _streaksNoiseOffset, + float _streaksNoiseScroll +) +{ + + vec2 textureUVScale = max( vec2( _streaksNoise, _streaksFrequency ), 0.001 ); + + vec2 animatedRotation = vec2( _streaksNoiseOffset + speedMultiply * TIME * _streaksNoiseScroll, + _streaksRotation + speedMultiply * TIME * _streaksRotationSpeed ); + + vec2 _tUV = _polarUV * textureUVScale + animatedRotation; + vec2 _tUV2 = _polarUV2 * textureUVScale + animatedRotation; + + + float mainLayer = perlinSeamlessWithRange( _tUV, vec2( 50.0 ) ); + float fadeLayer = perlinSeamlessWithRange( _tUV2 + vec2( 0.0, -0.5 * textureUVScale.y ), vec2( 50.0 ) ); + + + float layersMixed = mix( mainLayer, fadeLayer, blendAmount ); + + return layersMixed; +} + +vec4 generateFlare( vec2 _uv, vec4 _color, float _opacity ) +{ + float offset = 0.5; + + float halfBlend = blendingRange * 0.5; + + vec2 _polarUV = polarUV( _uv, 0.0 ); + vec2 _polarUV2 = polarUV( _uv, PI * 2.0 * offset ); + float r = _polarUV.x; + float a = _polarUV.y; + + float blendAmount = mod( a + ( 1.0 - halfBlend ) + halfBlend + ( 1.0 - halfBlend ), 1.0 ); + + if ( blendAmount > ( 1.0 - halfBlend * 2.0 ) ) + { + float t = normalizeToRange01( blendAmount, 1.0, 1.0 - halfBlend * 2.0 ); + blendAmount = triangle( t ); + } + else + { + blendAmount = 0.0; + } + + float streaks = generateStreaks( _polarUV, _polarUV2, blendAmount, + streaksFrequency, streaksRotation, streaksRotationSpeed, + streaksNoise, streaksNoiseOffset, streaksNoiseScroll + ); + + if ( streaks2enabled ) + { + float streaks2 = streaks2Multiply * generateStreaks( _polarUV, _polarUV2, blendAmount, + streaksFrequency2, streaksRotation2, streaksRotationSpeed2, + streaksNoise2, streaksNoiseOffset2, streaksNoiseScroll2 + ); + + float streaksMult = streaks * streaks2; + float streaksAdd = streaks + streaks2; + + streaks = mix( streaksAdd, streaksMult, streaks_add_vs_mult ); + } + + float colorT = clamp( r * colorFillRange, 0.0, 1.0 ); + colorT = pow( colorT, colorFillDistributionPower ); + vec4 mixedColor = mixThreeColors( innerColor, _color, outerColor, colorT ); + + mixedColor.a *= streaks; + + float animatedRotationRange = maskRange + sin( TIME * PI * 2.0 * maskRangeOscillationSpeed ) * maskRangeOscillation; + + float lengthRandom = perlinSeamlessWithRange( vec2( _polarUV.y * maskFrequency + maskRotation + speedMultiply * TIME * maskRotationSpeed, 0.0 ), vec2( 50.0 ) ) * animatedRotationRange * 2.0 - animatedRotationRange; + float lengthRandom2 = perlinSeamlessWithRange( vec2( _polarUV2.y * maskFrequency + maskRotation + speedMultiply * TIME * maskRotationSpeed, 0.0 ), vec2( 50.0 ) ) * animatedRotationRange * 2.0 - animatedRotationRange; + + float length = max( mix( lengthRandom, lengthRandom2, blendAmount ) + maskInnerSize, 0.001 ); + float streak = smoothstep( length * maskScale, 0.0, r ); + + mixedColor.a *= streak; + + // mixedColor *= _color; + mixedColor.a *= _opacity; + + return mixedColor; +} + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc.uid new file mode 100644 index 0000000..c855a8c --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc.uid @@ -0,0 +1 @@ +uid://8ctaenaswit7 diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader similarity index 76% rename from Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader rename to Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader index 89fbc03..857257a 100644 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareAdd.gdshader +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader @@ -1,4 +1,4 @@ shader_type spatial; render_mode blend_add, depth_test_disabled, cull_disabled, unshaded, fog_disabled; -#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc" \ No newline at end of file +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader.uid new file mode 100644 index 0000000..8bae61e --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader.uid @@ -0,0 +1 @@ +uid://d3ua8bynj1b8m diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs new file mode 100644 index 0000000..0b97aca --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs @@ -0,0 +1,168 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class StarTypeFlareAddShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAdd.gdshader" + ); + //*/ + + public static readonly FloatPropertyName speedMultiply = FloatPropertyName.Create( "speedMultiply" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly FloatPropertyName colorFillRange = FloatPropertyName.Create( "colorFillRange" ); + public static readonly FloatPropertyName colorFillDistributionPower = FloatPropertyName.Create( "colorFillDistributionPower" ); + public static readonly FloatPropertyName streaksFrequency = FloatPropertyName.Create( "streaksFrequency" ); + public static readonly FloatPropertyName streaksRotation = FloatPropertyName.Create( "streaksRotation" ); + public static readonly FloatPropertyName streaksRotationSpeed = FloatPropertyName.Create( "streaksRotationSpeed" ); + public static readonly FloatPropertyName streaksNoise = FloatPropertyName.Create( "streaksNoise" ); + public static readonly FloatPropertyName streaksNoiseOffset = FloatPropertyName.Create( "streaksNoiseOffset" ); + public static readonly FloatPropertyName streaksNoiseScroll = FloatPropertyName.Create( "streaksNoiseScroll" ); + public static readonly BoolPropertyName streaks2Enabled = BoolPropertyName.Create( "streaks2enabled" ); + public static readonly FloatPropertyName streaksAddVsMult = FloatPropertyName.Create( "streaks_add_vs_mult" ); + public static readonly FloatPropertyName streaks2Multiply = FloatPropertyName.Create( "streaks2Multiply" ); + public static readonly FloatPropertyName streaksFrequency2 = FloatPropertyName.Create( "streaksFrequency2" ); + public static readonly FloatPropertyName streaksRotation2 = FloatPropertyName.Create( "streaksRotation2" ); + public static readonly FloatPropertyName streaksRotationSpeed2 = FloatPropertyName.Create( "streaksRotationSpeed2" ); + public static readonly FloatPropertyName streaksNoise2 = FloatPropertyName.Create( "streaksNoise2" ); + public static readonly FloatPropertyName streaksNoiseOffset2 = FloatPropertyName.Create( "streaksNoiseOffset2" ); + public static readonly FloatPropertyName streaksNoiseScroll2 = FloatPropertyName.Create( "streaksNoiseScroll2" ); + public static readonly FloatPropertyName maskScale = FloatPropertyName.Create( "maskScale" ); + public static readonly FloatPropertyName maskRange = FloatPropertyName.Create( "maskRange" ); + public static readonly FloatPropertyName maskRangeOscillation = FloatPropertyName.Create( "maskRangeOscillation" ); + public static readonly FloatPropertyName maskRangeOscillationSpeed = FloatPropertyName.Create( "maskRangeOscillationSpeed" ); + public static readonly FloatPropertyName maskInnerSize = FloatPropertyName.Create( "maskInnerSize" ); + public static readonly FloatPropertyName maskFrequency = FloatPropertyName.Create( "maskFrequency" ); + public static readonly FloatPropertyName maskRotation = FloatPropertyName.Create( "maskRotation" ); + public static readonly FloatPropertyName maskRotationSpeed = FloatPropertyName.Create( "maskRotationSpeed" ); + public static readonly FloatPropertyName blendingRange = FloatPropertyName.Create( "blendingRange" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class StarTypeFlareAddMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty speedMultiply; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + public readonly CustomMaterialProperty colorFillRange; + public readonly CustomMaterialProperty colorFillDistributionPower; + public readonly CustomMaterialProperty streaksFrequency; + public readonly CustomMaterialProperty streaksRotation; + public readonly CustomMaterialProperty streaksRotationSpeed; + public readonly CustomMaterialProperty streaksNoise; + public readonly CustomMaterialProperty streaksNoiseOffset; + public readonly CustomMaterialProperty streaksNoiseScroll; + public readonly CustomMaterialProperty streaks2Enabled; + public readonly CustomMaterialProperty streaksAddVsMult; + public readonly CustomMaterialProperty streaks2Multiply; + public readonly CustomMaterialProperty streaksFrequency2; + public readonly CustomMaterialProperty streaksRotation2; + public readonly CustomMaterialProperty streaksRotationSpeed2; + public readonly CustomMaterialProperty streaksNoise2; + public readonly CustomMaterialProperty streaksNoiseOffset2; + public readonly CustomMaterialProperty streaksNoiseScroll2; + public readonly CustomMaterialProperty maskScale; + public readonly CustomMaterialProperty maskRange; + public readonly CustomMaterialProperty maskRangeOscillation; + public readonly CustomMaterialProperty maskRangeOscillationSpeed; + public readonly CustomMaterialProperty maskInnerSize; + public readonly CustomMaterialProperty maskFrequency; + public readonly CustomMaterialProperty maskRotation; + public readonly CustomMaterialProperty maskRotationSpeed; + public readonly CustomMaterialProperty blendingRange; + + public StarTypeFlareAddMaterial() + { + ///* + Shader = StarTypeFlareAddShader.shader.Get(); + //*/ + + speedMultiply = new CustomMaterialProperty( this, StarTypeFlareAddShader.speedMultiply ); + innerHsl = new CustomMaterialProperty( this, StarTypeFlareAddShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, StarTypeFlareAddShader.outerHsl ); + colorFillRange = new CustomMaterialProperty( this, StarTypeFlareAddShader.colorFillRange ); + colorFillDistributionPower = new CustomMaterialProperty( this, StarTypeFlareAddShader.colorFillDistributionPower ); + streaksFrequency = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksFrequency ); + streaksRotation = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksRotation ); + streaksRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksRotationSpeed ); + streaksNoise = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksNoise ); + streaksNoiseOffset = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksNoiseOffset ); + streaksNoiseScroll = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksNoiseScroll ); + streaks2Enabled = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaks2Enabled ); + streaksAddVsMult = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksAddVsMult ); + streaks2Multiply = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaks2Multiply ); + streaksFrequency2 = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksFrequency2 ); + streaksRotation2 = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksRotation2 ); + streaksRotationSpeed2 = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksRotationSpeed2 ); + streaksNoise2 = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksNoise2 ); + streaksNoiseOffset2 = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksNoiseOffset2 ); + streaksNoiseScroll2 = new CustomMaterialProperty( this, StarTypeFlareAddShader.streaksNoiseScroll2 ); + maskScale = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskScale ); + maskRange = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskRange ); + maskRangeOscillation = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskRangeOscillation ); + maskRangeOscillationSpeed = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskRangeOscillationSpeed ); + maskInnerSize = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskInnerSize ); + maskFrequency = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskFrequency ); + maskRotation = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskRotation ); + maskRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareAddShader.maskRotationSpeed ); + blendingRange = new CustomMaterialProperty( this, StarTypeFlareAddShader.blendingRange ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs.uid new file mode 100644 index 0000000..94753ad --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareAddMaterial.cs.uid @@ -0,0 +1 @@ +uid://dsip3doyfw03i diff --git a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader similarity index 76% rename from Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader rename to Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader index b762a30..3d9191a 100644 --- a/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareMix.gdshader +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader @@ -1,4 +1,4 @@ shader_type spatial; render_mode blend_mix, depth_test_disabled, cull_disabled, unshaded, fog_disabled; -#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/ShapeFlare/ShapeFlareBase.gdshaderinc" \ No newline at end of file +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader.uid new file mode 100644 index 0000000..97ab541 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader.uid @@ -0,0 +1 @@ +uid://dijnka3rbg2s0 diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs new file mode 100644 index 0000000..986ae43 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs @@ -0,0 +1,168 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class StarTypeFlareMixShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMix.gdshader" + ); + //*/ + + public static readonly FloatPropertyName speedMultiply = FloatPropertyName.Create( "speedMultiply" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly FloatPropertyName colorFillRange = FloatPropertyName.Create( "colorFillRange" ); + public static readonly FloatPropertyName colorFillDistributionPower = FloatPropertyName.Create( "colorFillDistributionPower" ); + public static readonly FloatPropertyName streaksFrequency = FloatPropertyName.Create( "streaksFrequency" ); + public static readonly FloatPropertyName streaksRotation = FloatPropertyName.Create( "streaksRotation" ); + public static readonly FloatPropertyName streaksRotationSpeed = FloatPropertyName.Create( "streaksRotationSpeed" ); + public static readonly FloatPropertyName streaksNoise = FloatPropertyName.Create( "streaksNoise" ); + public static readonly FloatPropertyName streaksNoiseOffset = FloatPropertyName.Create( "streaksNoiseOffset" ); + public static readonly FloatPropertyName streaksNoiseScroll = FloatPropertyName.Create( "streaksNoiseScroll" ); + public static readonly BoolPropertyName streaks2Enabled = BoolPropertyName.Create( "streaks2enabled" ); + public static readonly FloatPropertyName streaksAddVsMult = FloatPropertyName.Create( "streaks_add_vs_mult" ); + public static readonly FloatPropertyName streaks2Multiply = FloatPropertyName.Create( "streaks2Multiply" ); + public static readonly FloatPropertyName streaksFrequency2 = FloatPropertyName.Create( "streaksFrequency2" ); + public static readonly FloatPropertyName streaksRotation2 = FloatPropertyName.Create( "streaksRotation2" ); + public static readonly FloatPropertyName streaksRotationSpeed2 = FloatPropertyName.Create( "streaksRotationSpeed2" ); + public static readonly FloatPropertyName streaksNoise2 = FloatPropertyName.Create( "streaksNoise2" ); + public static readonly FloatPropertyName streaksNoiseOffset2 = FloatPropertyName.Create( "streaksNoiseOffset2" ); + public static readonly FloatPropertyName streaksNoiseScroll2 = FloatPropertyName.Create( "streaksNoiseScroll2" ); + public static readonly FloatPropertyName maskScale = FloatPropertyName.Create( "maskScale" ); + public static readonly FloatPropertyName maskRange = FloatPropertyName.Create( "maskRange" ); + public static readonly FloatPropertyName maskRangeOscillation = FloatPropertyName.Create( "maskRangeOscillation" ); + public static readonly FloatPropertyName maskRangeOscillationSpeed = FloatPropertyName.Create( "maskRangeOscillationSpeed" ); + public static readonly FloatPropertyName maskInnerSize = FloatPropertyName.Create( "maskInnerSize" ); + public static readonly FloatPropertyName maskFrequency = FloatPropertyName.Create( "maskFrequency" ); + public static readonly FloatPropertyName maskRotation = FloatPropertyName.Create( "maskRotation" ); + public static readonly FloatPropertyName maskRotationSpeed = FloatPropertyName.Create( "maskRotationSpeed" ); + public static readonly FloatPropertyName blendingRange = FloatPropertyName.Create( "blendingRange" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class StarTypeFlareMixMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty speedMultiply; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + public readonly CustomMaterialProperty colorFillRange; + public readonly CustomMaterialProperty colorFillDistributionPower; + public readonly CustomMaterialProperty streaksFrequency; + public readonly CustomMaterialProperty streaksRotation; + public readonly CustomMaterialProperty streaksRotationSpeed; + public readonly CustomMaterialProperty streaksNoise; + public readonly CustomMaterialProperty streaksNoiseOffset; + public readonly CustomMaterialProperty streaksNoiseScroll; + public readonly CustomMaterialProperty streaks2Enabled; + public readonly CustomMaterialProperty streaksAddVsMult; + public readonly CustomMaterialProperty streaks2Multiply; + public readonly CustomMaterialProperty streaksFrequency2; + public readonly CustomMaterialProperty streaksRotation2; + public readonly CustomMaterialProperty streaksRotationSpeed2; + public readonly CustomMaterialProperty streaksNoise2; + public readonly CustomMaterialProperty streaksNoiseOffset2; + public readonly CustomMaterialProperty streaksNoiseScroll2; + public readonly CustomMaterialProperty maskScale; + public readonly CustomMaterialProperty maskRange; + public readonly CustomMaterialProperty maskRangeOscillation; + public readonly CustomMaterialProperty maskRangeOscillationSpeed; + public readonly CustomMaterialProperty maskInnerSize; + public readonly CustomMaterialProperty maskFrequency; + public readonly CustomMaterialProperty maskRotation; + public readonly CustomMaterialProperty maskRotationSpeed; + public readonly CustomMaterialProperty blendingRange; + + public StarTypeFlareMixMaterial() + { + ///* + Shader = StarTypeFlareMixShader.shader.Get(); + //*/ + + speedMultiply = new CustomMaterialProperty( this, StarTypeFlareMixShader.speedMultiply ); + innerHsl = new CustomMaterialProperty( this, StarTypeFlareMixShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, StarTypeFlareMixShader.outerHsl ); + colorFillRange = new CustomMaterialProperty( this, StarTypeFlareMixShader.colorFillRange ); + colorFillDistributionPower = new CustomMaterialProperty( this, StarTypeFlareMixShader.colorFillDistributionPower ); + streaksFrequency = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksFrequency ); + streaksRotation = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksRotation ); + streaksRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksRotationSpeed ); + streaksNoise = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksNoise ); + streaksNoiseOffset = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksNoiseOffset ); + streaksNoiseScroll = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksNoiseScroll ); + streaks2Enabled = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaks2Enabled ); + streaksAddVsMult = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksAddVsMult ); + streaks2Multiply = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaks2Multiply ); + streaksFrequency2 = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksFrequency2 ); + streaksRotation2 = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksRotation2 ); + streaksRotationSpeed2 = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksRotationSpeed2 ); + streaksNoise2 = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksNoise2 ); + streaksNoiseOffset2 = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksNoiseOffset2 ); + streaksNoiseScroll2 = new CustomMaterialProperty( this, StarTypeFlareMixShader.streaksNoiseScroll2 ); + maskScale = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskScale ); + maskRange = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskRange ); + maskRangeOscillation = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskRangeOscillation ); + maskRangeOscillationSpeed = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskRangeOscillationSpeed ); + maskInnerSize = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskInnerSize ); + maskFrequency = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskFrequency ); + maskRotation = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskRotation ); + maskRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareMixShader.maskRotationSpeed ); + blendingRange = new CustomMaterialProperty( this, StarTypeFlareMixShader.blendingRange ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs.uid new file mode 100644 index 0000000..60eacc9 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMixMaterial.cs.uid @@ -0,0 +1 @@ +uid://bqe6g7txwd75 diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader new file mode 100644 index 0000000..bc1f520 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_mul, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader.uid new file mode 100644 index 0000000..159c294 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader.uid @@ -0,0 +1 @@ +uid://dgfqbeu1kcac5 diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs new file mode 100644 index 0000000..46beed9 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs @@ -0,0 +1,168 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class StarTypeFlareMultiplyShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiply.gdshader" + ); + //*/ + + public static readonly FloatPropertyName speedMultiply = FloatPropertyName.Create( "speedMultiply" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly FloatPropertyName colorFillRange = FloatPropertyName.Create( "colorFillRange" ); + public static readonly FloatPropertyName colorFillDistributionPower = FloatPropertyName.Create( "colorFillDistributionPower" ); + public static readonly FloatPropertyName streaksFrequency = FloatPropertyName.Create( "streaksFrequency" ); + public static readonly FloatPropertyName streaksRotation = FloatPropertyName.Create( "streaksRotation" ); + public static readonly FloatPropertyName streaksRotationSpeed = FloatPropertyName.Create( "streaksRotationSpeed" ); + public static readonly FloatPropertyName streaksNoise = FloatPropertyName.Create( "streaksNoise" ); + public static readonly FloatPropertyName streaksNoiseOffset = FloatPropertyName.Create( "streaksNoiseOffset" ); + public static readonly FloatPropertyName streaksNoiseScroll = FloatPropertyName.Create( "streaksNoiseScroll" ); + public static readonly BoolPropertyName streaks2Enabled = BoolPropertyName.Create( "streaks2enabled" ); + public static readonly FloatPropertyName streaksAddVsMult = FloatPropertyName.Create( "streaks_add_vs_mult" ); + public static readonly FloatPropertyName streaks2Multiply = FloatPropertyName.Create( "streaks2Multiply" ); + public static readonly FloatPropertyName streaksFrequency2 = FloatPropertyName.Create( "streaksFrequency2" ); + public static readonly FloatPropertyName streaksRotation2 = FloatPropertyName.Create( "streaksRotation2" ); + public static readonly FloatPropertyName streaksRotationSpeed2 = FloatPropertyName.Create( "streaksRotationSpeed2" ); + public static readonly FloatPropertyName streaksNoise2 = FloatPropertyName.Create( "streaksNoise2" ); + public static readonly FloatPropertyName streaksNoiseOffset2 = FloatPropertyName.Create( "streaksNoiseOffset2" ); + public static readonly FloatPropertyName streaksNoiseScroll2 = FloatPropertyName.Create( "streaksNoiseScroll2" ); + public static readonly FloatPropertyName maskScale = FloatPropertyName.Create( "maskScale" ); + public static readonly FloatPropertyName maskRange = FloatPropertyName.Create( "maskRange" ); + public static readonly FloatPropertyName maskRangeOscillation = FloatPropertyName.Create( "maskRangeOscillation" ); + public static readonly FloatPropertyName maskRangeOscillationSpeed = FloatPropertyName.Create( "maskRangeOscillationSpeed" ); + public static readonly FloatPropertyName maskInnerSize = FloatPropertyName.Create( "maskInnerSize" ); + public static readonly FloatPropertyName maskFrequency = FloatPropertyName.Create( "maskFrequency" ); + public static readonly FloatPropertyName maskRotation = FloatPropertyName.Create( "maskRotation" ); + public static readonly FloatPropertyName maskRotationSpeed = FloatPropertyName.Create( "maskRotationSpeed" ); + public static readonly FloatPropertyName blendingRange = FloatPropertyName.Create( "blendingRange" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class StarTypeFlareMultiplyMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty speedMultiply; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + public readonly CustomMaterialProperty colorFillRange; + public readonly CustomMaterialProperty colorFillDistributionPower; + public readonly CustomMaterialProperty streaksFrequency; + public readonly CustomMaterialProperty streaksRotation; + public readonly CustomMaterialProperty streaksRotationSpeed; + public readonly CustomMaterialProperty streaksNoise; + public readonly CustomMaterialProperty streaksNoiseOffset; + public readonly CustomMaterialProperty streaksNoiseScroll; + public readonly CustomMaterialProperty streaks2Enabled; + public readonly CustomMaterialProperty streaksAddVsMult; + public readonly CustomMaterialProperty streaks2Multiply; + public readonly CustomMaterialProperty streaksFrequency2; + public readonly CustomMaterialProperty streaksRotation2; + public readonly CustomMaterialProperty streaksRotationSpeed2; + public readonly CustomMaterialProperty streaksNoise2; + public readonly CustomMaterialProperty streaksNoiseOffset2; + public readonly CustomMaterialProperty streaksNoiseScroll2; + public readonly CustomMaterialProperty maskScale; + public readonly CustomMaterialProperty maskRange; + public readonly CustomMaterialProperty maskRangeOscillation; + public readonly CustomMaterialProperty maskRangeOscillationSpeed; + public readonly CustomMaterialProperty maskInnerSize; + public readonly CustomMaterialProperty maskFrequency; + public readonly CustomMaterialProperty maskRotation; + public readonly CustomMaterialProperty maskRotationSpeed; + public readonly CustomMaterialProperty blendingRange; + + public StarTypeFlareMultiplyMaterial() + { + ///* + Shader = StarTypeFlareMultiplyShader.shader.Get(); + //*/ + + speedMultiply = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.speedMultiply ); + innerHsl = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.outerHsl ); + colorFillRange = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.colorFillRange ); + colorFillDistributionPower = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.colorFillDistributionPower ); + streaksFrequency = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksFrequency ); + streaksRotation = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksRotation ); + streaksRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksRotationSpeed ); + streaksNoise = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksNoise ); + streaksNoiseOffset = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksNoiseOffset ); + streaksNoiseScroll = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksNoiseScroll ); + streaks2Enabled = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaks2Enabled ); + streaksAddVsMult = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksAddVsMult ); + streaks2Multiply = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaks2Multiply ); + streaksFrequency2 = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksFrequency2 ); + streaksRotation2 = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksRotation2 ); + streaksRotationSpeed2 = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksRotationSpeed2 ); + streaksNoise2 = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksNoise2 ); + streaksNoiseOffset2 = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksNoiseOffset2 ); + streaksNoiseScroll2 = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.streaksNoiseScroll2 ); + maskScale = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskScale ); + maskRange = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskRange ); + maskRangeOscillation = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskRangeOscillation ); + maskRangeOscillationSpeed = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskRangeOscillationSpeed ); + maskInnerSize = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskInnerSize ); + maskFrequency = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskFrequency ); + maskRotation = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskRotation ); + maskRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.maskRotationSpeed ); + blendingRange = new CustomMaterialProperty( this, StarTypeFlareMultiplyShader.blendingRange ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs.uid new file mode 100644 index 0000000..bbbb687 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareMultiplyMaterial.cs.uid @@ -0,0 +1 @@ +uid://bqdljsw7akj3g diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader new file mode 100644 index 0000000..9226d38 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_sub, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/StarTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader.uid new file mode 100644 index 0000000..9c24c55 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader.uid @@ -0,0 +1 @@ +uid://bbxpiog84ery1 diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs new file mode 100644 index 0000000..f8f6b74 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs @@ -0,0 +1,168 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class StarTypeFlareSubtractShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtract.gdshader" + ); + //*/ + + public static readonly FloatPropertyName speedMultiply = FloatPropertyName.Create( "speedMultiply" ); + public static readonly Vector4PropertyName innerHsl = Vector4PropertyName.Create( "innerHSL" ); + public static readonly Vector4PropertyName outerHsl = Vector4PropertyName.Create( "outerHSL" ); + public static readonly FloatPropertyName colorFillRange = FloatPropertyName.Create( "colorFillRange" ); + public static readonly FloatPropertyName colorFillDistributionPower = FloatPropertyName.Create( "colorFillDistributionPower" ); + public static readonly FloatPropertyName streaksFrequency = FloatPropertyName.Create( "streaksFrequency" ); + public static readonly FloatPropertyName streaksRotation = FloatPropertyName.Create( "streaksRotation" ); + public static readonly FloatPropertyName streaksRotationSpeed = FloatPropertyName.Create( "streaksRotationSpeed" ); + public static readonly FloatPropertyName streaksNoise = FloatPropertyName.Create( "streaksNoise" ); + public static readonly FloatPropertyName streaksNoiseOffset = FloatPropertyName.Create( "streaksNoiseOffset" ); + public static readonly FloatPropertyName streaksNoiseScroll = FloatPropertyName.Create( "streaksNoiseScroll" ); + public static readonly BoolPropertyName streaks2Enabled = BoolPropertyName.Create( "streaks2enabled" ); + public static readonly FloatPropertyName streaksAddVsMult = FloatPropertyName.Create( "streaks_add_vs_mult" ); + public static readonly FloatPropertyName streaks2Multiply = FloatPropertyName.Create( "streaks2Multiply" ); + public static readonly FloatPropertyName streaksFrequency2 = FloatPropertyName.Create( "streaksFrequency2" ); + public static readonly FloatPropertyName streaksRotation2 = FloatPropertyName.Create( "streaksRotation2" ); + public static readonly FloatPropertyName streaksRotationSpeed2 = FloatPropertyName.Create( "streaksRotationSpeed2" ); + public static readonly FloatPropertyName streaksNoise2 = FloatPropertyName.Create( "streaksNoise2" ); + public static readonly FloatPropertyName streaksNoiseOffset2 = FloatPropertyName.Create( "streaksNoiseOffset2" ); + public static readonly FloatPropertyName streaksNoiseScroll2 = FloatPropertyName.Create( "streaksNoiseScroll2" ); + public static readonly FloatPropertyName maskScale = FloatPropertyName.Create( "maskScale" ); + public static readonly FloatPropertyName maskRange = FloatPropertyName.Create( "maskRange" ); + public static readonly FloatPropertyName maskRangeOscillation = FloatPropertyName.Create( "maskRangeOscillation" ); + public static readonly FloatPropertyName maskRangeOscillationSpeed = FloatPropertyName.Create( "maskRangeOscillationSpeed" ); + public static readonly FloatPropertyName maskInnerSize = FloatPropertyName.Create( "maskInnerSize" ); + public static readonly FloatPropertyName maskFrequency = FloatPropertyName.Create( "maskFrequency" ); + public static readonly FloatPropertyName maskRotation = FloatPropertyName.Create( "maskRotation" ); + public static readonly FloatPropertyName maskRotationSpeed = FloatPropertyName.Create( "maskRotationSpeed" ); + public static readonly FloatPropertyName blendingRange = FloatPropertyName.Create( "blendingRange" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class StarTypeFlareSubtractMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty speedMultiply; + public readonly CustomMaterialProperty innerHsl; + public readonly CustomMaterialProperty outerHsl; + public readonly CustomMaterialProperty colorFillRange; + public readonly CustomMaterialProperty colorFillDistributionPower; + public readonly CustomMaterialProperty streaksFrequency; + public readonly CustomMaterialProperty streaksRotation; + public readonly CustomMaterialProperty streaksRotationSpeed; + public readonly CustomMaterialProperty streaksNoise; + public readonly CustomMaterialProperty streaksNoiseOffset; + public readonly CustomMaterialProperty streaksNoiseScroll; + public readonly CustomMaterialProperty streaks2Enabled; + public readonly CustomMaterialProperty streaksAddVsMult; + public readonly CustomMaterialProperty streaks2Multiply; + public readonly CustomMaterialProperty streaksFrequency2; + public readonly CustomMaterialProperty streaksRotation2; + public readonly CustomMaterialProperty streaksRotationSpeed2; + public readonly CustomMaterialProperty streaksNoise2; + public readonly CustomMaterialProperty streaksNoiseOffset2; + public readonly CustomMaterialProperty streaksNoiseScroll2; + public readonly CustomMaterialProperty maskScale; + public readonly CustomMaterialProperty maskRange; + public readonly CustomMaterialProperty maskRangeOscillation; + public readonly CustomMaterialProperty maskRangeOscillationSpeed; + public readonly CustomMaterialProperty maskInnerSize; + public readonly CustomMaterialProperty maskFrequency; + public readonly CustomMaterialProperty maskRotation; + public readonly CustomMaterialProperty maskRotationSpeed; + public readonly CustomMaterialProperty blendingRange; + + public StarTypeFlareSubtractMaterial() + { + ///* + Shader = StarTypeFlareSubtractShader.shader.Get(); + //*/ + + speedMultiply = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.speedMultiply ); + innerHsl = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.innerHsl ); + outerHsl = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.outerHsl ); + colorFillRange = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.colorFillRange ); + colorFillDistributionPower = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.colorFillDistributionPower ); + streaksFrequency = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksFrequency ); + streaksRotation = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksRotation ); + streaksRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksRotationSpeed ); + streaksNoise = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksNoise ); + streaksNoiseOffset = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksNoiseOffset ); + streaksNoiseScroll = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksNoiseScroll ); + streaks2Enabled = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaks2Enabled ); + streaksAddVsMult = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksAddVsMult ); + streaks2Multiply = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaks2Multiply ); + streaksFrequency2 = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksFrequency2 ); + streaksRotation2 = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksRotation2 ); + streaksRotationSpeed2 = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksRotationSpeed2 ); + streaksNoise2 = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksNoise2 ); + streaksNoiseOffset2 = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksNoiseOffset2 ); + streaksNoiseScroll2 = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.streaksNoiseScroll2 ); + maskScale = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskScale ); + maskRange = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskRange ); + maskRangeOscillation = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskRangeOscillation ); + maskRangeOscillationSpeed = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskRangeOscillationSpeed ); + maskInnerSize = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskInnerSize ); + maskFrequency = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskFrequency ); + maskRotation = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskRotation ); + maskRotationSpeed = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.maskRotationSpeed ); + blendingRange = new CustomMaterialProperty( this, StarTypeFlareSubtractShader.blendingRange ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs.uid new file mode 100644 index 0000000..a802d69 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/StarType/Variants/StarTypeFlareSubtractMaterial.cs.uid @@ -0,0 +1 @@ +uid://2kjkrfhb6h0v diff --git a/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc b/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc new file mode 100644 index 0000000..e0084ea --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc @@ -0,0 +1,56 @@ +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/Flares.gdshaderinc" + + + +// SHAPE +group_uniforms Shape; + +uniform sampler2D texture:source_color, filter_linear, repeat_enable; +uniform float textureUVScale = 1; +uniform bool textureRepeat = false; + +uniform sampler2D textureMask:source_color, filter_linear, repeat_enable; +uniform float textureMaskUVScale = 1; +uniform bool textureMaskRepeat = false; + +group_uniforms; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-Variables.gdshaderinc" + +#define GENERATE_FLARE_VERTEX_DATA \ +{ \ + \ + \ +} \ + + +vec4 generateFlare( vec2 _uv, vec4 _color, float _opacity ) +{ + vec2 _maskUV = _uv; + _maskUV = textureMaskUVScale * ( _uv - vec2( 0.5 ) ) + vec2( 0.5 ); + + _uv = textureUVScale * ( _uv - vec2( 0.5 ) ) + vec2( 0.5 ); + + if ( ! textureMaskRepeat ) + { + _maskUV = clamp( _maskUV, 0.0, 1.0 ); + } + + + if ( ! textureRepeat ) + { + _uv = clamp( _uv, 0.0, 1.0 ); + } + + + + vec4 mixedColor = textureLod( texture, _uv, 0 ); + mixedColor.a *= textureLod( textureMask, _maskUV, 0 ).r; + + mixedColor *= _color; + mixedColor.a *= _opacity; + + return mixedColor; +} + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/BaseFlare/BaseFlare-VertexFragment.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc.uid b/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc.uid new file mode 100644 index 0000000..4360a9f --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc.uid @@ -0,0 +1 @@ +uid://cgmeqshu7ca4k diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader new file mode 100644 index 0000000..9b0bf67 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_add, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader.uid new file mode 100644 index 0000000..c140f16 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader.uid @@ -0,0 +1 @@ +uid://djs7lam1b5b54 diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs new file mode 100644 index 0000000..042e25b --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs @@ -0,0 +1,99 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class TextureTypeFlareAddShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAdd.gdshader" + ); + //*/ + + public static readonly Sampler2DPropertyName texture = Sampler2DPropertyName.Create( "texture" ); + public static readonly FloatPropertyName textureUvScale = FloatPropertyName.Create( "textureUVScale" ); + public static readonly BoolPropertyName textureRepeat = BoolPropertyName.Create( "textureRepeat" ); + public static readonly Sampler2DPropertyName textureMask = Sampler2DPropertyName.Create( "textureMask" ); + public static readonly FloatPropertyName textureMaskUvScale = FloatPropertyName.Create( "textureMaskUVScale" ); + public static readonly BoolPropertyName textureMaskRepeat = BoolPropertyName.Create( "textureMaskRepeat" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class TextureTypeFlareAddMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty texture; + public readonly CustomMaterialProperty textureUvScale; + public readonly CustomMaterialProperty textureRepeat; + public readonly CustomMaterialProperty textureMask; + public readonly CustomMaterialProperty textureMaskUvScale; + public readonly CustomMaterialProperty textureMaskRepeat; + + public TextureTypeFlareAddMaterial() + { + ///* + Shader = TextureTypeFlareAddShader.shader.Get(); + //*/ + + texture = new CustomMaterialProperty( this, TextureTypeFlareAddShader.texture ); + textureUvScale = new CustomMaterialProperty( this, TextureTypeFlareAddShader.textureUvScale ); + textureRepeat = new CustomMaterialProperty( this, TextureTypeFlareAddShader.textureRepeat ); + textureMask = new CustomMaterialProperty( this, TextureTypeFlareAddShader.textureMask ); + textureMaskUvScale = new CustomMaterialProperty( this, TextureTypeFlareAddShader.textureMaskUvScale ); + textureMaskRepeat = new CustomMaterialProperty( this, TextureTypeFlareAddShader.textureMaskRepeat ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs.uid new file mode 100644 index 0000000..267110f --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareAddMaterial.cs.uid @@ -0,0 +1 @@ +uid://d1iq626el78ug diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader new file mode 100644 index 0000000..ec7dc92 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_mix, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader.uid new file mode 100644 index 0000000..1e51b13 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader.uid @@ -0,0 +1 @@ +uid://c03is1x34q1fc diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs new file mode 100644 index 0000000..70e32b8 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs @@ -0,0 +1,99 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class TextureTypeFlareMixShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMix.gdshader" + ); + //*/ + + public static readonly Sampler2DPropertyName texture = Sampler2DPropertyName.Create( "texture" ); + public static readonly FloatPropertyName textureUvScale = FloatPropertyName.Create( "textureUVScale" ); + public static readonly BoolPropertyName textureRepeat = BoolPropertyName.Create( "textureRepeat" ); + public static readonly Sampler2DPropertyName textureMask = Sampler2DPropertyName.Create( "textureMask" ); + public static readonly FloatPropertyName textureMaskUvScale = FloatPropertyName.Create( "textureMaskUVScale" ); + public static readonly BoolPropertyName textureMaskRepeat = BoolPropertyName.Create( "textureMaskRepeat" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class TextureTypeFlareMixMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty texture; + public readonly CustomMaterialProperty textureUvScale; + public readonly CustomMaterialProperty textureRepeat; + public readonly CustomMaterialProperty textureMask; + public readonly CustomMaterialProperty textureMaskUvScale; + public readonly CustomMaterialProperty textureMaskRepeat; + + public TextureTypeFlareMixMaterial() + { + ///* + Shader = TextureTypeFlareMixShader.shader.Get(); + //*/ + + texture = new CustomMaterialProperty( this, TextureTypeFlareMixShader.texture ); + textureUvScale = new CustomMaterialProperty( this, TextureTypeFlareMixShader.textureUvScale ); + textureRepeat = new CustomMaterialProperty( this, TextureTypeFlareMixShader.textureRepeat ); + textureMask = new CustomMaterialProperty( this, TextureTypeFlareMixShader.textureMask ); + textureMaskUvScale = new CustomMaterialProperty( this, TextureTypeFlareMixShader.textureMaskUvScale ); + textureMaskRepeat = new CustomMaterialProperty( this, TextureTypeFlareMixShader.textureMaskRepeat ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs.uid new file mode 100644 index 0000000..db35327 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMixMaterial.cs.uid @@ -0,0 +1 @@ +uid://b7vk7qlvpqwil diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader new file mode 100644 index 0000000..aa7087b --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_mul, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader.uid new file mode 100644 index 0000000..57b04b0 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader.uid @@ -0,0 +1 @@ +uid://c1p4k7mbqoj7d diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs new file mode 100644 index 0000000..d023ea7 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs @@ -0,0 +1,99 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class TextureTypeFlareMultiplyShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiply.gdshader" + ); + //*/ + + public static readonly Sampler2DPropertyName texture = Sampler2DPropertyName.Create( "texture" ); + public static readonly FloatPropertyName textureUvScale = FloatPropertyName.Create( "textureUVScale" ); + public static readonly BoolPropertyName textureRepeat = BoolPropertyName.Create( "textureRepeat" ); + public static readonly Sampler2DPropertyName textureMask = Sampler2DPropertyName.Create( "textureMask" ); + public static readonly FloatPropertyName textureMaskUvScale = FloatPropertyName.Create( "textureMaskUVScale" ); + public static readonly BoolPropertyName textureMaskRepeat = BoolPropertyName.Create( "textureMaskRepeat" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class TextureTypeFlareMultiplyMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty texture; + public readonly CustomMaterialProperty textureUvScale; + public readonly CustomMaterialProperty textureRepeat; + public readonly CustomMaterialProperty textureMask; + public readonly CustomMaterialProperty textureMaskUvScale; + public readonly CustomMaterialProperty textureMaskRepeat; + + public TextureTypeFlareMultiplyMaterial() + { + ///* + Shader = TextureTypeFlareMultiplyShader.shader.Get(); + //*/ + + texture = new CustomMaterialProperty( this, TextureTypeFlareMultiplyShader.texture ); + textureUvScale = new CustomMaterialProperty( this, TextureTypeFlareMultiplyShader.textureUvScale ); + textureRepeat = new CustomMaterialProperty( this, TextureTypeFlareMultiplyShader.textureRepeat ); + textureMask = new CustomMaterialProperty( this, TextureTypeFlareMultiplyShader.textureMask ); + textureMaskUvScale = new CustomMaterialProperty( this, TextureTypeFlareMultiplyShader.textureMaskUvScale ); + textureMaskRepeat = new CustomMaterialProperty( this, TextureTypeFlareMultiplyShader.textureMaskRepeat ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs.uid new file mode 100644 index 0000000..6a048c3 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareMultiplyMaterial.cs.uid @@ -0,0 +1 @@ +uid://dcr034iu5nn75 diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader new file mode 100644 index 0000000..eddb2b9 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader @@ -0,0 +1,4 @@ +shader_type spatial; +render_mode blend_sub, depth_test_disabled, cull_disabled, unshaded, fog_disabled; + +#include "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/TextureTypeFlare.gdshaderinc" \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader.uid new file mode 100644 index 0000000..4042ed6 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader.uid @@ -0,0 +1 @@ +uid://cjd1ji4igmsqm diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs new file mode 100644 index 0000000..e9a27fe --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs @@ -0,0 +1,99 @@ +using Godot; + +namespace Rokojori +{ + // Generated by ShaderClassGenerator + + public class TextureTypeFlareSubtractShader + { + ///* + public static readonly CachedResource shader = new CachedResource( + "res://addons/rokojori_action_library/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtract.gdshader" + ); + //*/ + + public static readonly Sampler2DPropertyName texture = Sampler2DPropertyName.Create( "texture" ); + public static readonly FloatPropertyName textureUvScale = FloatPropertyName.Create( "textureUVScale" ); + public static readonly BoolPropertyName textureRepeat = BoolPropertyName.Create( "textureRepeat" ); + public static readonly Sampler2DPropertyName textureMask = Sampler2DPropertyName.Create( "textureMask" ); + public static readonly FloatPropertyName textureMaskUvScale = FloatPropertyName.Create( "textureMaskUVScale" ); + public static readonly BoolPropertyName textureMaskRepeat = BoolPropertyName.Create( "textureMaskRepeat" ); + public static readonly ColorPropertyName color = ColorPropertyName.Create( "color" ); + public static readonly FloatPropertyName opacity = FloatPropertyName.Create( "opacity" ); + public static readonly Sampler2DPropertyName opacityCurve = Sampler2DPropertyName.Create( "opacityCurve" ); + public static readonly FloatPropertyName minHueRandom = FloatPropertyName.Create( "minHueRandom" ); + public static readonly FloatPropertyName maxHueRandom = FloatPropertyName.Create( "maxHueRandom" ); + public static readonly FloatPropertyName shapeNoiseAmount = FloatPropertyName.Create( "shapeNoiseAmount" ); + public static readonly FloatPropertyName shapeNoiseScale = FloatPropertyName.Create( "shapeNoiseScale" ); + public static readonly FloatPropertyName sizeX = FloatPropertyName.Create( "sizeX" ); + public static readonly FloatPropertyName sizeY = FloatPropertyName.Create( "sizeY" ); + public static readonly FloatPropertyName worldSizeScale = FloatPropertyName.Create( "worldSizeScale" ); + public static readonly FloatPropertyName screenSizeScale = FloatPropertyName.Create( "screenSizeScale" ); + public static readonly FloatPropertyName worldSizeVsScreenSize = FloatPropertyName.Create( "worldSize_vs_screenSize" ); + public static readonly FloatPropertyName randomScaleMin = FloatPropertyName.Create( "randomScaleMin" ); + public static readonly FloatPropertyName randomScaleMax = FloatPropertyName.Create( "randomScaleMax" ); + public static readonly FloatPropertyName extension = FloatPropertyName.Create( "extension" ); + public static readonly FloatPropertyName rotation = FloatPropertyName.Create( "rotation" ); + public static readonly FloatPropertyName rotationOverX = FloatPropertyName.Create( "rotationOverX" ); + public static readonly FloatPropertyName rotationOverY = FloatPropertyName.Create( "rotationOverY" ); + public static readonly FloatPropertyName rotationPerLayer = FloatPropertyName.Create( "rotationPerLayer" ); + public static readonly Vector2PropertyName screenOffset = Vector2PropertyName.Create( "screenOffset" ); + public static readonly Vector2PropertyName screenOffsetScale = Vector2PropertyName.Create( "screenOffsetScale" ); + public static readonly Vector2PropertyName screenOffsetLayerSpread = Vector2PropertyName.Create( "screenOffsetLayerSpread" ); + public static readonly IntPropertyName chromaticAberationMode = IntPropertyName.Create( "chromaticAberationMode" ); + public static readonly FloatPropertyName chromaticAberationAmount = FloatPropertyName.Create( "chromaticAberationAmount" ); + public static readonly IntPropertyName chromaticAberationSteps = IntPropertyName.Create( "chromaticAberationSteps" ); + public static readonly Vector2PropertyName chromaticAberationDirection = Vector2PropertyName.Create( "chromaticAberationDirection" ); + public static readonly FloatPropertyName chromaticAberationDirectionTowardsCenter = FloatPropertyName.Create( "chromaticAberationDirectionTowardsCenter" ); + public static readonly FloatPropertyName chromaticAberationCenterScale = FloatPropertyName.Create( "chromaticAberationCenterScale" ); + public static readonly FloatPropertyName chromaticAberationCenterOffset = FloatPropertyName.Create( "chromaticAberationCenterOffset" ); + public static readonly Vector3PropertyName chromaticAberationShifts = Vector3PropertyName.Create( "chromaticAberationShifts" ); + public static readonly FloatPropertyName chromaticAberationSmear = FloatPropertyName.Create( "chromaticAberationSmear" ); + public static readonly IntPropertyName fadingMode = IntPropertyName.Create( "fadingMode" ); + public static readonly Sampler2DPropertyName fading = Sampler2DPropertyName.Create( "fading" ); + public static readonly Sampler2DPropertyName opacityFading = Sampler2DPropertyName.Create( "opacityFading" ); + public static readonly Sampler2DPropertyName sizeXfading = Sampler2DPropertyName.Create( "sizeXfading" ); + public static readonly Sampler2DPropertyName sizeYfading = Sampler2DPropertyName.Create( "sizeYfading" ); + public static readonly FloatPropertyName fadingPower = FloatPropertyName.Create( "fadingPower" ); + public static readonly FloatPropertyName opacityFadingPower = FloatPropertyName.Create( "opacityFadingPower" ); + public static readonly FloatPropertyName sizeXfadingPower = FloatPropertyName.Create( "sizeXfadingPower" ); + public static readonly FloatPropertyName sizeYfadingPower = FloatPropertyName.Create( "sizeYfadingPower" ); + public static readonly IntPropertyName occlusionMode = IntPropertyName.Create( "occlusionMode" ); + public static readonly FloatPropertyName occlusionZOffset = FloatPropertyName.Create( "occlusionZOffset" ); + public static readonly IntPropertyName occlusionTestMaxSteps = IntPropertyName.Create( "occlusionTestMaxSteps" ); + public static readonly FloatPropertyName occlusionTestStepStride = FloatPropertyName.Create( "occlusionTestStepStride" ); + public static readonly FloatPropertyName occlusionTestViewDependingScaleAmount = FloatPropertyName.Create( "occlusionTest_ViewDependingScaleAmount" ); + public static readonly FloatPropertyName occlusionTestViewDependingDistance = FloatPropertyName.Create( "occlusionTest_ViewDependingDistance" ); + public static readonly FloatPropertyName occlusionToSize = FloatPropertyName.Create( "occlusionToSize" ); + + } + + [Tool] + public partial class TextureTypeFlareSubtractMaterial:BaseFlareMaterial + { + + + public readonly CustomMaterialProperty texture; + public readonly CustomMaterialProperty textureUvScale; + public readonly CustomMaterialProperty textureRepeat; + public readonly CustomMaterialProperty textureMask; + public readonly CustomMaterialProperty textureMaskUvScale; + public readonly CustomMaterialProperty textureMaskRepeat; + + public TextureTypeFlareSubtractMaterial() + { + ///* + Shader = TextureTypeFlareSubtractShader.shader.Get(); + //*/ + + texture = new CustomMaterialProperty( this, TextureTypeFlareSubtractShader.texture ); + textureUvScale = new CustomMaterialProperty( this, TextureTypeFlareSubtractShader.textureUvScale ); + textureRepeat = new CustomMaterialProperty( this, TextureTypeFlareSubtractShader.textureRepeat ); + textureMask = new CustomMaterialProperty( this, TextureTypeFlareSubtractShader.textureMask ); + textureMaskUvScale = new CustomMaterialProperty( this, TextureTypeFlareSubtractShader.textureMaskUvScale ); + textureMaskRepeat = new CustomMaterialProperty( this, TextureTypeFlareSubtractShader.textureMaskRepeat ); + } + + } + +} \ No newline at end of file diff --git a/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs.uid b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs.uid new file mode 100644 index 0000000..f9265e1 --- /dev/null +++ b/Runtime/Shading/Shaders/Flares/TextureType/Variants/TextureTypeFlareSubtractMaterial.cs.uid @@ -0,0 +1 @@ +uid://dlff4jlf8n658 diff --git a/Runtime/Shading/Shaders/UniformMember.cs b/Runtime/Shading/Shaders/UniformMember.cs index f0f5c50..8bf78e3 100644 --- a/Runtime/Shading/Shaders/UniformMember.cs +++ b/Runtime/Shading/Shaders/UniformMember.cs @@ -19,6 +19,21 @@ namespace Rokojori return type + " " + name + "( '" + hint + "', '" + hintString + "', '" + usage + "')"; } + public bool Equals( UniformMember other ) + { + if ( other == null ) + { + return false; + } + + return name == other.name && + type == other.type && + hint == other.hint && + hintString == other.hintString && + usage == other.usage + ; + } + public static UniformMember Create( string name, Variant.Type type ) { var um = new UniformMember(); diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs index 859587a..d2d1e43 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassGenerator.cs @@ -1,6 +1,7 @@ using Godot; using System.Reflection; using System.Collections.Generic; +using System.Linq; namespace Rokojori { @@ -8,46 +9,186 @@ namespace Rokojori [GlobalClass] public partial class CSShaderClassGenerator:Node { + [ExportToolButton( "Generate")] + public Callable generateButton => Callable.From( + ()=> + { + Generate(); + } + ); + + [Export] public Shader[] shaders; + [ExportGroup( "Common Base Material")] [Export] - public bool generate; + public bool createCommonBase = false; - public override void _Process( double delta ) - { - if ( generate ) - { - generate = false; - Generate(); - } - } + [Export] + public string baseMaterialName = ""; + [Export] + public string baseMaterialDirectoryPath = ""; + + [Export] + public string baseMaterialParentClass = "CustomMaterial"; + + [ExportGroup( "Variants")] + + [Export] + public bool includeInGeneration = true; + + [Export] + public CSShaderVariant[] variants = []; + + + public static readonly string ShaderName = "${ShaderName}"; + public static readonly string CustomMaterialBase = "${CustomMaterialBase}"; public static readonly string ShaderResourcePath = "${ShaderResourcePath}"; + public static readonly string BaseOnly = "${BaseOnly}"; public static readonly string ShaderStaticPropertyNames = "${ShaderStaticPropertyNames}"; public static readonly string ShaderInstancePropertiesDeclarations = "${ShaderInstancePropertiesDeclarations}"; public static readonly string ShaderInstancePropertiesInitializers = "${ShaderInstancePropertiesInitializers}"; public static readonly string MaterialPresets = "${MaterialPresets}"; + public void Generate() { - Arrays.ForEach( shaders, s => Generate( s ) ); + var shaderMap = new Dictionary>>(); + var combined = new Dictionary(); + var infoToMember = new Dictionary(); + var resourcePaths = new Dictionary(); + + var shaders = this.shaders; + + shaders.ForEach( s => { resourcePaths[ s ] = s.ResourcePath; } ); + + if ( variants.Length > 0 ) + { + var variantShaders = new List(); + + shaders.ForEach( + s => + { + variants.ForEach( + v => + { + var resourcePath = s.ResourcePath; + var shaderCode = v.GetVariant( s.Code ); + var savePath = v.GetSavingPath( s.ResourcePath ); + + var shader = new Shader(); + shader.Code = shaderCode; + shader.ResourcePath = savePath; + + ResourceSaver.Save( shader, savePath ); + resourcePaths[ shader ] = savePath; + // this.LogInfo( "Saving:", resourcePath, ">>", savePath ); + // this.LogInfo( shaderCode ); + + variantShaders.Add( shader ); + + } + ); + } + ); + + var updatedList = shaders.ToList(); + updatedList.Add( variantShaders ); + + shaders = updatedList.ToArray(); + } + + shaders.ForEach( + s => + { + var resourcePath = resourcePaths[ s ]; + var members = Shaders.GetUniformMembers( s ); + + shaderMap[ s ] = new System.Tuple>( resourcePath, members ); + + members.ForEach( + ( m )=> + { + var info = m.ToString(); + + // this.LogInfo( resourcePath, info ); + if ( ! combined.ContainsKey( info ) ) + { + combined[ info ] = 1; + infoToMember[ info ] = m; + } + else + { + combined[ info ] = combined[ info ] + 1; + } + } + ); + + } + ); + + var customMaterialBase = "CustomMaterial"; + var commonUniforms = new List(); + + if ( createCommonBase ) + { + customMaterialBase = baseMaterialName + "Material"; + + + // var info = new List(); + + foreach ( var kv in combined ) + { + var onAll = kv.Value == shaders.Length; + var smallKey = kv.Key.Substring( 0, kv.Key.IndexOf( "(" ) ); + + // info.Add( smallKey + ": " + ( onAll ? "all" : ( kv.Value ) ) ); + + if ( onAll ) + { + commonUniforms.Add( infoToMember[ kv.Key ] ); + } + + } + + // this.LogInfo( info.Join( "\n" ) ); + + + var baseMaterialShaderPath = RegexUtility.JoinPaths( + [ ProjectSettings.GlobalizePath( baseMaterialDirectoryPath ), baseMaterialName + ".gdshader" ] + ); + + Generate( baseMaterialShaderPath, commonUniforms, [], baseMaterialParentClass, true ); + } + + + shaders.ForEach( + s => + { + var resourcePath = shaderMap[ s ].Item1; + var members = shaderMap[ s ].Item2; + + Generate( resourcePath, members, commonUniforms, customMaterialBase ); + } + ); } - public void Generate( Shader shaderFile ) + public void Generate( string resourcePath, List members, List inheritedMembers, string customMaterialBase = "CustomMaterial", bool baseOnly = false ) { - var resourcePath = shaderFile.ResourcePath; - var shader = ResourceLoader.Load( resourcePath ); + // var resourcePath = shaderFile.ResourcePath; + // var shader = ResourceLoader.Load( resourcePath ); var resourceParentPath = RegexUtility.ParentPath( resourcePath ); var absoluteFilePath = FilePath.Absolute( ProjectSettings.GlobalizePath( resourcePath ) ); var absoluteParentPath = absoluteFilePath.CreateAbsoluteParent(); - RJLog.Log( resourceParentPath ); + RJLog.Log( resourcePath, resourceParentPath, absoluteFilePath.absolutePath ); var shaderName = absoluteFilePath.fileName; - var members = Shaders.GetUniformMembers( shader ); + // var members = Shaders.GetUniformMembers( shader ); var templatePath = ProjectSettings.GlobalizePath( "res://addons/rokojori_action_library/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt" ); @@ -76,8 +217,10 @@ namespace Rokojori var csName = name.ToCamelCase(); var declaration = "public static readonly ${type}PropertyName ${csName} = ${type}PropertyName.Create( \"${name}\" );"; - var instance = "public readonly CustomMaterialProperty<${csType}> ${csName};"; + var instance = "public readonly CustomMaterialProperty<${csType}> ${csName};"; + var init = "${csName} = new CustomMaterialProperty<${csType}>( this, ${ShaderName}Shader.${csName} );"; + if ( type == "Float" ) { @@ -102,8 +245,14 @@ namespace Rokojori staticProps.Add( map.ReplaceAll( declaration ) ); - instanceProps.Add( map.ReplaceAll( instance ) ); - instanceInitializers.Add( map.ReplaceAll( init ) ); + + if ( inheritedMembers.Find( im => m.Equals( im ) ) == null ) + { + instanceProps.Add( map.ReplaceAll( instance ) ); + instanceInitializers.Add( map.ReplaceAll( init ) ); + } + + } ); @@ -154,7 +303,9 @@ namespace Rokojori var variables = new StringMap(); variables[ CSShaderClassGenerator.ShaderName ] = shaderName; + variables[ CSShaderClassGenerator.CustomMaterialBase ] = customMaterialBase; variables[ CSShaderClassGenerator.ShaderResourcePath ] = resourcePath; + variables[ CSShaderClassGenerator.BaseOnly ] = baseOnly ? "" : "//"; variables[ CSShaderClassGenerator.ShaderStaticPropertyNames ] = Lists.Join( staticProps, "\n " ); variables[ CSShaderClassGenerator.ShaderInstancePropertiesDeclarations ] = Lists.Join( instanceProps, "\n " ); diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt index a20677e..261ea43 100644 --- a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderClassTemplate.txt @@ -6,16 +6,18 @@ namespace Rokojori public class ${ShaderName}Shader { + ${BaseOnly}/* public static readonly CachedResource shader = new CachedResource( "${ShaderResourcePath}" - ); + ); + ${BaseOnly}*/ ${ShaderStaticPropertyNames} } [Tool] - public partial class ${ShaderName}Material:CustomMaterial + public partial class ${ShaderName}Material:${CustomMaterialBase} { ${MaterialPresets} @@ -23,7 +25,9 @@ namespace Rokojori public ${ShaderName}Material() { + ${BaseOnly}/* Shader = ${ShaderName}Shader.shader.Get(); + ${BaseOnly}*/ ${ShaderInstancePropertiesInitializers} } diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs new file mode 100644 index 0000000..a08e5de --- /dev/null +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs @@ -0,0 +1,47 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class CSShaderVariant:Resource + { + [ExportGroup("Name")] + [Export] + public string nameChangeMatcher = "Add.gdshader$"; + [Export] + public string nameChangeReplacement = "Mix.gdshader"; + + [ExportGroup("Changes")] + [Export] + public CSShaderVariantChange[] changes = []; + + public string GetVariant( string shaderCode ) + { + changes.ForEach( + c => + { + if ( c == null ) + { + return; + } + + shaderCode = c.ChangeShaderCode( shaderCode ); + + } + ); + + return shaderCode; + } + + public string GetSavingPath( string resourcePath ) + { + var savePath = resourcePath.Replace( new Regex( nameChangeMatcher ), nameChangeReplacement ); + return savePath; + } + + } +} \ No newline at end of file diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs.uid b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs.uid new file mode 100644 index 0000000..bf694a5 --- /dev/null +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/CSShaderVariant.cs.uid @@ -0,0 +1 @@ +uid://bab64ae5wyyfx diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs new file mode 100644 index 0000000..76736dc --- /dev/null +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs @@ -0,0 +1,33 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; +using System.Text.RegularExpressions; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class CSShaderReplacementChange:CSShaderVariantChange + { + [Export] + public string searchPattern; + + [Export] + public bool searchIsRegex = false; + + [Export] + public string replacement; + + public override string ChangeShaderCode( string shaderCode ) + { + if ( searchIsRegex ) + { + return shaderCode.Replace( searchPattern, replacement ); + } + else + { + return shaderCode.Replace( new Regex( searchPattern ), replacement ); + } + } + } +} \ No newline at end of file diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs.uid b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs.uid new file mode 100644 index 0000000..ae50a04 --- /dev/null +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderReplacementChange.cs.uid @@ -0,0 +1 @@ +uid://pt2hncqt6yka diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs new file mode 100644 index 0000000..92d08a8 --- /dev/null +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs @@ -0,0 +1,13 @@ +using Godot; +using System.Reflection; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class CSShaderVariantChange:Resource + { + public abstract string ChangeShaderCode( string shaderCode ); + } +} \ No newline at end of file diff --git a/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs.uid b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs.uid new file mode 100644 index 0000000..5bc0d66 --- /dev/null +++ b/Runtime/Shading/Tools/CSShaderClassGenerator/VariantChanges/CSShaderVariantChange.cs.uid @@ -0,0 +1 @@ +uid://5k8nnpjsp2pc diff --git a/Runtime/Tools/Arrays.cs b/Runtime/Tools/Arrays.cs index 8e14ff8..0a54c4f 100644 --- a/Runtime/Tools/Arrays.cs +++ b/Runtime/Tools/Arrays.cs @@ -77,11 +77,30 @@ namespace Rokojori return entryIndex == -1 ? default(T) : values[ entryIndex ]; } - public static bool HasNonNull( this T[] values, Func predicate ) + public static bool HasNonNull( this T[] values, Func predicate ) { return FindNonNull( values, predicate ) != null; } + public static int NonNullCount( this T[] values ) + { + var count = 0; + + for ( int i = 0; i < values.Length; i++ ) + { + if ( values[ i ] == null ) + { + continue; + } + + count ++; + } + + return count; + } + + + public static bool Contains( T[] values, T other ) { return Array.IndexOf( values, other ) != -1; diff --git a/Runtime/Tools/Lists.cs b/Runtime/Tools/Lists.cs index d116117..3a1c4ed 100644 --- a/Runtime/Tools/Lists.cs +++ b/Runtime/Tools/Lists.cs @@ -181,6 +181,7 @@ namespace Rokojori return result; } + public static T Lerp( List data, float value, Func getValue, Func lerper, bool sort = false ) { var result = LerpIndex( data, value, getValue, sort ); diff --git a/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs b/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs new file mode 100644 index 0000000..3216fca --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs @@ -0,0 +1,20 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class FlareBlendMode:Resource + { + public enum BlendModeType + { + Add, + Mix, + Subtract, + Multiply + } + + [Export] + public BlendModeType blendMode = BlendModeType.Add; + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs.uid b/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs.uid new file mode 100644 index 0000000..803f3fb --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs.uid @@ -0,0 +1 @@ +uid://4pdr2urse51u diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs b/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs new file mode 100644 index 0000000..66c534d --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs @@ -0,0 +1,22 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class DirectionalFlareChromaticAberation:FlareChromaticAberation + { + [Export] + public Vector2 direction; + + public override void ApplyChromaticAberation( FlareLayer.Data data ) + { + var material = data.material; + + ApplyChromaticAberationBase( data ); + + BaseFlareShader.chromaticAberationDirection.Set( material, direction ); + BaseFlareShader.chromaticAberationDirectionTowardsCenter.Set( material, 0f ); + } + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs.uid b/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs.uid new file mode 100644 index 0000000..38c6d4a --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs.uid @@ -0,0 +1 @@ +uid://8ca7d84rikb7 diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs b/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs new file mode 100644 index 0000000..7ddec9d --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs @@ -0,0 +1,55 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class FlareChromaticAberation:Resource + { + [Export( PropertyHint.Range, "0,100" ) ] + public float amount = 0.1f; + + [Export( PropertyHint.Range, "0,32" ) ] + public int steps = 3; + + [Export( PropertyHint.Range, "1,50" ) ] + public float smear = 2f; + + [ExportGroup("Channel Offset")] + [Export( PropertyHint.Range, "0,1" ) ] + public float offsetScale = 0.2f; + + [Export( PropertyHint.Range, "-1,1" ) ] + public float offsetR = -0.1f; + + [Export( PropertyHint.Range, "-1,1" ) ] + public float offsetG = 0; + + [Export( PropertyHint.Range, "-1,1" ) ] + public float offsetB = 0.1f; + + + + + public abstract void ApplyChromaticAberation( FlareLayer.Data data ); + + protected void ApplyChromaticAberationBase( FlareLayer.Data data ) + { + var material = data.material; + + BaseFlareShader.chromaticAberationMode.Set( material, 1 ); + BaseFlareShader.chromaticAberationAmount.Set( material, amount ); + + var shifts = Vector3.One; + shifts.X += offsetR * offsetScale; + shifts.Y += offsetG * offsetScale; + shifts.Z += offsetB * offsetScale; + + BaseFlareShader.chromaticAberationShifts.Set( material, shifts ); + + BaseFlareShader.chromaticAberationSteps.Set( material, steps ); + BaseFlareShader.chromaticAberationSmear.Set( material, smear ); + } + + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs.uid b/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs.uid new file mode 100644 index 0000000..c28bb5a --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/FlareChromaticAberation.cs.uid @@ -0,0 +1 @@ +uid://bjrvvgb7wxcye diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs b/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs new file mode 100644 index 0000000..f819967 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs @@ -0,0 +1,26 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class OrientatedFlareChromaticAberation:FlareChromaticAberation + { + public enum FlareOrientation + { + Inside, + Outside + } + + [Export] + public FlareOrientation orientation = FlareOrientation.Inside; + + public override void ApplyChromaticAberation( FlareLayer.Data data ) + { + ApplyChromaticAberationBase( data ); + + var material = data.material; + BaseFlareShader.chromaticAberationDirectionTowardsCenter.Set( material, orientation == FlareOrientation.Inside ? 1f : -1f ); + } + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs.uid b/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs.uid new file mode 100644 index 0000000..132d0f9 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs.uid @@ -0,0 +1 @@ +uid://dmswtuayeoagf diff --git a/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs new file mode 100644 index 0000000..77aaf38 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs @@ -0,0 +1,27 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class EdgeFlareFading:FlareFading + { + [Export( PropertyHint.Range, "0,2" ) ] + public float power = 0.8f; + + [Export( PropertyHint.Range, "0,1" ) ] + public float sizeAmount = 0.1f; + + public override void ApplyFading( FlareLayer.Data data ) + { + var material = data.material; + + BaseFlareShader.fadingMode.Set( material, 1 ); + + BaseFlareShader.fadingPower.Set( material, Mathf.Lerp( 0.0f, power, sizeAmount ) ); + BaseFlareShader.opacityFadingPower.Set( material, power ); + BaseFlareShader.sizeXfadingPower.Set( material, Mathf.Lerp( 0.0f, power, sizeAmount ) ); + BaseFlareShader.sizeYfadingPower.Set( material, Mathf.Lerp( 0.0f, power, sizeAmount ) ); + } + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs.uid b/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs.uid new file mode 100644 index 0000000..731368a --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs.uid @@ -0,0 +1 @@ +uid://c67s0ccpomg2s diff --git a/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs new file mode 100644 index 0000000..ff1aaa1 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs @@ -0,0 +1,12 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class FlareFading:Resource + { + public abstract void ApplyFading( FlareLayer.Data data ); + + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs.uid b/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs.uid new file mode 100644 index 0000000..3c3caed --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/FlareFading.cs.uid @@ -0,0 +1 @@ +uid://b1dgn4gilaogx diff --git a/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs new file mode 100644 index 0000000..12be9bf --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs @@ -0,0 +1,33 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class ParametricFlareFading:FlareFading + { + [Export( PropertyHint.Range, "0,3" ) ] + public float fading = 0.1f; + + [Export( PropertyHint.Range, "0,3" ) ] + public float opacity = 0.1f; + + [Export( PropertyHint.Range, "0,3" ) ] + public float sizeX = 0.1f; + + [Export( PropertyHint.Range, "0,3" ) ] + public float sizeY = 0.1f; + + public override void ApplyFading( FlareLayer.Data data ) + { + var material = data.material; + + BaseFlareShader.fadingMode.Set( material, 1 ); + + BaseFlareShader.fadingPower.Set( material, fading ); + BaseFlareShader.opacityFadingPower.Set( material, opacity ); + BaseFlareShader.sizeXfadingPower.Set( material, sizeX ); + BaseFlareShader.sizeYfadingPower.Set( material, sizeY ); + } + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs.uid b/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs.uid new file mode 100644 index 0000000..2b44139 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs.uid @@ -0,0 +1 @@ +uid://bmcf4qxpqs8mb diff --git a/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs b/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs new file mode 100644 index 0000000..a82e98c --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs @@ -0,0 +1,50 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class TextureFlareFading:FlareFading + { + // [Export( PropertyHint.Range, "0,1" ) ] + // public float fading = 0.1f; + [Export] + public Texture2D fadingTexture; + + + // [Export( PropertyHint.Range, "0,1" ) ] + // public float opacity = 1f; + [Export] + public Texture2D opacityTexture; + + + // [Export( PropertyHint.Range, "0,1" ) ] + // public float sizeX = 1f; + [Export] + public Texture2D sizeXTexture; + + + // [Export( PropertyHint.Range, "0,1" ) ] + // public float sizeY = 1f; + [Export] + public Texture2D sizeYTexture; + + + public override void ApplyFading( FlareLayer.Data data ) + { + var material = data.material; + + BaseFlareShader.fadingMode.Set( material, 2 ); + + // BaseFlareShader.fadingPower.Set( material, fading ); + // BaseFlareShader.opacityFadingPower.Set( material, opacity ); + // BaseFlareShader.sizeXfadingPower.Set( material, sizeX ); + // BaseFlareShader.sizeYfadingPower.Set( material, sizeY ); + + BaseFlareShader.fading.Set( material, fadingTexture ); + BaseFlareShader.opacityFading.Set( material, opacityTexture ); + BaseFlareShader.sizeXfading.Set( material, sizeXTexture ); + BaseFlareShader.sizeYfading.Set( material, sizeYTexture ); + } + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs.uid b/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs.uid new file mode 100644 index 0000000..0bfd960 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareFading/TextureFlareFading.cs.uid @@ -0,0 +1 @@ +uid://7deqhjgldael diff --git a/Runtime/VFX/FlareVFX/FlareLayer.cs b/Runtime/VFX/FlareVFX/FlareLayer.cs new file mode 100644 index 0000000..9b9f5b7 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareLayer.cs @@ -0,0 +1,367 @@ +using Godot; +using System.Collections.Generic; + +namespace Rokojori +{ + [Tool] + [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/FlareVFX.svg") ] + public partial class FlareLayer:Resource + { + [Export] + public string layerName = ""; + + [Export] + public bool solo = false; + + [Export] + public bool hide = false; + + + [Export( PropertyHint.Range, "0,1" )] + public float opacity = 1f; + + [Export] + public int numLayers = 1; + + [Export] + public FlareType flareType; + + [ExportGroup("Color/Overwrite")] + [Export] + public Color overwriteColor = Colors.White; + + [Export( PropertyHint.Range, "0,1" )] + public float overwriteAmount = 0f; + + [ExportGroup("Color")] + + [Export( PropertyHint.Range, "-180,180" )] + public float minHueRandom = 0; + + [Export( PropertyHint.Range, "-180,180" )] + public float maxHueRandom = 0; + + [Export] + public CurveTexture opacityCurvePerLayer = null; + + [Export] + public Color tint = Colors.White; + + [Export( PropertyHint.Range, "-180,180" )] + public float hueShift = 0; + + [Export( PropertyHint.Range, "-180,180" )] + public float temparatureShift = 0; + + [Export( PropertyHint.Range, "-100,100" )] + public float saturationShift = 0; + + [Export( PropertyHint.Range, "-100,100" )] + public float lighntessShift = 0; + + + [ExportGroup("Size")] + [Export] + public float size = 1; + + [Export( PropertyHint.Range, "0,1" )] + public float sizeScale = 1; + + [Export( PropertyHint.Range, "0,1" )] + public float sizeXScale = 1f; + + [Export( PropertyHint.Range, "0,1" )] + public float sizeYScale = 1f; + + [Export( PropertyHint.Range, "0,2" )] + public float worldSizeScale = 1f; + + [Export( PropertyHint.Range, "0,2" )] + public float screenSizeScale = 1f; + + [Export( PropertyHint.Range, "0,1" )] + public float worldSize_vs_screenSize = 1f; + + [Export( PropertyHint.Range, "0,2" )] + public float randomScaleMin = 1f; + + [Export( PropertyHint.Range, "0,2" )] + public float randomScaleMax = 1f; + + [Export] + public bool overwriteExtension = false; + + [Export( PropertyHint.Range, "1,10" )] + public float extension = 1f; + + + [ExportGroup("ScreenOffset")] + + [Export] + public Vector2 screenOffset = Vector2.Zero; + + [Export( PropertyHint.Range, "0,1" )] + public float screenOffsetStaticScale = 1f; + + [Export] + public Vector2 screenOffsetStaticDirection = Vector2.Zero; + + [Export( PropertyHint.Range, "0,1" )] + public float screenOffsetLayerScale = 1f; + + [Export] + public Vector2 screenOffsetLayerDirection = Vector2.Zero; + + [ExportGroup("Rotation")] + [Export( PropertyHint.Range, "-180,180" )] + public float rotation = 0; + + [Export( PropertyHint.Range, "-180,180" )] + public float rotationOverX = 0; + + [Export( PropertyHint.Range, "-180,180" )] + public float rotationOverY = 0f; + + [Export( PropertyHint.Range, "-180,180" )] + public float rotationPerLayer = 0f; + + [ExportGroup("Overwrites")] + [Export] + public FlareFading fading = null; + + [Export] + public FlareChromaticAberation chromaticAberation = null; + + [Export] + public FlareOcclusion occlusion = null; + + [Export] + public FlareBlendMode blendMode = null; + + [Export] + public FlareStencilMode stencilMode = null; + + [Export] + public int renderPriority = 0; + + + public Data Create( FlareVFX vfx ) + { + return new Data( vfx, this ); + } + + public class Data + { + public FlareLayer layer; + public FlareVFX vfx; + public MeshInstance3D meshInstance; + public ShaderMaterial material; + + public FlareBlendMode.BlendModeType GetBlendMode() + { + return layer.blendMode != null ? layer.blendMode.blendMode : vfx.preset.blendMode; + } + + public Data( FlareVFX vfx, FlareLayer layer ) + { + this.vfx = vfx; + this.layer = layer; + } + + + public void Update() + { + if ( meshInstance == null || layer.flareType == null ) + { + return; + } + + EnsureMesh(); + EnsureMaterial(); + + if ( material == null ) + { + return; + } + + layer.flareType.ApplyShape( this ); + + + ApplyColor(); + ApplySize(); + ApplyScreenOffset(); + ApplyRotation(); + ApplyFading(); + ApplyChromaticAberation(); + ApplyOcclusion(); + + material.RenderPriority = layer.renderPriority; + + } + + void EnsureMesh() + { + var arrayMesh = meshInstance.Mesh as ArrayMesh; + + if ( arrayMesh != null && arrayMesh.SurfaceGetArrayLen( 0 ) == layer.numLayers * 4 ) + { + return; + } + + var gen = new UnitBillboardQuadsGenerator(); + gen.num = layer.numLayers; + meshInstance.Mesh = gen.Generate(); + } + + void EnsureMaterial() + { + var miMaterial = meshInstance.GetSurfaceOverrideMaterial( 0 ) as ShaderMaterial; + + if ( material != null && miMaterial != null && miMaterial.Shader == layer.flareType.GetShader( this ) ) + { + return; + } + + material = layer.flareType.CreateMaterial( this ); + meshInstance.SetSurfaceOverrideMaterial( 0, material ); + } + + void ApplyColor() + { + var preset = vfx.preset; + var color = preset.mainColor; + + if ( layer.overwriteAmount > 0 ) + { + color = color.Lerp( layer.overwriteColor, layer.overwriteAmount ); + } + + color *= layer.tint; + + var scale = color.GetColorScale(); + var hsl = color.ToHSL( scale ); + + hsl.h += layer.hueShift + preset.hueShift; + + hsl.h = MathX.Repeat( hsl.h, 360f ); + + hsl.h = HSLColor.ShiftTemparatureOfHue( hsl.h, preset.temparatureShift + layer.temparatureShift ); + hsl.s += ( layer.saturationShift + preset.saturationShift ) / 100f; + hsl.l += ( layer.lighntessShift + preset.lightnessShift ) / 100f; + + hsl.ClampToLimits(); + + color = hsl.ToRGBA( scale ); + + // color = preset.mainColor; + BaseFlareShader.color.Set( material, color ); + BaseFlareShader.opacity.Set( material, preset.opacity * layer.opacity ); + BaseFlareShader.opacityCurve.Set( material, layer.opacityCurvePerLayer ); + BaseFlareShader.minHueRandom.Set( material, layer.minHueRandom / 360f ); + BaseFlareShader.maxHueRandom.Set( material, layer.maxHueRandom / 360f ); + + } + + void ApplySize() + { + var preset = vfx.preset; + var size = Vector2.One * preset.scale; + + size *= layer.size * layer.sizeScale * new Vector2( layer.sizeXScale, layer.sizeYScale ); + + BaseFlareShader.sizeX.Set( material, size.X ); + BaseFlareShader.sizeY.Set( material, size.Y ); + + BaseFlareShader.worldSizeScale.Set( material, layer.worldSizeScale ); + BaseFlareShader.screenSizeScale.Set( material, layer.screenSizeScale ); + BaseFlareShader.worldSizeVsScreenSize.Set( material, layer.worldSize_vs_screenSize ); + + BaseFlareShader.randomScaleMin.Set( material, layer.randomScaleMin ); + BaseFlareShader.randomScaleMax.Set( material, layer.randomScaleMax ); + + + BaseFlareShader.extension.Set( material, layer.overwriteExtension ? layer.extension : preset.extension ); + } + + void ApplyScreenOffset() + { + BaseFlareShader.screenOffset.Set( material, layer.screenOffset ); + BaseFlareShader.screenOffsetScale.Set( material, layer.screenOffsetStaticDirection * layer.screenOffsetStaticScale ); + BaseFlareShader.screenOffsetLayerSpread.Set( material, layer.screenOffsetLayerDirection * layer.screenOffsetLayerScale ); + } + + void ApplyRotation() + { + BaseFlareShader.rotation.Set( material, layer.rotation ); + BaseFlareShader.rotationOverX.Set( material, layer.rotationOverX ); + BaseFlareShader.rotationOverY.Set( material, layer.rotationOverY ); + BaseFlareShader.rotationPerLayer.Set( material, layer.rotationPerLayer ); + + // BaseFlareShader.vertexRotation.Set( material, layer.vertexRotation ); + // BaseFlareShader.vertexRotationOverX.Set( material, layer.vertexRotationOverX ); + // BaseFlareShader.vertexRotationOverY.Set( material, layer.vertexRotationOverY ); + // BaseFlareShader.vertexRotationPerLayer.Set( material, layer.vertexRotationPerLayer ); + } + + void ApplyFading() + { + var preset = vfx.preset; + var fading = preset.fading; + + if ( layer.fading != null ) + { + fading = layer.fading; + } + + if ( fading == null ) + { + BaseFlareShader.fadingMode.Set( material, 0 ); + return; + } + + fading.ApplyFading( this ); + } + + void ApplyChromaticAberation() + { + var preset = vfx.preset; + var chromaticAberation = preset.chromaticAberation; + + if ( layer.chromaticAberation != null ) + { + chromaticAberation = layer.chromaticAberation; + } + + if ( chromaticAberation == null ) + { + BaseFlareShader.chromaticAberationMode.Set( material, 0 ); + return; + } + + + chromaticAberation.ApplyChromaticAberation( this ); + } + + + void ApplyOcclusion() + { + var preset = vfx.preset; + var occlusion = preset.occlusion; + + if ( layer.occlusion != null ) + { + occlusion = layer.occlusion; + } + + if ( occlusion == null ) + { + BaseFlareShader.occlusionMode.Set( material, 0 ); + return; + } + + occlusion.ApplyOcclusion( this ); + } + } + + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareLayer.cs.uid b/Runtime/VFX/FlareVFX/FlareLayer.cs.uid new file mode 100644 index 0000000..7c96755 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareLayer.cs.uid @@ -0,0 +1 @@ +uid://u3g0mlwlpd6s diff --git a/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs b/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs new file mode 100644 index 0000000..3616536 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs @@ -0,0 +1,28 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class FadingFlareOcclusion:FlareOcclusion + { + [Export] + public bool useQuickTest = true; + + [Export] + public float zOffset = 0; + + [Export] + public float toSize = 0.5f; + + + public override void ApplyOcclusion( FlareLayer.Data data ) + { + var material = data.material; + + BaseFlareShader.occlusionMode.Set( material, useQuickTest ? 1 : 2 ); + BaseFlareShader.occlusionZOffset.Set( material, zOffset ); + BaseFlareShader.occlusionToSize.Set( material, toSize ); + } + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs.uid b/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs.uid new file mode 100644 index 0000000..299a97c --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs.uid @@ -0,0 +1 @@ +uid://bq2hh5ledvviu diff --git a/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs b/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs new file mode 100644 index 0000000..63cf497 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs @@ -0,0 +1,11 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class FlareOcclusion:Resource + { + public abstract void ApplyOcclusion( FlareLayer.Data data ); + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs.uid b/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs.uid new file mode 100644 index 0000000..e8e033b --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareOcclusion/FlareOcclusion.cs.uid @@ -0,0 +1 @@ +uid://dr282eegg7q5a diff --git a/Runtime/VFX/FlareVFX/FlarePreset.cs b/Runtime/VFX/FlareVFX/FlarePreset.cs new file mode 100644 index 0000000..e6f9ee1 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlarePreset.cs @@ -0,0 +1,57 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/FlareVFX.svg") ] + public partial class FlarePreset:Resource + { + [Export] + public Color mainColor = Colors.White; + + [Export( PropertyHint.Range, "-180,180" )] + public float hueShift = 0; + + [Export( PropertyHint.Range, "-180,180" )] + public float temparatureShift = 0; + + [Export( PropertyHint.Range, "-100,100" )] + public float saturationShift = 0; + + [Export( PropertyHint.Range, "-100,100" )] + public float lightnessShift = 0; + + [Export( PropertyHint.Range, "0,1" )] + public float opacity = 1f; + + [Export( PropertyHint.Range, "0,2" )] + public float scale = 1f; + + [Export( PropertyHint.Range, "1,10" )] + public float extension = 1f; + + [Export] + public bool hide = false; + + [Export] + public FlareLayer[] layers = []; + + + [ExportGroup("Settings")] + [Export] + public FlareFading fading = new EdgeFlareFading(); + + [Export] + public FlareChromaticAberation chromaticAberation = null; + + [Export] + public FlareOcclusion occlusion = new FadingFlareOcclusion(); + + [Export] + public FlareBlendMode.BlendModeType blendMode = FlareBlendMode.BlendModeType.Add; + + [Export] + public FlareStencilMode stencilMode = null; + + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlarePreset.cs.uid b/Runtime/VFX/FlareVFX/FlarePreset.cs.uid new file mode 100644 index 0000000..6dbe83d --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlarePreset.cs.uid @@ -0,0 +1 @@ +uid://bh37fg1dnc37s diff --git a/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs b/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs new file mode 100644 index 0000000..5e4b2aa --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs @@ -0,0 +1,28 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class FlareStencilMode:Resource + { + public enum FlareStencilFunc + { + Equals, + Not_Equals + } + + [Export] + public FlareStencilFunc stencilCompareMode = FlareStencilFunc.Equals; + + public enum FlareStencilReference + { + _1, + _10, + _100 + } + + [Export] + public FlareStencilReference stencilReference = FlareStencilReference._1; + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs.uid b/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs.uid new file mode 100644 index 0000000..5abf6e2 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareStencilMode/FlareStencilMode.cs.uid @@ -0,0 +1 @@ +uid://dgkqdvuqqavh8 diff --git a/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs new file mode 100644 index 0000000..bf34d45 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs @@ -0,0 +1,206 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class EllipseFlareType:FlareType + { + public override Shader GetShader( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return EllipseTypeFlareAddShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return EllipseTypeFlareMixShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return EllipseTypeFlareSubtractShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return EllipseTypeFlareMultiplyShader.shader.Get(); + } + + return null; + + } + + public override ShaderMaterial CreateMaterial( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return new EllipseTypeFlareAddMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return new EllipseTypeFlareMixMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return new EllipseTypeFlareSubtractMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return new EllipseTypeFlareMultiplyMaterial(); + } + + return null; + } + + [ExportGroup( "Main")] + + [Export] + public float shapeScaleRange = 1f; + + [Export(PropertyHint.Range, "0,1")] + public float shapeScale = 1f; + + [Export] + public float fillMultiply = 1f; + + [Export] + public float fillAdd = 0f; + + [Export] + public float maskMultiply = 1f; + + [Export] + public float maskAdd = 0f; + + [ExportGroup( "Radial Fill", "radialFill")] + [Export] + public Texture2D radialFillTexture; + [Export] + public float radialFillStrength = 1f; + [Export] + public float radialFillTile = 1f; + [Export] + public float radialFillOffset = 1f; + [Export] + public bool radialFillRepeat = false; + + [ExportGroup( "Conic Fill", "conicFill")] + [Export] + public Texture2D conicFillTexture; + [Export] + public float conicFillStrength = 1f; + [Export] + public float conicFillTile = 1f; + [Export] + public float conicFillOffset = 1f; + [Export] + public bool conicFillRepeat = false; + + [ExportGroup( "Radial Mask", "radialMask")] + [Export] + public Texture2D radialMaskTexture; + + [Export] + public float radialMaskStrength = 1f; + [Export] + public float radialMaskTile = 1f; + [Export] + public float radialMaskOffset = 1f; + [Export] + public bool radialMaskRepeat = false; + + [ExportGroup( "Conic Mask", "conicMask")] + [Export] + public Texture2D conicMaskTexture; + + [Export] + public float conicMaskStrength = 1f; + [Export] + public float conicMaskTile = 1f; + [Export] + public float conicMaskOffset = 1f; + [Export] + public bool conicMaskRepeat = false; + + + [ExportGroup( "Noise","noise")] + [Export( PropertyHint.Range, "0,1" ) ] + public float noiseAmount = 0; + + [Export( PropertyHint.Range, "0.1,100" ) ] + public float noiseScale = 0; + + public void SetValues( Material material, + Sampler2DPropertyName texture, Texture2D tex, + FloatPropertyName str, float strValue, + FloatPropertyName tile, float tileValue, + FloatPropertyName off, float offValue, + BoolPropertyName repeat, bool repeatValue + ) + { + texture.Set( material, tex ); + str.Set( material, strValue ); + tile.Set( material, tileValue ); + off.Set( material, offValue ); + repeat.Set( material, repeatValue ); + } + + + public override void ApplyShape( FlareLayer.Data data ) + { + var material = data.material; + + EllipseTypeFlareAddShader.shapeScale.Set( material, shapeScale * shapeScaleRange ); + + EllipseTypeFlareAddShader.fillMultiply.Set( material, fillMultiply ); + EllipseTypeFlareAddShader.fillAdd.Set( material, fillAdd ); + EllipseTypeFlareAddShader.maskMultiply.Set( material, maskMultiply ); + EllipseTypeFlareAddShader.maskAdd.Set( material, maskAdd ); + + SetValues( material, + EllipseTypeFlareAddShader.radialFill, radialFillTexture, + EllipseTypeFlareAddShader.radialFillStrength, radialFillStrength, + EllipseTypeFlareAddShader.radialFillTile, radialFillTile, + EllipseTypeFlareAddShader.radialFillOffset, radialFillOffset, + EllipseTypeFlareAddShader.radialFillRepeat, radialFillRepeat + ); + + SetValues( material, + EllipseTypeFlareAddShader.conicFill, conicFillTexture, + EllipseTypeFlareAddShader.conicFillStrength, conicFillStrength, + EllipseTypeFlareAddShader.conicFillTile, conicFillTile, + EllipseTypeFlareAddShader.conicFillOffset, conicFillOffset, + EllipseTypeFlareAddShader.conicFillRepeat, conicFillRepeat + ); + + SetValues( material, + EllipseTypeFlareAddShader.radialMask, radialMaskTexture, + EllipseTypeFlareAddShader.radialMaskStrength, radialMaskStrength, + EllipseTypeFlareAddShader.radialMaskTile, radialMaskTile, + EllipseTypeFlareAddShader.radialMaskOffset, radialMaskOffset, + EllipseTypeFlareAddShader.radialMaskRepeat, radialMaskRepeat + ); + + SetValues( material, + EllipseTypeFlareAddShader.conicMask, conicMaskTexture, + EllipseTypeFlareAddShader.conicMaskStrength, conicMaskStrength, + EllipseTypeFlareAddShader.conicMaskTile, conicMaskTile, + EllipseTypeFlareAddShader.conicMaskOffset, conicMaskOffset, + EllipseTypeFlareAddShader.conicMaskRepeat, conicMaskRepeat + ); + + BaseFlareShader.shapeNoiseAmount.Set( material, noiseAmount ); + BaseFlareShader.shapeNoiseScale.Set( material, noiseScale ); + + } + } +} diff --git a/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs.uid b/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs.uid new file mode 100644 index 0000000..6eb77d5 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs.uid @@ -0,0 +1 @@ +uid://dk8t1ljh3jroo diff --git a/Runtime/VFX/FlareVFX/FlareType/FlareType.cs b/Runtime/VFX/FlareVFX/FlareType/FlareType.cs new file mode 100644 index 0000000..befd33f --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/FlareType.cs @@ -0,0 +1,14 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public abstract partial class FlareType:Resource + { + public abstract Shader GetShader( FlareLayer.Data data ); + public abstract ShaderMaterial CreateMaterial( FlareLayer.Data data ); + public abstract void ApplyShape( FlareLayer.Data data ); + + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareType/FlareType.cs.uid b/Runtime/VFX/FlareVFX/FlareType/FlareType.cs.uid new file mode 100644 index 0000000..55ddc3b --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/FlareType.cs.uid @@ -0,0 +1 @@ +uid://lj4rl0xrxf8e diff --git a/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs new file mode 100644 index 0000000..859e746 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs @@ -0,0 +1,200 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class SDFShapeFlareType:FlareType + { + public override Shader GetShader( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return SDFTypeFlareAddShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return SDFTypeFlareMixShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return SDFTypeFlareSubtractShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return SDFTypeFlareMultiplyShader.shader.Get(); + } + + return null; + + } + + public override ShaderMaterial CreateMaterial( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return new SDFTypeFlareAddMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return new SDFTypeFlareMixMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return new SDFTypeFlareSubtractMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return new SDFTypeFlareMultiplyMaterial(); + } + + return null; + } + + public enum ShapeType + { + Circle, + Cross, + Triangle, + Rectangle, + Pentagon, + Hexagon, + Octogon, + Hexagram, + Pentagram, + Ring, + Cutout1, + Cutout2, + Heart + } + + [Export] + public ShapeType shapeType = ShapeType.Pentagon; + + [Export( PropertyHint.Range, "-180,180" ) ] + public float shapeRotation = 0; + + [Export( PropertyHint.Range, "0,1" ) ] + public float shapeScale = 0.5f; + + [ExportGroup( "Shape Opacity", "shapeOpacity")] + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeOpacityInnerBorder = 0f; + + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeOpacityOuterBorder = 0.1f; + + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeOpacityBorderOffset = 0f; + + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeOpacityBorderSpread = 0f; + + [Export( PropertyHint.Range, "0.2,20" ) ] + public float shapeOpacityDistribution = 1f; + + [ExportGroup( "Shape Color Mapping", "shapeColorMapping")] + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeColorMappingInnerBorder = -0.5f; + + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeColorMappingOuterBorder = 0f; + + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeColorMappingBorderOffset = 0f; + + [Export( PropertyHint.Range, "-2,2" ) ] + public float shapeColorMappingBorderSpread = 0f; + + [Export( PropertyHint.Range, "0.2,20" ) ] + public float shapeColorMappingDistribution = 1f; + + + [ExportGroup( "Inner Color", "inner")] + [Export( PropertyHint.Range, "-180,180" ) ] + public float innerTemparatureOffset = 0; + + [Export( PropertyHint.Range, "-100,100" ) ] + public float innerSaturationOffset = 0; + + [Export( PropertyHint.Range, "-100,100" ) ] + public float innerLightnessOffset = 0; + + [Export( PropertyHint.Range, "0,1" ) ] + public float innerOpacity = 1; + + + [ExportGroup( "Outer Color", "outer")] + + [Export( PropertyHint.Range, "-180,180" ) ] + public float outerTemparatureOffset = 0; + + [Export( PropertyHint.Range, "-100,100" ) ] + public float outerSaturationOffset = 0; + + [Export( PropertyHint.Range, "-100,100" ) ] + public float outerLightnessOffset = 0; + + [Export( PropertyHint.Range, "0,1" ) ] + public float outerOpacity = 1; + + + [ExportGroup( "Noise","noise")] + [Export( PropertyHint.Range, "0,1" ) ] + public float noiseAmount = 0; + + [Export( PropertyHint.Range, "0.1,100" ) ] + public float noiseScale = 0; + + + public override void ApplyShape( FlareLayer.Data data ) + { + var material = data.material; + + SDFTypeFlareAddShader.minShapeDistance.Set( material, shapeOpacityInnerBorder + shapeOpacityBorderOffset - shapeOpacityBorderSpread ); + SDFTypeFlareAddShader.maxShapeDistance.Set( material, shapeOpacityOuterBorder + shapeOpacityBorderOffset + shapeOpacityBorderSpread ); + + SDFTypeFlareAddShader.minShapeDistanceColor.Set( material, shapeColorMappingInnerBorder + shapeColorMappingBorderOffset - shapeColorMappingBorderSpread ); + SDFTypeFlareAddShader.maxShapeDistanceColor.Set( material, shapeColorMappingOuterBorder + shapeColorMappingBorderOffset + shapeColorMappingBorderSpread ); + + + SDFTypeFlareAddShader.shapeColorDistortion.Set( material, shapeColorMappingDistribution ); + SDFTypeFlareAddShader.shapeAlphaDistortion.Set( material, shapeOpacityDistribution ); + + SDFTypeFlareAddShader.shapeNoiseAmount.Set( material, noiseAmount ); + SDFTypeFlareAddShader.shapeNoiseScale.Set( material, noiseScale ); + + SDFTypeFlareAddShader.shapeType.Set( material, (int) shapeType ); + SDFTypeFlareAddShader.shapeScale.Set( material, shapeScale ); + + SDFTypeFlareAddShader.innerHsl.Set( material, + new Vector4( + innerTemparatureOffset / 360f , + innerSaturationOffset / 100f , + innerLightnessOffset / 100f , + innerOpacity + ) + ); + + SDFTypeFlareAddShader.outerHsl.Set( material, + new Vector4( + outerTemparatureOffset / 360f , + outerSaturationOffset / 100f , + outerLightnessOffset / 100f , + outerOpacity + ) + ); + } + + } +} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs.uid b/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs.uid new file mode 100644 index 0000000..4722acb --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs.uid @@ -0,0 +1 @@ +uid://0epjgkk6qmhy diff --git a/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs new file mode 100644 index 0000000..fe43cfb --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs @@ -0,0 +1,185 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class StarFlareType:FlareType + { + public override Shader GetShader( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return StarTypeFlareAddShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return StarTypeFlareMixShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return StarTypeFlareSubtractShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return StarTypeFlareMultiplyShader.shader.Get(); + } + + return null; + + } + + public override ShaderMaterial CreateMaterial( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return new StarTypeFlareAddMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return new StarTypeFlareMixMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return new StarTypeFlareSubtractMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return new StarTypeFlareMultiplyMaterial(); + } + + return null; + } + + + [Export( PropertyHint.Range, "0,1")] + float speedMultiply = 1f; + + [Export] + Vector4 innerHsl = Vector4.Zero; + + [Export] + Vector4 outerHsl = Vector4.Zero; + + [Export( PropertyHint.Range, "0,5")] + float colorFillRange = 0.5f; + + [Export( PropertyHint.Range, "0.01,5")] + float colorFillDistributionPower = 1f; + + [ExportGroup( "Streaks")] + [Export( PropertyHint.Range, "0,8")] + float streaksFrequency = 1f; + [Export( PropertyHint.Range, "0,16")] + float streaksRotation = 0f; + [Export( PropertyHint.Range, "0,1")] + float streaksRotationSpeed = 0f; + [Export( PropertyHint.Range, "0,2")] + float streaksNoise = 0f; + [Export( PropertyHint.Range, "-2,2")] + float streaksNoiseOffset = 0f; + [Export( PropertyHint.Range, "-1,1")] + float streaksNoiseScroll = 0f; + + [ExportGroup( "Streaks 2")] + [Export] + bool streaks2Enabled = false; + [Export( PropertyHint.Range, "0,1")] + float streaksAddVsMult = 0f; + [Export( PropertyHint.Range, "0,5")] + float streaks2Multiply = 0f; + + [Export( PropertyHint.Range, "0,8")] + float streaksFrequency2 = 1f; + [Export( PropertyHint.Range, "0,16")] + float streaksRotation2 = 0f; + [Export( PropertyHint.Range, "0,1")] + float streaksRotationSpeed2 = 0f; + [Export( PropertyHint.Range, "0,2")] + float streaksNoise2 = 0f; + [Export( PropertyHint.Range, "-2,2")] + float streaksNoiseOffset2 = 0f; + [Export( PropertyHint.Range, "-1,1")] + float streaksNoiseScroll2 = 0f; + + [ExportGroup( "Mask")] + [Export( PropertyHint.Range, "0,1")] + float maskScale = 0.5f; + [Export( PropertyHint.Range, "0,2")] + float maskRange = 0.1f; + [Export( PropertyHint.Range, "0,1")] + float maskRangeOscillation = 0.1f; + [Export( PropertyHint.Range, "0,1")] + float maskRangeOscillationSpeed = 0.1f; + [Export( PropertyHint.Range, "0,2")] + float maskInnerSize = 1f; + [Export( PropertyHint.Range, "0,2")] + float maskFrequency = 1f; + [Export( PropertyHint.Range, "0,1")] + float maskRotation = 0f; + [Export( PropertyHint.Range, "-1,1")] + float maskRotationSpeed = 0f; + + + [ExportGroup( "Noise Blend")] + [Export( PropertyHint.Range, "0,0.5")] + float blendingRange = 0.1f; + + + [ExportGroup( "Noise","noise")] + [Export( PropertyHint.Range, "0,1" ) ] + public float noiseAmount = 0; + + [Export( PropertyHint.Range, "0.1,100" ) ] + public float noiseScale = 0; + + public override void ApplyShape( FlareLayer.Data data ) + { + var material = data.material; + + StarTypeFlareAddShader.speedMultiply.Set( material, speedMultiply ); + StarTypeFlareAddShader.innerHsl.Set( material, innerHsl ); + StarTypeFlareAddShader.outerHsl.Set( material, outerHsl ); + StarTypeFlareAddShader.colorFillRange.Set( material, colorFillRange ); + StarTypeFlareAddShader.colorFillDistributionPower.Set( material, colorFillDistributionPower ); + StarTypeFlareAddShader.streaksFrequency.Set( material, streaksFrequency ); + StarTypeFlareAddShader.streaksRotation.Set( material, streaksRotation ); + StarTypeFlareAddShader.streaksRotationSpeed.Set( material, streaksRotationSpeed ); + StarTypeFlareAddShader.streaksNoise.Set( material, streaksNoise ); + StarTypeFlareAddShader.streaksNoiseOffset.Set( material, streaksNoiseOffset ); + StarTypeFlareAddShader.streaksNoiseScroll.Set( material, streaksNoiseScroll ); + StarTypeFlareAddShader.streaks2Enabled.Set( material, streaks2Enabled ); + StarTypeFlareAddShader.streaksAddVsMult.Set( material, streaksAddVsMult ); + StarTypeFlareAddShader.streaks2Multiply.Set( material, streaks2Multiply ); + StarTypeFlareAddShader.streaksFrequency2.Set( material, streaksFrequency2 ); + StarTypeFlareAddShader.streaksRotation2.Set( material, streaksRotation2 ); + StarTypeFlareAddShader.streaksRotationSpeed2.Set( material, streaksRotationSpeed2 ); + StarTypeFlareAddShader.streaksNoise2.Set( material, streaksNoise2 ); + StarTypeFlareAddShader.streaksNoiseOffset2.Set( material, streaksNoiseOffset2 ); + StarTypeFlareAddShader.streaksNoiseScroll2.Set( material, streaksNoiseScroll2 ); + StarTypeFlareAddShader.maskScale.Set( material, maskScale ); + StarTypeFlareAddShader.maskRange.Set( material, maskRange ); + StarTypeFlareAddShader.maskRangeOscillation.Set( material, maskRangeOscillation ); + StarTypeFlareAddShader.maskRangeOscillationSpeed.Set( material, maskRangeOscillationSpeed ); + StarTypeFlareAddShader.maskInnerSize.Set( material, maskInnerSize ); + StarTypeFlareAddShader.maskFrequency.Set( material, maskFrequency ); + StarTypeFlareAddShader.maskRotation.Set( material, maskRotation ); + StarTypeFlareAddShader.maskRotationSpeed.Set( material, maskRotationSpeed ); + StarTypeFlareAddShader.blendingRange.Set( material, blendingRange ); + + BaseFlareShader.shapeNoiseAmount.Set( material, noiseAmount ); + BaseFlareShader.shapeNoiseScale.Set( material, noiseScale ); + + } + } +} diff --git a/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs.uid b/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs.uid new file mode 100644 index 0000000..699a778 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs.uid @@ -0,0 +1 @@ +uid://d1t1a1ki176ii diff --git a/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs b/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs new file mode 100644 index 0000000..5fcaff5 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs @@ -0,0 +1,104 @@ +using Godot; + +namespace Rokojori +{ + [Tool] + [GlobalClass] + public partial class TextureFlareType:FlareType + { + public override Shader GetShader( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return TextureTypeFlareAddShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return TextureTypeFlareMixShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return TextureTypeFlareSubtractShader.shader.Get(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return TextureTypeFlareMultiplyShader.shader.Get(); + } + + return null; + + } + + public override ShaderMaterial CreateMaterial( FlareLayer.Data data ) + { + var bm = data.GetBlendMode(); + + if ( FlareBlendMode.BlendModeType.Add == bm ) + { + return new TextureTypeFlareAddMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Mix == bm ) + { + return new TextureTypeFlareMixMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Subtract == bm ) + { + return new TextureTypeFlareSubtractMaterial(); + } + + if ( FlareBlendMode.BlendModeType.Multiply == bm ) + { + return new TextureTypeFlareMultiplyMaterial(); + } + + return null; + } + + [ExportGroup( "Texture")] + [Export] + public Texture2D texture; + [Export] + public float textureUVScale = 1f; + [Export] + public bool texureRepeat = false; + + [ExportGroup( "Mask")] + [Export] + public Texture2D mask; + [Export] + public float maskUVScale = 1f; + [Export] + public bool maskRepeat = false; + + [ExportGroup( "Noise","noise")] + [Export( PropertyHint.Range, "0,1" ) ] + public float noiseAmount = 0; + + [Export( PropertyHint.Range, "0.1,100" ) ] + public float noiseScale = 0; + + public override void ApplyShape( FlareLayer.Data data ) + { + var material = data.material; + + TextureTypeFlareAddShader.texture.Set( material, texture ); + TextureTypeFlareAddShader.textureUvScale.Set( material, textureUVScale ); + TextureTypeFlareAddShader.textureRepeat.Set( material, texureRepeat ); + + TextureTypeFlareAddShader.textureMask.Set( material, mask ); + TextureTypeFlareAddShader.textureMaskUvScale.Set( material, maskUVScale ); + TextureTypeFlareAddShader.textureMaskRepeat.Set( material, maskRepeat ); + + BaseFlareShader.shapeNoiseAmount.Set( material, noiseAmount ); + BaseFlareShader.shapeNoiseScale.Set( material, noiseScale ); + + } + } +} diff --git a/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs.uid b/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs.uid new file mode 100644 index 0000000..8044544 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs.uid @@ -0,0 +1 @@ +uid://btuv7v342v3k6 diff --git a/Runtime/VFX/FlareVFX/FlareVFX.cs b/Runtime/VFX/FlareVFX/FlareVFX.cs index 078530f..e252de2 100644 --- a/Runtime/VFX/FlareVFX/FlareVFX.cs +++ b/Runtime/VFX/FlareVFX/FlareVFX.cs @@ -2,78 +2,109 @@ using Godot; using System.Collections.Generic; namespace Rokojori -{ +{ [Tool] - [GlobalClass] + [GlobalClass, Icon("res://addons/rokojori_action_library/Icons/FlareVFX.svg") ] public partial class FlareVFX:Node3D { [Export] - public FlareVFXPreset preset; + public FlarePreset preset; - [Export] - public Node3D container; - - [Export] - public bool debug = false; public Node3D GetContainer() { - return container == null ? this : container; - } - - List _layers = new List(); - - [ExportToolButton( "Update Flare" )] - public Callable updateFlareButton => Callable.From( ()=> UpdateFlare() ); - void UpdateFlare() - { - if ( debug ) - { - numLayers = _layers.Count; - } - - _layers.ForEach( l => l.Update( this ) ); - } - - [ExportToolButton( "Create Flare" )] - public Callable createFlareButton => Callable.From( ()=> CreateFlare() ); - void CreateFlare() - { - GetContainer().DestroyChildren(); - _layers = []; - - preset.flareLayers.ForEach( - ( l )=> - { - if ( l == null ) - { - return; - } - - _layers.Add( l.Create( this ) ); - } - ); - - UpdateFlare(); + return this; } #if TOOLS [Export] public bool editMode = false; - [Export] - public int numLayers = 0; - public override void _Process( double delta ) { - // this.LogInfo( "Hello" ); if ( editMode ) { UpdateFlare(); } - - } #endif + + List _layers = []; + + void UpdateFlare() + { + if ( preset == null ) + { + return; + } + + var numLayers = preset.layers.NonNullCount(); + + if ( _layers == null || _layers.Count != numLayers ) + { + _layers = []; + + var meshInstances = this.GetDirectChildren(); + + if ( meshInstances.Count != numLayers ) + { + this.DestroyChildren(); + + meshInstances = []; + + var mIndex = 0; + + for ( int i = 0; i < preset.layers.Length; i++ ) + { + if ( preset.layers[ i ] == null ) + { + continue; + } + + var mi = this.CreateChild( "Layer " + i + " " + preset.layers[ i ].layerName ); + meshInstances.Add( mi ); + mIndex++; + } + } + + for ( int i = 0; i < preset.layers.Length; i++ ) + { + if ( preset.layers[ i ] == null ) + { + _layers.Add( null ); + continue; + } + + var layer = preset.layers[ i ].Create( this ); + _layers.Add( layer ); + layer.meshInstance = meshInstances[ i ]; + } + } + + var hasSolo = _layers.Find( l => l != null && l.layer.solo ) != null ; + + _layers.ForEach( + l => + { + if ( l == null ) + { + return; + } + + var isHidden = l.layer.hide || hasSolo && ! l.layer.solo; + + l.meshInstance.SetVisibility( ! isHidden ); + + if ( isHidden ) + { + return; + } + + l.Update(); + } + ); + + + } } } \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareVFXPreset.cs b/Runtime/VFX/FlareVFX/FlareVFXPreset.cs deleted file mode 100644 index cf8e373..0000000 --- a/Runtime/VFX/FlareVFX/FlareVFXPreset.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Godot; - - -namespace Rokojori -{ - [Tool] - [GlobalClass] - public partial class FlareVFXPreset:Resource - { - [Export] - public Color mainColor; - - [Export] - public FlareVFXLayer[] flareLayers = []; - - } -} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/FlareVFXPreset.cs.uid b/Runtime/VFX/FlareVFX/FlareVFXPreset.cs.uid deleted file mode 100644 index 97e96fd..0000000 --- a/Runtime/VFX/FlareVFX/FlareVFXPreset.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dciilhb7dhar1 diff --git a/Runtime/VFX/FlareVFX/FlareVFXPresets/Blue Anamorphic.tres b/Runtime/VFX/FlareVFX/FlareVFXPresets/Blue Anamorphic.tres new file mode 100644 index 0000000..955905f --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareVFXPresets/Blue Anamorphic.tres @@ -0,0 +1,756 @@ +[gd_resource type="Resource" script_class="FlarePreset" load_steps=108 format=3 uid="uid://dds52aifjv6r6"] + +[ext_resource type="Script" uid="uid://4pdr2urse51u" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs" id="2_1mwp1"] +[ext_resource type="Script" uid="uid://0epjgkk6qmhy" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs" id="2_fubui"] +[ext_resource type="Script" uid="uid://u3g0mlwlpd6s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareLayer.cs" id="3_63jx3"] +[ext_resource type="Script" uid="uid://dk8t1ljh3jroo" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs" id="4_2fhii"] +[ext_resource type="Script" uid="uid://d1t1a1ki176ii" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs" id="5_ky6vp"] +[ext_resource type="Script" uid="uid://8ca7d84rikb7" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs" id="6_0lftr"] +[ext_resource type="Script" uid="uid://bmcf4qxpqs8mb" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs" id="7_di3ri"] +[ext_resource type="Script" uid="uid://btuv7v342v3k6" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs" id="8_qmia2"] +[ext_resource type="Script" uid="uid://bq2hh5ledvviu" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs" id="9_q0f4t"] +[ext_resource type="Script" uid="uid://bh37fg1dnc37s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlarePreset.cs" id="10_xuc5d"] + +[sub_resource type="Resource" id="Resource_pu5ms"] +script = ExtResource("7_di3ri") +fading = 0.0 +opacity = 1.4114 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_fubui"] +script = ExtResource("2_1mwp1") +blendMode = 1 +metadata/_custom_type_script = "uid://4pdr2urse51u" + +[sub_resource type="Resource" id="Resource_63jx3"] +script = ExtResource("2_fubui") +shapeType = 0 +shapeOpacityInnerBorder = -0.0341 +shapeOpacityOuterBorder = 0.2151 +shapeOpacityBorderOffset = -0.4702 +shapeOpacityBorderSpread = -0.0137 +shapeOpacityDistribution = 3.6575 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -0.4921 +shapeColorMappingBorderSpread = 0.3548 +shapeColorMappingDistribution = 1.0165 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_msay1"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_a5aan"] +curve = SubResource("Curve_msay1") + +[sub_resource type="Resource" id="Resource_2fhii"] +script = ExtResource("3_63jx3") +layerName = "Backblend" +opacity = 0.5101 +flareType = SubResource("Resource_63jx3") +opacityCurvePerLayer = SubResource("CurveTexture_a5aan") +tint = Color(0.27730417, 0.27730417, 0.27730417, 1) +temparatureShift = -70.7505 +saturationShift = 15.3846 +lighntessShift = -10.0 +size = 80.0 +sizeYScale = 0.5734 +blendMode = SubResource("Resource_fubui") +renderPriority = -1 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_jvxnt"] +script = ExtResource("2_fubui") +shapeType = 0 +shapeOpacityOuterBorder = 0.2151 +shapeOpacityBorderOffset = -0.5468 +shapeOpacityBorderSpread = 0.2654 +shapeOpacityDistribution = 2.282 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -0.4921 +shapeColorMappingBorderSpread = 0.3548 +shapeColorMappingDistribution = 1.0165 +innerLightnessOffset = 100.0 +outerSaturationOffset = 83.4532 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_ade2u"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_x0p8u"] +curve = SubResource("Curve_ade2u") + +[sub_resource type="Resource" id="Resource_5q01g"] +script = ExtResource("3_63jx3") +layerName = "Core" +opacity = 0.1756 +flareType = SubResource("Resource_jvxnt") +opacityCurvePerLayer = SubResource("CurveTexture_x0p8u") +tint = Color(1.8782027, 1.8782027, 1.8782027, 1) +size = 20.0 +sizeScale = 0.2444 +sizeYScale = 0.5 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Curve" id="Curve_krf45"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_a4g6s"] +curve = SubResource("Curve_krf45") + +[sub_resource type="Curve" id="Curve_xxny3"] +_data = [Vector2(0, 1), 0.0, -6.236632, 0, 1, Vector2(0.1552795, 0.0315789), -1.1439475, -1.1439475, 0, 0, Vector2(0.3043478, 0), -0.21184179, 0.0, 1, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_dsp5p"] +curve = SubResource("Curve_xxny3") + +[sub_resource type="Resource" id="Resource_nuxa8"] +script = ExtResource("4_2fhii") +shapeScaleRange = 0.2645 +radialMaskTexture = SubResource("CurveTexture_dsp5p") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_a4g6s") +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_a0x8j"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_oytpb"] +curve = SubResource("Curve_a0x8j") + +[sub_resource type="Resource" id="Resource_yynim"] +script = ExtResource("3_63jx3") +layerName = "Horizontal Streak" +opacity = 0.0242 +flareType = SubResource("Resource_nuxa8") +opacityCurvePerLayer = SubResource("CurveTexture_oytpb") +size = 20.0745 +sizeYScale = 0.0243 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_4qtqc"] +script = ExtResource("5_ky6vp") +speedMultiply = 0.5 +innerHsl = Vector4(0.1415, 0, 0, 1) +outerHsl = Vector4(-0.407, 0, 0, 0) +colorFillRange = 0.0 +colorFillDistributionPower = 0.8603 +streaksFrequency = 3.8925 +streaksNoise = 0.1202 +streaksNoiseScroll = -0.1 +streaks2Enabled = true +streaksAddVsMult = 1.0 +streaks2Multiply = 5.0 +streaksFrequency2 = 2.909 +streaksNoiseScroll2 = 0.01 +maskScale = 0.299 +maskRange = 0.5459 +maskRangeOscillation = 0.049 +maskRangeOscillationSpeed = 0.4468 +maskFrequency = 0.8778 +maskRotationSpeed = 0.02 +noiseScale = 0.1 +metadata/_custom_type_script = "uid://d1t1a1ki176ii" + +[sub_resource type="Curve" id="Curve_027rg"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_6kf7p"] +curve = SubResource("Curve_027rg") + +[sub_resource type="Resource" id="Resource_gwku0"] +script = ExtResource("3_63jx3") +layerName = "Star Streaks" +opacity = 0.0611 +flareType = SubResource("Resource_4qtqc") +opacityCurvePerLayer = SubResource("CurveTexture_6kf7p") +tint = Color(1.0505337, 1.0505337, 1.0505337, 1) +size = 5.0 +sizeScale = 0.2528 +sizeYScale = 0.5 +overwriteExtension = true +extension = 2.0305 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_ls5mq"] +script = ExtResource("6_0lftr") +direction = Vector2(0, -1) +amount = 0.2772 +smear = 10.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_8vqmt"] +script = ExtResource("7_di3ri") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Gradient" id="Gradient_lrl2b"] +offsets = PackedFloat32Array(0.34347826, 0.47826087, 0.5217391, 0.66007906) +colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_e2s3r"] +gradient = SubResource("Gradient_lrl2b") + +[sub_resource type="Curve" id="Curve_uhxun"] +_data = [Vector2(0, 1), 0.0, -2.850001, 0, 1, Vector2(0.105263144, 0.6999999), 0.86363685, 0.86363685, 0, 0, Vector2(0.16491227, 0.82727265), 0.0, 0.0, 0, 0, Vector2(0.25614032, 1), 0.0, 0.0, 0, 0, Vector2(0.28070173, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.32280698, 0.5454545), 0.0, 0.0, 0, 0, Vector2(0.38947368, 0.8454545), 0.0, 0.0, 0, 0, Vector2(0.44912276, 0.6636363), 0.0, 0.0, 0, 0, Vector2(0.48771927, 0.8818182), 0.0, 0.0, 0, 0, Vector2(0.522807, 0.3454545), 0.0, 0.0, 0, 0, Vector2(0.6277372, 1), 0.0, 0.0, 0, 0, Vector2(0.6561403, 0.80909085), 0.0, 0.0, 0, 0, Vector2(0.70175433, 0.99090904), 0.0, 0.0, 0, 0, Vector2(0.78596485, 0.43636358), 2.4122248, 2.4122248, 0, 0, Vector2(0.81754386, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.88070166, 0.59090906), 0.0, 0.0, 0, 0, Vector2(0.9263158, 0.8909091), 0.0, 0.0, 0, 0, Vector2(0.9614035, 0.43636358), 0.0, 0.0, 0, 0, Vector2(1, 1), 14.6033, 0.0, 1, 0] +point_count = 19 + +[sub_resource type="CurveTexture" id="CurveTexture_4rdwj"] +texture_mode = 1 +curve = SubResource("Curve_uhxun") + +[sub_resource type="Gradient" id="Gradient_jyu1d"] +offsets = PackedFloat32Array(0, 0.13833992, 0.2952381, 0.4857143, 0.6482214, 0.8577075, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0, 1, 0.14311719, 1, 0, 1, 0, 1, 0.9274306, 1, 0, 0.117609024, 1, 1, 1, 0, 0.8233118, 1, 1, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_msay1"] +gradient = SubResource("Gradient_jyu1d") + +[sub_resource type="Curve" id="Curve_6jyri"] +_data = [Vector2(0.16842104, 0), 0.0, 0.0, 0, 0, Vector2(0.3015267, 0.16486073), 1.2385706, 1.1720778, 1, 0, Vector2(0.40839693, 0.10448909), 5.1818166, 5.1818166, 0, 0, Vector2(0.47368416, 1), 0.0, 0.0, 0, 0, Vector2(0.49122807, 0), 0.0, 0.0, 0, 0, Vector2(0.99999, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 7 + +[sub_resource type="CurveTexture" id="CurveTexture_rjwbk"] +texture_mode = 1 +curve = SubResource("Curve_6jyri") + +[sub_resource type="Resource" id="Resource_5ifxw"] +script = ExtResource("4_2fhii") +radialFillTexture = SubResource("GradientTexture1D_msay1") +radialFillStrength = 1.4115 +radialFillTile = 5.0 +radialFillOffset = 0.3075 +radialFillRepeat = true +conicFillTexture = SubResource("GradientTexture1D_e2s3r") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_rjwbk") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_4rdwj") +conicMaskTile = 34.0 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_r14qv"] +_data = [Vector2(0, 0), 0.0, 4.7777777, 0, 1, Vector2(0.20930234, 1), 0.0, 0.0, 0, 0, Vector2(0.60465115, 0.3440367), 0.0, 0.0, 0, 0, Vector2(0.71428573, 1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_mcvtj"] +curve = SubResource("Curve_r14qv") + +[sub_resource type="Resource" id="Resource_ju6hd"] +script = ExtResource("3_63jx3") +layerName = "Partial Rainbow Rings 3" +opacity = 0.1048 +numLayers = 2 +flareType = SubResource("Resource_5ifxw") +overwriteColor = Color(2.6346047, 2.7291539, 3.0382695, 1) +overwriteAmount = 1.0 +opacityCurvePerLayer = SubResource("CurveTexture_mcvtj") +tint = Color(1.340301, 1.340301, 1.340301, 1) +lighntessShift = 43.3566 +size = 20.0 +sizeScale = 0.2952 +sizeXScale = 0.6364 +overwriteExtension = true +screenOffsetLayerScale = 0.2792 +screenOffsetLayerDirection = Vector2(0.0555, 0.0235) +rotationPerLayer = 93.7763 +fading = SubResource("Resource_8vqmt") +chromaticAberation = SubResource("Resource_ls5mq") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_a5aan"] +script = ExtResource("7_di3ri") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_r64p5"] +script = ExtResource("2_fubui") +shapeType = 5 +shapeScale = 1.0 +shapeOpacityOuterBorder = 0.0692 +shapeOpacityBorderOffset = -0.2994 +shapeOpacityBorderSpread = -0.0038 +shapeOpacityDistribution = 5.2471 +shapeColorMappingInnerBorder = -0.9971 +shapeColorMappingOuterBorder = 0.704 +innerTemparatureOffset = 30.4291 +innerSaturationOffset = 5.3192 +innerLightnessOffset = 7.6923 +innerOpacity = 0.0 +outerTemparatureOffset = -33.2308 +outerSaturationOffset = 98.4615 +outerLightnessOffset = -16.9231 +noiseAmount = 1.0 +noiseScale = 2.182 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_fbx0p"] +_data = [Vector2(0, 0), 0.0, 0.850417, 0, 1, Vector2(0.25185186, 0.2141791), 1.7263157, 1.7263157, 0, 0, Vector2(0.47777778, 0.5052239), 0.0, 0.0, 0, 0, Vector2(0.7185185, 0.16567159), -0.7114339, -0.7114339, 0, 0, Vector2(1, 0), -0.5885701, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_yfwqk"] +curve = SubResource("Curve_fbx0p") + +[sub_resource type="Resource" id="Resource_6trn3"] +script = ExtResource("3_63jx3") +layerName = "Middle Hexagon" +opacity = 0.5279 +numLayers = 13 +flareType = SubResource("Resource_r64p5") +minHueRandom = -180.0 +maxHueRandom = 180.0 +opacityCurvePerLayer = SubResource("CurveTexture_yfwqk") +size = 4.6 +sizeScale = 0.2379 +sizeYScale = 0.5 +randomScaleMin = 0.019 +randomScaleMax = 1.3622 +screenOffsetStaticScale = 0.0288 +screenOffsetStaticDirection = Vector2(-5, -5) +screenOffsetLayerScale = 0.5582 +screenOffsetLayerDirection = Vector2(4, 4) +fading = SubResource("Resource_a5aan") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Curve" id="Curve_jm8s5"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_e7hhx"] +curve = SubResource("Curve_jm8s5") + +[sub_resource type="Curve" id="Curve_3764n"] +_data = [Vector2(0, 1), 0.0, -6.236632, 0, 1, Vector2(0.1552795, 0.0315789), -1.1439475, -1.1439475, 0, 0, Vector2(0.3043478, 0), -0.21184179, 0.0, 1, 0] +point_count = 3 + +[sub_resource type="CurveTexture" id="CurveTexture_n0rnh"] +curve = SubResource("Curve_3764n") + +[sub_resource type="Resource" id="Resource_galw3"] +script = ExtResource("4_2fhii") +shapeScaleRange = 0.5 +radialMaskTexture = SubResource("CurveTexture_n0rnh") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_e7hhx") +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_pv8u5"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_5jnfl"] +curve = SubResource("Curve_pv8u5") + +[sub_resource type="Resource" id="Resource_qf8q3"] +script = ExtResource("3_63jx3") +layerName = "Horizontal Streak" +opacity = 0.1314 +flareType = SubResource("Resource_galw3") +opacityCurvePerLayer = SubResource("CurveTexture_5jnfl") +size = 100.0 +sizeScale = 0.8576 +sizeXScale = 0.2972 +sizeYScale = 0.0052 +screenOffsetStaticScale = 0.2789 +screenOffsetLayerScale = 0.176 +screenOffsetLayerDirection = Vector2(0.4505, 1.763) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_6jyri"] +script = ExtResource("7_di3ri") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_rjwbk"] + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_5ifxw"] +height = 1 +noise = SubResource("FastNoiseLite_rjwbk") + +[sub_resource type="Gradient" id="Gradient_4k7mp"] +offsets = PackedFloat32Array(0.44174758, 0.52427185) + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_r14qv"] +frequency = 0.0202 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_mcvtj"] +height = 1 +generate_mipmaps = false +noise = SubResource("FastNoiseLite_r14qv") +color_ramp = SubResource("Gradient_4k7mp") + +[sub_resource type="Gradient" id="Gradient_ju6hd"] +offsets = PackedFloat32Array(0, 0.23043478, 0.47887325, 0.8521739, 1) +colors = PackedColorArray(1, 1, 1, 1, 0.4605409, 0.82299346, 1, 1, 0.7240258, 0.31439725, 0.7016676, 1, 0.5460356, 0.71885765, 1, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_r64p5"] +gradient = SubResource("Gradient_ju6hd") + +[sub_resource type="Curve" id="Curve_yfwqk"] +_data = [Vector2(0, 0), 0.0, 1.1375841, 0, 1, Vector2(0.43354434, 0.49319315), 0.0, 0.0, 0, 0, Vector2(0.5379747, 1), 0.0, 0.0, 0, 0, Vector2(0.74367094, 0.7827971), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.84735966, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_6trn3"] +curve = SubResource("Curve_yfwqk") + +[sub_resource type="Resource" id="Resource_jm8s5"] +script = ExtResource("4_2fhii") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_r64p5") +radialFillTile = 30.19 +radialFillOffset = 0.7775 +radialFillRepeat = true +conicFillTexture = SubResource("NoiseTexture2D_5ifxw") +conicFillTile = 4.0 +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_6trn3") +radialMaskTile = 5.0 +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("NoiseTexture2D_mcvtj") +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_e7hhx"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_3764n"] +curve = SubResource("Curve_e7hhx") + +[sub_resource type="Resource" id="Resource_n0rnh"] +script = ExtResource("3_63jx3") +layerName = "Rainbow Streaks" +opacity = 0.4198 +flareType = SubResource("Resource_jm8s5") +overwriteColor = Color(2.8845115, 2.8845115, 2.8845115, 1) +overwriteAmount = 0.3795 +opacityCurvePerLayer = SubResource("CurveTexture_3764n") +size = 200.0 +sizeYScale = 0.5 +rotationOverX = 60.0588 +rotationPerLayer = 90.0 +fading = SubResource("Resource_6jyri") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_galw3"] +offsets = PackedFloat32Array(0, 0.4732143, 0.59821427, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0.0714286, 1, 1, 1, 0.008474581, 1, 1, 1, 0) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_pv8u5"] +gradient = SubResource("Gradient_galw3") +fill = 1 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(1, 0.4957265) + +[sub_resource type="Resource" id="Resource_5jnfl"] +script = ExtResource("8_qmia2") +texture = SubResource("GradientTexture2D_pv8u5") +textureUVScale = 4.0 +maskUVScale = 4.0 +metadata/_custom_type_script = "uid://btuv7v342v3k6" + +[sub_resource type="Curve" id="Curve_qf8q3"] +_data = [Vector2(0, 1), 0.0, -1.0, 0, 1, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_cqn6v"] +curve = SubResource("Curve_qf8q3") + +[sub_resource type="Resource" id="Resource_wvg34"] +script = ExtResource("3_63jx3") +layerName = "Core" +flareType = SubResource("Resource_5jnfl") +overwriteColor = Color(2.343, 2.343, 2.343, 1) +overwriteAmount = 0.2568 +opacityCurvePerLayer = SubResource("CurveTexture_cqn6v") +tint = Color(4.8530827, 4.8530827, 4.8530827, 1) +lighntessShift = -10.3896 +size = 4.0 +sizeScale = 0.2428 +sizeYScale = 0.8112 +randomScaleMin = 0.6503 +randomScaleMax = 2.0 +screenOffsetLayerScale = 0.153 +screenOffsetLayerDirection = Vector2(1, 1) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_44rrc"] +script = ExtResource("2_fubui") +shapeType = 9 +shapeRotation = 2.4828 +shapeScale = 1.0 +shapeOpacityBorderOffset = -0.0334 +shapeOpacityBorderSpread = 0.0345 +shapeOpacityDistribution = 11.0 +shapeColorMappingInnerBorder = -1.3424 +shapeColorMappingOuterBorder = 0.704 +innerTemparatureOffset = 30.4291 +innerSaturationOffset = 5.3192 +innerLightnessOffset = 7.6923 +outerTemparatureOffset = -33.2308 +outerSaturationOffset = 98.4615 +outerLightnessOffset = -16.9231 +noiseAmount = 0.2878 +noiseScale = 17.9935 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_7jt2s"] +_data = [Vector2(0, 1), 0.0, 0.4873308, 0, 1] +point_count = 1 + +[sub_resource type="CurveTexture" id="CurveTexture_7ucn0"] +curve = SubResource("Curve_7jt2s") + +[sub_resource type="Resource" id="Resource_su8gi"] +script = ExtResource("3_63jx3") +layerName = "Large Rings" +opacity = 0.0273 +numLayers = 3 +flareType = SubResource("Resource_44rrc") +minHueRandom = -180.0 +maxHueRandom = 180.0 +opacityCurvePerLayer = SubResource("CurveTexture_7ucn0") +saturationShift = 86.7133 +lighntessShift = 19.5804 +size = 50.0 +sizeScale = 0.6434 +sizeYScale = 0.6469 +randomScaleMin = 0.2008 +randomScaleMax = 0.979 +screenOffsetStaticScale = 0.1399 +screenOffsetStaticDirection = Vector2(5, 5) +screenOffsetLayerScale = 0.1119 +screenOffsetLayerDirection = Vector2(4, 4) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_2vg2i"] +script = ExtResource("6_0lftr") +amount = 0.2772 +steps = 1 +smear = 1.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_slvrs"] +script = ExtResource("7_di3ri") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Gradient" id="Gradient_tr2nq"] +offsets = PackedFloat32Array(0.10869565, 0.47826087, 0.8652174) +colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_bhyc7"] +gradient = SubResource("Gradient_tr2nq") + +[sub_resource type="Curve" id="Curve_tnv8v"] +_data = [Vector2(0, 1), 0.0, -2.850001, 0, 1, Vector2(0.105263144, 0.6999999), 0.86363685, 0.86363685, 0, 0, Vector2(0.16491227, 0.82727265), 0.0, 0.0, 0, 0, Vector2(0.25614032, 1), 0.0, 0.0, 0, 0, Vector2(0.28070173, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.32280698, 0.5454545), 0.0, 0.0, 0, 0, Vector2(0.38947368, 0.8454545), 0.0, 0.0, 0, 0, Vector2(0.44912276, 0.6636363), 0.0, 0.0, 0, 0, Vector2(0.48771927, 0.8818182), 0.0, 0.0, 0, 0, Vector2(0.522807, 0.3454545), 0.0, 0.0, 0, 0, Vector2(0.6277372, 1), 0.0, 0.0, 0, 0, Vector2(0.6561403, 0.80909085), 0.0, 0.0, 0, 0, Vector2(0.70175433, 0.99090904), 0.0, 0.0, 0, 0, Vector2(0.78596485, 0.43636358), 2.4122248, 2.4122248, 0, 0, Vector2(0.81754386, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.88070166, 0.59090906), 0.0, 0.0, 0, 0, Vector2(0.9263158, 0.8909091), 0.0, 0.0, 0, 0, Vector2(0.9614035, 0.43636358), 0.0, 0.0, 0, 0, Vector2(1, 1), 14.6033, 0.0, 1, 0] +point_count = 19 + +[sub_resource type="CurveTexture" id="CurveTexture_y78fk"] +texture_mode = 1 +curve = SubResource("Curve_tnv8v") + +[sub_resource type="Gradient" id="Gradient_csms2"] +offsets = PackedFloat32Array(0, 0.13833992, 0.2952381, 0.4857143, 0.6482214, 0.8577075, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0, 1, 0.14311719, 1, 0, 1, 0, 1, 0.9274306, 1, 0, 0.117609024, 1, 1, 1, 0, 0.8233118, 1, 1, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_t2t5r"] +gradient = SubResource("Gradient_csms2") + +[sub_resource type="Curve" id="Curve_nb8j7"] +_data = [Vector2(0.1793893, 0), 0.0, 0.0, 0, 0, Vector2(0.30252102, 0), 0.0, 1.1720778, 1, 0, Vector2(0.4159664, 0.15789473), 0.58947366, 0.58947366, 0, 0, Vector2(0.47368416, 1), 0.0, 0.0, 0, 0, Vector2(0.49122807, 0), 0.0, 0.0, 0, 0, Vector2(0.6450381, 0), 0.0, 0.0, 0, 0, Vector2(0.99999, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 8 + +[sub_resource type="CurveTexture" id="CurveTexture_o3foc"] +texture_mode = 1 +curve = SubResource("Curve_nb8j7") + +[sub_resource type="Resource" id="Resource_qos1n"] +script = ExtResource("4_2fhii") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_t2t5r") +radialFillStrength = 1.4115 +radialFillTile = 5.0 +radialFillOffset = 0.3075 +radialFillRepeat = true +conicFillTexture = SubResource("GradientTexture1D_bhyc7") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_o3foc") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_y78fk") +conicMaskStrength = 0.244 +conicMaskTile = 34.0 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_a5d5w"] +_data = [Vector2(0, 0), 0.0, 4.7777777, 0, 1, Vector2(0.20930234, 1), 0.0, 0.0, 0, 0, Vector2(0.60465115, 0.3440367), 0.0, 0.0, 0, 0, Vector2(0.71428573, 1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_8d170"] +curve = SubResource("Curve_a5d5w") + +[sub_resource type="Resource" id="Resource_ch4em"] +script = ExtResource("3_63jx3") +layerName = "Partial Rainbow Rings 3" +opacity = 0.0947 +flareType = SubResource("Resource_qos1n") +overwriteColor = Color(2.6346047, 2.7291539, 3.0382695, 1) +overwriteAmount = 1.0 +opacityCurvePerLayer = SubResource("CurveTexture_8d170") +tint = Color(1.340301, 1.340301, 1.340301, 1) +lighntessShift = 43.3566 +size = 21.0855 +sizeScale = 0.2215 +sizeYScale = 0.6503 +screenOffsetLayerScale = 0.9785 +screenOffsetLayerDirection = Vector2(1, 1) +rotation = 180.0 +fading = SubResource("Resource_slvrs") +chromaticAberation = SubResource("Resource_2vg2i") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_xhmdb"] +script = ExtResource("2_fubui") +shapeType = 5 +shapeScale = 1.0 +shapeOpacityOuterBorder = 0.0692 +shapeOpacityBorderOffset = -0.2994 +shapeOpacityBorderSpread = -0.0248 +shapeOpacityDistribution = 5.2471 +shapeColorMappingInnerBorder = -1.8029 +shapeColorMappingOuterBorder = 0.704 +shapeColorMappingBorderOffset = 1.3525 +shapeColorMappingBorderSpread = -0.114 +innerOpacity = 0.0 +noiseScale = 1.0 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_me2ag"] +_data = [Vector2(0, 0), 0.0, 0.850417, 0, 1, Vector2(0.25185186, 0.2141791), 1.7263157, 1.7263157, 0, 0, Vector2(0.47777778, 0.5052239), 0.0, 0.0, 0, 0, Vector2(0.7185185, 0.16567159), -0.7114339, -0.7114339, 0, 0, Vector2(1, 0), -0.5885701, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_l2qv5"] +curve = SubResource("Curve_me2ag") + +[sub_resource type="Resource" id="Resource_yabmc"] +script = ExtResource("3_63jx3") +layerName = "Large Hexagon" +opacity = 0.0663 +flareType = SubResource("Resource_xhmdb") +minHueRandom = -180.0 +maxHueRandom = 180.0 +opacityCurvePerLayer = SubResource("CurveTexture_l2qv5") +tint = Color(1.6260077, 1.6260077, 1.6260077, 1) +hueShift = -95.6643 +lighntessShift = 20.979 +size = 100.0 +sizeScale = 0.282 +sizeYScale = 0.5 +randomScaleMin = 0.019 +randomScaleMax = 1.3622 +screenOffsetStaticScale = 0.0783 +screenOffsetStaticDirection = Vector2(-5, -5) +screenOffsetLayerScale = 0.0 +screenOffsetLayerDirection = Vector2(-4, 4) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_nxurn"] +script = ExtResource("7_di3ri") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_lsvvh"] +script = ExtResource("2_fubui") +shapeType = 5 +shapeScale = 1.0 +shapeOpacityOuterBorder = 0.0692 +shapeOpacityBorderOffset = -0.2994 +shapeOpacityBorderSpread = -0.0248 +shapeOpacityDistribution = 5.2471 +shapeColorMappingInnerBorder = -0.9971 +shapeColorMappingOuterBorder = 0.704 +innerTemparatureOffset = 30.4291 +innerSaturationOffset = 5.3192 +innerLightnessOffset = 7.6923 +innerOpacity = 0.0 +outerTemparatureOffset = -33.2308 +outerSaturationOffset = 98.4615 +outerLightnessOffset = -16.9231 +noiseAmount = 1.0 +noiseScale = 2.182 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_085m3"] +_data = [Vector2(0, 0), 0.0, 0.850417, 0, 1, Vector2(0.25185186, 0.2141791), 1.7263157, 1.7263157, 0, 0, Vector2(0.47777778, 0.5052239), 0.0, 0.0, 0, 0, Vector2(0.7185185, 0.16567159), -0.7114339, -0.7114339, 0, 0, Vector2(1, 0), -0.5885701, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_71075"] +curve = SubResource("Curve_085m3") + +[sub_resource type="Resource" id="Resource_7hgc8"] +script = ExtResource("3_63jx3") +layerName = "Small Circles" +opacity = 0.229 +numLayers = 44 +flareType = SubResource("Resource_lsvvh") +minHueRandom = -180.0 +maxHueRandom = 180.0 +opacityCurvePerLayer = SubResource("CurveTexture_71075") +lighntessShift = 22.4 +size = 1.148 +sizeScale = 0.2572 +sizeYScale = 0.5 +randomScaleMin = 0.2691 +randomScaleMax = 1.3622 +screenOffsetStaticScale = 0.0595 +screenOffsetStaticDirection = Vector2(-5, -5) +screenOffsetLayerScale = 0.1534 +screenOffsetLayerDirection = Vector2(-10, -10) +fading = SubResource("Resource_nxurn") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_cqn6v"] +script = ExtResource("9_q0f4t") +toSize = 0.0 + +[resource] +script = ExtResource("10_xuc5d") +mainColor = Color(0, 0.4330005, 2.454, 1) +layers = [SubResource("Resource_2fhii"), SubResource("Resource_5q01g"), SubResource("Resource_yynim"), SubResource("Resource_gwku0"), SubResource("Resource_ju6hd"), SubResource("Resource_6trn3"), SubResource("Resource_qf8q3"), SubResource("Resource_n0rnh"), SubResource("Resource_wvg34"), SubResource("Resource_su8gi"), SubResource("Resource_ch4em"), SubResource("Resource_yabmc"), SubResource("Resource_7hgc8")] +fading = SubResource("Resource_pu5ms") +occlusion = SubResource("Resource_cqn6v") +metadata/_custom_type_script = "uid://bh37fg1dnc37s" diff --git a/Runtime/VFX/FlareVFX/FlareVFXPresets/Green Streaky X.tres b/Runtime/VFX/FlareVFX/FlareVFXPresets/Green Streaky X.tres new file mode 100644 index 0000000..e8a6a43 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareVFXPresets/Green Streaky X.tres @@ -0,0 +1,588 @@ +[gd_resource type="Resource" script_class="FlarePreset" load_steps=83 format=3 uid="uid://2k1ntu2ubrut"] + +[ext_resource type="Script" uid="uid://c67s0ccpomg2s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs" id="1_0me0p"] +[ext_resource type="Script" uid="uid://bq2hh5ledvviu" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs" id="2_1dp4m"] +[ext_resource type="Script" uid="uid://0epjgkk6qmhy" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs" id="2_1i66u"] +[ext_resource type="Script" uid="uid://4pdr2urse51u" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs" id="2_bwqac"] +[ext_resource type="Script" uid="uid://bh37fg1dnc37s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlarePreset.cs" id="3_1i66u"] +[ext_resource type="Script" uid="uid://u3g0mlwlpd6s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareLayer.cs" id="3_muoxm"] +[ext_resource type="Script" uid="uid://dk8t1ljh3jroo" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs" id="4_ghtjd"] +[ext_resource type="Script" uid="uid://d1t1a1ki176ii" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs" id="5_rrlpm"] +[ext_resource type="Script" uid="uid://8ca7d84rikb7" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs" id="6_kf5m1"] +[ext_resource type="Script" uid="uid://bmcf4qxpqs8mb" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs" id="7_bwqac"] + +[sub_resource type="Resource" id="Resource_muoxm"] +script = ExtResource("1_0me0p") + +[sub_resource type="Resource" id="Resource_u502r"] +script = ExtResource("2_bwqac") +blendMode = 1 +metadata/_custom_type_script = "uid://4pdr2urse51u" + +[sub_resource type="Resource" id="Resource_lnyj6"] +script = ExtResource("2_1i66u") +shapeType = 0 +shapeOpacityInnerBorder = -0.0341 +shapeOpacityOuterBorder = 0.2151 +shapeOpacityBorderOffset = -0.4702 +shapeOpacityBorderSpread = -0.0137 +shapeOpacityDistribution = 3.6575 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -0.4921 +shapeColorMappingBorderSpread = 0.3548 +shapeColorMappingDistribution = 1.0165 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_oqkh4"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_seli3"] +curve = SubResource("Curve_oqkh4") + +[sub_resource type="Resource" id="Resource_ls0y1"] +script = ExtResource("3_muoxm") +layerName = "Backblend" +opacity = 0.604 +flareType = SubResource("Resource_lnyj6") +opacityCurvePerLayer = SubResource("CurveTexture_seli3") +tint = Color(0.27730417, 0.27730417, 0.27730417, 1) +temparatureShift = -70.7505 +saturationShift = 15.3846 +lighntessShift = -10.0 +size = 50.0 +sizeScale = 0.6084 +blendMode = SubResource("Resource_u502r") +renderPriority = -1 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_rrlpm"] +script = ExtResource("2_1i66u") +shapeType = 0 +shapeOpacityOuterBorder = 0.2151 +shapeOpacityBorderOffset = -0.4702 +shapeOpacityBorderSpread = -0.0137 +shapeOpacityDistribution = 3.5045 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -0.4921 +shapeColorMappingBorderSpread = 0.3548 +shapeColorMappingDistribution = 1.0165 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Resource" id="Resource_kf5m1"] +script = ExtResource("3_muoxm") +layerName = "Core" +flareType = SubResource("Resource_rrlpm") +opacityCurvePerLayer = SubResource("CurveTexture_seli3") +tint = Color(1.8782027, 1.8782027, 1.8782027, 1) +temparatureShift = 30.8571 +saturationShift = -12.5714 +lighntessShift = 8.0 +size = 10.0 +sizeScale = 0.0648 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_ls5mq"] +offsets = PackedFloat32Array(0, 0.41016948, 0.60338986) +colors = PackedColorArray(1.340301, 1.340301, 1.340301, 1, 0.10365856, 0.10365856, 0.10365856, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_1ntwo"] +gradient = SubResource("Gradient_ls5mq") + +[sub_resource type="Resource" id="Resource_bwqac"] +script = ExtResource("4_ghtjd") +shapeScaleRange = 0.704 +radialMaskTexture = SubResource("GradientTexture1D_1ntwo") +radialMaskOffset = 0.0 +radialMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_sx8ta"] +script = ExtResource("3_muoxm") +layerName = "X Inner" +opacity = 0.3026 +numLayers = 2 +flareType = SubResource("Resource_bwqac") +size = 5.0 +sizeScale = 0.4628 +sizeXScale = 0.0208 +rotationOverX = 5.0 +rotationPerLayer = 45.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_uhxun"] +offsets = PackedFloat32Array(0, 0.21355931, 0.27457628, 0.3762712) +colors = PackedColorArray(1.340301, 1.340301, 1.340301, 1, 0.24107182, 0.24107182, 0.24107182, 1, 0.09117687, 0.09117687, 0.09117687, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_4rdwj"] +gradient = SubResource("Gradient_uhxun") + +[sub_resource type="Resource" id="Resource_ttj3t"] +script = ExtResource("4_ghtjd") +shapeScaleRange = 0.704 +radialMaskTexture = SubResource("GradientTexture1D_4rdwj") +radialMaskOffset = 0.0 +radialMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_y13uk"] +script = ExtResource("3_muoxm") +layerName = "X Soft Warm Glow" +opacity = 0.0571 +numLayers = 2 +flareType = SubResource("Resource_ttj3t") +tint = Color(1, 1, 1, 0.20784314) +temparatureShift = 35.7559 +saturationShift = 99.8461 +size = 20.0 +sizeScale = 0.2546 +sizeXScale = 0.1203 +rotationOverX = 5.0 +rotationPerLayer = 45.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_1ntwo"] +offsets = PackedFloat32Array(0, 0.21355931, 0.27457628, 0.3762712) +colors = PackedColorArray(1.340301, 1.340301, 1.340301, 1, 0.24107182, 0.24107182, 0.24107182, 1, 0.09117687, 0.09117687, 0.09117687, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_8vqmt"] +gradient = SubResource("Gradient_1ntwo") + +[sub_resource type="Resource" id="Resource_dqgft"] +script = ExtResource("4_ghtjd") +shapeScaleRange = 0.704 +radialMaskTexture = SubResource("GradientTexture1D_8vqmt") +radialMaskOffset = 0.0 +radialMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_2kjxc"] +script = ExtResource("3_muoxm") +layerName = "X Large Cold Glow" +opacity = 0.0241 +numLayers = 2 +flareType = SubResource("Resource_dqgft") +tint = Color(1, 1, 1, 0.20784314) +temparatureShift = -96.6857 +saturationShift = 43.4286 +size = 20.0 +sizeScale = 0.3751 +sizeXScale = 0.1923 +screenOffsetStaticScale = 0.0259 +screenOffsetStaticDirection = Vector2(2, 2) +rotationOverX = 5.0 +rotationPerLayer = 45.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_jwcf1"] +script = ExtResource("5_rrlpm") +streaksFrequency = 1.3855 +streaksNoise = 0.014 +streaksNoiseScroll = 0.0185 +streaks2Enabled = true +streaksAddVsMult = 0.9625 +streaks2Multiply = 0.6782 +streaksFrequency2 = 3.8292 +streaksRotationSpeed2 = 0.0085 +streaksNoise2 = 0.0893 +streaksNoiseScroll2 = 0.097 +maskScale = 0.3713 +maskRange = 0.5316 +maskRangeOscillation = 0.1222 +maskRangeOscillationSpeed = 0.195 +maskFrequency = 0.5673 +maskRotationSpeed = 0.007 +metadata/_custom_type_script = "uid://d1t1a1ki176ii" + +[sub_resource type="Resource" id="Resource_lniih"] +script = ExtResource("3_muoxm") +layerName = "Star Streaks" +opacity = 0.5304 +flareType = SubResource("Resource_jwcf1") +size = 10.0 +sizeScale = 0.0846 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_k0tul"] +script = ExtResource("2_1i66u") +shapeType = 0 +shapeOpacityBorderOffset = -0.359 +shapeOpacityBorderSpread = 0.513 +shapeColorMappingInnerBorder = -0.0141 +shapeColorMappingOuterBorder = -0.197 +shapeColorMappingBorderOffset = -0.0585 +shapeColorMappingBorderSpread = 0.3613 +shapeColorMappingDistribution = 0.3915 +innerSaturationOffset = 88.8889 +innerLightnessOffset = -2.3392 +innerOpacity = 0.5485 +outerSaturationOffset = -22.2222 +outerLightnessOffset = 36.2573 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Resource" id="Resource_do1r7"] +script = ExtResource("3_muoxm") +layerName = "Soft Rings" +opacity = 0.0172 +numLayers = 16 +flareType = SubResource("Resource_k0tul") +minHueRandom = -40.0 +maxHueRandom = 40.0 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.3257 +randomScaleMax = 1.0686 +screenOffsetLayerDirection = Vector2(-1.692, -0.866) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_hvmwg"] +script = ExtResource("2_1i66u") +shapeType = 0 +shapeOpacityBorderOffset = -0.359 +shapeOpacityBorderSpread = 0.659 +shapeColorMappingInnerBorder = -0.0141 +shapeColorMappingOuterBorder = -0.197 +shapeColorMappingBorderOffset = -0.0585 +shapeColorMappingBorderSpread = 0.3613 +shapeColorMappingDistribution = 0.3915 +innerSaturationOffset = 88.8889 +innerLightnessOffset = -2.3392 +innerOpacity = 0.5485 +outerSaturationOffset = -22.2222 +outerLightnessOffset = 36.2573 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Resource" id="Resource_0ta4h"] +script = ExtResource("3_muoxm") +layerName = "Soft Rings" +opacity = 0.0177 +numLayers = 47 +flareType = SubResource("Resource_hvmwg") +minHueRandom = -40.0 +maxHueRandom = 40.0 +temparatureShift = 86.4 +lighntessShift = -2.2855 +sizeScale = 0.2342 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.1428 +randomScaleMax = 1.5372 +screenOffsetStaticScale = 0.6857 +screenOffsetStaticDirection = Vector2(-0.1, -0.1) +screenOffsetLayerScale = 0.941 +screenOffsetLayerDirection = Vector2(-1.692, -0.866) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_xviyx"] +script = ExtResource("6_kf5m1") +amount = 0.2772 +steps = 1 +smear = 1.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_0cbup"] +script = ExtResource("7_bwqac") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Gradient" id="Gradient_xxny3"] +offsets = PackedFloat32Array(0, 0.47118643, 1) +colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_dsp5p"] +gradient = SubResource("Gradient_xxny3") + +[sub_resource type="Curve" id="Curve_nuxa8"] +_data = [Vector2(0, 1), 0.0, -2.850001, 0, 1, Vector2(0.105263144, 0.6999999), 0.86363685, 0.86363685, 0, 0, Vector2(0.16491227, 0.82727265), 0.0, 0.0, 0, 0, Vector2(0.25614032, 1), 0.0, 0.0, 0, 0, Vector2(0.28070173, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.32280698, 0.5454545), 0.0, 0.0, 0, 0, Vector2(0.38947368, 0.8454545), 0.0, 0.0, 0, 0, Vector2(0.44912276, 0.6636363), 0.0, 0.0, 0, 0, Vector2(0.48771927, 0.8818182), 0.0, 0.0, 0, 0, Vector2(0.522807, 0.3454545), 0.0, 0.0, 0, 0, Vector2(0.6277372, 1), 0.0, 0.0, 0, 0, Vector2(0.6561403, 0.80909085), 0.0, 0.0, 0, 0, Vector2(0.70175433, 0.99090904), 0.0, 0.0, 0, 0, Vector2(0.78596485, 0.43636358), 2.4122248, 2.4122248, 0, 0, Vector2(0.81754386, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.88070166, 0.59090906), 0.0, 0.0, 0, 0, Vector2(0.9263158, 0.8909091), 0.0, 0.0, 0, 0, Vector2(0.9614035, 0.43636358), 0.0, 0.0, 0, 0, Vector2(1, 1), 14.6033, 0.0, 1, 0] +point_count = 19 + +[sub_resource type="CurveTexture" id="CurveTexture_a0x8j"] +texture_mode = 1 +curve = SubResource("Curve_nuxa8") + +[sub_resource type="Gradient" id="Gradient_4qtqc"] +offsets = PackedFloat32Array(0, 0.13833992, 0.2952381, 0.4857143, 0.6482214, 0.8577075, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0, 1, 0.14311719, 1, 0, 1, 0, 1, 0.9274306, 1, 0, 0.117609024, 1, 1, 1, 0, 0.8233118, 1, 1, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_tn5uv"] +gradient = SubResource("Gradient_4qtqc") + +[sub_resource type="Curve" id="Curve_gwku0"] +_data = [Vector2(0, 0.03388822), 0.0, 0.0, 0, 0, Vector2(0.34862384, 0.38941735), 3.7910225, 3.7910225, 0, 0, Vector2(0.3975535, 1), 0.0, 0.0, 0, 0, Vector2(0.49122807, 0), 0.0, 0.0, 0, 0, Vector2(0.6450381, 0), 0.0, 0.0, 0, 0, Vector2(0.99999, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 7 + +[sub_resource type="CurveTexture" id="CurveTexture_fy8er"] +texture_mode = 1 +curve = SubResource("Curve_gwku0") + +[sub_resource type="Resource" id="Resource_h7itt"] +script = ExtResource("4_ghtjd") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_tn5uv") +radialFillStrength = 1.4115 +radialFillTile = 2.0 +radialFillOffset = -0.163 +radialFillRepeat = true +conicFillTexture = SubResource("GradientTexture1D_dsp5p") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_fy8er") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_a0x8j") +conicMaskStrength = 0.244 +conicMaskTile = 3.394 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_oytpb"] +_data = [Vector2(0, 0), 0.0, 4.7777777, 0, 1, Vector2(0.20930234, 1), 0.0, 0.0, 0, 0, Vector2(0.60465115, 0.3440367), 0.0, 0.0, 0, 0, Vector2(0.71428573, 1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_yynim"] +curve = SubResource("Curve_oytpb") + +[sub_resource type="Resource" id="Resource_vf81q"] +script = ExtResource("3_muoxm") +layerName = "Partial Rainbow Rings 3" +opacity = 0.0947 +flareType = SubResource("Resource_h7itt") +overwriteColor = Color(2.6346047, 2.7291539, 3.0382695, 1) +overwriteAmount = 1.0 +opacityCurvePerLayer = SubResource("CurveTexture_yynim") +tint = Color(1.340301, 1.340301, 1.340301, 1) +lighntessShift = 43.3566 +size = 21.0855 +sizeScale = 0.1186 +sizeYScale = 0.8503 +screenOffsetLayerDirection = Vector2(-0.2005, -1) +rotation = 180.0 +fading = SubResource("Resource_0cbup") +chromaticAberation = SubResource("Resource_xviyx") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_77rpu"] +script = ExtResource("6_kf5m1") +amount = 0.2772 +steps = 1 +smear = 1.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_v6448"] +script = ExtResource("7_bwqac") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Curve" id="Curve_rjwbk"] +_data = [Vector2(0, 1), 0.0, -8.76087, 0, 1, Vector2(0.090322584, 0.20869559), 0.86363685, 0.86363685, 0, 0, Vector2(0.1716129, 0.36338663), 0.0, 0.0, 0, 0, Vector2(0.25614032, 1), 0.0, 0.0, 0, 0, Vector2(0.28070173, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.32129034, 0.5686498), 0.0, 0.0, 0, 0, Vector2(0.38947368, 0.8454545), 0.0, 0.0, 0, 0, Vector2(0.43741935, 0.37231112), 0.0, 0.0, 0, 0, Vector2(0.48771927, 0.8818182), 0.0, 0.0, 0, 0, Vector2(0.5367742, 0.6459954), 0.0, 0.0, 0, 0, Vector2(0.6277372, 1), 0.0, 0.0, 0, 0, Vector2(0.66451615, 0.57162464), 0.0, 0.0, 0, 0, Vector2(0.70175433, 0.99090904), 0.0, 0.0, 0, 0, Vector2(0.76645166, 0.20869559), 2.4122248, 2.4122248, 0, 0, Vector2(0.81754386, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.87354845, 0.22951937), 0.0, 0.0, 0, 0, Vector2(0.9263158, 0.8909091), 0.0, 0.0, 0, 0, Vector2(0.9614035, 0.43636358), 0.0, 0.0, 0, 0, Vector2(1, 1), 14.6033, 0.0, 1, 0] +point_count = 19 + +[sub_resource type="CurveTexture" id="CurveTexture_5ifxw"] +texture_mode = 1 +curve = SubResource("Curve_rjwbk") + +[sub_resource type="Gradient" id="Gradient_r64p5"] +offsets = PackedFloat32Array(0, 0.13833992, 0.2952381, 0.4857143, 0.6482214, 0.8577075, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0, 1, 0.14311719, 1, 0, 1, 0, 1, 0.9274306, 1, 0, 0.117609024, 1, 1, 1, 0, 0.8233118, 1, 1, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_fbx0p"] +gradient = SubResource("Gradient_r64p5") + +[sub_resource type="Curve" id="Curve_6trn3"] +_data = [Vector2(0.2735484, 0), 0.0, 0.2423717, 0, 0, Vector2(0.32129034, 0.08672762), 4.457286, 4.457286, 0, 0, Vector2(0.324159, 1), 0.0, 0.0, 0, 0, Vector2(0.33548388, 0.059954166), -4.7550745, -4.7550745, 0, 0, Vector2(0.34967744, 0), 0.12732375, 0.12732375, 0, 0, Vector2(0.42709678, 0), 0.0, 0.0, 0, 0, Vector2(0.99999, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 8 + +[sub_resource type="CurveTexture" id="CurveTexture_jm8s5"] +texture_mode = 1 +curve = SubResource("Curve_6trn3") + +[sub_resource type="Resource" id="Resource_4o52g"] +script = ExtResource("4_ghtjd") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_fbx0p") +radialFillStrength = 1.4115 +radialFillTile = 16.0 +radialFillOffset = -0.777 +radialFillRepeat = true +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_jm8s5") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_5ifxw") +conicMaskStrength = 0.244 +conicMaskTile = 8.0 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_mcvtj"] +_data = [Vector2(0, 0), 0.0, 4.7777777, 0, 1, Vector2(0.20930234, 1), 0.0, 0.0, 0, 0, Vector2(0.60465115, 0.3440367), 0.0, 0.0, 0, 0, Vector2(0.71428573, 1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_ju6hd"] +curve = SubResource("Curve_mcvtj") + +[sub_resource type="Resource" id="Resource_jfmlc"] +script = ExtResource("3_muoxm") +layerName = "Partial Rainbow Rings 3" +opacity = 0.3621 +numLayers = 2 +flareType = SubResource("Resource_4o52g") +overwriteColor = Color(1.7898365, 0.29490346, 0.61720556, 1) +overwriteAmount = 1.0 +opacityCurvePerLayer = SubResource("CurveTexture_ju6hd") +tint = Color(1.340301, 1.340301, 1.340301, 1) +size = 21.0855 +sizeScale = 0.6699 +randomScaleMin = 0.195 +randomScaleMax = 1.698 +screenOffsetStaticDirection = Vector2(0.175, 0.223) +screenOffsetLayerDirection = Vector2(-0.2005, -1) +rotation = 180.0 +rotationOverX = 20.0 +fading = SubResource("Resource_v6448") +chromaticAberation = SubResource("Resource_77rpu") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_j1bqe"] +script = ExtResource("7_bwqac") +fading = 0.0 +opacity = 1.0 +sizeX = 0.0 +sizeY = 0.6289 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_ephbk"] +script = ExtResource("2_1i66u") +shapeType = 0 +shapeScale = 0.4009 +shapeOpacityBorderOffset = 0.0992 +shapeOpacityBorderSpread = 0.6013 +shapeOpacityDistribution = 3.1273 +shapeColorMappingInnerBorder = -0.5455 +shapeColorMappingOuterBorder = 0.1983 +outerOpacity = 0.0 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_galw3"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_pv8u5"] +curve = SubResource("Curve_galw3") + +[sub_resource type="Resource" id="Resource_8f4np"] +script = ExtResource("3_muoxm") +layerName = "Big Horizontal Streak" +opacity = 0.005 +flareType = SubResource("Resource_ephbk") +opacityCurvePerLayer = SubResource("CurveTexture_pv8u5") +temparatureShift = 8.4706 +saturationShift = -68.8168 +size = 10.0 +sizeScale = 0.4587 +screenSizeScale = 0.616 +fading = SubResource("Resource_j1bqe") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_tpa8n"] +script = ExtResource("7_bwqac") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_qf8q3"] +noise_type = 2 +frequency = 0.0092 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_cqn6v"] +height = 1 +noise = SubResource("FastNoiseLite_qf8q3") +seamless = true + +[sub_resource type="Gradient" id="Gradient_g6idi"] +offsets = PackedFloat32Array(0.44174758, 0.52427185) + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_wvg34"] +frequency = 0.0202 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_44rrc"] +height = 1 +generate_mipmaps = false +noise = SubResource("FastNoiseLite_wvg34") +color_ramp = SubResource("Gradient_g6idi") + +[sub_resource type="Gradient" id="Gradient_2vg2i"] +offsets = PackedFloat32Array(0, 0.23043478, 0.5092025, 0.8521739, 1) +colors = PackedColorArray(1, 1, 1, 1, 0.4605409, 0.82299346, 1, 1, 0.7240258, 0.31439725, 0.7016676, 1, 0.5460356, 0.71885765, 1, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_slvrs"] +gradient = SubResource("Gradient_2vg2i") + +[sub_resource type="Curve" id="Curve_tr2nq"] +_data = [Vector2(0, 0), 0.0, 1.1375841, 0, 1, Vector2(0.43354434, 0.49319315), 0.0, 0.0, 0, 0, Vector2(0.5379747, 1), 0.0, 0.0, 0, 0, Vector2(0.74367094, 0.7827971), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.84735966, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_bhyc7"] +curve = SubResource("Curve_tr2nq") + +[sub_resource type="Resource" id="Resource_o5sql"] +script = ExtResource("4_ghtjd") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_slvrs") +radialFillTile = 30.19 +radialFillOffset = 1.301 +radialFillRepeat = true +conicFillTexture = SubResource("NoiseTexture2D_cqn6v") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_bhyc7") +radialMaskTile = 5.0 +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("NoiseTexture2D_44rrc") +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_7ucn0"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_su8gi"] +curve = SubResource("Curve_7ucn0") + +[sub_resource type="Resource" id="Resource_6e10d"] +script = ExtResource("3_muoxm") +layerName = "Rainbow Streaks" +opacity = 0.4362 +flareType = SubResource("Resource_o5sql") +overwriteColor = Color(2.8845115, 2.8845115, 2.8845115, 1) +overwriteAmount = 0.3795 +opacityCurvePerLayer = SubResource("CurveTexture_su8gi") +temparatureShift = 39.633 +saturationShift = 14.6789 +size = 200.0 +sizeYScale = 0.5 +rotationOverX = 60.0588 +rotationPerLayer = 90.0 +fading = SubResource("Resource_tpa8n") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_ghtjd"] +script = ExtResource("2_1dp4m") + +[resource] +script = ExtResource("3_1i66u") +mainColor = Color(0, 3.294, 0.36474502, 1) +layers = [SubResource("Resource_ls0y1"), SubResource("Resource_kf5m1"), SubResource("Resource_sx8ta"), SubResource("Resource_y13uk"), SubResource("Resource_2kjxc"), SubResource("Resource_lniih"), SubResource("Resource_do1r7"), SubResource("Resource_0ta4h"), SubResource("Resource_vf81q"), SubResource("Resource_jfmlc"), SubResource("Resource_8f4np"), SubResource("Resource_6e10d")] +fading = SubResource("Resource_muoxm") +occlusion = SubResource("Resource_ghtjd") +metadata/_custom_type_script = "uid://bh37fg1dnc37s" diff --git a/Runtime/VFX/FlareVFX/FlareVFXPresets/Red Orange Classic.tres b/Runtime/VFX/FlareVFX/FlareVFXPresets/Red Orange Classic.tres new file mode 100644 index 0000000..0ebfe13 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareVFXPresets/Red Orange Classic.tres @@ -0,0 +1,762 @@ +[gd_resource type="Resource" script_class="FlarePreset" load_steps=105 format=3 uid="uid://dp4g3uk1vgdg5"] + +[ext_resource type="Script" uid="uid://dmswtuayeoagf" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareChromaticAberation/OrientatedFlareChromaticAberation.cs" id="1_ho1cr"] +[ext_resource type="Script" uid="uid://c67s0ccpomg2s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs" id="2_lw24a"] +[ext_resource type="Script" uid="uid://btuv7v342v3k6" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/TextureFlareType.cs" id="3_jqj56"] +[ext_resource type="Script" uid="uid://4pdr2urse51u" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs" id="3_lw24a"] +[ext_resource type="Script" uid="uid://u3g0mlwlpd6s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareLayer.cs" id="4_1hsao"] +[ext_resource type="Script" uid="uid://0epjgkk6qmhy" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs" id="5_vwre4"] +[ext_resource type="Script" uid="uid://dk8t1ljh3jroo" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs" id="6_n8bve"] +[ext_resource type="Script" uid="uid://bmcf4qxpqs8mb" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs" id="7_vca25"] +[ext_resource type="Script" uid="uid://8ca7d84rikb7" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs" id="8_isc3e"] +[ext_resource type="Script" uid="uid://d1t1a1ki176ii" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs" id="9_fgdle"] +[ext_resource type="Script" uid="uid://bq2hh5ledvviu" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs" id="10_y3020"] +[ext_resource type="Script" uid="uid://bh37fg1dnc37s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlarePreset.cs" id="11_xbxy4"] + +[sub_resource type="Resource" id="Resource_1cx3l"] +script = ExtResource("1_ho1cr") +orientation = 1 +amount = 21.0429 +smear = 30.8889 +offsetR = -0.3039 +offsetB = 0.1165 +metadata/_custom_type_script = "uid://dmswtuayeoagf" + +[sub_resource type="Resource" id="Resource_jpti0"] +script = ExtResource("2_lw24a") +sizeAmount = 0.3216 +metadata/_custom_type_script = "uid://c67s0ccpomg2s" + +[sub_resource type="Resource" id="Resource_jqj56"] +script = ExtResource("3_lw24a") +blendMode = 1 +metadata/_custom_type_script = "uid://4pdr2urse51u" + +[sub_resource type="Resource" id="Resource_1hsao"] +script = ExtResource("5_vwre4") +shapeType = 0 +shapeOpacityInnerBorder = -0.0341 +shapeOpacityOuterBorder = 0.2151 +shapeOpacityBorderOffset = -0.4702 +shapeOpacityBorderSpread = -0.0137 +shapeOpacityDistribution = 3.6575 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -0.4921 +shapeColorMappingBorderSpread = 0.3548 +shapeColorMappingDistribution = 1.0165 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_8vqmt"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_lrl2b"] +curve = SubResource("Curve_8vqmt") + +[sub_resource type="Resource" id="Resource_vwre4"] +script = ExtResource("4_1hsao") +layerName = "Backblend" +opacity = 0.4631 +flareType = SubResource("Resource_1hsao") +opacityCurvePerLayer = SubResource("CurveTexture_lrl2b") +tint = Color(0.27730417, 0.27730417, 0.27730417, 1) +temparatureShift = -70.7505 +saturationShift = 15.3846 +lighntessShift = -10.0 +size = 50.0 +sizeScale = 0.8392 +blendMode = SubResource("Resource_jqj56") +renderPriority = -1 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_ade2u"] +offsets = PackedFloat32Array(0, 0.4732143, 0.59821427, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0.0714286, 1, 1, 1, 0.008474581, 1, 1, 1, 0) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_x0p8u"] +gradient = SubResource("Gradient_ade2u") +fill = 1 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(1, 0.4957265) + +[sub_resource type="Resource" id="Resource_krf45"] +script = ExtResource("3_jqj56") +texture = SubResource("GradientTexture2D_x0p8u") +textureUVScale = 4.0 +maskUVScale = 4.0 +metadata/_custom_type_script = "uid://btuv7v342v3k6" + +[sub_resource type="Curve" id="Curve_a4g6s"] +_data = [Vector2(0, 1), 0.0, -1.0, 0, 1, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_xxny3"] +curve = SubResource("Curve_a4g6s") + +[sub_resource type="Resource" id="Resource_nuxa8"] +script = ExtResource("4_1hsao") +layerName = "Core" +flareType = SubResource("Resource_krf45") +overwriteColor = Color(2.343, 2.343, 2.343, 1) +overwriteAmount = 0.2568 +opacityCurvePerLayer = SubResource("CurveTexture_xxny3") +tint = Color(4.8530827, 4.8530827, 4.8530827, 1) +lighntessShift = -10.3896 +size = 4.0 +sizeScale = 0.6026 +randomScaleMin = 0.6503 +randomScaleMax = 2.0 +screenOffsetLayerScale = 0.153 +screenOffsetLayerDirection = Vector2(1, 1) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_xxny3"] +script = ExtResource("2_lw24a") +power = 2.0 +sizeAmount = 0.0 +metadata/_custom_type_script = "uid://c67s0ccpomg2s" + +[sub_resource type="Resource" id="Resource_adfmi"] +script = ExtResource("5_vwre4") +shapeType = 5 +shapeOpacityOuterBorder = 0.0692 +shapeOpacityBorderOffset = -0.2154 +shapeOpacityBorderSpread = -0.0317 +shapeColorMappingInnerBorder = -0.1913 +shapeColorMappingOuterBorder = 0.623 +shapeColorMappingBorderOffset = -0.255 +innerTemparatureOffset = 10.1791 +innerLightnessOffset = 0.1923 +innerOpacity = 0.0181 +outerTemparatureOffset = -33.2308 +outerSaturationOffset = 100.0 +outerLightnessOffset = 81.8721 +outerOpacity = 0.225 +noiseAmount = 1.0 +noiseScale = 2.6244 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_nt8a7"] +_data = [Vector2(0, 0), 0.0, 2.2291045, 0, 1, Vector2(0.27371275, 0.61013436), 1.5357342, 1.5357342, 0, 0, Vector2(0.51282054, 0.052631617), 0.0, 0.0, 0, 0, Vector2(0.74254745, 0.07911062), -1.3894734, -1.3894734, 0, 0, Vector2(1, 0), -0.30728236, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_0y4dn"] +curve = SubResource("Curve_nt8a7") + +[sub_resource type="Resource" id="Resource_ade2u"] +script = ExtResource("4_1hsao") +layerName = "Big Hexagons" +opacity = 0.1879 +numLayers = 8 +flareType = SubResource("Resource_adfmi") +minHueRandom = -62.945 +maxHueRandom = 74.9895 +opacityCurvePerLayer = SubResource("CurveTexture_0y4dn") +saturationShift = 100.0 +size = 8.986 +sizeScale = 0.3341 +worldSize_vs_screenSize = 0.5896 +randomScaleMin = 0.9167 +randomScaleMax = 1.6866 +overwriteExtension = true +extension = 3.3824 +screenOffsetStaticScale = 0.0128 +screenOffsetStaticDirection = Vector2(-2, -2) +screenOffsetLayerScale = 0.0072 +screenOffsetLayerDirection = Vector2(100, 100) +rotationOverX = 45.0 +rotationPerLayer = -2.0 +fading = SubResource("Resource_xxny3") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_0y4dn"] +script = ExtResource("5_vwre4") +shapeType = 0 +shapeScale = 1.0 +shapeOpacityOuterBorder = 0.0692 +shapeOpacityBorderOffset = -0.2994 +shapeOpacityBorderSpread = -0.0297 +shapeOpacityDistribution = 5.2471 +shapeColorMappingInnerBorder = -0.1913 +innerTemparatureOffset = 30.4291 +innerSaturationOffset = 5.3192 +innerLightnessOffset = 7.6923 +outerTemparatureOffset = -33.2308 +outerSaturationOffset = 98.4615 +outerLightnessOffset = -16.9231 +noiseAmount = 1.0 +noiseScale = 2.182 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_ymqbv"] +_data = [Vector2(0, 0), 0.0, 1.7192984, 0, 1, Vector2(0.21428572, 0.36842108), 1.7263157, 1.7263157, 0, 0, Vector2(0.45, 1), 0.0, 0.0, 0, 0, Vector2(0.7285714, 0.42105263), -0.7114339, -0.7114339, 0, 0, Vector2(1, 0), -1.5512465, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_7owh2"] +curve = SubResource("Curve_ymqbv") + +[sub_resource type="Resource" id="Resource_jvxnt"] +script = ExtResource("4_1hsao") +layerName = "Small Circles" +opacity = 0.3343 +numLayers = 50 +flareType = SubResource("Resource_0y4dn") +minHueRandom = -45.0 +maxHueRandom = 20.0 +opacityCurvePerLayer = SubResource("CurveTexture_7owh2") +tint = Color(0.54901963, 0.54901963, 0.54901963, 1) +saturationShift = -10.5882 +lighntessShift = 12.3529 +size = 1.3905 +sizeScale = 0.4618 +worldSize_vs_screenSize = 0.5896 +randomScaleMin = 0.019 +randomScaleMax = 1.572 +screenOffsetStaticScale = 0.0 +screenOffsetStaticDirection = Vector2(-5, -5) +screenOffsetLayerScale = 0.2785 +screenOffsetLayerDirection = Vector2(4, 4) +rotationOverX = 45.0 +rotationOverY = 180.0 +rotationPerLayer = -2.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Curve" id="Curve_0y4dn"] +_data = [Vector2(0, 0), 0.0, -0.07258064, 0, 0, Vector2(0.27469137, 1), 0.0, 0.0, 0, 0, Vector2(0.7407407, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.18409093, 0.0, 0, 0] +point_count = 4 + +[sub_resource type="CurveTexture" id="CurveTexture_ymqbv"] +curve = SubResource("Curve_0y4dn") + +[sub_resource type="Curve" id="Curve_7owh2"] +_data = [Vector2(0, 1), 0.0, -4.7460933, 0, 1, Vector2(0.14814815, 0.296875), -2.2600446, -2.2600446, 0, 0, Vector2(0.47839507, 0), -0.066611856, -0.066611856, 0, 0, Vector2(0.63580245, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_adfmi"] +curve = SubResource("Curve_7owh2") + +[sub_resource type="Resource" id="Resource_k3n7u"] +script = ExtResource("6_n8bve") +shapeScaleRange = 0.5 +radialMaskTexture = SubResource("CurveTexture_adfmi") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_ymqbv") +conicMaskTile = 2.0 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_027rg"] +script = ExtResource("4_1hsao") +layerName = "Streaks" +opacity = 0.1873 +numLayers = 3 +flareType = SubResource("Resource_k3n7u") +overwriteColor = Color(2.385, 0.24872369, 0, 1) +opacityCurvePerLayer = SubResource("CurveTexture_xxny3") +temparatureShift = 34.56 +size = 100.0 +sizeScale = 0.0912 +sizeYScale = 0.0365 +randomScaleMin = 0.424 +randomScaleMax = 0.664 +screenOffsetStaticScale = 0.0 +screenOffsetLayerScale = 0.0 +screenOffsetLayerDirection = Vector2(1, 1) +rotation = 90.0 +rotationOverX = 20.0 +rotationPerLayer = 60.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_ayqen"] +script = ExtResource("7_vca25") +opacity = 3.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_ade2u"] +frequency = 0.0439 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_x0p8u"] +width = 32 +height = 1 +noise = SubResource("FastNoiseLite_ade2u") +seamless = true +seamless_blend_skirt = 0.118 + +[sub_resource type="Curve" id="Curve_5q01g"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_krf45"] +width = 32 +texture_mode = 1 +curve = SubResource("Curve_5q01g") + +[sub_resource type="Gradient" id="Gradient_a4g6s"] +offsets = PackedFloat32Array(0.06666667, 0.37435898) +colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 0) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_xxny3"] +gradient = SubResource("Gradient_a4g6s") +width = 8 + +[sub_resource type="Resource" id="Resource_ui5ll"] +script = ExtResource("6_n8bve") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_xxny3") +radialFillOffset = 0.0 +radialFillRepeat = true +conicFillTexture = SubResource("NoiseTexture2D_x0p8u") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("GradientTexture1D_xxny3") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_krf45") +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_008mr"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_jxdri"] +curve = SubResource("Curve_008mr") + +[sub_resource type="Resource" id="Resource_nt8a7"] +script = ExtResource("4_1hsao") +layerName = "Blend" +opacity = 0.0141 +flareType = SubResource("Resource_ui5ll") +overwriteColor = Color(1.8247963, 1.8247963, 1.8247963, 1) +overwriteAmount = 0.6638 +opacityCurvePerLayer = SubResource("CurveTexture_jxdri") +saturationShift = -89.4437 +lighntessShift = 37.2645 +size = 100.0 +sizeScale = 0.2665 +worldSize_vs_screenSize = 0.5 +screenOffsetStaticScale = 0.0 +screenOffsetStaticDirection = Vector2(-5, -5) +rotationOverX = 30.0 +fading = SubResource("Resource_ayqen") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_6y0r4"] +script = ExtResource("8_isc3e") +amount = 0.0 +steps = 0 +smear = 1.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_yynim"] +script = ExtResource("9_fgdle") +innerHsl = Vector4(0.18, 0, 0.0645, 3) +outerHsl = Vector4(-0.0435, 0, 0, 0) +colorFillRange = 1.4581 +colorFillDistributionPower = 0.2851 +streaksFrequency = 6.876 +streaksRotationSpeed = 0.0125 +streaksNoise = 0.01 +streaksNoiseScroll = 0.0155 +streaks2Enabled = true +streaks2Multiply = 0.548 +streaksFrequency2 = 6.5131 +streaksRotationSpeed2 = 0.01 +streaksNoise2 = 0.11 +streaksNoiseScroll2 = 0.0365 +maskScale = 0.2322 +maskRange = 1.2003 +maskInnerSize = 1.6943 +maskFrequency = 1.3986 +maskRotationSpeed = -0.003 +noiseAmount = 1.0 +noiseScale = 1.9275 +metadata/_custom_type_script = "uid://d1t1a1ki176ii" + +[sub_resource type="Curve" id="Curve_4qtqc"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_tn5uv"] +curve = SubResource("Curve_4qtqc") + +[sub_resource type="Resource" id="Resource_6kf7p"] +script = ExtResource("4_1hsao") +layerName = "Star" +opacity = 0.1 +flareType = SubResource("Resource_yynim") +opacityCurvePerLayer = SubResource("CurveTexture_tn5uv") +size = 20.0 +sizeScale = 0.152 +rotationOverX = -20.0 +chromaticAberation = SubResource("Resource_6y0r4") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_4qtqc"] +script = ExtResource("7_vca25") +fading = 0.0 +opacity = 1.0 +sizeX = 0.0 +sizeY = 0.6289 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_gwku0"] +script = ExtResource("5_vwre4") +shapeType = 0 +shapeOpacityBorderOffset = 0.0992 +shapeOpacityBorderSpread = 0.6013 +shapeOpacityDistribution = 3.1273 +shapeColorMappingInnerBorder = -0.5455 +shapeColorMappingOuterBorder = 0.1983 +outerOpacity = 0.0 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_fy8er"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_ls5mq"] +curve = SubResource("Curve_fy8er") + +[sub_resource type="Resource" id="Resource_8vqmt"] +script = ExtResource("4_1hsao") +layerName = "Big Horizontal Streak" +opacity = 0.0227 +flareType = SubResource("Resource_gwku0") +opacityCurvePerLayer = SubResource("CurveTexture_ls5mq") +temparatureShift = 8.4706 +saturationShift = -68.8168 +size = 1000.0 +sizeScale = 0.075 +sizeYScale = 0.0765 +screenSizeScale = 0.616 +fading = SubResource("Resource_4qtqc") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_lrl2b"] +script = ExtResource("7_vca25") +fading = 0.0798 +opacity = 1.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Gradient" id="Gradient_e2s3r"] +offsets = PackedFloat32Array(0.1550152, 0.4863222, 0.6018237, 0.8753799) +colors = PackedColorArray(1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_uhxun"] +gradient = SubResource("Gradient_e2s3r") +fill_from = Vector2(1, 0) +fill_to = Vector2(0, 0) + +[sub_resource type="Gradient" id="Gradient_4rdwj"] +offsets = PackedFloat32Array(0.39209726, 0.60790277, 0.7112462, 0.8145897, 0.89361703, 0.9513678, 1) +colors = PackedColorArray(1, 0.43423486, 0.43423486, 0, 0.9616289, 0.5124353, 0.5726143, 0.09411765, 1.102819, 0.78434074, 0.5605453, 0.15686275, 0.8615009, 1.0505337, 0.79985976, 1, 0.5803922, 0.80784315, 1, 0.5019608, 0.5231823, 0.53739774, 0.9141083, 0.16862746, 0.52630603, 0.6414788, 1, 0) + +[sub_resource type="GradientTexture2D" id="GradientTexture2D_jyu1d"] +gradient = SubResource("Gradient_4rdwj") +width = 512 +height = 512 +fill = 1 +fill_from = Vector2(0.5, 0.5) +fill_to = Vector2(1, 0.5) + +[sub_resource type="Resource" id="Resource_msay1"] +script = ExtResource("3_jqj56") +texture = SubResource("GradientTexture2D_jyu1d") +mask = SubResource("GradientTexture2D_uhxun") +maskRepeat = true +noiseAmount = 0.1915 +noiseScale = 24.5436 +metadata/_custom_type_script = "uid://btuv7v342v3k6" + +[sub_resource type="Curve" id="Curve_a5aan"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_6jyri"] +curve = SubResource("Curve_a5aan") + +[sub_resource type="Resource" id="Resource_rjwbk"] +script = ExtResource("4_1hsao") +layerName = "Rainbow Glow" +opacity = 0.0625 +numLayers = 2 +flareType = SubResource("Resource_msay1") +overwriteColor = Color(1.353256, 1.353256, 1.353256, 1) +overwriteAmount = 0.8494 +opacityCurvePerLayer = SubResource("CurveTexture_6jyri") +size = 50.0 +sizeScale = 0.7135 +randomScaleMin = 0.3021 +randomScaleMax = 2.0 +overwriteExtension = true +extension = 2.1267 +screenOffsetStaticScale = 0.01 +screenOffsetStaticDirection = Vector2(5, 5) +screenOffsetLayerScale = 0.01 +screenOffsetLayerDirection = Vector2(-10, -10) +rotation = -13.125 +rotationOverX = -25.0 +rotationPerLayer = 90.0 +fading = SubResource("Resource_lrl2b") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_mwjfi"] +script = ExtResource("8_isc3e") +direction = Vector2(0, -1) +amount = 0.2772 +smear = 10.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_auf4m"] +script = ExtResource("7_vca25") +fading = 0.0 +opacity = 1.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Gradient" id="Gradient_oytpb"] +offsets = PackedFloat32Array(0.33596838, 0.47826087, 0.5217391, 0.66007906) +colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_yynim"] +gradient = SubResource("Gradient_oytpb") + +[sub_resource type="Curve" id="Curve_tn5uv"] +_data = [Vector2(0, 1), 0.0, -2.850001, 0, 1, Vector2(0.105263144, 0.6999999), 0.86363685, 0.86363685, 0, 0, Vector2(0.16491227, 0.82727265), 0.0, 0.0, 0, 0, Vector2(0.25614032, 1), 0.0, 0.0, 0, 0, Vector2(0.28070173, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.32280698, 0.5454545), 0.0, 0.0, 0, 0, Vector2(0.38947368, 0.8454545), 0.0, 0.0, 0, 0, Vector2(0.44912276, 0.6636363), 0.0, 0.0, 0, 0, Vector2(0.48771927, 0.8818182), 0.0, 0.0, 0, 0, Vector2(0.522807, 0.3454545), 0.0, 0.0, 0, 0, Vector2(0.6277372, 1), 0.0, 0.0, 0, 0, Vector2(0.6561403, 0.80909085), 0.0, 0.0, 0, 0, Vector2(0.70175433, 0.99090904), 0.0, 0.0, 0, 0, Vector2(0.78596485, 0.43636358), 2.4122248, 2.4122248, 0, 0, Vector2(0.81754386, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.88070166, 0.59090906), 0.0, 0.0, 0, 0, Vector2(0.9263158, 0.8909091), 0.0, 0.0, 0, 0, Vector2(0.9614035, 0.43636358), 0.0, 0.0, 0, 0, Vector2(1, 1), 14.6033, 0.0, 1, 0] +point_count = 19 + +[sub_resource type="CurveTexture" id="CurveTexture_027rg"] +texture_mode = 1 +curve = SubResource("Curve_tn5uv") + +[sub_resource type="Gradient" id="Gradient_gwku0"] +offsets = PackedFloat32Array(0, 0.13833992, 0.2952381, 0.4857143, 0.6482214, 0.8577075, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0, 1, 0.14311719, 1, 0, 1, 0, 1, 0.9274306, 1, 0, 0.117609024, 1, 1, 1, 0, 0.8233118, 1, 1, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_fy8er"] +gradient = SubResource("Gradient_gwku0") + +[sub_resource type="Curve" id="Curve_ls5mq"] +_data = [Vector2(0.16842104, 0), 0.0, 0.0, 0, 0, Vector2(0.3087719, 0), 0.0, 1.1720778, 1, 0, Vector2(0.4561403, 0.17272723), 5.1818166, 5.1818166, 0, 0, Vector2(0.47368416, 1), 0.0, 0.0, 0, 0, Vector2(0.49122807, 0), 0.0, 0.0, 0, 0, Vector2(0.99999, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 7 + +[sub_resource type="CurveTexture" id="CurveTexture_1ntwo"] +texture_mode = 1 +curve = SubResource("Curve_ls5mq") + +[sub_resource type="Resource" id="Resource_eguri"] +script = ExtResource("6_n8bve") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_fy8er") +radialFillTile = 3.8395 +radialFillOffset = 0.2245 +radialFillRepeat = true +conicFillTexture = SubResource("GradientTexture1D_yynim") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_1ntwo") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_027rg") +conicMaskTile = 34.0 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_6kf7p"] +_data = [Vector2(0, 0), 0.0, 4.7777777, 0, 1, Vector2(0.20930234, 1), 0.0, 0.0, 0, 0, Vector2(0.60465115, 0.3440367), 0.0, 0.0, 0, 0, Vector2(0.71428573, 1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_6xf1f"] +curve = SubResource("Curve_6kf7p") + +[sub_resource type="Resource" id="Resource_1jlm7"] +script = ExtResource("4_1hsao") +layerName = "Partial Rainbow Rings 1" +opacity = 0.0223 +numLayers = 3 +flareType = SubResource("Resource_eguri") +overwriteColor = Color(3.4864159, 3.4864159, 3.4864159, 1) +overwriteAmount = 0.8476 +opacityCurvePerLayer = SubResource("CurveTexture_6xf1f") +size = 20.0 +sizeScale = 0.5576 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.7532 +randomScaleMax = 1.5185 +overwriteExtension = true +extension = 1.935 +screenOffsetLayerScale = 0.2792 +screenOffsetLayerDirection = Vector2(0.0555, 0.0235) +rotation = 149.5689 +rotationOverX = 20.0 +rotationPerLayer = 8.1819 +fading = SubResource("Resource_auf4m") +chromaticAberation = SubResource("Resource_mwjfi") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_xm31l"] +script = ExtResource("8_isc3e") +direction = Vector2(0, -1) +amount = 0.2772 +smear = 10.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_o68fw"] +script = ExtResource("7_vca25") +fading = 0.0 +opacity = 1.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Curve" id="Curve_lrl2b"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_e2s3r"] +curve = SubResource("Curve_lrl2b") + +[sub_resource type="Resource" id="Resource_0xhst"] +script = ExtResource("4_1hsao") +layerName = "Partial Rainbow Rings 2" +opacity = 0.0313 +numLayers = 2 +flareType = SubResource("Resource_eguri") +overwriteColor = Color(3.4864159, 3.4864159, 3.4864159, 1) +overwriteAmount = 0.869 +opacityCurvePerLayer = SubResource("CurveTexture_e2s3r") +size = 20.0 +sizeScale = 0.5837 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.7532 +randomScaleMax = 1.5185 +overwriteExtension = true +extension = 1.935 +screenOffsetLayerScale = 0.2792 +screenOffsetLayerDirection = Vector2(0.0555, 0.0235) +rotation = -79.522 +rotationOverX = 20.0 +rotationPerLayer = 8.1819 +fading = SubResource("Resource_o68fw") +chromaticAberation = SubResource("Resource_xm31l") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_5ghy1"] +script = ExtResource("4_1hsao") +layerName = "Partial Rainbow Rings 3" +opacity = 0.0268 +numLayers = 3 +flareType = SubResource("Resource_eguri") +overwriteColor = Color(3.4864159, 3.4864159, 3.4864159, 1) +overwriteAmount = 0.9726 +opacityCurvePerLayer = SubResource("CurveTexture_6xf1f") +size = 20.0 +sizeScale = 0.526 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.7532 +randomScaleMax = 1.5185 +overwriteExtension = true +extension = 1.935 +screenOffsetLayerScale = 0.2792 +screenOffsetLayerDirection = Vector2(0.0555, 0.0235) +rotation = 32.6858 +rotationOverX = 20.0 +rotationPerLayer = 8.1819 +fading = SubResource("Resource_auf4m") +chromaticAberation = SubResource("Resource_mwjfi") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_1u4wg"] +script = ExtResource("7_vca25") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_4qtqc"] + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_tn5uv"] +height = 1 +noise = SubResource("FastNoiseLite_4qtqc") + +[sub_resource type="FastNoiseLite" id="FastNoiseLite_027rg"] +frequency = 0.0646 + +[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_6kf7p"] +noise = SubResource("FastNoiseLite_027rg") + +[sub_resource type="Gradient" id="Gradient_fy8er"] +offsets = PackedFloat32Array(0, 0.28521127, 0.47887325, 0.6866197, 1) +colors = PackedColorArray(1, 1, 1, 1, 1, 0.4605409, 0.4605409, 1, 0.75361896, 1, 0.64468336, 1, 0.5460356, 0.71885765, 1, 1, 1, 1, 1, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_ls5mq"] +gradient = SubResource("Gradient_fy8er") + +[sub_resource type="Curve" id="Curve_1ntwo"] +_data = [Vector2(0, 0), 0.0, 1.1375841, 0, 1, Vector2(0.43354434, 0.49319315), 0.0, 0.0, 0, 0, Vector2(0.5379747, 1), 0.0, 0.0, 0, 0, Vector2(0.74367094, 0.7827971), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.84735966, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_8vqmt"] +curve = SubResource("Curve_1ntwo") + +[sub_resource type="Resource" id="Resource_sxovr"] +script = ExtResource("6_n8bve") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_ls5mq") +radialFillTile = 40.0 +radialFillOffset = 0.0 +radialFillRepeat = true +conicFillTexture = SubResource("NoiseTexture2D_tn5uv") +conicFillTile = 4.0 +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_8vqmt") +radialMaskTile = 5.0 +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("NoiseTexture2D_6kf7p") +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_6xf1f"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_gwku0"] +curve = SubResource("Curve_6xf1f") + +[sub_resource type="Resource" id="Resource_skhw3"] +script = ExtResource("4_1hsao") +layerName = "Rainbow Streaks" +opacity = 0.1 +flareType = SubResource("Resource_sxovr") +overwriteColor = Color(2.8845115, 2.8845115, 2.8845115, 1) +overwriteAmount = 0.5914 +opacityCurvePerLayer = SubResource("CurveTexture_gwku0") +size = 200.0 +rotationOverX = 60.0588 +rotationPerLayer = 90.0 +fading = SubResource("Resource_1u4wg") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_x0p8u"] +script = ExtResource("10_y3020") +zOffset = 0.5735 +toSize = 0.0 + +[resource] +script = ExtResource("11_xbxy4") +mainColor = Color(5.111, 0.77415204, 0, 1) +scale = 0.423 +layers = [SubResource("Resource_vwre4"), SubResource("Resource_nuxa8"), SubResource("Resource_ade2u"), SubResource("Resource_jvxnt"), SubResource("Resource_027rg"), SubResource("Resource_nt8a7"), SubResource("Resource_6kf7p"), SubResource("Resource_8vqmt"), SubResource("Resource_rjwbk"), SubResource("Resource_1jlm7"), SubResource("Resource_0xhst"), SubResource("Resource_5ghy1"), SubResource("Resource_skhw3")] +fading = SubResource("Resource_jpti0") +chromaticAberation = SubResource("Resource_1cx3l") +occlusion = SubResource("Resource_x0p8u") +metadata/_custom_type_script = "uid://bh37fg1dnc37s" diff --git a/Runtime/VFX/FlareVFX/FlareVFXPresets/Yellow Pink Magic.tres b/Runtime/VFX/FlareVFX/FlareVFXPresets/Yellow Pink Magic.tres new file mode 100644 index 0000000..b116d12 --- /dev/null +++ b/Runtime/VFX/FlareVFX/FlareVFXPresets/Yellow Pink Magic.tres @@ -0,0 +1,484 @@ +[gd_resource type="Resource" script_class="FlarePreset" load_steps=63 format=3 uid="uid://b8bn6q2k5xst2"] + +[ext_resource type="Script" uid="uid://c67s0ccpomg2s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/EdgeFlareFading.cs" id="1_2c7vk"] +[ext_resource type="Script" uid="uid://4pdr2urse51u" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareBlendMode/FlareBlendMode.cs" id="2_fdn3e"] +[ext_resource type="Script" uid="uid://0epjgkk6qmhy" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/SDFShapeFlareType.cs" id="3_0rwfh"] +[ext_resource type="Script" uid="uid://u3g0mlwlpd6s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareLayer.cs" id="4_cofyw"] +[ext_resource type="Script" uid="uid://dk8t1ljh3jroo" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/EllipseFlareType.cs" id="5_kqbbs"] +[ext_resource type="Script" uid="uid://d1t1a1ki176ii" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareType/StarFlareType.cs" id="6_plntr"] +[ext_resource type="Script" uid="uid://8ca7d84rikb7" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareChromaticAberation/DirectionalFlareChromaticAberation.cs" id="7_rnjrr"] +[ext_resource type="Script" uid="uid://bmcf4qxpqs8mb" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareFading/ParametricFlareFading.cs" id="8_0bwjo"] +[ext_resource type="Script" uid="uid://bq2hh5ledvviu" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlareOcclusion/FadingFlareOcclusion.cs" id="9_h3mug"] +[ext_resource type="Script" uid="uid://bh37fg1dnc37s" path="res://addons/rokojori_action_library/Runtime/VFX/FlareVFX/FlarePreset.cs" id="10_6jecp"] + +[sub_resource type="Resource" id="Resource_2c7vk"] +script = ExtResource("1_2c7vk") + +[sub_resource type="Resource" id="Resource_0rwfh"] +script = ExtResource("2_fdn3e") +blendMode = 1 +metadata/_custom_type_script = "uid://4pdr2urse51u" + +[sub_resource type="Resource" id="Resource_cofyw"] +script = ExtResource("3_0rwfh") +shapeType = 0 +shapeOpacityInnerBorder = -0.0341 +shapeOpacityOuterBorder = 0.0641 +shapeOpacityBorderOffset = -0.351 +shapeOpacityBorderSpread = 0.032 +shapeOpacityDistribution = 2.0697 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -1.6144 +shapeColorMappingBorderSpread = 1.1346 +shapeColorMappingDistribution = 1.0165 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_kqbbs"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_plntr"] +curve = SubResource("Curve_kqbbs") + +[sub_resource type="Resource" id="Resource_rnjrr"] +script = ExtResource("4_cofyw") +layerName = "Backblend" +opacity = 0.5268 +flareType = SubResource("Resource_cofyw") +opacityCurvePerLayer = SubResource("CurveTexture_plntr") +tint = Color(0.27730417, 0.27730417, 0.27730417, 1) +hueShift = -110.7693 +saturationShift = 100.0 +lighntessShift = -28.466 +size = 50.0 +sizeScale = 0.1748 +blendMode = SubResource("Resource_0rwfh") +renderPriority = -3 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_kqbbs"] +script = ExtResource("2_fdn3e") +blendMode = 1 +metadata/_custom_type_script = "uid://4pdr2urse51u" + +[sub_resource type="Resource" id="Resource_plntr"] +script = ExtResource("6_plntr") +innerHsl = Vector4(-0.048, 0, 0, 1) +outerHsl = Vector4(0.376, 0, 0, 1) +colorFillRange = 4.1896 +colorFillDistributionPower = 0.6902 +streaksFrequency = 1.3855 +streaksNoise = 0.014 +streaksNoiseScroll = 0.0185 +streaks2Enabled = true +streaks2Multiply = 1.7214 +streaksFrequency2 = 2.7357 +streaksRotationSpeed2 = 0.0085 +streaksNoise2 = 0.0893 +streaksNoiseScroll2 = 0.097 +maskScale = 0.3353 +maskRange = 0.7043 +maskRangeOscillation = 0.1222 +maskRangeOscillationSpeed = 0.195 +maskFrequency = 0.3371 +maskRotationSpeed = 0.007 +metadata/_custom_type_script = "uid://d1t1a1ki176ii" + +[sub_resource type="Resource" id="Resource_h3mug"] +script = ExtResource("4_cofyw") +layerName = "Dark Star Streaks" +opacity = 0.3134 +flareType = SubResource("Resource_plntr") +hueShift = -128.3917 +saturationShift = 20.2797 +lighntessShift = -38.3683 +size = 10.0 +sizeScale = 0.2283 +blendMode = SubResource("Resource_kqbbs") +renderPriority = -2 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_0bwjo"] +script = ExtResource("3_0rwfh") +shapeType = 7 +shapeScale = 0.2902 +shapeOpacityOuterBorder = 0.2151 +shapeOpacityBorderOffset = -0.3764 +shapeOpacityBorderSpread = -0.0137 +shapeOpacityDistribution = 2.6863 +shapeColorMappingInnerBorder = 0.1252 +shapeColorMappingBorderOffset = -0.4921 +shapeColorMappingBorderSpread = 0.3548 +shapeColorMappingDistribution = 1.0165 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_h3mug"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_6jecp"] +curve = SubResource("Curve_h3mug") + +[sub_resource type="Resource" id="Resource_0hnx2"] +script = ExtResource("4_cofyw") +layerName = "Core" +flareType = SubResource("Resource_0bwjo") +opacityCurvePerLayer = SubResource("CurveTexture_6jecp") +tint = Color(1.1031533, 1.1031533, 1.1031533, 1) +temparatureShift = 30.8571 +saturationShift = -12.5714 +lighntessShift = 8.0 +size = 10.0 +sizeScale = 0.1347 +rotationOverX = -20.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_lqdtj"] +offsets = PackedFloat32Array(0, 0.116883114, 0.37662336, 0.48051947, 0.61904764) +colors = PackedColorArray(1.340301, 1.340301, 1.340301, 1, 0.75897336, 0.75897336, 0.75897336, 1, 0.10365856, 0.10365856, 0.10365856, 1, 0.04146342, 0.04146342, 0.04146342, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_d0gt7"] +gradient = SubResource("Gradient_lqdtj") + +[sub_resource type="Resource" id="Resource_xnvbt"] +script = ExtResource("5_kqbbs") +shapeScaleRange = 0.704 +radialFillOffset = 0.0 +radialMaskTexture = SubResource("GradientTexture1D_d0gt7") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskRepeat = true +noiseScale = 0.1 +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_cm8qu"] +script = ExtResource("4_cofyw") +layerName = "X Inner" +opacity = 0.122 +numLayers = 4 +flareType = SubResource("Resource_xnvbt") +size = 5.0 +sizeScale = 0.3084 +sizeXScale = 0.0297 +rotationOverX = -20.0 +rotationPerLayer = 60.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_05ijs"] +offsets = PackedFloat32Array(0, 0.21355931, 0.27457628, 0.3762712) +colors = PackedColorArray(1.340301, 1.340301, 1.340301, 1, 0.24107182, 0.24107182, 0.24107182, 1, 0.09117687, 0.09117687, 0.09117687, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_41fou"] +gradient = SubResource("Gradient_05ijs") + +[sub_resource type="Resource" id="Resource_est8w"] +script = ExtResource("5_kqbbs") +shapeScaleRange = 0.704 +radialMaskTexture = SubResource("GradientTexture1D_41fou") +radialMaskOffset = 0.0 +radialMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_e5ii3"] +script = ExtResource("4_cofyw") +layerName = "X Soft Warm Glow" +opacity = 0.1141 +numLayers = 4 +flareType = SubResource("Resource_est8w") +tint = Color(1, 1, 1, 0.20784314) +temparatureShift = 35.7559 +saturationShift = 99.8461 +size = 20.0 +sizeScale = 0.1078 +sizeXScale = 0.1809 +rotationOverX = -20.0 +rotationPerLayer = 60.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Gradient" id="Gradient_2qvql"] +offsets = PackedFloat32Array(0, 0.21355931, 0.27457628, 0.3762712) +colors = PackedColorArray(1.340301, 1.340301, 1.340301, 1, 0.24107182, 0.24107182, 0.24107182, 1, 0.09117687, 0.09117687, 0.09117687, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_v3po8"] +gradient = SubResource("Gradient_2qvql") + +[sub_resource type="Resource" id="Resource_0dbv4"] +script = ExtResource("5_kqbbs") +shapeScaleRange = 0.704 +radialMaskTexture = SubResource("GradientTexture1D_v3po8") +radialMaskOffset = 0.0 +radialMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Resource" id="Resource_284k4"] +script = ExtResource("4_cofyw") +layerName = "X Large Cold Glow" +opacity = 0.0979 +numLayers = 4 +flareType = SubResource("Resource_0dbv4") +tint = Color(1, 1, 1, 0.20784314) +temparatureShift = -96.6857 +saturationShift = 43.4286 +size = 20.0 +sizeScale = 0.2352 +sizeXScale = 0.0734 +screenOffsetStaticScale = 0.0059 +screenOffsetStaticDirection = Vector2(2, 2) +rotationOverX = -20.0 +rotationPerLayer = 60.0 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_jwcf1"] +script = ExtResource("6_plntr") +colorFillRange = 1.812 +streaksFrequency = 0.8675 +streaksNoise = 0.014 +streaksNoiseScroll = 0.0185 +streaks2Enabled = true +streaksAddVsMult = 1.0 +streaks2Multiply = 0.5703 +streaksFrequency2 = 2.045 +streaksRotationSpeed2 = 0.0085 +streaksNoise2 = 0.0893 +streaksNoiseScroll2 = 0.097 +maskScale = 0.2346 +maskRange = 0.9988 +maskRangeOscillation = 0.0 +maskRangeOscillationSpeed = 0.195 +maskInnerSize = 0.7266 +maskFrequency = 0.3371 +maskRotationSpeed = 0.007 +metadata/_custom_type_script = "uid://d1t1a1ki176ii" + +[sub_resource type="Resource" id="Resource_lniih"] +script = ExtResource("4_cofyw") +layerName = "Star Streaks" +opacity = 0.7651 +flareType = SubResource("Resource_jwcf1") +size = 10.0 +sizeScale = 0.2105 +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_wc8a0"] +script = ExtResource("3_0rwfh") +shapeType = 0 +shapeOpacityBorderOffset = -0.359 +shapeOpacityBorderSpread = 0.513 +shapeColorMappingInnerBorder = -0.0141 +shapeColorMappingOuterBorder = -0.197 +shapeColorMappingBorderOffset = -0.0585 +shapeColorMappingBorderSpread = 0.3613 +shapeColorMappingDistribution = 0.3915 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Resource" id="Resource_ic8oo"] +script = ExtResource("4_cofyw") +layerName = "Soft Bokeh" +opacity = 0.0758 +numLayers = 4 +flareType = SubResource("Resource_wc8a0") +minHueRandom = -10.0 +maxHueRandom = 10.0 +lighntessShift = 32.0 +size = 5.0 +sizeScale = 0.3287 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.3257 +randomScaleMax = 1.0686 +screenOffsetLayerScale = 0.2238 +screenOffsetLayerDirection = Vector2(-1.692, -0.866) +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_6jecp"] +script = ExtResource("8_0bwjo") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_htsq8"] +script = ExtResource("3_0rwfh") +shapeType = 0 +shapeOpacityBorderOffset = -0.359 +shapeOpacityBorderSpread = 0.659 +shapeColorMappingInnerBorder = -0.0141 +shapeColorMappingOuterBorder = -0.197 +shapeColorMappingBorderOffset = -0.0585 +shapeColorMappingBorderSpread = 0.3613 +shapeColorMappingDistribution = 0.3915 +innerOpacity = 0.5485 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Resource" id="Resource_isklh"] +script = ExtResource("4_cofyw") +layerName = "Soft Small Bokeh" +opacity = 0.0524 +numLayers = 12 +flareType = SubResource("Resource_htsq8") +minHueRandom = -40.0 +maxHueRandom = 40.0 +temparatureShift = 56.1902 +saturationShift = 6.9845 +lighntessShift = 7.5047 +size = 2.3055 +sizeScale = 0.535 +worldSize_vs_screenSize = 0.5 +randomScaleMin = 0.1428 +randomScaleMax = 1.5372 +screenOffsetStaticScale = 0.6857 +screenOffsetStaticDirection = Vector2(-0.1, -0.1) +screenOffsetLayerScale = 0.941 +screenOffsetLayerDirection = Vector2(-1.692, -0.866) +fading = SubResource("Resource_6jecp") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_y0f3q"] +script = ExtResource("7_rnjrr") +amount = 0.2772 +steps = 1 +smear = 1.0 +metadata/_custom_type_script = "uid://8ca7d84rikb7" + +[sub_resource type="Resource" id="Resource_c8uhk"] +script = ExtResource("8_0bwjo") +fading = 0.0 +opacity = 3.0 +sizeX = 0.0 +sizeY = 0.0 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Gradient" id="Gradient_vhomf"] +offsets = PackedFloat32Array(0, 0.47118643, 1) +colors = PackedColorArray(0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_fuuku"] +gradient = SubResource("Gradient_vhomf") + +[sub_resource type="Curve" id="Curve_pqom4"] +_data = [Vector2(0, 1), 0.0, -2.850001, 0, 1, Vector2(0.105263144, 0.6999999), 0.86363685, 0.86363685, 0, 0, Vector2(0.16491227, 0.82727265), 0.0, 0.0, 0, 0, Vector2(0.25614032, 1), 0.0, 0.0, 0, 0, Vector2(0.28070173, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.32280698, 0.5454545), 0.0, 0.0, 0, 0, Vector2(0.38947368, 0.8454545), 0.0, 0.0, 0, 0, Vector2(0.44912276, 0.6636363), 0.0, 0.0, 0, 0, Vector2(0.48771927, 0.8818182), 0.0, 0.0, 0, 0, Vector2(0.522807, 0.3454545), 0.0, 0.0, 0, 0, Vector2(0.6277372, 1), 0.0, 0.0, 0, 0, Vector2(0.6561403, 0.80909085), 0.0, 0.0, 0, 0, Vector2(0.70175433, 0.99090904), 0.0, 0.0, 0, 0, Vector2(0.78596485, 0.43636358), 2.4122248, 2.4122248, 0, 0, Vector2(0.81754386, 0.79999995), 0.0, 0.0, 0, 0, Vector2(0.88070166, 0.59090906), 0.0, 0.0, 0, 0, Vector2(0.9263158, 0.8909091), 0.0, 0.0, 0, 0, Vector2(0.9614035, 0.43636358), 0.0, 0.0, 0, 0, Vector2(1, 1), 14.6033, 0.0, 1, 0] +point_count = 19 + +[sub_resource type="CurveTexture" id="CurveTexture_rybtw"] +texture_mode = 1 +curve = SubResource("Curve_pqom4") + +[sub_resource type="Gradient" id="Gradient_7dec8"] +offsets = PackedFloat32Array(0, 0.13833992, 0.2952381, 0.4857143, 0.6482214, 0.8577075, 1) +colors = PackedColorArray(1, 0, 0, 1, 1, 1, 0, 1, 0.14311719, 1, 0, 1, 0, 1, 0.9274306, 1, 0, 0.117609024, 1, 1, 1, 0, 0.8233118, 1, 1, 0, 0, 1) + +[sub_resource type="GradientTexture1D" id="GradientTexture1D_2nhy6"] +gradient = SubResource("Gradient_7dec8") + +[sub_resource type="Curve" id="Curve_wryug"] +_data = [Vector2(0, 0), 0.0, 0.0, 0, 0, Vector2(0.26996198, 0), 0.0, 0.0, 0, 0, Vector2(0.33079848, 0.2688753), 0.62385446, 0.62385446, 0, 0, Vector2(0.39163497, 1), 0.0, 0.0, 0, 0, Vector2(0.39164498, 0), 0.0, 0.0, 0, 0, Vector2(0.6450381, 0), 0.0, 0.0, 0, 0, Vector2(0.99999, 0), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0] +point_count = 8 + +[sub_resource type="CurveTexture" id="CurveTexture_o1sak"] +texture_mode = 1 +curve = SubResource("Curve_wryug") + +[sub_resource type="Resource" id="Resource_p4631"] +script = ExtResource("5_kqbbs") +shapeScaleRange = 0.5 +radialFillTexture = SubResource("GradientTexture1D_2nhy6") +radialFillTile = 2.0 +radialFillOffset = 0.186 +radialFillRepeat = true +conicFillTexture = SubResource("GradientTexture1D_fuuku") +conicFillOffset = 0.0 +conicFillRepeat = true +radialMaskTexture = SubResource("CurveTexture_o1sak") +radialMaskOffset = 0.0 +radialMaskRepeat = true +conicMaskTexture = SubResource("CurveTexture_rybtw") +conicMaskStrength = 0.244 +conicMaskTile = 24.0 +conicMaskOffset = 0.0 +conicMaskRepeat = true +metadata/_custom_type_script = "uid://dk8t1ljh3jroo" + +[sub_resource type="Curve" id="Curve_bn3ln"] +_data = [Vector2(0, 0), 0.0, 4.7777777, 0, 1, Vector2(0.20930234, 1), 0.0, 0.0, 0, 0, Vector2(0.60465115, 0.3440367), 0.0, 0.0, 0, 0, Vector2(0.71428573, 1), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 5 + +[sub_resource type="CurveTexture" id="CurveTexture_0ri68"] +curve = SubResource("Curve_bn3ln") + +[sub_resource type="Resource" id="Resource_06etu"] +script = ExtResource("4_cofyw") +layerName = "Partial Rainbow Rings 3" +opacity = 0.0752 +flareType = SubResource("Resource_p4631") +overwriteColor = Color(2.6346047, 2.7291539, 3.0382695, 1) +overwriteAmount = 1.0 +opacityCurvePerLayer = SubResource("CurveTexture_0ri68") +tint = Color(1.340301, 1.340301, 1.340301, 1) +lighntessShift = 43.3566 +size = 21.0855 +sizeScale = 0.1256 +sizeYScale = 0.6055 +screenOffsetStaticScale = 0.0 +screenOffsetStaticDirection = Vector2(1, 0) +screenOffsetLayerScale = 0.0 +screenOffsetLayerDirection = Vector2(-0.2005, -1) +rotation = 180.0 +fading = SubResource("Resource_c8uhk") +chromaticAberation = SubResource("Resource_y0f3q") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_iufr1"] +script = ExtResource("8_0bwjo") +fading = 0.0 +opacity = 1.0 +sizeX = 0.0 +sizeY = 0.6289 +metadata/_custom_type_script = "uid://bmcf4qxpqs8mb" + +[sub_resource type="Resource" id="Resource_0a53m"] +script = ExtResource("3_0rwfh") +shapeType = 0 +shapeScale = 0.4009 +shapeOpacityBorderOffset = -0.131 +shapeOpacityBorderSpread = 1.033 +shapeOpacityDistribution = 3.1293 +shapeColorMappingInnerBorder = -0.5455 +shapeColorMappingOuterBorder = 0.1983 +outerOpacity = 0.0 +metadata/_custom_type_script = "uid://0epjgkk6qmhy" + +[sub_resource type="Curve" id="Curve_yqvof"] +_data = [Vector2(0, 1), 0.0, 0.0, 0, 1, Vector2(1, 1), 0.0, 0.0, 1, 0] +point_count = 2 + +[sub_resource type="CurveTexture" id="CurveTexture_mcqlw"] +curve = SubResource("Curve_yqvof") + +[sub_resource type="Resource" id="Resource_jyn2q"] +script = ExtResource("4_cofyw") +layerName = "Big Horizontal Streak" +opacity = 0.0404 +flareType = SubResource("Resource_0a53m") +opacityCurvePerLayer = SubResource("CurveTexture_mcqlw") +temparatureShift = -51.949 +saturationShift = -1.6839 +size = 20.0 +sizeScale = 0.6224 +sizeXScale = 0.9021 +sizeYScale = 0.2099 +screenSizeScale = 0.616 +fading = SubResource("Resource_iufr1") +metadata/_custom_type_script = "uid://u3g0mlwlpd6s" + +[sub_resource type="Resource" id="Resource_fdn3e"] +script = ExtResource("9_h3mug") +toSize = 0.0 + +[resource] +script = ExtResource("10_6jecp") +mainColor = Color(3.2944162, 2.6594555, 0, 1) +scale = 0.8983 +layers = [SubResource("Resource_rnjrr"), SubResource("Resource_h3mug"), SubResource("Resource_0hnx2"), SubResource("Resource_cm8qu"), SubResource("Resource_e5ii3"), SubResource("Resource_284k4"), SubResource("Resource_lniih"), SubResource("Resource_ic8oo"), SubResource("Resource_isklh"), SubResource("Resource_06etu"), SubResource("Resource_jyn2q")] +fading = SubResource("Resource_2c7vk") +occlusion = SubResource("Resource_fdn3e") +metadata/_custom_type_script = "uid://bh37fg1dnc37s" diff --git a/Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs b/Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs deleted file mode 100644 index c617594..0000000 --- a/Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Godot; - - -namespace Rokojori -{ - [Tool] - [GlobalClass] - public abstract partial class FlareVFXLayer:Resource - { - public virtual int GetNumInstances() - { - return 1; - } - - public virtual void SetInstanceIndex( int index, float normalized ) - { - - } - - public abstract FlareVFXLayer Create( FlareVFX flareVFX ); - - public abstract void Update( FlareVFX flareVFX ); - - } -} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs.uid b/Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs.uid deleted file mode 100644 index cb656a7..0000000 --- a/Runtime/VFX/FlareVFX/Layers/FlareVFXLayer.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://b8kyy3yeh0bpt diff --git a/Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs b/Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs deleted file mode 100644 index 19286bf..0000000 --- a/Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs +++ /dev/null @@ -1,98 +0,0 @@ -using Godot; - - -namespace Rokojori -{ - [Tool] - [GlobalClass] - public partial class GlowFlareVFXLayer:FlareVFXLayer - { - [Export( PropertyHint.Range, "1, 1000" )] - public int numInstances = 1; - - [ExportGroup("Color")] - [Export] - public BoxedColorValue colorOverwrite; - - [Export] - public float opacity = 1f; - - [Export] - public CurveTexture opacityCurve = new CurveTexture().WithCurve( new Curve().WithValues( 1f, 1f ).WithLinearTangents() ); - - [ExportGroup("Size")] - - [Export] - public Vector2 size = Vector2.One; - - [Export] - public float sizeXY = 1f; - - [Export] - public float worldSizeScale = 1f; - [Export] - public float screenSizeScale = 1f; - - [Export( PropertyHint.Range, "0,1" )] - public float worldSize_vs_screenSize = 1f; - - [ExportGroup("Screen Offset")] - [Export] - public Vector2 screenOffset = Vector2.Zero; - [Export] - public Vector2 screenOffsetSpreadPerLayer = Vector2.Zero; - - MeshInstance3D mesh; - GlowFlareVFXLayer parent; - GlowFlareAddMaterial glowMaterial; - int _numInstances = 0; - - public override FlareVFXLayer Create( FlareVFX flareVFX ) - { - var clone = Duplicate() as GlowFlareVFXLayer; - - clone.mesh = flareVFX.GetContainer().CreateChild(); - clone._numInstances = numInstances; - clone.mesh.Mesh = MeshGeometry.UnitBillboardQuads( numInstances, 0f, 1f ).GenerateMesh(); - - clone.glowMaterial = new GlowFlareAddMaterial(); - clone.mesh.SetSurfaceOverrideMaterial( 0, clone.glowMaterial ); - - clone.parent = this; - - - - return clone; - } - - public override void Update( FlareVFX flareVFX ) - { - if ( _numInstances != parent.numInstances ) - { - _numInstances = parent.numInstances; - mesh.Mesh = MeshGeometry.UnitBillboardQuads( _numInstances, 0f, 1f ).GenerateMesh(); - - } - - glowMaterial.color.Set( parent.colorOverwrite !=null ? parent.colorOverwrite.GetColorValue() : flareVFX.preset.mainColor ); - - glowMaterial.opacity.Set( parent.opacity ); - glowMaterial.opacityCurve.Set( parent.opacityCurve ); - - var size = parent.size * parent.sizeXY; - glowMaterial.sizeX.Set( size.X ); - glowMaterial.sizeY.Set( size.Y ); - glowMaterial.worldSizeScale.Set( parent.worldSizeScale ); - glowMaterial.screenSizeScale.Set( parent.screenSizeScale ); - glowMaterial.worldSizeVsScreenSize.Set( parent.worldSize_vs_screenSize ); - - glowMaterial.screenOffsetScale.Set( parent.screenOffset ); - glowMaterial.screenOffsetLayerSpread.Set( parent.screenOffsetSpreadPerLayer ); - - - - - - } - } -} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs.uid b/Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs.uid deleted file mode 100644 index a758400..0000000 --- a/Runtime/VFX/FlareVFX/Layers/GlowFlareVFXLayer.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cs35ft8hb0dqy diff --git a/Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs b/Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs deleted file mode 100644 index fd6c906..0000000 --- a/Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs +++ /dev/null @@ -1,207 +0,0 @@ -using Godot; - - -namespace Rokojori -{ - [Tool] - [GlobalClass] - public partial class ShapeFlareVFXLayer:FlareVFXLayer - { - [Export( PropertyHint.Range, "1, 1000" )] - public int numInstances = 1; - - [ExportGroup("Color")] - [Export] - public BoxedColorValue colorOverwrite; - - [Export( PropertyHint.Range, "0.2,20")] - public float colorDistortion = 2f; - - [Export( PropertyHint.Range, "0.2,20")] - public float alphaDistortion= 2f; - - [Export] - public Vector4 centerHSLA = Vector4.Zero; - - [Export] - public Vector4 outsideHSLA = Vector4.Zero; - - - [Export] - public float minShapeDistanceColor = 0f; - - [Export] - public float maxShapeDistanceColor = 0.05f; - - [Export] - public float shapeDistanceOffsetColor = 0f; - - [Export] - public float shapeDistanceSpreadColor = 0.05f; - - - [Export] - public float minHueRandom = 0f; - - [Export] - public float maxHueRandom = 0f; - - [Export] - public float hueOffset = 0f; - - [Export] - public float hueSpread = 0f; - - - [Export] - public float opacity = 1f; - - [Export] - public CurveTexture opacityCurve = new CurveTexture().WithCurve( new Curve().WithValues( 1f, 1f ).WithLinearTangents() ); - - public enum ShapeType - { - Circle, - Cross, - Triangle, - Rectangle, - Pentagon, - Hexagon, - Octogon, - Hexagram, - Pentagram, - Ring, - Cutout1, - Cutout2, - Heart - } - - [ExportGroup("Shape", "shape")] - [Export] - public ShapeType shapeType = ShapeType.Pentagon; - - [Export( PropertyHint.Range, "-180,180" ) ] - public float shapeRotation = 0; - - [Export( PropertyHint.Range, "0,1" ) ] - public float shapeScale = 0f; - - [Export] - public float shapeMinDistance = 0; - - [Export] - public float shapeMaxDistance = 0.05f; - - [Export] - public float shapeDistanceOffset = 0f; - - [Export] - public float shapeDistanceSpread = 0f; - - [ExportGroup("Size")] - - [Export] - public Vector2 size = Vector2.One; - - [Export] - public float sizeXY = 1f; - - [Export] - public float worldSizeScale = 1f; - - [Export] - public float screenSizeScale = 1f; - - [Export] - public float minRandomScale = 1f; - - [Export] - public float maxRandomScale = 1f; - - [Export] - public float polarRandomScale = 0f; - - [Export( PropertyHint.Range, "0,1" )] - public float worldSize_vs_screenSize = 1f; - - [ExportGroup("Screen Offset")] - [Export] - public Vector2 screenOffset = Vector2.Zero; - [Export] - public Vector2 screenOffsetSpreadPerLayer = Vector2.Zero; - - MeshInstance3D mesh; - ShapeFlareVFXLayer parent; - ShapeFlareAddMaterial glowMaterial; - int _numInstances = 0; - - public override FlareVFXLayer Create( FlareVFX flareVFX ) - { - var clone = Duplicate() as ShapeFlareVFXLayer; - - clone.mesh = flareVFX.GetContainer().CreateChild(); - clone._numInstances = numInstances; - clone.mesh.Mesh = MeshGeometry.UnitBillboardQuads( numInstances, 0f, 1f ).GenerateMesh(); - - clone.glowMaterial = new ShapeFlareAddMaterial(); - clone.mesh.SetSurfaceOverrideMaterial( 0, clone.glowMaterial ); - - clone.parent = this; - - - - return clone; - } - - public override void Update( FlareVFX flareVFX ) - { - if ( _numInstances != parent.numInstances ) - { - _numInstances = parent.numInstances; - mesh.Mesh = MeshGeometry.UnitBillboardQuads( _numInstances, 0f, 1f ).GenerateMesh(); - - } - - glowMaterial.color.Set( parent.colorOverwrite !=null ? parent.colorOverwrite.GetColorValue() : flareVFX.preset.mainColor ); - - glowMaterial.colorDistortion.Set( parent.colorDistortion ); - glowMaterial.alphaDistortion.Set( parent.alphaDistortion ); - - glowMaterial.centerHsl.Set( parent.centerHSLA ); - glowMaterial.outsideHsl.Set( parent.outsideHSLA ); - - glowMaterial.minHueRandom.Set( parent.minHueRandom + parent.hueOffset - parent.hueSpread ); - glowMaterial.maxHueRandom.Set( parent.maxHueRandom + parent.hueOffset + parent.hueSpread ); - - glowMaterial.opacity.Set( parent.opacity ); - glowMaterial.opacityCurve.Set( parent.opacityCurve ); - - var size = parent.size * parent.sizeXY; - glowMaterial.sizeX.Set( size.X ); - glowMaterial.sizeY.Set( size.Y ); - glowMaterial.worldSizeScale.Set( parent.worldSizeScale ); - glowMaterial.screenSizeScale.Set( parent.screenSizeScale ); - glowMaterial.worldSizeVsScreenSize.Set( parent.worldSize_vs_screenSize ); - - glowMaterial.screenOffsetScale.Set( parent.screenOffset ); - glowMaterial.screenOffsetLayerSpread.Set( parent.screenOffsetSpreadPerLayer ); - - glowMaterial.shapeType.Set( (int) parent.shapeType ); - - glowMaterial.shapeType.Set( (int) parent.shapeType ); - glowMaterial.shapeRotation.Set( parent.shapeRotation ); - glowMaterial.shapeScale.Set( parent.shapeScale ); - - glowMaterial.minShapeDistance.Set( parent.shapeMinDistance + parent.shapeDistanceOffset - parent.shapeDistanceSpread ); - glowMaterial.maxShapeDistance.Set( parent.shapeMaxDistance + parent.shapeDistanceOffset + parent.shapeDistanceSpread ); - - glowMaterial.minShapeDistanceColor.Set( parent.minShapeDistanceColor + parent.shapeDistanceOffsetColor - parent.shapeDistanceSpreadColor ); - glowMaterial.maxShapeDistanceColor.Set( parent.maxShapeDistanceColor + parent.shapeDistanceOffsetColor + parent.shapeDistanceSpreadColor ); - - - glowMaterial.randomScaleMin.Set( parent.minRandomScale - parent.polarRandomScale ); - glowMaterial.randomScaleMax.Set( parent.maxRandomScale + parent.polarRandomScale ); - - } - } -} \ No newline at end of file diff --git a/Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs.uid b/Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs.uid deleted file mode 100644 index 8dcdc95..0000000 --- a/Runtime/VFX/FlareVFX/Layers/ShapeFlareVFXLayer.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://cdg307hboj17p