diff --git a/Boot b/Boot new file mode 100644 index 0000000..e69de29 diff --git a/Manager b/Manager new file mode 100644 index 0000000..e69de29 diff --git a/WE-Lake.png b/WE-Lake.png new file mode 100644 index 0000000..0631e83 Binary files /dev/null and b/WE-Lake.png differ diff --git a/Wallpaper/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg b/Wallpaper/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg new file mode 100644 index 0000000..fc040ac Binary files /dev/null and b/Wallpaper/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg differ diff --git a/configuration.nix b/configuration.nix index 7f10b86..c17a257 100644 --- a/configuration.nix +++ b/configuration.nix @@ -11,11 +11,13 @@ ]; # Bootloader. - boot.loader.systemd-boot.enable = true; + boot.loader.grub.enable = true; + boot.loader.grub.devices = ["nodev"]; + boot.loader.grub.useOSProber = true; + boot.loader.grub.efiSupport = true; boot.initrd.systemd.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.kernelParams = ["quiet"]; - boot.extraModulePackages = with config.boot.kernelPackages; [ hid-tmff2 ]; services.avahi = { enable = true; nssmdns4 = true; @@ -27,7 +29,6 @@ # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # Enable networking networking.networkmanager.enable = true; @@ -36,6 +37,10 @@ amdvlk ]; + nixpkgs.config.permittedInsecurePackages = [ + "electron-31.7.7" + ]; + environment.variables.AMD_VULKAN_ICD = "RADV"; # Set your time zone. @@ -66,11 +71,11 @@ # Enable the GNOME Desktop Environment. programs.hyprland.enable = true; - services.desktopManager.plasma6.enable = true; + services.desktopManager.plasma6.enable = false; services.displayManager.sddm.enable = false; services.displayManager.cosmic-greeter.enable = false; - services.desktopManager.cosmic.enable = true; - security.pam.services.hyprlock = {}; + services.desktopManager.cosmic.enable = false; + #security.pam.services.hyprlock = {}; services.greetd = { enable = true; @@ -82,7 +87,11 @@ default_session = initial_session; }; }; + + # Polkit + + security.polkit.enable = true; # Configure keymap in X11 @@ -94,16 +103,16 @@ # Enable Swap - swapDevices = [ { + /*swapDevices = [ { device = "/var/lib/swapfile"; size = 16*1024; - }]; + }];*/ # Enable CUPS to print documents. services.printing.enable = true; # Enable sound with pipewire. - hardware.pulseaudio.enable = false; + services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; @@ -131,6 +140,8 @@ ]; }; + nix.optimise.automatic = true; + # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -149,16 +160,6 @@ - fileSystems."/mnt/Skyrim" = { - device = "/dev/sdb1"; - fsType = "btrfs"; - options = [ - "users" - "nofail" - "x-gvfs-show" - "exec" - ]; - }; @@ -167,7 +168,8 @@ fira-code fira-code-symbols roboto - (nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; }) + nerd-fonts.fira-code + nerd-fonts.jetbrains-mono ]; @@ -176,12 +178,14 @@ environment.systemPackages = with pkgs; [ git feishin - blueman + bibata-cursors + blender rustc winetricks cowsay pfetch ryujinx + hyprpolkitagent gomatrix pavucontrol gnomeExtensions.tray-icons-reloaded @@ -190,17 +194,18 @@ gnomeExtensions.open-bar just steamtinkerlaunch + grub2 lunar-client cargo btop kdePackages.kalk - inputs.zen-browser.packages."${system}".specific + inputs.zen-browser.packages."${system}".default kdePackages.kdenlive fuse + linux-wallpaperengine ntfs3g lapce prismlauncher - modrinth-app kdePackages.elisa glaxnimate librewolf @@ -219,7 +224,7 @@ wine alvr bottles - cava + #cava pop-icon-theme pop-launcher gnome-tweaks diff --git a/flake.lock b/flake.lock index 617b20e..603c97b 100644 --- a/flake.lock +++ b/flake.lock @@ -2,23 +2,48 @@ "nodes": { "ags": { "inputs": { - "nixpkgs": "nixpkgs", - "systems": "systems" + "astal": "astal", + "nixpkgs": [ + "hyprpanel", + "nixpkgs" + ] }, "locked": { - "lastModified": 1728326430, - "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", - "owner": "Aylur", + "lastModified": 1736090999, + "narHash": "sha256-B5CJuHqfJrzPa7tObK0H9669/EClSHpa/P7B9EuvElU=", + "owner": "aylur", "repo": "ags", - "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", + "rev": "5527c3c07d92c11e04e7fd99d58429493dba7e3c", "type": "github" }, "original": { - "owner": "Aylur", + "owner": "aylur", "repo": "ags", "type": "github" } }, + "astal": { + "inputs": { + "nixpkgs": [ + "hyprpanel", + "ags", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1735172721, + "narHash": "sha256-rtEAwGsHSppnkR3Qg3eRJ6Xh/F84IY9CrBBLzYabalY=", + "owner": "aylur", + "repo": "astal", + "rev": "6c84b64efc736e039a8a10774a4a1bf772c37aa2", + "type": "github" + }, + "original": { + "owner": "aylur", + "repo": "astal", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -27,11 +52,11 @@ ] }, "locked": { - "lastModified": 1728330715, - "narHash": "sha256-xRJ2nPOXb//u1jaBnDP56M7v5ldavjbtR6lfGqSvcKg=", + "lastModified": 1735644329, + "narHash": "sha256-tO3HrHriyLvipc4xr+Ewtdlo7wM1OjXNjlWRgmM7peY=", "owner": "numtide", "repo": "devshell", - "rev": "dd6b80932022cea34a019e2bb32f6fa9e494dfef", + "rev": "f7795ede5b02664b57035b3b757876703e2c3eac", "type": "github" }, "original": { @@ -58,12 +83,12 @@ }, "flake-compat_2": { "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "revCount": 57, + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "revCount": 69, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" }, "original": { "type": "tarball", @@ -78,11 +103,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "type": "github" }, "original": { @@ -93,14 +118,14 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -119,18 +144,14 @@ "nixpkgs": [ "nixvim", "nixpkgs" - ], - "nixpkgs-stable": [ - "nixvim", - "nixpkgs" ] }, "locked": { - "lastModified": 1730814269, - "narHash": "sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF+06nOg=", + "lastModified": 1737465171, + "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "d70155fdc00df4628446352fc58adc640cd705c2", + "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", "type": "github" }, "original": { @@ -168,11 +189,11 @@ ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1738878603, + "narHash": "sha256-fmhq8B3MvQLawLbMO+LWLcdC2ftLMmwSk+P29icJ3tE=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "433799271274c9f2ab520a49527ebfe2992dcfbd", "type": "github" }, "original": { @@ -189,11 +210,11 @@ ] }, "locked": { - "lastModified": 1730837930, - "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", + "lastModified": 1738841109, + "narHash": "sha256-sEgE3nifaRU5gfAx33ds0tx/j+qM0/5/bHopv/w6c0c=", "owner": "nix-community", "repo": "home-manager", - "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", + "rev": "f99c704fe3a4cf8d72b2d568ec80bc38be1a9407", "type": "github" }, "original": { @@ -205,14 +226,14 @@ "hyprpanel": { "inputs": { "ags": "ags", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1731881415, - "narHash": "sha256-OeweFCPQ5QaJvZKARJJ9AsP7R3KDP+celSXzV2Jc5lQ=", + "lastModified": 1738836920, + "narHash": "sha256-1zCjMuRrxrsFgl8FH/pjwyM9dxoiQDc3SgrjGqOGv/c=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "0555a84b302957695aa1f369e4f404835343b60a", + "rev": "6b846b97097ba6cae627630ead88774b15af887e", "type": "github" }, "original": { @@ -251,11 +272,11 @@ }, "master": { "locked": { - "lastModified": 1731168639, - "narHash": "sha256-iSjFu7x07YCjY0d5TbTFF5PGalnoapxUzw1jXMNfy2I=", + "lastModified": 1738886059, + "narHash": "sha256-DYkVeNwjNtcZfx37AfvDUQVtwfS98ES27iTI76LnG8A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b35c45a2c17458a108d03f2a780d8a2f17c16b6e", + "rev": "12a098d8424a90f882687f08d5c1b0be46249699", "type": "github" }, "original": { @@ -273,11 +294,11 @@ ] }, "locked": { - "lastModified": 1731153869, - "narHash": "sha256-3Ftf9oqOypcEyyrWJ0baVkRpvQqroK/SVBFLvU3nPuc=", + "lastModified": 1738743987, + "narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "5c74ab862c8070cbf6400128a1b56abb213656da", + "rev": "ae406c04577ff9a64087018c79b4fdc02468c87c", "type": "github" }, "original": { @@ -292,15 +313,14 @@ "nixpkgs": [ "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable", - "rust-overlay": "rust-overlay" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1731116135, - "narHash": "sha256-IJ7SViFR2APiuV3k+8v6NIMI1K7oP0Q3cNNfrdlbefU=", + "lastModified": 1738876009, + "narHash": "sha256-NWOsGZshqmErypjw62LnzOfZZ3kiclMisF1f1JaKpgc=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "c74c207183e32f23a94b4bb8b69bc5064db98894", + "rev": "af0ad2ecf0a6229f07cd29f1e083243ff3f7fc55", "type": "github" }, "original": { @@ -311,15 +331,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", - "owner": "NixOS", + "lastModified": 1736344531, + "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "nixos", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -327,43 +347,27 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1730883749, - "narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=", + "lastModified": 1738702386, + "narHash": "sha256-nJj8f78AYAxl/zqLiFGXn5Im1qjFKU8yBPKoWEeZN5M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dba414932936fde69f0606b4f1d87c5bc0003ede", + "rev": "030ba1976b7c0e1a67d9716b17308ccdab5b381e", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1731676054, - "narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", "type": "github" }, "original": { @@ -372,13 +376,13 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1727348695, - "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "lastModified": 1735471104, + "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", "type": "github" }, "original": { @@ -403,11 +407,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1731155487, - "narHash": "sha256-+D57j7BcV5O3XH9za3c3XXVLHr+F+enThAN2EeF6H/M=", + "lastModified": 1738844060, + "narHash": "sha256-N5aqp83tNnX6X+28CYhieUTHJjNTWyXCMUB4xyvMSO8=", "owner": "nix-community", "repo": "nixvim", - "rev": "31364af1990067d5529846a2ebf17a42c5ab22ff", + "rev": "5024ef216f0e5d84adf1da703445de4ca1f8f9fb", "type": "github" }, "original": { @@ -426,11 +430,11 @@ ] }, "locked": { - "lastModified": 1731060242, - "narHash": "sha256-43yLsOm/wxBbfYSNDWVJeVv5Ij+23X3BIjFUfsdx/6M=", + "lastModified": 1738508923, + "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", "owner": "NuschtOS", "repo": "search", - "rev": "ef493352f9e1f051e01a55c062731503a6b36b4e", + "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", "type": "github" }, "original": { @@ -445,48 +449,12 @@ "hyprpanel": "hyprpanel", "master": "master", "nixos-cosmic": "nixos-cosmic", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", "zen-browser": "zen-browser" } }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "nixos-cosmic", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1731032894, - "narHash": "sha256-dQSyYPmrQiPr+PGEd+K8038rubFGz7G/dNXVeaGWE0w=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "d52f2a4c103a0acf09ded857b9e2519ae2360e59", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -509,11 +477,11 @@ ] }, "locked": { - "lastModified": 1730321837, - "narHash": "sha256-vK+a09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/+maI=", + "lastModified": 1738680491, + "narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "746901bb8dba96d154b66492a29f5db0693dbfcc", + "rev": "64dbb922d51a42c0ced6a7668ca008dded61c483", "type": "github" }, "original": { @@ -524,18 +492,18 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1727721329, - "narHash": "sha256-QYlWZwUSwrM7BuO+dXclZIwoPvBIuJr6GpFKv9XKFPI=", - "owner": "MarceColl", + "lastModified": 1738880187, + "narHash": "sha256-1RieTOf8k5WQDMUpk2y24jmCUGS5Z8vyVb1xOaZu6cc=", + "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "e6ab73f405e9a2896cce5956c549a9cc359e5fcc", + "rev": "6449d5cd3ddd3e21650ed2b80c59acfbb196fb2b", "type": "github" }, "original": { - "owner": "MarceColl", + "owner": "0xc000022070", "repo": "zen-browser-flake", "type": "github" } diff --git a/flake.nix b/flake.nix index dade2bc..292ff22 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,7 @@ url = "github:lilyinstarlight/nixos-cosmic"; inputs.nixpkgs.follows = "nixpkgs"; }; - zen-browser.url = "github:MarceColl/zen-browser-flake"; + zen-browser.url = "github:0xc000022070/zen-browser-flake"; master.url = "github:NixOS/nixpkgs/master"; home-manager.url = "github:nix-community/home-manager"; hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; diff --git a/gruvbox_modules/hypr/hyprland.conf b/gruvbox_modules/hypr/hyprland.conf index 1b210f2..d8f1f99 100644 --- a/gruvbox_modules/hypr/hyprland.conf +++ b/gruvbox_modules/hypr/hyprland.conf @@ -3,11 +3,14 @@ autogenerated = 0 # remove this line to remove the warning source=~/.config/hypr/rose-pine.conf # See https://wiki.hyprland.org/Configuring/Monitors/ -monitor = HDMI-A-1, 3840x2160@60, 0x0, 2 +monitor = HDMI-A-1, 2560x1440@60, 0x0, 1 exec-once = hyprctl dispatch workspace 1 -exec-once = swaybg -i ~/Pictures/Wallpaper/wallhaven-z85eoy.jpg +#exec-once = swaybg -i ~/Pictures/Wallpaper/wallhaven-z85eoy.jpg +exec-once = linux-wallpaperengine --screen-root HDMI-A-1 --silent --fps 60 3351251525 exec-once = hyprlock -exec-once = waybar +# exec-once = waybar +exec-once = hyprpanel +exec-once = sunshine # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch @@ -32,6 +35,7 @@ input { kb_model = kb_options = kb_rules = + accel_profile = flat follow_mouse = 1 @@ -69,11 +73,6 @@ decoration { ignore_opacity = on xray = false } - - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) } animations { diff --git a/gruvbox_modules/hypr/hyprlock.conf b/gruvbox_modules/hypr/hyprlock.conf index 61d443c..7d33825 100644 --- a/gruvbox_modules/hypr/hyprlock.conf +++ b/gruvbox_modules/hypr/hyprlock.conf @@ -1,6 +1,6 @@ background { monitor = - path = ~/Pictures/Wallpaper/wallhaven-z85eoy.jpg + path = ~/NixOS-Configs/WE-Lake.png # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations blur_passes = 3 # 0 disables blurring diff --git a/gruvbox_modules/hyprpanel/options.json b/gruvbox_modules/hyprpanel/options.json new file mode 100644 index 0000000..1395f13 --- /dev/null +++ b/gruvbox_modules/hyprpanel/options.json @@ -0,0 +1,465 @@ +{ + "bar.customModules.updates.pollingInterval": 1440000, + "menus.transition": "none", + "theme.bar.menus.monochrome": false, + "theme.bar.menus.menu.notifications.scrollbar.color": "#83a598", + "theme.bar.menus.menu.notifications.pager.label": "#a89984", + "theme.bar.menus.menu.notifications.pager.button": "#83a598", + "theme.bar.menus.menu.notifications.pager.background": "#1d2021", + "theme.bar.menus.menu.notifications.switch.puck": "#504945", + "theme.bar.menus.menu.notifications.switch.disabled": "#3c3836", + "theme.bar.menus.menu.notifications.switch.enabled": "#83a598", + "theme.bar.menus.menu.notifications.clear": "#83a598", + "theme.bar.menus.menu.notifications.switch_divider": "#504945", + "theme.bar.menus.menu.notifications.border": "#3c3836", + "theme.bar.menus.menu.notifications.card": "#282828", + "theme.bar.menus.menu.notifications.background": "#1d2021", + "theme.bar.menus.menu.notifications.no_notifications_label": "#3c3836", + "theme.bar.menus.menu.notifications.label": "#83a598", + "theme.bar.menus.menu.power.buttons.sleep.icon": "#32302f", + "theme.bar.menus.menu.power.buttons.sleep.text": "#83a598", + "theme.bar.menus.menu.power.buttons.sleep.icon_background": "#83a598", + "theme.bar.menus.menu.power.buttons.sleep.background": "#282828", + "theme.bar.menus.menu.power.buttons.logout.icon": "#32302f", + "theme.bar.menus.menu.power.buttons.logout.text": "#b8bb26", + "theme.bar.menus.menu.power.buttons.logout.icon_background": "#b8bb26", + "theme.bar.menus.menu.power.buttons.logout.background": "#282828", + "theme.bar.menus.menu.power.buttons.restart.icon": "#32302f", + "theme.bar.menus.menu.power.buttons.restart.text": "#fe8019", + "theme.bar.menus.menu.power.buttons.restart.icon_background": "#fe8019", + "theme.bar.menus.menu.power.buttons.restart.background": "#282828", + "theme.bar.menus.menu.power.buttons.shutdown.icon": "#32302f", + "theme.bar.menus.menu.power.buttons.shutdown.text": "#cc241d", + "theme.bar.menus.menu.power.buttons.shutdown.icon_background": "#cc241d", + "theme.bar.menus.menu.power.buttons.shutdown.background": "#282828", + "theme.bar.menus.menu.power.border.color": "#3c3836", + "theme.bar.menus.menu.power.background.color": "#1d2021", + "theme.bar.menus.menu.dashboard.monitors.disk.label": "#d3869b", + "theme.bar.menus.menu.dashboard.monitors.disk.bar": "#d3869b", + "theme.bar.menus.menu.dashboard.monitors.disk.icon": "#d3869b", + "theme.bar.menus.menu.dashboard.monitors.gpu.label": "#b8bb26", + "theme.bar.menus.menu.dashboard.monitors.gpu.bar": "#b8bb26", + "theme.bar.menus.menu.dashboard.monitors.gpu.icon": "#b8bb26", + "theme.bar.menus.menu.dashboard.monitors.ram.label": "#fabd2f", + "theme.bar.menus.menu.dashboard.monitors.ram.bar": "#fabd2f", + "theme.bar.menus.menu.dashboard.monitors.ram.icon": "#fabd2f", + "theme.bar.menus.menu.dashboard.monitors.cpu.label": "#fb4934", + "theme.bar.menus.menu.dashboard.monitors.cpu.bar": "#fb4934", + "theme.bar.menus.menu.dashboard.monitors.cpu.icon": "#fb4934", + "theme.bar.menus.menu.dashboard.monitors.bar_background": "#504945", + "theme.bar.menus.menu.dashboard.directories.right.bottom.color": "#83a598", + "theme.bar.menus.menu.dashboard.directories.right.middle.color": "#b16286", + "theme.bar.menus.menu.dashboard.directories.right.top.color": "#8ec07c", + "theme.bar.menus.menu.dashboard.directories.left.bottom.color": "#fb4934", + "theme.bar.menus.menu.dashboard.directories.left.middle.color": "#fabd2f", + "theme.bar.menus.menu.dashboard.directories.left.top.color": "#d3869b", + "theme.bar.menus.menu.dashboard.controls.input.text": "#32302f", + "theme.bar.menus.menu.dashboard.controls.input.background": "#d3869b", + "theme.bar.menus.menu.dashboard.controls.volume.text": "#32302f", + "theme.bar.menus.menu.dashboard.controls.volume.background": "#fb4934", + "theme.bar.menus.menu.dashboard.controls.notifications.text": "#32302f", + "theme.bar.menus.menu.dashboard.controls.notifications.background": "#fabd2f", + "theme.bar.menus.menu.dashboard.controls.bluetooth.text": "#32302f", + "theme.bar.menus.menu.dashboard.controls.bluetooth.background": "#83a598", + "theme.bar.menus.menu.dashboard.controls.wifi.text": "#32302f", + "theme.bar.menus.menu.dashboard.controls.wifi.background": "#b16286", + "theme.bar.menus.menu.dashboard.controls.disabled": "#665c54", + "theme.bar.menus.menu.dashboard.shortcuts.recording": "#b8bb26", + "theme.bar.menus.menu.dashboard.shortcuts.text": "#32302f", + "theme.bar.menus.menu.dashboard.shortcuts.background": "#83a598", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.button_text": "#1d2021", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.deny": "#d3869b", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.confirm": "#8ec07b", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.body": "#ebdbb2", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.label": "#83a598", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.border": "#3c3836", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.background": "#1d2021", + "theme.bar.menus.menu.dashboard.powermenu.confirmation.card": "#1d2021", + "theme.bar.menus.menu.dashboard.powermenu.sleep": "#83a598", + "theme.bar.menus.menu.dashboard.powermenu.logout": "#b8bb26", + "theme.bar.menus.menu.dashboard.powermenu.restart": "#fe8019", + "theme.bar.menus.menu.dashboard.powermenu.shutdown": "#cc241d", + "theme.bar.menus.menu.dashboard.profile.name": "#d3869b", + "theme.bar.menus.menu.dashboard.border.color": "#3c3836", + "theme.bar.menus.menu.dashboard.background.color": "#1d2021", + "theme.bar.menus.menu.dashboard.card.color": "#282828", + "theme.bar.menus.menu.clock.weather.hourly.temperature": "#d3869b", + "theme.bar.menus.menu.clock.weather.hourly.icon": "#d3869b", + "theme.bar.menus.menu.clock.weather.hourly.time": "#d3869b", + "theme.bar.menus.menu.clock.weather.thermometer.extremelycold": "#83a598", + "theme.bar.menus.menu.clock.weather.thermometer.cold": "#458588", + "theme.bar.menus.menu.clock.weather.thermometer.moderate": "#83a598", + "theme.bar.menus.menu.clock.weather.thermometer.hot": "#fe8019", + "theme.bar.menus.menu.clock.weather.thermometer.extremelyhot": "#cc241d", + "theme.bar.menus.menu.clock.weather.stats": "#d3869b", + "theme.bar.menus.menu.clock.weather.status": "#8ec07c", + "theme.bar.menus.menu.clock.weather.temperature": "#ebdbb2", + "theme.bar.menus.menu.clock.weather.icon": "#d3869b", + "theme.bar.menus.menu.clock.calendar.contextdays": "#665c54", + "theme.bar.menus.menu.clock.calendar.days": "#ebdbb2", + "theme.bar.menus.menu.clock.calendar.currentday": "#d3869b", + "theme.bar.menus.menu.clock.calendar.paginator": "#d3869b", + "theme.bar.menus.menu.clock.calendar.weekdays": "#d3869b", + "theme.bar.menus.menu.clock.calendar.yearmonth": "#8ec07c", + "theme.bar.menus.menu.clock.time.timeperiod": "#8ec07c", + "theme.bar.menus.menu.clock.time.time": "#d3869b", + "theme.bar.menus.menu.clock.text": "#ebdbb2", + "theme.bar.menus.menu.clock.border.color": "#3c3836", + "theme.bar.menus.menu.clock.background.color": "#1d2021", + "theme.bar.menus.menu.clock.card.color": "#282828", + "theme.bar.menus.menu.battery.slider.puck": "#7c6f64", + "theme.bar.menus.menu.battery.slider.backgroundhover": "#504945", + "theme.bar.menus.menu.battery.slider.background": "#665c54", + "theme.bar.menus.menu.battery.slider.primary": "#fabd2f", + "theme.bar.menus.menu.battery.icons.active": "#fabd2f", + "theme.bar.menus.menu.battery.icons.passive": "#a89984", + "theme.bar.menus.menu.battery.listitems.active": "#fabd2f", + "theme.bar.menus.menu.battery.listitems.passive": "#ebdbb2", + "theme.bar.menus.menu.battery.text": "#ebdbb2", + "theme.bar.menus.menu.battery.label.color": "#fabd2f", + "theme.bar.menus.menu.battery.border.color": "#3c3836", + "theme.bar.menus.menu.battery.background.color": "#1d2021", + "theme.bar.menus.menu.battery.card.color": "#282828", + "theme.bar.menus.menu.systray.dropdownmenu.divider": "#1d2021", + "theme.bar.menus.menu.systray.dropdownmenu.text": "#ebdbb2", + "theme.bar.menus.menu.systray.dropdownmenu.background": "#1d2021", + "theme.bar.menus.menu.bluetooth.iconbutton.active": "#83a598", + "theme.bar.menus.menu.bluetooth.iconbutton.passive": "#ebdbb2", + "theme.bar.menus.menu.bluetooth.icons.active": "#83a598", + "theme.bar.menus.menu.bluetooth.icons.passive": "#a89984", + "theme.bar.menus.menu.bluetooth.listitems.active": "#83a598", + "theme.bar.menus.menu.bluetooth.listitems.passive": "#ebdbb2", + "theme.bar.menus.menu.bluetooth.switch.puck": "#504945", + "theme.bar.menus.menu.bluetooth.switch.disabled": "#3c3836", + "theme.bar.menus.menu.bluetooth.switch.enabled": "#83a598", + "theme.bar.menus.menu.bluetooth.switch_divider": "#504945", + "theme.bar.menus.menu.bluetooth.status": "#7c6f64", + "theme.bar.menus.menu.bluetooth.text": "#ebdbb2", + "theme.bar.menus.menu.bluetooth.label.color": "#83a598", + "theme.bar.menus.menu.bluetooth.border.color": "#3c3836", + "theme.bar.menus.menu.bluetooth.background.color": "#1d2021", + "theme.bar.menus.menu.bluetooth.card.color": "#282828", + "theme.bar.menus.menu.network.iconbuttons.active": "#b16286", + "theme.bar.menus.menu.network.iconbuttons.passive": "#ebdbb2", + "theme.bar.menus.menu.network.icons.active": "#b16286", + "theme.bar.menus.menu.network.icons.passive": "#a89984", + "theme.bar.menus.menu.network.listitems.active": "#b16286", + "theme.bar.menus.menu.network.listitems.passive": "#ebdbb2", + "theme.bar.menus.menu.network.status.color": "#7c6f64", + "theme.bar.menus.menu.network.text": "#ebdbb2", + "theme.bar.menus.menu.network.label.color": "#b16286", + "theme.bar.menus.menu.network.border.color": "#3c3836", + "theme.bar.menus.menu.network.background.color": "#1d2021", + "theme.bar.menus.menu.network.card.color": "#282828", + "theme.bar.menus.menu.volume.input_slider.puck": "#665c54", + "theme.bar.menus.menu.volume.input_slider.backgroundhover": "#504945", + "theme.bar.menus.menu.volume.input_slider.background": "#665c54", + "theme.bar.menus.menu.volume.input_slider.primary": "#fe8018", + "theme.bar.menus.menu.volume.audio_slider.puck": "#665c54", + "theme.bar.menus.menu.volume.audio_slider.backgroundhover": "#504945", + "theme.bar.menus.menu.volume.audio_slider.background": "#665c54", + "theme.bar.menus.menu.volume.audio_slider.primary": "#fe8018", + "theme.bar.menus.menu.volume.icons.active": "#fe8018", + "theme.bar.menus.menu.volume.icons.passive": "#a89984", + "theme.bar.menus.menu.volume.iconbutton.active": "#fe8018", + "theme.bar.menus.menu.volume.iconbutton.passive": "#ebdbb2", + "theme.bar.menus.menu.volume.listitems.active": "#fe8018", + "theme.bar.menus.menu.volume.listitems.passive": "#ebdbb2", + "theme.bar.menus.menu.volume.text": "#ebdbb2", + "theme.bar.menus.menu.volume.label.color": "#fe8018", + "theme.bar.menus.menu.volume.border.color": "#3c3836", + "theme.bar.menus.menu.volume.background.color": "#1d2021", + "theme.bar.menus.menu.volume.card.color": "#282828", + "theme.bar.menus.menu.media.slider.puck": "#7c6f64", + "theme.bar.menus.menu.media.slider.backgroundhover": "#504945", + "theme.bar.menus.menu.media.slider.background": "#665c54", + "theme.bar.menus.menu.media.slider.primary": "#d3869b", + "theme.bar.menus.menu.media.buttons.text": "#1d2021", + "theme.bar.menus.menu.media.buttons.background": "#83a598", + "theme.bar.menus.menu.media.buttons.enabled": "#8ec07c", + "theme.bar.menus.menu.media.buttons.inactive": "#665c54", + "theme.bar.menus.menu.media.border.color": "#3c3836", + "theme.bar.menus.menu.media.card.color": "#282828", + "theme.bar.menus.menu.media.background.color": "#1d2021", + "theme.bar.menus.menu.media.album": "#d3869b", + "theme.bar.menus.menu.media.artist": "#8ec07c", + "theme.bar.menus.menu.media.song": "#83a598", + "theme.bar.menus.tooltip.text": "#ebdbb2", + "theme.bar.menus.tooltip.background": "#1d2021", + "theme.bar.menus.dropdownmenu.divider": "#1d2021", + "theme.bar.menus.dropdownmenu.text": "#ebdbb2", + "theme.bar.menus.dropdownmenu.background": "#1d2021", + "theme.bar.menus.slider.puck": "#7c6f64", + "theme.bar.menus.slider.backgroundhover": "#504945", + "theme.bar.menus.slider.background": "#665c54", + "theme.bar.menus.slider.primary": "#83a598", + "theme.bar.menus.progressbar.background": "#504945", + "theme.bar.menus.progressbar.foreground": "#83a598", + "theme.bar.menus.iconbuttons.active": "#83a598", + "theme.bar.menus.iconbuttons.passive": "#ebdbb2", + "theme.bar.menus.buttons.text": "#32302f", + "theme.bar.menus.buttons.disabled": "#665c54", + "theme.bar.menus.buttons.active": "#d3869b", + "theme.bar.menus.buttons.default": "#83a598", + "theme.bar.menus.check_radio_button.active": "#83a598", + "theme.bar.menus.check_radio_button.background": "#3c3836", + "theme.bar.menus.switch.puck": "#504945", + "theme.bar.menus.switch.disabled": "#3c3836", + "theme.bar.menus.switch.enabled": "#83a598", + "theme.bar.menus.icons.active": "#83a598", + "theme.bar.menus.icons.passive": "#665c54", + "theme.bar.menus.listitems.active": "#83a598", + "theme.bar.menus.listitems.passive": "#ebdbb2", + "theme.bar.menus.popover.border": "#32302f", + "theme.bar.menus.popover.background": "#32302f", + "theme.bar.menus.popover.text": "#83a598", + "theme.bar.menus.label": "#83a598", + "theme.bar.menus.feinttext": "#3c3836", + "theme.bar.menus.dimtext": "#665c54", + "theme.bar.menus.text": "#ebdbb2", + "theme.bar.menus.border.color": "#3c3836", + "theme.bar.menus.cards": "#1d2021", + "theme.bar.menus.background": "#1d2021", + "theme.bar.buttons.modules.power.icon_background": "#282828", + "theme.bar.buttons.modules.power.icon": "#cc241d", + "theme.bar.buttons.modules.power.background": "#282828", + "theme.bar.buttons.modules.weather.icon_background": "#282828", + "theme.bar.buttons.modules.weather.icon": "#fe8017", + "theme.bar.buttons.modules.weather.text": "#fe8017", + "theme.bar.buttons.modules.weather.background": "#282828", + "theme.bar.buttons.modules.updates.icon_background": "#282828", + "theme.bar.buttons.modules.updates.icon": "#b16286", + "theme.bar.buttons.modules.updates.text": "#b16286", + "theme.bar.buttons.modules.updates.background": "#282828", + "theme.bar.buttons.modules.kbLayout.icon_background": "#282828", + "theme.bar.buttons.modules.kbLayout.icon": "#83a598", + "theme.bar.buttons.modules.kbLayout.text": "#83a598", + "theme.bar.buttons.modules.kbLayout.background": "#282828", + "theme.bar.buttons.modules.netstat.icon_background": "#282828", + "theme.bar.buttons.modules.netstat.icon": "#b8bb26", + "theme.bar.buttons.modules.netstat.text": "#b8bb26", + "theme.bar.buttons.modules.netstat.background": "#282828", + "theme.bar.buttons.modules.storage.icon_background": "#282828", + "theme.bar.buttons.modules.storage.icon": "#83a598", + "theme.bar.buttons.modules.storage.text": "#83a598", + "theme.bar.buttons.modules.storage.background": "#282828", + "theme.bar.buttons.modules.cpu.icon_background": "#282828", + "theme.bar.buttons.modules.cpu.icon": "#d3869b", + "theme.bar.buttons.modules.cpu.text": "#d3869b", + "theme.bar.buttons.modules.cpu.background": "#282828", + "theme.bar.buttons.modules.ram.icon_background": "#282828", + "theme.bar.buttons.modules.ram.icon": "#fabd2f", + "theme.bar.buttons.modules.ram.text": "#fabd2f", + "theme.bar.buttons.modules.ram.background": "#282828", + "theme.bar.buttons.notifications.total": "#83a598", + "theme.bar.buttons.notifications.icon_background": "#83a598", + "theme.bar.buttons.notifications.icon": "#83a598", + "theme.bar.buttons.notifications.background": "#3c3836", + "theme.bar.buttons.clock.icon_background": "#d3869b", + "theme.bar.buttons.clock.icon": "#d3869b", + "theme.bar.buttons.clock.text": "#d3869b", + "theme.bar.buttons.clock.background": "#3c3836", + "theme.bar.buttons.battery.icon_background": "#fabd2f", + "theme.bar.buttons.battery.icon": "#fabd2f", + "theme.bar.buttons.battery.text": "#fabd2f", + "theme.bar.buttons.battery.background": "#282828", + "theme.bar.buttons.systray.background": "#3c3836", + "theme.bar.buttons.bluetooth.icon_background": "#83a598", + "theme.bar.buttons.bluetooth.icon": "#83a598", + "theme.bar.buttons.bluetooth.text": "#83a598", + "theme.bar.buttons.bluetooth.background": "#3c3836", + "theme.bar.buttons.network.icon_background": "#b16286", + "theme.bar.buttons.network.icon": "#b16286", + "theme.bar.buttons.network.text": "#b16286", + "theme.bar.buttons.network.background": "#3c3836", + "theme.bar.buttons.volume.icon_background": "#fe8018", + "theme.bar.buttons.volume.icon": "#fe8018", + "theme.bar.buttons.volume.text": "#fe8018", + "theme.bar.buttons.volume.background": "#3c3836", + "theme.bar.buttons.media.icon_background": "#83a598", + "theme.bar.buttons.media.icon": "#83a598", + "theme.bar.buttons.media.text": "#83a598", + "theme.bar.buttons.media.background": "#3c3836", + "theme.bar.buttons.windowtitle.icon_background": "#d3869b", + "theme.bar.buttons.windowtitle.icon": "#d3869b", + "theme.bar.buttons.windowtitle.text": "#d3869b", + "theme.bar.buttons.windowtitle.background": "#3c3836", + "theme.bar.buttons.workspaces.numbered_active_underline_color": "#ffffff", + "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color": "#21252b", + "theme.bar.buttons.workspaces.active": "#d3869b", + "theme.bar.buttons.workspaces.occupied": "#fb4934", + "theme.bar.buttons.workspaces.available": "#83a598", + "theme.bar.buttons.workspaces.hover": "#504945", + "theme.bar.buttons.workspaces.background": "#3c3836", + "theme.bar.buttons.dashboard.icon": "#fabd2f", + "theme.bar.buttons.dashboard.background": "#3c3836", + "theme.bar.buttons.icon": "#83a598", + "theme.bar.buttons.text": "#83a598", + "theme.bar.buttons.hover": "#504945", + "theme.bar.buttons.icon_background": "#242438", + "theme.bar.buttons.background": "#3c3836", + "theme.bar.buttons.style": "default", + "theme.bar.background": "#282828", + "theme.osd.label": "#83a598", + "theme.osd.icon": "#1d2021", + "theme.osd.bar_overflow_color": "#cc241d", + "theme.osd.bar_empty_color": "#3c3836", + "theme.osd.bar_color": "#83a598", + "theme.osd.icon_container": "#83a598", + "theme.osd.bar_container": "#1d2021", + "theme.notification.close_button.label": "#1d2021", + "theme.notification.close_button.background": "#83a598", + "theme.notification.labelicon": "#83a598", + "theme.notification.text": "#ebdbb2", + "theme.notification.time": "#928374", + "theme.notification.border": "#3c3836", + "theme.notification.label": "#83a598", + "theme.notification.actions.text": "#32302f", + "theme.notification.actions.background": "#83a598", + "theme.notification.background": "#32302f", + "theme.bar.buttons.modules.power.border": "#282828", + "theme.bar.buttons.modules.weather.border": "#fe8017", + "theme.bar.buttons.modules.updates.border": "#b16286", + "theme.bar.buttons.modules.kbLayout.border": "#83a598", + "theme.bar.buttons.modules.netstat.border": "#b8bb26", + "theme.bar.buttons.modules.storage.border": "#83a598", + "theme.bar.buttons.modules.cpu.border": "#d3869b", + "theme.bar.buttons.modules.ram.border": "#fabd2f", + "theme.bar.buttons.notifications.border": "#83a598", + "theme.bar.buttons.clock.border": "#d3869b", + "theme.bar.buttons.battery.border": "#fabd2f", + "theme.bar.buttons.systray.border": "#504945", + "theme.bar.buttons.bluetooth.border": "#83a598", + "theme.bar.buttons.network.border": "#b16286", + "theme.bar.buttons.volume.border": "#fe8018", + "theme.bar.buttons.media.border": "#83a598", + "theme.bar.buttons.windowtitle.border": "#d3869b", + "theme.bar.buttons.workspaces.border": "#ffffff", + "theme.bar.buttons.dashboard.border": "#fabd2f", + "theme.bar.buttons.modules.submap.background": "#282828", + "theme.bar.buttons.modules.submap.text": "#8ec07c", + "theme.bar.buttons.modules.submap.border": "#8ec07c", + "theme.bar.buttons.modules.submap.icon": "#8ec07c", + "theme.bar.buttons.modules.submap.icon_background": "#282828", + "theme.bar.menus.menu.network.switch.enabled": "#b16286", + "theme.bar.menus.menu.network.switch.disabled": "#3c3836", + "theme.bar.menus.menu.network.switch.puck": "#504945", + "theme.bar.buttons.systray.customIcon": "#ebdbb2", + "theme.bar.border.color": "#83a598", + "theme.bar.menus.menu.media.timestamp": "#ebdbb2", + "theme.bar.buttons.borderColor": "#83a598", + "theme.bar.buttons.modules.hyprsunset.icon": "#fabd2f", + "theme.bar.buttons.modules.hyprsunset.background": "#282828", + "theme.bar.buttons.modules.hyprsunset.icon_background": "#282828", + "theme.bar.buttons.modules.hyprsunset.text": "#fabd2f", + "theme.bar.buttons.modules.hyprsunset.border": "#fabd2f", + "theme.bar.buttons.modules.hypridle.icon": "#83a598", + "theme.bar.buttons.modules.hypridle.background": "#282828", + "theme.bar.buttons.modules.hypridle.icon_background": "#282828", + "theme.bar.buttons.modules.hypridle.text": "#83a598", + "theme.bar.buttons.modules.hypridle.border": "#83a598", + "theme.bar.transparent": false, + "theme.bar.menus.card_radius": "0.4em", + "theme.bar.menus.border.radius": "0.7em", + "theme.bar.menus.border.size": "5px", + "theme.bar.floating": true, + "theme.bar.outer_spacing": "1px", + "theme.bar.border.location": "none", + "theme.bar.location": "top", + "theme.bar.buttons.enableBorders": false, + "menus.clock.time.military": true, + "menus.clock.time.hideSeconds": true, + "menus.clock.weather.location": "Cedar Hill", + "theme.bar.border_radius": "10px", + "theme.bar.buttons.workspaces.enableBorder": false, + "theme.bar.buttons.radius": "10px", + "theme.bar.buttons.padding_y": "0.2rem", + "theme.bar.buttons.padding_x": "0.7rem", + "theme.bar.margin_sides": "0.5em", + "bar.launcher.autoDetectIcon": true, + "menus.dashboard.powermenu.avatar.image": "/home/joshuaelm/NixOS-Configs/pfp.jpg", + "menus.dashboard.powermenu.avatar.name": "Joshua Elmasri", + "theme.bar.menus.menu.dashboard.profile.radius": "100px", + "menus.dashboard.powermenu.logout": "hyprlock", + "menus.dashboard.controls.enabled": false, + "menus.dashboard.stats.enabled": true, + "menus.dashboard.shortcuts.enabled": false, + "menus.dashboard.directories.enabled": false, + "menus.dashboard.stats.enable_gpu": false, + "menus.bluetooth.showBattery": true, + "theme.font.name": "Roboto", + "scalingPriority": "hyprland", + "bar.customModules.netstat.dynamicIcon": false, + "theme.bar.buttons.modules.netstat.enableBorder": false, + "theme.bar.buttons.modules.power.enableBorder": false, + "menus.media.hideAuthor": false, + "menus.media.displayTimeTooltip": false, + "menus.media.displayTime": true, + "menus.volume.raiseMaximumVolume": false, + "bar.volume.label": true, + "bar.network.label": true, + "bar.network.truncation": true, + "bar.media.format": "{title}", + "bar.media.show_active_only": true, + "bar.media.truncation_size": 100, + "bar.clock.format": "%R", + "bar.clock.icon": "", + "bar.layouts": { + "0": { + "left": [ + "dashboard", + "workspaces" + ], + "middle": [ + "media" + ], + "right": [ + "volume", + "network", + "bluetooth", + "battery", + "systray", + "clock", + "notifications" + ] + }, + "1": { + "left": [ + "dashboard", + "workspaces", + "windowtitle" + ], + "middle": [ + "media" + ], + "right": [ + "volume", + "clock", + "notifications" + ] + }, + "2": { + "left": [ + "dashboard", + "workspaces", + "windowtitle" + ], + "middle": [ + "media" + ], + "right": [ + "volume", + "clock", + "notifications" + ] + } + }, + "theme.bar.buttons.workspaces.fontSize": "1.2em", + "bar.workspaces.show_numbered": false, + "theme.bar.buttons.workspaces.smartHighlight": true, + "bar.workspaces.show_icons": true, + "bar.workspaces.icons.occupied": "", + "theme.bar.opacity": 100, + "theme.bar.buttons.monochrome": false, + "theme.bar.buttons.notifications.enableBorder": false +} \ No newline at end of file diff --git a/hardware-configuration.nix b/hardware-configuration.nix index eb55931..e90d77e 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -8,9 +8,9 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ ]; boot.extraModulePackages = [ ]; fileSystems."/" = @@ -32,6 +32,7 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.vboxnet0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/home.nix b/home.nix index b67ab7d..7febfab 100644 --- a/home.nix +++ b/home.nix @@ -29,6 +29,16 @@ xdg.configFile.dunst.source = ./modules/dunst; home.file.".cache/ags/hyprpanel/options.json".source = ./modules/hyprpanel/options.json; + xdg.configFile.hypr.force = true; + xdg.configFile.waybar.force = true; + xdg.configFile.cava.force = true; + xdg.configFile.kitty.force = true; + xdg.configFile.rofi.force = true; + xdg.configFile.dunst.force = true; + home.file.".cache/ags/hyprpanel/options.json".force = true; + + home.file.".icons/default".source = "${pkgs.bibata-cursors}/share/icons/Bibata-Modern-Classic"; + services.mpd-mpris.enable = true; diff --git a/modules/hypr/hyprland.conf b/modules/hypr/hyprland.conf index f58300e..eff6d11 100644 --- a/modules/hypr/hyprland.conf +++ b/modules/hypr/hyprland.conf @@ -4,11 +4,15 @@ source=~/.config/hypr/rose-pine.conf # See https://wiki.hyprland.org/Configuring/Monitors/ monitor = HDMI-A-1, 2560x1440@60, 0x0, 1 +#monitor = HDMI-A-1, disable +#monitor = sunshine, highres@highrr, 0x0, 1 exec-once = hyprctl dispatch workspace 1 -exec-once = swaybg -i ~/Pictures/Wallpaper/wallhaven-z85eoy.jpg +exec-once = swaybg -i ~/NixOS-Configs/Wallpaper/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg +#exec-once = linux-wallpaperengine --screen-root HDMI-A-1 --silent --fps 60 3000562427 exec-once = hyprlock # exec-once = waybar exec-once = hyprpanel +exec-once = systemctl --user start hyprpolkitagent exec-once = sunshine # See https://wiki.hyprland.org/Configuring/Keywords/ for more @@ -51,8 +55,8 @@ general { gaps_in = 5 gaps_out = 5 border_size = 2 - col.active_border = rgb(1d2021) - col.inactive_border = rgb(1d2021) + col.active_border = rgb(3d59a1) + col.inactive_border = rgb(787c99) layout = dwindle # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on @@ -73,10 +77,11 @@ decoration { xray = false } - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) + shadow { + enabled = true + offset = 3, 3 + color = rgba(323232cc) + } } animations { @@ -100,6 +105,7 @@ dwindle { preserve_split = yes # you probably want this } +layerrule = unset, overlay gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more diff --git a/modules/hypr/hyprlock.conf b/modules/hypr/hyprlock.conf index 61d443c..fffc4c2 100644 --- a/modules/hypr/hyprlock.conf +++ b/modules/hypr/hyprlock.conf @@ -1,6 +1,6 @@ background { monitor = - path = ~/Pictures/Wallpaper/wallhaven-z85eoy.jpg + path = ~/NixOS-Configs/WE-Lake.png # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations blur_passes = 3 # 0 disables blurring @@ -18,7 +18,7 @@ image { border_size = 2 border_color = rgba(255, 255, 255, 0) size = 130 - rounding = -1 + rounding = 100 rotate = 0 reload_time = -1 reload_cmd = @@ -30,7 +30,7 @@ image { label { monitor = text = cmd[update:1000] echo -e "$(date +"%A, %B %d")" - color = rgba(235, 219, 178, 0.70) + color = rgba(122, 162, 247, 0.70) font_size = 25 font_family = Roboto Bold position = 0, 350 @@ -41,7 +41,7 @@ label { label { monitor = text = cmd[update:1000] echo "$(date +"%I:%M")" - color = rgba(235, 219, 178, 0.70) + color = rgba(122, 162, 247, 0.70) font_size = 120 font_family = Roboto Bold position = 0, 250 @@ -53,7 +53,7 @@ label { monitor = text = Joshua Elmasri text_align = center # center/right or any value for default left. multi-line text alignment inside label container - color = rgba(235, 219, 178, 1.0) + color = rgba(122, 162, 247, 1.0) font_size = 30 font_family = Roboto Bold rotate = 0 # degrees, counter-clockwise @@ -73,7 +73,7 @@ input-field { dots_fade_time = 0 outer_color = rgba(0, 0, 0, 0) inner_color = rgba(255, 255, 255, 0.1) - font_color = rgb(235, 219, 178) + font_color = rgb(169, 177, 214) fade_on_empty = false font_family = Roboto placeholder_text = Password diff --git a/modules/hyprpanel/options.json b/modules/hyprpanel/options.json index 1395f13..b0e4ecb 100644 --- a/modules/hyprpanel/options.json +++ b/modules/hyprpanel/options.json @@ -2,362 +2,6 @@ "bar.customModules.updates.pollingInterval": 1440000, "menus.transition": "none", "theme.bar.menus.monochrome": false, - "theme.bar.menus.menu.notifications.scrollbar.color": "#83a598", - "theme.bar.menus.menu.notifications.pager.label": "#a89984", - "theme.bar.menus.menu.notifications.pager.button": "#83a598", - "theme.bar.menus.menu.notifications.pager.background": "#1d2021", - "theme.bar.menus.menu.notifications.switch.puck": "#504945", - "theme.bar.menus.menu.notifications.switch.disabled": "#3c3836", - "theme.bar.menus.menu.notifications.switch.enabled": "#83a598", - "theme.bar.menus.menu.notifications.clear": "#83a598", - "theme.bar.menus.menu.notifications.switch_divider": "#504945", - "theme.bar.menus.menu.notifications.border": "#3c3836", - "theme.bar.menus.menu.notifications.card": "#282828", - "theme.bar.menus.menu.notifications.background": "#1d2021", - "theme.bar.menus.menu.notifications.no_notifications_label": "#3c3836", - "theme.bar.menus.menu.notifications.label": "#83a598", - "theme.bar.menus.menu.power.buttons.sleep.icon": "#32302f", - "theme.bar.menus.menu.power.buttons.sleep.text": "#83a598", - "theme.bar.menus.menu.power.buttons.sleep.icon_background": "#83a598", - "theme.bar.menus.menu.power.buttons.sleep.background": "#282828", - "theme.bar.menus.menu.power.buttons.logout.icon": "#32302f", - "theme.bar.menus.menu.power.buttons.logout.text": "#b8bb26", - "theme.bar.menus.menu.power.buttons.logout.icon_background": "#b8bb26", - "theme.bar.menus.menu.power.buttons.logout.background": "#282828", - "theme.bar.menus.menu.power.buttons.restart.icon": "#32302f", - "theme.bar.menus.menu.power.buttons.restart.text": "#fe8019", - "theme.bar.menus.menu.power.buttons.restart.icon_background": "#fe8019", - "theme.bar.menus.menu.power.buttons.restart.background": "#282828", - "theme.bar.menus.menu.power.buttons.shutdown.icon": "#32302f", - "theme.bar.menus.menu.power.buttons.shutdown.text": "#cc241d", - "theme.bar.menus.menu.power.buttons.shutdown.icon_background": "#cc241d", - "theme.bar.menus.menu.power.buttons.shutdown.background": "#282828", - "theme.bar.menus.menu.power.border.color": "#3c3836", - "theme.bar.menus.menu.power.background.color": "#1d2021", - "theme.bar.menus.menu.dashboard.monitors.disk.label": "#d3869b", - "theme.bar.menus.menu.dashboard.monitors.disk.bar": "#d3869b", - "theme.bar.menus.menu.dashboard.monitors.disk.icon": "#d3869b", - "theme.bar.menus.menu.dashboard.monitors.gpu.label": "#b8bb26", - "theme.bar.menus.menu.dashboard.monitors.gpu.bar": "#b8bb26", - "theme.bar.menus.menu.dashboard.monitors.gpu.icon": "#b8bb26", - "theme.bar.menus.menu.dashboard.monitors.ram.label": "#fabd2f", - "theme.bar.menus.menu.dashboard.monitors.ram.bar": "#fabd2f", - "theme.bar.menus.menu.dashboard.monitors.ram.icon": "#fabd2f", - "theme.bar.menus.menu.dashboard.monitors.cpu.label": "#fb4934", - "theme.bar.menus.menu.dashboard.monitors.cpu.bar": "#fb4934", - "theme.bar.menus.menu.dashboard.monitors.cpu.icon": "#fb4934", - "theme.bar.menus.menu.dashboard.monitors.bar_background": "#504945", - "theme.bar.menus.menu.dashboard.directories.right.bottom.color": "#83a598", - "theme.bar.menus.menu.dashboard.directories.right.middle.color": "#b16286", - "theme.bar.menus.menu.dashboard.directories.right.top.color": "#8ec07c", - "theme.bar.menus.menu.dashboard.directories.left.bottom.color": "#fb4934", - "theme.bar.menus.menu.dashboard.directories.left.middle.color": "#fabd2f", - "theme.bar.menus.menu.dashboard.directories.left.top.color": "#d3869b", - "theme.bar.menus.menu.dashboard.controls.input.text": "#32302f", - "theme.bar.menus.menu.dashboard.controls.input.background": "#d3869b", - "theme.bar.menus.menu.dashboard.controls.volume.text": "#32302f", - "theme.bar.menus.menu.dashboard.controls.volume.background": "#fb4934", - "theme.bar.menus.menu.dashboard.controls.notifications.text": "#32302f", - "theme.bar.menus.menu.dashboard.controls.notifications.background": "#fabd2f", - "theme.bar.menus.menu.dashboard.controls.bluetooth.text": "#32302f", - "theme.bar.menus.menu.dashboard.controls.bluetooth.background": "#83a598", - "theme.bar.menus.menu.dashboard.controls.wifi.text": "#32302f", - "theme.bar.menus.menu.dashboard.controls.wifi.background": "#b16286", - "theme.bar.menus.menu.dashboard.controls.disabled": "#665c54", - "theme.bar.menus.menu.dashboard.shortcuts.recording": "#b8bb26", - "theme.bar.menus.menu.dashboard.shortcuts.text": "#32302f", - "theme.bar.menus.menu.dashboard.shortcuts.background": "#83a598", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.button_text": "#1d2021", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.deny": "#d3869b", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.confirm": "#8ec07b", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.body": "#ebdbb2", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.label": "#83a598", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.border": "#3c3836", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.background": "#1d2021", - "theme.bar.menus.menu.dashboard.powermenu.confirmation.card": "#1d2021", - "theme.bar.menus.menu.dashboard.powermenu.sleep": "#83a598", - "theme.bar.menus.menu.dashboard.powermenu.logout": "#b8bb26", - "theme.bar.menus.menu.dashboard.powermenu.restart": "#fe8019", - "theme.bar.menus.menu.dashboard.powermenu.shutdown": "#cc241d", - "theme.bar.menus.menu.dashboard.profile.name": "#d3869b", - "theme.bar.menus.menu.dashboard.border.color": "#3c3836", - "theme.bar.menus.menu.dashboard.background.color": "#1d2021", - "theme.bar.menus.menu.dashboard.card.color": "#282828", - "theme.bar.menus.menu.clock.weather.hourly.temperature": "#d3869b", - "theme.bar.menus.menu.clock.weather.hourly.icon": "#d3869b", - "theme.bar.menus.menu.clock.weather.hourly.time": "#d3869b", - "theme.bar.menus.menu.clock.weather.thermometer.extremelycold": "#83a598", - "theme.bar.menus.menu.clock.weather.thermometer.cold": "#458588", - "theme.bar.menus.menu.clock.weather.thermometer.moderate": "#83a598", - "theme.bar.menus.menu.clock.weather.thermometer.hot": "#fe8019", - "theme.bar.menus.menu.clock.weather.thermometer.extremelyhot": "#cc241d", - "theme.bar.menus.menu.clock.weather.stats": "#d3869b", - "theme.bar.menus.menu.clock.weather.status": "#8ec07c", - "theme.bar.menus.menu.clock.weather.temperature": "#ebdbb2", - "theme.bar.menus.menu.clock.weather.icon": "#d3869b", - "theme.bar.menus.menu.clock.calendar.contextdays": "#665c54", - "theme.bar.menus.menu.clock.calendar.days": "#ebdbb2", - "theme.bar.menus.menu.clock.calendar.currentday": "#d3869b", - "theme.bar.menus.menu.clock.calendar.paginator": "#d3869b", - "theme.bar.menus.menu.clock.calendar.weekdays": "#d3869b", - "theme.bar.menus.menu.clock.calendar.yearmonth": "#8ec07c", - "theme.bar.menus.menu.clock.time.timeperiod": "#8ec07c", - "theme.bar.menus.menu.clock.time.time": "#d3869b", - "theme.bar.menus.menu.clock.text": "#ebdbb2", - "theme.bar.menus.menu.clock.border.color": "#3c3836", - "theme.bar.menus.menu.clock.background.color": "#1d2021", - "theme.bar.menus.menu.clock.card.color": "#282828", - "theme.bar.menus.menu.battery.slider.puck": "#7c6f64", - "theme.bar.menus.menu.battery.slider.backgroundhover": "#504945", - "theme.bar.menus.menu.battery.slider.background": "#665c54", - "theme.bar.menus.menu.battery.slider.primary": "#fabd2f", - "theme.bar.menus.menu.battery.icons.active": "#fabd2f", - "theme.bar.menus.menu.battery.icons.passive": "#a89984", - "theme.bar.menus.menu.battery.listitems.active": "#fabd2f", - "theme.bar.menus.menu.battery.listitems.passive": "#ebdbb2", - "theme.bar.menus.menu.battery.text": "#ebdbb2", - "theme.bar.menus.menu.battery.label.color": "#fabd2f", - "theme.bar.menus.menu.battery.border.color": "#3c3836", - "theme.bar.menus.menu.battery.background.color": "#1d2021", - "theme.bar.menus.menu.battery.card.color": "#282828", - "theme.bar.menus.menu.systray.dropdownmenu.divider": "#1d2021", - "theme.bar.menus.menu.systray.dropdownmenu.text": "#ebdbb2", - "theme.bar.menus.menu.systray.dropdownmenu.background": "#1d2021", - "theme.bar.menus.menu.bluetooth.iconbutton.active": "#83a598", - "theme.bar.menus.menu.bluetooth.iconbutton.passive": "#ebdbb2", - "theme.bar.menus.menu.bluetooth.icons.active": "#83a598", - "theme.bar.menus.menu.bluetooth.icons.passive": "#a89984", - "theme.bar.menus.menu.bluetooth.listitems.active": "#83a598", - "theme.bar.menus.menu.bluetooth.listitems.passive": "#ebdbb2", - "theme.bar.menus.menu.bluetooth.switch.puck": "#504945", - "theme.bar.menus.menu.bluetooth.switch.disabled": "#3c3836", - "theme.bar.menus.menu.bluetooth.switch.enabled": "#83a598", - "theme.bar.menus.menu.bluetooth.switch_divider": "#504945", - "theme.bar.menus.menu.bluetooth.status": "#7c6f64", - "theme.bar.menus.menu.bluetooth.text": "#ebdbb2", - "theme.bar.menus.menu.bluetooth.label.color": "#83a598", - "theme.bar.menus.menu.bluetooth.border.color": "#3c3836", - "theme.bar.menus.menu.bluetooth.background.color": "#1d2021", - "theme.bar.menus.menu.bluetooth.card.color": "#282828", - "theme.bar.menus.menu.network.iconbuttons.active": "#b16286", - "theme.bar.menus.menu.network.iconbuttons.passive": "#ebdbb2", - "theme.bar.menus.menu.network.icons.active": "#b16286", - "theme.bar.menus.menu.network.icons.passive": "#a89984", - "theme.bar.menus.menu.network.listitems.active": "#b16286", - "theme.bar.menus.menu.network.listitems.passive": "#ebdbb2", - "theme.bar.menus.menu.network.status.color": "#7c6f64", - "theme.bar.menus.menu.network.text": "#ebdbb2", - "theme.bar.menus.menu.network.label.color": "#b16286", - "theme.bar.menus.menu.network.border.color": "#3c3836", - "theme.bar.menus.menu.network.background.color": "#1d2021", - "theme.bar.menus.menu.network.card.color": "#282828", - "theme.bar.menus.menu.volume.input_slider.puck": "#665c54", - "theme.bar.menus.menu.volume.input_slider.backgroundhover": "#504945", - "theme.bar.menus.menu.volume.input_slider.background": "#665c54", - "theme.bar.menus.menu.volume.input_slider.primary": "#fe8018", - "theme.bar.menus.menu.volume.audio_slider.puck": "#665c54", - "theme.bar.menus.menu.volume.audio_slider.backgroundhover": "#504945", - "theme.bar.menus.menu.volume.audio_slider.background": "#665c54", - "theme.bar.menus.menu.volume.audio_slider.primary": "#fe8018", - "theme.bar.menus.menu.volume.icons.active": "#fe8018", - "theme.bar.menus.menu.volume.icons.passive": "#a89984", - "theme.bar.menus.menu.volume.iconbutton.active": "#fe8018", - "theme.bar.menus.menu.volume.iconbutton.passive": "#ebdbb2", - "theme.bar.menus.menu.volume.listitems.active": "#fe8018", - "theme.bar.menus.menu.volume.listitems.passive": "#ebdbb2", - "theme.bar.menus.menu.volume.text": "#ebdbb2", - "theme.bar.menus.menu.volume.label.color": "#fe8018", - "theme.bar.menus.menu.volume.border.color": "#3c3836", - "theme.bar.menus.menu.volume.background.color": "#1d2021", - "theme.bar.menus.menu.volume.card.color": "#282828", - "theme.bar.menus.menu.media.slider.puck": "#7c6f64", - "theme.bar.menus.menu.media.slider.backgroundhover": "#504945", - "theme.bar.menus.menu.media.slider.background": "#665c54", - "theme.bar.menus.menu.media.slider.primary": "#d3869b", - "theme.bar.menus.menu.media.buttons.text": "#1d2021", - "theme.bar.menus.menu.media.buttons.background": "#83a598", - "theme.bar.menus.menu.media.buttons.enabled": "#8ec07c", - "theme.bar.menus.menu.media.buttons.inactive": "#665c54", - "theme.bar.menus.menu.media.border.color": "#3c3836", - "theme.bar.menus.menu.media.card.color": "#282828", - "theme.bar.menus.menu.media.background.color": "#1d2021", - "theme.bar.menus.menu.media.album": "#d3869b", - "theme.bar.menus.menu.media.artist": "#8ec07c", - "theme.bar.menus.menu.media.song": "#83a598", - "theme.bar.menus.tooltip.text": "#ebdbb2", - "theme.bar.menus.tooltip.background": "#1d2021", - "theme.bar.menus.dropdownmenu.divider": "#1d2021", - "theme.bar.menus.dropdownmenu.text": "#ebdbb2", - "theme.bar.menus.dropdownmenu.background": "#1d2021", - "theme.bar.menus.slider.puck": "#7c6f64", - "theme.bar.menus.slider.backgroundhover": "#504945", - "theme.bar.menus.slider.background": "#665c54", - "theme.bar.menus.slider.primary": "#83a598", - "theme.bar.menus.progressbar.background": "#504945", - "theme.bar.menus.progressbar.foreground": "#83a598", - "theme.bar.menus.iconbuttons.active": "#83a598", - "theme.bar.menus.iconbuttons.passive": "#ebdbb2", - "theme.bar.menus.buttons.text": "#32302f", - "theme.bar.menus.buttons.disabled": "#665c54", - "theme.bar.menus.buttons.active": "#d3869b", - "theme.bar.menus.buttons.default": "#83a598", - "theme.bar.menus.check_radio_button.active": "#83a598", - "theme.bar.menus.check_radio_button.background": "#3c3836", - "theme.bar.menus.switch.puck": "#504945", - "theme.bar.menus.switch.disabled": "#3c3836", - "theme.bar.menus.switch.enabled": "#83a598", - "theme.bar.menus.icons.active": "#83a598", - "theme.bar.menus.icons.passive": "#665c54", - "theme.bar.menus.listitems.active": "#83a598", - "theme.bar.menus.listitems.passive": "#ebdbb2", - "theme.bar.menus.popover.border": "#32302f", - "theme.bar.menus.popover.background": "#32302f", - "theme.bar.menus.popover.text": "#83a598", - "theme.bar.menus.label": "#83a598", - "theme.bar.menus.feinttext": "#3c3836", - "theme.bar.menus.dimtext": "#665c54", - "theme.bar.menus.text": "#ebdbb2", - "theme.bar.menus.border.color": "#3c3836", - "theme.bar.menus.cards": "#1d2021", - "theme.bar.menus.background": "#1d2021", - "theme.bar.buttons.modules.power.icon_background": "#282828", - "theme.bar.buttons.modules.power.icon": "#cc241d", - "theme.bar.buttons.modules.power.background": "#282828", - "theme.bar.buttons.modules.weather.icon_background": "#282828", - "theme.bar.buttons.modules.weather.icon": "#fe8017", - "theme.bar.buttons.modules.weather.text": "#fe8017", - "theme.bar.buttons.modules.weather.background": "#282828", - "theme.bar.buttons.modules.updates.icon_background": "#282828", - "theme.bar.buttons.modules.updates.icon": "#b16286", - "theme.bar.buttons.modules.updates.text": "#b16286", - "theme.bar.buttons.modules.updates.background": "#282828", - "theme.bar.buttons.modules.kbLayout.icon_background": "#282828", - "theme.bar.buttons.modules.kbLayout.icon": "#83a598", - "theme.bar.buttons.modules.kbLayout.text": "#83a598", - "theme.bar.buttons.modules.kbLayout.background": "#282828", - "theme.bar.buttons.modules.netstat.icon_background": "#282828", - "theme.bar.buttons.modules.netstat.icon": "#b8bb26", - "theme.bar.buttons.modules.netstat.text": "#b8bb26", - "theme.bar.buttons.modules.netstat.background": "#282828", - "theme.bar.buttons.modules.storage.icon_background": "#282828", - "theme.bar.buttons.modules.storage.icon": "#83a598", - "theme.bar.buttons.modules.storage.text": "#83a598", - "theme.bar.buttons.modules.storage.background": "#282828", - "theme.bar.buttons.modules.cpu.icon_background": "#282828", - "theme.bar.buttons.modules.cpu.icon": "#d3869b", - "theme.bar.buttons.modules.cpu.text": "#d3869b", - "theme.bar.buttons.modules.cpu.background": "#282828", - "theme.bar.buttons.modules.ram.icon_background": "#282828", - "theme.bar.buttons.modules.ram.icon": "#fabd2f", - "theme.bar.buttons.modules.ram.text": "#fabd2f", - "theme.bar.buttons.modules.ram.background": "#282828", - "theme.bar.buttons.notifications.total": "#83a598", - "theme.bar.buttons.notifications.icon_background": "#83a598", - "theme.bar.buttons.notifications.icon": "#83a598", - "theme.bar.buttons.notifications.background": "#3c3836", - "theme.bar.buttons.clock.icon_background": "#d3869b", - "theme.bar.buttons.clock.icon": "#d3869b", - "theme.bar.buttons.clock.text": "#d3869b", - "theme.bar.buttons.clock.background": "#3c3836", - "theme.bar.buttons.battery.icon_background": "#fabd2f", - "theme.bar.buttons.battery.icon": "#fabd2f", - "theme.bar.buttons.battery.text": "#fabd2f", - "theme.bar.buttons.battery.background": "#282828", - "theme.bar.buttons.systray.background": "#3c3836", - "theme.bar.buttons.bluetooth.icon_background": "#83a598", - "theme.bar.buttons.bluetooth.icon": "#83a598", - "theme.bar.buttons.bluetooth.text": "#83a598", - "theme.bar.buttons.bluetooth.background": "#3c3836", - "theme.bar.buttons.network.icon_background": "#b16286", - "theme.bar.buttons.network.icon": "#b16286", - "theme.bar.buttons.network.text": "#b16286", - "theme.bar.buttons.network.background": "#3c3836", - "theme.bar.buttons.volume.icon_background": "#fe8018", - "theme.bar.buttons.volume.icon": "#fe8018", - "theme.bar.buttons.volume.text": "#fe8018", - "theme.bar.buttons.volume.background": "#3c3836", - "theme.bar.buttons.media.icon_background": "#83a598", - "theme.bar.buttons.media.icon": "#83a598", - "theme.bar.buttons.media.text": "#83a598", - "theme.bar.buttons.media.background": "#3c3836", - "theme.bar.buttons.windowtitle.icon_background": "#d3869b", - "theme.bar.buttons.windowtitle.icon": "#d3869b", - "theme.bar.buttons.windowtitle.text": "#d3869b", - "theme.bar.buttons.windowtitle.background": "#3c3836", - "theme.bar.buttons.workspaces.numbered_active_underline_color": "#ffffff", - "theme.bar.buttons.workspaces.numbered_active_highlighted_text_color": "#21252b", - "theme.bar.buttons.workspaces.active": "#d3869b", - "theme.bar.buttons.workspaces.occupied": "#fb4934", - "theme.bar.buttons.workspaces.available": "#83a598", - "theme.bar.buttons.workspaces.hover": "#504945", - "theme.bar.buttons.workspaces.background": "#3c3836", - "theme.bar.buttons.dashboard.icon": "#fabd2f", - "theme.bar.buttons.dashboard.background": "#3c3836", - "theme.bar.buttons.icon": "#83a598", - "theme.bar.buttons.text": "#83a598", - "theme.bar.buttons.hover": "#504945", - "theme.bar.buttons.icon_background": "#242438", - "theme.bar.buttons.background": "#3c3836", - "theme.bar.buttons.style": "default", - "theme.bar.background": "#282828", - "theme.osd.label": "#83a598", - "theme.osd.icon": "#1d2021", - "theme.osd.bar_overflow_color": "#cc241d", - "theme.osd.bar_empty_color": "#3c3836", - "theme.osd.bar_color": "#83a598", - "theme.osd.icon_container": "#83a598", - "theme.osd.bar_container": "#1d2021", - "theme.notification.close_button.label": "#1d2021", - "theme.notification.close_button.background": "#83a598", - "theme.notification.labelicon": "#83a598", - "theme.notification.text": "#ebdbb2", - "theme.notification.time": "#928374", - "theme.notification.border": "#3c3836", - "theme.notification.label": "#83a598", - "theme.notification.actions.text": "#32302f", - "theme.notification.actions.background": "#83a598", - "theme.notification.background": "#32302f", - "theme.bar.buttons.modules.power.border": "#282828", - "theme.bar.buttons.modules.weather.border": "#fe8017", - "theme.bar.buttons.modules.updates.border": "#b16286", - "theme.bar.buttons.modules.kbLayout.border": "#83a598", - "theme.bar.buttons.modules.netstat.border": "#b8bb26", - "theme.bar.buttons.modules.storage.border": "#83a598", - "theme.bar.buttons.modules.cpu.border": "#d3869b", - "theme.bar.buttons.modules.ram.border": "#fabd2f", - "theme.bar.buttons.notifications.border": "#83a598", - "theme.bar.buttons.clock.border": "#d3869b", - "theme.bar.buttons.battery.border": "#fabd2f", - "theme.bar.buttons.systray.border": "#504945", - "theme.bar.buttons.bluetooth.border": "#83a598", - "theme.bar.buttons.network.border": "#b16286", - "theme.bar.buttons.volume.border": "#fe8018", - "theme.bar.buttons.media.border": "#83a598", - "theme.bar.buttons.windowtitle.border": "#d3869b", - "theme.bar.buttons.workspaces.border": "#ffffff", - "theme.bar.buttons.dashboard.border": "#fabd2f", - "theme.bar.buttons.modules.submap.background": "#282828", - "theme.bar.buttons.modules.submap.text": "#8ec07c", - "theme.bar.buttons.modules.submap.border": "#8ec07c", - "theme.bar.buttons.modules.submap.icon": "#8ec07c", - "theme.bar.buttons.modules.submap.icon_background": "#282828", - "theme.bar.menus.menu.network.switch.enabled": "#b16286", - "theme.bar.menus.menu.network.switch.disabled": "#3c3836", - "theme.bar.menus.menu.network.switch.puck": "#504945", - "theme.bar.buttons.systray.customIcon": "#ebdbb2", - "theme.bar.border.color": "#83a598", - "theme.bar.menus.menu.media.timestamp": "#ebdbb2", - "theme.bar.buttons.borderColor": "#83a598", - "theme.bar.buttons.modules.hyprsunset.icon": "#fabd2f", - "theme.bar.buttons.modules.hyprsunset.background": "#282828", - "theme.bar.buttons.modules.hyprsunset.icon_background": "#282828", - "theme.bar.buttons.modules.hyprsunset.text": "#fabd2f", - "theme.bar.buttons.modules.hyprsunset.border": "#fabd2f", - "theme.bar.buttons.modules.hypridle.icon": "#83a598", - "theme.bar.buttons.modules.hypridle.background": "#282828", - "theme.bar.buttons.modules.hypridle.icon_background": "#282828", - "theme.bar.buttons.modules.hypridle.text": "#83a598", - "theme.bar.buttons.modules.hypridle.border": "#83a598", "theme.bar.transparent": false, "theme.bar.menus.card_radius": "0.4em", "theme.bar.menus.border.radius": "0.7em", diff --git a/modules/kitty/kitty.conf b/modules/kitty/kitty.conf index 8b923b1..ffa4166 100644 --- a/modules/kitty/kitty.conf +++ b/modules/kitty/kitty.conf @@ -1,4 +1,4 @@ -include themes/gruvbox.conf +include themes/tokyo-night-kitty.conf font_family Fira Code Nerd Font bold_font auto @@ -8,3 +8,4 @@ bold_italic_font auto confirm_os_window_close 0 background_opacity 0.8 background_blur 0 +cursor_shape beam diff --git a/modules/kitty/themes/tokyo-night-kitty.conf b/modules/kitty/themes/tokyo-night-kitty.conf new file mode 100644 index 0000000..e309eee --- /dev/null +++ b/modules/kitty/themes/tokyo-night-kitty.conf @@ -0,0 +1,77 @@ +# Tokyo Night color scheme for kitty terminal emulator +# https://github.com/davidmathers/tokyo-night-kitty-theme +# +# Based on Tokyo Night color theme for Visual Studio Code +# https://github.com/enkia/tokyo-night-vscode-theme + +foreground #a9b1d6 +background #1a1b26 + +# Black +color0 #414868 +color8 #414868 + +# Red +color1 #f7768e +color9 #f7768e + +# Green +color2 #73daca +color10 #73daca + +# Yellow +color3 #e0af68 +color11 #e0af68 + +# Blue +color4 #7aa2f7 +color12 #7aa2f7 + +# Magenta +color5 #bb9af7 +color13 #bb9af7 + +# Cyan +color6 #7dcfff +color14 #7dcfff + +# White +color7 #c0caf5 +color15 #c0caf5 + +# Cursor +cursor #c0caf5 +cursor_text_color #1a1b26 + +# Selection highlight +selection_foreground none +selection_background #28344a + +# The color for highlighting URLs on mouse-over +url_color #9ece6a + +# Window borders +active_border_color #3d59a1 +inactive_border_color #101014 +bell_border_color #e0af68 + +# Tab bar +tab_bar_style fade +tab_fade 1 +active_tab_foreground #3d59a1 +active_tab_background #16161e +active_tab_font_style bold +inactive_tab_foreground #787c99 +inactive_tab_background #16161e +inactive_tab_font_style bold +tab_bar_background #101014 + +# Title bar +macos_titlebar_color #16161e + +# Storm +# background #24283b +# cursor_text_color #24283b +# active_tab_background #1f2335 +# inactive_tab_background #1f2335 +# macos_titlebar_color #1f2335 diff --git a/modules/nvim/default.nix b/modules/nvim/default.nix index 3b3a238..908231c 100644 --- a/modules/nvim/default.nix +++ b/modules/nvim/default.nix @@ -3,7 +3,7 @@ { programs.nixvim = { enable = true; - colorschemes.gruvbox.enable = true; + colorschemes.tokyonight.enable = true; plugins.nvim-tree.enable = true; plugins.treesitter.enable = true; plugins.lualine.enable = true; diff --git a/modules/rofi/apps.rasi b/modules/rofi/apps.rasi index d7d0d7d..96cb711 100644 --- a/modules/rofi/apps.rasi +++ b/modules/rofi/apps.rasi @@ -14,4 +14,4 @@ configuration { } -@theme "~/.config/rofi/gruvbox-material.rasi" +@theme "~/.config/rofi/tokyo-night.rasi" diff --git a/modules/rofi/config.rasi b/modules/rofi/config.rasi index d7d0d7d..445f312 100644 --- a/modules/rofi/config.rasi +++ b/modules/rofi/config.rasi @@ -1,7 +1,6 @@ configuration { show-icons: true; font: "FreeSans Regular 12"; - icon-theme: "Gruvbox-Plus-Dark"; display-ssh: "󰣀 ssh:"; display-run: "󱓞 run:"; @@ -14,4 +13,4 @@ configuration { } -@theme "~/.config/rofi/gruvbox-material.rasi" +@theme "~/.config/rofi/tokyo-night.rasi" diff --git a/modules/rofi/gruvbox-material.rasi b/modules/rofi/gruvbox-material.rasi deleted file mode 100644 index 30c40e3..0000000 --- a/modules/rofi/gruvbox-material.rasi +++ /dev/null @@ -1,141 +0,0 @@ -* { - gruv0: #282828; - gruv1: #32302f; - gruv2: #45403d; - gruv3: #5a524c; - - gruv4: #fbf1c7; - gruv5: #f4e8be; - gruv6: #eee0b7; - - gruv7: #a89984; - gruv8: #928374; - gruv9: #7c6f64; - gruv10: #504945; - red: #ea6962; - - orange: #e78a4e; - yellow: #d8a657; - aqua: #89b482; - purple: #d3869b; - - reddark: #c14a4a; - yellowdark: #b47109; - - foreground: @gruv9; - background-color: transparent; - - highlight: underline bold #eee0b7; - - transparent: rgba(0,0,0,0.1); - -} - -window { - location: center; - anchor: center; - border-radius: 20px; - height: 560px; - width: 600px; - - background-color: #282828; - spacing: 0; - children: [mainbox]; - orientation: horizontal; -} - -mainbox { - spacing: 0; - children: [ inputbar, message, listview ]; -} - -message { - padding: 10px; - border: 0px 2px 2px 2px; - border-color: @gruv0; - background-color: @transparent; -} - -inputbar { - color: @gruv6; - padding: 14px; - background-color: @transparent; - border-color: @gruv6; - - border: 4px; - border-radius: 20px 20px 0px 0px; -} - -entry, prompt, case-indicator { - text-font: inherit; - text-color: inherit; -} - -prompt { - margin: 0px 1em 0em 0em ; -} - -listview { - padding: 8px; - border-radius: 0px 0px 20px 20px; - border: 0px 4px 4px 4px; - border-color: @gruv6; - background-color: @transparent; - dynamic: false; -} - -element { - padding: 5px; - vertical-align: 0.5; - border-radius: 5px; - color: @foreground; - text-color: @gruv6; - background-color: @transparent; -} - -element.normal.active { - background-color: @yellow; -} - -element.normal.urgent { - background-color: @reddark; -} - -element.selected.normal { - background-color: @gruv7; - text-color: @gruv0; -} - -element.selected.active { - background-color: @yellowdark; -} - -element.selected.urgent { - background-color: @red; -} - -element.alternate.normal { - background-color: @transparent; -} - -element-text, element-icon { - size: 3ch; - margin: 0 10 0 0; - vertical-align: 0.5; - text-color: @gruv6; -} - -button { - padding: 6px; - color: @foreground; - horizontal-align: 0.5; - - border: 2px 0px 2px 2px; - border-radius: 5px; - border-color: @foreground; -} - -button.selected.normal { - border: 2px 0px 2px 2px; - border-color: @foreground; -} diff --git a/modules/rofi/tokyo-night.rasi b/modules/rofi/tokyo-night.rasi new file mode 100644 index 0000000..ae2f6bb --- /dev/null +++ b/modules/rofi/tokyo-night.rasi @@ -0,0 +1,132 @@ +* { + scrollbar: false; + + bg: #24283b; + bg-dark: #1f2335; + bg-highlight: #292e42; + fg: #c0caf5; + fg-dark: #3b4261; + red-dark: #db4b4b; + red-light: #f7768e; + yellow: #e0af68; + orange: #ff9e64; + gray: #565f89; + + background: @bg-dark; + background-color: @background; + foreground: @fg; + border-color: @gray; + separatorcolor: @border-color; + scrollbar-handle: @border-color; + + normal-background: @background; + normal-foreground: @foreground; + alternate-normal-background: @bg-dark; + alternate-normal-foreground: @fg; + selected-normal-background: @bg-highlight; + selected-normal-foreground: @fg; + + active-background: @orange; + active-foreground: @bg; + alternate-active-background: @active-background; + alternate-active-foreground: @active-foreground; + selected-active-background: @yellow; + selected-active-foreground: @active-foreground; + + urgent-background: @red-dark; + urgent-foreground: @background; + alternate-urgent-background: @urgent-background; + alternate-urgent-foreground: @urgent-foreground; + selected-urgent-background: @red-dark; + selected-urgent-foreground: @urgent-foreground; +} + +window { + height: 600; + width: 600; + + border-radius: 10; +} + +mainbox { + spacing: 0; + children: [inputbar, message, listview]; +} + +inputbar { + color: @normal-foreground; + padding: 14; + background-color: @background; +} + +message { + padding: 10; + background-color: @background; +} + +listview { + padding: 8; + border-radius: 0 0 10 10; + border: 2 2 2 2; + border-color: @background; + background-color: @background; + dynamic: false; +} + +textbox { + text-color: @normal-foreground; +} + +error-message { + border: 20 20 20 20; +} + +entry, prompt, case-indicator { + text-color: inherit; +} + +prompt { + margin: 0 10 0 0; +} + +element { + padding: 5; + vertical-align: 0.5; + border-radius: 10; + text-color: @normal-foreground; + background-color: @normal-background; +} + +element.selected.normal { + background-color: @selected-normal-background; +} + +element.alternate.normal { + background-color: inherit; +} + +element.normal.active, element.alternate.active { + background-color: @background; +} + +element.selected.active { + background-color: @selected-normal-background; +} + +element.normal.urgent, element.alternate.urgent { + background-color: @urgent-background; +} + +element.selected.urgent { + background-color: @urgent-background; +} + +element-text, element-icon { + size: 40; + margin: 0 10 0 0; + vertical-align: 0.5; + background-color: inherit; + text-color: @normal-foreground; +} + + diff --git a/modules/wallpaper-engine/effects/_empty/effect.json b/modules/wallpaper-engine/effects/_empty/effect.json new file mode 100644 index 0000000..4c98dce --- /dev/null +++ b/modules/wallpaper-engine/effects/_empty/effect.json @@ -0,0 +1,17 @@ +{ + "version" : 1, + "replacementkey" : "empty", + "group" : "colorize", + "passes" : + [ + { + "material" : "materials/effects/empty.json" + } + ], + "dependencies" : + [ + "materials/effects/empty.json", + "shaders/effects/empty.frag", + "shaders/effects/empty.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/_empty/materials/effects/empty.json b/modules/wallpaper-engine/effects/_empty/materials/effects/empty.json new file mode 100644 index 0000000..db2d3d4 --- /dev/null +++ b/modules/wallpaper-engine/effects/_empty/materials/effects/empty.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/empty", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/_empty/shaders/effects/empty.frag b/modules/wallpaper-engine/effects/_empty/shaders/effects/empty.frag new file mode 100644 index 0000000..8af5b25 --- /dev/null +++ b/modules/wallpaper-engine/effects/_empty/shaders/effects/empty.frag @@ -0,0 +1,9 @@ + +uniform sampler2D g_Texture0; // {"material":"framebuffer","label":"ui_editor_properties_framebuffer","hidden":true} + +varying vec2 v_TexCoord; + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/_empty/shaders/effects/empty.vert b/modules/wallpaper-engine/effects/_empty/shaders/effects/empty.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/_empty/shaders/effects/empty.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/blend/effect.json b/modules/wallpaper-engine/effects/blend/effect.json new file mode 100644 index 0000000..668ab0e --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "blend", + "name" : "ui_editor_effect_blend_title", + "description" : "ui_editor_effect_blend_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blend.json" + } + ], + "dependencies" : + [ + "materials/effects/blend.json", + "shaders/effects/blend.frag", + "shaders/effects/blend.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/materials/effects/blend.json b/modules/wallpaper-engine/effects/blend/materials/effects/blend.json new file mode 100644 index 0000000..9f5f5b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/materials/effects/blend.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blend", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blend/preview/effects/blend/effect.json b/modules/wallpaper-engine/effects/blend/preview/effects/blend/effect.json new file mode 100644 index 0000000..a24444a --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/effects/blend/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Blend", + "description" : "Blend two images with various modes.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blend.json" + } + ], + "dependencies" : + [ + "materials/effects/blend.json", + "shaders/effects/blend.frag", + "shaders/effects/blend.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/effects/opacity/effect.json b/modules/wallpaper-engine/effects/blend/preview/effects/opacity/effect.json new file mode 100644 index 0000000..92f806d --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/effects/opacity/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Opacity", + "description" : "Adds an opacity mask to the image.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/opacity.json" + } + ], + "dependencies" : + [ + "materials/effects/opacity.json", + "shaders/effects/opacity.frag", + "shaders/effects/opacity.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/effects/scroll/effect.json b/modules/wallpaper-engine/effects/blend/preview/effects/scroll/effect.json new file mode 100644 index 0000000..e8e8687 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/effects/scroll/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Scroll", + "description" : "Scrolls the image horizontally or vertically.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/scroll.json" + } + ], + "dependencies" : + [ + "materials/effects/scroll.json", + "shaders/effects/scroll.frag", + "shaders/effects/scroll.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/effects/spin/effect.json b/modules/wallpaper-engine/effects/blend/preview/effects/spin/effect.json new file mode 100644 index 0000000..8553173 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/effects/spin/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Spin", + "description" : "Spin the image.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/spin.json" + } + ], + "dependencies" : + [ + "materials/effects/spin.json", + "shaders/effects/spin.frag", + "shaders/effects/spin.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/effects/transform/effect.json b/modules/wallpaper-engine/effects/blend/preview/effects/transform/effect.json new file mode 100644 index 0000000..f7a71a2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/effects/transform/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Transform", + "description" : "Apply scaling, rotation and offsets to the image.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/transform.json" + } + ], + "dependencies" : + [ + "materials/effects/transform.json", + "shaders/effects/transform.frag", + "shaders/effects/transform.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/blend/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/blend/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/blend/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effects/blend.json b/modules/wallpaper-engine/effects/blend/preview/materials/effects/blend.json new file mode 100644 index 0000000..9f5f5b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/effects/blend.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blend", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effects/opacity.json b/modules/wallpaper-engine/effects/blend/preview/materials/effects/opacity.json new file mode 100644 index 0000000..01b5699 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/effects/opacity.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/opacity", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effects/scroll.json b/modules/wallpaper-engine/effects/blend/preview/materials/effects/scroll.json new file mode 100644 index 0000000..7471904 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/effects/scroll.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/scroll", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effects/spin.json b/modules/wallpaper-engine/effects/blend/preview/materials/effects/spin.json new file mode 100644 index 0000000..0bbd366 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/effects/spin.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/spin", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/effects/transform.json b/modules/wallpaper-engine/effects/blend/preview/materials/effects/transform.json new file mode 100644 index 0000000..47b6a90 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/effects/transform.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/transform", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/blend/preview/materials/masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..18f60bd Binary files /dev/null and b/modules/wallpaper-engine/effects/blend/preview/materials/masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/blend/preview/materials/masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/blend/preview/materials/masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/materials/masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/blend/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/project.json b/modules/wallpaper-engine/effects/blend/preview/project.json new file mode 100644 index 0000000..c3b4e27 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewblend", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/scene.json b/modules/wallpaper-engine/effects/blend/preview/scene.json new file mode 100644 index 0000000..33de141 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/scene.json @@ -0,0 +1,115 @@ +{ + "camera" : + { + "center" : "-121.595 -15.576 -1.000", + "eye" : "-121.595 -15.576 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "dependencies" : [ 15 ], + "depth" : 1, + "effects" : + [ + { + "file" : "effects/blend/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 23 + }, + "constantshadervalues" : null, + "textures" : [ null, "_rt_imageLayerComposite_15_a" ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + }, + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/transform/effect.json", + "passes" : + [ + { + "combos" : + { + "CLAMP" : 1, + "MODE" : 0 + }, + "constantshadervalues" : + { + "Angle" : 0, + "Scale" : "3 3" + } + } + ] + }, + { + "file" : "effects/spin/effect.json", + "passes" : + [ + { + "combos" : + { + "MODE" : 0 + }, + "constantshadervalues" : null + } + ] + }, + { + "file" : "effects/opacity/effect.json", + "passes" : + [ + { + "combos" : null, + "constantshadervalues" : null, + "textures" : [ null, "masks/opacity_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" ] + } + ] + } + ], + "id" : 15, + "image" : "models/effectpreview.json", + "name" : "effectpreview", + "origin" : "-204.142 136.225 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/blend.frag b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/blend.frag new file mode 100644 index 0000000..5a7b3b7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/blend.frag @@ -0,0 +1,18 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Color mask","mode":"rgbmask","default":"util/white"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, mask.a); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/blend.vert b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/blend.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/blend.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/opacity.frag b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/opacity.frag new file mode 100644 index 0000000..b0f7360 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/opacity.frag @@ -0,0 +1,13 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo.a *= mask; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/opacity.vert b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/opacity.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/opacity.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/scroll.frag b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/scroll.frag new file mode 100644 index 0000000..3aed35f --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/scroll.frag @@ -0,0 +1,10 @@ + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = frac(v_TexCoord + v_Scroll); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/scroll.vert b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/scroll.vert new file mode 100644 index 0000000..27fdae7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/scroll.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_ScrollX; // {"material":"Speed X","default":0.2,"range":[-2,2]} +uniform float g_ScrollY; // {"material":"Speed Y","default":0.2,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; + + vec2 scroll = vec2(g_ScrollX, g_ScrollY); + scroll = sign(scroll) * pow(vec2(g_ScrollX, g_ScrollY), CAST2(2.0)); + v_Scroll = scroll * g_Time; +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/spin.frag b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/spin.frag new file mode 100644 index 0000000..44d0e1b --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/spin.frag @@ -0,0 +1,14 @@ + +// [COMBO] {"material":"Repeat","combo":"CLAMP","type":"options","default":1} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = v_TexCoord; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/spin.vert b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/spin.vert new file mode 100644 index 0000000..0bcbf74 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/spin.vert @@ -0,0 +1,29 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_Speed; // {"material":"Speed","default":1.0,"range":[-5,5]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = rotateVec2(position.xy - CAST2(0.5), g_Speed * g_Time) + CAST2(0.5); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; + +#if MODE == 0 + v_TexCoord = rotateVec2(v_TexCoord - CAST2(0.5), g_Speed * g_Time) + CAST2(0.5); +#endif +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/transform.frag b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/transform.frag new file mode 100644 index 0000000..278820f --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/transform.frag @@ -0,0 +1,14 @@ + +// [COMBO] {"material":"Repeat","combo":"CLAMP","type":"options","default":0} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = v_TexCoord; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/blend/preview/shaders/effects/transform.vert b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/transform.vert new file mode 100644 index 0000000..8364fed --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/shaders/effects/transform.vert @@ -0,0 +1,35 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec2 g_Offset; // {"material":"Offset","default":"0 0"} +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1"} +uniform float g_Direction; // {"material":"Angle","default":0,"range":[0,6.28]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +vec2 applyFx(vec2 v) { + v = rotateVec2(v - CAST2(0.5), g_Direction); + return (v + g_Offset) * g_Scale + CAST2(0.5); +} + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = applyFx(position.xy); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; + +#if MODE == 0 + v_TexCoord = applyFx(v_TexCoord); +#endif +} diff --git a/modules/wallpaper-engine/effects/blend/preview/template.json b/modules/wallpaper-engine/effects/blend/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blend/shaders/effects/blend.frag b/modules/wallpaper-engine/effects/blend/shaders/effects/blend.frag new file mode 100644 index 0000000..43e413b --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/shaders/effects/blend.frag @@ -0,0 +1,127 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":2} +// [COMBO] {"material":"ui_editor_properties_transform","combo":"TRANSFORMUV","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_transform_repeat","combo":"TRANSFORMREPEAT","type":"options","default":0,"options":{"ui_editor_properties_clip":0,"ui_editor_properties_repeat":1,"ui_editor_properties_clamp_uvs":2},"require":{"TRANSFORMUV":1}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_number_of_textures","combo":"NUMBLENDTEXTURES","type":"options","default":1,"options":{"1":1,"2":2,"3":3,"4":4,"5":5,"6":6}} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +#if NUMBLENDTEXTURES >= 2 +varying vec4 v_TexCoord23; +#endif + +#if NUMBLENDTEXTURES >= 4 +varying vec4 v_TexCoord45; +#endif + +#if NUMBLENDTEXTURES >= 6 +varying vec2 v_TexCoord6; +#endif + +uniform float g_Multiply; // {"material":"multiply","label":"ui_editor_properties_blend_amount","default":1,"range":[0.0, 2.0]} +uniform float g_Multiply2; // {"material":"multiply2","label":"ui_editor_properties_blend_amount_2","default":1,"range":[0.0, 2.0]} +uniform float g_Multiply3; // {"material":"multiply3","label":"ui_editor_properties_blend_amount_3","default":1,"range":[0.0, 2.0]} +uniform float g_Multiply4; // {"material":"multiply4","label":"ui_editor_properties_blend_amount_4","default":1,"range":[0.0, 2.0]} +uniform float g_Multiply5; // {"material":"multiply5","label":"ui_editor_properties_blend_amount_5","default":1,"range":[0.0, 2.0]} +uniform float g_Multiply6; // {"material":"multiply6","label":"ui_editor_properties_blend_amount_6","default":1,"range":[0.0, 2.0]} +uniform float g_AlphaMultiply; // {"material":"alpha","label":"ui_editor_properties_alpha","default":1,"range":[0.0, 1.0]} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture7; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} + +#if NUMBLENDTEXTURES >= 2 +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +#endif + +#if NUMBLENDTEXTURES >= 3 +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +#endif + +#if NUMBLENDTEXTURES >= 4 +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +#endif + +#if NUMBLENDTEXTURES >= 5 +uniform sampler2D g_Texture5; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +#endif + +#if NUMBLENDTEXTURES >= 6 +uniform sampler2D g_Texture6; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +#endif + +float GetUVBlend(vec2 uv) +{ +#if TRANSFORMUV == 1 && TRANSFORMREPEAT == 0 + return step(0.99, dot(step(CAST2(0.0), uv) * step(uv, CAST2(1.0)), CAST2(0.5))); +#endif + return 1.0; +} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + vec2 blendUV = v_TexCoord.zw; +#if TRANSFORMUV == 1 && TRANSFORMREPEAT == 1 + blendUV = frac(blendUV); +#endif + + vec4 blendColors = texSample2D(g_Texture1, blendUV); + float blend = 1.0; + +#if OPACITYMASK == 1 + blend *= texSample2D(g_Texture7, v_TexCoordOpacity).r; +#endif + + float blendAlpha = GetUVBlend(blendUV) * blend * g_Multiply * blendColors.a; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, blendAlpha); + +#if NUMBLENDTEXTURES >= 2 + blendUV = frac(v_TexCoord23.xy); + blendColors = texSample2D(g_Texture2, blendUV); + blendAlpha *= blendColors.a * g_Multiply2; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, GetUVBlend(blendUV) * blend * g_Multiply2 * blendColors.a); +#endif + +#if NUMBLENDTEXTURES >= 3 + blendUV = frac(v_TexCoord23.zw); + blendColors = texSample2D(g_Texture3, blendUV); + blendAlpha *= blendColors.a * g_Multiply3; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, GetUVBlend(blendUV) * blend * g_Multiply3 * blendColors.a); +#endif + +#if NUMBLENDTEXTURES >= 4 + blendUV = frac(v_TexCoord45.xy); + blendColors = texSample2D(g_Texture4, blendUV); + blendAlpha *= blendColors.a * g_Multiply4; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, GetUVBlend(blendUV) * blend * g_Multiply4 * blendColors.a); +#endif + +#if NUMBLENDTEXTURES >= 5 + blendUV = frac(v_TexCoord45.zw); + blendColors = texSample2D(g_Texture5, blendUV); + blendAlpha *= blendColors.a * g_Multiply5; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, GetUVBlend(blendUV) * blend * g_Multiply5 * blendColors.a); +#endif + +#if NUMBLENDTEXTURES >= 6 + blendUV = frac(v_TexCoord6.xy); + blendColors = texSample2D(g_Texture6, blendUV); + blendAlpha *= blendColors.a * g_Multiply6; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, GetUVBlend(blendUV) * blend * g_Multiply6 * blendColors.a); +#endif + + +#if WRITEALPHA + albedo.a = blendColors.a * g_AlphaMultiply; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blend/shaders/effects/blend.vert b/modules/wallpaper-engine/effects/blend/shaders/effects/blend.vert new file mode 100644 index 0000000..d560371 --- /dev/null +++ b/modules/wallpaper-engine/effects/blend/shaders/effects/blend.vert @@ -0,0 +1,91 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; +uniform vec4 g_Texture2Resolution; +uniform vec4 g_Texture3Resolution; +uniform vec4 g_Texture4Resolution; +uniform vec4 g_Texture5Resolution; +uniform vec4 g_Texture6Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture7Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +#if TRANSFORMUV == 1 +uniform vec4 g_Texture0Resolution; +#endif + +uniform vec2 g_BlendOffset; // {"material":"blendoffset","label":"ui_editor_properties_offset","default":"0 0"} +uniform float g_BlendAngle; // {"material":"blendangle","label":"ui_editor_properties_angle","default":0,"range":[0,6.28]} +uniform float g_BlendScale; // {"material":"blendscale","label":"ui_editor_properties_scale","default":1,"range":[0.01,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if NUMBLENDTEXTURES >= 2 +varying vec4 v_TexCoord23; +#endif +#if NUMBLENDTEXTURES >= 4 +varying vec4 v_TexCoord45; +#endif +#if NUMBLENDTEXTURES >= 6 +varying vec2 v_TexCoord6; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#if NUMBLENDTEXTURES >= 2 + v_TexCoord23.xy = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); + v_TexCoord23.zw = CAST2(0.0); +#endif +#if NUMBLENDTEXTURES >= 3 + v_TexCoord23.zw = vec2(v_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + v_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif +#if NUMBLENDTEXTURES >= 4 + v_TexCoord45.xy = vec2(v_TexCoord.x * g_Texture4Resolution.z / g_Texture4Resolution.x, + v_TexCoord.y * g_Texture4Resolution.w / g_Texture4Resolution.y); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if NUMBLENDTEXTURES >= 5 + v_TexCoord45.zw = vec2(v_TexCoord.x * g_Texture5Resolution.z / g_Texture5Resolution.x, + v_TexCoord.y * g_Texture5Resolution.w / g_Texture5Resolution.y); +#endif +#if NUMBLENDTEXTURES >= 6 + v_TexCoord6.xy = vec2(v_TexCoord.x * g_Texture6Resolution.z / g_Texture6Resolution.x, + v_TexCoord.y * g_Texture6Resolution.w / g_Texture6Resolution.y); +#endif + +#if TRANSFORMUV == 1 + vec2 scaleA = g_Texture0Resolution.zw / g_Texture1Resolution.zw; + //vec2 scaleB = g_Texture0Resolution.wz / g_Texture1Resolution.wz; + //vec2 dir = abs(rotateVec2(vec2(1, 0), g_BlendAngle)); + + v_TexCoord.zw -= (g_BlendOffset - (g_Texture0Resolution.zw - g_Texture1Resolution.zw) * 0.5) / g_Texture0Resolution.zw; + + v_TexCoord.zw -= CAST2(0.5); + v_TexCoord.zw = rotateVec2(v_TexCoord.zw, g_BlendAngle); + // Too tired now to get this right, maybe look later at this again + //v_TexCoord.zw *= scaleA * dot(dir, vec2(1, 0)) + scaleB * dot(dir, vec2(0, 1)); + //v_TexCoord.zw *= mix(scaleA, scaleB, abs(sin(g_BlendAngle))) / g_BlendScale; + v_TexCoord.zw *= scaleA / g_BlendScale; + //v_TexCoord.zw *= scaleA * abs(cos(g_BlendAngle)) + scaleB * abs(sin(g_BlendAngle)); + + v_TexCoord.zw += CAST2(0.5); +#endif + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture7Resolution.z / g_Texture7Resolution.x, + v_TexCoord.y * g_Texture7Resolution.w / g_Texture7Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/blendgradient/effect.json b/modules/wallpaper-engine/effects/blendgradient/effect.json new file mode 100644 index 0000000..95e23d3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "blendgradient", + "name" : "ui_editor_effect_blend_gradient_title", + "description" : "ui_editor_effect_blend_gradient_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blendgradient.json" + } + ], + "dependencies" : + [ + "materials/effects/blendgradient.json", + "shaders/effects/blendgradient.frag", + "shaders/effects/blendgradient.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/materials/effects/blendgradient.json b/modules/wallpaper-engine/effects/blendgradient/materials/effects/blendgradient.json new file mode 100644 index 0000000..07981c6 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/materials/effects/blendgradient.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blendgradient", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/effects/blendgradient/effect.json b/modules/wallpaper-engine/effects/blendgradient/preview/effects/blendgradient/effect.json new file mode 100644 index 0000000..95e23d3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/effects/blendgradient/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "blendgradient", + "name" : "ui_editor_effect_blend_gradient_title", + "description" : "ui_editor_effect_blend_gradient_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blendgradient.json" + } + ], + "dependencies" : + [ + "materials/effects/blendgradient.json", + "shaders/effects/blendgradient.frag", + "shaders/effects/blendgradient.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/effects/tint/effect.json b/modules/wallpaper-engine/effects/blendgradient/preview/effects/tint/effect.json new file mode 100644 index 0000000..75e72b9 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/effects/tint/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "tint", + "name" : "ui_editor_effect_tint_title", + "description" : "ui_editor_effect_tint_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/effects/vhs/effect.json b/modules/wallpaper-engine/effects/blendgradient/preview/effects/vhs/effect.json new file mode 100644 index 0000000..bbc2383 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/effects/vhs/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "vhs", + "name" : "ui_editor_effect_vhs_title", + "description" : "ui_editor_effect_vhs_description", + "group" : "colorize", + "preview" : "previewvhs/project.json", + "passes" : + [ + { + "material" : "materials/effects/vhs.json" + } + ], + "dependencies" : + [ + "materials/effects/vhs.json", + "shaders/effects/vhs.frag", + "shaders/effects/vhs.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.tex new file mode 100644 index 0000000..58452ea Binary files /dev/null and b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/blendgradient.json b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/blendgradient.json new file mode 100644 index 0000000..07981c6 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/blendgradient.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blendgradient", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/tint.json b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/vhs.json b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/vhs.json new file mode 100644 index 0000000..8c22b74 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/materials/effects/vhs.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/vhs", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/blendgradient/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/project.json b/modules/wallpaper-engine/effects/blendgradient/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/scene.json b/modules/wallpaper-engine/effects/blendgradient/preview/scene.json new file mode 100644 index 0000000..4d1b38d --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/scene.json @@ -0,0 +1,213 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/tint/effect.json", + "id" : 28, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "alpha" : 1.0, + "color" : "1 0 0" + }, + "id" : 29 + } + ], + "visible" : true + }, + { + "file" : "effects/vhs/effect.json", + "id" : 35, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "artifacts" : 3, + "chromatic" : 0, + "distortionspeed" : 2, + "distortionstrength" : 10, + "distortionwidth" : 2, + "scale" : 0.03, + "strength" : 2 + }, + "id" : 36, + "textures" : [ null, "util/noise" ] + } + ], + "visible" : true + } + ], + "id" : 26, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "effectpreview", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : false + }, + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "dependencies" : [ 26 ], + "depth" : 1, + "effects" : + [ + { + "file" : "effects/blendgradient/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "combos" : + { + "EDGEGLOW" : 1 + }, + "constantshadervalues" : + { + "edgebrightness" : 1.0, + "edgecolor" : "0 0 0", + "gradientscale" : 0.05, + "multiply" : + { + "animation" : + { + "c0" : + [ + { + "back" : + { + "enabled" : true, + "x" : -1, + "y" : 0 + }, + "frame" : 0, + "front" : + { + "enabled" : true, + "x" : 1, + "y" : 0 + }, + "lockangle" : true, + "locklength" : true, + "value" : 1 + }, + { + "back" : + { + "enabled" : true, + "x" : -1, + "y" : 0 + }, + "frame" : 30, + "front" : + { + "enabled" : true, + "x" : 1, + "y" : 0 + }, + "lockangle" : true, + "locklength" : true, + "value" : 0 + } + ], + "options" : + { + "fps" : 15, + "length" : 30, + "mode" : "mirror", + "wraploop" : null + } + }, + "value" : 1 + } + }, + "id" : 19, + "textures" : [ null, "_rt_imageLayerComposite_26_a", "util/clouds_256" ] + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/blendgradient.frag b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/blendgradient.frag new file mode 100644 index 0000000..3c4cf44 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/blendgradient.frag @@ -0,0 +1,75 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} +// [COMBO] {"material":"ui_editor_properties_transform","combo":"TRANSFORMUV","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_transform_repeat","combo":"TRANSFORMREPEAT","type":"options","default":0,"options":{"ui_editor_properties_clip":0,"ui_editor_properties_repeat":1,"ui_editor_properties_clamp_uvs":2}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_edge_glow","combo":"EDGEGLOW","type":"options","default":0} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform float g_Multiply; // {"material":"multiply","label":"ui_editor_properties_blend_amount","default":1,"range":[0.0, 1.0]} +uniform float g_GradientScale; // {"material":"gradientscale","label":"ui_editor_properties_gradient_scale","default":0.05,"range":[0.01, 0.25]} +uniform float g_AlphaMultiply; // {"material":"alpha","label":"ui_editor_properties_alpha","default":1,"range":[0.0, 1.0]} + +uniform float g_EdgeBrightness; // {"material":"edgebrightness","label":"ui_editor_properties_edge_brightness","default":1,"range":[0.0, 5.0]} +uniform vec3 g_EdgeColor; // {"material":"edgecolor","label":"ui_editor_properties_edge_color","default":"1 0.75 0","type":"color"} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_mask","mode":"opacitymask","default":"util/clouds_256","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK","paintdefaultcolor":"0 0 0 1"} + +float GetUVBlend(vec2 uv) +{ +#if TRANSFORMUV == 1 && TRANSFORMREPEAT == 0 + return step(0.99, dot(step(CAST2(0.0), uv) * step(uv, CAST2(1.0)), CAST2(0.5))); +#endif + return 1.0; +} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + vec2 blendUV = v_TexCoord.zw; +#if TRANSFORMUV == 1 && TRANSFORMREPEAT == 1 + blendUV = frac(blendUV); +#endif + + vec4 blendColors = texSample2D(g_Texture1, blendUV); + float blend = 1.0; + + float gradient = texSample2D(g_Texture2, blendUV).r; + blend = smoothstep(saturate(gradient - g_GradientScale), saturate(gradient + g_GradientScale), g_Multiply); + +#if OPACITYMASK == 1 + float mask = texSample2D(g_Texture3, v_TexCoordOpacity).r; + blend *= mask; +#endif + + float blendAlpha = GetUVBlend(blendUV) * blend * blendColors.a; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, blendAlpha); + +#if EDGEGLOW + float burnWidth = g_GradientScale * 0.5; + float burnAmount = step(gradient - burnWidth, g_Multiply) * + step(g_Multiply, gradient + burnWidth) * + step(0.01, g_Multiply) * + step(g_Multiply, 0.999); +#if OPACITYMASK == 1 + burnAmount *= mask; +#endif + albedo.rgb = max(CAST3(0.0), mix(albedo.rgb, g_EdgeColor, burnAmount * g_EdgeBrightness)); +#endif + +#if WRITEALPHA + albedo.a = blendColors.a * g_AlphaMultiply; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/blendgradient.vert b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/blendgradient.vert new file mode 100644 index 0000000..8d2b7a7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/blendgradient.vert @@ -0,0 +1,52 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; +uniform vec4 g_Texture2Resolution; +uniform vec4 g_Texture3Resolution; +uniform vec4 g_Texture4Resolution; +uniform vec4 g_Texture5Resolution; +uniform vec4 g_Texture6Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture7Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +#if TRANSFORMUV == 1 +uniform vec4 g_Texture0Resolution; +#endif + +uniform vec2 g_BlendOffset; // {"material":"blendoffset","label":"ui_editor_properties_offset","default":"0 0"} +uniform float g_BlendAngle; // {"material":"blendangle","label":"ui_editor_properties_angle","default":0,"range":[0,6.28]} +uniform float g_BlendScale; // {"material":"blendscale","label":"ui_editor_properties_scale","default":1,"range":[0.01,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if TRANSFORMUV == 1 + vec2 scaleA = g_Texture0Resolution.zw / g_Texture1Resolution.zw; + + v_TexCoord.zw -= (g_BlendOffset - (g_Texture0Resolution.zw - g_Texture1Resolution.zw) * 0.5) / g_Texture0Resolution.zw; + + v_TexCoord.zw -= CAST2(0.5); + v_TexCoord.zw = rotateVec2(v_TexCoord.zw, g_BlendAngle); + v_TexCoord.zw *= scaleA / g_BlendScale; + v_TexCoord.zw += CAST2(0.5); +#endif + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture7Resolution.z / g_Texture7Resolution.x, + v_TexCoord.y * g_Texture7Resolution.w / g_Texture7Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/tint.frag new file mode 100644 index 0000000..ff28168 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/tint.frag @@ -0,0 +1,29 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":30} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_BlendAlpha; // {"material":"alpha", "label":"ui_editor_properties_alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"color", "label":"ui_editor_properties_color", "type": "color", "default":"1 0 0"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = g_BlendAlpha; + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoord.zw).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, mask); + +#if BLENDMODE == 0 + albedo.a = 1.0; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/tint.vert new file mode 100644 index 0000000..3bbbc06 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/tint.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture1Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/vhs.frag b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/vhs.frag new file mode 100644 index 0000000..81e0281 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/vhs.frag @@ -0,0 +1,78 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":12} +// [COMBO] {"material":"ui_editor_properties_greyscale","combo":"GREYSCALE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_artifacts_negated","combo":"INVERTARTIFACTS","type":"options","default":1} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordGlitchBase; +varying vec4 v_TexCoordGlitch; +varying vec4 v_TexCoordNoise; +varying vec4 v_TexCoordVHSNoise; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","paintdefaultcolor":"0 0 0 1","combo":"MASK"} + +uniform float g_Time; + +uniform float g_NoiseScale; // {"material":"scale","label":"ui_editor_properties_scale","default":0.3,"range":[0.01, 1.0]} +uniform float g_NoiseAlpha; // {"material":"strength","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 2.0]} +uniform float g_DistortionStrength; // {"material":"distortionstrength","label":"ui_editor_properties_distortion_strength","default":1.0,"range":[0.0, 2.0]} +uniform float g_DistortionSpeed; // {"material":"distortionspeed","label":"ui_editor_properties_distortion_speed","default":1,"range":[0.0, 2.0]} +uniform float g_DistortionWidth; // {"material":"distortionwidth","label":"ui_editor_properties_distortion_width","default":1.0,"range":[0.0, 2.0]} +uniform float g_ArtifactsScale; // {"material":"artifacts","label":"ui_editor_properties_artifacts","default":1.5,"range":[0.0, 3.0]} + +void main() { + float dblend = sin(g_Time); + dblend = sign(dblend) * pow(abs(max(0.00001, dblend)), 4.0); + vec2 distortion = vec2(dblend * + g_DistortionStrength * 0.02 * + smoothstep(0.01 * g_DistortionWidth, 0.0, abs(frac(g_Time * g_DistortionSpeed) - v_TexCoord.y)), + 0.0); + distortion *= g_NoiseAlpha; + + vec4 albedo; + float vhsBlend = 1.0; + +#if MASK == 1 + vhsBlend *= texSample2D(g_Texture2, v_TexCoord.zw).r; + vec4 orig = texSample2D(g_Texture0, v_TexCoord.xy + distortion * vhsBlend); + albedo.ga = texSample2D(g_Texture0, v_TexCoordGlitchBase + distortion * vhsBlend).ga; +#else + vec4 orig = texSample2D(g_Texture0, v_TexCoord.xy + distortion); + albedo.ga = orig.ga; +#endif + + albedo.r = texSample2D(g_Texture0, v_TexCoordGlitch.xy + distortion).r; + albedo.b = texSample2D(g_Texture0, v_TexCoordGlitch.zw + distortion).b; + + vec3 noise = texSample2D(g_Texture1, v_TexCoordNoise.xy).rgb; + vec3 noise2 = texSample2D(g_Texture1, v_TexCoordNoise.zw).gbr; + +#if GREYSCALE == 1 + noise = CAST3(greyscale(noise)); + noise2 = CAST3(greyscale(noise2)); +#endif + + noise = saturate(noise * noise2); + + float blend = 0.1; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, noise, blend); + albedo.rgb = BlendOpacity(albedo.rgb, smoothstep(0.7, 1.0, noise), BlendLinearDodge, blend); + + vec2 vhsNoise = texSample2D(g_Texture1, v_TexCoordVHSNoise.xy).rg; + vec2 vhsNoise2 = texSample2D(g_Texture1, v_TexCoordVHSNoise.zw).rg; + + float artifactLimiter = pow(max(g_ArtifactsScale, 0.0001), 0.2); + float artifactsAlpha = step(0.001, g_NoiseScale) * step(0.9, vhsNoise.x * artifactLimiter) * step(0.9, vhsNoise2.x * artifactLimiter) * vhsNoise.y * vhsNoise2.y; +#if INVERTARTIFACTS + albedo.rgb = mix(albedo.rgb, CAST3(1.0 - albedo.rgb), artifactsAlpha); +#else + albedo.rgb += CAST3(artifactsAlpha); +#endif + + gl_FragColor = mix(orig, albedo, g_NoiseAlpha * vhsBlend); +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/vhs.vert b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/vhs.vert new file mode 100644 index 0000000..63e6f2c --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/shaders/effects/vhs.vert @@ -0,0 +1,56 @@ + + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +uniform float g_Time; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordGlitchBase; +varying vec4 v_TexCoordGlitch; +varying vec4 v_TexCoordNoise; +varying vec4 v_TexCoordVHSNoise; + +uniform float g_NoiseScale; // {"material":"scale","label":"ui_editor_properties_scale","default":0.3,"range":[0.01, 1.0]} +uniform float g_Chromatic; // {"material":"chromatic","label":"ui_editor_properties_chromatic_aberration","default":0.1,"range":[0.0, 1.0]} +uniform float g_ArtifactsScale; // {"material":"artifacts","label":"ui_editor_properties_artifacts","default":1.5,"range":[0.0, 3.0]} +uniform float g_NoiseAlpha; // {"material":"strength","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 2.0]} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + + float t = frac(g_Time); + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordNoise.xy = (a_TexCoord.xy + t) * g_NoiseScale; + v_TexCoordNoise.zw = (a_TexCoord.xy - t * 2.5) * g_NoiseScale * 0.52; + v_TexCoordNoise *= vec4(aspect, 1.0, aspect, 1.0); + +#if MASK == 1 + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + + v_TexCoordVHSNoise.xy = v_TexCoordNoise.xy * vec2(0.1, 10) * g_ArtifactsScale; + v_TexCoordVHSNoise.zw = v_TexCoordNoise.zw * vec2(0.01, 2) * g_ArtifactsScale; + + + v_TexCoordGlitch = v_TexCoord.xyxy; + + vec3 glitchOffset = g_Chromatic * smoothstep(0, 2, 1 + 0.5 * sin(g_Time * vec3(11, 7, 13) * 2)) * vec3(0.0019, 0.0021, 0.0017); + v_TexCoordGlitch.y += 0.004 * g_Chromatic + glitchOffset.x; + v_TexCoordGlitch.xz += glitchOffset.xy + vec2(0.005, -0.0005) * g_Chromatic; + v_TexCoordGlitch.z -= glitchOffset.z + 0.006 * g_Chromatic; + v_TexCoordGlitch.w -= 0.0045 * g_Chromatic; + v_TexCoordGlitchBase.x = v_TexCoord.x + glitchOffset.z * min(1.0, g_NoiseAlpha); + v_TexCoordGlitchBase.y = v_TexCoord.y - glitchOffset.z * min(1.0, g_NoiseAlpha); +} diff --git a/modules/wallpaper-engine/effects/blendgradient/preview/template.json b/modules/wallpaper-engine/effects/blendgradient/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blendgradient/shaders/effects/blendgradient.frag b/modules/wallpaper-engine/effects/blendgradient/shaders/effects/blendgradient.frag new file mode 100644 index 0000000..597ab52 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/shaders/effects/blendgradient.frag @@ -0,0 +1,75 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} +// [COMBO] {"material":"ui_editor_properties_transform","combo":"TRANSFORMUV","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_transform_repeat","combo":"TRANSFORMREPEAT","type":"options","default":0,"options":{"ui_editor_properties_clip":0,"ui_editor_properties_repeat":1,"ui_editor_properties_clamp_uvs":2},"require":{"TRANSFORMUV":1}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_edge_glow","combo":"EDGEGLOW","type":"options","default":0} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform float g_Multiply; // {"material":"multiply","label":"ui_editor_properties_blend_amount","default":1,"range":[0.0, 1.0]} +uniform float g_GradientScale; // {"material":"gradientscale","label":"ui_editor_properties_gradient_scale","default":0.05,"range":[0.01, 0.25]} +uniform float g_AlphaMultiply; // {"material":"alpha","label":"ui_editor_properties_alpha","default":1,"range":[0.0, 1.0]} + +uniform float g_EdgeBrightness; // {"material":"edgebrightness","label":"ui_editor_properties_edge_brightness","default":1,"range":[0.0, 5.0]} +uniform vec3 g_EdgeColor; // {"material":"edgecolor","label":"ui_editor_properties_edge_color","default":"1 0.75 0","type":"color"} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_mask","mode":"opacitymask","default":"util/clouds_256","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK","paintdefaultcolor":"0 0 0 1"} + +float GetUVBlend(vec2 uv) +{ +#if TRANSFORMUV == 1 && TRANSFORMREPEAT == 0 + return step(0.99, dot(step(CAST2(0.0), uv) * step(uv, CAST2(1.0)), CAST2(0.5))); +#endif + return 1.0; +} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + vec2 blendUV = v_TexCoord.zw; +#if TRANSFORMUV == 1 && TRANSFORMREPEAT == 1 + blendUV = frac(blendUV); +#endif + + vec4 blendColors = texSample2D(g_Texture1, blendUV); + float blend = 1.0; + + float gradient = texSample2D(g_Texture2, blendUV).r; + blend = smoothstep(saturate(gradient - g_GradientScale), saturate(gradient + g_GradientScale), g_Multiply); + +#if OPACITYMASK == 1 + float mask = texSample2D(g_Texture3, v_TexCoordOpacity).r; + blend *= mask; +#endif + + float blendAlpha = GetUVBlend(blendUV) * blend * blendColors.a; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, blendColors.rgb, blendAlpha); + +#if EDGEGLOW + float burnWidth = g_GradientScale * 0.5; + float burnAmount = step(gradient - burnWidth, g_Multiply) * + step(g_Multiply, gradient + burnWidth) * + step(0.01, g_Multiply) * + step(g_Multiply, 0.999); +#if OPACITYMASK == 1 + burnAmount *= mask; +#endif + albedo.rgb = max(CAST3(0.0), mix(albedo.rgb, g_EdgeColor, burnAmount * g_EdgeBrightness)); +#endif + +#if WRITEALPHA + albedo.a = blendColors.a * g_AlphaMultiply; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blendgradient/shaders/effects/blendgradient.vert b/modules/wallpaper-engine/effects/blendgradient/shaders/effects/blendgradient.vert new file mode 100644 index 0000000..8d2b7a7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blendgradient/shaders/effects/blendgradient.vert @@ -0,0 +1,52 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; +uniform vec4 g_Texture2Resolution; +uniform vec4 g_Texture3Resolution; +uniform vec4 g_Texture4Resolution; +uniform vec4 g_Texture5Resolution; +uniform vec4 g_Texture6Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture7Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +#if TRANSFORMUV == 1 +uniform vec4 g_Texture0Resolution; +#endif + +uniform vec2 g_BlendOffset; // {"material":"blendoffset","label":"ui_editor_properties_offset","default":"0 0"} +uniform float g_BlendAngle; // {"material":"blendangle","label":"ui_editor_properties_angle","default":0,"range":[0,6.28]} +uniform float g_BlendScale; // {"material":"blendscale","label":"ui_editor_properties_scale","default":1,"range":[0.01,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if TRANSFORMUV == 1 + vec2 scaleA = g_Texture0Resolution.zw / g_Texture1Resolution.zw; + + v_TexCoord.zw -= (g_BlendOffset - (g_Texture0Resolution.zw - g_Texture1Resolution.zw) * 0.5) / g_Texture0Resolution.zw; + + v_TexCoord.zw -= CAST2(0.5); + v_TexCoord.zw = rotateVec2(v_TexCoord.zw, g_BlendAngle); + v_TexCoord.zw *= scaleA / g_BlendScale; + v_TexCoord.zw += CAST2(0.5); +#endif + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture7Resolution.z / g_Texture7Resolution.x, + v_TexCoord.y * g_Texture7Resolution.w / g_Texture7Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/blur/effect.json b/modules/wallpaper-engine/effects/blur/effect.json new file mode 100644 index 0000000..2bb91f4 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/effect.json @@ -0,0 +1,85 @@ +{ + "version" : 1, + "replacementkey" : "blur", + "name" : "ui_editor_effect_blur_title", + "description" : "ui_editor_effect_blur_description", + "group" : "blur", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba_backbuffer" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba_backbuffer" + } + ], + "dependencies" : + [ + "materials/effects/blur_downsample4.json", + "materials/effects/blur_gaussian_x.json", + "materials/effects/blur_gaussian_y.json", + "materials/effects/blur_combine.json", + "shaders/effects/blur_downsample4.frag", + "shaders/effects/blur_downsample4.vert", + "shaders/effects/blur_gaussian.frag", + "shaders/effects/blur_gaussian.vert", + "shaders/effects/blur_combine.frag", + "shaders/effects/blur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/materials/effects/blur_combine.json b/modules/wallpaper-engine/effects/blur/materials/effects/blur_combine.json new file mode 100644 index 0000000..83b353f --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/materials/effects/blur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blur/materials/effects/blur_downsample4.json b/modules/wallpaper-engine/effects/blur/materials/effects/blur_downsample4.json new file mode 100644 index 0000000..32c6e35 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/materials/effects/blur_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blur/materials/effects/blur_gaussian_x.json b/modules/wallpaper-engine/effects/blur/materials/effects/blur_gaussian_x.json new file mode 100644 index 0000000..68f21bc --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/materials/effects/blur_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blur/materials/effects/blur_gaussian_y.json b/modules/wallpaper-engine/effects/blur/materials/effects/blur_gaussian_y.json new file mode 100644 index 0000000..4d28184 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/materials/effects/blur_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/blur/preview/effects/blur/effect.json b/modules/wallpaper-engine/effects/blur/preview/effects/blur/effect.json new file mode 100644 index 0000000..61c7e4d --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/effects/blur/effect.json @@ -0,0 +1,82 @@ +{ + "name" : "Blur", + "description" : "Apply gaussian blur to a section of the image.", + "group" : "composite", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "prev", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "prev", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/blur_downsample4.json", + "materials/effects/blur_gaussian_x.json", + "materials/effects/blur_gaussian_y.json", + "materials/effects/blur_combine.json", + "shaders/effects/blur_downsample4.frag", + "shaders/effects/blur_downsample4.vert", + "shaders/effects/blur_gaussian.frag", + "shaders/effects/blur_gaussian.vert", + "shaders/effects/blur_combine.frag", + "shaders/effects/blur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.tex new file mode 100644 index 0000000..24a2d91 Binary files /dev/null and b/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_combine.json b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_combine.json new file mode 100644 index 0000000..045b84f --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_combine", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_downsample4.json b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_downsample4.json new file mode 100644 index 0000000..32c6e35 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_gaussian_x.json b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_gaussian_x.json new file mode 100644 index 0000000..68f21bc --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_gaussian_y.json b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_gaussian_y.json new file mode 100644 index 0000000..4d28184 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/effects/blur_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex b/modules/wallpaper-engine/effects/blur/preview/materials/masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex new file mode 100644 index 0000000..791eb76 Binary files /dev/null and b/modules/wallpaper-engine/effects/blur/preview/materials/masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex differ diff --git a/modules/wallpaper-engine/effects/blur/preview/materials/masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json b/modules/wallpaper-engine/effects/blur/preview/materials/masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/materials/masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/blur/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/project.json b/modules/wallpaper-engine/effects/blur/preview/project.json new file mode 100644 index 0000000..9511bbb --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewb", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/scene.json b/modules/wallpaper-engine/effects/blur/preview/scene.json new file mode 100644 index 0000000..1eaae63 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/scene.json @@ -0,0 +1,80 @@ +{ + "camera" : + { + "center" : "-12.815 -28.307 -1.000", + "eye" : "-12.815 -28.307 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "dependencies" : [ 38 ], + "depth" : 1, + "effects" : + [ + { + "file" : "effects/blur/effect.json", + "passes" : + [ + { + "combos" : null, + "constantshadervalues" : null + }, + { + "combos" : null, + "constantshadervalues" : null + }, + { + "combos" : + { + "VERTICAL" : 1 + }, + "constantshadervalues" : null + }, + { + "combos" : null, + "constantshadervalues" : null, + "textures" : + [ + null, + "masks/blur_combine_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173", + "_rt_imageLayerComposite_38_a" + ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_combine.frag b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_combine.frag new file mode 100644 index 0000000..bea3a22 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_combine.frag @@ -0,0 +1,14 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Prev","hidden":true} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 albedoOld = texSample2D(g_Texture2, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo = mix(albedoOld, albedo, mask); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_combine.vert b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_downsample4.frag b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_downsample4.frag new file mode 100644 index 0000000..ab72080 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_downsample4.frag @@ -0,0 +1,12 @@ + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + gl_FragColor = (texSample2D(g_Texture0, v_TexCoord01.xy) + + texSample2D(g_Texture0, v_TexCoord01.zw) + + texSample2D(g_Texture0, v_TexCoord23.xy) + + texSample2D(g_Texture0, v_TexCoord23.zw)) * 0.25; +} diff --git a/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_downsample4.vert b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_downsample4.vert new file mode 100644 index 0000000..8cec106 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_downsample4.vert @@ -0,0 +1,18 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.zw; + v_TexCoord01.xy = a_TexCoord - offsets; + v_TexCoord01.zw = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord23.xy = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord23.zw = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_gaussian.frag b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_gaussian.frag new file mode 100644 index 0000000..aee35c3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.27901 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.44198 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.27901; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_gaussian.vert b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_gaussian.vert new file mode 100644 index 0000000..c762d04 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/shaders/effects/blur_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/blur/preview/template.json b/modules/wallpaper-engine/effects/blur/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blur/shaders/effects/blur_combine.frag b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_combine.frag new file mode 100644 index 0000000..b450b98 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_combine.frag @@ -0,0 +1,43 @@ + +// [COMBO] {"material":"ui_editor_properties_composite","combo":"COMPOSITE","type":"options","default":0,"options":{"ui_editor_properties_normal":0,"ui_editor_properties_blend":1,"ui_editor_properties_under":2,"ui_editor_properties_cutout":3}} +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} +// [COMBO] {"material":"ui_editor_properties_monochrome","combo":"COMPOSITEMONO","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_blur_alpha","combo":"BLURALPHA","type":"options","default":1} + +#include "common_composite.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"hidden":true} + +uniform vec4 g_Texture0Resolution; + +void main() { + + vec2 blurredCoords = v_TexCoord.xy; + +#ifdef HLSL_SM30 + blurredCoords += 0.75 / g_Texture0Resolution.zw; +#endif + + vec4 blurred = texSample2D(g_Texture0, ApplyCompositeOffset(blurredCoords, g_Texture0Resolution.xy)); + vec4 albedoOld = texSample2D(g_Texture2, v_TexCoord.xy); + +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + + float div = mix(blurred.a, 1, step(blurred.a, 0)); + blurred = ApplyComposite(albedoOld, vec4(blurred.rgb / div, blurred.a)); + blurred = mix(albedoOld, blurred, mask); + +#if BLURALPHA == 0 + blurred.a = albedoOld.a; +#endif + + gl_FragColor = blurred; +} diff --git a/modules/wallpaper-engine/effects/blur/shaders/effects/blur_combine.vert b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/blur/shaders/effects/blur_downsample4.frag b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_downsample4.frag new file mode 100644 index 0000000..d6e0105 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_downsample4.frag @@ -0,0 +1,19 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + + float weight = 0.0; + vec4 result = CAST4(0.0); + for (int i = 0; i < 4; ++i) + { + vec4 sample = texSample2D(g_Texture0, v_TexCoord[i]); + result += sample * sample.a; + weight += sample.a; + } + + gl_FragColor.rgb = result.rgb / max(0.001, weight); + gl_FragColor.a = result.a / 4.0; +} diff --git a/modules/wallpaper-engine/effects/blur/shaders/effects/blur_downsample4.vert b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_downsample4.vert new file mode 100644 index 0000000..3d31675 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_downsample4.vert @@ -0,0 +1,17 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord[4]; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.xy; + v_TexCoord[0] = a_TexCoord - offsets; + v_TexCoord[1] = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord[2] = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord[3] = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/blur/shaders/effects/blur_gaussian.frag b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_gaussian.frag new file mode 100644 index 0000000..1439920 --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blur/shaders/effects/blur_gaussian.vert b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_gaussian.vert new file mode 100644 index 0000000..b4e341c --- /dev/null +++ b/modules/wallpaper-engine/effects/blur/shaders/effects/blur_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/blurprecise/effect.json b/modules/wallpaper-engine/effects/blurprecise/effect.json new file mode 100644 index 0000000..a5d4195 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/effect.json @@ -0,0 +1,44 @@ +{ + "version" : 1, + "replacementkey" : "blur_precise", + "name" : "ui_editor_effect_blur_precise_title", + "description" : "ui_editor_effect_blur_precise_description", + "group" : "blur", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_precise_gaussian_x.json", + "target" : "_rt_FullCompoBuffer1" + }, + { + "material" : "materials/effects/blur_precise_gaussian_y.json", + "bind" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "format" : "rgba_backbuffer" + } + ], + "dependencies" : + [ + "materials/effects/blur_precise_gaussian_x.json", + "materials/effects/blur_precise_gaussian_y.json", + "shaders/effects/blur_precise_gaussian.frag", + "shaders/effects/blur_precise_gaussian.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/materials/effects/blur_precise_gaussian_x.json b/modules/wallpaper-engine/effects/blurprecise/materials/effects/blur_precise_gaussian_x.json new file mode 100644 index 0000000..4df1eaa --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/materials/effects/blur_precise_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_precise_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/materials/effects/blur_precise_gaussian_y.json b/modules/wallpaper-engine/effects/blurprecise/materials/effects/blur_precise_gaussian_y.json new file mode 100644 index 0000000..9228514 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/materials/effects/blur_precise_gaussian_y.json @@ -0,0 +1,13 @@ +{ + "passes": [{ + "shader": "effects/blur_precise_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1, + "ENABLEMASK" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/effects/blur/effect.json b/modules/wallpaper-engine/effects/blurprecise/preview/effects/blur/effect.json new file mode 100644 index 0000000..d266bfb --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/effects/blur/effect.json @@ -0,0 +1,82 @@ +{ + "name" : "Blur", + "description" : "Apply gaussian blur to a section of the image.", + "group" : "composite", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/blur_downsample4.json", + "materials/effects/blur_gaussian_x.json", + "materials/effects/blur_gaussian_y.json", + "materials/effects/blur_combine.json", + "shaders/effects/blur_downsample4.frag", + "shaders/effects/blur_downsample4.vert", + "shaders/effects/blur_gaussian.frag", + "shaders/effects/blur_gaussian.vert", + "shaders/effects/blur_combine.frag", + "shaders/effects/blur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/effects/blurprecise/effect.json b/modules/wallpaper-engine/effects/blurprecise/preview/effects/blurprecise/effect.json new file mode 100644 index 0000000..d33acd6 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/effects/blurprecise/effect.json @@ -0,0 +1,45 @@ +{ + "name" : "Blur (precise)", + "description" : "Apply gaussian blur to the entire image in full resolution.", + "group" : "composite", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_precise_gaussian_x.json", + "target" : "_rt_FullCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_precise_gaussian_y.json", + "bind" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "index" : 0 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "scale" : 1, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/blur_precise_gaussian_x.json", + "materials/effects/blur_precise_gaussian_y.json", + "shaders/effects/blur_precise_gaussian.frag", + "shaders/effects/blur_precise_gaussian.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/effects/edgedetection/effect.json b/modules/wallpaper-engine/effects/blurprecise/preview/effects/edgedetection/effect.json new file mode 100644 index 0000000..b4d049d --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/effects/edgedetection/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Edge Detection", + "description" : "Detects edges of the image using the sobel filter.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/edgedetection.json" + } + ], + "dependencies" : + [ + "materials/effects/edgedetection.json", + "shaders/effects/edgedetection.frag", + "shaders/effects/edgedetection.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_combine.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_combine.json new file mode 100644 index 0000000..83b353f --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_downsample4.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_downsample4.json new file mode 100644 index 0000000..32c6e35 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_gaussian_x.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_gaussian_x.json new file mode 100644 index 0000000..68f21bc --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_gaussian_y.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_gaussian_y.json new file mode 100644 index 0000000..4d28184 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_precise_gaussian_x.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_precise_gaussian_x.json new file mode 100644 index 0000000..4df1eaa --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_precise_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_precise_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_precise_gaussian_y.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_precise_gaussian_y.json new file mode 100644 index 0000000..37b87de --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/blur_precise_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/blur_precise_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/edgedetection.json b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/edgedetection.json new file mode 100644 index 0000000..4e9f1b4 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/materials/effects/edgedetection.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/edgedetection", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/blurprecise/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/project.json b/modules/wallpaper-engine/effects/blurprecise/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/scene.json b/modules/wallpaper-engine/effects/blurprecise/preview/scene.json new file mode 100644 index 0000000..272f04b --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/scene.json @@ -0,0 +1,69 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/blurprecise/effect.json", + "passes" : + [ + { + "combos" : + { + "KERNEL" : 0 + } + }, + { + "combos" : + { + "KERNEL" : 0, + "VERTICAL" : 1 + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_combine.frag b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_combine.frag new file mode 100644 index 0000000..bea3a22 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_combine.frag @@ -0,0 +1,14 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Prev","hidden":true} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 albedoOld = texSample2D(g_Texture2, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo = mix(albedoOld, albedo, mask); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_combine.vert b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_downsample4.frag b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_downsample4.frag new file mode 100644 index 0000000..ab72080 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_downsample4.frag @@ -0,0 +1,12 @@ + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + gl_FragColor = (texSample2D(g_Texture0, v_TexCoord01.xy) + + texSample2D(g_Texture0, v_TexCoord01.zw) + + texSample2D(g_Texture0, v_TexCoord23.xy) + + texSample2D(g_Texture0, v_TexCoord23.zw)) * 0.25; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_downsample4.vert b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_downsample4.vert new file mode 100644 index 0000000..8cec106 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_downsample4.vert @@ -0,0 +1,18 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.zw; + v_TexCoord01.xy = a_TexCoord - offsets; + v_TexCoord01.zw = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord23.xy = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord23.zw = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_gaussian.frag b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_gaussian.frag new file mode 100644 index 0000000..0212a97 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_gaussian.vert b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_gaussian.vert new file mode 100644 index 0000000..c762d04 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_precise_gaussian.frag b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_precise_gaussian.frag new file mode 100644 index 0000000..aee35c3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_precise_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.27901 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.44198 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.27901; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_precise_gaussian.vert b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_precise_gaussian.vert new file mode 100644 index 0000000..dc1e782 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/blur_precise_gaussian.vert @@ -0,0 +1,66 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":2,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { +#if VERTICAL + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#else + gl_Position = vec4(a_Position, 1.0); +#endif + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/edgedetection.frag b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/edgedetection.frag new file mode 100644 index 0000000..55cc3df --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/edgedetection.frag @@ -0,0 +1,40 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":0} + +#include "common.h" +#include "common_blending.h" + +varying vec2 v_TexCoordKernel[9]; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_BlendAlpha; // {"material":"Alpha","default":1,"range":[0.01,1]} +uniform vec3 g_OutlineColor1; // {"material":"Outline color","default":"0 0 0","type":"color"} +uniform vec3 g_OutlineColor2; // {"material":"Outline background","default":"1 1 1","type":"color"} +uniform float g_DetectionThreshold; // {"material":"Detection threshold","default":0.5,"range":[0,5]} +uniform float g_DetectionMultiply; // {"material":"Detection multiply","default":1,"range":[0,5]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoordKernel[4]); + + vec3 sample00 = texSample2D(g_Texture0, v_TexCoordKernel[0]).rgb; + vec3 sample10 = texSample2D(g_Texture0, v_TexCoordKernel[1]).rgb; + vec3 sample20 = texSample2D(g_Texture0, v_TexCoordKernel[2]).rgb; + vec3 sample01 = texSample2D(g_Texture0, v_TexCoordKernel[3]).rgb; + + vec3 sample21 = texSample2D(g_Texture0, v_TexCoordKernel[5]).rgb; + vec3 sample02 = texSample2D(g_Texture0, v_TexCoordKernel[6]).rgb; + vec3 sample12 = texSample2D(g_Texture0, v_TexCoordKernel[7]).rgb; + vec3 sample22 = texSample2D(g_Texture0, v_TexCoordKernel[8]).rgb; + + vec3 gx = sample20 - sample00 + (sample21 - sample01) * 2 + sample22 - sample02; + vec3 gy = sample00 - sample02 + (sample10 - sample12) * 2 + sample20 - sample22; + + float g = abs(greyscale(gx)) + abs(greyscale(gy)); + + vec3 combinedColor = mix(g_OutlineColor2, g_OutlineColor1, + min(1.0, max(0.0, g - g_DetectionThreshold) * g_DetectionMultiply)); + + gl_FragColor.a = albedo.a; + gl_FragColor.rgb = ApplyBlending(BLENDMODE, albedo.rgb, combinedColor, g_BlendAlpha); +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/edgedetection.vert b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/edgedetection.vert new file mode 100644 index 0000000..e279d88 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/shaders/effects/edgedetection.vert @@ -0,0 +1,26 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +uniform float g_DetectionSize; // {"material":"Detection size","default":1,"range":[0,5]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoordKernel[9]; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + vec2 texelSize = vec2(1.0 / g_Texture0Resolution.z, 1.0 / g_Texture0Resolution.w) * g_DetectionSize; + + v_TexCoordKernel[0] = a_TexCoord - texelSize; + v_TexCoordKernel[1] = a_TexCoord - vec2(0.0, texelSize.y); + v_TexCoordKernel[2] = a_TexCoord + vec2(texelSize.x, -texelSize.y); + v_TexCoordKernel[3] = a_TexCoord - vec2(texelSize.x, 0.0); + v_TexCoordKernel[4] = a_TexCoord; + v_TexCoordKernel[5] = a_TexCoord + vec2(texelSize.x, 0.0); + v_TexCoordKernel[6] = a_TexCoord + vec2(-texelSize.x, texelSize.y); + v_TexCoordKernel[7] = a_TexCoord + vec2(0.0, texelSize.y); + v_TexCoordKernel[8] = a_TexCoord + texelSize; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/preview/template.json b/modules/wallpaper-engine/effects/blurprecise/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurprecise/shaders/effects/blur_precise_gaussian.frag b/modules/wallpaper-engine/effects/blurprecise/shaders/effects/blur_precise_gaussian.frag new file mode 100644 index 0000000..46d47fd --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/shaders/effects/blur_precise_gaussian.frag @@ -0,0 +1,40 @@ + +// [COMBO] {"material":"ui_editor_properties_blur_alpha","combo":"BLURALPHA","type":"options","default":1} + +#include "common_blur.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"ENABLEMASK":1}} + +#if MASK +varying vec2 v_TexCoordMask; +#endif + +void main() { +#if KERNEL == 0 + vec4 albedo = blur13a(v_TexCoord.xy, v_TexCoord.zw); +#endif +#if KERNEL == 1 + vec4 albedo = blur7a(v_TexCoord.xy, v_TexCoord.zw); +#endif +#if KERNEL == 2 + vec4 albedo = blur3a(v_TexCoord.xy, v_TexCoord.zw); +#endif + +#if MASK || BLURALPHA == 0 + vec4 prev = texSample2D(g_Texture1, v_TexCoord.xy); +#endif + +#if MASK + albedo = mix(prev, albedo, texSample2D(g_Texture2, v_TexCoordMask.xy).r); +#endif + +#if BLURALPHA == 0 + albedo.a = prev.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blurprecise/shaders/effects/blur_precise_gaussian.vert b/modules/wallpaper-engine/effects/blurprecise/shaders/effects/blur_precise_gaussian.vert new file mode 100644 index 0000000..860b86f --- /dev/null +++ b/modules/wallpaper-engine/effects/blurprecise/shaders/effects/blur_precise_gaussian.vert @@ -0,0 +1,40 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; + +#if MASK +uniform vec4 g_Texture2Resolution; +varying vec2 v_TexCoordMask; +#endif + +void main() { +#if VERTICAL + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#else + gl_Position = vec4(a_Position, 1.0); +#endif + + v_TexCoord.xy = a_TexCoord; + +#if VERTICAL + v_TexCoord.z = 0; + v_TexCoord.w = g_Scale.y / g_Texture0Resolution.w; +#else + v_TexCoord.z = g_Scale.x / g_Texture0Resolution.z; + v_TexCoord.w = 0; +#endif + +#if MASK + v_TexCoordMask.xy = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/blurradial/effect.json b/modules/wallpaper-engine/effects/blurradial/effect.json new file mode 100644 index 0000000..de4d964 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/effect.json @@ -0,0 +1,21 @@ +{ + "version" : 1, + "replacementkey" : "blur_radial", + "name" : "ui_editor_effect_blur_radial_title", + "description" : "ui_editor_effect_blur_radial_description", + "group" : "blur", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_radial_gaussian.json" + } + ], + "dependencies" : + [ + "materials/effects/blur_radial_gaussian.json", + "shaders/effects/blur_radial_gaussian.frag", + "shaders/effects/blur_radial_gaussian.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/materials/effects/blur_radial_gaussian.json b/modules/wallpaper-engine/effects/blurradial/materials/effects/blur_radial_gaussian.json new file mode 100644 index 0000000..592a57e --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/materials/effects/blur_radial_gaussian.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_radial_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurradial/preview/effects/blurradial/effect.json b/modules/wallpaper-engine/effects/blurradial/preview/effects/blurradial/effect.json new file mode 100644 index 0000000..de4d964 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/effects/blurradial/effect.json @@ -0,0 +1,21 @@ +{ + "version" : 1, + "replacementkey" : "blur_radial", + "name" : "ui_editor_effect_blur_radial_title", + "description" : "ui_editor_effect_blur_radial_description", + "group" : "blur", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_radial_gaussian.json" + } + ], + "dependencies" : + [ + "materials/effects/blur_radial_gaussian.json", + "shaders/effects/blur_radial_gaussian.frag", + "shaders/effects/blur_radial_gaussian.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.tex new file mode 100644 index 0000000..58452ea Binary files /dev/null and b/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/preview/materials/effects/blur_radial_gaussian.json b/modules/wallpaper-engine/effects/blurradial/preview/materials/effects/blur_radial_gaussian.json new file mode 100644 index 0000000..592a57e --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/materials/effects/blur_radial_gaussian.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_radial_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/blurradial/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/blurradial/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/preview/project.json b/modules/wallpaper-engine/effects/blurradial/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/preview/scene.json b/modules/wallpaper-engine/effects/blurradial/preview/scene.json new file mode 100644 index 0000000..6a3f6da --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/scene.json @@ -0,0 +1,123 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/blurradial/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "scale" : 0.58, + "ui_editor_properties_center" : "0.50633568 0.46990585" + }, + "id" : 19 + } + ], + "visible" : true + }, + { + "file" : "effects/blurradial/effect.json", + "id" : 24, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "scale" : 0.58, + "ui_editor_properties_center" : "0.50633568 0.46990585" + }, + "id" : 0 + } + ], + "visible" : true + }, + { + "file" : "effects/blurradial/effect.json", + "id" : 29, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "scale" : 0.58, + "ui_editor_properties_center" : "0.50633568 0.46990585" + }, + "id" : 30 + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/preview/shaders/effects/blur_radial_gaussian.frag b/modules/wallpaper-engine/effects/blurradial/preview/shaders/effects/blur_radial_gaussian.frag new file mode 100644 index 0000000..d98de7d --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/shaders/effects/blur_radial_gaussian.frag @@ -0,0 +1,96 @@ + +// [COMBO] {"material":"ui_editor_properties_blur_alpha","combo":"BLURALPHA","type":"options","default":1} + +#include "common.h" +#include "common_blur.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float u_Scale; // {"default":1,"label":"ui_editor_properties_scale","material":"scale","range":[0.01,2.0]} +uniform vec2 u_Center; // {"material":"ui_editor_properties_center","position":true,"default":"0.5 0.5"} + +#if MASK +varying vec2 v_TexCoordMask; +#endif + +vec4 blurRadial13a(vec2 u, float amt) +{ + vec2 center = u_Center; + vec2 delta = u - center; + amt = amt * 0.025; + float o1 = 1.4091998770852122 * amt; + float o2 = 3.2979348079914822 * amt; + float o3 = 5.2062900776825969 * amt; + vec2 r1 = rotateVec2(delta, o1) - delta; + vec2 r2 = rotateVec2(delta, o2) - delta; + vec2 r3 = rotateVec2(delta, o3) - delta; + return texSample2D(g_Texture0, u) * 0.1976406528809576 + + texSample2D(g_Texture0, center + r1 + delta) * 0.2959855056006557 + + texSample2D(g_Texture0, center - r1 + delta) * 0.2959855056006557 + + texSample2D(g_Texture0, center + r2 + delta) * 0.0935333619980593 + + texSample2D(g_Texture0, center - r2 + delta) * 0.0935333619980593 + + texSample2D(g_Texture0, center + r3 + delta) * 0.0116608059608062 + + texSample2D(g_Texture0, center - r3 + delta) * 0.0116608059608062; +} + +vec4 blurRadial7a(vec2 u, float amt) +{ + vec2 center = u_Center; + vec2 delta = u - center; + amt = amt * 0.025; + float o1 = 2.3515644035337887 * amt; + float o2 = 0.469433779698372 * amt; + float o3 = 1.4091998770852121 * amt; + float o4 = 3 * amt; + vec2 r1 = rotateVec2(delta, o1) - delta; + vec2 r2 = rotateVec2(delta, o2) - delta; + vec2 r3 = rotateVec2(delta, -o3) - delta; + vec2 r4 = rotateVec2(delta, -o4) - delta; + + return texSample2D(g_Texture0, center + r1 + delta) * 0.2028175528299753 + + texSample2D(g_Texture0, center + r2 + delta) * 0.4044856614512112 + + texSample2D(g_Texture0, center + r3 + delta) * 0.3213933537319605 + + texSample2D(g_Texture0, center + r4 + delta) * 0.0713034319868530; +} + +vec4 blurRadial3a(vec2 u, float amt) +{ + vec2 center = u_Center; + vec2 delta = u - center; + amt = amt * 0.025; + float o1 = amt; + vec2 r1 = rotateVec2(delta, o1) - delta; + + return texSample2D(g_Texture0, center + delta) * 0.5 + + texSample2D(g_Texture0, center + r1 + delta) * 0.25 + + texSample2D(g_Texture0, center - r1 + delta) * 0.25; +} + +void main() { +#if KERNEL == 0 + vec4 albedo = blurRadial13a(v_TexCoord.xy, u_Scale); +#endif +#if KERNEL == 1 + vec4 albedo = blurRadial7a(v_TexCoord.xy, u_Scale); +#endif +#if KERNEL == 2 + vec4 albedo = blurRadial3a(v_TexCoord.xy, u_Scale); +#endif + +#if MASK || BLURALPHA == 0 + vec4 prev = texSample2D(g_Texture0, v_TexCoord.xy); +#endif + +#if MASK + albedo = mix(prev, albedo, texSample2D(g_Texture1, v_TexCoordMask.xy).r); +#endif + +#if BLURALPHA == 0 + albedo.a = prev.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blurradial/preview/shaders/effects/blur_radial_gaussian.vert b/modules/wallpaper-engine/effects/blurradial/preview/shaders/effects/blur_radial_gaussian.vert new file mode 100644 index 0000000..42ba948 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/shaders/effects/blur_radial_gaussian.vert @@ -0,0 +1,24 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":0,"options":{"13":0,"7":1,"3":2}} + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if MASK +uniform vec4 g_Texture2Resolution; +varying vec2 v_TexCoordMask; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; +#if MASK + v_TexCoordMask.xy = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/blurradial/preview/template.json b/modules/wallpaper-engine/effects/blurradial/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/blurradial/shaders/effects/blur_radial_gaussian.frag b/modules/wallpaper-engine/effects/blurradial/shaders/effects/blur_radial_gaussian.frag new file mode 100644 index 0000000..406c0f7 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/shaders/effects/blur_radial_gaussian.frag @@ -0,0 +1,42 @@ + +// [COMBO] {"material":"ui_editor_properties_blur_alpha","combo":"BLURALPHA","type":"options","default":1} + +#include "common_blur.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float u_Scale; // {"default":1,"label":"ui_editor_properties_scale","material":"scale","range":[0.01,2.0]} +uniform vec2 u_Center; // {"label":"ui_editor_properties_center","material":"center","position":true,"default":"0.5 0.5"} + +#if MASK +varying vec2 v_TexCoordMask; +#endif + +void main() { +#if KERNEL == 0 + vec4 albedo = blurRadial13a(v_TexCoord.xy, u_Center, u_Scale); +#endif +#if KERNEL == 1 + vec4 albedo = blurRadial7a(v_TexCoord.xy, u_Center, u_Scale); +#endif +#if KERNEL == 2 + vec4 albedo = blurRadial3a(v_TexCoord.xy, u_Center, u_Scale); +#endif + +#if MASK || BLURALPHA == 0 + vec4 prev = texSample2D(g_Texture0, v_TexCoord.xy); +#endif + +#if MASK + albedo = mix(prev, albedo, texSample2D(g_Texture1, v_TexCoordMask.xy).r); +#endif + +#if BLURALPHA == 0 + albedo.a = prev.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/blurradial/shaders/effects/blur_radial_gaussian.vert b/modules/wallpaper-engine/effects/blurradial/shaders/effects/blur_radial_gaussian.vert new file mode 100644 index 0000000..42ba948 --- /dev/null +++ b/modules/wallpaper-engine/effects/blurradial/shaders/effects/blur_radial_gaussian.vert @@ -0,0 +1,24 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":0,"options":{"13":0,"7":1,"3":2}} + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if MASK +uniform vec4 g_Texture2Resolution; +varying vec2 v_TexCoordMask; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; +#if MASK + v_TexCoordMask.xy = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/chromaticaberration/effect.json b/modules/wallpaper-engine/effects/chromaticaberration/effect.json new file mode 100644 index 0000000..0c9e3f6 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "chromatic_aberration", + "name" : "ui_editor_effect_chromatic_abberation_title", + "description" : "ui_editor_effect_chromatic_abberation_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/chromatic_aberration.json" + } + ], + "dependencies" : + [ + "materials/effects/chromatic_aberration.json", + "shaders/effects/chromatic_aberration.frag", + "shaders/effects/chromatic_aberration.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/materials/effects/chromatic_aberration.json b/modules/wallpaper-engine/effects/chromaticaberration/materials/effects/chromatic_aberration.json new file mode 100644 index 0000000..9476bf0 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/materials/effects/chromatic_aberration.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/chromatic_aberration", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/effects/chromaticaberration/effect.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/effects/chromaticaberration/effect.json new file mode 100644 index 0000000..0c9e3f6 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/effects/chromaticaberration/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "chromatic_aberration", + "name" : "ui_editor_effect_chromatic_abberation_title", + "description" : "ui_editor_effect_chromatic_abberation_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/chromatic_aberration.json" + } + ], + "dependencies" : + [ + "materials/effects/chromatic_aberration.json", + "shaders/effects/chromatic_aberration.frag", + "shaders/effects/chromatic_aberration.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.tex new file mode 100644 index 0000000..58452ea Binary files /dev/null and b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effects/chromatic_aberration.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effects/chromatic_aberration.json new file mode 100644 index 0000000..9476bf0 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/materials/effects/chromatic_aberration.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/chromatic_aberration", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/project.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/scene.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/scene.json new file mode 100644 index 0000000..66d72a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/scene.json @@ -0,0 +1,95 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/chromaticaberration/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "combos" : + { + "MODE" : 0, + "VARIATION" : 0 + }, + "constantshadervalues" : + { + "ui_editor_properties_center" : "0.5 0.5", + "ui_editor_properties_center_falloff" : 0.5, + "ui_editor_properties_strength" : 9 + }, + "id" : 19 + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/shaders/effects/chromatic_aberration.frag b/modules/wallpaper-engine/effects/chromaticaberration/preview/shaders/effects/chromatic_aberration.frag new file mode 100644 index 0000000..944abe6 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/shaders/effects/chromatic_aberration.frag @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"ui_editor_properties_chroma","combo":"VARIATION","type":"options","default":0,"options":{"Red, blue":0,"Yellow, purple":1,"Magenta, green":2}} +// [COMBO] {"material":"ui_editor_properties_mode","combo":"MODE","type":"options","default":0,"options":{"Expansion":0,"Directional":1,"Radial":2}} + +#include "common.h" + +uniform sampler2D g_Texture0; // {"hidden":true} + +uniform float u_Direction; // {"material":"ui_editor_properties_direction","default":1.57079632679,"direction":true,"conversion":"rad2deg"} +uniform float u_Strength; // {"material":"ui_editor_properties_strength","default":1,"range":[0,2]} +uniform float u_CenterFalloff; // {"material":"ui_editor_properties_center_falloff","default":1,"range":[0,1]} +uniform vec2 u_Center; // {"material":"ui_editor_properties_center","position":true,"default":"0.5 0.5"} + +varying vec2 v_TexCoord; + +void main() { + vec2 delta = v_TexCoord.xy - u_Center; + +#if MODE == 0 + float falloff = mix(0.5 / (length(delta) + 0.0001), 1.0, u_CenterFalloff); + delta *= u_Strength * 0.01 * falloff; + vec2 coords0 = v_TexCoord.xy + delta; + vec2 coords1 = v_TexCoord.xy - delta; +#endif + +#if MODE == 1 + vec2 direction = vec2(-sin(u_Direction), cos(u_Direction)); + float falloff = mix(1.0, abs(dot(direction, delta)) * 2.0, u_CenterFalloff); + direction *= u_Strength * 0.01 * falloff; + vec2 coords0 = v_TexCoord.xy + direction; + vec2 coords1 = v_TexCoord.xy - direction; +#endif + +#if MODE == 2 + float falloff = mix(0.5 / (length(delta) + 0.0001), 1.0, u_CenterFalloff); + float amt = u_Strength * 0.01 * falloff; + vec2 coords0 = u_Center + rotateVec2(delta, amt); + vec2 coords1 = u_Center + rotateVec2(delta, -amt); +#endif + + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + vec4 s0 = texSample2D(g_Texture0, coords0); + vec4 s1 = texSample2D(g_Texture0, coords1); + +#if VARIATION == 0 + albedo.r = s0.r; + albedo.b = s1.b; +#endif + +#if VARIATION == 1 + albedo.g = s1.g; + albedo.b = s0.b; +#endif + +#if VARIATION == 2 + albedo.g = s0.g; + albedo.r = s1.r; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/shaders/effects/chromatic_aberration.vert b/modules/wallpaper-engine/effects/chromaticaberration/preview/shaders/effects/chromatic_aberration.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/shaders/effects/chromatic_aberration.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/chromaticaberration/preview/template.json b/modules/wallpaper-engine/effects/chromaticaberration/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/chromaticaberration/shaders/effects/chromatic_aberration.frag b/modules/wallpaper-engine/effects/chromaticaberration/shaders/effects/chromatic_aberration.frag new file mode 100644 index 0000000..dc013f4 --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/shaders/effects/chromatic_aberration.frag @@ -0,0 +1,90 @@ + +// [COMBO] {"material":"ui_editor_properties_chroma","combo":"VARIATION","type":"options","default":0,"options":{"ui_editor_properties_chroma_red_blue":0,"ui_editor_properties_chroma_yellow_purple":1,"ui_editor_properties_chroma_magenta_green":2}} +// [COMBO] {"material":"ui_editor_properties_mode","combo":"MODE","type":"options","default":0,"options":{"ui_editor_properties_expansion":0,"ui_editor_properties_directional":1,"ui_editor_properties_radial":2,"ui_editor_properties_barrel":3}} + +#include "common.h" + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float u_Direction; // {"material":"ui_editor_properties_direction","default":1.57079632679,"direction":true,"conversion":"rad2deg"} +uniform float u_Strength; // {"material":"ui_editor_properties_strength","default":1,"range":[0,2]} +uniform float u_CenterFalloff; // {"material":"ui_editor_properties_center_falloff","default":1,"range":[0,1]} +uniform vec2 u_Center; // {"material":"ui_editor_properties_center","position":true,"default":"0.5 0.5"} + +varying vec4 v_TexCoord; + +#if MODE == 3 +vec2 BC(vec2 coords, in float amt) +{ + coords = coords * CAST2(2.0) - CAST2(1.0); + float v = coords.x * coords.x + coords.y * coords.y; + coords *= CAST2(1.0) + amt * v; + coords = coords * CAST2(0.5) + CAST2(0.5); + return coords; +} +#endif + +void main() { + vec2 delta = v_TexCoord.xy - u_Center; + +#if MODE == 0 + float falloff = mix(0.5 / (length(delta) + 0.0001), 1.0, u_CenterFalloff); + delta *= u_Strength * 0.01 * falloff; + vec2 coords0 = v_TexCoord.xy + delta; + vec2 coords1 = v_TexCoord.xy - delta; +#endif + +#if MODE == 1 + vec2 direction = vec2(-sin(u_Direction), cos(u_Direction)); + float falloff = mix(1.0, abs(dot(direction, delta)) * 2.0, u_CenterFalloff); + direction *= u_Strength * 0.01 * falloff; + vec2 coords0 = v_TexCoord.xy + direction; + vec2 coords1 = v_TexCoord.xy - direction; +#endif + +#if MODE == 2 + float falloff = mix(0.5 / (length(delta) + 0.0001), 1.0, u_CenterFalloff); + float amt = u_Strength * 0.01 * falloff; + vec2 coords0 = u_Center + rotateVec2(delta, amt); + vec2 coords1 = u_Center + rotateVec2(delta, -amt); +#endif + +#if MODE == 3 + vec2 refCoords = v_TexCoord.xy; + + refCoords -= CAST2(0.5); + refCoords *= CAST2(1.0 - u_Strength * 0.0125); + refCoords += CAST2(0.5); + vec2 coords0 = BC(refCoords, u_Strength * 0.05); + vec2 coords1 = BC(refCoords, u_Strength * -0.02); +#endif + + vec4 sc = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 s0 = texSample2D(g_Texture0, coords0); + vec4 s1 = texSample2D(g_Texture0, coords1); + + vec4 albedo = sc; + +#if VARIATION == 0 + albedo.r = s0.r; + albedo.b = s1.b; +#endif + +#if VARIATION == 1 + albedo.g = s1.g; + albedo.b = s0.b; +#endif + +#if VARIATION == 2 + albedo.g = s0.g; + albedo.r = s1.r; +#endif + +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo = mix(sc, albedo, mask); +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/chromaticaberration/shaders/effects/chromatic_aberration.vert b/modules/wallpaper-engine/effects/chromaticaberration/shaders/effects/chromatic_aberration.vert new file mode 100644 index 0000000..26cf4dd --- /dev/null +++ b/modules/wallpaper-engine/effects/chromaticaberration/shaders/effects/chromatic_aberration.vert @@ -0,0 +1,18 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/clouds/effect.json b/modules/wallpaper-engine/effects/clouds/effect.json new file mode 100644 index 0000000..1d59547 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/effect.json @@ -0,0 +1,37 @@ +{ + "version" : 2, + "replacementkey" : "clouds", + "name" : "ui_editor_effect_clouds_title", + "description" : "ui_editor_effect_clouds_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/clouds.json" + } + ], + "dependencies" : + [ + "materials/effects/clouds.json", + "shaders/effects/clouds.frag", + "shaders/effects/clouds.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "condition" : + { + "PERSPECTIVE" : 1 + }, + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/materials/effects/clouds.json b/modules/wallpaper-engine/effects/clouds/materials/effects/clouds.json new file mode 100644 index 0000000..858770a --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/materials/effects/clouds.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/clouds", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/effects/blurprecise/effect.json b/modules/wallpaper-engine/effects/clouds/preview/effects/blurprecise/effect.json new file mode 100644 index 0000000..b247437 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/effects/blurprecise/effect.json @@ -0,0 +1,45 @@ +{ + "name" : "ui_editor_effect_blur_precise_title", + "description" : "ui_editor_effect_blur_precise_description", + "group" : "blur", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_precise_gaussian_x.json", + "target" : "_rt_FullCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_precise_gaussian_y.json", + "bind" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "index" : 0 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "scale" : 1, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/blur_precise_gaussian_x.json", + "materials/effects/blur_precise_gaussian_y.json", + "shaders/effects/blur_precise_gaussian.frag", + "shaders/effects/blur_precise_gaussian.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/effects/clouds/effect.json b/modules/wallpaper-engine/effects/clouds/preview/effects/clouds/effect.json new file mode 100644 index 0000000..c0e2300 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/effects/clouds/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "ui_editor_effect_clouds_title", + "description" : "ui_editor_effect_clouds_description", + "group" : "colorize", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/clouds.json" + } + ], + "dependencies" : + [ + "materials/effects/clouds.json", + "shaders/effects/clouds.frag", + "shaders/effects/clouds.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/effects/motionblur/effect.json b/modules/wallpaper-engine/effects/clouds/preview/effects/motionblur/effect.json new file mode 100644 index 0000000..3b681a2 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/effects/motionblur/effect.json @@ -0,0 +1,62 @@ +{ + "name" : "ui_editor_effect_motion_blur_title", + "description" : "ui_editor_effect_motion_blur_description", + "group" : "blur", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/motionblur_accumulation.json", + "target" : "_rt_FullCompoBuffer2", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + }, + { + "name" : "_rt_FullCompoBuffer1", + "index" : 1 + } + ] + }, + { + "command" : "copy", + "target" : "_rt_FullCompoBuffer1", + "source" : "_rt_FullCompoBuffer2" + }, + { + "material" : "materials/effects/motionblur_combine.json", + "bind" : + [ + { + "name" : "_rt_FullCompoBuffer2", + "index" : 0 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "scale" : 1, + "format" : "rgba8888", + "unique" : true + }, + { + "name" : "_rt_FullCompoBuffer2", + "scale" : 1, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/motionblur_accumulation.json", + "materials/effects/motionblur_combine.json", + "shaders/effects/motionblur_accumulation.frag", + "shaders/effects/motionblur_accumulation.vert", + "shaders/effects/motionblur_combine.frag", + "shaders/effects/motionblur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/effects/perspective/effect.json b/modules/wallpaper-engine/effects/clouds/preview/effects/perspective/effect.json new file mode 100644 index 0000000..aaadc86 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/effects/perspective/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "ui_editor_effect_perspective_title", + "description" : "ui_editor_effect_perspective_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/perspective.json" + } + ], + "dependencies" : + [ + "materials/effects/perspective.json", + "shaders/effects/perspective.frag", + "shaders/effects/perspective.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/effects/tint/effect.json b/modules/wallpaper-engine/effects/clouds/preview/effects/tint/effect.json new file mode 100644 index 0000000..090835a --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/effects/tint/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "ui_editor_effect_tint_title", + "description" : "ui_editor_effect_tint_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.tex new file mode 100644 index 0000000..24a2d91 Binary files /dev/null and b/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/blur_precise_gaussian_x.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/blur_precise_gaussian_x.json new file mode 100644 index 0000000..4df1eaa --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/blur_precise_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_precise_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/blur_precise_gaussian_y.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/blur_precise_gaussian_y.json new file mode 100644 index 0000000..37b87de --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/blur_precise_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/blur_precise_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/clouds.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/clouds.json new file mode 100644 index 0000000..858770a --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/clouds.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/clouds", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/motionblur_accumulation.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/motionblur_accumulation.json new file mode 100644 index 0000000..dd151ff --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/motionblur_accumulation.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/motionblur_accumulation", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/motionblur_combine.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/motionblur_combine.json new file mode 100644 index 0000000..8be581f --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/motionblur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/motionblur_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/perspective.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/perspective.json new file mode 100644 index 0000000..7436af2 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/perspective.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/perspective", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/materials/effects/tint.json b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/clouds/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/project.json b/modules/wallpaper-engine/effects/clouds/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/scene.json b/modules/wallpaper-engine/effects/clouds/preview/scene.json new file mode 100644 index 0000000..846dcf6 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/scene.json @@ -0,0 +1,152 @@ +{ + "camera" : + { + "center" : "-1.873 4.397 -1.000", + "eye" : "-1.873 4.397 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "config" : + { + "passthrough" : true + }, + "copybackground" : false, + "effects" : + [ + { + "file" : "effects/tint/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 0 + }, + "constantshadervalues" : + { + "ui_editor_properties_alpha" : 1, + "ui_editor_properties_color" : "1 1 1" + } + } + ] + }, + { + "file" : "effects/clouds/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 2, + "SHADING" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_alpha" : 1, + "ui_editor_properties_color_end" : "0.7647058823529411 0.8235294117647058 1", + "ui_editor_properties_color_start" : "1 1 1", + "ui_editor_properties_direction" : 4.0199999809265137, + "ui_editor_properties_feather" : 0.079999998211860657, + "ui_editor_properties_scale" : "2 1.3", + "ui_editor_properties_shading" : 1, + "ui_editor_properties_shading_direction" : 3.2699999809265137, + "ui_editor_properties_threshold" : 0.27000001072883606 + }, + "textures" : [ null, "util/clouds_256" ] + } + ] + }, + { + "file" : "effects/blurprecise/effect.json", + "passes" : + [ + { + "combos" : + { + "KERNEL" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_scale" : "1.16 1.16" + } + }, + { + "combos" : + { + "KERNEL" : 1, + "VERTICAL" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_scale" : "1.16 1.16" + } + } + ] + }, + { + "file" : "effects/motionblur/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Accumulation rate" : 0.059999998658895493 + }, + "textures" : [ null, "_rt_FullCompoBuffer1_23_40" ] + }, + {} + ] + } + ], + "id" : 23, + "image" : "models/util/composelayer.json", + "name" : "Compose", + "origin" : "128.000 127.535 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/blur_precise_gaussian.frag b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/blur_precise_gaussian.frag new file mode 100644 index 0000000..6da1abd --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/blur_precise_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.27901 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.44198 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.27901; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/blur_precise_gaussian.vert b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/blur_precise_gaussian.vert new file mode 100644 index 0000000..3417510 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/blur_precise_gaussian.vert @@ -0,0 +1,66 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":2,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec2 g_Scale; // {"material":"ui_editor_properties_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { +#if VERTICAL + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#else + gl_Position = vec4(a_Position, 1.0); +#endif + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/clouds.frag b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/clouds.frag new file mode 100644 index 0000000..f61c5e9 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/clouds.frag @@ -0,0 +1,60 @@ + +// [COMBO] {"material":"ui_editor_properties_shading","combo":"SHADING","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordClouds; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_albedo","default":"util/clouds_256"} +uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK"} + +uniform float g_CloudsAlpha; // {"material":"ui_editor_properties_alpha","default":1.0,"range":[0.01, 1]} +uniform float g_CloudThreshold; // {"material":"ui_editor_properties_threshold","default":0.2,"range:":[0,1]} +uniform float g_CloudFeather; // {"material":"ui_editor_properties_feather","default":0.1,"range":[0,1]} +uniform float g_CloudShading; // {"material":"ui_editor_properties_shading","default":0.5,"range":[0,1]} +uniform float g_ShadingDirection; // {"material":"ui_editor_properties_shading_direction","default":0,"range":[0,6.28]} +uniform vec3 g_Color1; // {"material":"ui_editor_properties_color_start","default":"1 1 1","type":"color"} +uniform vec3 g_Color2; // {"material":"ui_editor_properties_color_end","default":"0 0 0","type":"color"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float cloud0 = texSample2D(g_Texture1, v_TexCoordClouds.xy).r; + float cloud1 = texSample2D(g_Texture1, v_TexCoordClouds.zw).r; + + float cloudBlend = cloud0 * cloud1; + vec3 cloudColor = CAST3(1.0); + +#if SHADING == 1 + float light = 0.0; + vec2 cloudDeltas = vec2(ddx(cloudBlend), ddy(cloudBlend)); + float shadingLength = length(cloudDeltas); + if (shadingLength > 0.001) + { + cloudDeltas /= shadingLength; + vec2 direction = rotateVec2(vec2(0, -1.0), g_ShadingDirection); + light = dot(direction, cloudDeltas) * 0.5 + 0.5; + } + light = mix(0.5, light, g_CloudShading); + cloudColor = mix(g_Color2, g_Color1, light); +#endif + + cloudBlend = smoothstep(g_CloudThreshold, g_CloudThreshold + g_CloudFeather, cloudBlend); + + float blend = cloudBlend * g_CloudsAlpha; +#if MASK == 1 + blend *= texSample2D(g_Texture2, v_TexCoord.zw).r; +#endif + albedo.a = blend; + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, cloudColor, blend); + +#if BLENDMODE == 0 + albedo.a = 1.0; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/clouds.vert b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/clouds.vert new file mode 100644 index 0000000..5d5e39e --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/clouds.vert @@ -0,0 +1,33 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +uniform float g_Time; +uniform vec2 g_CloudSpeeds; // {"material":"ui_editor_properties_speed","default":"0.01 -0.02"} +uniform vec2 g_CloudScales; // {"material":"ui_editor_properties_scale","default":"1.3 0.5"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordClouds; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + v_TexCoordClouds.xy = (a_TexCoord + g_Time * g_CloudSpeeds.x) * g_CloudScales.x; + v_TexCoordClouds.zw = (a_TexCoord + g_Time * g_CloudSpeeds.y) * g_CloudScales.y; + + v_TexCoordClouds.zw = vec2(-v_TexCoordClouds.w, v_TexCoordClouds.z); + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_accumulation.frag b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_accumulation.frag new file mode 100644 index 0000000..5d3638a --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_accumulation.frag @@ -0,0 +1,21 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Previous framebuffer","hidden":true} +uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK"} + +uniform float g_Amount; // {"material":"Accumulation rate","default":0.8,"range":[0.01, 1]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 pastAlbedo = texSample2D(g_Texture1, v_TexCoord.xy); + + float rate = g_Amount; +#if MASK == 1 + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; + rate = g_Amount + (1.0 - g_Amount) * (1.0 - mask); +#endif + + gl_FragColor = mix(pastAlbedo, albedo, rate); +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_accumulation.vert b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_accumulation.vert new file mode 100644 index 0000000..0b74c35 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_accumulation.vert @@ -0,0 +1,19 @@ + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xyzw = a_TexCoord.xyxy; + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_combine.frag b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_combine.frag new file mode 100644 index 0000000..25ba470 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_combine.frag @@ -0,0 +1,9 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_combine.vert b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_combine.vert new file mode 100644 index 0000000..40d3014 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/motionblur_combine.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/perspective.frag b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/perspective.frag new file mode 100644 index 0000000..7845fec --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/perspective.frag @@ -0,0 +1,15 @@ + +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":1} + +varying vec3 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} + +void main() { + vec2 texCoord = v_TexCoord.xy / v_TexCoord.z; + +#if REPEAT + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/perspective.vert b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/perspective.vert new file mode 100644 index 0000000..8b65122 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/perspective.vert @@ -0,0 +1,84 @@ + +// [COMBO] {"material":"ui_editor_properties_mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +uniform float g_Top; // {"material":"ui_editor_properties_top","default":0,"range":[-0.49,0.49]} +uniform float g_Bottom; // {"material":"ui_editor_properties_bottom","default":0,"range":[-0.49,0.49]} +uniform float g_Left; // {"material":"ui_editor_properties_left","default":0,"range":[-0.49,0.49]} +uniform float g_Right; // {"material":"ui_editor_properties_right","default":0,"range":[-0.49,0.49]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec3 v_TexCoord; + + +void main() { + + vec3 position = a_Position; + v_TexCoord.xy = a_TexCoord; + v_TexCoord.z = 1.0; + +#if MODE == 1 + position.x += mix(g_Texture0Resolution.z * g_Top * mix(-1.0, 1.0, step(a_TexCoord.x, 0.5)), + g_Texture0Resolution.z * g_Bottom * mix(-1.0, 1.0, step(a_TexCoord.x, 0.5)), + step(0.5, a_TexCoord.y)); + + position.y += mix(g_Texture0Resolution.w * -g_Left * mix(-1.0, 1.0, step(a_TexCoord.y, 0.5)), + g_Texture0Resolution.w * -g_Right * mix(-1.0, 1.0, step(a_TexCoord.y, 0.5)), + step(0.5, a_TexCoord.x)); + +#endif + + vec2 p3 = vec2(g_Top, g_Left); + vec2 p2 = vec2(1 - g_Top, g_Right); + vec2 p1 = vec2(1 - g_Bottom, 1 - g_Right); + vec2 p0 = vec2(g_Bottom, 1 - g_Left); + + float ax = p2.x - p0.x; + float ay = p2.y - p0.y; + float bx = p3.x - p1.x; + float by = p3.y - p1.y; + + float cross = ax * by - ay * bx; + + float cy = p0.y - p1.y; + float cx = p0.x - p1.x; + + float s = (ax * cy - ay * cx) / cross; + + float t = (bx * cy - by * cx) / cross; + + float q0 = 1 / (1 - t); + float q1 = 1 / (1 - s); + float q2 = 1 / t; + float q3 = 1 / s; + + float q = mix( + mix(q3, q2, a_TexCoord.x), + mix(q0, q1, a_TexCoord.x), + a_TexCoord.y + ); + + v_TexCoord.xy = a_TexCoord; + + #if MODE == 0 + v_TexCoord -= 0.5; + v_TexCoord.x *= 0.5 / (0.5 - mix(g_Top, g_Bottom, step(0.5, a_TexCoord.y))); + v_TexCoord.y *= 0.5 / (0.5 - mix(g_Left, g_Right, step(0.5, a_TexCoord.x))); + v_TexCoord += 0.5; + #endif + + v_TexCoord.xy *= q; + v_TexCoord.z = q; + + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + + +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/tint.frag new file mode 100644 index 0000000..14266df --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/tint.frag @@ -0,0 +1,29 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK"} + +uniform float g_BlendAlpha; // {"material":"ui_editor_properties_alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"ui_editor_properties_color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = g_BlendAlpha; + +#if MASK + mask = texSample2D(g_Texture1, v_TexCoord.zw); +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, mask); + +#if BLENDMODE == 0 + albedo.a = 1.0; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/tint.vert new file mode 100644 index 0000000..3bbbc06 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/shaders/effects/tint.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture1Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/clouds/preview/template.json b/modules/wallpaper-engine/effects/clouds/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/clouds/shaders/effects/clouds.frag b/modules/wallpaper-engine/effects/clouds/shaders/effects/clouds.frag new file mode 100644 index 0000000..436a58f --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/shaders/effects/clouds.frag @@ -0,0 +1,101 @@ + +// [COMBO] {"material":"ui_editor_properties_shading","combo":"SHADING","type":"options","default":7} +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_albedo","default":"util/clouds_256"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_CloudsAlpha; // {"material":"alpha","label":"ui_editor_properties_alpha","default":1.0,"range":[0.01, 1]} +uniform float g_CloudThreshold; // {"material":"threshold","label":"ui_editor_properties_threshold","default":0,"range:":[0,1]} +uniform float g_CloudFeather; // {"material":"feather","label":"ui_editor_properties_feather","default":0.5,"range":[0,1]} +uniform float g_CloudLOD; // {"material":"smoothness","label":"ui_editor_properties_smoothness","default":0.0,"range":[0, 5]} + +uniform vec3 g_Color1; // {"material":"colorstart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color"} +uniform vec3 g_Color2; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"1 1 1","type":"color"} + +#if SHADING == 100 +uniform float g_CloudShading; // {"material":"shadingamount","label":"ui_editor_properties_shading_amount","default":50,"range":[0,100]} +uniform float g_ShadingDirection; // {"material":"shadingdirection","label":"ui_editor_properties_shading_direction","default":3.141,"range":[0,6.28]} +#endif + +#if PERSPECTIVE == 0 +varying vec4 v_TexCoordClouds; +#else +uniform float g_Time; +uniform vec4 g_CloudSpeeds; // {"material":"speed","label":"ui_editor_properties_speed","default":"0.01 0.01 -0.02 -0.02"} +uniform vec4 g_CloudScales; // {"material":"scale","label":"ui_editor_properties_scale","default":"1.3 1.3 0.5 0.5"} + +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 cloudTexCoods; + +#if PERSPECTIVE == 0 + cloudTexCoods = v_TexCoordClouds; +#else + vec2 perspectiveCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + cloudTexCoods.xyzw = perspectiveCoords.xyxy; + + cloudTexCoods.xy = (cloudTexCoods.xy + g_Time * g_CloudSpeeds.xy) * g_CloudScales.xy; + cloudTexCoods.zw = (cloudTexCoods.zw + g_Time * g_CloudSpeeds.zw) * g_CloudScales.zw; + //cloudTexCoods.xz *= aspect; + cloudTexCoods.zw = vec2(-cloudTexCoods.w, cloudTexCoods.z); + +#endif + + //float cloud0 = texSample2D(g_Texture1, v_TexCoordClouds.xy).r; + //float cloud1 = texSample2D(g_Texture1, v_TexCoordClouds.zw).r; + float cloud0 = texSample2DLod(g_Texture1, cloudTexCoods.xy, g_CloudLOD).r; + float cloud1 = texSample2DLod(g_Texture1, cloudTexCoods.zw, g_CloudLOD).r; + + float cloudBlend = cloud0 * cloud1; + vec3 cloudColor = CAST3(1.0); + +#if SHADING == 1 + //float light = 0.5; + //vec2 cloudDeltas = vec2(ddx(cloudBlend), ddy(cloudBlend)); + //float shadingLength = length(cloudDeltas); + //if (shadingLength > 0.001) + //{ + // cloudDeltas *= g_CloudShading; + // vec2 direction = rotateVec2(vec2(0, -1.0), g_ShadingDirection); + // light = saturate(dot(direction, cloudDeltas) * 0.5 + 0.5); + //} + //cloudColor = mix(g_Color2, g_Color1, light); +#endif + + cloudBlend = smoothstep(g_CloudThreshold, g_CloudThreshold + g_CloudFeather, cloudBlend); + + float blend = cloudBlend * g_CloudsAlpha; +#if PERSPECTIVE == 1 + blend *= step(0.0, v_TexCoordPerspective.z); +#endif + +#if SHADING == 0 + cloudColor = mix(g_Color2, g_Color1, blend); +#else + cloudColor = mix(g_Color2, g_Color1, blend) * cloud0 * cloud1; +#endif + +#if MASK + blend *= texSample2D(g_Texture2, v_TexCoord.zw).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, cloudColor, blend); + +#if WRITEALPHA + //albedo.a = 1.0; + albedo.a = blend; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/clouds/shaders/effects/clouds.vert b/modules/wallpaper-engine/effects/clouds/shaders/effects/clouds.vert new file mode 100644 index 0000000..fd88805 --- /dev/null +++ b/modules/wallpaper-engine/effects/clouds/shaders/effects/clouds.vert @@ -0,0 +1,52 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if PERSPECTIVE == 0 +varying vec4 v_TexCoordClouds; +uniform float g_Time; +uniform vec2 g_CloudSpeeds; // {"material":"speed","label":"ui_editor_properties_speed","default":"0.01 -0.02"} +uniform vec4 g_CloudScales; // {"material":"scale","label":"ui_editor_properties_scale","default":"1.3 1.3 0.5 0.5"} +#else +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} + +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if PERSPECTIVE == 0 + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + v_TexCoordClouds.xy = (a_TexCoord + g_Time * g_CloudSpeeds.x) * g_CloudScales.xy; + v_TexCoordClouds.zw = (a_TexCoord + g_Time * g_CloudSpeeds.y) * g_CloudScales.zw; + v_TexCoordClouds.xz *= aspect; + v_TexCoordClouds.zw = vec2(-v_TexCoordClouds.w, v_TexCoordClouds.z); +#else + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/colorkey/effect.json b/modules/wallpaper-engine/effects/colorkey/effect.json new file mode 100644 index 0000000..f3fd3b7 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "colorkey", + "name" : "ui_editor_effect_color_key_title", + "description" : "ui_editor_effect_color_key_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/colorkey.json" + } + ], + "dependencies" : + [ + "materials/effects/colorkey.json", + "shaders/effects/colorkey.frag", + "shaders/effects/colorkey.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/materials/effects/colorkey.json b/modules/wallpaper-engine/effects/colorkey/materials/effects/colorkey.json new file mode 100644 index 0000000..96b9986 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/materials/effects/colorkey.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/colorkey", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/effects/colorkey/effect.json b/modules/wallpaper-engine/effects/colorkey/preview/effects/colorkey/effect.json new file mode 100644 index 0000000..70adb0d --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/effects/colorkey/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Color Key", + "description" : "Mask a part of the image that matches a color of choice.", + "group" : "colorize", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/colorkey.json" + } + ], + "dependencies" : + [ + "materials/effects/colorkey.json", + "shaders/effects/colorkey.frag", + "shaders/effects/colorkey.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/effects/opacity/effect.json b/modules/wallpaper-engine/effects/colorkey/preview/effects/opacity/effect.json new file mode 100644 index 0000000..41f954b --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/effects/opacity/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Opacity", + "description" : "Adds an opacity mask to the image.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/opacity.json" + } + ], + "dependencies" : + [ + "materials/effects/opacity.json", + "shaders/effects/opacity.frag", + "shaders/effects/opacity.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.tex new file mode 100644 index 0000000..24a2d91 Binary files /dev/null and b/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/materials/effects/colorkey.json b/modules/wallpaper-engine/effects/colorkey/preview/materials/effects/colorkey.json new file mode 100644 index 0000000..96b9986 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/materials/effects/colorkey.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/colorkey", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/materials/effects/opacity.json b/modules/wallpaper-engine/effects/colorkey/preview/materials/effects/opacity.json new file mode 100644 index 0000000..01b5699 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/materials/effects/opacity.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/opacity", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/colorkey/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/project.json b/modules/wallpaper-engine/effects/colorkey/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/scene.json b/modules/wallpaper-engine/effects/colorkey/preview/scene.json new file mode 100644 index 0000000..f4ea5a8 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/scene.json @@ -0,0 +1,66 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/colorkey/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Color" : "0.5333333333333333 0.6784313725490196 0.5333333333333333", + "Fuzziness" : 0.029999999329447746, + "Tolerance" : 0.40000000596046448, + "Write alpha" : 0 + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/colorkey.frag b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/colorkey.frag new file mode 100644 index 0000000..2d25066 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/colorkey.frag @@ -0,0 +1,26 @@ + +// [COMBO] {"material":"Invert","combo":"INVERT","type":"options","default":0} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_KeyAlpha; // {"material":"Write alpha","default":0,"range":[0,1]} +uniform float g_KeyFuzz; // {"material":"Fuzziness","default":0,"range":[0,3]} +uniform float g_KeyTolerance; // {"material":"Tolerance","default":0.1,"range":[0,3]} +uniform vec3 g_KeyColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + float delta = dot(abs(g_KeyColor - albedo.rgb), vec3(1, 1, 1)); + float blend = smoothstep(0.001, 0.002 + g_KeyFuzz, delta - g_KeyTolerance); + +#if INVERT == 1 + blend = 1.0 - blend; +#endif + + albedo.a *= mix(g_KeyAlpha, 1.0, blend); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/colorkey.vert b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/colorkey.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/colorkey.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/opacity.frag b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/opacity.frag new file mode 100644 index 0000000..b0f7360 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/opacity.frag @@ -0,0 +1,13 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo.a *= mask; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/opacity.vert b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/opacity.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/shaders/effects/opacity.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/colorkey/preview/template.json b/modules/wallpaper-engine/effects/colorkey/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/colorkey/shaders/effects/colorkey.frag b/modules/wallpaper-engine/effects/colorkey/shaders/effects/colorkey.frag new file mode 100644 index 0000000..0d50852 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/shaders/effects/colorkey.frag @@ -0,0 +1,31 @@ + +// [COMBO] {"material":"ui_editor_properties_invert","combo":"INVERT","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_flatten","combo":"FLATTEN","type":"options","default":0} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +uniform float g_KeyAlpha; // {"material":"alpha","label":"ui_editor_properties_write_alpha","default":0,"range":[0,1]} +uniform float g_KeyFuzz; // {"material":"fuzziness","label":"ui_editor_properties_fuzziness","default":0,"range":[0,3]} +uniform float g_KeyTolerance; // {"material":"tolerance","label":"ui_editor_properties_tolerance","default":0.1,"range":[0,3]} +uniform vec3 g_KeyColor; // {"material":"color","label":"ui_editor_properties_color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + float delta = dot(abs(g_KeyColor - albedo.rgb), vec3(1, 1, 1)); + float blend = smoothstep(0.001, 0.002 + g_KeyFuzz, delta - g_KeyTolerance); + +#if INVERT == 1 + blend = 1.0 - blend; +#endif + + albedo.a *= mix(g_KeyAlpha, 1.0, blend); + +#if FLATTEN == 1 + albedo.rgb *= albedo.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/colorkey/shaders/effects/colorkey.vert b/modules/wallpaper-engine/effects/colorkey/shaders/effects/colorkey.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/colorkey/shaders/effects/colorkey.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/effect.json b/modules/wallpaper-engine/effects/cursorripple/effect.json new file mode 100644 index 0000000..f9aede3 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/effect.json @@ -0,0 +1,90 @@ +{ + "version" : 1, + "replacementkey" : "cursorripple", + "name" : "ui_editor_effect_cursor_ripple_title", + "description" : "ui_editor_effect_cursor_ripple_description", + "group" : "interactive", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/cursorripple_apply_force.json", + "target" : "_rt_EightBuffer1", + "bind" : + [ + { + "name" : "_rt_EightBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/cursorripple_simulate_force.json", + "target" : "_rt_EightBuffer2", + "bind" : + [ + { + "name" : "_rt_EightBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/cursorripple_combine.json", + "bind" : + [ + { + "name" : "_rt_EightBuffer2", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_EightBuffer1", + "fit" : 512, + "format" : "rgba8888" + }, + { + "name" : "_rt_EightBuffer2", + "fit" : 512, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/cursorripple_apply_force.json", + "materials/effects/cursorripple_simulate_force.json", + "materials/effects/cursorripple_combine.json", + "shaders/effects/cursorripple_apply_force.frag", + "shaders/effects/cursorripple_apply_force.vert", + "shaders/effects/cursorripple_simulate_force.frag", + "shaders/effects/cursorripple_simulate_force.vert", + "shaders/effects/cursorripple_combine.frag", + "shaders/effects/cursorripple_combine.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "condition" : + { + "PERSPECTIVE" : 1 + }, + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_apply_force.json b/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_apply_force.json new file mode 100644 index 0000000..eaa18f4 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_apply_force.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/cursorripple_apply_force", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "alphawriting": "enabled" + }] +} diff --git a/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_combine.json b/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_combine.json new file mode 100644 index 0000000..ecdd093 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/cursorripple_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_simulate_force.json b/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_simulate_force.json new file mode 100644 index 0000000..edd6f30 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/materials/effects/cursorripple_simulate_force.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/cursorripple_simulate_force", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "alphawriting": "enabled" + }] +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/effects/cursorripple/effect.json b/modules/wallpaper-engine/effects/cursorripple/preview/effects/cursorripple/effect.json new file mode 100644 index 0000000..49f1f16 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/effects/cursorripple/effect.json @@ -0,0 +1,89 @@ +{ + "version" : 1, + "replacementkey" : "cursorripple", + "name" : "ui_editor_effect_cursor_ripple_title", + "description" : "ui_editor_effect_cursor_ripple_description", + "group" : "interactive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/cursorripple_apply_force.json", + "target" : "_rt_QuarterForceRG1", + "bind" : + [ + { + "name" : "_rt_QuarterForceRG2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/cursorripple_simulate_force.json", + "target" : "_rt_QuarterForceRG2", + "bind" : + [ + { + "name" : "_rt_QuarterForceRG1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/cursorripple_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterForceRG2", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterForceRG1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterForceRG2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/cursorripple_apply_force.json", + "materials/effects/cursorripple_simulate_force.json", + "materials/effects/cursorripple_combine.json", + "shaders/effects/cursorripple_apply_force.frag", + "shaders/effects/cursorripple_apply_force.vert", + "shaders/effects/cursorripple_simulate_force.frag", + "shaders/effects/cursorripple_simulate_force.vert", + "shaders/effects/cursorripple_combine.frag", + "shaders/effects/cursorripple_combine.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "condition" : + { + "PERSPECTIVE" : 1 + }, + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.tex new file mode 100644 index 0000000..58452ea Binary files /dev/null and b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_apply_force.json b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_apply_force.json new file mode 100644 index 0000000..eaa18f4 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_apply_force.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/cursorripple_apply_force", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "alphawriting": "enabled" + }] +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_combine.json b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_combine.json new file mode 100644 index 0000000..ecdd093 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/cursorripple_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_simulate_force.json b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_simulate_force.json new file mode 100644 index 0000000..edd6f30 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/materials/effects/cursorripple_simulate_force.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/cursorripple_simulate_force", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "alphawriting": "enabled" + }] +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/cursorripple/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/project.json b/modules/wallpaper-engine/effects/cursorripple/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/scene.json b/modules/wallpaper-engine/effects/cursorripple/preview/scene.json new file mode 100644 index 0000000..fd6c496 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/scene.json @@ -0,0 +1,108 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/cursorripple/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "ripplescale" : 1.0 + }, + "id" : 19 + }, + { + "combos" : + { + "REFLECTION" : 1 + }, + "constantshadervalues" : + { + "rippledecay" : 1.0, + "ripplespeed" : 1.0 + }, + "id" : 21 + }, + { + "constantshadervalues" : + { + "ripplestrength" : 1.0 + }, + "id" : 22, + "textures" : [ null, "_rt_imageLayerComposite_38_a" ] + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_apply_force.frag b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_apply_force.frag new file mode 100644 index 0000000..d5c24a6 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_apply_force.frag @@ -0,0 +1,100 @@ + +varying vec4 v_TexCoord; + +uniform float g_Frametime; +uniform vec4 g_PointerState; +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +varying mat3 v_XForm; +#endif + +void main() { + + vec2 texSource = v_TexCoord.xy; + + vec4 albedo = texSample2D(g_Texture0, texSource); + + // Complete unproject per pixel + vec2 unprojectedUVs = v_PointerUV.xy / v_PointerUV.z; + vec2 unprojectedUVsLast = v_PointerUVLast.xy / v_PointerUVLast.z; + + //vec2 pointerDebug; + //pointerDebug = unprojectedUVs; + unprojectedUVs += 0.5; + unprojectedUVs.y = 1.0 - unprojectedUVs.y; + unprojectedUVsLast += 0.5; + unprojectedUVsLast.y = 1.0 - unprojectedUVsLast.y; + + float rippleMask = 1.0; + +#if PERSPECTIVE == 1 + // This perspective transform will take the cursor within the gizmo boundaries and + // map it to the entire simulation canvas + vec3 tmp = vec3(unprojectedUVs.xy, 1.0); + tmp.xyz = mul(tmp.xyz, v_XForm); + unprojectedUVs = tmp.xy / tmp.z; + + tmp = vec3(unprojectedUVsLast.xy, 1.0); + tmp.xyz = mul(tmp.xyz, v_XForm); + unprojectedUVsLast = tmp.xy / tmp.z; + + // Block impulse when cursor moves across perspective horizon + rippleMask *= step(abs(unprojectedUVs.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVs.y - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.y - 0.5), 0.5); +#endif + + //unprojectedUVs = (texSource - unprojectedUVs); // * vec2(v_PointDelta.y, v_PointerUV.w); + //unprojectedUVsLast = (texSource - unprojectedUVsLast); // * vec2(v_PointDelta.y, v_PointerUVLast.w); + + vec2 lDelta = unprojectedUVs - unprojectedUVsLast; + vec2 texDelta = texSource - unprojectedUVsLast; + + float distLDelta = length(lDelta); + distLDelta = max(0.0001, distLDelta); + lDelta /= distLDelta; // DIV ZERO + float distOnLine = dot(lDelta, texDelta); + //distOnLine = distOnLine * distLDelta; + + float rayMask = max(step(0.0, distOnLine) * step(distOnLine, distLDelta), step(distLDelta, 0.1)); + + distOnLine = saturate(distOnLine / distLDelta) * distLDelta; + vec2 posOnLine = unprojectedUVsLast + lDelta * distOnLine; + + + unprojectedUVs = (texSource - posOnLine) * vec2(v_PointDelta.y, v_PointerUV.w); + + float pointerDist = length(unprojectedUVs); + pointerDist = saturate(1.0 - pointerDist); + + //pointerDist *= step(0.05 * distLDelta, distOnLine); + //pointerDist = 1.0; + pointerDist *= rayMask * rippleMask; + + + float timeAmt = g_Frametime / 0.02; + float pointerMoveAmt = v_PointDelta.x; + float inputStrength = pointerDist * timeAmt * (pointerMoveAmt + g_PointerState.z); // * g_PointerState.z; + //albedo.a = inputStrength + //vec2 impulseDir = saturate(unprojectedUVs * 0.5 + CAST2(0.5)); + vec2 impulseDir = max(CAST2(-1.0), min(CAST2(1.0), unprojectedUVs)); + //albedo.b = 1.0; + + vec4 colorAdd = vec4( + step(0.0, impulseDir.x) * impulseDir.x * inputStrength, + step(0.0, impulseDir.y) * impulseDir.y * inputStrength, + step(impulseDir.x, 0.0) * -impulseDir.x * inputStrength, + step(impulseDir.y, 0.0) * -impulseDir.y * inputStrength + ); + + gl_FragColor = albedo + colorAdd; + + //colorAdd = vec4(pointerDebug * 0.5 + 0.5, 0, 0); + //gl_FragColor = colorAdd; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_apply_force.vert b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_apply_force.vert new file mode 100644 index 0000000..6ffe2ef --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_apply_force.vert @@ -0,0 +1,74 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform mat4 g_EffectTextureProjectionMatrixInverse; +uniform vec2 g_PointerPosition; +uniform vec2 g_PointerPositionLast; +uniform vec4 g_Texture0Resolution; + +uniform float g_RippleScale; // {"material":"ripplescale","label":"ui_editor_properties_ripple_scale","default":1.0,"range":[0,2]} + + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} +varying mat3 v_XForm; +#endif + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord.xy = a_TexCoord.xy; + + vec2 pointer = g_PointerPosition; + pointer.y = 1.0 - pointer.y; // Flip pointer screen space Y to match texture space Y + vec2 pointerLast = g_PointerPositionLast; + pointerLast.y = 1.0 - pointerLast.y; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_XForm = xform; +#endif + + vec4 preTransformPoint = vec4(pointer * 2 - 1, 0.0, 1.0); + vec4 preTransformPointLast = vec4(pointerLast * 2 - 1, 0.0, 1.0); + + + v_PointerUV.xyz = mul(preTransformPoint, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xy *= 0.5; + + v_PointerUVLast.xyz = mul(preTransformPointLast, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUVLast.xy *= 0.5; + + + v_PointerUV.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; + //v_PointerUV.y *= v_PointerUV.w; + + v_PointDelta.x = length(g_PointerPosition - g_PointerPositionLast); + //v_PointDelta *= v_PointDelta; + v_PointDelta.x *= 100; + //v_PointDelta = 1; + + v_PointDelta.y = 60.0 / max(0.0001, g_RippleScale); + v_PointerUV.w *= -v_PointDelta.y; + v_PointerUVLast.w = v_PointerUV.w; + + //vec2 pointerLast = g_PointerPositionLast; + //pointerLast.y = 1.0 - pointerLast.y; // Flip pointer screen space Y to match texture space Y + //v_PointerUVLast.xyz = mul(vec4(pointerLast * 2 - 1, 0.0, 1.0), g_EffectTextureProjectionMatrixInverse).xyw; + //v_PointerUVLast.xy *= 0.5; + //v_PointerUVLast.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_combine.frag b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_combine.frag new file mode 100644 index 0000000..368ae32 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_combine.frag @@ -0,0 +1,69 @@ + +// [COMBO] {"material":"ui_editor_properties_shading","combo":"SHADING","type":"options","default":0} + +#include "common.h" + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +//uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +//uniform vec4 g_Texture0Resolution; + +uniform float g_RippleStrength; // {"material":"ripplestrength","label":"ui_editor_properties_ripple_strength","default":1.0,"range":[0,2]} +uniform float g_ShadingAmount; // {"material":"shadingamount","label":"ui_editor_properties_shading_amount","default":1.0,"range":[0,2]} +uniform vec3 g_ShadingHigh; // {"material":"shadingtinthigh","label":"ui_editor_properties_tint_high","type":"color","default":"1 1 1"} +uniform vec3 g_ShadingLow; // {"material":"shadingtintlow","label":"ui_editor_properties_tint_low","type":"color","default":"0 0 0"} +uniform float g_ShadingDirection; // {"material":"shadingdirection","label":"ui_editor_properties_shading_direction","default":3.14159265358,"range":[0,6.28],"direction":true,"conversion":"rad2deg"} + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + + vec2 srcCoords = v_TexCoord.xy; + vec2 rippleCoords = v_TexCoord.xy; + float rippleMask = 1.0; + +#if PERSPECTIVE == 1 + rippleCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + rippleMask *= step(abs(rippleCoords.x - 0.5), 0.5); + rippleMask *= step(abs(rippleCoords.y - 0.5), 0.5); +#endif + + vec4 albedo = texSample2D(g_Texture0, rippleCoords); + albedo *= albedo; + + vec2 dir = vec2(albedo.x - albedo.z, albedo.y - albedo.w); + + //float pi = 3.14159265359; + float distortAmt = 3.0 * g_RippleStrength; + //distortAmt *= length(dir) * 1.0 * abs(sin(2.0 * atan2(dir.x, dir.y))); + + vec2 offset = dir; + offset *= -0.1 * distortAmt * rippleMask; + //offset.y = 0; + //offset.x = 0; + + vec4 screen = texSample2D(g_Texture1, srcCoords + offset); + //vec4 albedoOld = texSample2D(g_Texture2, v_TexCoord.xy); + +#if SHADING + vec2 shadingDir = dir; + float shadingLength = max(0.99, length(shadingDir)); + shadingDir = mix(shadingDir, shadingDir / shadingLength, step(1.0, shadingLength)); + float shading = dot(rotateVec2(vec2(0, -1), g_ShadingDirection), shadingDir); + + screen.rgb = mix(screen.rgb, screen.rgb * mix(g_ShadingLow, CAST3(1.0) + g_ShadingHigh, shading * 0.5 + 0.5), abs(shading * g_ShadingAmount) * rippleMask); +#endif + + gl_FragColor = screen; + + + //vec4 dirColorTest = vec4(dir * 0.5 + 0.5, 0.0, 1.0); + //gl_FragColor = dirColorTest; + + //gl_FragColor += vec4(distortAmt, distortAmt, distortAmt, 1); +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_combine.vert b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_combine.vert new file mode 100644 index 0000000..71f0f10 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_combine.vert @@ -0,0 +1,30 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_simulate_force.frag b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_simulate_force.frag new file mode 100644 index 0000000..6cf747c --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_simulate_force.frag @@ -0,0 +1,174 @@ + +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","type":"options","default":0} + +uniform float g_Frametime; +uniform vec4 g_Texture0Resolution; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_collision_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","painttexturescale":1} + +uniform float g_RippleSpeed; // {"material":"ripplespeed","label":"ui_editor_properties_ripple_speed","default":1.0,"range":[0,2]} +uniform float g_RippleDecay; // {"material":"rippledecay","label":"ui_editor_properties_ripple_decay","default":1.0,"range":[0,4]} + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +vec4 sampleF(vec4 a, vec4 b, vec4 c) +{ + //float sb = step(length(a), length(b)); + //float sc = step(max(length(a), length(b)), length(c)); + //return mix(mix(a, b, sb), c, sc); + //return a; + + return max(a, max(b, c)); + + //vec4 f = max(a, max(b, c)); + + //float maxAmt = max(f.x, max(f.y, max(f.z, f.w))); + //float totalAmt = dot(CAST4(1.0), f); + + //if (totalAmt <= maxAmt) + // f *= 0.95; + //return f; +} + +void main() { + + vec2 srcCoords = v_TexCoord.xy; + + vec4 albedo = texSample2D(g_Texture0, srcCoords); + vec2 simTexel = 1.0 / g_Texture0Resolution.xy; + vec2 rippleOffset = simTexel * 100 * g_RippleSpeed * g_Frametime; + + vec2 insideRipple = rippleOffset * 1.61; + vec2 outsideRipple = rippleOffset; + + float reflectUp = 0; + float reflectDown = 0; + float reflectLeft = 0; + float reflectRight = 0; + +#if REFLECTION + reflectUp = step(1.0 - simTexel.y, srcCoords.y); + reflectDown = step(srcCoords.y, simTexel.y); + reflectLeft = step(1.0 - simTexel.x, srcCoords.x); + reflectRight = step(srcCoords.x, simTexel.x); +#endif + + vec4 uc = texSample2D(g_Texture0, srcCoords + vec2(0, -insideRipple.y)); + vec4 u00 = texSample2D(g_Texture0, srcCoords + vec2(-outsideRipple.x, -outsideRipple.y)); + vec4 u10 = texSample2D(g_Texture0, srcCoords + vec2(outsideRipple.x, -outsideRipple.y)); + + vec4 dc = texSample2D(g_Texture0, srcCoords + vec2(0, insideRipple.y)); + vec4 d01 = texSample2D(g_Texture0, srcCoords + vec2(-outsideRipple.x, outsideRipple.y)); + vec4 d11 = texSample2D(g_Texture0, srcCoords + vec2(outsideRipple.x, outsideRipple.y)); + + vec4 lc = texSample2D(g_Texture0, srcCoords + vec2(-insideRipple.x, 0)); + vec4 l00 = texSample2D(g_Texture0, srcCoords + vec2(-outsideRipple.x, -outsideRipple.y)); + vec4 l01 = texSample2D(g_Texture0, srcCoords + vec2(-outsideRipple.x, outsideRipple.y)); + + vec4 rc = texSample2D(g_Texture0, srcCoords + vec2(insideRipple.x, 0)); + vec4 r10 = texSample2D(g_Texture0, srcCoords + vec2(outsideRipple.x, -outsideRipple.y)); + vec4 r11 = texSample2D(g_Texture0, srcCoords + vec2(outsideRipple.x, outsideRipple.y)); + + vec4 up = sampleF(uc, u00, u10); + vec4 down = sampleF(dc, d01, d11); + vec4 left = sampleF(lc, l00, l01); + vec4 right = sampleF(rc, r10, r11); + //vec4 up = texSample2D(g_Texture0, srcCoords + vec2(0, -offsetScale.y)); + //vec4 down = texSample2D(g_Texture0, srcCoords + vec2(0, offsetScale.y)); + //vec4 left = texSample2D(g_Texture0, srcCoords + vec2(-offsetScale.x, 0)); + //vec4 right = texSample2D(g_Texture0, srcCoords + vec2(offsetScale.x, 0)); + + float reflectionScale = 1; + +#if MASK + + vec2 maskCoords = srcCoords; +#if PERSPECTIVE == 1 + maskCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + float maskCenter = 1.0 - step(0.5, texSample2D(g_Texture1, maskCoords).r); + float maskUp = 0.0; + float maskDown = 0.0; + float maskLeft = 0.0; + float maskRight = 0.0; + +#if REFLECTION + maskUp = texSample2D(g_Texture1, maskCoords + vec2(0, -simTexel.y)).r * maskCenter; + maskDown = texSample2D(g_Texture1, maskCoords + vec2(0, simTexel.y)).r * maskCenter; + maskLeft = texSample2D(g_Texture1, maskCoords + vec2(-simTexel.x, 0)).r * maskCenter; + maskRight = texSample2D(g_Texture1, maskCoords + vec2(simTexel.x, 0)).r * maskCenter; +#endif + + reflectDown = step(0.01, reflectDown + maskUp); + reflectUp = step(0.01, reflectUp + maskDown); + reflectRight = step(0.01, reflectRight + maskLeft); + reflectLeft = step(0.01, reflectLeft + maskRight); +#endif + + //reflectUp *= reflectionScale; + //reflectDown *= reflectionScale; + //reflectLeft *= reflectionScale; + //reflectRight *= reflectionScale; + + vec4 sample; + vec4 force = vec4(0, 0, 0, 0); + + float componentScale = 1 / 3.0; + + vec4 reflectionMask = (CAST4(1.0) - vec4(reflectRight, reflectDown, reflectLeft, reflectUp) * 0.9) * componentScale; + + force.xzy += up.xzy * reflectionMask.xzy; + force.xzw += down.xzw * reflectionMask.xzw; + force.xyw += left.xyw * reflectionMask.xyw; + force.zyw += right.zyw * reflectionMask.zyw; + + //force += up * componentScale; + //force += down * componentScale; + //force += left * componentScale; + //force += right * componentScale; + +#if REFLECTION + vec4 forceCopy = force; + + //force.y *= 1.0 - reflectDown; + force.y += forceCopy.w * reflectionScale * reflectDown; + force.w *= 1.0 - reflectDown; + + //force.w *= 1.0 - reflectUp; + force.w += forceCopy.y * reflectionScale * reflectUp; + force.y *= 1.0 - reflectUp; + + //force.x *= 1.0 - reflectRight; + force.x += forceCopy.z * reflectionScale * reflectRight; + force.z *= 1.0 - reflectRight; + + //force.z *= 1.0 - reflectLeft; + force.z += forceCopy.x * reflectionScale * reflectLeft; + force.x *= 1.0 - reflectLeft; + + //force = normalize(force) * length(forceCopy); +#endif + +#if MASK + force *= maskCenter; +#endif + + float decay = 1.5; + + float drop = max(1.001 / 255.0, decay / 255.0 * (g_Frametime / 0.02) * g_RippleDecay); + force -= drop; + + albedo = force; + + //albedo = vec4(0, 0, 0, 0); + + gl_FragColor = albedo; + + //gl_FragColor = texSample2D(g_Texture0, srcCoords) - drop; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_simulate_force.vert b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_simulate_force.vert new file mode 100644 index 0000000..be20e89 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/shaders/effects/cursorripple_simulate_force.vert @@ -0,0 +1,30 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord.xy = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = (squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/cursorripple/preview/template.json b/modules/wallpaper-engine/effects/cursorripple/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_apply_force.frag b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_apply_force.frag new file mode 100644 index 0000000..b5f0794 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_apply_force.frag @@ -0,0 +1,105 @@ + +varying vec2 v_TexCoord; + +uniform float g_Frametime; +uniform vec4 g_PointerState; +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +//varying mat3 v_XForm; +#endif + +void main() { + + vec2 texSource = v_TexCoord.xy; + + vec4 albedo = texSample2D(g_Texture0, texSource); + + // Complete unproject per pixel + vec2 unprojectedUVs = v_PointerUV.xy; + vec2 unprojectedUVsLast = v_PointerUVLast.xy; + + //vec2 pointerDebug; + //pointerDebug = unprojectedUVs; + //unprojectedUVs += 0.5; + //unprojectedUVs.y = 1.0 - unprojectedUVs.y; + //unprojectedUVsLast += 0.5; + //unprojectedUVsLast.y = 1.0 - unprojectedUVsLast.y; + + float rippleMask = 1.0; + +#if PERSPECTIVE == 1 + // This perspective transform will take the cursor within the gizmo boundaries and + // map it to the entire simulation canvas + //vec3 tmp = vec3(unprojectedUVs.xy, 1.0); + //tmp.xyz = mul(tmp.xyz, v_XForm); + //unprojectedUVs = tmp.xy / tmp.z; + // + //tmp = vec3(unprojectedUVsLast.xy, 1.0); + //tmp.xyz = mul(tmp.xyz, v_XForm); + //unprojectedUVsLast = tmp.xy / tmp.z; + + // Block impulse when cursor moves across perspective horizon + rippleMask *= step(abs(unprojectedUVs.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVs.y - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.y - 0.5), 0.5); +#endif + + //unprojectedUVs = (texSource - unprojectedUVs); // * vec2(v_PointDelta.y, v_PointerUV.w); + //unprojectedUVsLast = (texSource - unprojectedUVsLast); // * vec2(v_PointDelta.y, v_PointerUVLast.w); + + vec2 lDelta = unprojectedUVs - unprojectedUVsLast; + vec2 texDelta = texSource - unprojectedUVsLast; + + float distLDelta = length(lDelta) + 0.0001; + //distLDelta = max(0.0001, distLDelta); + lDelta /= distLDelta; // DIV ZERO + float distOnLine = dot(lDelta, texDelta); + //distOnLine = distOnLine * distLDelta; + + float rayMask = max(step(0.0, distOnLine) * step(distOnLine, distLDelta), step(distLDelta, 0.1)); + + distOnLine = saturate(distOnLine / distLDelta) * distLDelta; + vec2 posOnLine = unprojectedUVsLast + lDelta * distOnLine; + + + unprojectedUVs = (texSource - posOnLine) * vec2(v_PointDelta.y, v_PointerUV.w); + + float pointerDist = length(unprojectedUVs); + pointerDist = saturate(1.0 - pointerDist); + + //pointerDist *= step(0.05 * distLDelta, distOnLine); + //pointerDist = 1.0; + pointerDist *= rayMask * rippleMask; + + + float timeAmt = min(1.0 / 30.0, g_Frametime) / 0.02; + float pointerMoveAmt = v_PointDelta.x; + float inputStrength = pointerDist * timeAmt * (pointerMoveAmt + g_PointerState.z * 5.0); + //albedo.a = inputStrength + //vec2 impulseDir = saturate(unprojectedUVs * 0.5 + CAST2(0.5)); + vec2 impulseDir = max(CAST2(-1.0), min(CAST2(1.0), unprojectedUVs)); + //albedo.b = 1.0; + + vec4 colorAdd = vec4( + step(0.0, impulseDir.x) * impulseDir.x * inputStrength, + step(0.0, impulseDir.y) * impulseDir.y * inputStrength, + step(impulseDir.x, 0.0) * -impulseDir.x * inputStrength, + step(impulseDir.y, 0.0) * -impulseDir.y * inputStrength + ); + + gl_FragColor = albedo + colorAdd; + + //gl_FragColor.r = albedo.r + (inputStrength * 0.1); + //gl_FragColor.g = albedo.g; + //gl_FragColor.b = 0; + //gl_FragColor.a = 1; + + //colorAdd = vec4(pointerDebug * 0.5 + 0.5, 0, 0); + //gl_FragColor = colorAdd; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_apply_force.vert b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_apply_force.vert new file mode 100644 index 0000000..65597c5 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_apply_force.vert @@ -0,0 +1,90 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_EffectTextureProjectionMatrixInverse; +uniform vec2 g_PointerPosition; +uniform vec2 g_PointerPositionLast; +uniform vec4 g_Texture0Resolution; + +uniform float g_RippleScale; // {"material":"ripplescale","label":"ui_editor_properties_ripple_scale","default":1.0,"range":[0,2]} + + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +//varying mat3 v_XForm; +#endif + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord.xy = a_TexCoord.xy; + + vec2 pointer = g_PointerPosition; + pointer.y = 1.0 - pointer.y; // Flip pointer screen space Y to match texture space Y + vec2 pointerLast = g_PointerPositionLast; + pointerLast.y = 1.0 - pointerLast.y; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + //v_XForm = xform; +#endif + + vec4 preTransformPoint = vec4(pointer * 2 - 1, 0.0, 1.0); + vec4 preTransformPointLast = vec4(pointerLast * 2 - 1, 0.0, 1.0); + + + v_PointerUV.xyz = mul(preTransformPoint, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xy *= 0.5; + v_PointerUV.xy /= v_PointerUV.z; + + v_PointerUVLast.xyz = mul(preTransformPointLast, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUVLast.xy *= 0.5; + v_PointerUVLast.xy /= v_PointerUVLast.z; + + + v_PointerUV.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; + //v_PointerUV.y *= v_PointerUV.w; + + v_PointDelta.x = length(g_PointerPosition - g_PointerPositionLast); + //v_PointDelta *= v_PointDelta; + v_PointDelta.x *= 100; + //v_PointDelta = 1; + + v_PointDelta.y = 60.0 / max(0.0001, g_RippleScale); + v_PointerUV.w *= -v_PointDelta.y; + v_PointerUVLast.w = v_PointerUV.w; + + v_PointerUV.z = 1.0; + v_PointerUV.xy += 0.5; + v_PointerUV.y = 1.0 - v_PointerUV.y; + + v_PointerUVLast.z = 1.0; + v_PointerUVLast.xy += 0.5; + v_PointerUVLast.y = 1.0 - v_PointerUVLast.y; + +#if PERSPECTIVE == 1 + v_PointerUV.xyz = mul(v_PointerUV.xyz, xform); + v_PointerUV.xy /= v_PointerUV.z; + + v_PointerUVLast.xyz = mul(v_PointerUVLast.xyz, xform); + v_PointerUVLast.xy /= v_PointerUVLast.z; +#endif + //vec2 pointerLast = g_PointerPositionLast; + //pointerLast.y = 1.0 - pointerLast.y; // Flip pointer screen space Y to match texture space Y + //v_PointerUVLast.xyz = mul(vec4(pointerLast * 2 - 1, 0.0, 1.0), g_EffectTextureProjectionMatrixInverse).xyw; + //v_PointerUVLast.xy *= 0.5; + //v_PointerUVLast.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_combine.frag b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_combine.frag new file mode 100644 index 0000000..c08df1f --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_combine.frag @@ -0,0 +1,69 @@ + +// [COMBO] {"material":"ui_editor_properties_shading","combo":"SHADING","type":"options","default":0} + +#include "common.h" + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +//uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +//uniform vec4 g_Texture0Resolution; + +uniform float g_RippleStrength; // {"material":"ripplestrength","label":"ui_editor_properties_ripple_strength","default":1.0,"range":[0,5]} +uniform float g_ShadingAmount; // {"material":"shadingamount","label":"ui_editor_properties_shading_amount","default":1.0,"range":[0,2]} +uniform vec3 g_ShadingHigh; // {"material":"shadingtinthigh","label":"ui_editor_properties_tint_high","type":"color","default":"1 1 1"} +uniform vec3 g_ShadingLow; // {"material":"shadingtintlow","label":"ui_editor_properties_tint_low","type":"color","default":"0 0 0"} +uniform float g_ShadingDirection; // {"material":"shadingdirection","label":"ui_editor_properties_shading_direction","default":0,"range":[0,6.28],"direction":true,"conversion":"rad2deg"} + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + + vec2 srcCoords = v_TexCoord.xy; + vec2 rippleCoords = v_TexCoord.xy; + float rippleMask = 1.0; + +#if PERSPECTIVE == 1 + rippleCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + rippleMask *= step(abs(rippleCoords.x - 0.5), 0.5); + rippleMask *= step(abs(rippleCoords.y - 0.5), 0.5); +#endif + + vec4 albedo = texSample2D(g_Texture0, rippleCoords); + albedo *= albedo; + + vec2 dir = vec2(albedo.x - albedo.z, albedo.y - albedo.w); + + //float pi = 3.14159265359; + float distortAmt = g_RippleStrength; + //distortAmt *= length(dir) * 1.0 * abs(sin(2.0 * atan2(dir.x, dir.y))); + + vec2 offset = dir; + offset *= -0.1 * distortAmt * rippleMask; + //offset.y = 0; + //offset.x = 0; + + vec4 screen = texSample2D(g_Texture1, srcCoords + offset); + //vec4 albedoOld = texSample2D(g_Texture2, v_TexCoord.xy); + +#if SHADING + vec2 shadingDir = dir; + float shadingLength = max(0.99, length(shadingDir)); + shadingDir = mix(shadingDir, shadingDir / shadingLength, step(1.0, shadingLength)); + float shading = dot(rotateVec2(vec2(0, -1), g_ShadingDirection), shadingDir); + + screen.rgb = mix(screen.rgb, screen.rgb * mix(g_ShadingLow, CAST3(1.0) + g_ShadingHigh, shading * 0.5 + 0.5), abs(shading * g_ShadingAmount) * rippleMask); +#endif + + gl_FragColor = screen; + + + //vec4 dirColorTest = vec4(dir * 0.5 + 0.5, 0.0, 1.0); + //gl_FragColor = dirColorTest; + + //gl_FragColor += vec4(distortAmt, distortAmt, distortAmt, 1); +} diff --git a/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_combine.vert b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_combine.vert new file mode 100644 index 0000000..71f0f10 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_combine.vert @@ -0,0 +1,30 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_simulate_force.frag b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_simulate_force.frag new file mode 100644 index 0000000..84df6bb --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_simulate_force.frag @@ -0,0 +1,205 @@ + +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","type":"options","default":1} + +uniform float g_Frametime; +uniform vec4 g_Texture0Resolution; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_collision_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","painttexturescale":1} + +uniform float g_RippleSpeed; // {"material":"ripplespeed","label":"ui_editor_properties_ripple_speed","default":1.0,"range":[0,2]} +uniform float g_RippleDecay; // {"material":"rippledecay","label":"ui_editor_properties_ripple_decay","default":1.0,"range":[0,4]} + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +vec4 sampleF(vec4 a, vec4 b, vec4 c) +{ + //float sb = step(length(a), length(b)); + //float sc = step(max(length(a), length(b)), length(c)); + //return mix(mix(a, b, sb), c, sc); + //return a; + //return ; + return max(a, max(b, c)); + + //vec4 f = max(a, max(b, c)); + + //float maxAmt = max(f.x, max(f.y, max(f.z, f.w))); + //float totalAmt = dot(CAST4(1.0), f); + + //if (totalAmt <= maxAmt) + // f *= 0.95; + //return f; +} + +void main() { + + vec2 srcCoords = v_TexCoord.xy; + + vec4 albedo = texSample2D(g_Texture0, srcCoords); + vec2 simTexel = 1.0 / g_Texture0Resolution.xy; + vec2 rippleOffset = simTexel * 100 * g_RippleSpeed * min(1.0 / 30.0, g_Frametime); + + vec2 insideRipple = rippleOffset * 1.61; + vec2 outsideRipple = rippleOffset; + + float reflectUp = 0; + float reflectDown = 0; + float reflectLeft = 0; + float reflectRight = 0; + +#if REFLECTION + reflectUp = step(1.0 - simTexel.y, srcCoords.y); + reflectDown = step(srcCoords.y, simTexel.y); + reflectLeft = step(1.0 - simTexel.x, srcCoords.x); + reflectRight = step(srcCoords.x, simTexel.x); +#endif + + + +#if MASK + vec2 maskCoords = srcCoords; + +#if PERSPECTIVE == 1 + maskCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + float invMaskCenter = 1.0 - step(0.5, texSample2D(g_Texture1, maskCoords).r); + float maskUp = 0.0; + float maskDown = 0.0; + float maskLeft = 0.0; + float maskRight = 0.0; + +#if REFLECTION + //simTexel *= 1.0; + vec2 maskOffset = insideRipple; + //vec2 maskOffset = simTexel; + maskUp = texSample2D(g_Texture1, maskCoords + vec2(0, -maskOffset.y)).r * invMaskCenter; + maskDown = texSample2D(g_Texture1, maskCoords + vec2(0, maskOffset.y)).r * invMaskCenter; + maskLeft = texSample2D(g_Texture1, maskCoords + vec2(-maskOffset.x, 0)).r * invMaskCenter; + maskRight = texSample2D(g_Texture1, maskCoords + vec2(maskOffset.x, 0)).r * invMaskCenter; +#endif + + reflectDown = step(0.5, reflectDown + maskUp); + reflectUp = step(0.5, reflectUp + maskDown); + reflectRight = step(0.5, reflectRight + maskLeft); + reflectLeft = step(0.5, reflectLeft + maskRight); +#endif + + + + vec2 motionCoords = srcCoords; + + //vec4 cc = texSample2D(g_Texture0, motionCoords); + //insideRipple = simTexel * 2; // * g_RippleSpeed * g_Frametime; + + vec4 uc = texSample2D(g_Texture0, motionCoords + vec2(0, -insideRipple.y)); + vec4 u00 = texSample2D(g_Texture0, motionCoords + vec2(-outsideRipple.x, -outsideRipple.y)); + vec4 u10 = texSample2D(g_Texture0, motionCoords + vec2(outsideRipple.x, -outsideRipple.y)); + + vec4 dc = texSample2D(g_Texture0, motionCoords + vec2(0, insideRipple.y)); + vec4 d01 = texSample2D(g_Texture0, motionCoords + vec2(-outsideRipple.x, outsideRipple.y)); + vec4 d11 = texSample2D(g_Texture0, motionCoords + vec2(outsideRipple.x, outsideRipple.y)); + + vec4 lc = texSample2D(g_Texture0, motionCoords + vec2(-insideRipple.x, 0)); + vec4 l00 = texSample2D(g_Texture0, motionCoords + vec2(-outsideRipple.x, -outsideRipple.y)); + vec4 l01 = texSample2D(g_Texture0, motionCoords + vec2(-outsideRipple.x, outsideRipple.y)); + + vec4 rc = texSample2D(g_Texture0, motionCoords + vec2(insideRipple.x, 0)); + vec4 r10 = texSample2D(g_Texture0, motionCoords + vec2(outsideRipple.x, -outsideRipple.y)); + vec4 r11 = texSample2D(g_Texture0, motionCoords + vec2(outsideRipple.x, outsideRipple.y)); + + vec4 up = sampleF(uc, u00, u10); + vec4 down = sampleF(dc, d01, d11); + vec4 left = sampleF(lc, l00, l01); + vec4 right = sampleF(rc, r10, r11); + + + vec4 sample; + vec4 force = vec4(0, 0, 0, 0); + + float componentScale = 1 / 3.0; + + //vec4 reflectionMask = (CAST4(1.0) - vec4(reflectRight, reflectDown, reflectLeft, reflectUp)); + + //force += up; + //force += down; + //force += left; + //force += right; + force.xzy += up.xzy; + force.xzw += down.xzw; + force.xyw += left.xyw; + force.zyw += right.zyw; + + //force *= componentScale * reflectionMask; + force *= componentScale; + + //force += up * componentScale; + //force += down * componentScale; + //force += left * componentScale; + //force += right * componentScale; + +#if REFLECTION + vec4 forceCopy = force; + + float reflectionScale = 1.0; + + force.y = mix(force.y, forceCopy.w * reflectionScale, reflectDown); + //force.y *= 1.0 - reflectDown; + //force.y += forceCopy.w * reflectionScale * reflectDown; + //force.xzw *= 1.0 - reflectDown; + + force.w = mix(force.w, forceCopy.y * reflectionScale, reflectUp); + //force.w *= 1.0 - reflectUp; + //force.w += forceCopy.y * reflectionScale * reflectUp; + //force.xyz *= 1.0 - reflectUp; + + force.x = mix(force.x, forceCopy.z * reflectionScale, reflectRight); + //force.x *= 1.0 - reflectRight; + //force.x += forceCopy.z * reflectionScale * reflectRight; + //force.yzw *= 1.0 - reflectRight; + + force.z = mix(force.z, forceCopy.x * reflectionScale, reflectLeft); + //force.z *= 1.0 - reflectLeft; + //force.z += forceCopy.x * reflectionScale * reflectLeft; + //force.xyw *= 1.0 - reflectLeft; + + //force *= reflectionMask; + //force = normalize(force) * length(forceCopy); +#endif + + float decay = 1.5; + + float drop = max(1.001 / 255.0, decay / 255.0 * (g_Frametime / 0.02) * g_RippleDecay); + force -= drop; + +#if MASK + force *= invMaskCenter; +#endif + + albedo = force; + + //albedo = vec4(0, 0, 0, 0); + + gl_FragColor = albedo; + + // vec4 info = cc; + // + // float average = ( + // uc.r + lc.r + dc.r + rc.r + // ) * 0.25; + // + // info.g += (average - info.r) * 2.0; + // info.g *= 0.95; + // //info.r *= 0.995; + // info.r += info.g; + +#if MASK + //info.r *= invMaskCenter; +#endif + // gl_FragColor = vec4(info.rg, 0, 1); + //gl_FragColor = texSample2D(g_Texture0, srcCoords) - drop; +} diff --git a/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_simulate_force.vert b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_simulate_force.vert new file mode 100644 index 0000000..b34b834 --- /dev/null +++ b/modules/wallpaper-engine/effects/cursorripple/shaders/effects/cursorripple_simulate_force.vert @@ -0,0 +1,28 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord.xy = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = (squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/depthparallax/effect.json b/modules/wallpaper-engine/effects/depthparallax/effect.json new file mode 100644 index 0000000..e5961b9 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/effect.json @@ -0,0 +1,21 @@ +{ + "version" : 1, + "replacementkey" : "iris", + "name" : "ui_editor_effect_depth_parallax_title", + "description" : "ui_editor_effect_depth_parallax_description", + "group" : "interactive", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/depthparallax.json" + } + ], + "dependencies" : + [ + "materials/effects/depthparallax.json", + "shaders/effects/depthparallax.frag", + "shaders/effects/depthparallax.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/materials/effects/depthparallax.json b/modules/wallpaper-engine/effects/depthparallax/materials/effects/depthparallax.json new file mode 100644 index 0000000..f9db4d8 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/materials/effects/depthparallax.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/depthparallax", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/effects/depthparallax/effect.json b/modules/wallpaper-engine/effects/depthparallax/preview/effects/depthparallax/effect.json new file mode 100644 index 0000000..5f8e002 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/effects/depthparallax/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "iris", + "name" : "ui_editor_effect_depth_parallax_title", + "description" : "ui_editor_effect_depth_parallax_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/depthparallax.json" + } + ], + "dependencies" : + [ + "materials/effects/depthparallax.json", + "shaders/effects/depthparallax.frag", + "shaders/effects/depthparallax.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/materials/effects/depthparallax.json b/modules/wallpaper-engine/effects/depthparallax/preview/materials/effects/depthparallax.json new file mode 100644 index 0000000..f9db4d8 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/materials/effects/depthparallax.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/depthparallax", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json new file mode 100644 index 0000000..77c26ff --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json @@ -0,0 +1,20 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "VERSION" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : + [ + "mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.tex b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.tex new file mode 100644 index 0000000..c10be20 Binary files /dev/null and b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.tex differ diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.tex-json b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.tex-json new file mode 100644 index 0000000..65cec71 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.tex-json @@ -0,0 +1,7 @@ +{ + "bleedtransparentcolors" : true, + "clampuvs" : true, + "format" : "rgba8888", + "halfmip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth.tex b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth.tex new file mode 100644 index 0000000..dfcc778 Binary files /dev/null and b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth.tex differ diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth.tex-json b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth.tex-json new file mode 100644 index 0000000..168c4a4 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth.tex-json @@ -0,0 +1,8 @@ +{ + "bleedtransparentcolors" : true, + "clampuvs" : true, + "format" : "r8", + "halfmip" : true, + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/depthparallax/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/models/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json b/modules/wallpaper-engine/effects/depthparallax/preview/models/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json new file mode 100644 index 0000000..15acff2 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/models/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/project.json b/modules/wallpaper-engine/effects/depthparallax/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/scene.json b/modules/wallpaper-engine/effects/depthparallax/preview/scene.json new file mode 100644 index 0000000..299e1ad --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/scene.json @@ -0,0 +1,98 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 0.00000", + "eye" : "0.00000 0.00000 1.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.10000000149011612, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.6189999580383301, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : true, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 1.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999997764825821, + "orthogonalprojection" : + { + "height" : 600, + "width" : 600 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/depthparallax/effect.json", + "id" : 32, + "name" : "", + "passes" : + [ + { + "combos" : + { + "QUALITY" : 2 + }, + "constantshadervalues" : + { + "center" : 0.23999999999999999, + "scale" : "0.47 0.47", + "sens" : 5 + }, + "id" : 33, + "textures" : + [ + null, + "mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149_depth" + ] + } + ], + "visible" : true + } + ], + "id" : 28, + "image" : "models/mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "mountain_peak_summit_altitude_top_extreme_mountaineering_trekking-892149", + "origin" : "110.44984 300.00000 0.00000", + "parallaxDepth" : "0.00000 0.00000", + "perspective" : false, + "scale" : "0.91987 0.91987 0.91987", + "size" : "1200.00000 674.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/depthparallax/preview/shaders/effects/depthparallax.frag b/modules/wallpaper-engine/effects/depthparallax/preview/shaders/effects/depthparallax.frag new file mode 100644 index 0000000..dd09f0a --- /dev/null +++ b/modules/wallpaper-engine/effects/depthparallax/preview/shaders/effects/depthparallax.frag @@ -0,0 +1,87 @@ + +// [COMBO] {"material":"ui_editor_properties_quality","combo":"QUALITY","type":"options","default":1,"options":{"ui_editor_properties_basic":0,"ui_editor_properties_occlusion_performance":1,"ui_editor_properties_occlusion_quality":2}} + +varying vec4 v_TexCoord; + +#if MASK +varying vec2 v_TexCoordMask; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_depth_map","mode":"depth","format":"r8","default":"util/black","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_depth","default":"0.5 0.5","linked":true,"range":[0.01, 1.0]} +uniform float g_Sensitivity; // {"material":"sens","label":"ui_editor_properties_perspective","default":2,"range":[0.01, 5.0]} +uniform float g_Center; // {"material":"center","label":"ui_editor_properties_center","default":0.2,"range":[0.0, 1.0]} + +uniform vec2 g_ParallaxPosition; + +#if QUALITY != 0 +vec2 ParallaxMapping(vec2 texCoords, vec2 viewDir) +{ +#if QUALITY == 1 + int numLayers = 24; +#endif +#if QUALITY == 2 + int numLayers = 64; +#endif + + float layerDepth = 1.0 / numLayers; + float currentLayerDepth = 1.0; + vec2 P = viewDir.xy * g_Scale * 0.1; + vec2 deltaTexCoords = P / numLayers; + + vec2 currentTexCoords = texCoords; + float currentDepthMapValue = texSample2D(g_Texture1, currentTexCoords).r; + + for (int i=0; currentLayerDepth > currentDepthMapValue && i currentDepthMapValue && i= 1 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos0, m_EmitterSize0, m_EmitterColor0); +#endif +#if POINTEMITTER >= 2 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos1, m_EmitterSize1, m_EmitterColor1); +#endif +#if POINTEMITTER >= 3 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos2, m_EmitterSize2, m_EmitterColor2); +#endif +#if POINTEMITTER >= 4 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos3, m_EmitterSize3, m_EmitterColor3); +#endif + +#if LINEEMITTER >= 1 + gl_FragColor = LineEmitterColor(emitterUV, m_LineEmitterPosA0, m_LineEmitterPosB0, aspect, gl_FragColor, m_LineEmitterSize0, m_LineEmitterColor0); +#endif +#if LINEEMITTER >= 2 + gl_FragColor = LineEmitterColor(emitterUV, m_LineEmitterPosA1, m_LineEmitterPosB1, aspect, gl_FragColor, m_LineEmitterSize1, m_LineEmitterColor1); +#endif +#if LINEEMITTER >= 3 + gl_FragColor = LineEmitterColor(emitterUV, m_LineEmitterPosA2, m_LineEmitterPosB2, aspect, gl_FragColor, m_LineEmitterSize2, m_LineEmitterColor2); +#endif + +#if DYEEMITTER + vec4 dyeEmitterSample = texSample2D(g_Texture4, v_TexCoord); + dyeEmitterSample.rgb *= dyeEmitterSample.a; + gl_FragColor = min(gl_FragColor + vec4(dyeEmitterSample.rgb * u_Saturation, + saturate(dot(dyeEmitterSample.rgb, CAST3(g_Frametime)) * dyeEmitterSample.a)), + CAST4(1.0)); +#endif + +#else + vec2 constantSpeed = vec2(sin(u_ConstantVelocityAngle), -cos(u_ConstantVelocityAngle)) * u_ConstantVelocityStrength; + constantSpeed.y *= aspect; + gl_FragColor.xy += constantSpeed * g_Frametime; + +#if COLLISIONMASK + vec2 emitterUV = v_TexCoord; + +#if PERSPECTIVE == 1 + emitterUV = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + vec4 collisionColor = texSample2D(g_Texture3, emitterUV); + float solid = collisionColor.r * collisionColor.a; + gl_FragColor.xy = mix(gl_FragColor.xy, vec2(0, 0), solid); +#endif +#endif +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_advection.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_advection.vert new file mode 100644 index 0000000..5681367 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_advection.vert @@ -0,0 +1,27 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_clear.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_clear.frag new file mode 100644 index 0000000..88513d0 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_clear.frag @@ -0,0 +1,8 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec3 v_TexCoord; + +void main() { + gl_FragColor = v_TexCoord.z * texSample2D(g_Texture0, v_TexCoord.xy); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_clear.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_clear.vert new file mode 100644 index 0000000..d1a7df8 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_clear.vert @@ -0,0 +1,15 @@ + +uniform float g_Frametime; + +uniform float u_Pressure; // {"material":"pressure","label":"ui_editor_properties_pressure","default":0.8,"range":[0.0, 1.0],"group":"ui_editor_properties_simulation"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec3 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xy = a_TexCoord.xy; + v_TexCoord.z = pow(u_Pressure, 60 * g_Frametime); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_combine.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_combine.frag new file mode 100644 index 0000000..bf8f2ce --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_combine.frag @@ -0,0 +1,129 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_gradient":0,"ui_editor_properties_emitter_color":1,"ui_editor_properties_background_color":2,"ui_editor_properties_distortion":3}} +// [COMBO] {"material":"ui_editor_properties_opaque_background","combo":"OPAQUE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":1} + +#include "common_pbr.h" +#include "common_blending.h" + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"hidden":true} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_fire","require":{"RENDERING":0}} +uniform sampler2D g_Texture4; // {"hidden":true} + +uniform float u_Brightness; // {"material":"brightness","label":"ui_editor_properties_brightness","default":1.0,"range":[0.01, 5]} +uniform float u_Alpha; // {"material":"opacity","label":"ui_editor_properties_opacity","default":1.0,"range":[0.01, 1]} +uniform float u_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":1.0,"range":[0.01, 1]} +uniform float u_HueShift; // {"material":"hue","label":"ui_editor_properties_hue","default":0.0,"range":[0.0, 1.0]} + +varying vec2 v_TexCoord; + +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +#if LIGHTING +uniform float u_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.5,"range":[0,1],"group":"ui_editor_properties_material"} +uniform float u_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0.5,"range":[0,1],"group":"ui_editor_properties_material"} + +uniform vec4 g_LightsColorPremultiplied[3]; +uniform vec3 g_LightAmbientColor; + +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; +#endif + +void main() { + vec2 fxCoords = v_TexCoord.xy; + float fxMask = 1.0; + +#if PERSPECTIVE == 1 + fxCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + fxMask *= step(abs(fxCoords.x - 0.5), 0.5); + fxMask *= step(abs(fxCoords.y - 0.5), 0.5); +#endif + + vec4 albedo = texSample2D(g_Texture0, fxCoords.xy); + float refAlpha = albedo.a; + +#if RENDERING == 0 + vec4 gradientColor = texSample2D(g_Texture3, vec2(albedo.r, 0.5)); + vec3 hsv = rgb2hsv(gradientColor.rgb); + hsv.x += u_HueShift; + albedo.rgb = hsv2rgb(hsv) * u_Brightness; + albedo.a *= gradientColor.a; +#endif + +#if RENDERING == 1 + albedo.rgb *= u_Brightness; +#endif + +#if RENDERING == 2 + albedo.rgb *= u_Brightness; + albedo.rgb /= albedo.a + 0.00001; +#endif + + albedo.a = smoothstep(0.0, u_Feather, albedo.a); + +#if RENDERING == 3 +#if LIGHTING + vec2 velocity = texSample2D(g_Texture2, fxCoords.xy).xy * CAST2(2.0) - CAST2(1.0); +#else + float pressure = texSample2D(g_Texture4, fxCoords.xy).x; + vec2 velocity = vec2(ddx(pressure), ddy(pressure)); + velocity = sign(velocity) * smoothstep(CAST2(0.01), CAST2(10.0), abs(velocity)); +#endif + + vec2 uvOffset = velocity; + vec4 prevDistorted = texSample2D(g_Texture1, v_TexCoord.xy - uvOffset); + albedo.rgb = prevDistorted.rgb; + albedo.a = 1; +#endif + + albedo.a *= fxMask; + +#if LIGHTING + vec3 normal = normalize(texSample2D(g_Texture2, fxCoords.xy).rgb * CAST3(2.0) - CAST3(1.0)); + + float metallic = u_Metallic; + float roughness = u_Roughness; + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + vec3 normalizedViewVector = vec3(0, 0, 1); + + vec3 light = ComputePBRLight(normal, v_Light0DirectionL3X.xyz, normalizedViewVector, albedo.rgb, g_LightsColorPremultiplied[0].rgb, f0, roughness, metallic); + light += ComputePBRLight(normal, v_Light1DirectionL3Y.xyz, normalizedViewVector, albedo.rgb, g_LightsColorPremultiplied[1].rgb, f0, roughness, metallic); + light += ComputePBRLight(normal, v_Light2DirectionL3Z.xyz, normalizedViewVector, albedo.rgb, g_LightsColorPremultiplied[2].rgb, f0, roughness, metallic); + light += ComputePBRLight(normal, vec3(v_Light0DirectionL3X.w, v_Light1DirectionL3Y.w, v_Light2DirectionL3Z.w), + normalizedViewVector, albedo.rgb, + vec3(g_LightsColorPremultiplied[0].w, g_LightsColorPremultiplied[1].w, g_LightsColorPremultiplied[2].w), + f0, roughness, metallic); + vec3 ambient = max(CAST3(0.001), g_LightAmbientColor) * albedo.rgb; + + albedo.rgb = CombineLighting(light, ambient); +#endif + +#if OPAQUE + albedo.a = 1; +#else + vec4 prev = texSample2D(g_Texture1, v_TexCoord.xy); +#if BLENDMODE == 0 + albedo = mix(prev, albedo, saturate(albedo.a) * u_Alpha); +#else + albedo.rgb = ApplyBlending(BLENDMODE, prev.rgb, albedo.rgb, albedo.a * u_Alpha); +#endif + albedo.a = saturate(prev.a + albedo.a); +#if WRITEALPHA == 0 + albedo.a = prev.a; +#endif +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_combine.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_combine.vert new file mode 100644 index 0000000..f50ee40 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_combine.vert @@ -0,0 +1,53 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +#if LIGHTING +uniform mat4 g_EffectModelMatrix; +uniform mat4 g_EffectModelViewProjectionMatrixInverse; +uniform vec3 g_LightsPosition[4]; + +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif + +#if LIGHTING + vec4 worldPos = mul(vec4(a_Position, 1.0), g_EffectModelMatrix); + + v_Light0DirectionL3X.xyz = g_LightsPosition[0] - worldPos.xyz; + v_Light1DirectionL3Y.xyz = g_LightsPosition[1] - worldPos.xyz; + v_Light2DirectionL3Z.xyz = g_LightsPosition[2] - worldPos.xyz; + vec3 l3 = g_LightsPosition[3] - worldPos.xyz; + + v_Light0DirectionL3X.w = l3.x; + v_Light1DirectionL3Y.w = l3.y; + v_Light2DirectionL3Z.w = l3.z; +#endif +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_curl.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_curl.frag new file mode 100644 index 0000000..2dbdf20 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_curl.frag @@ -0,0 +1,21 @@ + + +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture0, vL).y; + float R = texSample2D(g_Texture0, vR).y; + float T = texSample2D(g_Texture0, vT).x; + float B = texSample2D(g_Texture0, vB).x; + float vorticity = R - L - T + B; + //float vorticity = R - L - B + T; + gl_FragColor = vec4(0.5 * vorticity, 0.0, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_curl.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_curl.vert new file mode 100644 index 0000000..52c9e97 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_curl.vert @@ -0,0 +1,21 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = a_TexCoord.xyxy; + v_TexCoordRightBottom = a_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_divergence.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_divergence.frag new file mode 100644 index 0000000..a92f76b --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_divergence.frag @@ -0,0 +1,26 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture0, vL).x; + float R = texSample2D(g_Texture0, vR).x; + float T = texSample2D(g_Texture0, vT).y; + float B = texSample2D(g_Texture0, vB).y; + vec2 C = texSample2D(g_Texture0, vUv).xy; + if (vL.x < 0.0) { L = -C.x; } + if (vR.x > 1.0) { R = -C.x; } + if (vT.y > 1.0) { T = -C.y; } + if (vB.y < 0.0) { B = -C.y; } + float div = 0.5 * (R - L + T - B); + gl_FragColor = vec4(div, 0.0, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_divergence.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_divergence.vert new file mode 100644 index 0000000..8d49b0d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_divergence.vert @@ -0,0 +1,23 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = v_TexCoord.xyxy; + v_TexCoordRightBottom = v_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_gradientsubtract.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_gradientsubtract.frag new file mode 100644 index 0000000..4c54bd2 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_gradientsubtract.frag @@ -0,0 +1,23 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture0, vL).x; + float R = texSample2D(g_Texture0, vR).x; + float T = texSample2D(g_Texture0, vT).x; + float B = texSample2D(g_Texture0, vB).x; + vec2 velocity = texSample2D(g_Texture1, vUv).xy; + velocity.xy -= vec2(R - L, T - B); + gl_FragColor = vec4(velocity, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_gradientsubtract.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_gradientsubtract.vert new file mode 100644 index 0000000..8d49b0d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_gradientsubtract.vert @@ -0,0 +1,23 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = v_TexCoord.xyxy; + v_TexCoordRightBottom = v_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_normal.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_normal.frag new file mode 100644 index 0000000..fbc05b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_normal.frag @@ -0,0 +1,30 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform vec4 g_Texture0Resolution; + +uniform float u_Depth; // {"material":"depth","label":"ui_editor_properties_depth","default":0.5,"range":[0,1],"group":"ui_editor_properties_material"} + +varying vec2 v_TexCoord; + +void main() { + vec2 fxCoords = v_TexCoord.xy; + float refAlpha = texSample2D(g_Texture0, fxCoords).a; + + vec2 ist = CAST2(1.0) / g_Texture0Resolution.xy; + + float s10 = texSample2D(g_Texture0, fxCoords + vec2(ist.x, 0.0)).a; + float s01 = texSample2D(g_Texture0, fxCoords + vec2(0.0, ist.y)).a; + + vec2 base = vec2(s10 - refAlpha, s01 - refAlpha) * CAST2(25.0 * u_Depth); + //float bLen = length(base) + 0.0001; + //base /= bLen; + //bLen = saturate(bLen); + //base *= bLen * refAlpha; + base = clamp(base, CAST2(-1.0), CAST2(1.0)) * refAlpha; + + vec3 normal = vec3(base, 0.0); + normal.x = -normal.x; + normal.z = sqrt(saturate(1.0 - normal.x * normal.x - normal.y * normal.y)); + + gl_FragColor = vec4(normal * CAST3(0.5) + CAST3(0.5), 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_normal.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_normal.vert new file mode 100644 index 0000000..68682ad --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_normal.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_pressure.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_pressure.frag new file mode 100644 index 0000000..c75d846 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_pressure.frag @@ -0,0 +1,24 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture1, vL).x; + float R = texSample2D(g_Texture1, vR).x; + float T = texSample2D(g_Texture1, vT).x; + float B = texSample2D(g_Texture1, vB).x; + float C = texSample2D(g_Texture1, vUv).x; + float divergence = texSample2D(g_Texture0, vUv).x; + float pressure = (L + R + B + T - divergence) * 0.25; + gl_FragColor = vec4(pressure, 0.0, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_pressure.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_pressure.vert new file mode 100644 index 0000000..8d49b0d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_pressure.vert @@ -0,0 +1,23 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = v_TexCoord.xyxy; + v_TexCoordRightBottom = v_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_vorticity.frag b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_vorticity.frag new file mode 100644 index 0000000..2eed469 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_vorticity.frag @@ -0,0 +1,209 @@ + +// [COMBO] {"material":"ui_editor_properties_point_emitter_count","combo":"POINTEMITTER","type":"options","default":1,"options":[0,1,2,3]} +// [COMBO] {"material":"ui_editor_properties_line_emitter_count","combo":"LINEEMITTER","type":"options","default":0,"options":[0,1,2,3]} + +#include "common.h" + +uniform float g_Frametime; +uniform float g_Time; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"hidden":true,"default":"util/noise"} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +uniform vec4 g_PointerState; +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +//varying mat3 v_XForm; +varying vec3 v_TexCoordPerspective; +#endif + +uniform vec4 g_Texture0Resolution; + +uniform float u_Curl; // {"material":"curl","label":"ui_editor_properties_curling","default":30.0,"range":[0.0, 50.0],"group":"ui_editor_properties_simulation"} + +uniform vec2 m_EmitterPos0; // {"material":"emitterPos0","label":"ui_editor_properties_position","default":"0.5 0.5","group":"ui_editor_properties_point_emitter_1"} +uniform float m_EmitterAngle0; // {"material":"emitterAngle0","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_1"} +uniform float m_EmitterSize0; // {"material":"emitterSize0","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_1"} +uniform float m_EmitterSpeed0; // {"material":"emitterSpeed0","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_1"} + +uniform vec2 m_EmitterPos1; // {"material":"emitterPos1","label":"ui_editor_properties_position","default":"0.5 0.7","group":"ui_editor_properties_point_emitter_2"} +uniform float m_EmitterAngle1; // {"material":"emitterAngle1","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_2"} +uniform float m_EmitterSize1; // {"material":"emitterSize1","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_2"} +uniform float m_EmitterSpeed1; // {"material":"emitterSpeed1","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_2"} + +uniform vec2 m_EmitterPos2; // {"material":"emitterPos2","label":"ui_editor_properties_position","default":"0.7 0.7","group":"ui_editor_properties_point_emitter_3"} +uniform float m_EmitterAngle2; // {"material":"emitterAngle2","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_3"} +uniform float m_EmitterSize2; // {"material":"emitterSize2","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_3"} +uniform float m_EmitterSpeed2; // {"material":"emitterSpeed2","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_3"} + +uniform vec2 m_EmitterPos3; // {"material":"emitterPos3","label":"ui_editor_properties_position","default":"0.7 0.5","group":"ui_editor_properties_point_emitter_4"} +uniform float m_EmitterAngle3; // {"material":"emitterAngle3","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_4"} +uniform float m_EmitterSize3; // {"material":"emitterSize3","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_4"} +uniform float m_EmitterSpeed3; // {"material":"emitterSpeed3","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_4"} + +uniform vec2 m_LineEmitterPosA0; // {"material":"lineEmitterPosA0","label":"p0","default":"0.1 0.1","group":"ui_editor_properties_line_emitter_1"} +uniform vec2 m_LineEmitterPosB0; // {"material":"lineEmitterPosB0","label":"p1","default":"0.4 0.1","group":"ui_editor_properties_line_emitter_1"} +uniform float m_LineEmitterAngle0; // {"material":"lineEmitterAngle0","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_line_emitter_1"} +uniform float m_LineEmitterSize0; // {"material":"lineEmitterSize0","label":"ui_editor_properties_size","default":0.02,"range":[0.0, 0.3],"group":"ui_editor_properties_line_emitter_1"} +uniform float m_LineEmitterSpeed0; // {"material":"lineEmitterSpeed0","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_line_emitter_1"} + +uniform vec2 m_LineEmitterPosA1; // {"material":"lineEmitterPosA1","label":"p0","default":"0.1 0.2","group":"ui_editor_properties_line_emitter_2"} +uniform vec2 m_LineEmitterPosB1; // {"material":"lineEmitterPosB1","label":"p1","default":"0.4 0.2","group":"ui_editor_properties_line_emitter_2"} +uniform float m_LineEmitterAngle1; // {"material":"lineEmitterAngle1","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_line_emitter_2"} +uniform float m_LineEmitterSize1; // {"material":"lineEmitterSize1","label":"ui_editor_properties_size","default":0.02,"range":[0.0, 0.3],"group":"ui_editor_properties_line_emitter_2"} +uniform float m_LineEmitterSpeed1; // {"material":"lineEmitterSpeed1","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_line_emitter_2"} + +uniform vec2 m_LineEmitterPosA2; // {"material":"lineEmitterPosA2","label":"p0","default":"0.1 0.3","group":"ui_editor_properties_line_emitter_3"} +uniform vec2 m_LineEmitterPosB2; // {"material":"lineEmitterPosB2","label":"p1","default":"0.4 0.3","group":"ui_editor_properties_line_emitter_3"} +uniform float m_LineEmitterAngle2; // {"material":"lineEmitterAngle2","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_line_emitter_3"} +uniform float m_LineEmitterSize2; // {"material":"lineEmitterSize2","label":"ui_editor_properties_size","default":0.02,"range":[0.0, 0.3],"group":"ui_editor_properties_line_emitter_3"} +uniform float m_LineEmitterSpeed2; // {"material":"lineEmitterSpeed2","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_line_emitter_3"} + +vec2 EmitterVelocity(vec2 texCoord, float aspect, vec2 position, float angle, float size, float speed) +{ + vec2 delta = position - texCoord; + //delta.y *= aspect; + float amt = step(length(delta), size) * speed; + vec2 emitterSpeed = vec2(sin(angle), -cos(angle)) * amt; + //emitterSpeed.y *= aspect; + return emitterSpeed; +} + +vec2 LineEmitterVelocity(vec2 texCoord, vec2 linePosA, vec2 linePosB, float aspect, float angle, float size, float speed, vec2 noise) +{ + vec2 lineDelta = linePosB - linePosA; + float distLineDelta = length(lineDelta) + 0.0001; + lineDelta /= distLineDelta; + float distOnEmitterLine = dot(lineDelta, texCoord - linePosA); + distOnEmitterLine = max(0.0, min(distLineDelta, distOnEmitterLine)); + vec2 posOnEmitterLine = linePosA + lineDelta * distOnEmitterLine; + vec2 delta = texCoord - posOnEmitterLine; + //delta.y *= aspect; + float amt = step(length(delta), size) * g_Frametime * speed; + + vec2 emitterSpeed = vec2(sin(angle), -cos(angle)) * amt; + //emitterSpeed.y *= aspect; + emitterSpeed *= step(CAST2(0.5), noise); + + return emitterSpeed; + +} + +void main() { + //vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + //gl_FragColor = albedo; + + float dt = min(1.0/20.0, g_Frametime); + //float dt = 1.0 / 60.0; + + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture1, vL).x; + float R = texSample2D(g_Texture1, vR).x; + float T = texSample2D(g_Texture1, vT).x; + float B = texSample2D(g_Texture1, vB).x; + float C = texSample2D(g_Texture1, vUv).x; + vec2 force = 0.5 * vec2(abs(T) - abs(B), abs(R) - abs(L)); + force /= length(force) + 0.0001; + force *= u_Curl * C; + force.y *= -1.0; + vec2 velocity = texSample2D(g_Texture0, v_TexCoord).xy; + velocity += force * dt; + velocity = min(max(velocity, -1000.0), 1000.0); + + + vec2 emitterUV = v_TexCoord; + +#if PERSPECTIVE == 1 + emitterUV = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + // Add emitter velocities + float aspect = g_Texture0Resolution.y / g_Texture0Resolution.x; + +#if POINTEMITTER >= 1 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos0, m_EmitterAngle0, m_EmitterSize0, g_Frametime * m_EmitterSpeed0); +#endif +#if POINTEMITTER >= 2 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos1, m_EmitterAngle1, m_EmitterSize1, g_Frametime * m_EmitterSpeed1); +#endif +#if POINTEMITTER >= 3 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos2, m_EmitterAngle2, m_EmitterSize2, g_Frametime * m_EmitterSpeed2); +#endif +#if POINTEMITTER >= 4 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos3, m_EmitterAngle3, m_EmitterSize3, g_Frametime * m_EmitterSpeed3); +#endif + +#if LINEEMITTER >= 1 + vec2 noise = texSample2D(g_Texture2, emitterUV * 0.1 + g_Time * 0.01).rg; + velocity += LineEmitterVelocity(emitterUV, m_LineEmitterPosA0, m_LineEmitterPosB0, aspect, m_LineEmitterAngle0, m_LineEmitterSize0, m_LineEmitterSpeed0, noise); +#endif +#if LINEEMITTER >= 2 + velocity += LineEmitterVelocity(emitterUV, m_LineEmitterPosA1, m_LineEmitterPosB1, aspect, m_LineEmitterAngle1, m_LineEmitterSize1, m_LineEmitterSpeed1, noise); +#endif +#if LINEEMITTER >= 3 + velocity += LineEmitterVelocity(emitterUV, m_LineEmitterPosA2, m_LineEmitterPosB2, aspect, m_LineEmitterAngle2, m_LineEmitterSize2, m_LineEmitterSpeed2, noise); +#endif + + // Cursor velocity interaction + vec2 texSource = v_TexCoord.xy; + vec2 unprojectedUVs = v_PointerUV.xy; + vec2 unprojectedUVsLast = v_PointerUVLast.xy; + + float rippleMask = 1.0; + +#if PERSPECTIVE == 1 + // Block impulse when cursor moves across perspective horizon + rippleMask *= step(abs(unprojectedUVs.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVs.y - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.y - 0.5), 0.5); +#endif + + vec2 lDelta = unprojectedUVs - unprojectedUVsLast; + vec2 texDelta = texSource - unprojectedUVsLast; + + float distLDelta = length(lDelta) + 0.0001; + lDelta /= distLDelta; // DIV ZERO + float distOnLine = dot(lDelta, texDelta); + //distOnLine = distOnLine * distLDelta; + + float rayMask = max(step(0.0, distOnLine) * step(distOnLine, distLDelta), step(distLDelta, 0.1)); + + distOnLine = saturate(distOnLine / distLDelta) * distLDelta; + vec2 posOnLine = unprojectedUVsLast + lDelta * distOnLine; + + unprojectedUVs = (texSource - posOnLine) * vec2(v_PointDelta.y, v_PointerUV.w); + + float pointerDist = length(unprojectedUVs); + pointerDist = saturate(1.0 - pointerDist); + + pointerDist *= rayMask * rippleMask; + + float timeAmt = 1.0; //g_Frametime / 0.1; + float pointerMoveAmt = v_PointDelta.x; + float inputStrength = pointerDist * timeAmt * (pointerMoveAmt + g_PointerState.z); + vec2 impulseDir = lDelta; + + vec2 colorAdd = vec2( + impulseDir.x * inputStrength, + impulseDir.y * inputStrength + ); + + //gl_FragColor.xy += colorAdd * 300; + velocity += colorAdd * 300; + + gl_FragColor = vec4(velocity, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_vorticity.vert b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_vorticity.vert new file mode 100644 index 0000000..eebb6ad --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/shaders/effects/fluidsimulation_vorticity.vert @@ -0,0 +1,101 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_EffectTextureProjectionMatrixInverse; +uniform vec2 g_PointerPosition; +uniform vec2 g_PointerPositionLast; + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +//varying mat3 v_XForm; +varying vec3 v_TexCoordPerspective; +#endif + +uniform float u_CursorInfluence; // {"material":"cursorinfluence","label":"ui_editor_properties_cursor_influence","default":1.0,"range":[0.0, 2.0],"group":"ui_editor_properties_simulation"} + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = a_TexCoord.xyxy; + v_TexCoordRightBottom = a_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; + + // Cursor velocity interaction + vec2 pointer = g_PointerPosition; + pointer.y = 1.0 - pointer.y; // Flip pointer screen space Y to match texture space Y + vec2 pointerLast = g_PointerPositionLast; + pointerLast.y = 1.0 - pointerLast.y; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + //v_XForm = xform; + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), inverse(xform)); +#endif + + vec4 preTransformPoint = vec4(pointer * 2 - 1, 0.0, 1.0); + vec4 preTransformPointLast = vec4(pointerLast * 2 - 1, 0.0, 1.0); + + + //v_PointerUV.xyz = preTransformPoint.xyw; //mul(preTransformPoint, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xyz = mul(preTransformPoint, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xy *= 0.5; + v_PointerUV.xy /= v_PointerUV.z; + + //v_PointerUVLast.xyz = preTransformPointLast.xyw; // mul(preTransformPointLast, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUVLast.xyz = mul(preTransformPointLast, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUVLast.xy *= 0.5; + v_PointerUVLast.xy /= v_PointerUVLast.z; + + + v_PointerUV.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; + //v_PointerUV.y *= v_PointerUV.w; + + float moveAmt = length(g_PointerPosition - g_PointerPositionLast); + v_PointDelta.x = step(0, moveAmt) * 0.5 + moveAmt * 10.0 * u_CursorInfluence; + //v_PointDelta.x *= 100; + //v_PointDelta.x *= 0.5; + + v_PointDelta.y = 60.0 / max(0.0001, u_CursorInfluence); + v_PointerUV.w *= -v_PointDelta.y; + v_PointerUVLast.w = v_PointerUV.w; + + v_PointerUV.xy += 0.5; + v_PointerUV.y = 1.0 - v_PointerUV.y; + v_PointerUV.z = 1; + v_PointerUVLast.xy += 0.5; + v_PointerUVLast.y = 1.0 - v_PointerUVLast.y; + v_PointerUVLast.z = 1; + +#if PERSPECTIVE == 1 + v_PointerUV.xyz = mul(v_PointerUV.xyz, xform); + v_PointerUVLast.xyz = mul(v_PointerUVLast.xyz, xform); + + v_PointerUV.xy /= v_PointerUV.z; + v_PointerUVLast.xy /= v_PointerUVLast.z; +#endif + +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/preview/template.json b/modules/wallpaper-engine/effects/fluidsimulation/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_advection.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_advection.frag new file mode 100644 index 0000000..1ec477d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_advection.frag @@ -0,0 +1,191 @@ + +// [COMBO] {"material":"ui_editor_properties_point_emitter_count","combo":"POINTEMITTER","type":"options","default":1,"options":[0,1,2,3]} +// [COMBO] {"material":"ui_editor_properties_line_emitter_count","combo":"LINEEMITTER","type":"options","default":0,"options":[0,1,2,3]} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_gradient":0,"ui_editor_properties_emitter_color":1,"ui_editor_properties_background_color":2,"ui_editor_properties_distortion":3}} + +uniform float g_Frametime; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"hidden":true} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_collision_mask","mode":"opacitymask","combo":"COLLISIONMASK","paintdefaultcolor":"0 0 0 1","painttexturescale":1,"require":{"DYE":0}} +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_dye_emitter","mode":"rgbmask","combo":"DYEEMITTER","paintdefaultcolor":"0 0 0 1","painttexturescale":1,"require":{"DYE":1}} + +uniform vec4 g_Texture0Resolution; + +uniform float u_Dissipation; // {"material":"dissipationfactor","label":"ui_editor_properties_dissipation","default":1.0,"range":[0.01, 10.0],"group":"ui_editor_properties_simulation"} +uniform float u_Viscosity; // {"material":"viscosityfactor","label":"ui_editor_properties_viscosity","default":1.0,"range":[0.0, 20.0],"group":"ui_editor_properties_simulation"} +uniform float m_Dissipation; // {"hidden":true,"material":"dissipation","label":"ui_editor_properties_dissipation","default":1.0,"range":[0.0, 1.0],"group":"ui_editor_properties_simulation"} +uniform float u_Lifetime; // {"material":"lifetime","label":"ui_editor_properties_high_pass","default":0.1,"range":[0.1, 1.0],"group":"ui_editor_properties_simulation"} +uniform float u_Saturation; // {"material":"saturation","label":"ui_editor_properties_saturation","default":1.0,"range":[0.0, 1.0]} + +varying vec2 v_TexCoord; + +uniform float u_ConstantVelocityAngle; // {"material":"forcedirection","label":"ui_editor_properties_direction","default":3.141593,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_gravity"} +uniform float u_ConstantVelocityStrength; // {"material":"forcestrength","label":"ui_editor_properties_strength","default":0.0,"range":[0,100.0],"group":"ui_editor_properties_gravity"} + +#if DYE +uniform vec2 m_EmitterPos0; // {"material":"emitterPos0","default":"0.5 0.5"} +uniform float m_EmitterSize0; // {"material":"emitterSize0","default":0.05,"range":[0.0, 0.3]} +uniform vec3 m_EmitterColor0; // {"material":"emitterColor0","label":"ui_editor_properties_color","default":"1 0 0","group":"ui_editor_properties_point_emitter_1","type":"color"} + +uniform vec2 m_EmitterPos1; // {"material":"emitterPos1","default":"0.5 0.7"} +uniform float m_EmitterSize1; // {"material":"emitterSize1","default":0.05,"range":[0.0, 0.3]} +uniform vec3 m_EmitterColor1; // {"material":"emitterColor1","label":"ui_editor_properties_color","default":"0 1 0","group":"ui_editor_properties_point_emitter_2","type":"color"} + +uniform vec2 m_EmitterPos2; // {"material":"emitterPos2","default":"0.7 0.7"} +uniform float m_EmitterSize2; // {"material":"emitterSize2","default":0.05,"range":[0.0, 0.3]} +uniform vec3 m_EmitterColor2; // {"material":"emitterColor2","label":"ui_editor_properties_color","default":"0 0 1","group":"ui_editor_properties_point_emitter_3","type":"color"} + +uniform vec2 m_EmitterPos3; // {"material":"emitterPos3","default":"0.7 0.5"} +uniform float m_EmitterSize3; // {"material":"emitterSize3","default":0.05,"range":[0.0, 0.3]} +uniform vec3 m_EmitterColor3; // {"material":"emitterColor3","label":"ui_editor_properties_color","default":"1 1 0","group":"ui_editor_properties_point_emitter_4","type":"color"} + +uniform vec2 m_LineEmitterPosA0; // {"material":"lineEmitterPosA0","default":"0.1 0.1"} +uniform vec2 m_LineEmitterPosB0; // {"material":"lineEmitterPosB0","default":"0.4 0.1"} +uniform float m_LineEmitterSize0; // {"material":"lineEmitterSize0","default":0.02} +uniform vec3 m_LineEmitterColor0; // {"material":"lineEmitterColor0","label":"ui_editor_properties_color","default":"0 1 1","group":"ui_editor_properties_line_emitter_1","type":"color"} + +uniform vec2 m_LineEmitterPosA1; // {"material":"lineEmitterPosA1","default":"0.1 0.2"} +uniform vec2 m_LineEmitterPosB1; // {"material":"lineEmitterPosB1","default":"0.4 0.2"} +uniform float m_LineEmitterSize1; // {"material":"lineEmitterSize1","default":0.02} +uniform vec3 m_LineEmitterColor1; // {"material":"lineEmitterColor1","label":"ui_editor_properties_color","default":"1 1 0","group":"ui_editor_properties_line_emitter_2","type":"color"} + +uniform vec2 m_LineEmitterPosA2; // {"material":"lineEmitterPosA2","default":"0.1 0.3"} +uniform vec2 m_LineEmitterPosB2; // {"material":"lineEmitterPosB2","default":"0.4 0.3"} +uniform float m_LineEmitterSize2; // {"material":"lineEmitterSize2","default":0.02} +uniform vec3 m_LineEmitterColor2; // {"material":"lineEmitterColor2","label":"ui_editor_properties_color","default":"1 0 1","group":"ui_editor_properties_line_emitter_3","type":"color"} +#endif + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +vec4 AddEmitterColor(vec2 texCoord, float amt, vec4 currentColor, vec3 emitterColor) +{ +#if RENDERING == 2 + vec4 prevColor = texSample2D(g_Texture2, texCoord); + return mix(currentColor, prevColor, amt); +#endif + +#if RENDERING == 1 + emitterColor *= amt; + return min(currentColor + vec4(mix(g_Frametime, 1.0, u_Saturation) * emitterColor, amt), max(CAST4(1.0), vec4(emitterColor, amt))); + //return mix(currentColor, vec4(emitterColor, 1), amt); +#endif + + // Clamp to max injected color for proper HDR behavior? + return min(currentColor + CAST4(amt), CAST4(1.0)); +} + +vec4 EmitterColor(vec2 texCoord, float aspect, vec4 currentColor, vec2 position, float size, vec3 emitterColor) +{ + vec2 delta = position - texCoord; + delta.y *= aspect; + float amt = smoothstep(size, 0.0, length(delta)); + + return AddEmitterColor(texCoord, amt, currentColor, emitterColor); +} + +vec4 LineEmitterColor(vec2 texCoord, vec2 linePosA, vec2 linePosB, float aspect, vec4 currentColor, float size, vec3 emitterColor) +{ + vec2 lineDelta = linePosB - linePosA; + float distLineDelta = length(lineDelta) + 0.0001; + lineDelta /= distLineDelta; + float distOnEmitterLine = dot(lineDelta, texCoord - linePosA); + distOnEmitterLine = max(0.0, min(distLineDelta, distOnEmitterLine)); + vec2 posOnEmitterLine = linePosA + lineDelta * distOnEmitterLine; + vec2 delta = texCoord - posOnEmitterLine; + delta.y *= aspect; + float amt = smoothstep(size, 0.0, length(delta)); + + return AddEmitterColor(texCoord, amt, currentColor, emitterColor); +} + +void main() { + vec2 vUv = v_TexCoord; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + float dt = min(1.0/20.0, g_Frametime); + + vec2 coord = vUv - dt * texSample2D(g_Texture0, vUv).xy * texelSize; + vec4 result = texSample2D(g_Texture1, coord); + +#if DYE + float decayFactor = u_Dissipation; + float boundaryMask = step(0.0, coord.x) * + step(coord.x, 1.0) * + step(0.0, coord.y) * + step(coord.y, 1.0); +#else + float decayFactor = u_Viscosity; +#endif + + float decay = 1.0 + decayFactor * m_Dissipation * dt; + //float lowPass = smoothstep(1.0, 0.00001, length(result.rgb)) * 0.5; + float lowPass = step(length(result.rgb), u_Lifetime) * 0.5; + +#if DYE + result *= boundaryMask; +#endif + + gl_FragColor = result / (decay + lowPass); + float aspect = g_Texture0Resolution.y / g_Texture0Resolution.x; + +#if DYE + vec2 emitterUV = v_TexCoord; + +#if PERSPECTIVE == 1 + emitterUV = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + // Add color +#if POINTEMITTER >= 1 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos0, m_EmitterSize0, m_EmitterColor0); +#endif +#if POINTEMITTER >= 2 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos1, m_EmitterSize1, m_EmitterColor1); +#endif +#if POINTEMITTER >= 3 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos2, m_EmitterSize2, m_EmitterColor2); +#endif +#if POINTEMITTER >= 4 + gl_FragColor = EmitterColor(emitterUV, aspect, gl_FragColor, m_EmitterPos3, m_EmitterSize3, m_EmitterColor3); +#endif + +#if LINEEMITTER >= 1 + gl_FragColor = LineEmitterColor(emitterUV, m_LineEmitterPosA0, m_LineEmitterPosB0, aspect, gl_FragColor, m_LineEmitterSize0, m_LineEmitterColor0); +#endif +#if LINEEMITTER >= 2 + gl_FragColor = LineEmitterColor(emitterUV, m_LineEmitterPosA1, m_LineEmitterPosB1, aspect, gl_FragColor, m_LineEmitterSize1, m_LineEmitterColor1); +#endif +#if LINEEMITTER >= 3 + gl_FragColor = LineEmitterColor(emitterUV, m_LineEmitterPosA2, m_LineEmitterPosB2, aspect, gl_FragColor, m_LineEmitterSize2, m_LineEmitterColor2); +#endif + +#if DYEEMITTER + vec4 dyeEmitterSample = texSample2D(g_Texture4, v_TexCoord); + dyeEmitterSample.rgb *= dyeEmitterSample.a; + gl_FragColor = min(gl_FragColor + vec4(dyeEmitterSample.rgb * u_Saturation, + saturate(dot(dyeEmitterSample.rgb, CAST3(g_Frametime)) * dyeEmitterSample.a)), + CAST4(1.0)); +#endif + +#else + vec2 constantSpeed = vec2(sin(u_ConstantVelocityAngle), -cos(u_ConstantVelocityAngle)) * u_ConstantVelocityStrength; + constantSpeed.y *= aspect; + gl_FragColor.xy += constantSpeed * g_Frametime; + +#if COLLISIONMASK + vec2 emitterUV = v_TexCoord; + +#if PERSPECTIVE == 1 + emitterUV = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + vec4 collisionColor = texSample2D(g_Texture3, emitterUV); + float solid = collisionColor.r * collisionColor.a; + gl_FragColor.xy = mix(gl_FragColor.xy, vec2(0, 0), solid); +#endif +#endif +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_advection.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_advection.vert new file mode 100644 index 0000000..5681367 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_advection.vert @@ -0,0 +1,27 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_clear.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_clear.frag new file mode 100644 index 0000000..88513d0 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_clear.frag @@ -0,0 +1,8 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec3 v_TexCoord; + +void main() { + gl_FragColor = v_TexCoord.z * texSample2D(g_Texture0, v_TexCoord.xy); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_clear.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_clear.vert new file mode 100644 index 0000000..d1a7df8 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_clear.vert @@ -0,0 +1,15 @@ + +uniform float g_Frametime; + +uniform float u_Pressure; // {"material":"pressure","label":"ui_editor_properties_pressure","default":0.8,"range":[0.0, 1.0],"group":"ui_editor_properties_simulation"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec3 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xy = a_TexCoord.xy; + v_TexCoord.z = pow(u_Pressure, 60 * g_Frametime); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_combine.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_combine.frag new file mode 100644 index 0000000..bd92a36 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_combine.frag @@ -0,0 +1,141 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_gradient":0,"ui_editor_properties_emitter_color":1,"ui_editor_properties_background_color":2,"ui_editor_properties_distortion":3}} +// [COMBO] {"material":"ui_editor_properties_opaque_background","combo":"OPAQUE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","type":"options","default":0} + +#if LIGHTS_SHADOW_MAPPING +#define SHADOW_ATLAS_SAMPLER g_Texture6 +#define SHADOW_ATLAS_TEXEL g_Texture6Texel +uniform sampler2DComparison g_Texture6; // {"hidden":true,"default":"_rt_shadowAtlas"} +uniform vec4 g_Texture6Texel; +#endif + +#if LIGHTS_COOKIE +#define COOKIE_SAMPLER g_Texture7 +uniform sampler2D g_Texture7; // {"hidden":true,"default":"_alias_lightCookie"} +#endif + +#include "common_pbr_2.h" +#include "common_blending.h" + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"hidden":true} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_fire","require":{"RENDERING":0}} +uniform sampler2D g_Texture4; // {"hidden":true} + +uniform float u_Brightness; // {"material":"brightness","label":"ui_editor_properties_brightness","default":1.0,"range":[0.01, 5]} +uniform float u_Alpha; // {"material":"opacity","label":"ui_editor_properties_opacity","default":1.0,"range":[0.01, 1]} +uniform float u_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":1.0,"range":[0.01, 1]} +uniform float u_HueShift; // {"material":"hue","label":"ui_editor_properties_hue","default":0.0,"range":[0.0, 1.0]} + +varying vec2 v_TexCoord; + +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +#if LIGHTING +uniform float u_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.5,"range":[0,1],"group":"ui_editor_properties_material"} +uniform float u_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0.5,"range":[0,1],"group":"ui_editor_properties_material"} + +uniform vec3 g_LightAmbientColor; +varying vec3 v_WorldPos; +#endif + +#require LightingV1 + +void main() { + vec2 fxCoords = v_TexCoord.xy; + float fxMask = 1.0; + +#if PERSPECTIVE == 1 + fxCoords = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + fxMask *= step(abs(fxCoords.x - 0.5), 0.5); + fxMask *= step(abs(fxCoords.y - 0.5), 0.5); +#endif + + vec4 albedo = texSample2D(g_Texture0, fxCoords.xy); + float refAlpha = albedo.a; + +#if RENDERING == 0 + vec4 gradientColor = texSample2D(g_Texture3, vec2(albedo.r, 0.5)); + vec3 hsv = rgb2hsv(gradientColor.rgb); + hsv.x += u_HueShift; + albedo.rgb = hsv2rgb(hsv) * u_Brightness; + albedo.a *= gradientColor.a; +#endif + +#if RENDERING == 1 + albedo.rgb *= u_Brightness; +#endif + +#if RENDERING == 2 + albedo.rgb *= u_Brightness; + albedo.rgb /= albedo.a + 0.00001; +#endif + + albedo.a = smoothstep(0.0, u_Feather, albedo.a); + +#if RENDERING == 3 +#if LIGHTING + vec2 velocity = texSample2D(g_Texture2, fxCoords.xy).xy * CAST2(2.0) - CAST2(1.0); +#else + float pressure = texSample2D(g_Texture4, fxCoords.xy).x; + vec2 velocity = vec2(ddx(pressure), ddy(pressure)); + velocity = sign(velocity) * smoothstep(CAST2(0.01), CAST2(10.0), abs(velocity)); +#endif + + vec2 uvOffset = velocity; + vec4 prevDistorted = texSample2D(g_Texture1, v_TexCoord.xy - uvOffset); + albedo.rgb = prevDistorted.rgb; + albedo.a = 1; +#endif + + albedo.a *= fxMask; + +#if LIGHTING + vec3 normal = normalize(texSample2D(g_Texture2, fxCoords.xy).rgb * CAST3(2.0) - CAST3(1.0)); + + float metallic = u_Metallic; + float roughness = u_Roughness; + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + vec3 normalizedViewVector = vec3(0, 0, 1); + + vec3 light = CAST3(0.0); + +#if LIGHTING + light = PerformLighting_V1(v_WorldPos, albedo.rgb, normal, normalizedViewVector, CAST3(1.0), f0, roughness, metallic); + vec3 ambient = max(CAST3(0.001), g_LightAmbientColor) * albedo.rgb; +#else + vec3 ambient = albedo.rgb; +#endif + + albedo.rgb = CombineLighting(light, ambient); +#endif + +#if OPAQUE + albedo.a = 1; +#else + vec4 prev = texSample2D(g_Texture1, v_TexCoord.xy); +#if BLENDMODE == 0 + albedo = mix(prev, albedo, saturate(albedo.a) * u_Alpha); +#else + albedo.rgb = ApplyBlending(BLENDMODE, prev.rgb, albedo.rgb, albedo.a * u_Alpha); +#endif + albedo.a = saturate(prev.a + albedo.a); +#if WRITEALPHA == 0 + albedo.a = prev.a; +#endif +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_combine.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_combine.vert new file mode 100644 index 0000000..9d7c103 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_combine.vert @@ -0,0 +1,51 @@ + +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +varying vec3 v_TexCoordPerspective; +#endif + +#if LIGHTING +uniform mat4 g_EffectModelMatrix; +uniform mat4 g_EffectModelViewProjectionMatrixInverse; +//uniform vec3 g_LightsPosition[4]; + +//varying vec4 v_Light0DirectionL3X; +//varying vec4 v_Light1DirectionL3Y; +//varying vec4 v_Light2DirectionL3Z; +varying vec3 v_WorldPos; +#endif + + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xy; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif + +#if LIGHTING + v_WorldPos = mul(vec4(a_Position, 1.0), g_EffectModelMatrix).xyz; + //v_Light0DirectionL3X.xyz = g_LightsPosition[0] - worldPos.xyz; + //v_Light1DirectionL3Y.xyz = g_LightsPosition[1] - worldPos.xyz; + //v_Light2DirectionL3Z.xyz = g_LightsPosition[2] - worldPos.xyz; + //vec3 l3 = g_LightsPosition[3] - worldPos.xyz; + // + //v_Light0DirectionL3X.w = l3.x; + //v_Light1DirectionL3Y.w = l3.y; + //v_Light2DirectionL3Z.w = l3.z; +#endif +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_curl.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_curl.frag new file mode 100644 index 0000000..2dbdf20 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_curl.frag @@ -0,0 +1,21 @@ + + +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture0, vL).y; + float R = texSample2D(g_Texture0, vR).y; + float T = texSample2D(g_Texture0, vT).x; + float B = texSample2D(g_Texture0, vB).x; + float vorticity = R - L - T + B; + //float vorticity = R - L - B + T; + gl_FragColor = vec4(0.5 * vorticity, 0.0, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_curl.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_curl.vert new file mode 100644 index 0000000..52c9e97 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_curl.vert @@ -0,0 +1,21 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = a_TexCoord.xyxy; + v_TexCoordRightBottom = a_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_divergence.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_divergence.frag new file mode 100644 index 0000000..a92f76b --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_divergence.frag @@ -0,0 +1,26 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture0, vL).x; + float R = texSample2D(g_Texture0, vR).x; + float T = texSample2D(g_Texture0, vT).y; + float B = texSample2D(g_Texture0, vB).y; + vec2 C = texSample2D(g_Texture0, vUv).xy; + if (vL.x < 0.0) { L = -C.x; } + if (vR.x > 1.0) { R = -C.x; } + if (vT.y > 1.0) { T = -C.y; } + if (vB.y < 0.0) { B = -C.y; } + float div = 0.5 * (R - L + T - B); + gl_FragColor = vec4(div, 0.0, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_divergence.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_divergence.vert new file mode 100644 index 0000000..8d49b0d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_divergence.vert @@ -0,0 +1,23 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = v_TexCoord.xyxy; + v_TexCoordRightBottom = v_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_gradientsubtract.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_gradientsubtract.frag new file mode 100644 index 0000000..4c54bd2 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_gradientsubtract.frag @@ -0,0 +1,23 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture0, vL).x; + float R = texSample2D(g_Texture0, vR).x; + float T = texSample2D(g_Texture0, vT).x; + float B = texSample2D(g_Texture0, vB).x; + vec2 velocity = texSample2D(g_Texture1, vUv).xy; + velocity.xy -= vec2(R - L, T - B); + gl_FragColor = vec4(velocity, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_gradientsubtract.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_gradientsubtract.vert new file mode 100644 index 0000000..8d49b0d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_gradientsubtract.vert @@ -0,0 +1,23 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = v_TexCoord.xyxy; + v_TexCoordRightBottom = v_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_normal.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_normal.frag new file mode 100644 index 0000000..fbc05b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_normal.frag @@ -0,0 +1,30 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform vec4 g_Texture0Resolution; + +uniform float u_Depth; // {"material":"depth","label":"ui_editor_properties_depth","default":0.5,"range":[0,1],"group":"ui_editor_properties_material"} + +varying vec2 v_TexCoord; + +void main() { + vec2 fxCoords = v_TexCoord.xy; + float refAlpha = texSample2D(g_Texture0, fxCoords).a; + + vec2 ist = CAST2(1.0) / g_Texture0Resolution.xy; + + float s10 = texSample2D(g_Texture0, fxCoords + vec2(ist.x, 0.0)).a; + float s01 = texSample2D(g_Texture0, fxCoords + vec2(0.0, ist.y)).a; + + vec2 base = vec2(s10 - refAlpha, s01 - refAlpha) * CAST2(25.0 * u_Depth); + //float bLen = length(base) + 0.0001; + //base /= bLen; + //bLen = saturate(bLen); + //base *= bLen * refAlpha; + base = clamp(base, CAST2(-1.0), CAST2(1.0)) * refAlpha; + + vec3 normal = vec3(base, 0.0); + normal.x = -normal.x; + normal.z = sqrt(saturate(1.0 - normal.x * normal.x - normal.y * normal.y)); + + gl_FragColor = vec4(normal * CAST3(0.5) + CAST3(0.5), 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_normal.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_normal.vert new file mode 100644 index 0000000..68682ad --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_normal.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_pressure.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_pressure.frag new file mode 100644 index 0000000..c75d846 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_pressure.frag @@ -0,0 +1,24 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture1, vL).x; + float R = texSample2D(g_Texture1, vR).x; + float T = texSample2D(g_Texture1, vT).x; + float B = texSample2D(g_Texture1, vB).x; + float C = texSample2D(g_Texture1, vUv).x; + float divergence = texSample2D(g_Texture0, vUv).x; + float pressure = (L + R + B + T - divergence) * 0.25; + gl_FragColor = vec4(pressure, 0.0, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_pressure.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_pressure.vert new file mode 100644 index 0000000..8d49b0d --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_pressure.vert @@ -0,0 +1,23 @@ + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = v_TexCoord.xyxy; + v_TexCoordRightBottom = v_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_vorticity.frag b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_vorticity.frag new file mode 100644 index 0000000..199d809 --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_vorticity.frag @@ -0,0 +1,209 @@ + +// [COMBO] {"material":"ui_editor_properties_point_emitter_count","combo":"POINTEMITTER","type":"options","default":1,"options":[0,1,2,3]} +// [COMBO] {"material":"ui_editor_properties_line_emitter_count","combo":"LINEEMITTER","type":"options","default":0,"options":[0,1,2,3]} + +#include "common.h" + +uniform float g_Frametime; +uniform float g_Time; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"hidden":true,"default":"util/noise"} + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +uniform vec4 g_PointerState; +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +//varying mat3 v_XForm; +varying vec3 v_TexCoordPerspective; +#endif + +uniform vec4 g_Texture0Resolution; + +uniform float u_Curl; // {"material":"curl","label":"ui_editor_properties_curling","default":30.0,"range":[0.0, 50.0],"group":"ui_editor_properties_simulation"} + +uniform vec2 m_EmitterPos0; // {"material":"emitterPos0","label":"ui_editor_properties_position","default":"0.5 0.5","group":"ui_editor_properties_point_emitter_1","attachmentproject":true,"attachmentangles":"emitterAngle0"} +uniform float m_EmitterAngle0; // {"material":"emitterAngle0","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_1"} +uniform float m_EmitterSize0; // {"material":"emitterSize0","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_1"} +uniform float m_EmitterSpeed0; // {"material":"emitterSpeed0","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_1"} + +uniform vec2 m_EmitterPos1; // {"material":"emitterPos1","label":"ui_editor_properties_position","default":"0.5 0.7","group":"ui_editor_properties_point_emitter_2","attachmentproject":true,"attachmentangles":"emitterAngle1"} +uniform float m_EmitterAngle1; // {"material":"emitterAngle1","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_2"} +uniform float m_EmitterSize1; // {"material":"emitterSize1","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_2"} +uniform float m_EmitterSpeed1; // {"material":"emitterSpeed1","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_2"} + +uniform vec2 m_EmitterPos2; // {"material":"emitterPos2","label":"ui_editor_properties_position","default":"0.7 0.7","group":"ui_editor_properties_point_emitter_3","attachmentproject":true,"attachmentangles":"emitterAngle2"} +uniform float m_EmitterAngle2; // {"material":"emitterAngle2","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_3"} +uniform float m_EmitterSize2; // {"material":"emitterSize2","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_3"} +uniform float m_EmitterSpeed2; // {"material":"emitterSpeed2","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_3"} + +uniform vec2 m_EmitterPos3; // {"material":"emitterPos3","label":"ui_editor_properties_position","default":"0.7 0.5","group":"ui_editor_properties_point_emitter_4","attachmentproject":true,"attachmentangles":"emitterAngle3"} +uniform float m_EmitterAngle3; // {"material":"emitterAngle3","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_point_emitter_4"} +uniform float m_EmitterSize3; // {"material":"emitterSize3","label":"ui_editor_properties_size","default":0.05,"range":[0.0, 0.3],"group":"ui_editor_properties_point_emitter_4"} +uniform float m_EmitterSpeed3; // {"material":"emitterSpeed3","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_point_emitter_4"} + +uniform vec2 m_LineEmitterPosA0; // {"material":"lineEmitterPosA0","label":"p0","default":"0.1 0.1","group":"ui_editor_properties_line_emitter_1","attachmentproject":true} +uniform vec2 m_LineEmitterPosB0; // {"material":"lineEmitterPosB0","label":"p1","default":"0.4 0.1","group":"ui_editor_properties_line_emitter_1","attachmentproject":true} +uniform float m_LineEmitterAngle0; // {"material":"lineEmitterAngle0","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_line_emitter_1"} +uniform float m_LineEmitterSize0; // {"material":"lineEmitterSize0","label":"ui_editor_properties_size","default":0.02,"range":[0.0, 0.3],"group":"ui_editor_properties_line_emitter_1"} +uniform float m_LineEmitterSpeed0; // {"material":"lineEmitterSpeed0","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_line_emitter_1"} + +uniform vec2 m_LineEmitterPosA1; // {"material":"lineEmitterPosA1","label":"p0","default":"0.1 0.2","group":"ui_editor_properties_line_emitter_2","attachmentproject":true} +uniform vec2 m_LineEmitterPosB1; // {"material":"lineEmitterPosB1","label":"p1","default":"0.4 0.2","group":"ui_editor_properties_line_emitter_2","attachmentproject":true} +uniform float m_LineEmitterAngle1; // {"material":"lineEmitterAngle1","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_line_emitter_2"} +uniform float m_LineEmitterSize1; // {"material":"lineEmitterSize1","label":"ui_editor_properties_size","default":0.02,"range":[0.0, 0.3],"group":"ui_editor_properties_line_emitter_2"} +uniform float m_LineEmitterSpeed1; // {"material":"lineEmitterSpeed1","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_line_emitter_2"} + +uniform vec2 m_LineEmitterPosA2; // {"material":"lineEmitterPosA2","label":"p0","default":"0.1 0.3","group":"ui_editor_properties_line_emitter_3","attachmentproject":true} +uniform vec2 m_LineEmitterPosB2; // {"material":"lineEmitterPosB2","label":"p1","default":"0.4 0.3","group":"ui_editor_properties_line_emitter_3","attachmentproject":true} +uniform float m_LineEmitterAngle2; // {"material":"lineEmitterAngle2","label":"ui_editor_properties_angle","default":0.0,"direction":true,"conversion":"rad2deg","group":"ui_editor_properties_line_emitter_3"} +uniform float m_LineEmitterSize2; // {"material":"lineEmitterSize2","label":"ui_editor_properties_size","default":0.02,"range":[0.0, 0.3],"group":"ui_editor_properties_line_emitter_3"} +uniform float m_LineEmitterSpeed2; // {"material":"lineEmitterSpeed2","label":"ui_editor_properties_force","default":100,"range":[0.0, 1000.0],"group":"ui_editor_properties_line_emitter_3"} + +vec2 EmitterVelocity(vec2 texCoord, float aspect, vec2 position, float angle, float size, float speed) +{ + vec2 delta = position - texCoord; + //delta.y *= aspect; + float amt = step(length(delta), size) * speed; + vec2 emitterSpeed = vec2(sin(angle), -cos(angle)) * amt; + //emitterSpeed.y *= aspect; + return emitterSpeed; +} + +vec2 LineEmitterVelocity(vec2 texCoord, vec2 linePosA, vec2 linePosB, float aspect, float angle, float size, float speed, vec2 noise) +{ + vec2 lineDelta = linePosB - linePosA; + float distLineDelta = length(lineDelta) + 0.0001; + lineDelta /= distLineDelta; + float distOnEmitterLine = dot(lineDelta, texCoord - linePosA); + distOnEmitterLine = max(0.0, min(distLineDelta, distOnEmitterLine)); + vec2 posOnEmitterLine = linePosA + lineDelta * distOnEmitterLine; + vec2 delta = texCoord - posOnEmitterLine; + //delta.y *= aspect; + float amt = step(length(delta), size) * g_Frametime * speed; + + vec2 emitterSpeed = vec2(sin(angle), -cos(angle)) * amt; + //emitterSpeed.y *= aspect; + emitterSpeed *= step(CAST2(0.5), noise); + + return emitterSpeed; + +} + +void main() { + //vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + //gl_FragColor = albedo; + + float dt = min(1.0/20.0, g_Frametime); + //float dt = 1.0 / 60.0; + + vec2 vUv = v_TexCoord; + vec2 vL = v_TexCoordLeftTop.xy; + vec2 vR = v_TexCoordRightBottom.xy; + vec2 vT = v_TexCoordLeftTop.zw; + vec2 vB = v_TexCoordRightBottom.zw; + + float L = texSample2D(g_Texture1, vL).x; + float R = texSample2D(g_Texture1, vR).x; + float T = texSample2D(g_Texture1, vT).x; + float B = texSample2D(g_Texture1, vB).x; + float C = texSample2D(g_Texture1, vUv).x; + vec2 force = 0.5 * vec2(abs(T) - abs(B), abs(R) - abs(L)); + force /= length(force) + 0.0001; + force *= u_Curl * C; + force.y *= -1.0; + vec2 velocity = texSample2D(g_Texture0, v_TexCoord).xy; + velocity += force * dt; + velocity = min(max(velocity, -1000.0), 1000.0); + + + vec2 emitterUV = v_TexCoord; + +#if PERSPECTIVE == 1 + emitterUV = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + // Add emitter velocities + float aspect = g_Texture0Resolution.y / g_Texture0Resolution.x; + +#if POINTEMITTER >= 1 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos0, m_EmitterAngle0, m_EmitterSize0, g_Frametime * m_EmitterSpeed0); +#endif +#if POINTEMITTER >= 2 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos1, m_EmitterAngle1, m_EmitterSize1, g_Frametime * m_EmitterSpeed1); +#endif +#if POINTEMITTER >= 3 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos2, m_EmitterAngle2, m_EmitterSize2, g_Frametime * m_EmitterSpeed2); +#endif +#if POINTEMITTER >= 4 + velocity += EmitterVelocity(emitterUV, aspect, m_EmitterPos3, m_EmitterAngle3, m_EmitterSize3, g_Frametime * m_EmitterSpeed3); +#endif + +#if LINEEMITTER >= 1 + vec2 noise = texSample2D(g_Texture2, emitterUV * 0.1 + g_Time * 0.01).rg; + velocity += LineEmitterVelocity(emitterUV, m_LineEmitterPosA0, m_LineEmitterPosB0, aspect, m_LineEmitterAngle0, m_LineEmitterSize0, m_LineEmitterSpeed0, noise); +#endif +#if LINEEMITTER >= 2 + velocity += LineEmitterVelocity(emitterUV, m_LineEmitterPosA1, m_LineEmitterPosB1, aspect, m_LineEmitterAngle1, m_LineEmitterSize1, m_LineEmitterSpeed1, noise); +#endif +#if LINEEMITTER >= 3 + velocity += LineEmitterVelocity(emitterUV, m_LineEmitterPosA2, m_LineEmitterPosB2, aspect, m_LineEmitterAngle2, m_LineEmitterSize2, m_LineEmitterSpeed2, noise); +#endif + + // Cursor velocity interaction + vec2 texSource = v_TexCoord.xy; + vec2 unprojectedUVs = v_PointerUV.xy; + vec2 unprojectedUVsLast = v_PointerUVLast.xy; + + float rippleMask = 1.0; + +#if PERSPECTIVE == 1 + // Block impulse when cursor moves across perspective horizon + rippleMask *= step(abs(unprojectedUVs.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVs.y - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.x - 0.5), 0.5); + rippleMask *= step(abs(unprojectedUVsLast.y - 0.5), 0.5); +#endif + + vec2 lDelta = unprojectedUVs - unprojectedUVsLast; + vec2 texDelta = texSource - unprojectedUVsLast; + + float distLDelta = length(lDelta) + 0.0001; + lDelta /= distLDelta; // DIV ZERO + float distOnLine = dot(lDelta, texDelta); + //distOnLine = distOnLine * distLDelta; + + float rayMask = max(step(0.0, distOnLine) * step(distOnLine, distLDelta), step(distLDelta, 0.1)); + + distOnLine = saturate(distOnLine / distLDelta) * distLDelta; + vec2 posOnLine = unprojectedUVsLast + lDelta * distOnLine; + + unprojectedUVs = (texSource - posOnLine) * vec2(v_PointDelta.y, v_PointerUV.w); + + float pointerDist = length(unprojectedUVs); + pointerDist = saturate(1.0 - pointerDist); + + pointerDist *= rayMask * rippleMask; + + float timeAmt = 1.0; //g_Frametime / 0.1; + float pointerMoveAmt = v_PointDelta.x; + float inputStrength = pointerDist * timeAmt * (pointerMoveAmt + g_PointerState.z); + vec2 impulseDir = lDelta; + + vec2 colorAdd = vec2( + impulseDir.x * inputStrength, + impulseDir.y * inputStrength + ); + + //gl_FragColor.xy += colorAdd * 300; + velocity += colorAdd * 300; + + gl_FragColor = vec4(velocity, 0.0, 1.0); +} diff --git a/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_vorticity.vert b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_vorticity.vert new file mode 100644 index 0000000..eebb6ad --- /dev/null +++ b/modules/wallpaper-engine/effects/fluidsimulation/shaders/effects/fluidsimulation_vorticity.vert @@ -0,0 +1,101 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common_perspective.h" + +uniform mat4 g_EffectTextureProjectionMatrixInverse; +uniform vec2 g_PointerPosition; +uniform vec2 g_PointerPositionLast; + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_TexCoordLeftTop; +varying vec4 v_TexCoordRightBottom; + +varying vec4 v_PointerUV; +varying vec4 v_PointerUVLast; +varying vec2 v_PointDelta; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"hidden":true,"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"hidden":true,"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"hidden":true,"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"hidden":true,"material":"point3","label":"p3","default":"0 1"} +//varying mat3 v_XForm; +varying vec3 v_TexCoordPerspective; +#endif + +uniform float u_CursorInfluence; // {"material":"cursorinfluence","label":"ui_editor_properties_cursor_influence","default":1.0,"range":[0.0, 2.0],"group":"ui_editor_properties_simulation"} + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xy; + + vec2 texelSize = CAST2(1.0) / g_Texture0Resolution.xy; + v_TexCoordLeftTop = a_TexCoord.xyxy; + v_TexCoordRightBottom = a_TexCoord.xyxy; + + v_TexCoordLeftTop.x -= texelSize.x; + v_TexCoordLeftTop.w += texelSize.y; + v_TexCoordRightBottom.x += texelSize.x; + v_TexCoordRightBottom.w -= texelSize.y; + + // Cursor velocity interaction + vec2 pointer = g_PointerPosition; + pointer.y = 1.0 - pointer.y; // Flip pointer screen space Y to match texture space Y + vec2 pointerLast = g_PointerPositionLast; + pointerLast.y = 1.0 - pointerLast.y; + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + //v_XForm = xform; + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), inverse(xform)); +#endif + + vec4 preTransformPoint = vec4(pointer * 2 - 1, 0.0, 1.0); + vec4 preTransformPointLast = vec4(pointerLast * 2 - 1, 0.0, 1.0); + + + //v_PointerUV.xyz = preTransformPoint.xyw; //mul(preTransformPoint, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xyz = mul(preTransformPoint, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xy *= 0.5; + v_PointerUV.xy /= v_PointerUV.z; + + //v_PointerUVLast.xyz = preTransformPointLast.xyw; // mul(preTransformPointLast, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUVLast.xyz = mul(preTransformPointLast, g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUVLast.xy *= 0.5; + v_PointerUVLast.xy /= v_PointerUVLast.z; + + + v_PointerUV.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; + //v_PointerUV.y *= v_PointerUV.w; + + float moveAmt = length(g_PointerPosition - g_PointerPositionLast); + v_PointDelta.x = step(0, moveAmt) * 0.5 + moveAmt * 10.0 * u_CursorInfluence; + //v_PointDelta.x *= 100; + //v_PointDelta.x *= 0.5; + + v_PointDelta.y = 60.0 / max(0.0001, u_CursorInfluence); + v_PointerUV.w *= -v_PointDelta.y; + v_PointerUVLast.w = v_PointerUV.w; + + v_PointerUV.xy += 0.5; + v_PointerUV.y = 1.0 - v_PointerUV.y; + v_PointerUV.z = 1; + v_PointerUVLast.xy += 0.5; + v_PointerUVLast.y = 1.0 - v_PointerUVLast.y; + v_PointerUVLast.z = 1; + +#if PERSPECTIVE == 1 + v_PointerUV.xyz = mul(v_PointerUV.xyz, xform); + v_PointerUVLast.xyz = mul(v_PointerUVLast.xyz, xform); + + v_PointerUV.xy /= v_PointerUV.z; + v_PointerUVLast.xy /= v_PointerUVLast.z; +#endif + +} diff --git a/modules/wallpaper-engine/effects/foliagesway/effect.json b/modules/wallpaper-engine/effects/foliagesway/effect.json new file mode 100644 index 0000000..795781d --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 2, + "replacementkey" : "foliagesway", + "name" : "ui_editor_effect_foliage_sway_title", + "description" : "ui_editor_effect_foliage_sway_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/foliagesway.json" + } + ], + "dependencies" : + [ + "materials/effects/foliagesway.json", + "shaders/effects/foliagesway.frag", + "shaders/effects/foliagesway.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/materials/effects/foliagesway.json b/modules/wallpaper-engine/effects/foliagesway/materials/effects/foliagesway.json new file mode 100644 index 0000000..2619381 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/materials/effects/foliagesway.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/foliagesway", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/effects/foliagesway/effect.json b/modules/wallpaper-engine/effects/foliagesway/preview/effects/foliagesway/effect.json new file mode 100644 index 0000000..74cddd8 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/effects/foliagesway/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Foliage Sway", + "description" : "Sways the object in each corner of the image.", + "group" : "geometry", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/foliagesway.json" + } + ], + "dependencies" : + [ + "materials/effects/foliagesway.json", + "shaders/effects/foliagesway.frag", + "shaders/effects/foliagesway.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/effects/foliagesway.json b/modules/wallpaper-engine/effects/foliagesway/preview/materials/effects/foliagesway.json new file mode 100644 index 0000000..2619381 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/materials/effects/foliagesway.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/foliagesway", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.json b/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.json new file mode 100644 index 0000000..9ecc33b --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "plant1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.tex b/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.tex new file mode 100644 index 0000000..d942c01 Binary files /dev/null and b/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.tex differ diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.tex-json b/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.tex-json new file mode 100644 index 0000000..0d9b302 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/materials/plant1.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.json b/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.json new file mode 100644 index 0000000..5a6bac9 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "vegetation_grass_card_03" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.tex b/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.tex new file mode 100644 index 0000000..f9bec0f Binary files /dev/null and b/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.tex differ diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.tex-json b/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.tex-json new file mode 100644 index 0000000..0d9b302 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/materials/vegetation_grass_card_03.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/foliagesway/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/models/plant1.json b/modules/wallpaper-engine/effects/foliagesway/preview/models/plant1.json new file mode 100644 index 0000000..4adb87a --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/models/plant1.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/plant1.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/models/vegetation_grass_card_03.json b/modules/wallpaper-engine/effects/foliagesway/preview/models/vegetation_grass_card_03.json new file mode 100644 index 0000000..4a5372d --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/models/vegetation_grass_card_03.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/vegetation_grass_card_03.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/project.json b/modules/wallpaper-engine/effects/foliagesway/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/scene.json b/modules/wallpaper-engine/effects/foliagesway/preview/scene.json new file mode 100644 index 0000000..16710b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/scene.json @@ -0,0 +1,114 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.158", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/foliagesway/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Power" : 0.75, + "Speed" : 3.2100000381469727, + "Strength" : 93.339996337890625 + } + } + ] + } + ], + "id" : 35, + "image" : "models/plant1.json", + "name" : "", + "origin" : "90.869 109.808 0.000", + "scale" : "0.311 0.311 1.000" + }, + { + "angles" : "0.000 0.000 -0.112", + "depth" : -1.8400000333786011, + "effects" : + [ + { + "file" : "effects/foliagesway/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Phase" : 3.0999999046325684, + "Power" : 0.82999998331069946, + "Speed" : 3.869999885559082, + "Strength" : 66.680000305175781 + } + } + ] + } + ], + "id" : 43, + "image" : "models/plant1.json", + "name" : "", + "origin" : "187.171 96.043 0.000", + "scale" : "-0.187 0.272 1.000" + }, + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/foliagesway/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Phase" : 3.5199999809265137, + "Power" : 0.82999998331069946, + "Speed" : 2.809999942779541, + "Strength" : 33.340000152587891 + } + } + ] + } + ], + "id" : 56, + "image" : "models/vegetation_grass_card_03.json", + "name" : "", + "origin" : "112.015 17.422 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/shaders/effects/foliagesway.frag b/modules/wallpaper-engine/effects/foliagesway/preview/shaders/effects/foliagesway.frag new file mode 100644 index 0000000..c3837a9 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/shaders/effects/foliagesway.frag @@ -0,0 +1,8 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + gl_FragColor = texSample2D(g_Texture0, v_TexCoord); +} diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/shaders/effects/foliagesway.vert b/modules/wallpaper-engine/effects/foliagesway/preview/shaders/effects/foliagesway.vert new file mode 100644 index 0000000..b28c7d9 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/shaders/effects/foliagesway.vert @@ -0,0 +1,39 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_Speed; // {"material":"Speed","default":1,"range":[0.01, 10]} +uniform float g_Strength; // {"material":"Strength","default":100,"range":[0.01, 500]} +uniform float g_Phase; // {"material":"Phase","default":0,"range":[0, 6.28]} +uniform float g_Power; // {"material":"Power","default":1,"range":[0.01, 2]} +uniform vec2 g_DirectionWeights; // {"material":"Direction weights","default":"1 0.2"} +uniform vec4 g_CornerWeights; // {"material":"Corner weights","default":"1 1 0 0"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + vec3 position = a_Position; + + vec4 sines = g_Phase + g_Speed * g_Time * vec4(1, -0.16161616, 0.0083333, -0.00019841); + sines = sin(sines); + vec4 csines = 0.4 + g_Phase + g_Speed * g_Time * vec4(-0.5, 0.041666666, -0.0013888889, 0.000024801587); + csines = sin(csines); + + sines = pow(abs(sines), g_Power) * sign(sines); + csines = pow(abs(csines), g_Power) * sign(csines); + + float weight = saturate(g_CornerWeights.x * (1.0 - a_TexCoord.x) * (1.0 - a_TexCoord.y) + + g_CornerWeights.y * (a_TexCoord.x) * (1.0 - a_TexCoord.y) + + g_CornerWeights.z * (a_TexCoord.x) * (a_TexCoord.y) + + g_CornerWeights.w * (1.0 - a_TexCoord.x) * (a_TexCoord.y)); + + position.x += dot(sines, CAST4(1.0)) * g_Strength * weight * g_DirectionWeights.x; + position.y += dot(csines, CAST4(1.0)) * g_Strength * weight * g_DirectionWeights.y; + + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/foliagesway/preview/template.json b/modules/wallpaper-engine/effects/foliagesway/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/foliagesway/shaders/effects/foliagesway.frag b/modules/wallpaper-engine/effects/foliagesway/shaders/effects/foliagesway.frag new file mode 100644 index 0000000..72a2d8c --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/shaders/effects/foliagesway.frag @@ -0,0 +1,51 @@ + +// [COMBO] {"material":"ui_editor_properties_mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform sampler2D g_Texture0; // {"hidden":true} + +#if MODE == 0 +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_noise","default":"util/noise"} + +varying vec4 v_TexCoordNoise; +varying vec3 v_Params; +#endif + +uniform float g_Speed; // {"material":"speeduv","label":"ui_editor_properties_speed","default":5,"range":[0.01, 20]} +uniform float g_Power; // {"material":"power","label":"ui_editor_properties_power","default":1,"range":[0.01, 2]} +uniform float g_Phase; // {"material":"phase","label":"ui_editor_properties_phase","default":0.5,"range":[0, 2]} + +uniform float g_Time; + +varying vec4 v_TexCoord; + +void main() { +#if !MODE + vec3 noise = texSample2D(g_Texture2, v_TexCoordNoise.xy).rgb; + + float amp = v_Params.z; //g_Strength * 0.01; +#if MASK + amp *= texSample2D(g_Texture1, v_TexCoord.zw).r; +#endif + + float phase = (noise.g * M_PI * 2 + v_Params.x * 10 + v_Params.y * 5) * g_Phase; + vec4 sines = phase + g_Speed * g_Time * vec4(1, -0.16161616, 0.0083333, -0.00019841); + sines = sin(sines); + vec4 csines = 0.4 + phase + g_Speed * g_Time * vec4(-0.5, 0.041666666, -0.0013888889, 0.000024801587); + csines = sin(csines); + + sines = pow(abs(sines), CAST4(g_Power)) * sign(sines); + csines = pow(abs(csines), CAST4(g_Power)) * sign(csines); + + + vec2 texCoordOffset; + texCoordOffset.x = v_TexCoordNoise.z * dot(sines, CAST4(amp)); + texCoordOffset.y = v_TexCoordNoise.w * dot(csines, CAST4(amp)); + gl_FragColor = texSample2D(g_Texture0, texCoordOffset + v_TexCoord.xy); + +#else + gl_FragColor = texSample2D(g_Texture0, v_TexCoord.xy); +#endif +} diff --git a/modules/wallpaper-engine/effects/foliagesway/shaders/effects/foliagesway.vert b/modules/wallpaper-engine/effects/foliagesway/shaders/effects/foliagesway.vert new file mode 100644 index 0000000..58bd517 --- /dev/null +++ b/modules/wallpaper-engine/effects/foliagesway/shaders/effects/foliagesway.vert @@ -0,0 +1,73 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1,"range":[0.01, 10]} +uniform float g_Strength; // {"material":"strength","label":"ui_editor_properties_strength","default":0.4,"range":[0.01, 1]} +uniform float g_Phase; // {"material":"phase","label":"ui_editor_properties_phase","default":0,"range":[0, 6.28]} +uniform float g_Power; // {"material":"power","label":"ui_editor_properties_power","default":1,"range":[0.01, 2]} +uniform vec2 g_DirectionWeights; // {"material":"directionweights","label":"ui_editor_properties_direction_weights","default":"1 0.2"} +uniform vec4 g_CornerWeights; // {"material":"cornerweights","label":"ui_editor_properties_corner_weights","default":"1 1 0 0"} + +uniform vec2 g_Bounds; // {"material":"bounds","label":"ui_editor_properties_bounds","default":"0 1"} +uniform float g_NoiseScale; // {"material":"scale","label":"ui_editor_properties_scale","default":0.05,"range":[0.0, 1.0]} +uniform float g_Ratio; // {"material":"ratio","label":"ui_editor_properties_ratio","default":0.3,"range":[0.01,10]} +uniform float g_Direction; // {"material":"scrolldirection","label":"ui_editor_properties_direction","default":0,"range":[0,6.28],"direction":true} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if MODE == 0 +varying vec4 v_TexCoordNoise; +varying vec3 v_Params; +uniform vec4 g_Texture0Resolution; +#endif + +varying vec4 v_TexCoord; + +#if MASK == 1 +uniform vec4 g_Texture1Resolution; +#endif + +void main() { + v_TexCoord.zw = CAST2(0.0); + +#if MODE == 0 + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#if MASK == 1 + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w * g_Ratio; + v_TexCoordNoise.zw = rotateVec2(vec2(1.0 / aspect, aspect), g_Direction); + v_TexCoordNoise.xy = a_TexCoord.xy * g_NoiseScale; // rotateVec2(vec2(a_TexCoord.x, -a_TexCoord.y), g_Direction); + //v_TexCoordNoise = vec2(v_TexCoordNoise.x * aspect * g_Ratio, v_TexCoordNoise.y) * g_NoiseScale; + + v_Params.xy = rotateVec2(a_TexCoord.xy, g_Direction); + v_Params.z = g_Strength * g_Strength * 0.005; +#else + vec3 position = a_Position; + + vec4 sines = g_Phase + g_Speed * g_Time * vec4(1, -0.16161616, 0.0083333, -0.00019841); + sines = sin(sines); + vec4 csines = 0.4 + g_Phase + g_Speed * g_Time * vec4(-0.5, 0.041666666, -0.0013888889, 0.000024801587); + csines = sin(csines); + + sines = pow(abs(sines), CAST4(g_Power)) * sign(sines); + csines = pow(abs(csines), CAST4(g_Power)) * sign(csines); + + float weight = saturate(g_CornerWeights.x * (1.0 - a_TexCoord.x) * (1.0 - a_TexCoord.y) + + g_CornerWeights.y * (a_TexCoord.x) * (1.0 - a_TexCoord.y) + + g_CornerWeights.z * (a_TexCoord.x) * (a_TexCoord.y) + + g_CornerWeights.w * (1.0 - a_TexCoord.x) * (a_TexCoord.y)); + + position.x += dot(sines, CAST4(1.0)) * g_Strength * 100.0 * weight * g_DirectionWeights.x; + position.y += dot(csines, CAST4(1.0)) * g_Strength * 100.0 * weight * g_DirectionWeights.y; + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); +#endif + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/godrays/effect.json b/modules/wallpaper-engine/effects/godrays/effect.json new file mode 100644 index 0000000..c50e9da --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/effect.json @@ -0,0 +1,99 @@ +{ + "version" : 1, + "replacementkey" : "godrays", + "name" : "ui_editor_effect_godrays_title", + "description" : "ui_editor_effect_godrays_description", + "group" : "enhance", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/godrays_downsample2.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_cast.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_gaussian_x.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_gaussian_y.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_combine.json", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "scale" : 2, + "format" : "rgba_backbuffer" + }, + { + "name" : "_rt_HalfCompoBuffer2", + "scale" : 2, + "format" : "rgba_backbuffer" + } + ], + "dependencies" : + [ + "materials/effects/godrays_downsample2.json", + "materials/effects/godrays_cast.json", + "materials/effects/godrays_gaussian_x.json", + "materials/effects/godrays_gaussian_y.json", + "materials/effects/godrays_combine.json", + "shaders/effects/godrays_downsample2.frag", + "shaders/effects/godrays_downsample2.vert", + "shaders/effects/godrays_cast.frag", + "shaders/effects/godrays_cast.vert", + "shaders/effects/godrays_gaussian.frag", + "shaders/effects/godrays_gaussian.vert", + "shaders/effects/godrays_combine.frag", + "shaders/effects/godrays_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_cast.json b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_cast.json new file mode 100644 index 0000000..36b51d8 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_cast.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_cast", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_combine.json b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_combine.json new file mode 100644 index 0000000..dbbdfa1 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_downsample2.json b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_downsample2.json new file mode 100644 index 0000000..53ccced --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_downsample2.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_downsample2", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_gaussian_x.json b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_gaussian_x.json new file mode 100644 index 0000000..837441d --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_gaussian_y.json b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_gaussian_y.json new file mode 100644 index 0000000..42e88c6 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/materials/effects/godrays_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/godrays_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/blend/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/blend/effect.json new file mode 100644 index 0000000..ea5b72a --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/blend/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Blend", + "description" : "Blend two images or image layers with various blend modes.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blend.json" + } + ], + "dependencies" : + [ + "materials/effects/blend.json", + "shaders/effects/blend.frag", + "shaders/effects/blend.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/colorkey/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/colorkey/effect.json new file mode 100644 index 0000000..810f60d --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/colorkey/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Color Key", + "description" : "Mask a part of the image that matches a color of choice.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/colorkey.json" + } + ], + "dependencies" : + [ + "materials/effects/colorkey.json", + "shaders/effects/colorkey.frag", + "shaders/effects/colorkey.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/fisheye/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/fisheye/effect.json new file mode 100644 index 0000000..03bb784 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/fisheye/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Fisheye", + "description" : "Adds a fisheye warp.", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/fisheye.json" + } + ], + "dependencies" : + [ + "materials/effects/fisheye.json", + "shaders/effects/fisheye.frag", + "shaders/effects/fisheye.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/godrays/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/godrays/effect.json new file mode 100644 index 0000000..c206d3e --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/godrays/effect.json @@ -0,0 +1,96 @@ +{ + "name" : "God Rays", + "description" : "Add directional or circular god rays.", + "group" : "enhance", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/godrays_downsample2.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_cast.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_gaussian_x.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_gaussian_y.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/godrays_combine.json", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "scale" : 2, + "format" : "rgba8888" + }, + { + "name" : "_rt_HalfCompoBuffer2", + "scale" : 2, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/godrays_downsample2.json", + "materials/effects/godrays_cast.json", + "materials/effects/godrays_gaussian_x.json", + "materials/effects/godrays_gaussian_y.json", + "materials/effects/godrays_combine.json", + "shaders/effects/godrays_downsample2.frag", + "shaders/effects/godrays_downsample2.vert", + "shaders/effects/godrays_cast.frag", + "shaders/effects/godrays_cast.vert", + "shaders/effects/godrays_gaussian.frag", + "shaders/effects/godrays_gaussian.vert", + "shaders/effects/godrays_combine.frag", + "shaders/effects/godrays_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/scroll/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/scroll/effect.json new file mode 100644 index 0000000..fa76391 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/scroll/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Scroll", + "description" : "Scrolls the image horizontally or vertically.", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/scroll.json" + } + ], + "dependencies" : + [ + "materials/effects/scroll.json", + "shaders/effects/scroll.frag", + "shaders/effects/scroll.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/tint/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/tint/effect.json new file mode 100644 index 0000000..736ae31 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/tint/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Tint", + "description" : "Tint the image with a color of choice.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/effects/transform/effect.json b/modules/wallpaper-engine/effects/godrays/preview/effects/transform/effect.json new file mode 100644 index 0000000..ed7793a --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/effects/transform/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Transform", + "description" : "Apply scaling, rotation and offsets to the image.", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/transform.json" + } + ], + "dependencies" : + [ + "materials/effects/transform.json", + "shaders/effects/transform.frag", + "shaders/effects/transform.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.json b/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.json new file mode 100644 index 0000000..d85a070 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "clouds" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.tex b/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.tex new file mode 100644 index 0000000..da0acdc Binary files /dev/null and b/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.tex differ diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.tex-json b/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.tex-json new file mode 100644 index 0000000..0d9b302 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/clouds.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.tex new file mode 100644 index 0000000..24a2d91 Binary files /dev/null and b/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/blend.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/blend.json new file mode 100644 index 0000000..9f5f5b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/blend.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blend", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/colorkey.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/colorkey.json new file mode 100644 index 0000000..96b9986 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/colorkey.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/colorkey", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/fisheye.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/fisheye.json new file mode 100644 index 0000000..5bcb296 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/fisheye.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/fisheye", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_cast.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_cast.json new file mode 100644 index 0000000..36b51d8 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_cast.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_cast", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_combine.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_combine.json new file mode 100644 index 0000000..dbbdfa1 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_downsample2.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_downsample2.json new file mode 100644 index 0000000..53ccced --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_downsample2.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_downsample2", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_gaussian_x.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_gaussian_x.json new file mode 100644 index 0000000..837441d --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/godrays_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_gaussian_y.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_gaussian_y.json new file mode 100644 index 0000000..42e88c6 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/godrays_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/godrays_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/scroll.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/scroll.json new file mode 100644 index 0000000..7471904 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/scroll.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/scroll", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/tint.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/materials/effects/transform.json b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/transform.json new file mode 100644 index 0000000..47b6a90 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/materials/effects/transform.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/transform", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/models/clouds.json b/modules/wallpaper-engine/effects/godrays/preview/models/clouds.json new file mode 100644 index 0000000..5f7639e --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/models/clouds.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/clouds.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/godrays/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/project.json b/modules/wallpaper-engine/effects/godrays/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/scene.json b/modules/wallpaper-engine/effects/godrays/preview/scene.json new file mode 100644 index 0000000..881cca6 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/scene.json @@ -0,0 +1,200 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "0.608 0.608 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/scroll/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Speed X" : -0.34999999403953552, + "Speed Y" : -0.61000001430511475 + } + } + ] + }, + { + "file" : "effects/transform/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Angle" : 0.75, + "Scale" : "0.5 0.5" + } + } + ] + } + ], + "id" : 68, + "image" : "models/clouds.json", + "name" : "clouds", + "origin" : "-180.120 -130.583 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "dependencies" : [ 68 ], + "effects" : + [ + { + "file" : "effects/scroll/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Speed X" : 0.50999999046325684, + "Speed Y" : 0.61000001430511475 + } + } + ] + }, + { + "file" : "effects/blend/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 9 + }, + "textures" : [ null, "_rt_imageLayerComposite_68_a" ] + } + ] + } + ], + "id" : 49, + "image" : "models/clouds.json", + "name" : "clouds", + "origin" : "-182.542 134.042 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "config" : + { + "passthrough" : true + }, + "copybackground" : true, + "dependencies" : [ 49, 203 ], + "effects" : + [ + { + "file" : "effects/godrays/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Ray threshold" : 0.73000001907348633 + }, + "textures" : [ null, "_rt_imageLayerComposite_49_a" ] + }, + { + "constantshadervalues" : + { + "Color end" : "1 1 1", + "Color start" : "0 0.294118 1", + "Ray intensity" : 2, + "Ray length" : 0.82999998331069946 + } + }, + { + "combos" : + { + "KERNEL" : 2 + }, + "constantshadervalues" : + { + "Blur scale" : "1 1" + } + }, + { + "combos" : + { + "KERNEL" : 2, + "VERTICAL" : 1 + }, + "constantshadervalues" : + { + "Blur scale" : "1 1" + } + }, + { + "textures" : [ null, "_rt_imageLayerComposite_203_a" ] + } + ] + } + ], + "id" : 203, + "image" : "models/util/composelayer.json", + "name" : "Compose", + "origin" : "127.190 131.439 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "0.581 0.581 1.000", + "size" : "512.000 512.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/blend.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/blend.frag new file mode 100644 index 0000000..17d5db6 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/blend.frag @@ -0,0 +1,31 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform float g_Multiply; // {"material":"Multiply","default":1,"range":[0.0, 10.0]} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Blend texture","mode":"rgbmask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Opacity mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw); + float blend = mask.a * g_Multiply; + +#if OPACITYMASK == 1 + blend *= texSample2D(g_Texture2, v_TexCoordOpacity).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, blend); + + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/blend.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/blend.vert new file mode 100644 index 0000000..4cb5b5d --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/blend.vert @@ -0,0 +1,26 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture2Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/colorkey.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/colorkey.frag new file mode 100644 index 0000000..8f63c62 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/colorkey.frag @@ -0,0 +1,31 @@ + +// [COMBO] {"material":"Invert","combo":"INVERT","type":"options","default":0} +// [COMBO] {"material":"Flatten","combo":"FLATTEN","type":"options","default":0} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_KeyAlpha; // {"material":"Write alpha","default":0,"range":[0,1]} +uniform float g_KeyFuzz; // {"material":"Fuzziness","default":0,"range":[0,3]} +uniform float g_KeyTolerance; // {"material":"Tolerance","default":0.1,"range":[0,3]} +uniform vec3 g_KeyColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + float delta = dot(abs(g_KeyColor - albedo.rgb), vec3(1, 1, 1)); + float blend = smoothstep(0.001, 0.002 + g_KeyFuzz, delta - g_KeyTolerance); + +#if INVERT == 1 + blend = 1.0 - blend; +#endif + + albedo.a *= mix(g_KeyAlpha, 1.0, blend); + +#if FLATTEN == 1 + albedo.rgb *= albedo.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/colorkey.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/colorkey.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/colorkey.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/fisheye.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/fisheye.frag new file mode 100644 index 0000000..d5abadf --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/fisheye.frag @@ -0,0 +1,46 @@ + +// [COMBO] {"material":"Background","combo":"BACKGROUND","type":"options","default":1} + +#include "common.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_Size; // {"material":"Size","default":1,"range":[0.01, 1]} +uniform float g_Scale; // {"material":"Distortion","default":1,"range":[0, 2.5]} +uniform vec2 g_Center; // {"material":"Center","default":"0.5 0.5"} + +void main() { + //vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + float aperture = 178.0; + float apertureHalf = 0.5 * aperture * (M_PI / 180.0); + float maxFactor = sin(apertureHalf); + + vec2 uv; + vec2 xy = (v_TexCoord.xy - g_Center) * 2.0 / g_Size; + float d = length(xy); + float alpha = 1.0; + if (d < (2.0 - maxFactor)) + { + d = length(xy * maxFactor); + float z = sqrt(1.0 - d * d); + float r = atan2(d, z) / M_PI; + float phi = atan2(xy.y, xy.x); + + uv.x = r * cos(phi) * g_Size + g_Center.x; + uv.y = r * sin(phi) * g_Size + g_Center.y; + } + else + { + uv = v_TexCoord.xy; +#if BACKGROUND == 0 + alpha = 0.0; +#endif + } + + vec4 albedo = texSample2D(g_Texture0, mix(v_TexCoord.xy, uv, g_Scale)); + albedo.a *= alpha; + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/fisheye.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/fisheye.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/fisheye.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_cast.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_cast.frag new file mode 100644 index 0000000..68434e5 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_cast.frag @@ -0,0 +1,48 @@ + +// [COMBO] {"material":"Caster","combo":"CASTER","type":"options","default":0,"options":{"Radial":0,"Directional":1}} + +#include "common.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_Length; // {"material":"Ray length","default":0.5,"range":[0.01, 1]} +uniform float g_Intensity; // {"material":"Ray intensity","default":1,"range":[0.01, 2.0]} +uniform vec3 g_Color1; // {"material":"Color start","default":"1 1 1","type":"color"} +uniform vec3 g_Color2; // {"material":"Color end","default":"1 1 1","type":"color"} + +#if CASTER == 0 +uniform vec2 g_Center; // {"material":"Center","default":"0.5 0.5"} +#else +uniform float g_Direction; // {"material":"Direction","default":0,"range":[0,6.28]} +#endif + +void main() { + + vec2 texCoords = v_TexCoord; + vec4 albedo = CAST4(0.0); + +#if CASTER == 0 + vec2 direction = g_Center - texCoords; +#else + vec2 direction = rotateVec2(vec2(0, -0.5), g_Direction); +#endif + + float dist = length(direction); + direction /= dist; + + dist = min(dist, dist * g_Length); + texCoords += direction * dist; + direction = direction * dist / 29.0; + + for (int i = 0; i < 30; ++i) + { + vec4 sample = texSample2D(g_Texture0, texCoords); + texCoords -= direction; + sample.rgb *= mix(g_Color2, g_Color1, i/29.0); + albedo += sample * (i / 29.0); + } + + gl_FragColor = albedo * g_Intensity * 0.1; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_cast.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_cast.vert new file mode 100644 index 0000000..0c51161 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_cast.vert @@ -0,0 +1,14 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_combine.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_combine.frag new file mode 100644 index 0000000..70dad0c --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_combine.frag @@ -0,0 +1,24 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":9} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Prev","hidden":true} + +void main() { + + vec4 rays = texSample2D(g_Texture0, v_TexCoord.zw); + vec4 albedo = texSample2D(g_Texture1, v_TexCoord.xy); + +#if BLENDMODE == 0 + albedo = rays; +#else + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, rays.rgb, rays.a); + albedo.a += rays.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_combine.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_combine.vert new file mode 100644 index 0000000..f1e300d --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_combine.vert @@ -0,0 +1,22 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord.xyxy; + +#ifdef HLSL_SM30 + v_TexCoord.zw += 0.5 / g_Texture0Resolution.xy; +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_downsample2.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_downsample2.frag new file mode 100644 index 0000000..6ce9c4b --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_downsample2.frag @@ -0,0 +1,15 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +uniform float g_Threshold; // {"material":"Ray threshold","default":0.5,"range":[0, 1]} + +void main() { + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + vec4 sample = texSample2D(g_Texture0, v_TexCoord.xy); + sample.rgb *= sample.a; + sample.a = 1.0; + gl_FragColor = sample * mask * step(g_Threshold, dot(vec3(0.11, 0.59, 0.3), sample.rgb)); +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_downsample2.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_downsample2.vert new file mode 100644 index 0000000..82e9341 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_downsample2.vert @@ -0,0 +1,20 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xy = a_TexCoord; + + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture0Resolution.z / g_Texture0Resolution.x, + v_TexCoord.y * g_Texture0Resolution.w / g_Texture0Resolution.y); + +#ifdef HLSL_SM30 + vec2 offsets = 0.5 / g_Texture0Resolution.xy; + v_TexCoord.xy += offsets; +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_gaussian.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_gaussian.frag new file mode 100644 index 0000000..0212a97 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_gaussian.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_gaussian.vert new file mode 100644 index 0000000..c5c4fce --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/godrays_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":1,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"Blur scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/scroll.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/scroll.frag new file mode 100644 index 0000000..3aed35f --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/scroll.frag @@ -0,0 +1,10 @@ + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = frac(v_TexCoord + v_Scroll); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/scroll.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/scroll.vert new file mode 100644 index 0000000..27fdae7 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/scroll.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_ScrollX; // {"material":"Speed X","default":0.2,"range":[-2,2]} +uniform float g_ScrollY; // {"material":"Speed Y","default":0.2,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; + + vec2 scroll = vec2(g_ScrollX, g_ScrollY); + scroll = sign(scroll) * pow(vec2(g_ScrollX, g_ScrollY), CAST2(2.0)); + v_Scroll = scroll * g_Time; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/tint.frag new file mode 100644 index 0000000..7ec87bb --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/tint.frag @@ -0,0 +1,19 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_BlendAlpha; // {"material":"Alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, g_BlendAlpha); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/tint.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/tint.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/transform.frag b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/transform.frag new file mode 100644 index 0000000..44d0e1b --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/transform.frag @@ -0,0 +1,14 @@ + +// [COMBO] {"material":"Repeat","combo":"CLAMP","type":"options","default":1} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = v_TexCoord; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/transform.vert b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/transform.vert new file mode 100644 index 0000000..8364fed --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/shaders/effects/transform.vert @@ -0,0 +1,35 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec2 g_Offset; // {"material":"Offset","default":"0 0"} +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1"} +uniform float g_Direction; // {"material":"Angle","default":0,"range":[0,6.28]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +vec2 applyFx(vec2 v) { + v = rotateVec2(v - CAST2(0.5), g_Direction); + return (v + g_Offset) * g_Scale + CAST2(0.5); +} + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = applyFx(position.xy); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; + +#if MODE == 0 + v_TexCoord = applyFx(v_TexCoord); +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/preview/template.json b/modules/wallpaper-engine/effects/godrays/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_cast.frag b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_cast.frag new file mode 100644 index 0000000..d421734 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_cast.frag @@ -0,0 +1,58 @@ + +// [COMBO] {"material":"ui_editor_properties_cast_type","combo":"CASTER","type":"options","default":0,"options":{"Radial":0,"Directional":1}} +// [COMBO] {"material":"ui_editor_properties_quality","combo":"SAMPLES","type":"options","default":0,"options":{"30":0,"50":1}} + +#include "common.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +uniform float g_Length; // {"material":"raylength","label":"ui_editor_properties_ray_length","default":0.5,"range":[0.01, 1]} +uniform float g_Intensity; // {"material":"rayintensity","label":"ui_editor_properties_ray_intensity","default":1,"range":[0.01, 2.0]} +uniform vec3 g_ColorRays; // {"material":"color","label":"ui_editor_properties_color","default":"1 1 1","type":"color"} + +#if CASTER == 0 +uniform vec2 g_Center; // {"material":"center","label":"ui_editor_properties_center","default":"0.5 0.5","position":true} +#else +uniform float g_Direction; // {"material":"direction","label":"ui_editor_properties_direction","default":3.14159265358,"direction":true,"conversion":"rad2deg"} +#endif + +void main() { + + vec2 texCoords = v_TexCoord; + vec4 albedo = CAST4(0.0); + +#if CASTER == 0 + vec2 direction = g_Center - texCoords; +#else + vec2 direction = rotateVec2(vec2(0, -0.5), g_Direction - M_PI); +#endif + + float dist = length(direction); + direction /= dist; + + dist *= g_Length; + texCoords += direction * dist; + +#if SAMPLES == 0 + const int sampleCount = 30; + const float sampleIntensity = 0.1; +#endif +#if SAMPLES == 1 + const int sampleCount = 50; + const float sampleIntensity = 0.1 * (30 / 50.0); +#endif + const float sampleDrop = sampleCount - 1; + + direction = direction * dist / sampleDrop; + for (int i = 0; i < sampleCount; ++i) + { + vec4 sample = texSample2D(g_Texture0, texCoords); + texCoords -= direction; + albedo += sample * (i / sampleDrop); + } + + albedo.rgb *= g_ColorRays; + gl_FragColor = vec4(g_Intensity * sampleIntensity * albedo.rgb, saturate(g_Intensity * sampleIntensity * albedo.a)); +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_cast.vert b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_cast.vert new file mode 100644 index 0000000..0c51161 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_cast.vert @@ -0,0 +1,14 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_combine.frag b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_combine.frag new file mode 100644 index 0000000..7c3be2a --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_combine.frag @@ -0,0 +1,37 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":9} +// [COMBO] {"material":"ui_editor_properties_copy_background","combo":"COPYBG","type":"options"} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +#if COPYBG +varying vec3 v_ScreenCoord; + +uniform sampler2D g_Texture2; // {"hidden":true,"default":"_rt_FullFrameBuffer"} +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} + +void main() { + + vec4 rays = texSample2D(g_Texture0, v_TexCoord.zw); + vec4 albedo = texSample2D(g_Texture1, v_TexCoord.xy); + +#if COPYBG + vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * vec2(0.5, 0.5) + 0.5; + vec4 bg = texSample2D(g_Texture2, screenCoord.xy); + albedo.rgb = mix(bg.rgb, albedo.rgb, albedo.a); +#endif + +#if BLENDMODE == 0 + albedo = rays; +#else + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, rays.rgb, rays.a); + albedo.a = saturate(albedo.a + rays.a); +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_combine.vert b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_combine.vert new file mode 100644 index 0000000..a65dcb8 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_combine.vert @@ -0,0 +1,35 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if COPYBG +uniform mat4 g_EffectModelViewProjectionMatrix; + +varying vec3 v_ScreenCoord; +#endif + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord.xyxy; + +#ifdef HLSL_SM30 + v_TexCoord.zw += 0.5 / g_Texture0Resolution.xy; +#endif + +#if COPYBG + v_ScreenCoord = mul(vec4((a_Position), 1.0), g_EffectModelViewProjectionMatrix).xyw; +#if HLSL + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_downsample2.frag b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_downsample2.frag new file mode 100644 index 0000000..cf83e9f --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_downsample2.frag @@ -0,0 +1,40 @@ + +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":1} + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_Threshold; // {"material":"raythreshold","label":"ui_editor_properties_ray_threshold","default":0.5,"range":[0, 1]} + +#if NOISE == 1 +varying vec4 v_NoiseTexCoord; + +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_noise","default":"util/clouds_256"} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.4,"range":[0.01, 1]} +uniform float g_NoiseSmoothness; // {"material":"noisesmoothness","label":"ui_editor_properties_noise_smoothness","default":0.2,"range":[0.01, 0.5]} +#endif + +void main() { +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + vec4 sample = texSample2D(g_Texture0, v_TexCoord.xy); + +#if NOISE + float noiseSample = texSample2D(g_Texture2, v_NoiseTexCoord.xy).r * texSample2D(g_Texture2, v_NoiseTexCoord.zw).r; + noiseSample = mix(sample.a, sample.a * noiseSample, g_NoiseAmount); +#endif + + sample.rgb *= sample.a; + sample.a = 1.0; + + gl_FragColor = sample * mask * step(g_Threshold, dot(vec3(0.11, 0.59, 0.3), sample.rgb)); + +#if NOISE + gl_FragColor.a *= smoothstep(0.5 - g_NoiseSmoothness, 0.5 + g_NoiseSmoothness, noiseSample); +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_downsample2.vert b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_downsample2.vert new file mode 100644 index 0000000..b683df6 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_downsample2.vert @@ -0,0 +1,37 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +#if NOISE == 1 +varying vec4 v_NoiseTexCoord; +#endif + +uniform float g_Time; +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":0.15,"range":[0.01, 1]} +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":3,"range":[0.01, 10]} + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.z *= g_Texture1Resolution.z / g_Texture1Resolution.x; + v_TexCoord.w *= g_Texture1Resolution.w / g_Texture1Resolution.y; +#endif + +#ifdef HLSL_SM30 + vec2 offsets = 0.5 / g_Texture0Resolution.xy; + v_TexCoord.xy += offsets; +#endif + +#if NOISE == 1 + v_NoiseTexCoord.xy = a_TexCoord + g_Time * g_NoiseSpeed; + v_NoiseTexCoord.wz = vec2(a_TexCoord.y, -a_TexCoord.x) * 0.633 + vec2(-g_Time, g_Time) * 0.5 * g_NoiseSpeed; + v_NoiseTexCoord *= g_NoiseScale; +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_gaussian.frag b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_gaussian.frag new file mode 100644 index 0000000..08cbef9 --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_gaussian.frag @@ -0,0 +1,18 @@ + +uniform sampler2D g_Texture0; // {"hidden":true} + +#include "common_blur.h" + +varying vec4 v_TexCoord; + +void main() { +#if KERNEL == 0 + gl_FragColor = blur13a(v_TexCoord.xy, v_TexCoord.zw); +#endif +#if KERNEL == 1 + gl_FragColor = blur7a(v_TexCoord.xy, v_TexCoord.zw); +#endif +#if KERNEL == 2 + gl_FragColor = blur3a(v_TexCoord.xy, v_TexCoord.zw); +#endif +} diff --git a/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_gaussian.vert b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_gaussian.vert new file mode 100644 index 0000000..a89cb6c --- /dev/null +++ b/modules/wallpaper-engine/effects/godrays/shaders/effects/godrays_gaussian.vert @@ -0,0 +1,25 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":1,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"blurscale","label":"ui_editor_properties_blur_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord.xy = a_TexCoord; + +#if VERTICAL + v_TexCoord.z = 0; + v_TexCoord.w = g_Scale.y / g_Texture0Resolution.w; +#else + v_TexCoord.z = g_Scale.x / g_Texture0Resolution.z; + v_TexCoord.w = 0; +#endif +} diff --git a/modules/wallpaper-engine/effects/iris/effect.json b/modules/wallpaper-engine/effects/iris/effect.json new file mode 100644 index 0000000..98186de --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "iris", + "name" : "ui_editor_effect_iris_title", + "description" : "ui_editor_effect_iris_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/iris.json" + } + ], + "dependencies" : + [ + "materials/effects/iris.json", + "shaders/effects/iris.frag", + "shaders/effects/iris.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/materials/effects/iris.json b/modules/wallpaper-engine/effects/iris/materials/effects/iris.json new file mode 100644 index 0000000..414a8d4 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/materials/effects/iris.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/iris", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/iris/preview/effects/iris/effect.json b/modules/wallpaper-engine/effects/iris/preview/effects/iris/effect.json new file mode 100644 index 0000000..98186de --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/effects/iris/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "iris", + "name" : "ui_editor_effect_iris_title", + "description" : "ui_editor_effect_iris_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/iris.json" + } + ], + "dependencies" : + [ + "materials/effects/iris.json", + "shaders/effects/iris.frag", + "shaders/effects/iris.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/iris/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/iris/preview/materials/effectpreview.tex new file mode 100644 index 0000000..55de60a Binary files /dev/null and b/modules/wallpaper-engine/effects/iris/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/iris/preview/materials/effects/iris.json b/modules/wallpaper-engine/effects/iris/preview/materials/effects/iris.json new file mode 100644 index 0000000..414a8d4 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/materials/effects/iris.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/iris", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/iris/preview/materials/masks/iris_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/iris/preview/materials/masks/iris_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..78ad77d Binary files /dev/null and b/modules/wallpaper-engine/effects/iris/preview/materials/masks/iris_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/iris/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/iris/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/preview/project.json b/modules/wallpaper-engine/effects/iris/preview/project.json new file mode 100644 index 0000000..ee34952 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/preview/scene.json b/modules/wallpaper-engine/effects/iris/preview/scene.json new file mode 100644 index 0000000..771cf35 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/scene.json @@ -0,0 +1,88 @@ +{ + "camera" : + { + "center" : "-5.30420 -15.61792 -1.00000", + "eye" : "-5.30420 -15.61792 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.10000000149011612, + "bloomhdrscatter" : 1.6189999580383301, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999997764825821, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/iris/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "scale" : "20 20" + }, + "id" : 19, + "textures" : [ null, "masks/iris_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" ] + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/preview/shaders/effects/iris.frag b/modules/wallpaper-engine/effects/iris/preview/shaders/effects/iris.frag new file mode 100644 index 0000000..d2022e0 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/shaders/effects/iris.frag @@ -0,0 +1,24 @@ + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordIris; + +uniform sampler2D g_Texture0; // {"material":"framebuffer", "label":"ui_editor_properties_framebuffer", "hidden":true} +uniform sampler2D g_Texture1; // {"material":"mask", "label":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform vec3 g_EyeColor; // {"material":"color", "label":"ui_editor_properties_background_color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 iris = texSample2D(g_Texture0, v_TexCoordIris.xy); + float mask = 1.0; //g_BlendAlpha; + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoord.zw).r; + float irisMask = texSample2D(g_Texture1, v_TexCoordIris.zw).r; + iris.rgb = mix(g_EyeColor, iris.rgb, irisMask); +#endif + + albedo = mix(albedo, iris, mask); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/iris/preview/shaders/effects/iris.vert b/modules/wallpaper-engine/effects/iris/preview/shaders/effects/iris.vert new file mode 100644 index 0000000..c290740 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/shaders/effects/iris.vert @@ -0,0 +1,40 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 1","linked":true,"range":[0.01, 10.0]} +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1,"range":[0.01, 2.0]} +uniform float g_Rough; // {"material":"rough","label":"ui_editor_properties_smoothness","default":0.2,"range":[0.01, 1.0]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.5,"range":[0.01, 2.0]} + +#if MASK +uniform vec4 g_Texture1Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordIris; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif + + float dt = floor(g_Time * g_Speed); + float ft = frac(g_Time * g_Speed); + vec2 da0 = sin(1.7 * dt) + sin(2.3 * dt + vec2(1.0, 2.0)); + vec2 da1 = sin(1.7 * (dt + 1.0)) + sin(2.3 * (dt + 1.0) + vec2(1.0, 2.0)); + vec2 da = mix(da0, da1, smoothstep(1.0 - g_Rough, 1.0, ft)); + + da.x += sin(g_Time * g_Speed) * g_NoiseAmount; + da.y += cos(g_Time * g_Speed) * g_NoiseAmount; + + da *= g_Scale * 0.001; + v_TexCoordIris = v_TexCoord + da.xyxy; +} diff --git a/modules/wallpaper-engine/effects/iris/preview/template.json b/modules/wallpaper-engine/effects/iris/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/iris/shaders/effects/iris.frag b/modules/wallpaper-engine/effects/iris/shaders/effects/iris.frag new file mode 100644 index 0000000..af0959d --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/shaders/effects/iris.frag @@ -0,0 +1,31 @@ + +// [COMBO] {"material":"ui_editor_properties_background","combo":"BACKGROUND","type":"options","default":0} + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordIris; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform vec3 g_EyeColor; // {"material":"color", "label":"ui_editor_properties_background_color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = 1.0; + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoord.zw).r; + vec4 iris = texSample2D(g_Texture0, v_TexCoord.xy + v_TexCoordIris.xy * mask); + float irisMask = texSample2D(g_Texture1, v_TexCoord.zw + v_TexCoordIris.xy * mask).r; +#if BACKGROUND + iris.rgb = mix(g_EyeColor, iris.rgb, irisMask); +#endif +#else + vec4 iris = texSample2D(g_Texture0, v_TexCoord.xy + v_TexCoordIris.xy); +#endif + + //albedo = mix(albedo, iris, mask); + albedo = iris; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/iris/shaders/effects/iris.vert b/modules/wallpaper-engine/effects/iris/shaders/effects/iris.vert new file mode 100644 index 0000000..38e7198 --- /dev/null +++ b/modules/wallpaper-engine/effects/iris/shaders/effects/iris.vert @@ -0,0 +1,45 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 1","linked":true,"range":[0.01, 10.0]} +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1,"range":[0.01, 2.0]} +uniform float g_Rough; // {"material":"rough","label":"ui_editor_properties_smoothness","default":0.2,"range":[0.01, 1.0]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.5,"range":[0.01, 2.0]} +uniform float g_PhaseOffset; // {"material":"phase", "label":"ui_editor_properties_phase", "default":0,"range":[-1, 1]} + +#if MASK +uniform vec4 g_Texture1Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordIris; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif + float time = (g_Time * g_Speed) + g_PhaseOffset; + + float lowDt = floor(time); + vec2 motion2 = sin(1.9 * (lowDt + vec2(0, 1))); + vec4 motion4 = sin(2.5 * (lowDt + vec4(0, 0, 1, 1)) + vec4(1, 2, 1, 2)); + vec2 moveStart = motion2.xx + motion4.xy; + vec2 moveEnd = motion2.yy + motion4.zw; + vec2 da = mix(moveStart, moveEnd, smoothstep(1 - g_Rough, 1, cos(frac(time) * M_PI) * -0.5 + 0.5)); + + da.x += sin(time) * g_NoiseAmount; + da.y += cos(time) * g_NoiseAmount; + + da *= g_Scale * 0.001; + v_TexCoordIris = da.xy; +} diff --git a/modules/wallpaper-engine/effects/lightshafts/effect.json b/modules/wallpaper-engine/effects/lightshafts/effect.json new file mode 100644 index 0000000..ad068cc --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "lightshafts", + "name" : "ui_editor_effect_light_shafts_title", + "description" : "ui_editor_effect_light_shafts_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/lightshafts.json" + } + ], + "dependencies" : + [ + "materials/effects/lightshafts.json", + "shaders/effects/lightshafts.frag", + "shaders/effects/lightshafts.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/materials/effects/lightshafts.json b/modules/wallpaper-engine/effects/lightshafts/materials/effects/lightshafts.json new file mode 100644 index 0000000..13538fc --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/materials/effects/lightshafts.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/lightshafts", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/effects/lightshafts/effect.json b/modules/wallpaper-engine/effects/lightshafts/preview/effects/lightshafts/effect.json new file mode 100644 index 0000000..44ace01 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/effects/lightshafts/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "lightshafts", + "name" : "ui_editor_effect_lightshafts_title", + "description" : "ui_editor_effect_lightshafts_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/lightshafts.json" + } + ], + "dependencies" : + [ + "materials/effects/lightshafts.json", + "shaders/effects/lightshafts.frag", + "shaders/effects/lightshafts.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.json new file mode 100644 index 0000000..55c3f48 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "alphawriting" : "default", + "blending" : "translucent", + "combos" : + { + "FOG" : 1 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage4", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tex new file mode 100644 index 0000000..55de60a Binary files /dev/null and b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tga b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/materials/effects/lightshafts.json b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effects/lightshafts.json new file mode 100644 index 0000000..13538fc --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/materials/effects/lightshafts.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/lightshafts", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/lightshafts/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/project.json b/modules/wallpaper-engine/effects/lightshafts/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/scene.json b/modules/wallpaper-engine/effects/lightshafts/preview/scene.json new file mode 100644 index 0000000..3cda342 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/scene.json @@ -0,0 +1,97 @@ +{ + "camera" : + { + "center" : "0.96342 -7.22564 -1.00000", + "eye" : "0.96342 -7.22564 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "bloomtint" : "1.00000 1.00000 1.00000", + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "perspectiveoverridefov" : 95.0, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "castshadow" : false, + "color" : "0.56863 0.56863 0.56863", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "id" : 19, + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 2, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorend" : "0.5 0.8 1", + "colorstart" : "1 1 1", + "colorwexponent" : 1.52, + "colorwintensity" : 8.02, + "noiseamount" : 0.33, + "noisescale" : 1.0, + "point0" : "0.07252 0.03708", + "point1" : "1.06537 0.04142", + "point2" : "1.21069 1.01650", + "point3" : "-0.09353 1.00193", + "rayfeather" : "0.05 0.2", + "rayradius" : 0.16, + "rayscale" : "0.74 0.1", + "raysmoothness" : 0.75, + "rayspeed" : 0.2 + }, + "id" : 20 + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "size" : "256.00000 256.00000" + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/shaders/effects/lightshafts.frag b/modules/wallpaper-engine/effects/lightshafts/preview/shaders/effects/lightshafts.frag new file mode 100644 index 0000000..500ae1f --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/shaders/effects/lightshafts.frag @@ -0,0 +1,109 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_linear":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}} + +#include "common_fragment.h" +#include "common_blending.h" + +varying vec2 v_TexCoord; +varying vec3 v_TexCoordFx; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}} + +uniform float g_Time; + +uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0]} +uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0]} +uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0]} +uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5]} +uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.5,"range":[0.0, 1.0]} + +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0]} + +uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0]} +uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":0.5,"range":[0.2, 2.0]} +uniform vec3 g_ColorRaysStart; // {"material":"colorstart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color"} +uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color"} + +void main() { + vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z; + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + + float mask = step(0.0, v_TexCoordFx.z); + +#if RAYMODE == 1 + vec2 rayCenter = vec2(0.5, 0.5); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5; + fxCoord.y = length(rayDelta) * 2.0; + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + fxCoord.y = (fxCoord.y - 0.0001) * 1.00021; + vec2 fxCoordRef = fxCoord; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#elif RAYMODE == 2 + vec2 rayCenter = vec2(0, 0); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4; + fxCoord.y = max(rayDelta.x, rayDelta.y); + //fxCoord.y = length(rayDelta); + fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + + vec2 fxCoordRef = fxCoord; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#else + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + vec2 fxCoordRef = fxCoord; + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#endif + + float grad = 1.0 - fxCoord.y; + mask *= grad; + + vec2 fxCoord2 = fxCoord; + fxCoord.xy *= vec2(0.054111 * g_Scale.x, 0.003111 * g_Scale.y); + fxCoord2.xy *= vec2(0.07333 * g_Scale.x, 0.005967111 * g_Scale.y); + + fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111); + fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399); + + float fx0 = texSample2D(g_Texture1, fxCoord).r; + float fx1 = texSample2D(g_Texture1, fxCoord2).r; + float fx = fx0 * fx1; + fx = pow(fx, g_Exponent); + + fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx); + +#if RENDERING == 0 + vec3 fxColor = mix(g_ColorRaysEnd, g_ColorRaysStart, fx) * g_Intensity; +#else + vec2 gradientUVs = vec2(fxCoordRef.y, 0); +#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88 + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr; +#else + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb; +#endif + vec3 fxColor = gradColor * g_Intensity; +#endif + + fx *= mask; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx); + albedo.a = max(albedo.a, fx); + +#if WRITEALPHA + albedo.a = fx; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/shaders/effects/lightshafts.vert b/modules/wallpaper-engine/effects/lightshafts/preview/shaders/effects/lightshafts.vert new file mode 100644 index 0000000..dca5d42 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/shaders/effects/lightshafts.vert @@ -0,0 +1,25 @@ + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec3 v_TexCoordFx; + +void main() { + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + + v_TexCoord.xy = a_TexCoord.xy; + v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform); + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +} diff --git a/modules/wallpaper-engine/effects/lightshafts/preview/template.json b/modules/wallpaper-engine/effects/lightshafts/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/lightshafts/shaders/effects/lightshafts.frag b/modules/wallpaper-engine/effects/lightshafts/shaders/effects/lightshafts.frag new file mode 100644 index 0000000..482c0b4 --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/shaders/effects/lightshafts.frag @@ -0,0 +1,138 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_linear":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}} +// [COMBO] {"material":"ui_editor_properties_corner","combo":"RAYCORNER","type":"options","default":0,"options":{"ui_editor_properties_top_left":0,"ui_editor_properties_top_right":1,"ui_editor_properties_bottom_left":2,"ui_editor_properties_bottom_right":3},"require":{"RAYMODE":2}} + +#include "common_fragment.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}} + +uniform float g_Time; + +uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"} +uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"} +uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"} +uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"} +uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"} +uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"} +uniform float g_StartAngle; // {"material":"rayzstartangle","label":"ui_editor_properties_start_angle","default":0,"range":[0.0, 1.0],"group":"ui_editor_properties_blending"} +uniform float g_EndAngle; // {"material":"rayzzendangle","label":"ui_editor_properties_end_angle","default":1,"range":[0.0, 1.0],"group":"ui_editor_properties_blending"} + +void main() { + vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z; +#if DIRECTDRAW + vec4 albedo = CAST4(0.0); +#else + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); +#endif + + float mask = step(0.0, v_TexCoordFx.z); + vec2 shapeScale = g_Scale; + +#if RAYMODE == 1 + vec2 rayCenter = vec2(0.5, 0.5); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5; + + fxCoord.y = length(rayDelta) * 2.0; + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + fxCoord.y = (fxCoord.y - 0.0001) * 1.00021; + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(-0.00001 + g_StartAngle, g_StartAngle + g_Feather.x, fxCoord.x); + mask *= smoothstep(g_EndAngle + 0.00001, g_EndAngle - g_Feather.x, fxCoord.x); + //mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#elif RAYMODE == 2 + vec2 rayCenter = vec2(0, 0); + vec2 rayDelta = fxCoord - rayCenter; +#if RAYCORNER == 1 + rayDelta.x = 1.0 - rayDelta.x; +#elif RAYCORNER == 2 + rayDelta.y = 1.0 - rayDelta.y; +#elif RAYCORNER == 3 + rayDelta.y = 1.0 - rayDelta.y; + rayDelta.x = 1.0 - rayDelta.x; +#endif + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4; + fxCoord.y = max(rayDelta.x, rayDelta.y); + //fxCoord.y = length(rayDelta); + fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#else + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + vec2 fxCoordRef = fxCoord; + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#endif + + float grad = 1.0 - fxCoord.y; + mask *= grad; + + vec2 fxCoord2 = fxCoord; + fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y); + fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y); + + fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111); + fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399); + + float fx0 = texSample2D(g_Texture1, fxCoord).r; + float fx1 = texSample2D(g_Texture1, fxCoord2).r; + float fx = fx0 * fx1; + fx = pow(fx, g_Exponent); + + fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx); + +#if RENDERING == 0 + vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y); +#else + vec2 gradientUVs = vec2(fxCoordRef.y, 0); +#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88 + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr; +#else + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb; +#endif + vec3 fxColor = gradColor; +#endif + +#if MASK + float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r; + //albedo = mix(sample, albedo, mask); + mask *= maskSample; +#endif + + fx *= mask; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor * g_Intensity, fx); + albedo.a = max(albedo.a, fx); + +#if WRITEALPHA + albedo.a = fx; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/lightshafts/shaders/effects/lightshafts.vert b/modules/wallpaper-engine/effects/lightshafts/shaders/effects/lightshafts.vert new file mode 100644 index 0000000..663132f --- /dev/null +++ b/modules/wallpaper-engine/effects/lightshafts/shaders/effects/lightshafts.vert @@ -0,0 +1,34 @@ + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture3Resolution; +#endif + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +void main() { + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform); + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + +#if MASK + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/localcontrast/effect.json b/modules/wallpaper-engine/effects/localcontrast/effect.json new file mode 100644 index 0000000..d61d1ee --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/effect.json @@ -0,0 +1,85 @@ +{ + "version" : 1, + "replacementkey" : "localcontrast", + "name" : "ui_editor_effect_local_contrast_title", + "description" : "ui_editor_effect_local_contrast_description", + "group" : "enhance", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/localcontrast_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/localcontrast_downsample4.json", + "materials/effects/localcontrast_gaussian_x.json", + "materials/effects/localcontrast_gaussian_y.json", + "materials/effects/localcontrast_combine.json", + "shaders/effects/localcontrast_downsample4.frag", + "shaders/effects/localcontrast_downsample4.vert", + "shaders/effects/localcontrast_gaussian.frag", + "shaders/effects/localcontrast_gaussian.vert", + "shaders/effects/localcontrast_combine.frag", + "shaders/effects/localcontrast_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_combine.json b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_combine.json new file mode 100644 index 0000000..d828d1d --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_downsample4.json b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_downsample4.json new file mode 100644 index 0000000..0dbc442 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_gaussian_x.json b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_gaussian_x.json new file mode 100644 index 0000000..97d1f18 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_gaussian_y.json b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_gaussian_y.json new file mode 100644 index 0000000..842f673 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/materials/effects/localcontrast_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/effects/localcontrast/effect.json b/modules/wallpaper-engine/effects/localcontrast/preview/effects/localcontrast/effect.json new file mode 100644 index 0000000..8485493 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/effects/localcontrast/effect.json @@ -0,0 +1,82 @@ +{ + "name" : "Local Contrast", + "description" : "Apply a local contrast enhancement to the image.", + "group" : "composite", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/localcontrast_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/localcontrast_downsample4.json", + "materials/effects/localcontrast_gaussian_x.json", + "materials/effects/localcontrast_gaussian_y.json", + "materials/effects/localcontrast_combine.json", + "shaders/effects/localcontrast_downsample4.frag", + "shaders/effects/localcontrast_downsample4.vert", + "shaders/effects/localcontrast_gaussian.frag", + "shaders/effects/localcontrast_gaussian.vert", + "shaders/effects/localcontrast_combine.frag", + "shaders/effects/localcontrast_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_combine.json b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_combine.json new file mode 100644 index 0000000..d828d1d --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_downsample4.json b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_downsample4.json new file mode 100644 index 0000000..0dbc442 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_gaussian_x.json b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_gaussian_x.json new file mode 100644 index 0000000..97d1f18 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_gaussian_y.json b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_gaussian_y.json new file mode 100644 index 0000000..842f673 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/materials/effects/localcontrast_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/localcontrast/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/project.json b/modules/wallpaper-engine/effects/localcontrast/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/scene.json b/modules/wallpaper-engine/effects/localcontrast/preview/scene.json new file mode 100644 index 0000000..beb8e44 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/scene.json @@ -0,0 +1,104 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "dependencies" : [ 33 ], + "effects" : + [ + { + "file" : "effects/localcontrast/effect.json", + "passes" : + [ + {}, + { + "combos" : + { + "KERNEL" : 1 + }, + "constantshadervalues" : + { + "Scale" : "0.76 0.76" + } + }, + { + "combos" : + { + "KERNEL" : 1, + "VERTICAL" : 1 + }, + "constantshadervalues" : + { + "Scale" : "0.76 0.76" + } + }, + { + "combos" : + { + "GREYSCALE" : 0 + }, + "constantshadervalues" : + { + "Strength" : 1.0700000524520874 + }, + "textures" : [ null, "util/white", "_rt_imageLayerComposite_33_a" ] + } + ] + } + ], + "id" : 33, + "image" : "models/util/fullscreenlayer.json", + "name" : "Fullscreen", + "origin" : "0.000 0.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "714.000 521.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_combine.frag b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_combine.frag new file mode 100644 index 0000000..90c4283 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_combine.frag @@ -0,0 +1,26 @@ + +// [COMBO] {"material":"Greyscale","combo":"GREYSCALE","type":"options","default":0} + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Prev","hidden":true} + +uniform float g_Amount; // {"material":"Strength","default":1.0,"range":[0.01, 5]} + +void main() { + vec4 blurred = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 albedo = texSample2D(g_Texture2, v_TexCoord.xy); + + vec3 delta = albedo.rgb - blurred.rgb; +#if GREYSCALE == 1 + delta = CAST3(dot(vec3(0.11, 0.59, 0.3), delta)); +#endif + vec3 enhanced = albedo.rgb + delta * g_Amount; + + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo.rgb = mix(albedo.rgb, enhanced.rgb, mask); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_combine.vert b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_downsample4.frag b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_downsample4.frag new file mode 100644 index 0000000..ab72080 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_downsample4.frag @@ -0,0 +1,12 @@ + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + gl_FragColor = (texSample2D(g_Texture0, v_TexCoord01.xy) + + texSample2D(g_Texture0, v_TexCoord01.zw) + + texSample2D(g_Texture0, v_TexCoord23.xy) + + texSample2D(g_Texture0, v_TexCoord23.zw)) * 0.25; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_downsample4.vert b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_downsample4.vert new file mode 100644 index 0000000..8cec106 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_downsample4.vert @@ -0,0 +1,18 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.zw; + v_TexCoord01.xy = a_TexCoord - offsets; + v_TexCoord01.zw = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord23.xy = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord23.zw = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_gaussian.frag b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_gaussian.frag new file mode 100644 index 0000000..0212a97 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_gaussian.vert b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_gaussian.vert new file mode 100644 index 0000000..c762d04 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/shaders/effects/localcontrast_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/localcontrast/preview/template.json b/modules/wallpaper-engine/effects/localcontrast/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_combine.frag b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_combine.frag new file mode 100644 index 0000000..ca0c07a --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_combine.frag @@ -0,0 +1,41 @@ + +// [COMBO] {"material":"ui_editor_properties_greyscale","combo":"GREYSCALE","type":"options","default":0} + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"hidden":true} + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +uniform float g_Amount; // {"material":"strength","label":"ui_editor_properties_strength","default":1.0,"range":[0.01, 5]} + +void main() { + + vec2 blurredCoords = v_TexCoord.xy; + +#ifdef HLSL_SM30 + blurredCoords += 0.75 / g_Texture0Resolution.zw; +#endif + + vec4 blurred = texSample2D(g_Texture0, blurredCoords); + vec4 albedo = texSample2D(g_Texture2, v_TexCoord.xy); + + vec3 delta = albedo.rgb - blurred.rgb; +#if GREYSCALE + delta = CAST3(dot(vec3(0.11, 0.59, 0.3), delta)); +#endif + vec3 enhanced = albedo.rgb + delta * g_Amount; + +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + albedo.rgb = mix(albedo.rgb, enhanced.rgb, mask); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_combine.vert b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_downsample4.frag b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_downsample4.frag new file mode 100644 index 0000000..d6e0105 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_downsample4.frag @@ -0,0 +1,19 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + + float weight = 0.0; + vec4 result = CAST4(0.0); + for (int i = 0; i < 4; ++i) + { + vec4 sample = texSample2D(g_Texture0, v_TexCoord[i]); + result += sample * sample.a; + weight += sample.a; + } + + gl_FragColor.rgb = result.rgb / max(0.001, weight); + gl_FragColor.a = result.a / 4.0; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_downsample4.vert b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_downsample4.vert new file mode 100644 index 0000000..3d31675 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_downsample4.vert @@ -0,0 +1,17 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord[4]; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.xy; + v_TexCoord[0] = a_TexCoord - offsets; + v_TexCoord[1] = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord[2] = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord[3] = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_gaussian.frag b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_gaussian.frag new file mode 100644 index 0000000..1439920 --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_gaussian.vert b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_gaussian.vert new file mode 100644 index 0000000..b4e341c --- /dev/null +++ b/modules/wallpaper-engine/effects/localcontrast/shaders/effects/localcontrast_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/motionblur/effect.json b/modules/wallpaper-engine/effects/motionblur/effect.json new file mode 100644 index 0000000..47d0253 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/effect.json @@ -0,0 +1,64 @@ +{ + "version" : 1, + "replacementkey" : "motionblur", + "name" : "ui_editor_effect_motion_blur_title", + "description" : "ui_editor_effect_motion_blur_description", + "group" : "blur", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/motionblur_accumulation.json", + "target" : "_rt_FullCompoBuffer2", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + }, + { + "name" : "_rt_FullCompoBuffer1", + "index" : 1 + } + ] + }, + { + "command" : "copy", + "target" : "_rt_FullCompoBuffer1", + "source" : "_rt_FullCompoBuffer2" + }, + { + "material" : "materials/effects/motionblur_combine.json", + "bind" : + [ + { + "name" : "_rt_FullCompoBuffer2", + "index" : 0 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "scale" : 1, + "format" : "rgba_backbuffer", + "unique" : true + }, + { + "name" : "_rt_FullCompoBuffer2", + "scale" : 1, + "format" : "rgba_backbuffer" + } + ], + "dependencies" : + [ + "materials/effects/motionblur_accumulation.json", + "materials/effects/motionblur_combine.json", + "shaders/effects/motionblur_accumulation.frag", + "shaders/effects/motionblur_accumulation.vert", + "shaders/effects/motionblur_combine.frag", + "shaders/effects/motionblur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/materials/effects/motionblur_accumulation.json b/modules/wallpaper-engine/effects/motionblur/materials/effects/motionblur_accumulation.json new file mode 100644 index 0000000..dd151ff --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/materials/effects/motionblur_accumulation.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/motionblur_accumulation", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/motionblur/materials/effects/motionblur_combine.json b/modules/wallpaper-engine/effects/motionblur/materials/effects/motionblur_combine.json new file mode 100644 index 0000000..8be581f --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/materials/effects/motionblur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/motionblur_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/effects/motionblur/effect.json b/modules/wallpaper-engine/effects/motionblur/preview/effects/motionblur/effect.json new file mode 100644 index 0000000..cff739f --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/effects/motionblur/effect.json @@ -0,0 +1,62 @@ +{ + "name" : "Motion Blur", + "description" : "Accumulates the image over time to create a motion blur effect.", + "group" : "composite", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/motionblur_accumulation.json", + "target" : "_rt_FullCompoBuffer2", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + }, + { + "name" : "_rt_FullCompoBuffer1", + "index" : 1 + } + ] + }, + { + "command" : "copy", + "target" : "_rt_FullCompoBuffer1", + "source" : "_rt_FullCompoBuffer2" + }, + { + "material" : "materials/effects/motionblur_combine.json", + "bind" : + [ + { + "name" : "_rt_FullCompoBuffer2", + "index" : 0 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_FullCompoBuffer1", + "scale" : 1, + "format" : "rgba8888", + "unique" : true + }, + { + "name" : "_rt_FullCompoBuffer2", + "scale" : 1, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/motionblur_accumulation.json", + "materials/effects/motionblur_combine.json", + "shaders/effects/motionblur_accumulation.frag", + "shaders/effects/motionblur_accumulation.vert", + "shaders/effects/motionblur_combine.frag", + "shaders/effects/motionblur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/effects/scroll/effect.json b/modules/wallpaper-engine/effects/motionblur/preview/effects/scroll/effect.json new file mode 100644 index 0000000..e8e8687 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/effects/scroll/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Scroll", + "description" : "Scrolls the image horizontally or vertically.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/scroll.json" + } + ], + "dependencies" : + [ + "materials/effects/scroll.json", + "shaders/effects/scroll.frag", + "shaders/effects/scroll.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/effects/spin/effect.json b/modules/wallpaper-engine/effects/motionblur/preview/effects/spin/effect.json new file mode 100644 index 0000000..8553173 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/effects/spin/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Spin", + "description" : "Spin the image.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/spin.json" + } + ], + "dependencies" : + [ + "materials/effects/spin.json", + "shaders/effects/spin.frag", + "shaders/effects/spin.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/motionblur_accumulation.json b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/motionblur_accumulation.json new file mode 100644 index 0000000..dd151ff --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/motionblur_accumulation.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/motionblur_accumulation", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/motionblur_combine.json b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/motionblur_combine.json new file mode 100644 index 0000000..8be581f --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/motionblur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/motionblur_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/scroll.json b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/scroll.json new file mode 100644 index 0000000..7471904 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/scroll.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/scroll", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/spin.json b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/spin.json new file mode 100644 index 0000000..0bbd366 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/materials/effects/spin.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/spin", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/motionblur/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/project.json b/modules/wallpaper-engine/effects/motionblur/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/scene.json b/modules/wallpaper-engine/effects/motionblur/preview/scene.json new file mode 100644 index 0000000..b743cfe --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/scene.json @@ -0,0 +1,92 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/scroll/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Speed X" : 0.93000000715255737, + "Speed Y" : 0 + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "127.000 127.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/motionblur/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Accumulation rate" : 0.20999999344348907 + }, + "textures" : [ null, "_rt_FullCompoBuffer1_fullscreen_15" ] + }, + {} + ] + } + ], + "id" : 18, + "image" : "models/util/fullscreenlayer.json", + "name" : "Fullscreen", + "origin" : "0.000 0.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "620.000 521.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_accumulation.frag b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_accumulation.frag new file mode 100644 index 0000000..4817aaa --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_accumulation.frag @@ -0,0 +1,21 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Previous framebuffer","hidden":true} +uniform sampler2D g_Texture2; // {"material":"Mask","mode":"opacitymask","default":"util/white","combo":"MASK"} + +uniform float g_Amount; // {"material":"Accumulation rate","default":0.8,"range":[0.01, 1]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 pastAlbedo = texSample2D(g_Texture1, v_TexCoord.xy); + + float rate = g_Amount; +#if MASK == 1 + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; + rate = g_Amount + (1.0 - g_Amount) * (1.0 - mask); +#endif + + gl_FragColor = mix(pastAlbedo, albedo, rate); +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_accumulation.vert b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_accumulation.vert new file mode 100644 index 0000000..0b74c35 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_accumulation.vert @@ -0,0 +1,19 @@ + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xyzw = a_TexCoord.xyxy; + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_combine.frag b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_combine.frag new file mode 100644 index 0000000..36e5889 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_combine.frag @@ -0,0 +1,9 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_combine.vert b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_combine.vert new file mode 100644 index 0000000..40d3014 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/motionblur_combine.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/scroll.frag b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/scroll.frag new file mode 100644 index 0000000..3aed35f --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/scroll.frag @@ -0,0 +1,10 @@ + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = frac(v_TexCoord + v_Scroll); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/scroll.vert b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/scroll.vert new file mode 100644 index 0000000..27fdae7 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/scroll.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_ScrollX; // {"material":"Speed X","default":0.2,"range":[-2,2]} +uniform float g_ScrollY; // {"material":"Speed Y","default":0.2,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; + + vec2 scroll = vec2(g_ScrollX, g_ScrollY); + scroll = sign(scroll) * pow(vec2(g_ScrollX, g_ScrollY), CAST2(2.0)); + v_Scroll = scroll * g_Time; +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/spin.frag b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/spin.frag new file mode 100644 index 0000000..94a5667 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/spin.frag @@ -0,0 +1,24 @@ + +// [COMBO] {"material":"Repeat","combo":"CLAMP","type":"options","default":1} + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordMask; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +#if MASK == 1 +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","combo":"MASK","default":"util/black"} +#endif + +void main() { + vec2 texCoord = v_TexCoord.xy; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); + +#if MASK == 1 + float mask = texSample2D(g_Texture1, v_TexCoordMask).r; + gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.zw), gl_FragColor, mask); +#endif +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/spin.vert b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/spin.vert new file mode 100644 index 0000000..77a9fa9 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/shaders/effects/spin.vert @@ -0,0 +1,40 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture1Resolution; + +uniform float g_Speed; // {"material":"Speed","default":1.0,"range":[-5,5]} +uniform vec2 g_SpinCenter; // {"material":"Center","default":"0.5 0.5"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = rotateVec2(position.xy - g_SpinCenter, g_Speed * g_Time) + g_SpinCenter; +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xyzw = a_TexCoord.xyxy; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif + +#if MODE == 0 + v_TexCoord.xy = rotateVec2(v_TexCoord.xy - g_SpinCenter, g_Speed * g_Time) + g_SpinCenter; +#endif +} diff --git a/modules/wallpaper-engine/effects/motionblur/preview/template.json b/modules/wallpaper-engine/effects/motionblur/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_accumulation.frag b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_accumulation.frag new file mode 100644 index 0000000..0a65183 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_accumulation.frag @@ -0,0 +1,21 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_Amount; // {"material":"rate","label":"ui_editor_properties_accumulation_rate","default":0.8,"range":[0.01, 1]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 pastAlbedo = texSample2D(g_Texture1, v_TexCoord.xy); + + float rate = g_Amount; +#if MASK + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; + rate = g_Amount + (1.0 - g_Amount) * (1.0 - mask); +#endif + + gl_FragColor = mix(pastAlbedo, albedo, rate); +} diff --git a/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_accumulation.vert b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_accumulation.vert new file mode 100644 index 0000000..0b74c35 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_accumulation.vert @@ -0,0 +1,19 @@ + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xyzw = a_TexCoord.xyxy; + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_combine.frag b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_combine.frag new file mode 100644 index 0000000..06c742f --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_combine.frag @@ -0,0 +1,9 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_combine.vert b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_combine.vert new file mode 100644 index 0000000..40d3014 --- /dev/null +++ b/modules/wallpaper-engine/effects/motionblur/shaders/effects/motionblur_combine.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/nitro/effect.json b/modules/wallpaper-engine/effects/nitro/effect.json new file mode 100644 index 0000000..3b7847c --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "nitro", + "name" : "ui_editor_effect_nitro_title", + "description" : "ui_editor_effect_nitro_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/nitro.json" + } + ], + "dependencies" : + [ + "materials/effects/nitro.json", + "shaders/effects/nitro.frag", + "shaders/effects/nitro.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/materials/effects/nitro.json b/modules/wallpaper-engine/effects/nitro/materials/effects/nitro.json new file mode 100644 index 0000000..5697bc0 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/materials/effects/nitro.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/nitro", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/nitro/preview/effects/nitro/effect.json b/modules/wallpaper-engine/effects/nitro/preview/effects/nitro/effect.json new file mode 100644 index 0000000..de06c37 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/effects/nitro/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "ui_editor_effect_nitro_title", + "description" : "ui_editor_effect_nitro_description", + "group" : "colorize", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/nitro.json" + } + ], + "dependencies" : + [ + "materials/effects/nitro.json", + "shaders/effects/nitro.frag", + "shaders/effects/nitro.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.tex new file mode 100644 index 0000000..24a2d91 Binary files /dev/null and b/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/preview/materials/effects/nitro.json b/modules/wallpaper-engine/effects/nitro/preview/materials/effects/nitro.json new file mode 100644 index 0000000..5697bc0 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/materials/effects/nitro.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/nitro", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/nitro/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/nitro/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/preview/project.json b/modules/wallpaper-engine/effects/nitro/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/preview/scene.json b/modules/wallpaper-engine/effects/nitro/preview/scene.json new file mode 100644 index 0000000..4e1d80c --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/scene.json @@ -0,0 +1,67 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/nitro/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "ui_editor_properties_bounds" : "0.3 0.2", + "ui_editor_properties_color_end" : "1 1 1", + "ui_editor_properties_color_start" : "0 1 1", + "ui_editor_properties_multiply" : 3 + }, + "textures" : [ null, "util/clouds_256" ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/preview/shaders/effects/nitro.frag b/modules/wallpaper-engine/effects/nitro/preview/shaders/effects/nitro.frag new file mode 100644 index 0000000..bf10c1a --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/shaders/effects/nitro.frag @@ -0,0 +1,46 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":22} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordNitro; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_albedo","default":"util/clouds_256"} +uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK"} + +uniform float g_NitroAlpha; // {"material":"ui_editor_properties_multiply","default":1.0,"range":[0.01, 10]} +uniform vec3 g_NitroColor0; // {"material":"ui_editor_properties_color_start","default":"0 1 1","type":"color"} +uniform vec3 g_NitroColor1; // {"material":"ui_editor_properties_color_end","default":"1 1 1","type":"color"} +uniform vec2 g_NitroRanges; // {"material":"ui_editor_properties_bounds","default":"0.3 0.25"} + + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float nitro0 = texSample2D(g_Texture1, v_TexCoordNitro.xy).r; + float nitro1 = texSample2D(g_Texture1, v_TexCoordNitro.zw).r; + float remap = texSample2D(g_Texture1, v_TexCoord.xy).r; + + vec2 noiseBase = g_NitroRanges; + float coreNoise = smoothstep(nitro0, nitro1, 0.1 + remap * 0.8); + float nitro = smoothstep(noiseBase.y, noiseBase.x, nitro0 * nitro1) * smoothstep(noiseBase.x, noiseBase.y, nitro0 * nitro1); + nitro = coreNoise * nitro * 4; + + vec3 nitroColor = mix(g_NitroColor0, g_NitroColor1, nitro); + + float blend = nitro * g_NitroAlpha; +#if MASK == 1 + blend *= texSample2D(g_Texture2, v_TexCoord.zw).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, nitroColor, blend); + +#if WRITEALPHA == 1 + albedo.a = blend; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/nitro/preview/shaders/effects/nitro.vert b/modules/wallpaper-engine/effects/nitro/preview/shaders/effects/nitro.vert new file mode 100644 index 0000000..bc81c90 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/shaders/effects/nitro.vert @@ -0,0 +1,35 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +uniform float g_Time; +uniform vec4 g_NitroSpeeds; // {"material":"ui_editor_properties_speed","default":"-0.1 0.7 0.1 0"} +uniform vec2 g_NitroScales; // {"material":"ui_editor_properties_scale","default":"1 2"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordNitro; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + v_TexCoordNitro.xy = (a_TexCoord + g_Time * g_NitroSpeeds.xy) * g_NitroScales.x; + v_TexCoordNitro.zw = (a_TexCoord + g_Time * g_NitroSpeeds.zw) * g_NitroScales.y; + + v_TexCoordNitro.xz *= aspect; + + v_TexCoordNitro.zw = vec2(-v_TexCoordNitro.w, v_TexCoordNitro.z); + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/nitro/preview/template.json b/modules/wallpaper-engine/effects/nitro/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/nitro/shaders/effects/nitro.frag b/modules/wallpaper-engine/effects/nitro/shaders/effects/nitro.frag new file mode 100644 index 0000000..9bfa86a --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/shaders/effects/nitro.frag @@ -0,0 +1,47 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":22} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordNitro; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_albedo","default":"util/clouds_256"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_NitroAlpha; // {"material":"multiply","label":"ui_editor_properties_multiply","default":1.0,"range":[0.01, 10]} +uniform vec3 g_NitroColor0; // {"material":"colorstart","label":"ui_editor_properties_color_start","default":"0 0.5 1","type":"color"} +uniform vec3 g_NitroColor1; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"1 1 1","type":"color"} +uniform vec2 g_NitroRanges; // {"material":"bounds","label":"ui_editor_properties_bounds","default":"0.3 0.25"} +uniform float g_NitroLOD; // {"material":"smoothness","label":"ui_editor_properties_smoothness","default":1,"range":[0.0, 5]} + + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float nitro0 = texSample2DLod(g_Texture1, v_TexCoordNitro.xy, g_NitroLOD).r; + float nitro1 = texSample2DLod(g_Texture1, v_TexCoordNitro.zw, g_NitroLOD).r; + float remap = texSample2D(g_Texture1, v_TexCoord.xy).r; + + vec2 noiseBase = g_NitroRanges; + float coreNoise = smoothstep(nitro0, nitro1, 0.1 + remap * 0.8); + float nitro = smoothstep(noiseBase.y, noiseBase.x, nitro0 * nitro1) * smoothstep(noiseBase.x, noiseBase.y, nitro0 * nitro1); + nitro = coreNoise * nitro * 4; + + vec3 nitroColor = mix(g_NitroColor0, g_NitroColor1, nitro); + + float blend = nitro * g_NitroAlpha; +#if MASK + blend *= texSample2D(g_Texture2, v_TexCoord.zw).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, nitroColor, blend); + +#if WRITEALPHA + albedo.a = blend; +#endif + + gl_FragColor = vec4(max(0, albedo.rgb), albedo.a); +} diff --git a/modules/wallpaper-engine/effects/nitro/shaders/effects/nitro.vert b/modules/wallpaper-engine/effects/nitro/shaders/effects/nitro.vert new file mode 100644 index 0000000..6141341 --- /dev/null +++ b/modules/wallpaper-engine/effects/nitro/shaders/effects/nitro.vert @@ -0,0 +1,35 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +uniform float g_Time; +uniform vec4 g_NitroSpeeds; // {"material":"speed","label":"ui_editor_properties_speed","default":"-0.1 0.7 0.1 -0.5"} +uniform vec2 g_NitroScales; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 2"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordNitro; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + v_TexCoordNitro.xy = (a_TexCoord * g_NitroScales.x + g_Time * g_NitroSpeeds.xy); + v_TexCoordNitro.zw = (a_TexCoord * g_NitroScales.y + g_Time * g_NitroSpeeds.zw); + + v_TexCoordNitro.xz *= aspect; + + v_TexCoordNitro.zw = vec2(-v_TexCoordNitro.w, v_TexCoordNitro.z); + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/opacity/effect.json b/modules/wallpaper-engine/effects/opacity/effect.json new file mode 100644 index 0000000..75b56f9 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "opacity", + "name" : "ui_editor_effect_opacity_title", + "description" : "ui_editor_effect_opacity_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/opacity.json" + } + ], + "dependencies" : + [ + "materials/effects/opacity.json", + "shaders/effects/opacity.frag", + "shaders/effects/opacity.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/materials/effects/opacity.json b/modules/wallpaper-engine/effects/opacity/materials/effects/opacity.json new file mode 100644 index 0000000..01b5699 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/materials/effects/opacity.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/opacity", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/opacity/preview/effects/opacity/effect.json b/modules/wallpaper-engine/effects/opacity/preview/effects/opacity/effect.json new file mode 100644 index 0000000..74072a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/effects/opacity/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Opacity", + "description" : "Adds a translucency mask to the image.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/opacity.json" + } + ], + "dependencies" : + [ + "materials/effects/opacity.json", + "shaders/effects/opacity.frag", + "shaders/effects/opacity.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/materials/effects/opacity.json b/modules/wallpaper-engine/effects/opacity/preview/materials/effects/opacity.json new file mode 100644 index 0000000..01b5699 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/materials/effects/opacity.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/opacity", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/opacity/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex b/modules/wallpaper-engine/effects/opacity/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex new file mode 100644 index 0000000..b6a5193 Binary files /dev/null and b/modules/wallpaper-engine/effects/opacity/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex differ diff --git a/modules/wallpaper-engine/effects/opacity/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json b/modules/wallpaper-engine/effects/opacity/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/opacity/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/project.json b/modules/wallpaper-engine/effects/opacity/preview/project.json new file mode 100644 index 0000000..16c03e9 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewopacity", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/scene.json b/modules/wallpaper-engine/effects/opacity/preview/scene.json new file mode 100644 index 0000000..780a82a --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/scene.json @@ -0,0 +1,56 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/opacity/effect.json", + "passes" : + [ + { + "constantshadervalues" : null, + "textures" : [ null, "masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173" ] + } + ] + } + ], + "id" : 74, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/preview/shaders/effects/opacity.frag b/modules/wallpaper-engine/effects/opacity/preview/shaders/effects/opacity.frag new file mode 100644 index 0000000..b0f7360 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/shaders/effects/opacity.frag @@ -0,0 +1,13 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo.a *= mask; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/opacity/preview/shaders/effects/opacity.vert b/modules/wallpaper-engine/effects/opacity/preview/shaders/effects/opacity.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/shaders/effects/opacity.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/opacity/preview/template.json b/modules/wallpaper-engine/effects/opacity/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/opacity/shaders/effects/opacity.frag b/modules/wallpaper-engine/effects/opacity/shaders/effects/opacity.frag new file mode 100644 index 0000000..cad1eb8 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/shaders/effects/opacity.frag @@ -0,0 +1,19 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_UserAlpha; // {"material":"alpha","label":"ui_editor_properties_alpha","default":1.0,"range":[0.01, 1]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + albedo.a *= mask * g_UserAlpha; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/opacity/shaders/effects/opacity.vert b/modules/wallpaper-engine/effects/opacity/shaders/effects/opacity.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/opacity/shaders/effects/opacity.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/perspective/effect.json b/modules/wallpaper-engine/effects/perspective/effect.json new file mode 100644 index 0000000..8e7d495 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 2, + "replacementkey" : "perspective", + "name" : "ui_editor_effect_perspective_title", + "description" : "ui_editor_effect_perspective_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/perspective.json" + } + ], + "dependencies" : + [ + "materials/effects/perspective.json", + "shaders/effects/perspective.frag", + "shaders/effects/perspective.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/materials/effects/perspective.json b/modules/wallpaper-engine/effects/perspective/materials/effects/perspective.json new file mode 100644 index 0000000..7436af2 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/materials/effects/perspective.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/perspective", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/perspective/preview/effects/perspective/effect.json b/modules/wallpaper-engine/effects/perspective/preview/effects/perspective/effect.json new file mode 100644 index 0000000..db37be1 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/effects/perspective/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Perspective", + "description" : "Applies a perspective distortion.", + "group" : "distort", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/perspective.json" + } + ], + "dependencies" : + [ + "materials/effects/perspective.json", + "shaders/effects/perspective.frag", + "shaders/effects/perspective.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/preview/materials/effects/perspective.json b/modules/wallpaper-engine/effects/perspective/preview/materials/effects/perspective.json new file mode 100644 index 0000000..7436af2 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/materials/effects/perspective.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/perspective", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/perspective/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/perspective/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/preview/project.json b/modules/wallpaper-engine/effects/perspective/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/preview/scene.json b/modules/wallpaper-engine/effects/perspective/preview/scene.json new file mode 100644 index 0000000..a023440 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/scene.json @@ -0,0 +1,70 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/perspective/effect.json", + "passes" : + [ + { + "combos" : + { + "MODE" : 1 + }, + "constantshadervalues" : + { + "Bottom" : -0.0099999997764825821, + "Left" : 0.029999999329447746, + "Right" : 0.31999999284744263, + "Top" : 0.28999999165534973 + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "112.329 121.871 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/preview/shaders/effects/perspective.frag b/modules/wallpaper-engine/effects/perspective/preview/shaders/effects/perspective.frag new file mode 100644 index 0000000..f8b92b3 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/shaders/effects/perspective.frag @@ -0,0 +1,36 @@ + +// [COMBO] {"material":"Repeat","combo":"REPEAT","type":"options","default":1} + +varying vec3 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_Top; // {"material":"Top","default":1,"range":[-1,2]} +uniform float g_Bottom; // {"material":"Bottom","default":1,"range":[-1,2]} +uniform float g_Left; // {"material":"Left","default":1,"range":[-1,2]} +uniform float g_Right; // {"material":"Right","default":1,"range":[-1,2]} + + +void main() { + vec2 texCoord = v_TexCoord.xy / v_TexCoord.z; + +#if MODE == 0 + texCoord -= CAST2(0.5); + //texCoord.x += v_Perspective.x / v_TexCoord.x; + + //texCoord.x *= 1.0 + (1.0 - v_TexCoord.y) * g_Top * (1.0 / (1.0 - v_TexCoord.y)) + + // v_TexCoord.y * g_Bottom; + //texCoord.y *= (1.0 - v_TexCoord.x) * g_Left + + // v_TexCoord.x * g_Right; + texCoord += CAST2(0.5); +#endif + + + +#if REPEAT + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); + + //gl_FragColor = vec4(v_TexCoord.xy, 0, 1); +} diff --git a/modules/wallpaper-engine/effects/perspective/preview/shaders/effects/perspective.vert b/modules/wallpaper-engine/effects/perspective/preview/shaders/effects/perspective.vert new file mode 100644 index 0000000..1311b2b --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/shaders/effects/perspective.vert @@ -0,0 +1,100 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +uniform float g_Top; // {"material":"Top","default":0,"range":[-0.49,0.49]} +uniform float g_Bottom; // {"material":"Bottom","default":0,"range":[-0.49,0.49]} +uniform float g_Left; // {"material":"Left","default":0,"range":[-0.49,0.49]} +uniform float g_Right; // {"material":"Right","default":0,"range":[-0.49,0.49]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec3 v_TexCoord; + + +void main() { + + vec3 position = a_Position; + v_TexCoord.xy = a_TexCoord; + v_TexCoord.z = 1.0; + +#if MODE == 1 + position.x += mix(g_Texture0Resolution.z * g_Top * mix(-1.0, 1.0, step(a_TexCoord.x, 0.5)), + g_Texture0Resolution.z * g_Bottom * mix(-1.0, 1.0, step(a_TexCoord.x, 0.5)), + step(0.5, a_TexCoord.y)); + + position.y += mix(g_Texture0Resolution.w * -g_Left * mix(-1.0, 1.0, step(a_TexCoord.y, 0.5)), + g_Texture0Resolution.w * -g_Right * mix(-1.0, 1.0, step(a_TexCoord.y, 0.5)), + step(0.5, a_TexCoord.x)); + +#endif + + float p3x = g_Top; + float p3y = g_Left; + + float p2x = 1 - g_Top; + float p2y = g_Right; + + float p1x = 1 - g_Bottom; + float p1y = 1 - g_Right; + + float p0x = g_Bottom; + float p0y = 1 - g_Left; + + float ax = p2x - p0x; + float ay = p2y - p0y; + float bx = p3x - p1x; + float by = p3y - p1y; + + float cross = ax * by - ay * bx; + + //if (cross != 0) { + float cy = p0y - p1y; + float cx = p0x - p1x; + + float s = (ax * cy - ay * cx) / cross; + + //if (s > 0 && s < 1) { + float t = (bx * cy - by * cx) / cross; + + //if (t > 0 && t < 1) { + float q0 = 1 / (1 - t); + float q1 = 1 / (1 - s); + float q2 = 1 / t; + float q3 = 1 / s; + + float q = mix( + mix(q3, q2, a_TexCoord.x), + mix(q0, q1, a_TexCoord.x), + a_TexCoord.y + ); + + + v_TexCoord.xy = a_TexCoord; + + #if MODE == 0 + v_TexCoord -= 0.5; + v_TexCoord.x *= 0.5 / (0.5 - mix(g_Top, g_Bottom, step(0.5, a_TexCoord.y))); + v_TexCoord.y *= 0.5 / (0.5 - mix(g_Left, g_Right, step(0.5, a_TexCoord.x))); + v_TexCoord += 0.5; + #endif + + v_TexCoord.xy *= q; + v_TexCoord.z = q; + + + //} + //} + //} + + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + + +} diff --git a/modules/wallpaper-engine/effects/perspective/preview/template.json b/modules/wallpaper-engine/effects/perspective/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/perspective/shaders/effects/perspective.frag b/modules/wallpaper-engine/effects/perspective/shaders/effects/perspective.frag new file mode 100644 index 0000000..bc80e3f --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/shaders/effects/perspective.frag @@ -0,0 +1,22 @@ + +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":0} + +varying vec3 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + vec2 texCoord = v_TexCoord.xy / v_TexCoord.z; + + float mask = step(0.0, v_TexCoord.z); + +#if REPEAT + texCoord = frac(texCoord); +#else + mask *= step(abs(texCoord.x - 0.5), 0.5); + mask *= step(abs(texCoord.y - 0.5), 0.5); +#endif + + gl_FragColor = texSample2D(g_Texture0, texCoord); + gl_FragColor.a *= mask; +} diff --git a/modules/wallpaper-engine/effects/perspective/shaders/effects/perspective.vert b/modules/wallpaper-engine/effects/perspective/shaders/effects/perspective.vert new file mode 100644 index 0000000..3d78bce --- /dev/null +++ b/modules/wallpaper-engine/effects/perspective/shaders/effects/perspective.vert @@ -0,0 +1,23 @@ + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec3 v_TexCoord; + +void main() { + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + + v_TexCoord = mul(vec3(a_TexCoord.xy, 1.0), xform); + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +} diff --git a/modules/wallpaper-engine/effects/pulse/effect.json b/modules/wallpaper-engine/effects/pulse/effect.json new file mode 100644 index 0000000..dc28904 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "pulse", + "name" : "ui_editor_effect_pulse_title", + "description" : "ui_editor_effect_pulse_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/pulse.json" + } + ], + "dependencies" : + [ + "materials/effects/pulse.json", + "shaders/effects/pulse.frag", + "shaders/effects/pulse.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/materials/effects/pulse.json b/modules/wallpaper-engine/effects/pulse/materials/effects/pulse.json new file mode 100644 index 0000000..5c3b7e6 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/materials/effects/pulse.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/pulse", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/blend/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/blend/effect.json new file mode 100644 index 0000000..ea5b72a --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/blend/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Blend", + "description" : "Blend two images or image layers with various blend modes.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blend.json" + } + ], + "dependencies" : + [ + "materials/effects/blend.json", + "shaders/effects/blend.frag", + "shaders/effects/blend.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/blur/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/blur/effect.json new file mode 100644 index 0000000..7b30c9b --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/blur/effect.json @@ -0,0 +1,82 @@ +{ + "name" : "Blur", + "description" : "Apply coarse gaussian blur to the image. Supports an optional mask.", + "group" : "blur", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blur_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/blur_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/blur_downsample4.json", + "materials/effects/blur_gaussian_x.json", + "materials/effects/blur_gaussian_y.json", + "materials/effects/blur_combine.json", + "shaders/effects/blur_downsample4.frag", + "shaders/effects/blur_downsample4.vert", + "shaders/effects/blur_gaussian.frag", + "shaders/effects/blur_gaussian.vert", + "shaders/effects/blur_combine.frag", + "shaders/effects/blur_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/colorkey/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/colorkey/effect.json new file mode 100644 index 0000000..70adb0d --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/colorkey/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Color Key", + "description" : "Mask a part of the image that matches a color of choice.", + "group" : "colorize", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/colorkey.json" + } + ], + "dependencies" : + [ + "materials/effects/colorkey.json", + "shaders/effects/colorkey.frag", + "shaders/effects/colorkey.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/fisheye/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/fisheye/effect.json new file mode 100644 index 0000000..03bb784 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/fisheye/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Fisheye", + "description" : "Adds a fisheye warp.", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/fisheye.json" + } + ], + "dependencies" : + [ + "materials/effects/fisheye.json", + "shaders/effects/fisheye.frag", + "shaders/effects/fisheye.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/localcontrast/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/localcontrast/effect.json new file mode 100644 index 0000000..9b867b9 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/localcontrast/effect.json @@ -0,0 +1,82 @@ +{ + "name" : "Local Contrast", + "description" : "Apply a local contrast enhancement to the image.", + "group" : "enhance", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/localcontrast_downsample4.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_gaussian_x.json", + "target" : "_rt_QuarterCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_gaussian_y.json", + "target" : "_rt_QuarterCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/localcontrast_combine.json", + "bind" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "index" : 0 + }, + { + "name" : "previous", + "index" : 2 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_QuarterCompoBuffer1", + "scale" : 4, + "format" : "rgba8888" + }, + { + "name" : "_rt_QuarterCompoBuffer2", + "scale" : 4, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/localcontrast_downsample4.json", + "materials/effects/localcontrast_gaussian_x.json", + "materials/effects/localcontrast_gaussian_y.json", + "materials/effects/localcontrast_combine.json", + "shaders/effects/localcontrast_downsample4.frag", + "shaders/effects/localcontrast_downsample4.vert", + "shaders/effects/localcontrast_gaussian.frag", + "shaders/effects/localcontrast_gaussian.vert", + "shaders/effects/localcontrast_combine.frag", + "shaders/effects/localcontrast_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/pulse/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/pulse/effect.json new file mode 100644 index 0000000..5a70c59 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/pulse/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Pulse", + "description" : "", + "group" : "animate", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/pulse.json" + } + ], + "dependencies" : + [ + "materials/effects/pulse.json", + "shaders/effects/pulse.frag", + "shaders/effects/pulse.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/effects/tint/effect.json b/modules/wallpaper-engine/effects/pulse/preview/effects/tint/effect.json new file mode 100644 index 0000000..736ae31 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/effects/tint/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Tint", + "description" : "Tint the image with a color of choice.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.json new file mode 100644 index 0000000..d6e337c --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blend.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blend.json new file mode 100644 index 0000000..9f5f5b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blend.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blend", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_combine.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_combine.json new file mode 100644 index 0000000..83b353f --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_downsample4.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_downsample4.json new file mode 100644 index 0000000..32c6e35 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_gaussian_x.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_gaussian_x.json new file mode 100644 index 0000000..68f21bc --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_gaussian_y.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_gaussian_y.json new file mode 100644 index 0000000..4d28184 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/blur_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/blur_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/colorkey.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/colorkey.json new file mode 100644 index 0000000..96b9986 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/colorkey.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/colorkey", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/fisheye.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/fisheye.json new file mode 100644 index 0000000..5bcb296 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/fisheye.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/fisheye", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_combine.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_combine.json new file mode 100644 index 0000000..d828d1d --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_downsample4.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_downsample4.json new file mode 100644 index 0000000..0dbc442 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_downsample4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_downsample4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_gaussian_x.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_gaussian_x.json new file mode 100644 index 0000000..97d1f18 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_gaussian_y.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_gaussian_y.json new file mode 100644 index 0000000..842f673 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/localcontrast_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/localcontrast_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/pulse.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/pulse.json new file mode 100644 index 0000000..5c3b7e6 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/pulse.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/pulse", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/materials/effects/tint.json b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/pulse/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/project.json b/modules/wallpaper-engine/effects/pulse/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/scene.json b/modules/wallpaper-engine/effects/pulse/preview/scene.json new file mode 100644 index 0000000..b35d831 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/scene.json @@ -0,0 +1,140 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/colorkey/effect.json", + "passes" : + [ + { + "combos" : + { + "INVERT" : 1 + }, + "constantshadervalues" : + { + "Color" : "0 0.435294 0.733333", + "Fuzziness" : 0.31999999284744263 + } + } + ] + }, + { + "file" : "effects/tint/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 0 + }, + "constantshadervalues" : + { + "Color" : "1 0 0" + } + } + ] + }, + { + "file" : "effects/pulse/effect.json", + "passes" : + [ + { + "combos" : + { + "PULSEALPHA" : 1, + "PULSECOLOR" : 0 + }, + "constantshadervalues" : + { + "Noise amount" : 0, + "Power" : 1, + "Pulse speed" : 5.869999885559082, + "Tint high" : "1 1 1", + "Tint low" : "0 0 0" + }, + "textures" : [ null, "util/noise" ] + } + ] + } + ], + "id" : 20, + "image" : "models/effectpreview.json", + "name" : "effectpreview", + "origin" : "-160.688 129.964 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "dependencies" : [ 20 ], + "depth" : 1, + "effects" : + [ + { + "file" : "effects/blend/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 0 + }, + "constantshadervalues" : + { + "Multiply" : 2.130000114440918 + }, + "textures" : [ null, "_rt_imageLayerComposite_20_a" ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blend.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blend.frag new file mode 100644 index 0000000..17d5db6 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blend.frag @@ -0,0 +1,31 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform float g_Multiply; // {"material":"Multiply","default":1,"range":[0.0, 10.0]} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Blend texture","mode":"rgbmask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Opacity mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw); + float blend = mask.a * g_Multiply; + +#if OPACITYMASK == 1 + blend *= texSample2D(g_Texture2, v_TexCoordOpacity).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, blend); + + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blend.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blend.vert new file mode 100644 index 0000000..4cb5b5d --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blend.vert @@ -0,0 +1,26 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture2Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_combine.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_combine.frag new file mode 100644 index 0000000..42b3758 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_combine.frag @@ -0,0 +1,27 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Prev","hidden":true} + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +void main() { + + vec2 blurredCoords = v_TexCoord.xy; + +#ifdef HLSL_SM30 + blurredCoords += 0.75 / g_Texture0Resolution.zw; +#endif + + vec4 blurred = texSample2D(g_Texture0, blurredCoords); + vec4 albedoOld = texSample2D(g_Texture2, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + + blurred = mix(albedoOld, blurred, mask); + + gl_FragColor = blurred; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_combine.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_downsample4.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_downsample4.frag new file mode 100644 index 0000000..04ba005 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_downsample4.frag @@ -0,0 +1,19 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + + float weight = 0.0; + vec4 result = CAST4(0.0); + for (int i = 0; i < 4; ++i) + { + vec4 sample = texSample2D(g_Texture0, v_TexCoord[i]); + result += sample * sample.a; + weight += sample.a; + } + + gl_FragColor.rgb = result.rgb / max(0.001, weight); + gl_FragColor.a = result.a / 4.0; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_downsample4.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_downsample4.vert new file mode 100644 index 0000000..6a0b944 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_downsample4.vert @@ -0,0 +1,17 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord[4]; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.zw; + v_TexCoord[0] = a_TexCoord - offsets; + v_TexCoord[1] = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord[2] = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord[3] = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_gaussian.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_gaussian.frag new file mode 100644 index 0000000..0212a97 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_gaussian.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_gaussian.vert new file mode 100644 index 0000000..c762d04 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/blur_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/colorkey.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/colorkey.frag new file mode 100644 index 0000000..e6acc48 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/colorkey.frag @@ -0,0 +1,26 @@ + +// [COMBO] {"material":"Invert","combo":"INVERT","type":"options","default":0} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_KeyAlpha; // {"material":"Write alpha","default":0,"range":[0,1]} +uniform float g_KeyFuzz; // {"material":"Fuzziness","default":0,"range":[0,1]} +uniform float g_KeyTolerance; // {"material":"Tolerance","default":0.1,"range":[0,1]} +uniform vec3 g_KeyColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + float delta = length(g_KeyColor - albedo.rgb); // [0, SQRT_3] + float blend = smoothstep(0.001, 0.002 + g_KeyFuzz, delta - g_KeyTolerance); + +#if INVERT == 1 + blend = 1.0 - blend; +#endif + + albedo.a *= mix(g_KeyAlpha, 1.0, blend); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/colorkey.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/colorkey.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/colorkey.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/fisheye.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/fisheye.frag new file mode 100644 index 0000000..d5abadf --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/fisheye.frag @@ -0,0 +1,46 @@ + +// [COMBO] {"material":"Background","combo":"BACKGROUND","type":"options","default":1} + +#include "common.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_Size; // {"material":"Size","default":1,"range":[0.01, 1]} +uniform float g_Scale; // {"material":"Distortion","default":1,"range":[0, 2.5]} +uniform vec2 g_Center; // {"material":"Center","default":"0.5 0.5"} + +void main() { + //vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + float aperture = 178.0; + float apertureHalf = 0.5 * aperture * (M_PI / 180.0); + float maxFactor = sin(apertureHalf); + + vec2 uv; + vec2 xy = (v_TexCoord.xy - g_Center) * 2.0 / g_Size; + float d = length(xy); + float alpha = 1.0; + if (d < (2.0 - maxFactor)) + { + d = length(xy * maxFactor); + float z = sqrt(1.0 - d * d); + float r = atan2(d, z) / M_PI; + float phi = atan2(xy.y, xy.x); + + uv.x = r * cos(phi) * g_Size + g_Center.x; + uv.y = r * sin(phi) * g_Size + g_Center.y; + } + else + { + uv = v_TexCoord.xy; +#if BACKGROUND == 0 + alpha = 0.0; +#endif + } + + vec4 albedo = texSample2D(g_Texture0, mix(v_TexCoord.xy, uv, g_Scale)); + albedo.a *= alpha; + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/fisheye.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/fisheye.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/fisheye.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_combine.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_combine.frag new file mode 100644 index 0000000..4d4f2b4 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_combine.frag @@ -0,0 +1,37 @@ + +// [COMBO] {"material":"Greyscale","combo":"GREYSCALE","type":"options","default":0} + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Prev","hidden":true} + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +uniform float g_Amount; // {"material":"Strength","default":1.0,"range":[0.01, 5]} + +void main() { + + vec2 blurredCoords = v_TexCoord.xy; + +#ifdef HLSL_SM30 + blurredCoords += 0.75 / g_Texture0Resolution.zw; +#endif + + vec4 blurred = texSample2D(g_Texture0, blurredCoords); + vec4 albedo = texSample2D(g_Texture2, v_TexCoord.xy); + + vec3 delta = albedo.rgb - blurred.rgb; +#if GREYSCALE == 1 + delta = CAST3(dot(vec3(0.11, 0.59, 0.3), delta)); +#endif + vec3 enhanced = albedo.rgb + delta * g_Amount; + + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo.rgb = mix(albedo.rgb, enhanced.rgb, mask); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_combine.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_combine.vert new file mode 100644 index 0000000..8b90f2d --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_combine.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_downsample4.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_downsample4.frag new file mode 100644 index 0000000..04ba005 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_downsample4.frag @@ -0,0 +1,19 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + + float weight = 0.0; + vec4 result = CAST4(0.0); + for (int i = 0; i < 4; ++i) + { + vec4 sample = texSample2D(g_Texture0, v_TexCoord[i]); + result += sample * sample.a; + weight += sample.a; + } + + gl_FragColor.rgb = result.rgb / max(0.001, weight); + gl_FragColor.a = result.a / 4.0; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_downsample4.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_downsample4.vert new file mode 100644 index 0000000..6a0b944 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_downsample4.vert @@ -0,0 +1,17 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord[4]; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + vec2 offsets = 1.0 / g_Texture0Resolution.zw; + v_TexCoord[0] = a_TexCoord - offsets; + v_TexCoord[1] = a_TexCoord + vec2(offsets.x, -offsets.y); + v_TexCoord[2] = a_TexCoord + vec2(-offsets.x, offsets.y); + v_TexCoord[3] = a_TexCoord + offsets; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_gaussian.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_gaussian.frag new file mode 100644 index 0000000..0212a97 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_gaussian.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_gaussian.vert new file mode 100644 index 0000000..c762d04 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/localcontrast_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"Kernel size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/pulse.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/pulse.frag new file mode 100644 index 0000000..d3ba0dd --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/pulse.frag @@ -0,0 +1,48 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":9} +// [COMBO] {"material":"Pulse alpha","combo":"PULSEALPHA","type":"options","default":0} +// [COMBO] {"material":"Pulse color","combo":"PULSECOLOR","type":"options","default":1} + +#include "common_blending.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Noise","default":"util/noise"} +uniform float g_Time; + +uniform float g_PulseSpeed; // {"material":"Pulse speed","default":3,"range":[0,10]} +uniform float g_PulseAmount; // {"material":"Pulse amount","default":1,"range":[0,2]} +uniform vec2 g_PulseThresholds; // {"material":"Pulse bounds","default":"0 1"} + +uniform float g_NoiseSpeed; // {"material":"Noise speed","default":0.1,"range":[0,0.5]} +uniform float g_NoiseAmount; // {"material":"Noise amount","default":0,"range":[0,2]} + +uniform float g_Power; // {"material":"Power","default":1,"range":[0,4]} +uniform vec3 g_TintColor1; // {"material":"Tint low", "type": "color", "default":"1 1 1"} +uniform vec3 g_TintColor2; // {"material":"Tint high", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + //float delta = length(g_KeyColor - albedo.rgb); // [0, SQRT_3] + //float blend = smoothstep(0.001, 0.002 + g_KeyFuzz, delta - g_KeyTolerance); + //albedo.a *= mix(g_KeyAlpha, 1.0, blend); + + float pulse = smoothstep(g_PulseThresholds.x, g_PulseThresholds.y, sin(g_Time * g_PulseSpeed) * 0.5 + 0.5) * g_PulseAmount; + float noise = texSample2D(g_Texture1, vec2(g_Time, g_Time * 0.333) * g_NoiseSpeed).r * g_NoiseAmount; + + pulse += noise; + pulse = pow(pulse, g_Power); + +#if PULSECOLOR + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb * g_TintColor1, albedo.rgb * g_TintColor2, pulse); +#endif + +#if PULSEALPHA + albedo.a *= pulse; +#endif + + + gl_FragColor = saturate(albedo); +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/pulse.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/pulse.vert new file mode 100644 index 0000000..18f1bb1 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/pulse.vert @@ -0,0 +1,13 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/tint.frag new file mode 100644 index 0000000..7ec87bb --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/tint.frag @@ -0,0 +1,19 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_BlendAlpha; // {"material":"Alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, g_BlendAlpha); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/tint.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/shaders/effects/tint.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/pulse/preview/template.json b/modules/wallpaper-engine/effects/pulse/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/pulse/shaders/effects/pulse.frag b/modules/wallpaper-engine/effects/pulse/shaders/effects/pulse.frag new file mode 100644 index 0000000..1dfd1ec --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/shaders/effects/pulse.frag @@ -0,0 +1,59 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":9} +// [COMBO] {"material":"ui_editor_properties_pulse_alpha","combo":"PULSEALPHA","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_pulse_color","combo":"PULSECOLOR","type":"options","default":1} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +varying float v_Pulse; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_Time; + +uniform float g_PulseSpeed; // {"material":"speed","label":"ui_editor_properties_pulse_speed","default":3,"range":[0,10]} +uniform float g_PulsePhase; // {"material":"phase","label":"ui_editor_properties_pulse_phase","default":0,"range":[0,6.282]} +uniform float g_PulseAmount; // {"material":"amount","label":"ui_editor_properties_pulse_amount","default":1,"range":[0,2]} +uniform vec2 g_PulseThresholds; // {"material":"bounds","label":"ui_editor_properties_pulse_bounds","default":"0 1"} + +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":0.5,"range":[0,1.0]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0,"range":[0,2]} + +uniform float g_Power; // {"material":"power","label":"ui_editor_properties_power","default":1,"range":[0,4]} +uniform vec3 g_TintColor1; // {"material":"tintlow","label":"ui_editor_properties_tint_low", "type": "color", "default":"1 1 1"} +uniform vec3 g_TintColor2; // {"material":"tinthigh","label":"ui_editor_properties_tint_high", "type": "color", "default":"1 1 1"} + +void main() { + vec4 sample = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 albedo = sample; + float pulse = 0.0; + + pulse = v_Pulse; + +#if AUDIOPROCESSING == 0 + pulse = smoothstep(g_PulseThresholds.x, g_PulseThresholds.y, sin(g_Time * g_PulseSpeed + (g_PulsePhase - 1.57079632679)) * 0.5 + 0.5) * g_PulseAmount; + float noise = texSample2D(g_Texture1, vec2(g_Time * 0.08333333, g_Time * 0.02777777) * g_NoiseSpeed).r * g_NoiseAmount; + + pulse += noise; + pulse = pow(pulse, g_Power); +#endif + +#if PULSECOLOR + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb * g_TintColor1, albedo.rgb * g_TintColor2, pulse); +#endif + +#if PULSEALPHA + albedo.a *= pulse; +#endif + +#if MASK + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; + albedo = mix(sample, albedo, mask); +#endif + + gl_FragColor = vec4(max(CAST3(0), albedo.rgb), albedo.a); +} diff --git a/modules/wallpaper-engine/effects/pulse/shaders/effects/pulse.vert b/modules/wallpaper-engine/effects/pulse/shaders/effects/pulse.vert new file mode 100644 index 0000000..1aa8a20 --- /dev/null +++ b/modules/wallpaper-engine/effects/pulse/shaders/effects/pulse.vert @@ -0,0 +1,83 @@ + +// [COMBO] {"material":"ui_editor_properties_audio_response","combo":"AUDIOPROCESSING","type":"audioprocessingoptions","default":0} + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if MASK +uniform vec4 g_Texture2Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying float v_Pulse; + +uniform float g_Time; + +uniform vec2 g_PulseThresholds; // {"material":"bounds","label":"ui_editor_properties_pulse_bounds","default":"0 1"} +uniform float g_PulseSpeed; // {"material":"speed","label":"ui_editor_properties_pulse_speed","default":3,"range":[0,10]} +uniform float g_PulsePhase; // {"material":"phase","label":"ui_editor_properties_time_offset","default":0,"range":[0,1]} +uniform float g_PulseAmount; // {"material":"amount","label":"ui_editor_properties_pulse_amount","default":1,"range":[0,2]} + +#if AUDIOPROCESSING +uniform float g_AudioSpectrum16Left[16]; +uniform float g_AudioSpectrum16Right[16]; + +uniform float g_AudioFrequencyMin; // {"material":"frequencymin","label":"ui_editor_properties_frequency_min","default":0,"int":true,"range":[0,15]} +uniform float g_AudioFrequencyMax; // {"material":"frequencymax","label":"ui_editor_properties_frequency_max","default":1,"int":true,"range":[0,15]} +uniform float g_AudioPower; // {"material":"audioexponent","label":"ui_editor_properties_audio_exponent","default":1.0,"range":[0,4]} +uniform vec2 g_AudioBounds; // {"material":"audiobounds","label":"ui_editor_properties_audio_bounds","default":"0.5 1.0"} +uniform float g_AudioMultiply; // {"material":"audioamount","label":"ui_editor_properties_audio_amount","default":1,"range":[0,2]} + +float CreateAudioResponse(float bufferLeft[16], float bufferRight[16]) +{ + float audioFrequencyEnd = max(g_AudioFrequencyMin, g_AudioFrequencyMax); + float audioResponse = 0.0; + +#if AUDIOPROCESSING == 1 + for (int a = int(g_AudioFrequencyMin); a <= int(g_AudioFrequencyMax); ++a) + { + audioResponse += bufferLeft[a]; + } + audioResponse /= (g_AudioFrequencyMax - g_AudioFrequencyMin + 1.0); +#endif +#if AUDIOPROCESSING == 2 + for (int a = int(g_AudioFrequencyMin); a <= int(g_AudioFrequencyMax); ++a) + { + audioResponse += bufferRight[a]; + } + audioResponse /= (g_AudioFrequencyMax - g_AudioFrequencyMin + 1.0); +#endif +#if AUDIOPROCESSING == 3 + for (int a = int(g_AudioFrequencyMin); a <= int(g_AudioFrequencyMax); ++a) + { + audioResponse += bufferLeft[a]; + audioResponse += bufferRight[a]; + } + audioResponse /= (g_AudioFrequencyMax - g_AudioFrequencyMin + 1.0) * 2.0; +#endif + + audioResponse = smoothstep(g_AudioBounds.x, g_AudioBounds.y, audioResponse); + audioResponse = saturate(pow(audioResponse, g_AudioPower)) * g_AudioMultiply; + return audioResponse; +} +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + +#if AUDIOPROCESSING + v_Pulse = CreateAudioResponse(g_AudioSpectrum16Left, g_AudioSpectrum16Right); +#else + v_Pulse = smoothstep(g_PulseThresholds.x, g_PulseThresholds.y, + sin(g_Time * g_PulseSpeed + (g_PulsePhase - 0.25) * 6.28318530718) * 0.5 + 0.5) * g_PulseAmount; +#endif +} diff --git a/modules/wallpaper-engine/effects/reflection/effect.json b/modules/wallpaper-engine/effects/reflection/effect.json new file mode 100644 index 0000000..fc04a45 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/effect.json @@ -0,0 +1,37 @@ +{ + "version" : 1, + "replacementkey" : "reflection", + "name" : "ui_editor_effect_reflection_title", + "description" : "ui_editor_effect_reflection_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/reflection.json" + } + ], + "dependencies" : + [ + "materials/effects/reflection.json", + "shaders/effects/reflection.frag", + "shaders/effects/reflection.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "condition" : + { + "PERSPECTIVE" : 1 + }, + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/materials/effects/reflection.json b/modules/wallpaper-engine/effects/reflection/materials/effects/reflection.json new file mode 100644 index 0000000..505ccae --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/materials/effects/reflection.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/reflection", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/effects/reflection/effect.json b/modules/wallpaper-engine/effects/reflection/preview/effects/reflection/effect.json new file mode 100644 index 0000000..2ab91fb --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/effects/reflection/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Reflection", + "description" : "Adds a reflection effect to the image. Draw a mask to define where the reflection should appear.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/reflection.json" + } + ], + "dependencies" : + [ + "materials/effects/reflection.json", + "shaders/effects/reflection.frag", + "shaders/effects/reflection.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/effects/waterripple/effect.json b/modules/wallpaper-engine/effects/reflection/preview/effects/waterripple/effect.json new file mode 100644 index 0000000..53057eb --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/effects/waterripple/effect.json @@ -0,0 +1,20 @@ +{ + "name" : "Water Ripple", + "description" : "Adds a ripple animation. Draw a mask to limit the animation to a specific area of the image.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterripple.json" + } + ], + "dependencies" : + [ + "materials/effects/waterripple.json", + "materials/effects/waterripplenormal.png", + "materials/effects/waterripplenormal.tex-json", + "shaders/effects/waterripple.frag", + "shaders/effects/waterripple.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effects/reflection.json b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/reflection.json new file mode 100644 index 0000000..505ccae --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/reflection.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/reflection", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripple.json b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripple.json new file mode 100644 index 0000000..f8ce172 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripple.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/waterripple", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures": [null, "effects/waterripplenormal"] + }] +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripplenormal.tex b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripplenormal.tex new file mode 100644 index 0000000..87542cd Binary files /dev/null and b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripplenormal.tex differ diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripplenormal.tex-json b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripplenormal.tex-json new file mode 100644 index 0000000..89e82a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/effects/waterripplenormal.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..18acf23 Binary files /dev/null and b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..05b694a Binary files /dev/null and b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/reflection/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/reflection/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/project.json b/modules/wallpaper-engine/effects/reflection/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/scene.json b/modules/wallpaper-engine/effects/reflection/preview/scene.json new file mode 100644 index 0000000..ae9aee7 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/scene.json @@ -0,0 +1,94 @@ +{ + "camera" : + { + "center" : "0.000 0.000 0.000", + "eye" : "0.000 0.000 1.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.675 193.939 0.000", + "scale" : "0.405 0.405 1.000" + }, + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/reflection/effect.json", + "passes" : + [ + { + "combos" : null, + "constantshadervalues" : + { + "Additive" : 0, + "Offset" : 0.070000000298023224 + }, + "textures" : + [ + null, + "masks/reflection_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" + ] + } + ] + }, + { + "file" : "effects/waterripple/effect.json", + "passes" : + [ + { + "combos" : null, + "constantshadervalues" : + { + "Ripple strength" : 0.070000000298023224, + "Scroll speed" : 0.23000000417232513 + }, + "textures" : + [ + null, + "effects/waterripplenormal", + "masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" + ] + } + ] + } + ], + "id" : 15, + "image" : "models/util/fullscreenlayer.json", + "name" : "Fullscreen", + "origin" : "0.000 0.000 0.000", + "scale" : "0.802 0.802 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/reflection.frag b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/reflection.frag new file mode 100644 index 0000000..ca52c9a --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/reflection.frag @@ -0,0 +1,16 @@ + +varying vec4 v_TexCoord; +varying vec2 v_ReflectedCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/black"} + +uniform float g_Additive; // {"material":"Additive","default":1,"range":[0,1]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 reflected = texSample2D(g_Texture0, v_ReflectedCoord); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + + gl_FragColor = mix(mix(albedo, reflected, mask), albedo + reflected * mask, g_Additive); +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/reflection.vert b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/reflection.vert new file mode 100644 index 0000000..994f528 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/reflection.vert @@ -0,0 +1,29 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +uniform float g_Direction; // {"material":"Direction","default":0,"range":[0,6.28]} +uniform float g_ReflectionOffset; // {"material":"Offset","default":0.0,"range":[-1,1]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_ReflectedCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + + vec2 center = vec2(0.5, 0.5); + vec2 delta = a_TexCoord - center; + delta.y += g_ReflectionOffset; + delta.y = -delta.y; + + delta = rotateVec2(delta, g_Direction); + v_ReflectedCoord = center + delta; +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/waterripple.frag b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/waterripple.frag new file mode 100644 index 0000000..b5a8518 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/waterripple.frag @@ -0,0 +1,26 @@ + +varying vec4 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Water normal"} +uniform sampler2D g_Texture2; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +uniform float g_Strength; // {"material":"Ripple strength","default":0.1,"range":[0,1]} + +varying vec4 v_TexCoordRipple; + +void main() { + vec2 texCoord = v_TexCoord.xy; + + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; + + vec3 n1 = texSample2D(g_Texture1, v_TexCoordRipple.xy).xyz * 2 - 1; + vec3 n2 = texSample2D(g_Texture1, v_TexCoordRipple.zw).xyz * 2 - 1; + vec3 normal = normalize(vec3(n1.xy + n2.xy, n1.z)); + + + texCoord.xy += normal.xy * g_Strength * g_Strength * mask; + + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/waterripple.vert b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/waterripple.vert new file mode 100644 index 0000000..97c2de9 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/shaders/effects/waterripple.vert @@ -0,0 +1,41 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture2Resolution; + +uniform float g_AnimationSpeed; // {"material":"Animation speed","default":0.15,"range":[0,0.5]} +uniform float g_Scale; // {"material":"Ripple scale","default":1,"range":[0,10]} +uniform float g_ScrollSpeed; // {"material":"Scroll speed","default":0,"range":[0,0.5]} +uniform float g_Direction; // {"material":"Scroll direction","default":0,"range":[0,6.28]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordRipple; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + + float piFrac = 0.78539816339744830961566084581988 * 0.5; + float pi = 3.141; + + vec2 coordsRotated = v_TexCoord.xy; + vec2 coordsRotated2 = v_TexCoord.xy * 1.333; + + vec2 scroll = rotateVec2(vec2(0, -1), g_Direction) * g_ScrollSpeed * g_ScrollSpeed * g_Time; + + v_TexCoordRipple.xy = coordsRotated + g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + v_TexCoordRipple.zw = coordsRotated2 - g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + v_TexCoordRipple *= g_Scale; + + float rippleTextureAdjustment = (g_Texture0Resolution.x / g_Texture0Resolution.y); + v_TexCoordRipple.xz *= rippleTextureAdjustment; + + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/reflection/preview/template.json b/modules/wallpaper-engine/effects/reflection/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/reflection/shaders/effects/reflection.frag b/modules/wallpaper-engine/effects/reflection/shaders/effects/reflection.frag new file mode 100644 index 0000000..9ba04eb --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/shaders/effects/reflection.frag @@ -0,0 +1,46 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":9} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; + +#if PERSPECTIVE == 0 +varying vec2 v_ReflectedCoord; +#else +varying vec3 v_TexCoordPerspective; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_ReflectionAlpha; // {"material":"alpha","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 1]} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + + vec2 reflectedCoord; + +#if PERSPECTIVE == 0 + reflectedCoord = v_ReflectedCoord; +#else + reflectedCoord = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + reflectedCoord.y = 1.0 - reflectedCoord.y; + + mask *= step(abs(reflectedCoord.x - 0.5), 0.5); + mask *= step(abs(reflectedCoord.y - 0.5), 0.5); +#endif + + vec4 reflected = texSample2D(g_Texture0, reflectedCoord); + + //gl_FragColor = mix(mix(albedo, reflected, mask), albedo + reflected * mask, g_Additive); + gl_FragColor.rgb = ApplyBlending(BLENDMODE, albedo.rgb, reflected.rgb, mask * g_ReflectionAlpha); + gl_FragColor.a = min(1.0, albedo.a + reflected.a * mask * g_ReflectionAlpha); +} diff --git a/modules/wallpaper-engine/effects/reflection/shaders/effects/reflection.vert b/modules/wallpaper-engine/effects/reflection/shaders/effects/reflection.vert new file mode 100644 index 0000000..2ff44d0 --- /dev/null +++ b/modules/wallpaper-engine/effects/reflection/shaders/effects/reflection.vert @@ -0,0 +1,50 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if PERSPECTIVE == 0 +varying vec2 v_ReflectedCoord; +uniform float g_Direction; // {"material":"direction","label":"ui_editor_properties_direction","default":0,"range":[0,6.28],"direction":true} +uniform float g_ReflectionOffset; // {"material":"offset","label":"ui_editor_properties_offset","default":0.0,"range":[-1,1]} +#else +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} + +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.z *= g_Texture1Resolution.z / g_Texture1Resolution.x; + v_TexCoord.w *= g_Texture1Resolution.w / g_Texture1Resolution.y; +#endif + +#if PERSPECTIVE == 0 + vec2 center = vec2(0.5, 0.5); + vec2 delta = a_TexCoord - center; + delta.y += g_ReflectionOffset; + delta.y = -delta.y; + + delta = rotateVec2(delta, g_Direction); + v_ReflectedCoord = center + delta; +#else + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/refraction/effect.json b/modules/wallpaper-engine/effects/refraction/effect.json new file mode 100644 index 0000000..fc59acd --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/effect.json @@ -0,0 +1,26 @@ +{ + "version" : 1, + "replacementkey" : "refract", + "name" : "ui_editor_effect_refract_title", + "description" : "ui_editor_effect_refract_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/util/effectcomposebackground.json", + "compose" : true + }, + { + "material" : "materials/effects/refract.json" + } + ], + "dependencies" : + [ + "materials/effects/refract.json", + "materials/effects/refractnormal.png", + "materials/effects/refractnormal.tex-json", + "shaders/effects/refract.frag", + "shaders/effects/refract.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/materials/effects/refract.json b/modules/wallpaper-engine/effects/refraction/materials/effects/refract.json new file mode 100644 index 0000000..fb5642b --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/materials/effects/refract.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/refract", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures": [null, "effects/refractnormal"] + }] +} diff --git a/modules/wallpaper-engine/effects/refraction/materials/effects/refractnormal.png b/modules/wallpaper-engine/effects/refraction/materials/effects/refractnormal.png new file mode 100644 index 0000000..0f8a365 Binary files /dev/null and b/modules/wallpaper-engine/effects/refraction/materials/effects/refractnormal.png differ diff --git a/modules/wallpaper-engine/effects/refraction/materials/effects/refractnormal.tex-json b/modules/wallpaper-engine/effects/refraction/materials/effects/refractnormal.tex-json new file mode 100644 index 0000000..cc43ffd --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/materials/effects/refractnormal.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rg88n", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/preview/effects/refract/effect.json b/modules/wallpaper-engine/effects/refraction/preview/effects/refract/effect.json new file mode 100644 index 0000000..fc59acd --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/effects/refract/effect.json @@ -0,0 +1,26 @@ +{ + "version" : 1, + "replacementkey" : "refract", + "name" : "ui_editor_effect_refract_title", + "description" : "ui_editor_effect_refract_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/util/effectcomposebackground.json", + "compose" : true + }, + { + "material" : "materials/effects/refract.json" + } + ], + "dependencies" : + [ + "materials/effects/refract.json", + "materials/effects/refractnormal.png", + "materials/effects/refractnormal.tex-json", + "shaders/effects/refract.frag", + "shaders/effects/refract.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/refraction/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/refraction/preview/materials/effectpreview.tex new file mode 100644 index 0000000..55de60a Binary files /dev/null and b/modules/wallpaper-engine/effects/refraction/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/refraction/preview/materials/effects/refract.json b/modules/wallpaper-engine/effects/refraction/preview/materials/effects/refract.json new file mode 100644 index 0000000..5de2fd9 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/materials/effects/refract.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/refract", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures": [null, null, "effects/refractnormal"] + }] +} diff --git a/modules/wallpaper-engine/effects/refraction/preview/materials/effects/refractnormal.tex b/modules/wallpaper-engine/effects/refraction/preview/materials/effects/refractnormal.tex new file mode 100644 index 0000000..fd429c3 Binary files /dev/null and b/modules/wallpaper-engine/effects/refraction/preview/materials/effects/refractnormal.tex differ diff --git a/modules/wallpaper-engine/effects/refraction/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/refraction/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/preview/project.json b/modules/wallpaper-engine/effects/refraction/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/preview/scene.json b/modules/wallpaper-engine/effects/refraction/preview/scene.json new file mode 100644 index 0000000..bc706ea --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/scene.json @@ -0,0 +1,86 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "nearz" : 0.0099999997764825821, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/refract/effect.json", + "id" : 17, + "name" : "", + "passes" : + [ + { + "id" : 18, + "textures" : [ null, "_rt_FullFrameBuffer" ] + }, + { + "constantshadervalues" : + { + "ripplestrength" : 0.23999999999999999, + "scale" : "0.48 0.48" + }, + "id" : 20, + "textures" : [ null, "util/white", "effects/refractnormal" ] + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/preview/shaders/effects/refract.frag b/modules/wallpaper-engine/effects/refraction/preview/shaders/effects/refract.frag new file mode 100644 index 0000000..7f88497 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/shaders/effects/refract.frag @@ -0,0 +1,31 @@ + +#include "common_fragment.h" + +varying vec4 v_TexCoord; +varying vec3 v_RefractTexCoord; + +uniform sampler2D g_Texture0; // {"material":"framebuffer","label":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"mask","label":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"material":"normalmap","label":"ui_editor_properties_normal","default":"","format":"normalmap"} + +void main() { +#if MASK == 1 + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1; +#endif + + vec2 texCoord = v_TexCoord.xy; + vec3 normal = DecompressNormal(texSample2D(g_Texture2, v_RefractTexCoord.xy)); + + texCoord.xy += normal.xy * v_RefractTexCoord.z * mask; + + vec4 albedo = texSample2D(g_Texture0, texCoord.xy); + + //vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * CAST2(0.5) + 0.5; + //vec4 bg = texSample2D(g_Texture3, screenCoord.xy); + //albedo.rgb = mix(bg.rgb, albedo.rgb, albedo.a); + //albedo.a = 1; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/refraction/preview/shaders/effects/refract.vert b/modules/wallpaper-engine/effects/refraction/preview/shaders/effects/refract.vert new file mode 100644 index 0000000..05a209b --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/shaders/effects/refract.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_ripple_scale","linked":true,"default":"1 1","range":[0,10]} +uniform float g_Strength; // {"material":"ripplestrength","label":"ui_editor_properties_strength","default":0.1,"range":[-1,1]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec3 v_RefractTexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_RefractTexCoord.xy = a_TexCoord * g_Scale; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + v_RefractTexCoord.z = sign(g_Strength) * g_Strength * g_Strength; +} diff --git a/modules/wallpaper-engine/effects/refraction/preview/template.json b/modules/wallpaper-engine/effects/refraction/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/refraction/shaders/effects/refract.frag b/modules/wallpaper-engine/effects/refraction/shaders/effects/refract.frag new file mode 100644 index 0000000..4f4b4a0 --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/shaders/effects/refract.frag @@ -0,0 +1,31 @@ + +#include "common_fragment.h" + +varying vec4 v_TexCoord; +varying vec3 v_RefractTexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal","default":"","format":"normalmap","formatcombo":true} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +void main() { +#if MASK + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; +#else + float mask = 1; +#endif + + vec2 texCoord = v_TexCoord.xy; + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_RefractTexCoord.xy)); + + texCoord.xy += normal.xy * v_RefractTexCoord.z * mask; + + vec4 albedo = texSample2D(g_Texture0, texCoord.xy); + + //vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * CAST2(0.5) + 0.5; + //vec4 bg = texSample2D(g_Texture3, screenCoord.xy); + //albedo.rgb = mix(bg.rgb, albedo.rgb, albedo.a); + //albedo.a = 1; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/refraction/shaders/effects/refract.vert b/modules/wallpaper-engine/effects/refraction/shaders/effects/refract.vert new file mode 100644 index 0000000..454ef2a --- /dev/null +++ b/modules/wallpaper-engine/effects/refraction/shaders/effects/refract.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture2Resolution; + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","linked":true,"default":"1 1","range":[0,10]} +uniform float g_Strength; // {"material":"strength","label":"ui_editor_properties_strength","default":0.1,"range":[-1,1]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec3 v_RefractTexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_RefractTexCoord.xy = a_TexCoord * g_Scale; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); + v_RefractTexCoord.z = sign(g_Strength) * g_Strength * g_Strength; +} diff --git a/modules/wallpaper-engine/effects/scroll/effect.json b/modules/wallpaper-engine/effects/scroll/effect.json new file mode 100644 index 0000000..c083f7b --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "scroll", + "name" : "ui_editor_effect_scroll_title", + "description" : "ui_editor_effect_scroll_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/scroll.json" + } + ], + "dependencies" : + [ + "materials/effects/scroll.json", + "shaders/effects/scroll.frag", + "shaders/effects/scroll.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/materials/effects/scroll.json b/modules/wallpaper-engine/effects/scroll/materials/effects/scroll.json new file mode 100644 index 0000000..7471904 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/materials/effects/scroll.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/scroll", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/scroll/preview/effects/scroll/effect.json b/modules/wallpaper-engine/effects/scroll/preview/effects/scroll/effect.json new file mode 100644 index 0000000..d27b289 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/effects/scroll/effect.json @@ -0,0 +1,17 @@ +{ + "name" : "Scroll", + "description" : "Scrolls the image horizontally or vertically.", + "group" : "image", + "passes" : + [ + { + "material" : "materials/effects/scroll.json" + } + ], + "dependencies" : + [ + "materials/effects/scroll.json", + "shaders/effects/scroll.frag", + "shaders/effects/scroll.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/preview/materials/effects/scroll.json b/modules/wallpaper-engine/effects/scroll/preview/materials/effects/scroll.json new file mode 100644 index 0000000..f816c72 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/materials/effects/scroll.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "effects/scroll", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled" + }] +} diff --git a/modules/wallpaper-engine/effects/scroll/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/scroll/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/preview/project.json b/modules/wallpaper-engine/effects/scroll/preview/project.json new file mode 100644 index 0000000..6f9e7d7 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "fxpreviewscroll", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/preview/scene.json b/modules/wallpaper-engine/effects/scroll/preview/scene.json new file mode 100644 index 0000000..d72a94a --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/scene.json @@ -0,0 +1,59 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.65000000000000002, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000000000001, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7019607843137254 0.7019607843137254 0.7019607843137254", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/scroll/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Speed X" : 0.5, + "Speed Y" : 0 + } + } + ] + } + ], + "id" : 48, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/scroll/preview/shaders/effects/scroll.frag b/modules/wallpaper-engine/effects/scroll/preview/shaders/effects/scroll.frag new file mode 100644 index 0000000..3aed35f --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/shaders/effects/scroll.frag @@ -0,0 +1,10 @@ + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = frac(v_TexCoord + v_Scroll); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/scroll/preview/shaders/effects/scroll.vert b/modules/wallpaper-engine/effects/scroll/preview/shaders/effects/scroll.vert new file mode 100644 index 0000000..27fdae7 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/preview/shaders/effects/scroll.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_ScrollX; // {"material":"Speed X","default":0.2,"range":[-2,2]} +uniform float g_ScrollY; // {"material":"Speed Y","default":0.2,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; + + vec2 scroll = vec2(g_ScrollX, g_ScrollY); + scroll = sign(scroll) * pow(vec2(g_ScrollX, g_ScrollY), CAST2(2.0)); + v_Scroll = scroll * g_Time; +} diff --git a/modules/wallpaper-engine/effects/scroll/shaders/effects/scroll.frag b/modules/wallpaper-engine/effects/scroll/shaders/effects/scroll.frag new file mode 100644 index 0000000..6122f05 --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/shaders/effects/scroll.frag @@ -0,0 +1,12 @@ + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"hidden":true} + +uniform vec2 g_Scale; // {"material":"repeat","label":"ui_editor_properties_repeat","default":"1 1","linked":true,"range":[0.01, 10.0]} + +void main() { + vec2 texCoord = frac((v_TexCoord + v_Scroll) * g_Scale); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/scroll/shaders/effects/scroll.vert b/modules/wallpaper-engine/effects/scroll/shaders/effects/scroll.vert new file mode 100644 index 0000000..e00977b --- /dev/null +++ b/modules/wallpaper-engine/effects/scroll/shaders/effects/scroll.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_ScrollX; // {"material":"speedx","label":"ui_editor_properties_speed_x","default":0.2,"range":[-2,2]} +uniform float g_ScrollY; // {"material":"speedy","label":"ui_editor_properties_speed_y","default":0.2,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec2 v_Scroll; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; + + vec2 scroll = vec2(g_ScrollX, g_ScrollY); + scroll = sign(scroll) * pow(vec2(g_ScrollX, g_ScrollY), CAST2(2.0)); + v_Scroll = scroll * g_Time; +} diff --git a/modules/wallpaper-engine/effects/shake/effect.json b/modules/wallpaper-engine/effects/shake/effect.json new file mode 100644 index 0000000..caf707e --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "shake", + "name" : "ui_editor_effect_shake_title", + "description" : "ui_editor_effect_shake_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/shake.json" + } + ], + "dependencies" : + [ + "materials/effects/shake.json", + "shaders/effects/shake.frag", + "shaders/effects/shake.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/materials/effects/shake.json b/modules/wallpaper-engine/effects/shake/materials/effects/shake.json new file mode 100644 index 0000000..1afa0dd --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/materials/effects/shake.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shake", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shake/preview/effects/blend/effect.json b/modules/wallpaper-engine/effects/shake/preview/effects/blend/effect.json new file mode 100644 index 0000000..ea5b72a --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/effects/blend/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Blend", + "description" : "Blend two images or image layers with various blend modes.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/blend.json" + } + ], + "dependencies" : + [ + "materials/effects/blend.json", + "shaders/effects/blend.frag", + "shaders/effects/blend.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/effects/opacity/effect.json b/modules/wallpaper-engine/effects/shake/preview/effects/opacity/effect.json new file mode 100644 index 0000000..41f954b --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/effects/opacity/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Opacity", + "description" : "Adds an opacity mask to the image.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/opacity.json" + } + ], + "dependencies" : + [ + "materials/effects/opacity.json", + "shaders/effects/opacity.frag", + "shaders/effects/opacity.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/effects/shake/effect.json b/modules/wallpaper-engine/effects/shake/preview/effects/shake/effect.json new file mode 100644 index 0000000..35c1b64 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/effects/shake/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Shake", + "description" : "Adds a shake animation. Only masked areas will be affected.", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/shake.json" + } + ], + "dependencies" : + [ + "materials/effects/shake.json", + "shaders/effects/shake.frag", + "shaders/effects/shake.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/effects/tint/effect.json b/modules/wallpaper-engine/effects/shake/preview/effects/tint/effect.json new file mode 100644 index 0000000..736ae31 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/effects/tint/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Tint", + "description" : "Tint the image with a color of choice.", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effects/blend.json b/modules/wallpaper-engine/effects/shake/preview/materials/effects/blend.json new file mode 100644 index 0000000..9f5f5b5 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/effects/blend.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/blend", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effects/opacity.json b/modules/wallpaper-engine/effects/shake/preview/materials/effects/opacity.json new file mode 100644 index 0000000..01b5699 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/effects/opacity.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/opacity", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effects/shake.json b/modules/wallpaper-engine/effects/shake/preview/materials/effects/shake.json new file mode 100644 index 0000000..1afa0dd --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/effects/shake.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shake", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/effects/tint.json b/modules/wallpaper-engine/effects/shake/preview/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d.tex new file mode 100644 index 0000000..2070fba Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex new file mode 100644 index 0000000..4080744 Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74.tex new file mode 100644 index 0000000..379bab7 Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d.tex new file mode 100644 index 0000000..466129d Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096.tex new file mode 100644 index 0000000..f7868b7 Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354.tex new file mode 100644 index 0000000..03fd567 Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9.tex new file mode 100644 index 0000000..d488c84 Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..c7e8347 Binary files /dev/null and b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/materials/masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/shake/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/project.json b/modules/wallpaper-engine/effects/shake/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/scene.json b/modules/wallpaper-engine/effects/shake/preview/scene.json new file mode 100644 index 0000000..39cd9c7 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/scene.json @@ -0,0 +1,186 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/blend/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 0 + }, + "textures" : + [ + null, + "util/white", + "masks/blend_mask_843377ec5689457129ad9ee2dd9c051f084db05d" + ] + } + ] + } + ], + "id" : 34, + "image" : "models/effectpreview.json", + "name" : "effectpreview", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/opacity/effect.json", + "passes" : + [ + { + "textures" : [ null, "masks/opacity_mask_681d95af21112ea41fc4cd51aa49d9c553ef1173" ] + } + ] + }, + { + "file" : "effects/shake/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Strength" : 0.30000001192092896 + }, + "textures" : + [ + null, + "masks/shake_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8", + "masks/shake_mask_ddade403536094982c53ec13507b52893dc373c9" + ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "config" : + { + "passthrough" : true + }, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/shake/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Power" : 0.77999997138977051, + "Speed" : 1, + "Strength" : 0.14000000059604645 + }, + "textures" : + [ + null, + "masks/shake_mask_bdbea347ab7838b0661ae6af118d7d24d301b354", + "masks/shake_mask_15c0e340127e863c97e552f860f4a84c3cb6ab74" + ] + } + ] + } + ], + "id" : 46, + "image" : "models/util/composelayer.json", + "name" : "Compose", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "512.000 512.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "config" : + { + "passthrough" : true + }, + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/shake/effect.json", + "passes" : + [ + { + "textures" : + [ + null, + "masks/shake_mask_2056d10e108144c65bea005697dd88d5b58d3b9d", + "masks/shake_mask_36ce62bcec300a6727192313c920263bc9bc4096" + ] + } + ] + } + ], + "id" : 60, + "image" : "models/util/composelayer.json", + "name" : "Compose", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "512.000 512.000", + "visible" : false + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/blend.frag b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/blend.frag new file mode 100644 index 0000000..17d5db6 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/blend.frag @@ -0,0 +1,31 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform float g_Multiply; // {"material":"Multiply","default":1,"range":[0.0, 10.0]} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Blend texture","mode":"rgbmask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"Opacity mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw); + float blend = mask.a * g_Multiply; + +#if OPACITYMASK == 1 + blend *= texSample2D(g_Texture2, v_TexCoordOpacity).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, blend); + + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/blend.vert b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/blend.vert new file mode 100644 index 0000000..4cb5b5d --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/blend.vert @@ -0,0 +1,26 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture2Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/opacity.frag b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/opacity.frag new file mode 100644 index 0000000..b0f7360 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/opacity.frag @@ -0,0 +1,13 @@ + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + albedo.a *= mask; + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/opacity.vert b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/opacity.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/opacity.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/shake.frag b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/shake.frag new file mode 100644 index 0000000..d16c26d --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/shake.frag @@ -0,0 +1,25 @@ + +varying vec4 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Flow map","mode":"flowmask","default":"util/noflow"} +uniform sampler2D g_Texture2; // {"material":"Flow Phase","mode":"opacitymask","default":"util/white"} +uniform float g_Time; + +uniform float g_Speed; // {"material":"Speed","default":1,"range":[0.01, 10]} +uniform float g_Amp; // {"material":"Strength","default":0.2,"range":[0.01, 1]} +uniform float g_Power; // {"material":"Power","default":1,"range":[0.01, 2]} + +void main() { + + float flowPhase = texSample2D(g_Texture2, v_TexCoord.zw).r * 6.28; + vec2 flowColors = texSample2D(g_Texture1, v_TexCoord.zw).rg; + vec2 flowMask = (flowColors.rg - vec2(0.498, 0.498)) * 2.0; + + float offset = sin(g_Speed * g_Time + flowPhase); + offset = pow(abs(offset), g_Power) * sign(offset); + + vec2 texCoord = v_TexCoord.xy + flowMask * offset * g_Amp * g_Amp; + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/shake.vert b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/shake.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/shake.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/tint.frag new file mode 100644 index 0000000..7ec87bb --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/tint.frag @@ -0,0 +1,19 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_BlendAlpha; // {"material":"Alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, g_BlendAlpha); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/shake/preview/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/tint.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/shaders/effects/tint.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/shake/preview/template.json b/modules/wallpaper-engine/effects/shake/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shake/shaders/effects/shake.frag b/modules/wallpaper-engine/effects/shake/shaders/effects/shake.frag new file mode 100644 index 0000000..b215eac --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/shaders/effects/shake.frag @@ -0,0 +1,90 @@ + +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_direction","combo":"DIRECTION","type":"options","default":0,"options":{"ui_editor_properties_center":0,"ui_editor_properties_left":1,"ui_editor_properties_right":2}} + +#include "common.h" + +varying vec4 v_TexCoord; +varying vec2 v_Bounds; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_shake_direction_map","mode":"flowmask","default":"util/noflow"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_time_offset","mode":"opacitymask","default":"util/black","combo":"TIMEOFFSET"} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity","mode":"opacitymask","combo":"MASK"} +uniform float g_Time; + +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1,"range":[0.0, 10]} +uniform float g_Amp; // {"material":"strength","label":"ui_editor_properties_strength","default":0.1,"range":[0.01, 0.5]} +uniform vec2 g_Friction; // {"material":"friction","label":"ui_editor_properties_friction","default":"1 1","linked":true,"range":[0.01, 10.0]} + +#if AUDIOPROCESSING +varying float v_AudioPulse; +#endif + +#if MASK == 1 +varying vec4 v_TexCoordMask; +#endif + +void main() { + float flowPhase = 0.0; + +#if TIMEOFFSET + flowPhase = texSample2D(g_Texture2, v_TexCoord.zw).r * M_PI_2; +#endif + + vec2 flowColors = texSample2D(g_Texture1, v_TexCoord.zw).rg; + vec2 flowMask = (flowColors.rg - vec2(0.498, 0.498)) * 2.0; + float offset = 0.0; + +#if AUDIOPROCESSING == 0 +#if NOISE + vec4 sines = flowPhase + frac(g_Speed * g_Time / M_PI_2 * vec4(1, -0.16161616, 0.0083333, -0.00019841)) * M_PI_2; + vec4 csines = cos(sines); + sines = sin(sines); + + vec4 base = step(0.0, csines); + sines = sines * 0.498 + 0.5; + sines = mix(1.0 - pow(1.0 - sines, CAST4(g_Friction.x)), pow(sines, CAST4(g_Friction.y)), base); + offset = dot(CAST4(0.5), sines); +#else + float time = g_Speed * g_Time + flowPhase; + offset = sin(frac(time / M_PI_2) * M_PI_2); + offset = offset * 0.498 + 0.5; + float base = step(0.0, cos(time)); + offset = mix(1.0 - pow(1.0 - offset, g_Friction.x), pow(offset, g_Friction.y), base); +#endif + offset = saturate((offset - v_Bounds.x) * v_Bounds.y); +#endif + + +#if DIRECTION == 0 +#if AUDIOPROCESSING + offset += v_AudioPulse; +#else + offset = offset * 2.0 - 1.0; +#endif +#endif + +#if DIRECTION == 1 +#if AUDIOPROCESSING + offset = 1.0 - v_AudioPulse; +#endif +#endif + +#if DIRECTION == 2 +#if AUDIOPROCESSING + offset -= v_AudioPulse; +#else + offset = offset - 1.0; +#endif +#endif + + vec2 texCoordOffset = offset * g_Amp * g_Amp * flowMask; + gl_FragColor = texSample2D(g_Texture0, texCoordOffset + v_TexCoord.xy); + +#if MASK + // Only allow sampling from mask + float mask = texSample2D(g_Texture3, texCoordOffset * v_TexCoordMask.zw + v_TexCoordMask.xy).r; + gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.xy), gl_FragColor, mask); +#endif +} diff --git a/modules/wallpaper-engine/effects/shake/shaders/effects/shake.vert b/modules/wallpaper-engine/effects/shake/shaders/effects/shake.vert new file mode 100644 index 0000000..3bf0a53 --- /dev/null +++ b/modules/wallpaper-engine/effects/shake/shaders/effects/shake.vert @@ -0,0 +1,83 @@ + +// [COMBO] {"material":"ui_editor_properties_audio_response","combo":"AUDIOPROCESSING","type":"audioprocessingoptions","default":0} + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if MASK == 1 +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture3Resolution; +varying vec4 v_TexCoordMask; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec2 g_Bounds; // {"material":"bounds","label":"ui_editor_properties_bounds","default":"0 1"} + +varying vec4 v_TexCoord; +varying vec2 v_Bounds; + +#if AUDIOPROCESSING +varying float v_AudioPulse; +uniform float g_AudioSpectrum16Left[16]; +uniform float g_AudioSpectrum16Right[16]; + +uniform float g_AudioFrequencyMin; // {"material":"frequencymin","label":"ui_editor_properties_frequency_min","default":0,"int":true,"range":[0,15]} +uniform float g_AudioFrequencyMax; // {"material":"frequencymax","label":"ui_editor_properties_frequency_max","default":1,"int":true,"range":[0,15]} +uniform float g_AudioPower; // {"material":"audioexponent","label":"ui_editor_properties_audio_exponent","default":1.0,"range":[0,4]} +uniform vec2 g_AudioBounds; // {"material":"audiobounds","label":"ui_editor_properties_audio_bounds","default":"0.0 1.2"} +uniform float g_AudioMultiply; // {"material":"audioamount","label":"ui_editor_properties_audio_amount","default":1,"range":[0,2]} + +float CreateAudioResponse(float bufferLeft[16], float bufferRight[16]) +{ + float audioFrequencyEnd = max(g_AudioFrequencyMin, g_AudioFrequencyMax); + float audioResponse = 0.0; + +#if AUDIOPROCESSING == 1 + for (int a = int(g_AudioFrequencyMin); a <= int(g_AudioFrequencyMax); ++a) + { + audioResponse += bufferLeft[a]; + } + audioResponse /= (g_AudioFrequencyMax - g_AudioFrequencyMin + 1.0); +#endif +#if AUDIOPROCESSING == 2 + for (int a = int(g_AudioFrequencyMin); a <= int(g_AudioFrequencyMax); ++a) + { + audioResponse += bufferRight[a]; + } + audioResponse /= (g_AudioFrequencyMax - g_AudioFrequencyMin + 1.0); +#endif +#if AUDIOPROCESSING == 3 + for (int a = int(g_AudioFrequencyMin); a <= int(g_AudioFrequencyMax); ++a) + { + audioResponse += bufferLeft[a]; + audioResponse += bufferRight[a]; + } + audioResponse /= (g_AudioFrequencyMax - g_AudioFrequencyMin + 1.0) * 2.0; +#endif + + audioResponse = smoothstep(g_AudioBounds.x, g_AudioBounds.y, audioResponse); + audioResponse = saturate(pow(audioResponse, g_AudioPower)) * g_AudioMultiply; + return audioResponse; +} +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + v_Bounds.x = g_Bounds.x; + v_Bounds.y = 1.0 / (g_Bounds.y - g_Bounds.x); + +#if AUDIOPROCESSING + v_AudioPulse = CreateAudioResponse(g_AudioSpectrum16Left, g_AudioSpectrum16Right); +#endif + +#if MASK == 1 + v_TexCoordMask.xy = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); + v_TexCoordMask.zw = vec2(g_Texture3Resolution.z / g_Texture3Resolution.x, g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/effect.json b/modules/wallpaper-engine/effects/shine/effect.json new file mode 100644 index 0000000..5ccae0a --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/effect.json @@ -0,0 +1,99 @@ +{ + "version" : 1, + "replacementkey" : "shine", + "name" : "ui_editor_effect_shine_title", + "description" : "ui_editor_effect_shine_description", + "group" : "enhance", + "performance" : "expensive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/shine_downsample2.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_cast.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_gaussian_x.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_gaussian_y.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_combine.json", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "scale" : 2, + "format" : "rgba_backbuffer" + }, + { + "name" : "_rt_HalfCompoBuffer2", + "scale" : 2, + "format" : "rgba_backbuffer" + } + ], + "dependencies" : + [ + "materials/effects/shine_downsample2.json", + "materials/effects/shine_cast.json", + "materials/effects/shine_gaussian_x.json", + "materials/effects/shine_gaussian_y.json", + "materials/effects/shine_combine.json", + "shaders/effects/shine_downsample2.frag", + "shaders/effects/shine_downsample2.vert", + "shaders/effects/shine_cast.frag", + "shaders/effects/shine_cast.vert", + "shaders/effects/shine_gaussian.frag", + "shaders/effects/shine_gaussian.vert", + "shaders/effects/shine_combine.frag", + "shaders/effects/shine_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/materials/effects/shine_cast.json b/modules/wallpaper-engine/effects/shine/materials/effects/shine_cast.json new file mode 100644 index 0000000..803b7bd --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/materials/effects/shine_cast.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_cast", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/materials/effects/shine_combine.json b/modules/wallpaper-engine/effects/shine/materials/effects/shine_combine.json new file mode 100644 index 0000000..80104a0 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/materials/effects/shine_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/materials/effects/shine_downsample2.json b/modules/wallpaper-engine/effects/shine/materials/effects/shine_downsample2.json new file mode 100644 index 0000000..2aadc18 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/materials/effects/shine_downsample2.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_downsample2", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/materials/effects/shine_gaussian_x.json b/modules/wallpaper-engine/effects/shine/materials/effects/shine_gaussian_x.json new file mode 100644 index 0000000..8320f35 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/materials/effects/shine_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/materials/effects/shine_gaussian_y.json b/modules/wallpaper-engine/effects/shine/materials/effects/shine_gaussian_y.json new file mode 100644 index 0000000..3dbd99e --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/materials/effects/shine_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/shine_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/shine/preview/effects/shine/effect.json b/modules/wallpaper-engine/effects/shine/preview/effects/shine/effect.json new file mode 100644 index 0000000..cf4f401 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/effects/shine/effect.json @@ -0,0 +1,96 @@ +{ + "name" : "ui_editor_effect_shine_title", + "description" : "ui_editor_effect_shine_description", + "group" : "enhance", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/shine_downsample2.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "previous", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_cast.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_gaussian_x.json", + "target" : "_rt_HalfCompoBuffer1", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_gaussian_y.json", + "target" : "_rt_HalfCompoBuffer2", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "index" : 0 + } + ] + }, + { + "material" : "materials/effects/shine_combine.json", + "bind" : + [ + { + "name" : "_rt_HalfCompoBuffer2", + "index" : 0 + }, + { + "name" : "previous", + "index" : 1 + } + ] + } + ], + "fbos" : + [ + { + "name" : "_rt_HalfCompoBuffer1", + "scale" : 2, + "format" : "rgba8888" + }, + { + "name" : "_rt_HalfCompoBuffer2", + "scale" : 2, + "format" : "rgba8888" + } + ], + "dependencies" : + [ + "materials/effects/shine_downsample2.json", + "materials/effects/shine_cast.json", + "materials/effects/shine_gaussian_x.json", + "materials/effects/shine_gaussian_y.json", + "materials/effects/shine_combine.json", + "shaders/effects/shine_downsample2.frag", + "shaders/effects/shine_downsample2.vert", + "shaders/effects/shine_cast.frag", + "shaders/effects/shine_cast.vert", + "shaders/effects/shine_gaussian.frag", + "shaders/effects/shine_gaussian.vert", + "shaders/effects/shine_combine.frag", + "shaders/effects/shine_combine.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_cast.json b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_cast.json new file mode 100644 index 0000000..803b7bd --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_cast.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_cast", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_combine.json b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_combine.json new file mode 100644 index 0000000..80104a0 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_combine.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_combine", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_downsample2.json b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_downsample2.json new file mode 100644 index 0000000..2aadc18 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_downsample2.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_downsample2", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_gaussian_x.json b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_gaussian_x.json new file mode 100644 index 0000000..8320f35 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_gaussian_x.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/shine_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_gaussian_y.json b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_gaussian_y.json new file mode 100644 index 0000000..3dbd99e --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/materials/effects/shine_gaussian_y.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "effects/shine_gaussian", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "VERTICAL" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/effects/shine/preview/materials/presets/snowflat.json b/modules/wallpaper-engine/effects/shine/preview/materials/presets/snowflat.json new file mode 100644 index 0000000..114f09d --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/materials/presets/snowflat.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 5.0 + }, + "cullmode" : "normal", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/chromaticdot" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/preview/particles/presets/snowflat.json b/modules/wallpaper-engine/effects/shine/preview/particles/presets/snowflat.json new file mode 100644 index 0000000..25f9949 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/particles/presets/snowflat.json @@ -0,0 +1,122 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 0", + "distancemax" : 150, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 15 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 30, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-37 -90 0", + "min" : "-10 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "95 98 100", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/snowflat.json", + "maxcount" : 300, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "frequencymax" : 1.0, + "frequencymin" : 0.80000000000000004, + "id" : 8, + "mask" : "1 0.5 0", + "name" : "oscillateposition", + "phasemax" : 1, + "phasemin" : 0, + "scalemax" : 35, + "scalemin" : 20 + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/preview/presets/snow/preset.json b/modules/wallpaper-engine/effects/shine/preview/presets/snow/preset.json new file mode 100644 index 0000000..6d44187 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/presets/snow/preset.json @@ -0,0 +1,84 @@ +{ + "name" : "ui_editor_preset_snow_particles_title", + "description" : "ui_editor_preset_snow_particles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Snow perspective", + "value" : 0 + }, + { + "label" : "Snow flat", + "value" : 1 + }, + { + "label" : "Snow storm", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewperspective/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow perspective", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowperspective.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowperspective.json", + "particles/presets/snowperspective.json" + ] + }, + { + "preview" : "previewflat/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow flat", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowflat.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowflat.json", + "particles/presets/snowflat.json" + ] + }, + { + "preview" : "previewstorm/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow storm", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowstorm.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowstorm.json", + "materials/presets/snowstormfog.json", + "particles/presets/snowstorm.json", + "particles/presets/snowstormfog.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/preview/project.json b/modules/wallpaper-engine/effects/shine/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/preview/scene.json b/modules/wallpaper-engine/effects/shine/preview/scene.json new file mode 100644 index 0000000..cfbd9ea --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/scene.json @@ -0,0 +1,99 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0 0 0", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 22, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Snow flat", + "origin" : "181.267 289.241 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/snowflat.json", + "scale" : "1.000 1.000 1.000" + }, + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "dependencies" : [ 25 ], + "effects" : + [ + { + "file" : "effects/shine/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "ui_editor_properties_ray_threshold" : 0.0 + }, + "textures" : [ null, "util/white", "util/clouds_256" ] + }, + { + "constantshadervalues" : + { + "ui_editor_properties_color" : "1 0.2196078431372549 0", + "ui_editor_properties_direction" : 0.0, + "ui_editor_properties_ray_intensity" : 1.3600000143051147, + "ui_editor_properties_ray_length" : 0.41999998688697815, + "ui_editor_properties_speed" : -0.33000001311302185 + } + }, + {}, + { + "combos" : + { + "VERTICAL" : 1 + } + }, + { + "textures" : [ null, "_rt_imageLayerComposite_25_a" ] + } + ], + "username" : "", + "visible" : true + } + ], + "id" : 25, + "image" : "models/util/fullscreenlayer.json", + "name" : "Fullscreen", + "origin" : "0.000 0.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "194.000 196.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_cast.frag b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_cast.frag new file mode 100644 index 0000000..3a1a458 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_cast.frag @@ -0,0 +1,100 @@ + +// [COMBO] {"material":"ui_editor_properties_samples","combo":"SAMPLES","type":"options","default":1,"options":{"4":0,"8":1,"15":2,"30":3,"50":4}} + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; +varying vec4 v_TexCoord45; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} + +uniform float g_Length; // {"material":"ui_editor_properties_ray_length","default":0.1,"range":[0.01, 1]} +uniform float g_Intensity; // {"material":"ui_editor_properties_ray_intensity","default":1,"range":[0.01, 2.0]} +uniform vec3 g_ColorRays; // {"material":"ui_editor_properties_color","default":"1 1 1","type":"color"} + +vec4 GatherDirection(vec2 texCoords, vec2 direction) +{ + vec4 albedo = CAST4(0.0); + +#if SAMPLES == 0 + const int sampleCount = 4; +#endif +#if SAMPLES == 1 + const int sampleCount = 8; +#endif +#if SAMPLES == 2 + const int sampleCount = 15; +#endif +#if SAMPLES == 3 + const int sampleCount = 30; +#endif +#if SAMPLES == 4 + const int sampleCount = 50; +#endif + + float dist = length(direction); + direction /= dist; + + dist = min(dist, dist * g_Length); + texCoords += direction * dist; + + const float sampleDrop = sampleCount - 1; + + direction = direction * dist / sampleDrop; + for (int i = 0; i < sampleCount; ++i) + { + vec4 sample = texSample2D(g_Texture0, texCoords); + texCoords -= direction; + albedo += sample * (i / sampleDrop); + } + + return albedo; +} + +void main() { + + vec2 texCoords = v_TexCoord01.xy; + vec4 albedo = CAST4(0.0); + +#if EDGES == 2 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, -v_TexCoord01.zw); +#endif +#if EDGES == 3 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, v_TexCoord23.xy); + albedo += GatherDirection(texCoords, v_TexCoord23.zw); +#endif +#if EDGES == 4 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, -v_TexCoord01.zw); + albedo += GatherDirection(texCoords, v_TexCoord23.xy); + albedo += GatherDirection(texCoords, -v_TexCoord23.xy); +#endif +#if EDGES == 5 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, v_TexCoord23.xy); + albedo += GatherDirection(texCoords, v_TexCoord23.zw); + albedo += GatherDirection(texCoords, v_TexCoord45.xy); + albedo += GatherDirection(texCoords, v_TexCoord45.zw); +#endif + + +#if SAMPLES == 0 + const float sampleIntensity = 0.1 * (30 / 4.0); +#endif +#if SAMPLES == 1 + const float sampleIntensity = 0.1 * (30 / 8.0); +#endif +#if SAMPLES == 2 + const float sampleIntensity = 0.1 * (30 / 15.0); +#endif +#if SAMPLES == 3 + const float sampleIntensity = 0.1; +#endif +#if SAMPLES == 4 + const float sampleIntensity = 0.1 * (30 / 50.0); +#endif + + albedo.rgb *= g_ColorRays; + gl_FragColor = g_Intensity * sampleIntensity * albedo; +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_cast.vert b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_cast.vert new file mode 100644 index 0000000..1072063 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_cast.vert @@ -0,0 +1,60 @@ + +// [COMBO] {"material":"ui_editor_properties_edges","combo":"EDGES","type":"options","default":4,"options":{"2":2,"3":3,"4":4,"5":5}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; +uniform float g_Time; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform float g_Direction; // {"material":"ui_editor_properties_direction","default":0,"range":[0,6.28]} +uniform float g_Speed; // {"material":"ui_editor_properties_speed","default":0,"range":[-1,1]} + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; +varying vec4 v_TexCoord45; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord01.xy = a_TexCoord; + + vec2 baseDirection = rotateVec2(vec2(0, 0.5), g_Time * g_Speed); + float ratio = g_Texture0Resolution.x / g_Texture0Resolution.y; + +#if EDGES == 2 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = CAST2(0.0); + v_TexCoord23.zw = CAST2(0.0); + v_TexCoord45.xy = CAST2(0.0); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if EDGES == 3 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.3333); + v_TexCoord23.zw = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.6666); + v_TexCoord45.xy = CAST2(0.0); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if EDGES == 4 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = rotateVec2(vec2(-baseDirection.y, baseDirection.x), g_Direction); + v_TexCoord23.zw = CAST2(0.0); + v_TexCoord45.xy = CAST2(0.0); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if EDGES == 5 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.2); + v_TexCoord23.zw = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.4); + v_TexCoord45.xy = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.6); + v_TexCoord45.zw = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.8); +#endif + + v_TexCoord01.w *= ratio; + v_TexCoord23.yw *= ratio; + v_TexCoord45.yw *= ratio; +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_combine.frag b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_combine.frag new file mode 100644 index 0000000..779ac33 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_combine.frag @@ -0,0 +1,24 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":9} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Prev","hidden":true} + +void main() { + + vec4 rays = texSample2D(g_Texture0, v_TexCoord.zw); + vec4 albedo = texSample2D(g_Texture1, v_TexCoord.xy); + +#if BLENDMODE == 0 + albedo = rays; +#else + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, rays.rgb, rays.a); + albedo.a += rays.a; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_combine.vert b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_combine.vert new file mode 100644 index 0000000..f1e300d --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_combine.vert @@ -0,0 +1,22 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord.xyxy; + +#ifdef HLSL_SM30 + v_TexCoord.zw += 0.5 / g_Texture0Resolution.xy; +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_downsample2.frag b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_downsample2.frag new file mode 100644 index 0000000..c881c7d --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_downsample2.frag @@ -0,0 +1,35 @@ + +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":1} + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white"} + +uniform float g_Threshold; // {"material":"ui_editor_properties_ray_threshold","default":0.5,"range":[0, 1]} + +#if NOISE == 1 +varying vec4 v_NoiseTexCoord; + +uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_albedo","default":"util/clouds_256"} +uniform float g_NoiseAmount; // {"material":"ui_editor_properties_noise_amount","default":0.4,"range":[0.01, 1]} +#endif + +void main() { + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + vec4 sample = texSample2D(g_Texture0, v_TexCoord.xy); + +#if NOISE == 1 + float noiseSample = texSample2D(g_Texture2, v_NoiseTexCoord.xy).r * texSample2D(g_Texture2, v_NoiseTexCoord.zw).r; + noiseSample = mix(sample.a, sample.a * noiseSample, g_NoiseAmount); +#endif + + sample.rgb *= sample.a; + sample.a = 1.0; + + gl_FragColor = sample * mask * step(g_Threshold, dot(vec3(0.11, 0.59, 0.3), sample.rgb)); + +#if NOISE == 1 + gl_FragColor.a *= noiseSample; +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_downsample2.vert b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_downsample2.vert new file mode 100644 index 0000000..4e96b25 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_downsample2.vert @@ -0,0 +1,35 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +#if NOISE == 1 +varying vec4 v_NoiseTexCoord; +#endif + +uniform float g_Time; +uniform float g_NoiseSpeed; // {"material":"ui_editor_properties_noise_speed","default":0.15,"range":[0.01, 1]} +uniform float g_NoiseScale; // {"material":"ui_editor_properties_noise_scale","default":3,"range":[0.01, 10]} + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xy = a_TexCoord; + + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#ifdef HLSL_SM30 + vec2 offsets = 0.5 / g_Texture0Resolution.xy; + v_TexCoord.xy += offsets; +#endif + +#if NOISE == 1 + v_NoiseTexCoord.xy = a_TexCoord + g_Time * g_NoiseSpeed; + v_NoiseTexCoord.wz = vec2(a_TexCoord.y, -a_TexCoord.x) * 0.633 + vec2(-g_Time, g_Time) * 0.5 * g_NoiseSpeed; + v_NoiseTexCoord *= g_NoiseScale; +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_gaussian.frag b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_gaussian.frag new file mode 100644 index 0000000..7de4001 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_gaussian.frag @@ -0,0 +1,46 @@ + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} + +void main() { +#if KERNEL == 0 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]) * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]) * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]) * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]) * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]) * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]) * 0.006299; +#endif +#if KERNEL == 1 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.071303 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[3]) * 0.214607 + + texSample2D(g_Texture0, v_TexCoord[4]) * 0.189879 + + texSample2D(g_Texture0, v_TexCoord[5]) * 0.131514 + + texSample2D(g_Texture0, v_TexCoord[6]) * 0.071303; +#endif +#if KERNEL == 2 + vec4 albedo = texSample2D(g_Texture0, v_TexCoord[0]) * 0.25 + + texSample2D(g_Texture0, v_TexCoord[1]) * 0.5 + + texSample2D(g_Texture0, v_TexCoord[2]) * 0.25; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_gaussian.vert b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_gaussian.vert new file mode 100644 index 0000000..9744822 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/shaders/effects/shine_gaussian.vert @@ -0,0 +1,61 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":1,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"ui_editor_properties_blur_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if KERNEL == 0 +varying vec2 v_TexCoord[13]; +#endif +#if KERNEL == 1 +varying vec2 v_TexCoord[7]; +#endif +#if KERNEL == 2 +varying vec2 v_TexCoord[3]; +#endif + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + +#if VERTICAL + float offsetX = 0.0f; + float offsetY = g_Scale.y / g_Texture0Resolution.w; +#else + float offsetX = g_Scale.x / g_Texture0Resolution.z; + float offsetY = 0.0f; +#endif + +#if KERNEL == 0 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 6.0, a_TexCoord.y - offsetY * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 5.0, a_TexCoord.y - offsetY * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX * 4.0, a_TexCoord.y - offsetY * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[8] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x + offsetX * 4.0, a_TexCoord.y + offsetY * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x + offsetX * 5.0, a_TexCoord.y + offsetY * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x + offsetX * 6.0, a_TexCoord.y + offsetY * 6.0); +#endif +#if KERNEL == 1 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX * 3.0, a_TexCoord.y - offsetY * 3.0); + v_TexCoord[1] = vec2(a_TexCoord.x - offsetX * 2.0, a_TexCoord.y - offsetY * 2.0); + v_TexCoord[2] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); + v_TexCoord[5] = vec2(a_TexCoord.x + offsetX * 2.0, a_TexCoord.y + offsetY * 2.0); + v_TexCoord[6] = vec2(a_TexCoord.x + offsetX * 3.0, a_TexCoord.y + offsetY * 3.0); +#endif +#if KERNEL == 2 + v_TexCoord[0] = vec2(a_TexCoord.x - offsetX, a_TexCoord.y - offsetY); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x + offsetX, a_TexCoord.y + offsetY); +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/preview/template.json b/modules/wallpaper-engine/effects/shine/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_cast.frag b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_cast.frag new file mode 100644 index 0000000..9e07dc2 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_cast.frag @@ -0,0 +1,100 @@ + +// [COMBO] {"material":"ui_editor_properties_quality","combo":"SAMPLES","type":"options","default":1,"options":{"4":0,"8":1,"15":2,"30":3}} + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; +varying vec4 v_TexCoord45; + +uniform sampler2D g_Texture0; // {"hidden":true} + +uniform float g_Length; // {"material":"raylength","label":"ui_editor_properties_ray_length","default":0.1,"range":[0.01, 1]} +uniform float g_Intensity; // {"material":"rayintensity","label":"ui_editor_properties_ray_intensity","default":1,"range":[0.01, 2.0]} +uniform vec3 g_ColorRays; // {"material":"color","label":"ui_editor_properties_color","default":"1 1 1","type":"color"} + +vec4 GatherDirection(vec2 texCoords, vec2 direction) +{ + vec4 albedo = CAST4(0.0); + +#if SAMPLES == 0 + const int sampleCount = 4; +#endif +#if SAMPLES == 1 + const int sampleCount = 8; +#endif +#if SAMPLES == 2 + const int sampleCount = 15; +#endif +#if SAMPLES == 3 + const int sampleCount = 30; +#endif +#if SAMPLES == 4 + const int sampleCount = 50; +#endif + + float dist = length(direction); + direction /= dist; + + dist *= g_Length; + texCoords += direction * dist; + + const float sampleDrop = sampleCount - 1; + + direction = direction * dist / sampleDrop; + for (int i = 0; i < sampleCount; ++i) + { + vec4 sample = texSample2D(g_Texture0, texCoords); + texCoords -= direction; + albedo += sample * (i / sampleDrop); + } + + return albedo; +} + +void main() { + + vec2 texCoords = v_TexCoord01.xy; + vec4 albedo = CAST4(0.0); + +#if EDGES == 2 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, -v_TexCoord01.zw); +#endif +#if EDGES == 3 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, v_TexCoord23.xy); + albedo += GatherDirection(texCoords, v_TexCoord23.zw); +#endif +#if EDGES == 4 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, -v_TexCoord01.zw); + albedo += GatherDirection(texCoords, v_TexCoord23.xy); + albedo += GatherDirection(texCoords, -v_TexCoord23.xy); +#endif +#if EDGES == 5 + albedo += GatherDirection(texCoords, v_TexCoord01.zw); + albedo += GatherDirection(texCoords, v_TexCoord23.xy); + albedo += GatherDirection(texCoords, v_TexCoord23.zw); + albedo += GatherDirection(texCoords, v_TexCoord45.xy); + albedo += GatherDirection(texCoords, v_TexCoord45.zw); +#endif + + +#if SAMPLES == 0 + const float sampleIntensity = 0.1 * (30 / 4.0); +#endif +#if SAMPLES == 1 + const float sampleIntensity = 0.1 * (30 / 8.0); +#endif +#if SAMPLES == 2 + const float sampleIntensity = 0.1 * (30 / 15.0); +#endif +#if SAMPLES == 3 + const float sampleIntensity = 0.1; +#endif +#if SAMPLES == 4 + const float sampleIntensity = 0.1 * (30 / 50.0); +#endif + + albedo.rgb *= g_ColorRays; + gl_FragColor = vec4(g_Intensity * sampleIntensity * albedo.rgb, saturate(g_Intensity * sampleIntensity * albedo.a)); +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_cast.vert b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_cast.vert new file mode 100644 index 0000000..801981d --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_cast.vert @@ -0,0 +1,60 @@ + +// [COMBO] {"material":"ui_editor_properties_edges","combo":"EDGES","type":"options","default":4,"options":{"2":2,"3":3,"4":4,"5":5}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; +uniform float g_Time; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform float g_Direction; // {"material":"direction","label":"ui_editor_properties_direction","default":0,"direction":true} +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":0,"range":[-1,1]} + +varying vec4 v_TexCoord01; +varying vec4 v_TexCoord23; +varying vec4 v_TexCoord45; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord01.xy = a_TexCoord; + + vec2 baseDirection = rotateVec2(vec2(0, 0.5), g_Time * g_Speed); + float ratio = g_Texture0Resolution.x / g_Texture0Resolution.y; + +#if EDGES == 2 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = CAST2(0.0); + v_TexCoord23.zw = CAST2(0.0); + v_TexCoord45.xy = CAST2(0.0); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if EDGES == 3 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.3333); + v_TexCoord23.zw = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.6666); + v_TexCoord45.xy = CAST2(0.0); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if EDGES == 4 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = rotateVec2(vec2(-baseDirection.y, baseDirection.x), g_Direction); + v_TexCoord23.zw = CAST2(0.0); + v_TexCoord45.xy = CAST2(0.0); + v_TexCoord45.zw = CAST2(0.0); +#endif +#if EDGES == 5 + v_TexCoord01.zw = rotateVec2(baseDirection, g_Direction); + v_TexCoord23.xy = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.2); + v_TexCoord23.zw = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.4); + v_TexCoord45.xy = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.6); + v_TexCoord45.zw = rotateVec2(baseDirection, g_Direction + M_PI_2 * 0.8); +#endif + + v_TexCoord01.w *= ratio; + v_TexCoord23.yw *= ratio; + v_TexCoord45.yw *= ratio; +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_combine.frag b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_combine.frag new file mode 100644 index 0000000..7c3be2a --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_combine.frag @@ -0,0 +1,37 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":9} +// [COMBO] {"material":"ui_editor_properties_copy_background","combo":"COPYBG","type":"options"} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +#if COPYBG +varying vec3 v_ScreenCoord; + +uniform sampler2D g_Texture2; // {"hidden":true,"default":"_rt_FullFrameBuffer"} +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true} + +void main() { + + vec4 rays = texSample2D(g_Texture0, v_TexCoord.zw); + vec4 albedo = texSample2D(g_Texture1, v_TexCoord.xy); + +#if COPYBG + vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * vec2(0.5, 0.5) + 0.5; + vec4 bg = texSample2D(g_Texture2, screenCoord.xy); + albedo.rgb = mix(bg.rgb, albedo.rgb, albedo.a); +#endif + +#if BLENDMODE == 0 + albedo = rays; +#else + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, rays.rgb, rays.a); + albedo.a = saturate(albedo.a + rays.a); +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_combine.vert b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_combine.vert new file mode 100644 index 0000000..a65dcb8 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_combine.vert @@ -0,0 +1,35 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if COPYBG +uniform mat4 g_EffectModelViewProjectionMatrix; + +varying vec3 v_ScreenCoord; +#endif + +#ifdef HLSL_SM30 +uniform vec4 g_Texture0Resolution; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord.xyxy; + +#ifdef HLSL_SM30 + v_TexCoord.zw += 0.5 / g_Texture0Resolution.xy; +#endif + +#if COPYBG + v_ScreenCoord = mul(vec4((a_Position), 1.0), g_EffectModelViewProjectionMatrix).xyw; +#if HLSL + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_downsample2.frag b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_downsample2.frag new file mode 100644 index 0000000..edc3d54 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_downsample2.frag @@ -0,0 +1,39 @@ + +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":1} + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_Threshold; // {"material":"raythreshold","label":"ui_editor_properties_ray_threshold","default":0.5,"range":[0, 1]} + +#if NOISE == 1 +varying vec4 v_NoiseTexCoord; + +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_albedo","default":"util/clouds_256"} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.4,"range":[0.01, 1]} +#endif + +void main() { +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + vec4 sample = texSample2D(g_Texture0, v_TexCoord.xy); + +#if NOISE + float noiseSample = texSample2D(g_Texture2, v_NoiseTexCoord.xy).r * texSample2D(g_Texture2, v_NoiseTexCoord.zw).r; + noiseSample = mix(sample.a, sample.a * noiseSample, g_NoiseAmount); +#endif + + sample.rgb *= sample.a; + sample.a = 1.0; + + gl_FragColor = sample * mask * step(g_Threshold, dot(vec3(0.11, 0.59, 0.3), sample.rgb)); + +#if NOISE + gl_FragColor.a *= noiseSample; +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_downsample2.vert b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_downsample2.vert new file mode 100644 index 0000000..6e073d9 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_downsample2.vert @@ -0,0 +1,35 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +#if NOISE == 1 +varying vec4 v_NoiseTexCoord; +#endif + +uniform float g_Time; +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":0.15,"range":[0.01, 1]} +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":3,"range":[0.01, 10]} + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord.xy = a_TexCoord; + + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#ifdef HLSL_SM30 + vec2 offsets = 0.5 / g_Texture0Resolution.xy; + v_TexCoord.xy += offsets; +#endif + +#if NOISE == 1 + v_NoiseTexCoord.xy = a_TexCoord + g_Time * g_NoiseSpeed; + v_NoiseTexCoord.wz = vec2(a_TexCoord.y, -a_TexCoord.x) * 0.633 + vec2(-g_Time, g_Time) * 0.5 * g_NoiseSpeed; + v_NoiseTexCoord *= g_NoiseScale; +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_gaussian.frag b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_gaussian.frag new file mode 100644 index 0000000..b3dbc62 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_gaussian.frag @@ -0,0 +1,18 @@ + +#include "common_blur.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { +#if KERNEL == 0 + gl_FragColor = blur13a(v_TexCoord.xy, v_TexCoord.zw); +#endif +#if KERNEL == 1 + gl_FragColor = blur7a(v_TexCoord.xy, v_TexCoord.zw); +#endif +#if KERNEL == 2 + gl_FragColor = blur3a(v_TexCoord.xy, v_TexCoord.zw); +#endif +} diff --git a/modules/wallpaper-engine/effects/shine/shaders/effects/shine_gaussian.vert b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_gaussian.vert new file mode 100644 index 0000000..151db02 --- /dev/null +++ b/modules/wallpaper-engine/effects/shine/shaders/effects/shine_gaussian.vert @@ -0,0 +1,25 @@ + +// [COMBO] {"material":"ui_editor_properties_kernel_size","combo":"KERNEL","type":"options","default":0,"options":{"13x13":0,"7x7":1,"3x3":2}} + +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_blur_scale","default":"1 1","linked":true,"range":[0.01, 2.0]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform vec4 g_Texture0Resolution; + +void main() { + gl_Position = vec4(a_Position, 1.0); + + v_TexCoord.xy = a_TexCoord; + +#if VERTICAL + v_TexCoord.z = 0; + v_TexCoord.w = g_Scale.y / g_Texture0Resolution.w; +#else + v_TexCoord.z = g_Scale.x / g_Texture0Resolution.z; + v_TexCoord.w = 0; +#endif +} diff --git a/modules/wallpaper-engine/effects/skew/effect.json b/modules/wallpaper-engine/effects/skew/effect.json new file mode 100644 index 0000000..6ff1682 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "skew", + "name" : "ui_editor_effect_skew_title", + "description" : "ui_editor_effect_skew_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/skew.json" + } + ], + "dependencies" : + [ + "materials/effects/skew.json", + "shaders/effects/skew.frag", + "shaders/effects/skew.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/materials/effects/skew.json b/modules/wallpaper-engine/effects/skew/materials/effects/skew.json new file mode 100644 index 0000000..dca6304 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/materials/effects/skew.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/skew", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/skew/preview/effects/skew/effect.json b/modules/wallpaper-engine/effects/skew/preview/effects/skew/effect.json new file mode 100644 index 0000000..65f2631 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/effects/skew/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Skew", + "description" : "Skews the image corners.", + "group" : "distort", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/skew.json" + } + ], + "dependencies" : + [ + "materials/effects/skew.json", + "shaders/effects/skew.frag", + "shaders/effects/skew.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/preview/materials/effects/skew.json b/modules/wallpaper-engine/effects/skew/preview/materials/effects/skew.json new file mode 100644 index 0000000..dca6304 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/materials/effects/skew.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/skew", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/skew/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/skew/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/preview/project.json b/modules/wallpaper-engine/effects/skew/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/preview/scene.json b/modules/wallpaper-engine/effects/skew/preview/scene.json new file mode 100644 index 0000000..2ed6c01 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/scene.json @@ -0,0 +1,70 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/skew/effect.json", + "passes" : + [ + { + "combos" : + { + "MODE" : 1 + }, + "constantshadervalues" : + { + "Bottom" : -0.18999999761581421, + "Left" : -0.18999999761581421, + "Right" : 0.18999999761581421, + "Top" : 0.18999999761581421 + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/preview/shaders/effects/skew.frag b/modules/wallpaper-engine/effects/skew/preview/shaders/effects/skew.frag new file mode 100644 index 0000000..b959b28 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/shaders/effects/skew.frag @@ -0,0 +1,15 @@ + +// [COMBO] {"material":"Repeat","combo":"REPEAT","type":"options","default":1} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = v_TexCoord.xy; +#if REPEAT + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); + +} diff --git a/modules/wallpaper-engine/effects/skew/preview/shaders/effects/skew.vert b/modules/wallpaper-engine/effects/skew/preview/shaders/effects/skew.vert new file mode 100644 index 0000000..a153625 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/shaders/effects/skew.vert @@ -0,0 +1,41 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +uniform float g_Top; // {"material":"Top","default":0.0,"range":[-2,2]} +uniform float g_Bottom; // {"material":"Bottom","default":0.0,"range":[-2,2]} +uniform float g_Left; // {"material":"Left","default":0.0,"range":[-2,2]} +uniform float g_Right; // {"material":"Right","default":0.0,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + + vec3 position = a_Position; + +#if MODE == 1 + vec2 textureScale = g_Texture0Resolution.zw; + position.x += textureScale.x * 1.0 * (step(a_TexCoord.y, 0.5) * g_Top + + step(0.5, a_TexCoord.y) * g_Bottom); + position.y += textureScale.y * 1.0 * (step(a_TexCoord.x, 0.5) * g_Left + + step(0.5, a_TexCoord.x) * g_Right); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + + v_TexCoord.xy = a_TexCoord; + +#if MODE == 0 + v_TexCoord.x -= step(a_TexCoord.y, 0.5) * g_Top + + step(0.5, a_TexCoord.y) * g_Bottom; + v_TexCoord.y += step(a_TexCoord.x, 0.5) * g_Left + + step(0.5, a_TexCoord.x) * g_Right; +#endif +} diff --git a/modules/wallpaper-engine/effects/skew/preview/template.json b/modules/wallpaper-engine/effects/skew/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/skew/shaders/effects/skew.frag b/modules/wallpaper-engine/effects/skew/shaders/effects/skew.frag new file mode 100644 index 0000000..c964acb --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/shaders/effects/skew.frag @@ -0,0 +1,15 @@ + +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":1} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + vec2 texCoord = v_TexCoord.xy; +#if REPEAT + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); + +} diff --git a/modules/wallpaper-engine/effects/skew/shaders/effects/skew.vert b/modules/wallpaper-engine/effects/skew/shaders/effects/skew.vert new file mode 100644 index 0000000..6e83539 --- /dev/null +++ b/modules/wallpaper-engine/effects/skew/shaders/effects/skew.vert @@ -0,0 +1,42 @@ + +// [COMBO] {"material":"ui_editor_properties_mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; +uniform float g_TextureReductionScale; + +uniform float g_Top; // {"material":"top","label":"ui_editor_properties_top","default":0.0,"range":[-2,2]} +uniform float g_Bottom; // {"material":"bottom","label":"ui_editor_properties_bottom","default":0.0,"range":[-2,2]} +uniform float g_Left; // {"material":"left","label":"ui_editor_properties_left","default":0.0,"range":[-2,2]} +uniform float g_Right; // {"material":"right","label":"ui_editor_properties_right","default":0.0,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + + vec3 position = a_Position; + +#if MODE == 1 + vec2 textureScale = g_Texture0Resolution.zw * g_TextureReductionScale; + position.x += textureScale.x * 1.0 * (step(a_TexCoord.y, 0.5) * g_Top + + step(0.5, a_TexCoord.y) * g_Bottom); + position.y += textureScale.y * 1.0 * (step(a_TexCoord.x, 0.5) * g_Left + + step(0.5, a_TexCoord.x) * g_Right); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + + v_TexCoord.xy = a_TexCoord; + +#if MODE == 0 + v_TexCoord.x -= step(a_TexCoord.y, 0.5) * g_Top + + step(0.5, a_TexCoord.y) * g_Bottom; + v_TexCoord.y += step(a_TexCoord.x, 0.5) * g_Left + + step(0.5, a_TexCoord.x) * g_Right; +#endif +} diff --git a/modules/wallpaper-engine/effects/spin/effect.json b/modules/wallpaper-engine/effects/spin/effect.json new file mode 100644 index 0000000..1806f87 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 2, + "replacementkey" : "spin", + "name" : "ui_editor_effect_spin_title", + "description" : "ui_editor_effect_spin_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/spin.json" + } + ], + "dependencies" : + [ + "materials/effects/spin.json", + "shaders/effects/spin.frag", + "shaders/effects/spin.vert" + ], + "gizmos" : + [ + { + "type" : "EffectSpinUV", + "vars" : + { + "center" : "center", + "ratio" : "ratio", + "angle" : "angle", + "size" : "size" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/materials/effects/spin.json b/modules/wallpaper-engine/effects/spin/materials/effects/spin.json new file mode 100644 index 0000000..0bbd366 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/materials/effects/spin.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/spin", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/spin/preview/effects/spin/effect.json b/modules/wallpaper-engine/effects/spin/preview/effects/spin/effect.json new file mode 100644 index 0000000..8553173 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/effects/spin/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Spin", + "description" : "Spin the image.", + "group" : "image", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/spin.json" + } + ], + "dependencies" : + [ + "materials/effects/spin.json", + "shaders/effects/spin.frag", + "shaders/effects/spin.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/materials/effects/spin.json b/modules/wallpaper-engine/effects/spin/preview/materials/effects/spin.json new file mode 100644 index 0000000..0bbd366 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/materials/effects/spin.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/spin", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/spin/preview/materials/masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/spin/preview/materials/masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..285de7a Binary files /dev/null and b/modules/wallpaper-engine/effects/spin/preview/materials/masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/spin/preview/materials/masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/spin/preview/materials/masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/materials/masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/spin/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/project.json b/modules/wallpaper-engine/effects/spin/preview/project.json new file mode 100644 index 0000000..f23b665 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "previews" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/scene.json b/modules/wallpaper-engine/effects/spin/preview/scene.json new file mode 100644 index 0000000..b6daed6 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/scene.json @@ -0,0 +1,67 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/spin/effect.json", + "passes" : + [ + { + "combos" : + { + "CLAMP" : 1, + "MODE" : 0 + }, + "constantshadervalues" : + { + "Center" : "0.501 0.47" + }, + "textures" : [ null, "masks/spin_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/preview/shaders/effects/spin.frag b/modules/wallpaper-engine/effects/spin/preview/shaders/effects/spin.frag new file mode 100644 index 0000000..94a5667 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/shaders/effects/spin.frag @@ -0,0 +1,24 @@ + +// [COMBO] {"material":"Repeat","combo":"CLAMP","type":"options","default":1} + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordMask; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +#if MASK == 1 +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","combo":"MASK","default":"util/black"} +#endif + +void main() { + vec2 texCoord = v_TexCoord.xy; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); + +#if MASK == 1 + float mask = texSample2D(g_Texture1, v_TexCoordMask).r; + gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.zw), gl_FragColor, mask); +#endif +} diff --git a/modules/wallpaper-engine/effects/spin/preview/shaders/effects/spin.vert b/modules/wallpaper-engine/effects/spin/preview/shaders/effects/spin.vert new file mode 100644 index 0000000..77a9fa9 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/shaders/effects/spin.vert @@ -0,0 +1,40 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture1Resolution; + +uniform float g_Speed; // {"material":"Speed","default":1.0,"range":[-5,5]} +uniform vec2 g_SpinCenter; // {"material":"Center","default":"0.5 0.5"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = rotateVec2(position.xy - g_SpinCenter, g_Speed * g_Time) + g_SpinCenter; +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xyzw = a_TexCoord.xyxy; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif + +#if MODE == 0 + v_TexCoord.xy = rotateVec2(v_TexCoord.xy - g_SpinCenter, g_Speed * g_Time) + g_SpinCenter; +#endif +} diff --git a/modules/wallpaper-engine/effects/spin/preview/template.json b/modules/wallpaper-engine/effects/spin/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/spin/shaders/effects/spin.frag b/modules/wallpaper-engine/effects/spin/shaders/effects/spin.frag new file mode 100644 index 0000000..ef527ba --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/shaders/effects/spin.frag @@ -0,0 +1,33 @@ + +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":1} + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordMask; +varying vec2 v_TexCoordSoftMask; + +uniform vec4 g_Texture0Resolution; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform vec2 g_SpinCenter; // {"material":"center","label":"ui_editor_properties_center","default":"0.5 0.5","position":true} +uniform float g_Size; // {"material":"size","label":"ui_editor_properties_size","default":0.1,"range":[0,1]} +uniform float g_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":0.002,"range":[0,0.2]} + +void main() { + vec2 texCoord = v_TexCoord.xy; + +#if REPEAT + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); + + vec2 maskDelta = v_TexCoordSoftMask.xy - g_SpinCenter; + float mask = smoothstep(g_Size + g_Feather + 0.00001, g_Size - g_Feather, length(maskDelta)); + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoordMask).r; +#endif + + gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.zw), gl_FragColor, mask); +} diff --git a/modules/wallpaper-engine/effects/spin/shaders/effects/spin.vert b/modules/wallpaper-engine/effects/spin/shaders/effects/spin.vert new file mode 100644 index 0000000..299caca --- /dev/null +++ b/modules/wallpaper-engine/effects/spin/shaders/effects/spin.vert @@ -0,0 +1,80 @@ + +// [COMBO] {"material":"ui_editor_properties_elliptical","combo":"ELLIPTICAL","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":0} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1.0,"range":[-5,5]} +uniform vec2 g_SpinCenter; // {"material":"center","label":"ui_editor_properties_center","default":"0.5 0.5","position":true} +uniform float g_Ratio; // {"material":"ratio","label":"ui_editor_properties_ratio","default":1.0,"range":[0,10]} +uniform float g_Axis; // {"material":"angle","label":"ui_editor_properties_angle","default":0.0,"range":[0,3.141]} +uniform float g_Phase; // {"material":"phase","label":"ui_editor_properties_time_offset","default":0.0,"range":[0,1]} + +uniform vec2 g_Friction; // {"material":"friction","label":"ui_editor_properties_friction","default":"1 1","linked":true,"range":[0.01, 10.0]} +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":5,"range":[-10,10]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":1,"range":[0,5]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordSoftMask; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +void main() { + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + vec3 position = a_Position; + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xyzw = a_TexCoord.xyxy; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif + + v_TexCoord.xy -= g_SpinCenter; + v_TexCoord.x *= aspect; + +#if ELLIPTICAL + v_TexCoord.xy = rotateVec2(v_TexCoord.xy, g_Axis); + v_TexCoord.x *= g_Ratio; +#endif + v_TexCoordSoftMask.xy = v_TexCoord.xy; + + float offset = g_Phase * 6.28318530718; +#if NOISE + vec4 sines = frac(g_NoiseSpeed * g_Time / M_PI_2 * vec4(1, -0.16161616, 0.0083333, -0.00019841)) * M_PI_2; + vec4 csines = cos(sines); + sines = sin(sines); + + vec4 base = step(0.0, csines); + sines = sines * 0.498 + 0.5; + sines = mix(1.0 - pow(1.0 - sines, CAST4(g_Friction.x)), pow(sines, CAST4(g_Friction.y)), base); + offset += (dot(CAST4(0.5), sines) - 1.0) * g_NoiseAmount; +#endif + + v_TexCoord.xy = rotateVec2(v_TexCoord.xy, g_Speed * g_Time + offset); + +#if ELLIPTICAL + v_TexCoord.x /= g_Ratio; + v_TexCoord.xy = rotateVec2(v_TexCoord.xy, -g_Axis); + + v_TexCoordSoftMask.xy = rotateVec2(v_TexCoordSoftMask.xy, -g_Axis); +#endif + + v_TexCoord.x /= aspect; + v_TexCoord.xy += g_SpinCenter; + + v_TexCoordSoftMask.xy += g_SpinCenter; +} diff --git a/modules/wallpaper-engine/effects/swing/effect.json b/modules/wallpaper-engine/effects/swing/effect.json new file mode 100644 index 0000000..7d96d93 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "swing", + "name" : "ui_editor_effect_swing_title", + "description" : "ui_editor_effect_swing_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/swing.json" + } + ], + "dependencies" : + [ + "materials/effects/swing.json", + "shaders/effects/swing.frag", + "shaders/effects/swing.vert" + ], + "gizmos" : + [ + { + "type" : "EffectSwingUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "center" : "center", + "size" : "size" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/swing/materials/effects/swing.json b/modules/wallpaper-engine/effects/swing/materials/effects/swing.json new file mode 100644 index 0000000..a9d37db --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/materials/effects/swing.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/swing", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/swing/preview/effects/swing/effect.json b/modules/wallpaper-engine/effects/swing/preview/effects/swing/effect.json new file mode 100644 index 0000000..7d96d93 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/effects/swing/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "swing", + "name" : "ui_editor_effect_swing_title", + "description" : "ui_editor_effect_swing_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/swing.json" + } + ], + "dependencies" : + [ + "materials/effects/swing.json", + "shaders/effects/swing.frag", + "shaders/effects/swing.vert" + ], + "gizmos" : + [ + { + "type" : "EffectSwingUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "center" : "center", + "size" : "size" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/swing/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/swing/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/swing/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/swing/preview/materials/effectpreview.tex new file mode 100644 index 0000000..58452ea Binary files /dev/null and b/modules/wallpaper-engine/effects/swing/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/swing/preview/materials/effects/swing.json b/modules/wallpaper-engine/effects/swing/preview/materials/effects/swing.json new file mode 100644 index 0000000..a9d37db --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/materials/effects/swing.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/swing", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/swing/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/swing/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/swing/preview/project.json b/modules/wallpaper-engine/effects/swing/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/swing/preview/scene.json b/modules/wallpaper-engine/effects/swing/preview/scene.json new file mode 100644 index 0000000..1c38501 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/scene.json @@ -0,0 +1,94 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/swing/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "amount" : 0.55, + "center" : 0.5, + "feather" : 0, + "point0" : "-0.24110 0.16707", + "point1" : "1.26832 0.16961", + "size" : 1.4249905, + "speed" : 4.11 + }, + "id" : 19 + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/swing/preview/shaders/effects/swing.frag b/modules/wallpaper-engine/effects/swing/preview/shaders/effects/swing.frag new file mode 100644 index 0000000..5fc80ee --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/shaders/effects/swing.frag @@ -0,0 +1,105 @@ + +// [COMBO] {"material":"ui_editor_properties_double_sided","combo":"DOUBLESIDED","type":"options","default":0} + +varying vec2 v_TexCoord; +varying vec2 v_TexCoordMask; + +uniform vec4 g_Texture0Resolution; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.25 0.5"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.75 0.5"} +uniform float g_Size; // {"material":"size","label":"ui_editor_properties_size","default":0.4,"range":[0,1]} +uniform float g_CenterPos; // {"material":"center","label":"ui_editor_properties_center","default":0.5,"range":[0,1]} +uniform float g_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":0.01,"range":[0,0.2]} + +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":2.0,"range":[-5,5]} +uniform float g_Amount; // {"material":"amount","label":"ui_editor_properties_amount","default":0.2,"range":[0,1]} + +uniform float g_Time; + +void main() { + vec2 texCoord = v_TexCoord.xy; + + //gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.zw), gl_FragColor, mask); + + + float aspect = g_Texture0Resolution.x / g_Texture0Resolution.y; + vec2 p0 = g_Point0; + vec2 p1 = g_Point1; + + p0.x *= aspect; + p1.x *= aspect; + texCoord.x *= aspect; + + vec2 axis = normalize(p1 - p0); + vec2 center = p0 + (p1 - p0) * g_CenterPos; + float distortAmt = g_Amount; + float speed = g_Speed; + + //distortAmt *= sin(g_Time * speed); + // + //mat3 xform = inverse(squareToQuad(vec2(0, 0) - vec2(distortAmt, distortAmt), + // vec2(1, 0) + vec2(-distortAmt, distortAmt), + // vec2(1, 1) + vec2(-distortAmt, -distortAmt), + // vec2(0, 1) - vec2(distortAmt, -distortAmt) + //)); + // + //vec3 puvs = mul(vec3(texCoord, 1.0), xform); + // + //texCoord = puvs.xy / puvs.z; + + //axis.x *= aspect; + axis = normalize(axis); + vec2 axisOrtho = vec2(-axis.y, axis.x); + vec2 uvDelta = texCoord - center; + + float distanceAlongAxis = dot(axis, uvDelta); + float distanceOrtho = dot(axisOrtho, uvDelta); + + + float anim = sin(g_Time * speed); + distortAmt *= anim; + vec2 uvDistort = axis * distortAmt * distanceOrtho * distanceAlongAxis; + uvDistort += axisOrtho * distortAmt * anim * distanceOrtho; + //uvDistort.x /= aspect; + texCoord += uvDistort; + + + // software mask area + float mask = 1.0; + float feather = max(g_Feather, 0.00001); + + vec2 deltaRight = texCoord - p1; + vec2 deltaLeft = texCoord - p0; + float distanceRight = dot(deltaRight, axis); + float distanceLeft = dot(deltaLeft, axis); + + // Clip to right + mask *= smoothstep(feather, 0, distanceRight); + mask *= smoothstep(-feather, 0, distanceLeft); + + float sizeMod = g_Size; + sizeMod = g_Size * (1.0 - abs(anim) * g_Amount * 0.5); + + // Feather bottom page + mask *= smoothstep(sizeMod + feather, sizeMod - feather, distanceOrtho); + +#if DOUBLESIDED + // Feather top page + mask *= smoothstep(sizeMod + feather, sizeMod - feather, -distanceOrtho); +#else + // Clip to bottom page + mask *= step(0, distanceOrtho); +#endif + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoordMask).r; +#endif + + texCoord.x /= aspect; + texCoord = mix(v_TexCoord.xy, texCoord, mask); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/swing/preview/shaders/effects/swing.vert b/modules/wallpaper-engine/effects/swing/preview/shaders/effects/swing.vert new file mode 100644 index 0000000..5875c36 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/preview/shaders/effects/swing.vert @@ -0,0 +1,23 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord.xy; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/swing/shaders/effects/swing.frag b/modules/wallpaper-engine/effects/swing/shaders/effects/swing.frag new file mode 100644 index 0000000..a1af8f4 --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/shaders/effects/swing.frag @@ -0,0 +1,93 @@ + +// [COMBO] {"material":"ui_editor_properties_double_sided","combo":"DOUBLESIDED","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":0} + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordMask; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_noise","default":"util/noise"} + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.25 0.5"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.75 0.5"} +uniform float g_Size; // {"material":"size","label":"ui_editor_properties_size","default":0.4,"range":[0,1]} +uniform float g_CenterPos; // {"material":"center","label":"ui_editor_properties_center","default":0.5,"range":[0,1]} +uniform float g_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":0.01,"range":[0,0.2]} + +uniform float g_Amount; // {"material":"amount","label":"ui_editor_properties_amount","default":0.2,"range":[0,1]} + +uniform float g_Time; + +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":0.15,"range":[0,0.2]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.2,"range":[0,1]} + +void main() { + vec2 texCoord = v_TexCoord.xy; + + float aspect = v_TexCoord.z; + vec2 p0 = g_Point0; + vec2 p1 = g_Point1; + + p0.x *= aspect; + p1.x *= aspect; + texCoord.x *= aspect; + + vec2 axis = normalize(p1 - p0); + vec2 center = p0 + (p1 - p0) * g_CenterPos; + + //axis.x *= aspect; + axis = normalize(axis); + vec2 axisOrtho = vec2(-axis.y, axis.x); + vec2 uvDelta = texCoord - center; + + float distanceAlongAxis = dot(axis, uvDelta); + float distanceOrtho = dot(axisOrtho, uvDelta); + + float anim = v_TexCoord.w; + +#if NOISE + float noise = texSample2D(g_Texture2, vec2(g_Time * 0.08333333, g_Time * 0.02777777) * g_NoiseSpeed).r * 3.141 * 2.0; + anim = clamp(anim + sin(noise) * g_NoiseAmount, -1.0, 1.0); +#endif + + float distortAmt = anim; + vec2 uvDistort = axis * distortAmt * distanceOrtho * distanceAlongAxis; + uvDistort += axisOrtho * distortAmt * anim * distanceOrtho; + texCoord += uvDistort; + + // software mask area + float mask = 1.0; + float feather = max(g_Feather, 0.00001); + + vec2 deltaRight = texCoord - p1; + vec2 deltaLeft = texCoord - p0; + float distanceRight = dot(deltaRight, axis); + float distanceLeft = dot(deltaLeft, axis); + + // Clip to right + mask *= smoothstep(feather, 0, distanceRight); + mask *= smoothstep(-feather, 0, distanceLeft); + + float sizeMod = g_Size; + sizeMod = g_Size * (1.0 - abs(anim) * g_Amount * 0.5); + + // Feather bottom page + mask *= smoothstep(sizeMod + feather, sizeMod - feather, distanceOrtho); + +#if DOUBLESIDED + // Feather top page + mask *= smoothstep(sizeMod + feather, sizeMod - feather, -distanceOrtho); +#else + // Clip to bottom page + mask *= step(0, distanceOrtho); +#endif + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoordMask).r; +#endif + + texCoord.x /= aspect; + texCoord = mix(v_TexCoord.xy, texCoord, mask); + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/swing/shaders/effects/swing.vert b/modules/wallpaper-engine/effects/swing/shaders/effects/swing.vert new file mode 100644 index 0000000..cf1483c --- /dev/null +++ b/modules/wallpaper-engine/effects/swing/shaders/effects/swing.vert @@ -0,0 +1,33 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +uniform float g_Time; + +uniform float g_Amount; // {"material":"amount","label":"ui_editor_properties_amount","default":0.2,"range":[0,1]} +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":2.0,"range":[-5,5]} +uniform float g_Phase; // {"material":"phase","label":"ui_editor_properties_time_offset","default":0.0,"range":[0,1]} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord.xy; + v_TexCoord.z = g_Texture0Resolution.x / g_Texture0Resolution.y; + + v_TexCoord.w = sin(g_Time * g_Speed + g_Phase * 6.28318530718) * g_Amount; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/tint/effect.json b/modules/wallpaper-engine/effects/tint/effect.json new file mode 100644 index 0000000..75e72b9 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "tint", + "name" : "ui_editor_effect_tint_title", + "description" : "ui_editor_effect_tint_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/materials/effects/tint.json b/modules/wallpaper-engine/effects/tint/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/tint/preview/effects/tint/effect.json b/modules/wallpaper-engine/effects/tint/preview/effects/tint/effect.json new file mode 100644 index 0000000..ca40b36 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/effects/tint/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Tint", + "description" : "Tint the image with a color of choice.", + "group" : "colorize", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/tint.json" + } + ], + "dependencies" : + [ + "materials/effects/tint.json", + "shaders/effects/tint.frag", + "shaders/effects/tint.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/preview/materials/effects/tint.json b/modules/wallpaper-engine/effects/tint/preview/materials/effects/tint.json new file mode 100644 index 0000000..fde9431 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/materials/effects/tint.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/tint", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/tint/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/tint/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/preview/project.json b/modules/wallpaper-engine/effects/tint/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/preview/scene.json b/modules/wallpaper-engine/effects/tint/preview/scene.json new file mode 100644 index 0000000..9b610a7 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/scene.json @@ -0,0 +1,67 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/tint/effect.json", + "passes" : + [ + { + "combos" : + { + "BLENDMODE" : 2 + }, + "constantshadervalues" : + { + "Color" : "1 0 0" + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/preview/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/tint/preview/shaders/effects/tint.frag new file mode 100644 index 0000000..7ec87bb --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/shaders/effects/tint.frag @@ -0,0 +1,19 @@ + +// [COMBO] {"material":"Blend mode","combo":"BLENDMODE","type":"imageblending","default":2} + +#include "common_blending.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +uniform float g_BlendAlpha; // {"material":"Alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, g_BlendAlpha); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/tint/preview/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/tint/preview/shaders/effects/tint.vert new file mode 100644 index 0000000..81704c0 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/shaders/effects/tint.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; +} diff --git a/modules/wallpaper-engine/effects/tint/preview/template.json b/modules/wallpaper-engine/effects/tint/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/tint/shaders/effects/tint.frag b/modules/wallpaper-engine/effects/tint/shaders/effects/tint.frag new file mode 100644 index 0000000..ff28168 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/shaders/effects/tint.frag @@ -0,0 +1,29 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":30} + +#include "common_blending.h" + +varying vec4 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} + +uniform float g_BlendAlpha; // {"material":"alpha", "label":"ui_editor_properties_alpha","default":1,"range":[0,1]} +uniform vec3 g_TintColor; // {"material":"color", "label":"ui_editor_properties_color", "type": "color", "default":"1 0 0"} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + float mask = g_BlendAlpha; + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoord.zw).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, g_TintColor, mask); + +#if BLENDMODE == 0 + albedo.a = 1.0; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/tint/shaders/effects/tint.vert b/modules/wallpaper-engine/effects/tint/shaders/effects/tint.vert new file mode 100644 index 0000000..3bbbc06 --- /dev/null +++ b/modules/wallpaper-engine/effects/tint/shaders/effects/tint.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture1Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/transform/effect.json b/modules/wallpaper-engine/effects/transform/effect.json new file mode 100644 index 0000000..0446454 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "transform", + "name" : "ui_editor_effect_transform_title", + "description" : "ui_editor_effect_transform_description", + "group" : "distort", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/transform.json" + } + ], + "dependencies" : + [ + "materials/effects/transform.json", + "shaders/effects/transform.frag", + "shaders/effects/transform.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/materials/effects/transform.json b/modules/wallpaper-engine/effects/transform/materials/effects/transform.json new file mode 100644 index 0000000..47b6a90 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/materials/effects/transform.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/transform", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/transform/preview/effects/transform/effect.json b/modules/wallpaper-engine/effects/transform/preview/effects/transform/effect.json new file mode 100644 index 0000000..dbae8fd --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/effects/transform/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Transform", + "description" : "Apply scaling, rotation and offsets to the image.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/transform.json" + } + ], + "dependencies" : + [ + "materials/effects/transform.json", + "shaders/effects/transform.frag", + "shaders/effects/transform.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/preview/materials/effects/transform.json b/modules/wallpaper-engine/effects/transform/preview/materials/effects/transform.json new file mode 100644 index 0000000..47b6a90 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/materials/effects/transform.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/transform", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/transform/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/transform/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/preview/project.json b/modules/wallpaper-engine/effects/transform/preview/project.json new file mode 100644 index 0000000..75e92ac --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewt", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/preview/scene.json b/modules/wallpaper-engine/effects/transform/preview/scene.json new file mode 100644 index 0000000..667c671 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/scene.json @@ -0,0 +1,64 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/transform/effect.json", + "passes" : + [ + { + "combos" : + { + "CLAMP" : 1 + }, + "constantshadervalues" : + { + "Angle" : 0.67000001668930054, + "Offset" : "0 0.5", + "Scale" : "2 3" + } + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/preview/shaders/effects/transform.frag b/modules/wallpaper-engine/effects/transform/preview/shaders/effects/transform.frag new file mode 100644 index 0000000..278820f --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/shaders/effects/transform.frag @@ -0,0 +1,14 @@ + +// [COMBO] {"material":"Repeat","combo":"CLAMP","type":"options","default":0} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + vec2 texCoord = v_TexCoord; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/transform/preview/shaders/effects/transform.vert b/modules/wallpaper-engine/effects/transform/preview/shaders/effects/transform.vert new file mode 100644 index 0000000..8364fed --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/shaders/effects/transform.vert @@ -0,0 +1,35 @@ + +// [COMBO] {"material":"Mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec2 g_Offset; // {"material":"Offset","default":"0 0"} +uniform vec2 g_Scale; // {"material":"Scale","default":"1 1"} +uniform float g_Direction; // {"material":"Angle","default":0,"range":[0,6.28]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +vec2 applyFx(vec2 v) { + v = rotateVec2(v - CAST2(0.5), g_Direction); + return (v + g_Offset) * g_Scale + CAST2(0.5); +} + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = applyFx(position.xy); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; + +#if MODE == 0 + v_TexCoord = applyFx(v_TexCoord); +#endif +} diff --git a/modules/wallpaper-engine/effects/transform/preview/template.json b/modules/wallpaper-engine/effects/transform/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/transform/shaders/effects/transform.frag b/modules/wallpaper-engine/effects/transform/shaders/effects/transform.frag new file mode 100644 index 0000000..2ecf373 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/shaders/effects/transform.frag @@ -0,0 +1,14 @@ + +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"CLAMP","type":"options","default":1} + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + vec2 texCoord = v_TexCoord; +#if CLAMP + texCoord = frac(texCoord); +#endif + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/transform/shaders/effects/transform.vert b/modules/wallpaper-engine/effects/transform/shaders/effects/transform.vert new file mode 100644 index 0000000..5dae8d3 --- /dev/null +++ b/modules/wallpaper-engine/effects/transform/shaders/effects/transform.vert @@ -0,0 +1,35 @@ + +// [COMBO] {"material":"ui_editor_properties_mode","combo":"MODE","type":"options","default":0,"options":{"Vertex":1,"UV":0}} + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec2 g_Offset; // {"material":"offset","label":"ui_editor_properties_offset","default":"0 0"} +uniform vec2 g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":"1 1"} +uniform float g_Direction; // {"material":"angle","label":"ui_editor_properties_angle","default":0,"range":[0,6.28],"direction":true,"conversion":"rad2deg"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +vec2 applyFx(vec2 v) { + v = rotateVec2(v - CAST2(0.5), -g_Direction); + return (v + g_Offset) * g_Scale + CAST2(0.5); +} + +void main() { + + vec3 position = a_Position; +#if MODE == 1 + position.xy = applyFx(position.xy); +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; + +#if MODE == 0 + v_TexCoord = applyFx(v_TexCoord); +#endif +} diff --git a/modules/wallpaper-engine/effects/twirl/effect.json b/modules/wallpaper-engine/effects/twirl/effect.json new file mode 100644 index 0000000..6abcad4 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "twirl", + "name" : "ui_editor_effect_twirl_title", + "description" : "ui_editor_effect_twirl_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/twirl.json" + } + ], + "dependencies" : + [ + "materials/effects/twirl.json", + "shaders/effects/twirl.frag", + "shaders/effects/twirl.vert" + ], + "gizmos" : + [ + { + "type" : "EffectSpinUV", + "vars" : + { + "center" : "center", + "ratio" : "ratio", + "angle" : "angle", + "size" : "size" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/materials/effects/twirl.json b/modules/wallpaper-engine/effects/twirl/materials/effects/twirl.json new file mode 100644 index 0000000..708a0ca --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/materials/effects/twirl.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/twirl", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/twirl/preview/effects/twirl/effect.json b/modules/wallpaper-engine/effects/twirl/preview/effects/twirl/effect.json new file mode 100644 index 0000000..6abcad4 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/effects/twirl/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "twirl", + "name" : "ui_editor_effect_twirl_title", + "description" : "ui_editor_effect_twirl_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/twirl.json" + } + ], + "dependencies" : + [ + "materials/effects/twirl.json", + "shaders/effects/twirl.frag", + "shaders/effects/twirl.vert" + ], + "gizmos" : + [ + { + "type" : "EffectSpinUV", + "vars" : + { + "center" : "center", + "ratio" : "ratio", + "angle" : "angle", + "size" : "size" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tex new file mode 100644 index 0000000..58452ea Binary files /dev/null and b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tga b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/effects/twirl/preview/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/effects/twirl/preview/materials/effects/twirl.json b/modules/wallpaper-engine/effects/twirl/preview/materials/effects/twirl.json new file mode 100644 index 0000000..708a0ca --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/materials/effects/twirl.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/twirl", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/twirl/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/twirl/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/preview/project.json b/modules/wallpaper-engine/effects/twirl/preview/project.json new file mode 100644 index 0000000..a3dd6f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/preview/scene.json b/modules/wallpaper-engine/effects/twirl/preview/scene.json new file mode 100644 index 0000000..d8e2180 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/scene.json @@ -0,0 +1,101 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.70000 0.70000 0.70000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "alignment" : "center", + "alpha" : 1.0, + "angles" : "0.00000 0.00000 0.00000", + "brightness" : 1.0, + "color" : "1.00000 1.00000 1.00000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/twirl/effect.json", + "id" : 18, + "name" : "", + "passes" : + [ + { + "combos" : + { + "ELLIPTICAL" : 0, + "INNER" : 1, + "NOISE" : 0, + "REPEAT" : 0 + }, + "constantshadervalues" : + { + "amount" : 0.23, + "angle" : 0.0, + "center" : "0.50194 0.46310", + "feather" : 0, + "ratio" : 1.0, + "size" : 0.83391356, + "speed" : 1.0 + }, + "id" : 19 + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.00000 128.00000 0.00000", + "parallaxDepth" : "1.00000 1.00000", + "perspective" : false, + "scale" : "1.00000 1.00000 1.00000", + "size" : "256.00000 256.00000", + "solid" : true, + "visible" : true + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/preview/shaders/effects/twirl.frag b/modules/wallpaper-engine/effects/twirl/preview/shaders/effects/twirl.frag new file mode 100644 index 0000000..8e35775 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/shaders/effects/twirl.frag @@ -0,0 +1,85 @@ + +// [COMBO] {"material":"ui_editor_properties_elliptical","combo":"ELLIPTICAL","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_inner","combo":"INNER","type":"options","default":0} + +#include "common.h" + +varying vec2 v_TexCoord; +varying vec2 v_TexCoordMask; + +uniform vec4 g_Texture0Resolution; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_noise","default":"util/noise"} + +uniform vec2 g_SpinCenter; // {"material":"center","label":"ui_editor_properties_center","default":"0.5 0.5","position":true} +uniform float g_Size; // {"material":"size","label":"ui_editor_properties_size","default":0.5,"range":[0,1]} +uniform float g_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":0.002,"range":[0,0.2]} + +uniform float g_Amount; // {"material":"amount","label":"ui_editor_properties_amount","default":1.0,"range":[0,2.0]} +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1.0,"range":[-5,5]} + +uniform float g_Ratio; // {"material":"ratio","label":"ui_editor_properties_ratio","default":1.0,"range":[0,10]} +uniform float g_Axis; // {"material":"angle","label":"ui_editor_properties_angle","default":0.0,"range":[0,3.141]} + +uniform float g_Time; +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":0.15,"range":[0,0.2]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.5,"range":[0,1]} + +void main() { + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + vec2 texCoord = v_TexCoord.xy; + + texCoord -= g_SpinCenter; + texCoord.x *= aspect; + +#if ELLIPTICAL + texCoord.xy = rotateVec2(texCoord.xy, g_Axis); + texCoord.x *= g_Ratio; +#endif + + float feather = smoothstep(g_Size + g_Feather + 0.00001, g_Size - g_Feather, length(texCoord.xy)); + +#if INNER + float dist = (1.0 / length(texCoord)) * g_Size; +#else + float dist = length(texCoord) / g_Size; +#endif + + float anim = sin(g_Time * g_Speed) * dist * g_Amount; + +#if NOISE + float noise = texSample2D(g_Texture2, vec2(g_Time * 0.08333333, g_Time * 0.02777777) * g_NoiseSpeed).r * 3.141 * 2.0; + anim += sin(noise) * g_NoiseAmount; +#endif + + texCoord = rotateVec2(texCoord, anim); + +#if ELLIPTICAL + texCoord.x /= g_Ratio; + texCoord.xy = rotateVec2(texCoord.xy, -g_Axis); +#endif + + texCoord.x /= aspect; + texCoord += g_SpinCenter; + +#if REPEAT + texCoord = frac(texCoord); +#endif + + texCoord = mix(v_TexCoord.xy, texCoord, feather); + + gl_FragColor = texSample2D(g_Texture0, texCoord); + + float mask = 1.0; + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoordMask).r; +#endif + + gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.xy), gl_FragColor, mask); +} diff --git a/modules/wallpaper-engine/effects/twirl/preview/shaders/effects/twirl.vert b/modules/wallpaper-engine/effects/twirl/preview/shaders/effects/twirl.vert new file mode 100644 index 0000000..63e6dd1 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/shaders/effects/twirl.vert @@ -0,0 +1,24 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +void main() { + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord.xy; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/twirl/preview/template.json b/modules/wallpaper-engine/effects/twirl/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/twirl/shaders/effects/twirl.frag b/modules/wallpaper-engine/effects/twirl/shaders/effects/twirl.frag new file mode 100644 index 0000000..6d79796 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/shaders/effects/twirl.frag @@ -0,0 +1,83 @@ + +// [COMBO] {"material":"ui_editor_properties_elliptical","combo":"ELLIPTICAL","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_noise","combo":"NOISE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_repeat","combo":"REPEAT","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_inner","combo":"INNER","type":"options","default":0} + +#include "common.h" + +varying vec4 v_TexCoord; + +#if MASK +varying vec2 v_TexCoordMask; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_noise","default":"util/noise"} + +uniform vec2 g_SpinCenter; // {"material":"center","label":"ui_editor_properties_center","default":"0.5 0.5","position":true} +uniform float g_Size; // {"material":"size","label":"ui_editor_properties_size","default":0.5,"range":[0,1]} +uniform float g_Feather; // {"material":"feather","label":"ui_editor_properties_feather","default":0.002,"range":[0,0.2]} + +uniform float g_Ratio; // {"material":"ratio","label":"ui_editor_properties_ratio","default":1.0,"range":[0,10]} +uniform float g_Axis; // {"material":"angle","label":"ui_editor_properties_angle","default":0.0,"range":[0,3.141]} + +uniform float g_Time; +uniform float g_NoiseSpeed; // {"material":"noisespeed","label":"ui_editor_properties_noise_speed","default":0.15,"range":[0,0.2]} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.5,"range":[0,1]} + +void main() { + + float aspect = v_TexCoord.z; + vec2 texCoord = v_TexCoord.xy; + + texCoord -= g_SpinCenter; + texCoord.x *= aspect; + +#if ELLIPTICAL + texCoord.xy = rotateVec2(texCoord.xy, g_Axis); + texCoord.x *= g_Ratio; +#endif + + float feather = smoothstep(g_Size + g_Feather + 0.00001, g_Size - g_Feather, length(texCoord.xy)); + +#if INNER + float dist = (1.0 / length(texCoord)) * g_Size; +#else + float dist = length(texCoord) / g_Size; +#endif + + float anim = v_TexCoord.w * dist; + +#if NOISE + float noise = texSample2D(g_Texture2, vec2(g_Time * 0.08333333, g_Time * 0.02777777) * g_NoiseSpeed).r * 3.141 * 2.0; + anim += sin(noise) * g_NoiseAmount * dist; +#endif + + texCoord = rotateVec2(texCoord, anim); + +#if ELLIPTICAL + texCoord.x /= g_Ratio; + texCoord.xy = rotateVec2(texCoord.xy, -g_Axis); +#endif + + texCoord.x /= aspect; + texCoord += g_SpinCenter; + +#if REPEAT + texCoord = frac(texCoord); +#endif + + texCoord = mix(v_TexCoord.xy, texCoord, feather); + + gl_FragColor = texSample2D(g_Texture0, texCoord); + + float mask = 1.0; + +#if MASK + mask *= texSample2D(g_Texture1, v_TexCoordMask).r; +#endif + + gl_FragColor = mix(texSample2D(g_Texture0, v_TexCoord.xy), gl_FragColor, mask); +} diff --git a/modules/wallpaper-engine/effects/twirl/shaders/effects/twirl.vert b/modules/wallpaper-engine/effects/twirl/shaders/effects/twirl.vert new file mode 100644 index 0000000..0832d89 --- /dev/null +++ b/modules/wallpaper-engine/effects/twirl/shaders/effects/twirl.vert @@ -0,0 +1,34 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if MASK == 1 +varying vec2 v_TexCoordMask; +#endif + +uniform float g_Time; + +uniform float g_Amount; // {"material":"amount","label":"ui_editor_properties_amount","default":1.0,"range":[0,2.0]} +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":1.0,"range":[-5,5]} +uniform float g_Phase; // {"material":"phase","label":"ui_editor_properties_time_offset","default":0.0,"range":[0,1]} + +void main() { + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord.xy; + v_TexCoord.z = g_Texture0Resolution.z / g_Texture0Resolution.w; + + v_TexCoord.w = sin(g_Time * g_Speed + g_Phase * 6.28318530718) * g_Amount; + +#if MASK == 1 + v_TexCoordMask = vec2(a_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + a_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/vhs/effect.json b/modules/wallpaper-engine/effects/vhs/effect.json new file mode 100644 index 0000000..bbc2383 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "vhs", + "name" : "ui_editor_effect_vhs_title", + "description" : "ui_editor_effect_vhs_description", + "group" : "colorize", + "preview" : "previewvhs/project.json", + "passes" : + [ + { + "material" : "materials/effects/vhs.json" + } + ], + "dependencies" : + [ + "materials/effects/vhs.json", + "shaders/effects/vhs.frag", + "shaders/effects/vhs.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/materials/effects/vhs.json b/modules/wallpaper-engine/effects/vhs/materials/effects/vhs.json new file mode 100644 index 0000000..8c22b74 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/materials/effects/vhs.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/vhs", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/effects/vhs/effect.json b/modules/wallpaper-engine/effects/vhs/previewvhs/effects/vhs/effect.json new file mode 100644 index 0000000..49f2c68 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/effects/vhs/effect.json @@ -0,0 +1,19 @@ +{ + "version" : 1, + "name" : "ui_editor_effect_vhs_title", + "description" : "ui_editor_effect_vhs_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/vhs.json" + } + ], + "dependencies" : + [ + "materials/effects/vhs.json", + "shaders/effects/vhs.frag", + "shaders/effects/vhs.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effectpreview.json b/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effectpreview.tex b/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effectpreview.tex new file mode 100644 index 0000000..55de60a Binary files /dev/null and b/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effects/vhs.json b/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effects/vhs.json new file mode 100644 index 0000000..8c22b74 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/materials/effects/vhs.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/vhs", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/models/effectpreview.json b/modules/wallpaper-engine/effects/vhs/previewvhs/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/project.json b/modules/wallpaper-engine/effects/vhs/previewvhs/project.json new file mode 100644 index 0000000..c558285 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewvhs", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/scene.json b/modules/wallpaper-engine/effects/vhs/previewvhs/scene.json new file mode 100644 index 0000000..4e89e97 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/scene.json @@ -0,0 +1,83 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.300 0.300 0.300", + "bloom" : false, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.700 0.700 0.700", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "nearz" : 0.0099999997764825821, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.300 0.300 0.300" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/vhs/effect.json", + "id" : 22, + "name" : "", + "passes" : + [ + { + "constantshadervalues" : + { + "artifacts" : 5, + "chromatic" : 0.42999999999999999, + "distortionspeed" : 1.4299999999999999, + "distortionstrength" : 1.3500000000000001, + "distortionwidth" : 1.21, + "scale" : 0.11, + "strength" : 1.29 + }, + "id" : 23, + "textures" : [ null, "util/noise" ] + } + ], + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "ledsource" : false, + "locktransforms" : false, + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "perspective" : false, + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "solid" : true, + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/shaders/effects/vhs.frag b/modules/wallpaper-engine/effects/vhs/previewvhs/shaders/effects/vhs.frag new file mode 100644 index 0000000..0c4ce21 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/shaders/effects/vhs.frag @@ -0,0 +1,72 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":12} +// [COMBO] {"material":"ui_editor_properties_greyscale","combo":"GREYSCALE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_artifacts_negated","combo":"INVERTARTIFACTS","type":"options","default":1} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordGlitch; +varying vec4 v_TexCoordNoise; +varying vec4 v_TexCoordVHSNoise; + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"MASK"} + +uniform float g_Time; + +uniform float g_NoiseAlpha; // {"material":"strength","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 2.0]} +uniform float g_DistortionStrength; // {"material":"distortionstrength","label":"ui_editor_properties_distortion_strength","default":1.0,"range":[0.0, 2.0]} +uniform float g_DistortionSpeed; // {"material":"distortionspeed","label":"ui_editor_properties_distortion_speed","default":1,"range":[0.0, 2.0]} +uniform float g_DistortionWidth; // {"material":"distortionwidth","label":"ui_editor_properties_distortion_width","default":1.0,"range":[0.0, 2.0]} +uniform float g_ArtifactsScale; // {"material":"artifacts","label":"ui_editor_properties_artifacts","default":1.5,"range":[0.0, 3.0]} + +void main() { + + float dblend = sin(g_Time); + dblend = sign(dblend) * pow(abs(max(0.00001, dblend)), 4.0); + vec2 distortion = vec2(dblend * + g_DistortionStrength * 0.02 * + smoothstep(0.01 * g_DistortionWidth, 0.0, abs(frac(g_Time * g_DistortionSpeed) - v_TexCoord.y)), + 0.0); + distortion *= g_NoiseAlpha; + + vec4 orig = texSample2D(g_Texture0, v_TexCoord.xy + distortion); + vec4 albedo; + albedo.ga = orig.ga; + albedo.r = texSample2D(g_Texture0, v_TexCoordGlitch.xy + distortion).r; + albedo.b = texSample2D(g_Texture0, v_TexCoordGlitch.zw + distortion).b; + + vec3 noise = texSample2D(g_Texture1, v_TexCoordNoise.xy).rgb; + vec3 noise2 = texSample2D(g_Texture1, v_TexCoordNoise.zw).gbr; + +#if GREYSCALE == 1 + noise = CAST3(greyscale(noise)); + noise2 = CAST3(greyscale(noise2)); +#endif + + noise = saturate(noise * noise2); + + float blend = 0.1; +#if MASK == 1 + blend *= texSample2D(g_Texture2, v_TexCoord.zw).r; +#endif + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, noise, blend); + albedo.rgb = BlendOpacity(albedo.rgb, smoothstep(0.7, 1.0, noise), BlendLinearDodge, blend); + + vec2 vhsNoise = texSample2D(g_Texture1, v_TexCoordVHSNoise.xy).rg; + vec2 vhsNoise2 = texSample2D(g_Texture1, v_TexCoordVHSNoise.zw).rg; + + float artifactLimiter = pow(g_ArtifactsScale, 0.2); + float artifactsAlpha = step(0.9, vhsNoise.x * artifactLimiter) * step(0.9, vhsNoise2.x * artifactLimiter) * vhsNoise.y * vhsNoise2.y; +#if INVERTARTIFACTS + albedo.rgb = mix(albedo.rgb, CAST3(1.0 - albedo.rgb), artifactsAlpha); +#else + albedo.rgb += CAST3(artifactsAlpha); +#endif + + gl_FragColor = mix(orig, albedo, g_NoiseAlpha); +} diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/shaders/effects/vhs.vert b/modules/wallpaper-engine/effects/vhs/previewvhs/shaders/effects/vhs.vert new file mode 100644 index 0000000..20d3911 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/shaders/effects/vhs.vert @@ -0,0 +1,55 @@ + + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +uniform float g_Time; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordGlitch; +varying vec4 v_TexCoordNoise; +varying vec4 v_TexCoordVHSNoise; + +uniform float g_NoiseScale; // {"material":"scale","label":"ui_editor_properties_scale","default":0.3,"range":[0.01, 1.0]} +uniform float g_Chromatic; // {"material":"chromatic","label":"ui_editor_properties_chromatic_aberration","default":0.1,"range":[0.0, 1.0]} +uniform float g_ArtifactsScale; // {"material":"artifacts","label":"ui_editor_properties_artifacts","default":1.5,"range":[0.0, 3.0]} +uniform float g_NoiseAlpha; // {"material":"strength","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 2.0]} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + + float t = frac(g_Time); + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordNoise.xy = (a_TexCoord.xy + t) * g_NoiseScale; + v_TexCoordNoise.zw = (a_TexCoord.xy - t * 2.5) * g_NoiseScale * 0.52; + v_TexCoordNoise *= vec4(aspect, 1.0, aspect, 1.0); + +#if MASK == 1 + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + + v_TexCoordVHSNoise.xy = v_TexCoordNoise.xy * vec2(0.1, 10) * g_ArtifactsScale; + v_TexCoordVHSNoise.zw = v_TexCoordNoise.zw * vec2(0.01, 2) * g_ArtifactsScale; + + + v_TexCoordGlitch = v_TexCoord.xyxy; + + vec3 glitchOffset = g_Chromatic * smoothstep(0, 2, 1 + 0.5 * sin(g_Time * vec3(11, 7, 13) * 2)) * vec3(0.007, 0.008, 0.0075); + v_TexCoordGlitch.y += 0.004 * g_Chromatic + glitchOffset.x; + v_TexCoordGlitch.xz += glitchOffset.xy + vec2(0.005, -0.0005) * g_Chromatic; + v_TexCoordGlitch.z -= glitchOffset.z + 0.006 * g_Chromatic; + v_TexCoordGlitch.w -= 0.0045 * g_Chromatic; + v_TexCoord.x += glitchOffset.z * min(1.0, g_NoiseAlpha); + v_TexCoord.y -= glitchOffset.z * min(1.0, g_NoiseAlpha); +} diff --git a/modules/wallpaper-engine/effects/vhs/previewvhs/template.json b/modules/wallpaper-engine/effects/vhs/previewvhs/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/previewvhs/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/vhs/shaders/effects/vhs.frag b/modules/wallpaper-engine/effects/vhs/shaders/effects/vhs.frag new file mode 100644 index 0000000..bb9f8dd --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/shaders/effects/vhs.frag @@ -0,0 +1,91 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":12} +// [COMBO] {"material":"ui_editor_properties_greyscale","combo":"GREYSCALE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_artifacts_negated","combo":"INVERTARTIFACTS","type":"options","default":1} + +#include "common.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordGlitchBase; +varying vec4 v_TexCoordGlitch; +varying vec4 v_TexCoordNoise; +varying vec4 v_TexCoordVHSNoise; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","paintdefaultcolor":"0 0 0 1","combo":"MASK"} + +uniform float g_Time; + +uniform float g_NoiseScale; // {"material":"scale","label":"ui_editor_properties_scale","default":0.3,"range":[0.01, 1.0]} +uniform float g_NoiseAlpha; // {"material":"strength","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 2.0]} +uniform float g_DistortionStrength; // {"material":"distortionstrength","label":"ui_editor_properties_distortion_strength","default":1.0,"range":[0.0, 2.0]} +uniform float g_DistortionSpeed; // {"material":"distortionspeed","label":"ui_editor_properties_distortion_speed","default":1,"range":[0.0, 2.0]} +uniform float g_DistortionWidth; // {"material":"distortionwidth","label":"ui_editor_properties_distortion_width","default":1.0,"range":[0.0, 2.0]} +uniform float g_ArtifactsScale; // {"material":"artifacts","label":"ui_editor_properties_artifacts","default":1,"range":[0.0, 3.0]} +uniform float g_Chromatic; // {"material":"chromatic","label":"ui_editor_properties_chromatic_aberration","default":0.3,"range":[0.0, 1.0]} +uniform float g_Tracking; // {"material":"tracking","label":"ui_editor_properties_tracking","default":0.5,"range":[0.0, 2.0]} + +void main() { + float dblend = sin(g_Time); + dblend = sign(dblend) * pow(abs(max(0.00001, dblend)), 4.0); + vec2 distortion = vec2(dblend * + g_DistortionStrength * 0.02 * + smoothstep(0.01 * g_DistortionWidth, 0.0, abs(frac(g_Time * g_DistortionSpeed) - v_TexCoord.y)), + 0.0); + distortion *= g_NoiseAlpha; + + vec4 albedo; + float vhsBlend = 1.0; + + vec2 vhsNoise = texSample2D(g_Texture1, v_TexCoordVHSNoise.xy).rg; + vec2 vhsNoise2 = texSample2D(g_Texture1, v_TexCoordVHSNoise.zw).rg; + + float artifactLimiter = pow(max(g_ArtifactsScale, 0.0001), 0.2); + float artifactsAlpha = step(0.001, g_NoiseScale) * step(0.9, vhsNoise.x * artifactLimiter) * step(0.9, vhsNoise2.x * artifactLimiter) * vhsNoise.y * vhsNoise2.y; + float artifactLimiterChromatic = pow(max(g_Chromatic, 0.0001), 0.2); + float artifactsAlphaChromatic = vhsNoise.x * vhsNoise2.x * artifactLimiterChromatic * vhsNoise.y * vhsNoise2.y; + + vec2 texCoord = v_TexCoord.xy; + vec4 glitchCoords = v_TexCoordGlitch; + texCoord.x += g_NoiseAlpha * artifactsAlphaChromatic * g_Chromatic * 0.1; + + float lineNoise = texSample2D(g_Texture1, vec2(g_Time, v_TexCoordVHSNoise.w)).r; + float lineOffset = step(0.9, lineNoise) * 0.005 * g_Tracking; + texCoord.x += lineOffset; + glitchCoords.xz += CAST2(lineOffset); +#if MASK == 1 + vhsBlend *= texSample2D(g_Texture2, v_TexCoord.zw).r; + vec4 orig = texSample2D(g_Texture0, texCoord + distortion * vhsBlend); + albedo.ra = texSample2D(g_Texture0, v_TexCoordGlitchBase + distortion * vhsBlend).ra; +#else + vec4 orig = texSample2D(g_Texture0, texCoord + distortion); + albedo.ra = orig.ra; +#endif + + albedo.g = texSample2D(g_Texture0, glitchCoords.xy + distortion).g; + albedo.b = texSample2D(g_Texture0, glitchCoords.zw + distortion).b; + + vec3 noise = texSample2D(g_Texture1, v_TexCoordNoise.xy).rgb; + vec3 noise2 = texSample2D(g_Texture1, v_TexCoordNoise.zw).gbr; + +#if GREYSCALE == 1 + noise = CAST3(greyscale(noise)); + noise2 = CAST3(greyscale(noise2)); +#endif + + noise = saturate(noise * noise2); + + float blend = 0.1; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, noise, blend); + albedo.rgb = BlendOpacity(albedo.rgb, smoothstep(0.7, 1.0, noise), BlendLinearDodge, blend); + +#if INVERTARTIFACTS + albedo.rgb = mix(albedo.rgb, CAST3(1.0 - albedo.rgb), artifactsAlpha); +#else + albedo.rgb += CAST3(artifactsAlpha); +#endif + + gl_FragColor = mix(orig, albedo, g_NoiseAlpha * vhsBlend); +} diff --git a/modules/wallpaper-engine/effects/vhs/shaders/effects/vhs.vert b/modules/wallpaper-engine/effects/vhs/shaders/effects/vhs.vert new file mode 100644 index 0000000..f6cffbe --- /dev/null +++ b/modules/wallpaper-engine/effects/vhs/shaders/effects/vhs.vert @@ -0,0 +1,57 @@ + + +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec4 g_Texture0Resolution; + +#if MASK == 1 +uniform vec4 g_Texture2Resolution; +#endif + +uniform float g_Time; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_TexCoordGlitchBase; +varying vec4 v_TexCoordGlitch; +varying vec4 v_TexCoordNoise; +varying vec4 v_TexCoordVHSNoise; + +uniform float g_NoiseScale; // {"material":"scale","label":"ui_editor_properties_scale","default":0.3,"range":[0.01, 1.0]} +uniform float g_Chromatic; // {"material":"chromatic","label":"ui_editor_properties_chromatic_aberration","default":0.3,"range":[0.0, 1.0]} +uniform float g_ArtifactsScale; // {"material":"artifacts","label":"ui_editor_properties_artifacts","default":1,"range":[0.0, 3.0]} +uniform float g_NoiseAlpha; // {"material":"strength","label":"ui_editor_properties_alpha","default":1.0,"range":[0.0, 2.0]} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + float aspect = g_Texture0Resolution.z / g_Texture0Resolution.w; + + float t = frac(g_Time); + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordNoise.xy = (a_TexCoord.xy + t) * g_NoiseScale; + v_TexCoordNoise.zw = (a_TexCoord.xy - t * 2.5) * g_NoiseScale * 0.52; + v_TexCoordNoise *= vec4(aspect, 1.0, aspect, 1.0); + +#if MASK == 1 + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + + v_TexCoordVHSNoise.xy = v_TexCoordNoise.xy * vec2(0.1, 10); + v_TexCoordVHSNoise.zw = v_TexCoordNoise.zw * vec2(0.01, 2); + + + v_TexCoordGlitch = v_TexCoord.xyxy; + + float chromatic = min(g_Chromatic, 0.1); + vec3 glitchOffset = chromatic * smoothstep(0, 2, 1 + 0.5 * sin(g_Time * vec3(11, 7, 13) * 2)) * vec3(0.0019, 0.0021, 0.0017); + v_TexCoordGlitch.y += 0.004 * chromatic + glitchOffset.x; + v_TexCoordGlitch.xz += glitchOffset.xy + vec2(0.005, -0.0005) * chromatic; + v_TexCoordGlitch.z -= glitchOffset.z + 0.006 * chromatic; + v_TexCoordGlitch.w -= 0.0045 * chromatic; + v_TexCoordGlitchBase.x = v_TexCoord.x + glitchOffset.z * min(1.0, g_NoiseAlpha); + v_TexCoordGlitchBase.y = v_TexCoord.y - glitchOffset.z * min(1.0, g_NoiseAlpha); +} diff --git a/modules/wallpaper-engine/effects/waterflow/effect.json b/modules/wallpaper-engine/effects/waterflow/effect.json new file mode 100644 index 0000000..ab16ca5 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/effect.json @@ -0,0 +1,22 @@ +{ + "version" : 1, + "replacementkey" : "waterflow", + "name" : "ui_editor_effect_water_flow_title", + "description" : "ui_editor_effect_water_flow_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterflow.json" + } + ], + "dependencies" : + [ + "materials/effects/waterflow.json", + "materials/effects/waterflowphase.png", + "materials/effects/waterflowphase.tex-json", + "shaders/effects/waterflow.frag", + "shaders/effects/waterflow.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflow.json b/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflow.json new file mode 100644 index 0000000..c63993e --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflow.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/waterflow", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures" : [null, null, "effects/waterflowphase"] + }] +} diff --git a/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflowphase.png b/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflowphase.png new file mode 100644 index 0000000..416a36c Binary files /dev/null and b/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflowphase.png differ diff --git a/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflowphase.tex-json b/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflowphase.tex-json new file mode 100644 index 0000000..89e82a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/materials/effects/waterflowphase.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/effects/waterflow/effect.json b/modules/wallpaper-engine/effects/waterflow/preview/effects/waterflow/effect.json new file mode 100644 index 0000000..5551913 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/effects/waterflow/effect.json @@ -0,0 +1,20 @@ +{ + "name" : "Water Flow", + "description" : "Adds a flow animation. The direction can be controlled with a flow mask that you can paint in the editor.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterflow.json" + } + ], + "dependencies" : + [ + "materials/effects/waterflow.json", + "materials/effects/waterflowphase.png", + "materials/effects/waterflowphase.tex-json", + "shaders/effects/waterflow.frag", + "shaders/effects/waterflow.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflow.json b/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflow.json new file mode 100644 index 0000000..091342f --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflow.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/waterflow", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures" : [null, null, "effects/waterflowphase"] + }] +} diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflowphase.tex b/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflowphase.tex new file mode 100644 index 0000000..701691c Binary files /dev/null and b/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflowphase.tex differ diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflowphase.tex-json b/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflowphase.tex-json new file mode 100644 index 0000000..89e82a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/materials/effects/waterflowphase.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/waterflow/preview/materials/masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..8d549eb Binary files /dev/null and b/modules/wallpaper-engine/effects/waterflow/preview/materials/masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/waterflow/preview/materials/masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/waterflow/preview/materials/masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/materials/masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/waterflow/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/project.json b/modules/wallpaper-engine/effects/waterflow/preview/project.json new file mode 100644 index 0000000..04b06b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "fxpreview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/scene.json b/modules/wallpaper-engine/effects/waterflow/preview/scene.json new file mode 100644 index 0000000..920859f --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/scene.json @@ -0,0 +1,65 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/waterflow/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Speed" : 1, + "Strength" : 1 + }, + "textures" : + [ + null, + "masks/waterflow_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8", + "effects/waterflowphase" + ] + } + ] + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/preview/shaders/effects/waterflow.frag b/modules/wallpaper-engine/effects/waterflow/preview/shaders/effects/waterflow.frag new file mode 100644 index 0000000..0243fa2 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/shaders/effects/waterflow.frag @@ -0,0 +1,32 @@ + +varying vec4 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Flow map","mode":"flowmask","default":"util/noflow"} +uniform sampler2D g_Texture2; // {"material":"Flow phase"} +uniform float g_Time; + +uniform float g_FlowSpeed; // {"material":"Speed","default":1,"range":[0.01, 1]} +uniform float g_FlowAmp; // {"material":"Strength","default":1,"range":[0.01, 1]} + +void main() { + + float flowPhase = (texSample2D(g_Texture2, v_TexCoord.xy).r - 0.5) * 2.0; + vec2 flowColors = texSample2D(g_Texture1, v_TexCoord.zw).rg; + vec2 flowMask = (flowColors.rg - vec2(0.5, 0.5)) * 2.0; + + vec2 cycles = vec2( frac(g_Time * g_FlowSpeed), + frac(g_Time * g_FlowSpeed + 0.5)); + + float blend = 2 * abs(cycles.x - 0.5); + blend = smoothstep(max(0, flowPhase), min(1, 1 + flowPhase), blend); + vec2 flowUVOffset1 = flowMask * g_FlowAmp * 0.1 * (cycles.x - 0.5); + vec2 flowUVOffset2 = flowMask * g_FlowAmp * 0.1 * (cycles.y - 0.5); + + vec4 albedo = mix(texSample2D(g_Texture0, v_TexCoord.xy + flowUVOffset1), + texSample2D(g_Texture0, v_TexCoord.xy + flowUVOffset2), + blend); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/waterflow/preview/shaders/effects/waterflow.vert b/modules/wallpaper-engine/effects/waterflow/preview/shaders/effects/waterflow.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/shaders/effects/waterflow.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/waterflow/preview/template.json b/modules/wallpaper-engine/effects/waterflow/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterflow/shaders/effects/waterflow.frag b/modules/wallpaper-engine/effects/waterflow/shaders/effects/waterflow.frag new file mode 100644 index 0000000..c488d32 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/shaders/effects/waterflow.frag @@ -0,0 +1,46 @@ + +// [OFF_COMBO] {"material":"ui_editor_properties_position","combo":"POSITION","type":"options","default":0,"options":{"Center":0,"Post":1,"Pre":2}} + +varying vec4 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_flow_map","mode":"flowmask","default":"util/noflow"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_time_offset"} +uniform float g_Time; + +uniform float g_FlowSpeed; // {"material":"speed","label":"ui_editor_properties_speed","default":1,"range":[0.01, 2]} +uniform float g_FlowAmp; // {"material":"strength","label":"ui_editor_properties_strength","default":1,"range":[0.01, 1]} +uniform float g_FlowPhaseScale; // {"material":"phasescale","label":"ui_editor_properties_phase_scale","default":2,"range":[0.01, 10]} + +void main() { + + float flowPhase = texSample2D(g_Texture2, v_TexCoord.xy * g_FlowPhaseScale).r; + vec2 flowColors = texSample2D(g_Texture1, v_TexCoord.zw).rg; + vec2 flowMask = (flowColors.rg - vec2(0.498, 0.498)) * 2.0; + float flowAmount = length(flowMask); + + vec4 cycles = vec4(frac(g_Time * g_FlowSpeed), + frac(g_Time * g_FlowSpeed + 0.5), + frac(0.25 + g_Time * g_FlowSpeed), + frac(0.25 + g_Time * g_FlowSpeed + 0.5)); + + float blend = 2 * abs(cycles.x - 0.5); + float blend2 = 2 * abs(cycles.z - 0.5); + + cycles = cycles - CAST4(0.5); + + vec4 flowUVOffset = CAST4(flowMask.xyxy * g_FlowAmp * 0.1) * cycles.xxyy; + vec4 flowUVOffset2 = CAST4(flowMask.xyxy * g_FlowAmp * 0.1) * cycles.zzww; + + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 flowAlbedo = mix(texSample2D(g_Texture0, v_TexCoord.xy + flowUVOffset.xy), + texSample2D(g_Texture0, v_TexCoord.xy + flowUVOffset.zw), + blend); + vec4 flowAlbedo2 = mix(texSample2D(g_Texture0, v_TexCoord.xy + flowUVOffset2.xy), + texSample2D(g_Texture0, v_TexCoord.xy + flowUVOffset2.zw), + blend2); + + flowAlbedo = mix(flowAlbedo, flowAlbedo2, smoothstep(0.2, 0.8, flowPhase)); + gl_FragColor = mix(albedo, flowAlbedo, flowAmount); +} diff --git a/modules/wallpaper-engine/effects/waterflow/shaders/effects/waterflow.vert b/modules/wallpaper-engine/effects/waterflow/shaders/effects/waterflow.vert new file mode 100644 index 0000000..828edc7 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterflow/shaders/effects/waterflow.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/waterripple/effect.json b/modules/wallpaper-engine/effects/waterripple/effect.json new file mode 100644 index 0000000..cbd5098 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/effect.json @@ -0,0 +1,39 @@ +{ + "version" : 1, + "replacementkey" : "waterripple", + "name" : "ui_editor_effect_water_ripple_title", + "description" : "ui_editor_effect_water_ripple_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterripple.json" + } + ], + "dependencies" : + [ + "materials/effects/waterripple.json", + "materials/effects/waterripplenormal.png", + "materials/effects/waterripplenormal.tex-json", + "shaders/effects/waterripple.frag", + "shaders/effects/waterripple.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "condition" : + { + "PERSPECTIVE" : 1 + }, + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripple.json b/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripple.json new file mode 100644 index 0000000..2db88aa --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripple.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effects/waterripple", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures": [null, null, "effects/waterripplenormal"] + }] +} diff --git a/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripplenormal.png b/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripplenormal.png new file mode 100644 index 0000000..0f8a365 Binary files /dev/null and b/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripplenormal.png differ diff --git a/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripplenormal.tex-json b/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripplenormal.tex-json new file mode 100644 index 0000000..89e82a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/materials/effects/waterripplenormal.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/effects/waterripple/effect.json b/modules/wallpaper-engine/effects/waterripple/preview/effects/waterripple/effect.json new file mode 100644 index 0000000..e01485f --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/effects/waterripple/effect.json @@ -0,0 +1,20 @@ +{ + "name" : "Water Ripple", + "description" : "Add a ripple animation. Draw a mask to limit the animation to a specific area of the image.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterripple.json" + } + ], + "dependencies" : + [ + "materials/effects/waterripple.json", + "materials/effects/waterripplenormal.png", + "materials/effects/waterripplenormal.tex-json", + "shaders/effects/waterripple.frag", + "shaders/effects/waterripple.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripple.json b/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripple.json new file mode 100644 index 0000000..8dd2ede --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripple.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/waterripple", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": [null, "effects/waterripplenormal"] + }] +} diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripplenormal.tex b/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripplenormal.tex new file mode 100644 index 0000000..87542cd Binary files /dev/null and b/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripplenormal.tex differ diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripplenormal.tex-json b/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripplenormal.tex-json new file mode 100644 index 0000000..89e82a1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/materials/effects/waterripplenormal.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/waterripple/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..fb0961c Binary files /dev/null and b/modules/wallpaper-engine/effects/waterripple/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/waterripple/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/waterripple/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/materials/masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/waterripple/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/project.json b/modules/wallpaper-engine/effects/waterripple/preview/project.json new file mode 100644 index 0000000..5b1273b --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "fxtemplate" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/scene.json b/modules/wallpaper-engine/effects/waterripple/preview/scene.json new file mode 100644 index 0000000..e95d36f --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/scene.json @@ -0,0 +1,65 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/waterripple/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Ripple strength" : 0.25, + "Scroll speed" : 0.2199999988079071 + }, + "textures" : + [ + null, + "effects/waterripplenormal", + "masks/waterripple_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" + ] + } + ] + } + ], + "id" : 28, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterripple/preview/shaders/effects/waterripple.frag b/modules/wallpaper-engine/effects/waterripple/preview/shaders/effects/waterripple.frag new file mode 100644 index 0000000..b5a8518 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/shaders/effects/waterripple.frag @@ -0,0 +1,26 @@ + +varying vec4 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Water normal"} +uniform sampler2D g_Texture2; // {"material":"Mask","mode":"opacitymask","default":"util/white"} + +uniform float g_Strength; // {"material":"Ripple strength","default":0.1,"range":[0,1]} + +varying vec4 v_TexCoordRipple; + +void main() { + vec2 texCoord = v_TexCoord.xy; + + float mask = texSample2D(g_Texture2, v_TexCoord.zw).r; + + vec3 n1 = texSample2D(g_Texture1, v_TexCoordRipple.xy).xyz * 2 - 1; + vec3 n2 = texSample2D(g_Texture1, v_TexCoordRipple.zw).xyz * 2 - 1; + vec3 normal = normalize(vec3(n1.xy + n2.xy, n1.z)); + + + texCoord.xy += normal.xy * g_Strength * g_Strength * mask; + + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/waterripple/preview/shaders/effects/waterripple.vert b/modules/wallpaper-engine/effects/waterripple/preview/shaders/effects/waterripple.vert new file mode 100644 index 0000000..3ba2d45 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/preview/shaders/effects/waterripple.vert @@ -0,0 +1,45 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture2Resolution; + +uniform float g_AnimationSpeed; // {"material":"Animation speed","default":0.15,"range":[0,0.5]} +uniform float g_Scale; // {"material":"Ripple scale","default":1,"range":[0,10]} +uniform float g_ScrollSpeed; // {"material":"Scroll speed","default":0,"range":[0,0.5]} +uniform float g_Direction; // {"material":"Scroll direction","default":0,"range":[0,6.28]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec4 v_TexCoordRipple; + +vec2 rotateVec2(vec2 v, float r) { + vec2 cs = vec2(cos(r), sin(r)); + return vec2(v.x * cs.x - v.y * cs.y, + v.x * cs.y + v.y * cs.x); +} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + + float piFrac = 0.78539816339744830961566084581988 * 0.5; + float pi = 3.141; + + vec2 coordsRotated = v_TexCoord.xy; + vec2 coordsRotated2 = v_TexCoord.xy * 1.333; + + vec2 scroll = rotateVec2(vec2(0, -1), g_Direction) * g_ScrollSpeed * g_ScrollSpeed * g_Time; + + v_TexCoordRipple.xy = coordsRotated + g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + v_TexCoordRipple.zw = coordsRotated2 - g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + v_TexCoordRipple *= g_Scale; + + float rippleTextureAdjustment = (g_Texture0Resolution.x / g_Texture0Resolution.y); + v_TexCoordRipple.xz *= rippleTextureAdjustment; + + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +} diff --git a/modules/wallpaper-engine/effects/waterripple/shaders/effects/waterripple.frag b/modules/wallpaper-engine/effects/waterripple/shaders/effects/waterripple.frag new file mode 100644 index 0000000..150f9d8 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/shaders/effects/waterripple.frag @@ -0,0 +1,77 @@ + +// [COMBO_OFF] {"material":"ui_editor_properties_specular","combo":"SPECULAR","type":"options","default":0} + +#include "common.h" + +varying vec4 v_TexCoord; +varying vec2 v_Scroll; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_water_normal"} + +uniform float g_Strength; // {"material":"ripplestrength","label":"ui_editor_properties_ripple_strength","default":0.1,"range":[0,1]} +uniform float g_SpecularPower; // {"material":"ripplespecularpower","label":"ui_editor_properties_ripple_specular_power","default":1.0,"range":[0,100]} +uniform float g_SpecularStrength; // {"material":"ripplespecularstrength","label":"ui_editor_properties_ripple_specular_strength","default":1.0,"range":[0,10]} +uniform vec3 g_SpecularColor; // {"material":"ripplespecularcolor","label":"ui_editor_properties_ripple_specular_color","default":"1 1 1","type":"color"} + +#if PERSPECTIVE == 0 +varying vec4 v_TexCoordRipple; +#else +uniform vec4 g_Texture0Resolution; +uniform float g_Time; +uniform float g_AnimationSpeed; // {"material":"animationspeed","label":"ui_editor_properties_animation_speed","default":0.15,"range":[0,0.5]} +uniform float g_Scale; // {"material":"scale","label":"ui_editor_properties_ripple_scale","default":1,"range":[0,10]} +uniform float g_ScrollSpeed; // {"material":"scrollspeed","label":"ui_editor_properties_scroll_speed","default":0,"range":[0,0.5]} +uniform float g_Direction; // {"material":"scrolldirection","label":"ui_editor_properties_scroll_direction","default":0,"direction":true,"conversion":"rad2deg"} +uniform float g_Ratio; // {"material":"ratio","label":"ui_editor_properties_ratio","default":1,"range":[0,10]} +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + vec2 texCoord = v_TexCoord.xy; + +#if MASK == 1 + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1; +#endif + + vec4 rippleCoords; + +#if PERSPECTIVE == 0 + rippleCoords = v_TexCoordRipple; +#else + vec2 coordsRotated = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; + vec2 coordsRotated2 = coordsRotated * 1.333; + + vec2 scroll = rotateVec2(vec2(0, 1), g_Direction) * g_ScrollSpeed * g_ScrollSpeed * g_Time; + + rippleCoords.xy = coordsRotated + g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + rippleCoords.zw = coordsRotated2 - g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + rippleCoords *= g_Scale; + + float rippleTextureAdjustment = (g_Texture0Resolution.x / g_Texture0Resolution.y); + rippleCoords.xz *= rippleTextureAdjustment; + rippleCoords.yw *= g_Ratio; + + mask *= step(0.0, v_TexCoordPerspective.z); +#endif + + vec3 n1 = texSample2D(g_Texture2, rippleCoords.xy).xyz * 2 - 1; + vec3 n2 = texSample2D(g_Texture2, rippleCoords.zw).xyz * 2 - 1; + vec3 normal = normalize(vec3(n1.xy + n2.xy, n1.z)); + + texCoord.xy += normal.xy * g_Strength * g_Strength * mask; + + gl_FragColor = texSample2D(g_Texture0, texCoord); + +#if SPECULAR == 1 + vec2 direction = vec2(0.5, 0.0) - v_TexCoord.xy; + direction = normalize(direction); + float specular = max(0.0, dot(normal.xy, direction)) * max(0.0, dot(direction, vec2(0.0, -1.0))); + + specular = pow(specular, g_SpecularPower) * g_SpecularStrength; + gl_FragColor.rgb += specular * g_SpecularColor * gl_FragColor.a; +#endif +} diff --git a/modules/wallpaper-engine/effects/waterripple/shaders/effects/waterripple.vert b/modules/wallpaper-engine/effects/waterripple/shaders/effects/waterripple.vert new file mode 100644 index 0000000..c05aaf6 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterripple/shaders/effects/waterripple.vert @@ -0,0 +1,64 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if MASK +uniform vec4 g_Texture2Resolution; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +#if PERSPECTIVE == 0 +varying vec4 v_TexCoordRipple; + +uniform vec4 g_Texture0Resolution; +uniform float g_Time; +uniform float g_AnimationSpeed; // {"material":"animationspeed","label":"ui_editor_properties_animation_speed","default":0.15,"range":[0,0.5]} +uniform float g_Scale; // {"material":"scale","label":"ui_editor_properties_ripple_scale","default":1,"range":[0,10]} +uniform float g_ScrollSpeed; // {"material":"scrollspeed","label":"ui_editor_properties_scroll_speed","default":0,"range":[0,0.5]} +uniform float g_Direction; // {"material":"scrolldirection","label":"ui_editor_properties_scroll_direction","default":0,"range":[0,6.28],"direction":true,"conversion":"rad2deg"} +uniform float g_Ratio; // {"material":"ratio","label":"ui_editor_properties_ratio","default":1,"range":[0,10]} +#else +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0 0"} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"1 0"} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"1 1"} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0 1"} + +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if PERSPECTIVE == 0 + vec2 coordsRotated = v_TexCoord.xy; + vec2 coordsRotated2 = v_TexCoord.xy * 1.333; + + vec2 scroll = rotateVec2(vec2(0, 1), g_Direction) * g_ScrollSpeed * g_ScrollSpeed * g_Time; + + v_TexCoordRipple.xy = coordsRotated + g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + v_TexCoordRipple.zw = coordsRotated2 - g_Time * g_AnimationSpeed * g_AnimationSpeed + scroll; + v_TexCoordRipple *= g_Scale; + + float rippleTextureAdjustment = (g_Texture0Resolution.x / g_Texture0Resolution.y); + v_TexCoordRipple.xz *= rippleTextureAdjustment; + v_TexCoordRipple.yw *= g_Ratio; +#else + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif + +#if MASK == 1 + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + v_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/effects/waterwaves/effect.json b/modules/wallpaper-engine/effects/waterwaves/effect.json new file mode 100644 index 0000000..827249f --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/effect.json @@ -0,0 +1,37 @@ +{ + "version" : 1, + "replacementkey" : "waterwaves", + "name" : "ui_editor_effect_water_waves_title", + "description" : "ui_editor_effect_water_waves_description", + "group" : "animate", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterwaves.json" + } + ], + "dependencies" : + [ + "materials/effects/waterwaves.json", + "shaders/effects/waterwaves.frag", + "shaders/effects/waterwaves.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "condition" : + { + "PERSPECTIVE" : 1 + }, + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/materials/effects/waterwaves.json b/modules/wallpaper-engine/effects/waterwaves/materials/effects/waterwaves.json new file mode 100644 index 0000000..208fb12 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/materials/effects/waterwaves.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/waterwaves", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/effects/waterwaves/effect.json b/modules/wallpaper-engine/effects/waterwaves/preview/effects/waterwaves/effect.json new file mode 100644 index 0000000..31b9df1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/effects/waterwaves/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Water Waves", + "description" : "Adds a simple wave effect using sines.", + "group" : "image", + //"preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/waterwaves.json" + } + ], + "dependencies" : + [ + "materials/effects/waterwaves.json", + "shaders/effects/waterwaves.frag", + "shaders/effects/waterwaves.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.tex new file mode 100644 index 0000000..39b54fa Binary files /dev/null and b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/materials/effects/waterwaves.json b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effects/waterwaves.json new file mode 100644 index 0000000..7578767 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/materials/effects/waterwaves.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "effects/waterwaves", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled" + }] +} diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/materials/masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex b/modules/wallpaper-engine/effects/waterwaves/preview/materials/masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex new file mode 100644 index 0000000..e372c9c Binary files /dev/null and b/modules/wallpaper-engine/effects/waterwaves/preview/materials/masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex differ diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/materials/masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json b/modules/wallpaper-engine/effects/waterwaves/preview/materials/masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json new file mode 100644 index 0000000..7d91051 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/materials/masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/waterwaves/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/project.json b/modules/wallpaper-engine/effects/waterwaves/preview/project.json new file mode 100644 index 0000000..22f84fc --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "preview" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/scene.json b/modules/wallpaper-engine/effects/waterwaves/preview/scene.json new file mode 100644 index 0000000..4e97989 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/scene.json @@ -0,0 +1,65 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "depth" : 1, + "effects" : + [ + { + "file" : "effects/waterwaves/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Scale" : 106.68000030517578, + "Speed" : 7.3400001525878906, + "Strength" : 0.2199999988079071 + }, + "textures" : + [ + null, + "masks/waterwaves_mask_ee0d9bbc6d0516b8583c8fb3e841485c0b7ec4e8" + ] + } + ] + } + ], + "id" : 37, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/shaders/effects/waterwaves.frag b/modules/wallpaper-engine/effects/waterwaves/preview/shaders/effects/waterwaves.frag new file mode 100644 index 0000000..a10b195 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/shaders/effects/waterwaves.frag @@ -0,0 +1,22 @@ + +varying vec4 v_TexCoord; +varying vec2 v_Direction; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"Mask","mode":"opacitymask","default":"util/white"} +uniform float g_Time; + +uniform float g_Speed; // {"material":"Speed","default":5,"range":[0.01,50]} +uniform float g_Scale; // {"material":"Scale","default":200,"range":[0.01,1000]} +uniform float g_Strength; // {"material":"Strength","default":0.1,"range":[0.01,1]} + +void main() { + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; + vec2 texCoord = v_TexCoord.xy; + + float distance = g_Time * g_Speed + dot(texCoord, v_Direction) * g_Scale; + vec2 offset = vec2(v_Direction.y, -v_Direction.x); + texCoord += sin(distance) * offset * g_Strength * g_Strength * mask; + + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/shaders/effects/waterwaves.vert b/modules/wallpaper-engine/effects/waterwaves/preview/shaders/effects/waterwaves.vert new file mode 100644 index 0000000..afff019 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/shaders/effects/waterwaves.vert @@ -0,0 +1,23 @@ + +#include "common.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture1Resolution; +uniform float g_Direction; // {"material":"Direction","default":0,"range":[0,6.28]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_Direction; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + + v_Direction = rotateVec2(vec2(0, -1), g_Direction); +} diff --git a/modules/wallpaper-engine/effects/waterwaves/preview/template.json b/modules/wallpaper-engine/effects/waterwaves/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/waterwaves/shaders/effects/waterwaves.frag b/modules/wallpaper-engine/effects/waterwaves/shaders/effects/waterwaves.frag new file mode 100644 index 0000000..112178b --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/shaders/effects/waterwaves.frag @@ -0,0 +1,85 @@ + +#include "common.h" + +varying vec4 v_TexCoord; +varying vec2 v_Direction; + +#if PERSPECTIVE == 1 +varying vec3 v_TexCoordPerspective; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1"} +uniform sampler2D g_Texture2; // {"combo":"TIMEOFFSET","default":"util/black","label":"ui_editor_properties_time_offset","mode":"opacitymask"} +uniform float g_Time; + +uniform float g_Speed; // {"material":"speed","label":"ui_editor_properties_speed","default":5,"range":[0.01,50],"group":"ui_editor_properties_wave"} +uniform float g_Scale; // {"material":"scale","label":"ui_editor_properties_scale","default":200,"range":[0.01,1000],"group":"ui_editor_properties_wave"} +uniform float g_Exponent; // {"material":"exponent","label":"ui_editor_properties_exponent","default":1,"range":[0.51,4],"group":"ui_editor_properties_wave"} +uniform float g_Strength; // {"material":"strength","label":"ui_editor_properties_strength","default":0.1,"range":[0.01,1]} + +#if DUALWAVES == 1 +varying vec2 v_Direction2; + +uniform float g_Speed2; // {"material":"speed2","label":"ui_editor_properties_speed","default":3,"range":[0.01,50],"group":"ui_editor_properties_wave_2"} +uniform float g_Scale2; // {"material":"scale2","label":"ui_editor_properties_scale","default":66,"range":[0.01,1000],"group":"ui_editor_properties_wave_2"} +uniform float g_Offset2; // {"material":"offset2","label":"ui_editor_properties_offset","default":0,"range":[-5,5],"group":"ui_editor_properties_wave_2"} +uniform float g_Exponent2; // {"material":"exponent2","label":"ui_editor_properties_exponent","default":1,"range":[0.51,4],"group":"ui_editor_properties_wave_2"} +#endif + +void main() { +#if MASK + float mask = texSample2D(g_Texture1, v_TexCoord.zw).r; +#else + float mask = 1.0; +#endif + + vec2 texCoord = v_TexCoord.xy; + vec2 texCoordMotion = texCoord; + +#if PERSPECTIVE == 1 + texCoordMotion = v_TexCoordPerspective.xy / v_TexCoordPerspective.z; +#endif + + float pos = abs(dot((texCoordMotion - 0.5), v_Direction)); + float distance = g_Time * g_Speed + dot(texCoordMotion, v_Direction) * g_Scale; + +#if DUALWAVES == 1 + float distance2 = (g_Time + g_Offset2) * g_Speed2 + dot(texCoordMotion, v_Direction2) * g_Scale2; +#endif + +#if PERSPECTIVE == 1 + distance *= step(0.0, v_TexCoordPerspective.z); +#if DUALWAVES == 1 + distance2 *= step(0.0, v_TexCoordPerspective.z); +#endif +#endif + +#if TIMEOFFSET + float timeOffset = texSample2D(g_Texture2, v_TexCoord.zw).r * M_PI_2; + distance += timeOffset; +#if DUALWAVES == 1 + distance2 += timeOffset; +#endif +#endif + + float strength = g_Strength * g_Strength; + + vec2 offset = vec2(v_Direction.y, -v_Direction.x); + float val1 = sin(distance); + float s1 = sign(val1); + val1 = pow(abs(val1), g_Exponent); + +#if DUALWAVES == 1 + vec2 offset2 = vec2(v_Direction2.y, -v_Direction2.x); + float val2 = sin(distance2); + float s2 = sign(val2); + val2 = pow(abs(val2), g_Exponent2); + + texCoord += val1 * s1 * val2 * s2 * offset * strength * mask; +#else + texCoord += val1 * s1 * offset * strength * mask; +#endif + + gl_FragColor = texSample2D(g_Texture0, texCoord); +} diff --git a/modules/wallpaper-engine/effects/waterwaves/shaders/effects/waterwaves.vert b/modules/wallpaper-engine/effects/waterwaves/shaders/effects/waterwaves.vert new file mode 100644 index 0000000..09f9a44 --- /dev/null +++ b/modules/wallpaper-engine/effects/waterwaves/shaders/effects/waterwaves.vert @@ -0,0 +1,58 @@ + +// [COMBO] {"material":"ui_editor_properties_perspective","combo":"PERSPECTIVE","type":"options","default":0} +// [COMBO] {"material":"ui_editor_properties_dual_waves","combo":"DUALWAVES","type":"options","default":0} + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture1Resolution; +uniform vec4 g_Texture2Resolution; +uniform float g_Direction; // {"material":"direction","label":"ui_editor_properties_direction","default":0,"direction":true,"group":"ui_editor_properties_wave"} + +#if DUALWAVES == 1 +uniform float g_Direction2; // {"material":"direction2","label":"direction2","default":0,"direction":true,"group":"ui_editor_properties_wave_2"} +varying vec2 v_Direction2; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec2 v_Direction; + +#if PERSPECTIVE == 1 +uniform vec2 g_Point0; // {"default":"0 0","label":"p0","material":"point0"} +uniform vec2 g_Point1; // {"default":"1 0","label":"p1","material":"point1"} +uniform vec2 g_Point2; // {"default":"1 1","label":"p2","material":"point2"} +uniform vec2 g_Point3; // {"default":"0 1","label":"p3","material":"point3"} + +varying vec3 v_TexCoordPerspective; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord.xyxy; + +#if MASK + v_TexCoord.z *= g_Texture1Resolution.z / g_Texture1Resolution.x; + v_TexCoord.w *= g_Texture1Resolution.w / g_Texture1Resolution.y; +#else +#if TIMEOFFSET + v_TexCoord.z *= g_Texture2Resolution.z / g_Texture2Resolution.x; + v_TexCoord.w *= g_Texture2Resolution.w / g_Texture2Resolution.y; +#endif +#endif + + v_Direction = rotateVec2(vec2(0, 1), g_Direction); + +#if DUALWAVES == 1 + v_Direction2 = rotateVec2(vec2(0, 1), g_Direction2); +#endif + +#if PERSPECTIVE == 1 + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + v_TexCoordPerspective.xyz = mul(vec3(a_TexCoord.xy, 1.0), xform); +#endif +} diff --git a/modules/wallpaper-engine/effects/xray/effect.json b/modules/wallpaper-engine/effects/xray/effect.json new file mode 100644 index 0000000..49db9f0 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/effect.json @@ -0,0 +1,20 @@ +{ + "version" : 1, + "replacementkey" : "xray", + "name" : "ui_editor_effect_xray_title", + "description" : "ui_editor_effect_xray_description", + "group" : "interactive", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/xray.json" + } + ], + "dependencies" : + [ + "materials/effects/xray.json", + "shaders/effects/xray.frag", + "shaders/effects/xray.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/materials/effects/xray.json b/modules/wallpaper-engine/effects/xray/materials/effects/xray.json new file mode 100644 index 0000000..922b802 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/materials/effects/xray.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/xray", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/xray/preview/effects/xray/effect.json b/modules/wallpaper-engine/effects/xray/preview/effects/xray/effect.json new file mode 100644 index 0000000..527341f --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/effects/xray/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "ui_editor_effect_xray_title", + "description" : "ui_editor_effect_xray_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/xray.json" + } + ], + "dependencies" : + [ + "materials/effects/xray.json", + "shaders/effects/xray.frag", + "shaders/effects/xray.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.json b/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.tex b/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.tex new file mode 100644 index 0000000..55de60a Binary files /dev/null and b/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/materials/effects/xray.json b/modules/wallpaper-engine/effects/xray/preview/materials/effects/xray.json new file mode 100644 index 0000000..922b802 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/materials/effects/xray.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/xray", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/effects/xray/preview/materials/x-ray-1704855_960_720.tex b/modules/wallpaper-engine/effects/xray/preview/materials/x-ray-1704855_960_720.tex new file mode 100644 index 0000000..3d6bf3b Binary files /dev/null and b/modules/wallpaper-engine/effects/xray/preview/materials/x-ray-1704855_960_720.tex differ diff --git a/modules/wallpaper-engine/effects/xray/preview/materials/x-ray-1704855_960_720.tex-json b/modules/wallpaper-engine/effects/xray/preview/materials/x-ray-1704855_960_720.tex-json new file mode 100644 index 0000000..2d1f0cf --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/materials/x-ray-1704855_960_720.tex-json @@ -0,0 +1,6 @@ +{ + "bleedtransparentcolors" : true, + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/models/effectpreview.json b/modules/wallpaper-engine/effects/xray/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/project.json b/modules/wallpaper-engine/effects/xray/preview/project.json new file mode 100644 index 0000000..ee34952 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/scene.json b/modules/wallpaper-engine/effects/xray/preview/scene.json new file mode 100644 index 0000000..f3be131 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/scene.json @@ -0,0 +1,68 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "effects" : + [ + { + "file" : "effects/xray/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "ui_editor_particle_element_exponent" : 1.0, + "ui_editor_properties_multiply" : 1.0 + }, + "textures" : [ null, "x-ray-1704855_960_720", "particle/halo" ] + } + ], + "username" : "", + "visible" : true + } + ], + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/preview/shaders/effects/xray.frag b/modules/wallpaper-engine/effects/xray/preview/shaders/effects/xray.frag new file mode 100644 index 0000000..c348ab9 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/shaders/effects/xray.frag @@ -0,0 +1,53 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} + +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec3 v_PointerUV; + +uniform float g_Multiply; // {"material":"ui_editor_properties_multiply","default":1,"range":[0.0, 10.0]} +uniform float g_PointerScale; // {"material":"ui_editor_particle_element_exponent","default":5,"range":[0.01, 20.0]} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_framebuffer","hidden":true} +uniform sampler2D g_Texture1; // {"material":"ui_editor_properties_blend_texture","mode":"rgbmask","default":"util/white"} +uniform sampler2D g_Texture2; // {"material":"ui_editor_properties_sprite","default":"particle/halo"} +uniform sampler2D g_Texture3; // {"material":"ui_editor_properties_opacity_mask","mode":"opacitymask","default":"util/white","combo":"OPACITYMASK"} + + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw); + float blend = mask.a * g_Multiply; + +#if OPACITYMASK == 1 + blend *= texSample2D(g_Texture3, v_TexCoordOpacity).r; +#endif + + // Complete unproject per pixel + vec2 unprojectedUVs = v_PointerUV.xy / v_PointerUV.z; + + vec2 texS = v_TexCoord.xy; + texS.y = 1.0 - texS.y; + unprojectedUVs = (texS - unprojectedUVs); + unprojectedUVs = saturate(unprojectedUVs); + + // Scale sprite image around center + unprojectedUVs -= 0.5; + unprojectedUVs *= g_PointerScale; + unprojectedUVs += 0.5; + + vec2 blendSample = texSample2D(g_Texture2, unprojectedUVs).ra; + blend *= blendSample.x * blendSample.y; + + //blend = 0; + //albedo.rgb = vec3(unprojectedUVs.xy, 0); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, blend); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/xray/preview/shaders/effects/xray.vert b/modules/wallpaper-engine/effects/xray/preview/shaders/effects/xray.vert new file mode 100644 index 0000000..958165c --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/shaders/effects/xray.vert @@ -0,0 +1,38 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture1Resolution; + +#if OPACITYMASK == 1 +uniform vec4 g_Texture3Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +uniform mat4 g_ModelViewProjectionMatrixInverse; + +uniform vec4 g_Texture0Resolution; +uniform vec2 g_PointerPosition; + +varying vec3 v_PointerUV; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + v_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif + + vec2 pointer = g_PointerPosition; + pointer.y = 1.0 - pointer.y; // Flip pointer screen space Y to match texture space Y + v_PointerUV = mul(vec4(pointer * 2 - 1, 0.0, 1.0), g_ModelViewProjectionMatrixInverse).xyw; + v_PointerUV.xy *= 1.0 / g_Texture0Resolution.xy; +} diff --git a/modules/wallpaper-engine/effects/xray/preview/template.json b/modules/wallpaper-engine/effects/xray/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/effects/xray/shaders/effects/xray.frag b/modules/wallpaper-engine/effects/xray/shaders/effects/xray.frag new file mode 100644 index 0000000..78c7ecc --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/shaders/effects/xray.frag @@ -0,0 +1,53 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} + +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec4 v_PointerUV; +varying float v_PointerScale; + +uniform float g_Multiply; // {"material":"multiply","label":"ui_editor_properties_multiply","default":1,"range":[0.0, 10.0]} + +#if OPACITYMASK == 1 +varying vec2 v_TexCoordOpacity; +#endif + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_blend_texture","default":"util/white"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_sprite","default":"particle/halo_6"} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"OPACITYMASK","paintdefaultcolor":"0 0 0 1"} + + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec4 mask = texSample2D(g_Texture1, v_TexCoord.zw); + float blend = mask.a * g_Multiply; + +#if OPACITYMASK + blend *= texSample2D(g_Texture3, v_TexCoordOpacity).r; +#endif + + // Complete unproject per pixel + vec2 unprojectedUVs = v_PointerUV.xy / v_PointerUV.z; + + vec2 texSource = v_TexCoord.xy; + texSource.y = 1.0 - texSource.y; + unprojectedUVs = (texSource - unprojectedUVs); + unprojectedUVs = saturate(unprojectedUVs); + + // Scale sprite image around center + unprojectedUVs -= 0.5; + unprojectedUVs *= v_PointerScale * vec2(1.0, v_PointerUV.w); + unprojectedUVs += 0.5; + + vec2 blendSample = texSample2D(g_Texture2, unprojectedUVs).ra; + blend *= blendSample.x * blendSample.y; + + //blend = 0; + //albedo.rgb = vec3(unprojectedUVs.xy, 0); + + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, mask.rgb, blend); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/effects/xray/shaders/effects/xray.vert b/modules/wallpaper-engine/effects/xray/shaders/effects/xray.vert new file mode 100644 index 0000000..8dd7e89 --- /dev/null +++ b/modules/wallpaper-engine/effects/xray/shaders/effects/xray.vert @@ -0,0 +1,41 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform mat4 g_EffectTextureProjectionMatrixInverse; +uniform vec4 g_Texture0Resolution; +uniform vec4 g_Texture1Resolution; +uniform vec2 g_PointerPosition; + +uniform float g_PointerScale; // {"material":"size","label":"ui_editor_properties_size","default":0.2,"range":[0.0, 1.0]} + +#if OPACITYMASK == 1 +uniform vec4 g_Texture3Resolution; + +varying vec2 v_TexCoordOpacity; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +varying vec4 v_PointerUV; +varying float v_PointerScale; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x, + v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y); + +#if OPACITYMASK == 1 + v_TexCoordOpacity = vec2(v_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + v_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif + + vec2 pointer = g_PointerPosition; + pointer.y = 1.0 - pointer.y; // Flip pointer screen space Y to match texture space Y + v_PointerUV.xyz = mul(vec4(pointer * 2 - 1, 0.0, 1.0), g_EffectTextureProjectionMatrixInverse).xyw; + v_PointerUV.xy *= 0.5; + v_PointerUV.w = g_Texture0Resolution.y / -g_Texture0Resolution.x; + v_PointerScale = mix(999, 1.0 / g_PointerScale, step(0.001, g_PointerScale)); +} diff --git a/modules/wallpaper-engine/fonts/8bitOperatorPlus8-Regular.ttf b/modules/wallpaper-engine/fonts/8bitOperatorPlus8-Regular.ttf new file mode 100644 index 0000000..29cb839 Binary files /dev/null and b/modules/wallpaper-engine/fonts/8bitOperatorPlus8-Regular.ttf differ diff --git a/modules/wallpaper-engine/fonts/Alcubierre.otf b/modules/wallpaper-engine/fonts/Alcubierre.otf new file mode 100644 index 0000000..c5b17d6 Binary files /dev/null and b/modules/wallpaper-engine/fonts/Alcubierre.otf differ diff --git a/modules/wallpaper-engine/fonts/Atami-Regular.otf b/modules/wallpaper-engine/fonts/Atami-Regular.otf new file mode 100644 index 0000000..fcaaa91 Binary files /dev/null and b/modules/wallpaper-engine/fonts/Atami-Regular.otf differ diff --git a/modules/wallpaper-engine/fonts/Blackout 2 AM.ttf b/modules/wallpaper-engine/fonts/Blackout 2 AM.ttf new file mode 100644 index 0000000..c41b34a Binary files /dev/null and b/modules/wallpaper-engine/fonts/Blackout 2 AM.ttf differ diff --git a/modules/wallpaper-engine/fonts/CursedTimerUlil-Aznm.ttf b/modules/wallpaper-engine/fonts/CursedTimerUlil-Aznm.ttf new file mode 100644 index 0000000..eeb1239 Binary files /dev/null and b/modules/wallpaper-engine/fonts/CursedTimerUlil-Aznm.ttf differ diff --git a/modules/wallpaper-engine/fonts/Lazer84.ttf b/modules/wallpaper-engine/fonts/Lazer84.ttf new file mode 100644 index 0000000..369779c Binary files /dev/null and b/modules/wallpaper-engine/fonts/Lazer84.ttf differ diff --git a/modules/wallpaper-engine/fonts/Monofur-PK7og.ttf b/modules/wallpaper-engine/fonts/Monofur-PK7og.ttf new file mode 100644 index 0000000..9aebf80 Binary files /dev/null and b/modules/wallpaper-engine/fonts/Monofur-PK7og.ttf differ diff --git a/modules/wallpaper-engine/fonts/NotoSans-Regular.ttf b/modules/wallpaper-engine/fonts/NotoSans-Regular.ttf new file mode 100644 index 0000000..a1b8994 Binary files /dev/null and b/modules/wallpaper-engine/fonts/NotoSans-Regular.ttf differ diff --git a/modules/wallpaper-engine/fonts/RobotoMono-Regular License.txt b/modules/wallpaper-engine/fonts/RobotoMono-Regular License.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/modules/wallpaper-engine/fonts/RobotoMono-Regular License.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/modules/wallpaper-engine/fonts/RobotoMono-Regular.ttf b/modules/wallpaper-engine/fonts/RobotoMono-Regular.ttf new file mode 100644 index 0000000..d9371a1 Binary files /dev/null and b/modules/wallpaper-engine/fonts/RobotoMono-Regular.ttf differ diff --git a/modules/wallpaper-engine/fonts/SIL Open Font License.txt b/modules/wallpaper-engine/fonts/SIL Open Font License.txt new file mode 100644 index 0000000..3a2564e --- /dev/null +++ b/modules/wallpaper-engine/fonts/SIL Open Font License.txt @@ -0,0 +1,43 @@ +Copyright (c) 2009 - 2014 Grand Chaos Productions (http://grandchaos9000.deviantart.com), with Reserved Font Name 8-bit Operator+. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. + +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). + +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. + +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. + +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/modules/wallpaper-engine/fonts/Segment7Standard.otf b/modules/wallpaper-engine/fonts/Segment7Standard.otf new file mode 100644 index 0000000..7429b0d Binary files /dev/null and b/modules/wallpaper-engine/fonts/Segment7Standard.otf differ diff --git a/modules/wallpaper-engine/fonts/TwemojiMozilla.ttf b/modules/wallpaper-engine/fonts/TwemojiMozilla.ttf new file mode 100644 index 0000000..c47cbbf Binary files /dev/null and b/modules/wallpaper-engine/fonts/TwemojiMozilla.ttf differ diff --git a/modules/wallpaper-engine/fonts/kust.ttf b/modules/wallpaper-engine/fonts/kust.ttf new file mode 100644 index 0000000..6b2c1be Binary files /dev/null and b/modules/wallpaper-engine/fonts/kust.ttf differ diff --git a/modules/wallpaper-engine/fonts/monof_tt-be11.txt b/modules/wallpaper-engine/fonts/monof_tt-be11.txt new file mode 100644 index 0000000..b20cf9b --- /dev/null +++ b/modules/wallpaper-engine/fonts/monof_tt-be11.txt @@ -0,0 +1,20 @@ +------------------------------------------------------------------------ +The monofur typeface by tobias b koehler (unci@tigerden.com) +------------------------------------------------------------------------ + +This is a monospaced geometric rounded sans serif font based on the +eurofurence typeface family. + +The character set includes Roman, Greek and Cyrillic characters as well +as box drawing characters. File format is TrueType for PC (under +Windows, Linux etc). + +These fonts are freeware and can be distributed as long as they are +together with this text file. I would appreciate it though if you could +contact me at unci@tigerden.com if you put them on a server. Free +samples from commercial users are always very welcome. :) + +For more information, please see the uncifonts WWW page at: +http://mercurio.iet.unipi.it/users/tobias/uncifonts.html + +Have fun! tobias b koehler, 2000-04-02 \ No newline at end of file diff --git a/modules/wallpaper-engine/fonts/opensticks.ttf b/modules/wallpaper-engine/fonts/opensticks.ttf new file mode 100644 index 0000000..7d4e9eb Binary files /dev/null and b/modules/wallpaper-engine/fonts/opensticks.ttf differ diff --git a/modules/wallpaper-engine/fonts/spincycle_3d_ot.otf b/modules/wallpaper-engine/fonts/spincycle_3d_ot.otf new file mode 100644 index 0000000..8a5514b Binary files /dev/null and b/modules/wallpaper-engine/fonts/spincycle_3d_ot.otf differ diff --git a/modules/wallpaper-engine/fonts/summer85.ttf b/modules/wallpaper-engine/fonts/summer85.ttf new file mode 100644 index 0000000..830e1b8 Binary files /dev/null and b/modules/wallpaper-engine/fonts/summer85.ttf differ diff --git a/modules/wallpaper-engine/fonts/twemojimozilla.txt b/modules/wallpaper-engine/fonts/twemojimozilla.txt new file mode 100644 index 0000000..67d463b --- /dev/null +++ b/modules/wallpaper-engine/fonts/twemojimozilla.txt @@ -0,0 +1,3 @@ +by Mozilla licensed under CC-BY-4.0 + +https://creativecommons.org/licenses/by/4.0/ \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/cookie/flashlight1.tex b/modules/wallpaper-engine/materials/cookie/flashlight1.tex new file mode 100644 index 0000000..4af91d6 Binary files /dev/null and b/modules/wallpaper-engine/materials/cookie/flashlight1.tex differ diff --git a/modules/wallpaper-engine/materials/cookie/flashlight1.tex-json b/modules/wallpaper-engine/materials/cookie/flashlight1.tex-json new file mode 100644 index 0000000..c65def1 --- /dev/null +++ b/modules/wallpaper-engine/materials/cookie/flashlight1.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgb888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/cookie/flashlight2.tex b/modules/wallpaper-engine/materials/cookie/flashlight2.tex new file mode 100644 index 0000000..60f2384 Binary files /dev/null and b/modules/wallpaper-engine/materials/cookie/flashlight2.tex differ diff --git a/modules/wallpaper-engine/materials/cookie/flashlight2.tex-json b/modules/wallpaper-engine/materials/cookie/flashlight2.tex-json new file mode 100644 index 0000000..c65def1 --- /dev/null +++ b/modules/wallpaper-engine/materials/cookie/flashlight2.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgb888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/cookie/flashlight3.tex b/modules/wallpaper-engine/materials/cookie/flashlight3.tex new file mode 100644 index 0000000..c5e5747 Binary files /dev/null and b/modules/wallpaper-engine/materials/cookie/flashlight3.tex differ diff --git a/modules/wallpaper-engine/materials/cookie/flashlight3.tex-json b/modules/wallpaper-engine/materials/cookie/flashlight3.tex-json new file mode 100644 index 0000000..c65def1 --- /dev/null +++ b/modules/wallpaper-engine/materials/cookie/flashlight3.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgb888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/cookie/flashlight4.tex b/modules/wallpaper-engine/materials/cookie/flashlight4.tex new file mode 100644 index 0000000..7f97a2b Binary files /dev/null and b/modules/wallpaper-engine/materials/cookie/flashlight4.tex differ diff --git a/modules/wallpaper-engine/materials/cookie/flashlight4.tex-json b/modules/wallpaper-engine/materials/cookie/flashlight4.tex-json new file mode 100644 index 0000000..c65def1 --- /dev/null +++ b/modules/wallpaper-engine/materials/cookie/flashlight4.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgb888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/brush.json b/modules/wallpaper-engine/materials/editor/brush.json new file mode 100644 index 0000000..5f02a7c --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/brush.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "brushinvert", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/brushpreview.json b/modules/wallpaper-engine/materials/editor/brushpreview.json new file mode 100644 index 0000000..dd7f427 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/brushpreview.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "brushpreview", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/grid.json b/modules/wallpaper-engine/materials/editor/grid.json new file mode 100644 index 0000000..79dcf56 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/grid.json @@ -0,0 +1,5 @@ +{ + "passes": [{ + "shader": "wireframe" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/lightsprite.json b/modules/wallpaper-engine/materials/editor/lightsprite.json new file mode 100644 index 0000000..0b8dbce --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/lightsprite.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "editorsprite", + "textures": ["editor/lightsprite"], + "blending": "translucent", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/lightsprite.tex b/modules/wallpaper-engine/materials/editor/lightsprite.tex new file mode 100644 index 0000000..556cdbc Binary files /dev/null and b/modules/wallpaper-engine/materials/editor/lightsprite.tex differ diff --git a/modules/wallpaper-engine/materials/editor/lightsprite.tex-json b/modules/wallpaper-engine/materials/editor/lightsprite.tex-json new file mode 100644 index 0000000..6a5febc --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/lightsprite.tex-json @@ -0,0 +1,3 @@ +{ + "format": "rgba8888" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/maskdebug.json b/modules/wallpaper-engine/materials/editor/maskdebug.json new file mode 100644 index 0000000..e096c93 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/maskdebug.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "minimalalpha", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/editor/meshviewportshading.json b/modules/wallpaper-engine/materials/editor/meshviewportshading.json new file mode 100644 index 0000000..03f2093 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/meshviewportshading.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "editor/meshviewportshading", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "normal" + }] +} diff --git a/modules/wallpaper-engine/materials/editor/orthoaxis.json b/modules/wallpaper-engine/materials/editor/orthoaxis.json new file mode 100644 index 0000000..f5a3ed0 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/orthoaxis.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "wireframe", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/orthogrid.json b/modules/wallpaper-engine/materials/editor/orthogrid.json new file mode 100644 index 0000000..8fb5c74 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/orthogrid.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "orthogrid", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/paintbrush.json b/modules/wallpaper-engine/materials/editor/paintbrush.json new file mode 100644 index 0000000..43505c2 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/paintbrush.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "editorpaintbrush", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/paintbrushtypepinch.json b/modules/wallpaper-engine/materials/editor/paintbrushtypepinch.json new file mode 100644 index 0000000..7dd00cf --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/paintbrushtypepinch.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "editorpaintbrush", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "combos": { + "PINCH": 1 + } + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/paintbrushtypesmooth.json b/modules/wallpaper-engine/materials/editor/paintbrushtypesmooth.json new file mode 100644 index 0000000..df60028 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/paintbrushtypesmooth.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "editorpaintbrush", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "combos": { + "BLUR": 1 + } + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/paintbrushtypespin.json b/modules/wallpaper-engine/materials/editor/paintbrushtypespin.json new file mode 100644 index 0000000..aaf893d --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/paintbrushtypespin.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "editorpaintbrush", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "combos": { + "SPIN": 1 + } + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/puppetreferenceoverlay.json b/modules/wallpaper-engine/materials/editor/puppetreferenceoverlay.json new file mode 100644 index 0000000..e096c93 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/puppetreferenceoverlay.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "minimalalpha", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/editor/soundsprite.json b/modules/wallpaper-engine/materials/editor/soundsprite.json new file mode 100644 index 0000000..49b6ac2 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/soundsprite.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "editorsprite", + "textures": ["editor/soundsprite"], + "blending": "translucent", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/soundsprite.tex b/modules/wallpaper-engine/materials/editor/soundsprite.tex new file mode 100644 index 0000000..0a46fc0 Binary files /dev/null and b/modules/wallpaper-engine/materials/editor/soundsprite.tex differ diff --git a/modules/wallpaper-engine/materials/editor/soundsprite.tex-json b/modules/wallpaper-engine/materials/editor/soundsprite.tex-json new file mode 100644 index 0000000..6a5febc --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/soundsprite.tex-json @@ -0,0 +1,3 @@ +{ + "format": "rgba8888" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/spotlightsprite.json b/modules/wallpaper-engine/materials/editor/spotlightsprite.json new file mode 100644 index 0000000..e78464a --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/spotlightsprite.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "editorsprite", + "textures": ["editor/spotlightsprite"], + "blending": "translucent", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/spotlightsprite.tex b/modules/wallpaper-engine/materials/editor/spotlightsprite.tex new file mode 100644 index 0000000..e0e1ea5 Binary files /dev/null and b/modules/wallpaper-engine/materials/editor/spotlightsprite.tex differ diff --git a/modules/wallpaper-engine/materials/editor/spotlightsprite.tex-json b/modules/wallpaper-engine/materials/editor/spotlightsprite.tex-json new file mode 100644 index 0000000..6a5febc --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/spotlightsprite.tex-json @@ -0,0 +1,3 @@ +{ + "format": "rgba8888" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/sunlightsprite.json b/modules/wallpaper-engine/materials/editor/sunlightsprite.json new file mode 100644 index 0000000..8db5db1 --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/sunlightsprite.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "editorsprite", + "textures": ["editor/sunlightsprite"], + "blending": "translucent", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/sunlightsprite.tex b/modules/wallpaper-engine/materials/editor/sunlightsprite.tex new file mode 100644 index 0000000..0e0ba13 Binary files /dev/null and b/modules/wallpaper-engine/materials/editor/sunlightsprite.tex differ diff --git a/modules/wallpaper-engine/materials/editor/sunlightsprite.tex-json b/modules/wallpaper-engine/materials/editor/sunlightsprite.tex-json new file mode 100644 index 0000000..6a5febc --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/sunlightsprite.tex-json @@ -0,0 +1,3 @@ +{ + "format": "rgba8888" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/tubelightsprite.json b/modules/wallpaper-engine/materials/editor/tubelightsprite.json new file mode 100644 index 0000000..7db4dbf --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/tubelightsprite.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "editorsprite", + "textures": ["editor/tubelightsprite"], + "blending": "translucent", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/editor/tubelightsprite.tex b/modules/wallpaper-engine/materials/editor/tubelightsprite.tex new file mode 100644 index 0000000..559413c Binary files /dev/null and b/modules/wallpaper-engine/materials/editor/tubelightsprite.tex differ diff --git a/modules/wallpaper-engine/materials/editor/tubelightsprite.tex-json b/modules/wallpaper-engine/materials/editor/tubelightsprite.tex-json new file mode 100644 index 0000000..6a5febc --- /dev/null +++ b/modules/wallpaper-engine/materials/editor/tubelightsprite.tex-json @@ -0,0 +1,3 @@ +{ + "format": "rgba8888" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/fonts/basefont.json b/modules/wallpaper-engine/materials/fonts/basefont.json new file mode 100644 index 0000000..f4e14cf --- /dev/null +++ b/modules/wallpaper-engine/materials/fonts/basefont.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "font", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode" : "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/fonts/basefont_depth.json b/modules/wallpaper-engine/materials/fonts/basefont_depth.json new file mode 100644 index 0000000..3e595f6 --- /dev/null +++ b/modules/wallpaper-engine/materials/fonts/basefont_depth.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "font", + "blending": "translucent", + "depthtest": "enabled", + "depthwrite": "enabled", + "cullmode" : "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/fonts/basefontrgba.json b/modules/wallpaper-engine/materials/fonts/basefontrgba.json new file mode 100644 index 0000000..718a339 --- /dev/null +++ b/modules/wallpaper-engine/materials/fonts/basefontrgba.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "font", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode" : "nocull", + "combos" : { + "COLORFONT" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/materials/fonts/basefontrgba_depth.json b/modules/wallpaper-engine/materials/fonts/basefontrgba_depth.json new file mode 100644 index 0000000..3d2919c --- /dev/null +++ b/modules/wallpaper-engine/materials/fonts/basefontrgba_depth.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "font", + "blending": "translucent", + "depthtest": "enabled", + "depthwrite": "enabled", + "cullmode" : "nocull", + "combos" : { + "COLORFONT" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/materials/fonts/fontbackground.json b/modules/wallpaper-engine/materials/fonts/fontbackground.json new file mode 100644 index 0000000..92713bc --- /dev/null +++ b/modules/wallpaper-engine/materials/fonts/fontbackground.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flat", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/fonts/fontbackground_depth.json b/modules/wallpaper-engine/materials/fonts/fontbackground_depth.json new file mode 100644 index 0000000..0a14b71 --- /dev/null +++ b/modules/wallpaper-engine/materials/fonts/fontbackground_depth.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flat", + "blending": "translucent", + "depthtest": "enabled", + "depthwrite": "enabled", + "cullmode" : "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/blend_gradient.tex b/modules/wallpaper-engine/materials/gradient/blend_gradient.tex new file mode 100644 index 0000000..04966ba Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/blend_gradient.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/blend_gradient.tex-json b/modules/wallpaper-engine/materials/gradient/blend_gradient.tex-json new file mode 100644 index 0000000..9f1d791 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/blend_gradient.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "r8", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/blend_gradient_reverse.tex b/modules/wallpaper-engine/materials/gradient/blend_gradient_reverse.tex new file mode 100644 index 0000000..28b69ed Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/blend_gradient_reverse.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/blend_gradient_reverse.tex-json b/modules/wallpaper-engine/materials/gradient/blend_gradient_reverse.tex-json new file mode 100644 index 0000000..9f1d791 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/blend_gradient_reverse.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "r8", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_ferro_fluid.tex b/modules/wallpaper-engine/materials/gradient/gradient_ferro_fluid.tex new file mode 100644 index 0000000..e3fe252 Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_ferro_fluid.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_ferro_fluid.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_ferro_fluid.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_ferro_fluid.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_fire.tex b/modules/wallpaper-engine/materials/gradient/gradient_fire.tex new file mode 100644 index 0000000..7bc1dba Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_fire.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_fire.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_fire.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_fire.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_ghost_flame.tex b/modules/wallpaper-engine/materials/gradient/gradient_ghost_flame.tex new file mode 100644 index 0000000..aecf24c Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_ghost_flame.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_ghost_flame.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_ghost_flame.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_ghost_flame.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_ice.tex b/modules/wallpaper-engine/materials/gradient/gradient_ice.tex new file mode 100644 index 0000000..8aaeaf3 Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_ice.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_ice.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_ice.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_ice.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_iridescent.png b/modules/wallpaper-engine/materials/gradient/gradient_iridescent.png new file mode 100644 index 0000000..72e6742 Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_iridescent.png differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_iridescent.tex b/modules/wallpaper-engine/materials/gradient/gradient_iridescent.tex new file mode 100644 index 0000000..89bc71a Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_iridescent.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_iridescent.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_iridescent.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_iridescent.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_neon.tex b/modules/wallpaper-engine/materials/gradient/gradient_neon.tex new file mode 100644 index 0000000..aaf0352 Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_neon.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_neon.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_neon.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_neon.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_rainbow.tex b/modules/wallpaper-engine/materials/gradient/gradient_rainbow.tex new file mode 100644 index 0000000..dd88b6e Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_rainbow.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_rainbow.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_rainbow.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_rainbow.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_swamp.tex b/modules/wallpaper-engine/materials/gradient/gradient_swamp.tex new file mode 100644 index 0000000..05ceb01 Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_swamp.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_swamp.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_swamp.tex-json new file mode 100644 index 0000000..61fe6b9 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_swamp.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_toon.tex b/modules/wallpaper-engine/materials/gradient/gradient_toon.tex new file mode 100644 index 0000000..98a05d0 Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_toon.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_toon.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_toon.tex-json new file mode 100644 index 0000000..9f1d791 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_toon.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "r8", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/gradient/gradient_toon_smooth.tex b/modules/wallpaper-engine/materials/gradient/gradient_toon_smooth.tex new file mode 100644 index 0000000..951157c Binary files /dev/null and b/modules/wallpaper-engine/materials/gradient/gradient_toon_smooth.tex differ diff --git a/modules/wallpaper-engine/materials/gradient/gradient_toon_smooth.tex-json b/modules/wallpaper-engine/materials/gradient/gradient_toon_smooth.tex-json new file mode 100644 index 0000000..9f1d791 --- /dev/null +++ b/modules/wallpaper-engine/materials/gradient/gradient_toon_smooth.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "r8", + "nonpoweroftwo" : true, + "nomip":true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/models/editor/camera.json b/modules/wallpaper-engine/materials/models/editor/camera.json new file mode 100644 index 0000000..a99924f --- /dev/null +++ b/modules/wallpaper-engine/materials/models/editor/camera.json @@ -0,0 +1,19 @@ +{ + "passes" : + [ + { + "combos" : + { + "VERSION" : 2, + "LIGHTING" : 0, + "REFLECTION" : 1 + }, + "constantshadervalues" : { + "reflectivity" : 0.8, + "roughness" : 0.15 + }, + "shader" : "generic3", + "textures" : [ "models/editor/camera" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/models/editor/camera.tex b/modules/wallpaper-engine/materials/models/editor/camera.tex new file mode 100644 index 0000000..a9fb415 Binary files /dev/null and b/modules/wallpaper-engine/materials/models/editor/camera.tex differ diff --git a/modules/wallpaper-engine/materials/particle/animals/fish1.tex b/modules/wallpaper-engine/materials/particle/animals/fish1.tex new file mode 100644 index 0000000..5260e86 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/animals/fish1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/animals/fish1.tex-json b/modules/wallpaper-engine/materials/particle/animals/fish1.tex-json new file mode 100644 index 0000000..f0ad9e9 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/animals/fish1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 16, + "height" : 256, + "width" : 256 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/animals/fish1_preview.gif b/modules/wallpaper-engine/materials/particle/animals/fish1_preview.gif new file mode 100644 index 0000000..25bf109 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/animals/fish1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/animals/jellyfish1.tex b/modules/wallpaper-engine/materials/particle/animals/jellyfish1.tex new file mode 100644 index 0000000..4fc43e3 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/animals/jellyfish1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/animals/jellyfish1.tex-json b/modules/wallpaper-engine/materials/particle/animals/jellyfish1.tex-json new file mode 100644 index 0000000..b30a7a3 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/animals/jellyfish1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 36, + "height" : 170.666, + "width" : 170.6667 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/animals/jellyfish1_preview.gif b/modules/wallpaper-engine/materials/particle/animals/jellyfish1_preview.gif new file mode 100644 index 0000000..316fa67 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/animals/jellyfish1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_0.tex b/modules/wallpaper-engine/materials/particle/beam/beam_0.tex new file mode 100644 index 0000000..e1051ea Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/beam/beam_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_0.tex-json b/modules/wallpaper-engine/materials/particle/beam/beam_0.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/beam/beam_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_1.tex b/modules/wallpaper-engine/materials/particle/beam/beam_1.tex new file mode 100644 index 0000000..f336da9 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/beam/beam_1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_1.tex-json b/modules/wallpaper-engine/materials/particle/beam/beam_1.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/beam/beam_1.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_2.tex b/modules/wallpaper-engine/materials/particle/beam/beam_2.tex new file mode 100644 index 0000000..15b858d Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/beam/beam_2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_2.tex-json b/modules/wallpaper-engine/materials/particle/beam/beam_2.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/beam/beam_2.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_2_fade.tex b/modules/wallpaper-engine/materials/particle/beam/beam_2_fade.tex new file mode 100644 index 0000000..d3169bf Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/beam/beam_2_fade.tex differ diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_2_fade.tex-json b/modules/wallpaper-engine/materials/particle/beam/beam_2_fade.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/beam/beam_2_fade.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_flower_0.tex b/modules/wallpaper-engine/materials/particle/beam/beam_flower_0.tex new file mode 100644 index 0000000..516692d Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/beam/beam_flower_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/beam/beam_flower_0.tex-json b/modules/wallpaper-engine/materials/particle/beam/beam_flower_0.tex-json new file mode 100644 index 0000000..5ea5856 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/beam/beam_flower_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : false +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble1.tex b/modules/wallpaper-engine/materials/particle/bubbles/bubble1.tex new file mode 100644 index 0000000..e72ac33 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble1.tex-json b/modules/wallpaper-engine/materials/particle/bubbles/bubble1.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/bubbles/bubble1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble1_preview.gif b/modules/wallpaper-engine/materials/particle/bubbles/bubble1_preview.gif new file mode 100644 index 0000000..d6046a2 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble1normal.tex b/modules/wallpaper-engine/materials/particle/bubbles/bubble1normal.tex new file mode 100644 index 0000000..a7c51ed Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble1normal.tex differ diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble1normal.tex-json b/modules/wallpaper-engine/materials/particle/bubbles/bubble1normal.tex-json new file mode 100644 index 0000000..68f4ff7 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/bubbles/bubble1normal.tex-json @@ -0,0 +1,3 @@ +{ + "format" : "rgba8888n" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble2.tex b/modules/wallpaper-engine/materials/particle/bubbles/bubble2.tex new file mode 100644 index 0000000..046be85 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble2.tex-json b/modules/wallpaper-engine/materials/particle/bubbles/bubble2.tex-json new file mode 100644 index 0000000..b476006 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/bubbles/bubble2.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "width" : 102.4, + "height" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble2_preview.gif b/modules/wallpaper-engine/materials/particle/bubbles/bubble2_preview.gif new file mode 100644 index 0000000..1072c69 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble2_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble3.tex b/modules/wallpaper-engine/materials/particle/bubbles/bubble3.tex new file mode 100644 index 0000000..a1211a8 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble3.tex-json b/modules/wallpaper-engine/materials/particle/bubbles/bubble3.tex-json new file mode 100644 index 0000000..11ddf13 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/bubbles/bubble3.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/bubbles/bubble3_preview.gif b/modules/wallpaper-engine/materials/particle/bubbles/bubble3_preview.gif new file mode 100644 index 0000000..86efb48 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/bubbles/bubble3_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/chromaticdot.tex b/modules/wallpaper-engine/materials/particle/chromaticdot.tex new file mode 100644 index 0000000..3723edf Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/chromaticdot.tex differ diff --git a/modules/wallpaper-engine/materials/particle/chromaticdot.tex-json b/modules/wallpaper-engine/materials/particle/chromaticdot.tex-json new file mode 100644 index 0000000..6de14bb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/chromaticdot.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/debris/debris1.tex b/modules/wallpaper-engine/materials/particle/debris/debris1.tex new file mode 100644 index 0000000..5c93490 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/debris/debris1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/debris/debris1.tex-json b/modules/wallpaper-engine/materials/particle/debris/debris1.tex-json new file mode 100644 index 0000000..c9ee4f3 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/debris/debris1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : true, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 8, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/debris/debris1_preview.gif b/modules/wallpaper-engine/materials/particle/debris/debris1_preview.gif new file mode 100644 index 0000000..7334c8a Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/debris/debris1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/drop.tex b/modules/wallpaper-engine/materials/particle/drop.tex new file mode 100644 index 0000000..a5f945a Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/drop.tex differ diff --git a/modules/wallpaper-engine/materials/particle/drop.tex-json b/modules/wallpaper-engine/materials/particle/drop.tex-json new file mode 100644 index 0000000..0d9b302 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/drop.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/drop_normal.tex b/modules/wallpaper-engine/materials/particle/drop_normal.tex new file mode 100644 index 0000000..a5ac178 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/drop_normal.tex differ diff --git a/modules/wallpaper-engine/materials/particle/drop_normal.tex-json b/modules/wallpaper-engine/materials/particle/drop_normal.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/drop_normal.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/explosion/explosion1.tex b/modules/wallpaper-engine/materials/particle/explosion/explosion1.tex new file mode 100644 index 0000000..2b73c68 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/explosion/explosion1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/explosion/explosion1.tex-json b/modules/wallpaper-engine/materials/particle/explosion/explosion1.tex-json new file mode 100644 index 0000000..1a40a88 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/explosion/explosion1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : true, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 72, + "height" : 73.143, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/explosion/explosion1_preview.gif b/modules/wallpaper-engine/materials/particle/explosion/explosion1_preview.gif new file mode 100644 index 0000000..8ae54ef Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/explosion/explosion1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/fire/fire1.tex b/modules/wallpaper-engine/materials/particle/fire/fire1.tex new file mode 100644 index 0000000..0372e8c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fire/fire1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/fire/fire1.tex-json b/modules/wallpaper-engine/materials/particle/fire/fire1.tex-json new file mode 100644 index 0000000..f8504cb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/fire/fire1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/fire/fire1_preview.gif b/modules/wallpaper-engine/materials/particle/fire/fire1_preview.gif new file mode 100644 index 0000000..a125c25 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fire/fire1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/fire/fire2.tex b/modules/wallpaper-engine/materials/particle/fire/fire2.tex new file mode 100644 index 0000000..f76f984 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fire/fire2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/fire/fire2.tex-json b/modules/wallpaper-engine/materials/particle/fire/fire2.tex-json new file mode 100644 index 0000000..3ad56c3 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/fire/fire2.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 32, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/fire/fire2_preview.gif b/modules/wallpaper-engine/materials/particle/fire/fire2_preview.gif new file mode 100644 index 0000000..e7d2e0c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fire/fire2_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/fire/fire3.tex b/modules/wallpaper-engine/materials/particle/fire/fire3.tex new file mode 100644 index 0000000..d1feeaf Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fire/fire3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/fire/fire3.tex-json b/modules/wallpaper-engine/materials/particle/fire/fire3.tex-json new file mode 100644 index 0000000..e406075 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/fire/fire3.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 128, + "height" : 128, + "width" : 64 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/fire/fire3_preview.gif b/modules/wallpaper-engine/materials/particle/fire/fire3_preview.gif new file mode 100644 index 0000000..e030a95 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fire/fire3_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/fog/fog1.tex b/modules/wallpaper-engine/materials/particle/fog/fog1.tex new file mode 100644 index 0000000..9b5d8dc Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fog/fog1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/fog/fog1.tex-json b/modules/wallpaper-engine/materials/particle/fog/fog1.tex-json new file mode 100644 index 0000000..f8504cb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/fog/fog1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/fog/fog1_preview.gif b/modules/wallpaper-engine/materials/particle/fog/fog1_preview.gif new file mode 100644 index 0000000..1cc3428 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fog/fog1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/fog/fog2.tex b/modules/wallpaper-engine/materials/particle/fog/fog2.tex new file mode 100644 index 0000000..fb13c67 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fog/fog2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/fog/fog2.tex-json b/modules/wallpaper-engine/materials/particle/fog/fog2.tex-json new file mode 100644 index 0000000..a4aef86 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/fog/fog2.tex-json @@ -0,0 +1,15 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nomip" : false, + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/fog/fog2_preview.gif b/modules/wallpaper-engine/materials/particle/fog/fog2_preview.gif new file mode 100644 index 0000000..13ed16e Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fog/fog2_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/fog/fog3.tex b/modules/wallpaper-engine/materials/particle/fog/fog3.tex new file mode 100644 index 0000000..98579f8 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fog/fog3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/fog/fog3.tex-json b/modules/wallpaper-engine/materials/particle/fog/fog3.tex-json new file mode 100644 index 0000000..a4aef86 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/fog/fog3.tex-json @@ -0,0 +1,15 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nomip" : false, + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/fog/fog3_preview.gif b/modules/wallpaper-engine/materials/particle/fog/fog3_preview.gif new file mode 100644 index 0000000..a6b7161 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/fog/fog3_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/halo.json b/modules/wallpaper-engine/materials/particle/halo.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/materials/particle/halo.tex b/modules/wallpaper-engine/materials/particle/halo.tex new file mode 100644 index 0000000..d5602cc Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/halo.tex differ diff --git a/modules/wallpaper-engine/materials/particle/halo.tex-json b/modules/wallpaper-engine/materials/particle/halo.tex-json new file mode 100644 index 0000000..f83340b --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : true, + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/halo_2.tex b/modules/wallpaper-engine/materials/particle/halo_2.tex new file mode 100644 index 0000000..3741c52 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/halo_2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/halo_2.tex-json b/modules/wallpaper-engine/materials/particle/halo_2.tex-json new file mode 100644 index 0000000..f83340b --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo_2.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : true, + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/halo_3.tex b/modules/wallpaper-engine/materials/particle/halo_3.tex new file mode 100644 index 0000000..60f1e21 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/halo_3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/halo_3.tex-json b/modules/wallpaper-engine/materials/particle/halo_3.tex-json new file mode 100644 index 0000000..f83340b --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo_3.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : true, + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/halo_4.tex b/modules/wallpaper-engine/materials/particle/halo_4.tex new file mode 100644 index 0000000..680fa47 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/halo_4.tex differ diff --git a/modules/wallpaper-engine/materials/particle/halo_4.tex-json b/modules/wallpaper-engine/materials/particle/halo_4.tex-json new file mode 100644 index 0000000..f83340b --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo_4.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : true, + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/halo_5.tex b/modules/wallpaper-engine/materials/particle/halo_5.tex new file mode 100644 index 0000000..7394b2f Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/halo_5.tex differ diff --git a/modules/wallpaper-engine/materials/particle/halo_5.tex-json b/modules/wallpaper-engine/materials/particle/halo_5.tex-json new file mode 100644 index 0000000..6de14bb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo_5.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/halo_6.tex b/modules/wallpaper-engine/materials/particle/halo_6.tex new file mode 100644 index 0000000..9e489f3 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/halo_6.tex differ diff --git a/modules/wallpaper-engine/materials/particle/halo_6.tex-json b/modules/wallpaper-engine/materials/particle/halo_6.tex-json new file mode 100644 index 0000000..f83340b --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/halo_6.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : true, + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/flare_0.tex b/modules/wallpaper-engine/materials/particle/light/flare_0.tex new file mode 100644 index 0000000..43ff89c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/flare_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/flare_0.tex-json b/modules/wallpaper-engine/materials/particle/light/flare_0.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/flare_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/flare_1.tex b/modules/wallpaper-engine/materials/particle/light/flare_1.tex new file mode 100644 index 0000000..bcb4a52 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/flare_1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/flare_1.tex-json b/modules/wallpaper-engine/materials/particle/light/flare_1.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/flare_1.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/flare_2.tex b/modules/wallpaper-engine/materials/particle/light/flare_2.tex new file mode 100644 index 0000000..e5c0572 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/flare_2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/flare_2.tex-json b/modules/wallpaper-engine/materials/particle/light/flare_2.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/flare_2.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_0.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_0.tex new file mode 100644 index 0000000..798a56c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_0.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_0.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_1.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_1.tex new file mode 100644 index 0000000..f37a4f6 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_1.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_1.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_1.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_2.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_2.tex new file mode 100644 index 0000000..d7ce8ba Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_2.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_2.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_2.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_3.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_3.tex new file mode 100644 index 0000000..a78b385 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_3.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_3.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_3.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_4.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_4.tex new file mode 100644 index 0000000..9246e3f Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_4.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_4.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_4.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_4.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_5.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_5.tex new file mode 100644 index 0000000..327e8e1 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_5.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_5.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_5.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_5.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_6.tex b/modules/wallpaper-engine/materials/particle/light/light_shafts_6.tex new file mode 100644 index 0000000..14cd145 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/light/light_shafts_6.tex differ diff --git a/modules/wallpaper-engine/materials/particle/light/light_shafts_6.tex-json b/modules/wallpaper-engine/materials/particle/light/light_shafts_6.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/light/light_shafts_6.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning1.tex b/modules/wallpaper-engine/materials/particle/lightning/lightning1.tex new file mode 100644 index 0000000..dae09b3 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/lightning/lightning1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning1.tex-json b/modules/wallpaper-engine/materials/particle/lightning/lightning1.tex-json new file mode 100644 index 0000000..3d00d1b --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/lightning/lightning1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 64, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning1_preview.gif b/modules/wallpaper-engine/materials/particle/lightning/lightning1_preview.gif new file mode 100644 index 0000000..4d67f91 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/lightning/lightning1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning2.tex b/modules/wallpaper-engine/materials/particle/lightning/lightning2.tex new file mode 100644 index 0000000..2ef520e Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/lightning/lightning2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning2.tex-json b/modules/wallpaper-engine/materials/particle/lightning/lightning2.tex-json new file mode 100644 index 0000000..174d312 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/lightning/lightning2.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 32, + "height" : 64, + "width" : 256 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning2_preview.gif b/modules/wallpaper-engine/materials/particle/lightning/lightning2_preview.gif new file mode 100644 index 0000000..d0bae25 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/lightning/lightning2_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning3.tex b/modules/wallpaper-engine/materials/particle/lightning/lightning3.tex new file mode 100644 index 0000000..903db32 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/lightning/lightning3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning3.tex-json b/modules/wallpaper-engine/materials/particle/lightning/lightning3.tex-json new file mode 100644 index 0000000..17b89e8 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/lightning/lightning3.tex-json @@ -0,0 +1,17 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "alphachannelpriority" : true, + "nomip" : true, + "bleedtransparentcolors" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 50, + "height" : 102.4, + "width" : 204.8 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/lightning/lightning3_preview.gif b/modules/wallpaper-engine/materials/particle/lightning/lightning3_preview.gif new file mode 100644 index 0000000..f25b80e Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/lightning/lightning3_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_0.tex b/modules/wallpaper-engine/materials/particle/magic/glyph_0.tex new file mode 100644 index 0000000..49d03e7 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/magic/glyph_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_0.tex-json b/modules/wallpaper-engine/materials/particle/magic/glyph_0.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/magic/glyph_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_1.tex b/modules/wallpaper-engine/materials/particle/magic/glyph_1.tex new file mode 100644 index 0000000..9b692e7 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/magic/glyph_1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_1.tex-json b/modules/wallpaper-engine/materials/particle/magic/glyph_1.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/magic/glyph_1.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_2.tex b/modules/wallpaper-engine/materials/particle/magic/glyph_2.tex new file mode 100644 index 0000000..f6aba81 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/magic/glyph_2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_2.tex-json b/modules/wallpaper-engine/materials/particle/magic/glyph_2.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/magic/glyph_2.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_3.tex b/modules/wallpaper-engine/materials/particle/magic/glyph_3.tex new file mode 100644 index 0000000..72d98df Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/magic/glyph_3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_3.tex-json b/modules/wallpaper-engine/materials/particle/magic/glyph_3.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/magic/glyph_3.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_4.tex b/modules/wallpaper-engine/materials/particle/magic/glyph_4.tex new file mode 100644 index 0000000..68265ab Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/magic/glyph_4.tex differ diff --git a/modules/wallpaper-engine/materials/particle/magic/glyph_4.tex-json b/modules/wallpaper-engine/materials/particle/magic/glyph_4.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/magic/glyph_4.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/misc/arrow_0.tex b/modules/wallpaper-engine/materials/particle/misc/arrow_0.tex new file mode 100644 index 0000000..6b09b94 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/arrow_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/misc/arrow_0.tex-json b/modules/wallpaper-engine/materials/particle/misc/arrow_0.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/misc/arrow_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/misc/energyball.tex b/modules/wallpaper-engine/materials/particle/misc/energyball.tex new file mode 100644 index 0000000..f57c3d9 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/energyball.tex differ diff --git a/modules/wallpaper-engine/materials/particle/misc/energyball.tex-json b/modules/wallpaper-engine/materials/particle/misc/energyball.tex-json new file mode 100644 index 0000000..60a9547 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/misc/energyball.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 64, + "width" : 64 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/misc/energyball_preview.gif b/modules/wallpaper-engine/materials/particle/misc/energyball_preview.gif new file mode 100644 index 0000000..6c7ce4b Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/energyball_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/misc/lambda.tex b/modules/wallpaper-engine/materials/particle/misc/lambda.tex new file mode 100644 index 0000000..3684a71 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/lambda.tex differ diff --git a/modules/wallpaper-engine/materials/particle/misc/lambda.tex-json b/modules/wallpaper-engine/materials/particle/misc/lambda.tex-json new file mode 100644 index 0000000..fee3558 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/misc/lambda.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "r8", + "nointerpolation" : false, + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/misc/star_0.tex b/modules/wallpaper-engine/materials/particle/misc/star_0.tex new file mode 100644 index 0000000..4bb7f39 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/star_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/misc/star_0.tex-json b/modules/wallpaper-engine/materials/particle/misc/star_0.tex-json new file mode 100644 index 0000000..337b65a --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/misc/star_0.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rg88", + "alphachannelpriority" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/misc/wave.tex b/modules/wallpaper-engine/materials/particle/misc/wave.tex new file mode 100644 index 0000000..324d4b9 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/wave.tex differ diff --git a/modules/wallpaper-engine/materials/particle/misc/wave.tex-json b/modules/wallpaper-engine/materials/particle/misc/wave.tex-json new file mode 100644 index 0000000..b9c9ae6 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/misc/wave.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 24, + "height" : 64, + "width" : 64 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/misc/wave_preview.gif b/modules/wallpaper-engine/materials/particle/misc/wave_preview.gif new file mode 100644 index 0000000..d92fbcb Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/misc/wave_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves1.tex b/modules/wallpaper-engine/materials/particle/nature/leaves1.tex new file mode 100644 index 0000000..846ce5b Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves1.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves1.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves10.tex b/modules/wallpaper-engine/materials/particle/nature/leaves10.tex new file mode 100644 index 0000000..42c28b0 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves10.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves10.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves10.tex-json new file mode 100644 index 0000000..df48053 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves10.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 51.2, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves10_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves10_preview.gif new file mode 100644 index 0000000..9f64253 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves10_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves1_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves1_preview.gif new file mode 100644 index 0000000..84a85c0 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves2.tex b/modules/wallpaper-engine/materials/particle/nature/leaves2.tex new file mode 100644 index 0000000..e17aa8a Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves2.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves2.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves2.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves2_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves2_preview.gif new file mode 100644 index 0000000..60f28fb Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves2_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves3.tex b/modules/wallpaper-engine/materials/particle/nature/leaves3.tex new file mode 100644 index 0000000..3323b30 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves3.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves3.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves3.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves3_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves3_preview.gif new file mode 100644 index 0000000..61c8e9e Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves3_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves4.tex b/modules/wallpaper-engine/materials/particle/nature/leaves4.tex new file mode 100644 index 0000000..c429d87 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves4.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves4.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves4.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves4.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves4_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves4_preview.gif new file mode 100644 index 0000000..fe03cb2 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves4_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves5.tex b/modules/wallpaper-engine/materials/particle/nature/leaves5.tex new file mode 100644 index 0000000..c202746 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves5.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves5.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves5.tex-json new file mode 100644 index 0000000..df48053 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves5.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 51.2, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves5_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves5_preview.gif new file mode 100644 index 0000000..1765a3c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves5_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves6.tex b/modules/wallpaper-engine/materials/particle/nature/leaves6.tex new file mode 100644 index 0000000..a12e131 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves6.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves6.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves6.tex-json new file mode 100644 index 0000000..df48053 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves6.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 51.2, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves6_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves6_preview.gif new file mode 100644 index 0000000..68ce64c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves6_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves7.tex b/modules/wallpaper-engine/materials/particle/nature/leaves7.tex new file mode 100644 index 0000000..5fd3a0a Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves7.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves7.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves7.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves7.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves7_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves7_preview.gif new file mode 100644 index 0000000..fa95b23 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves7_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves8.tex b/modules/wallpaper-engine/materials/particle/nature/leaves8.tex new file mode 100644 index 0000000..37431b0 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves8.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves8.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves8.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves8.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves8_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves8_preview.gif new file mode 100644 index 0000000..7968647 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves8_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves9.tex b/modules/wallpaper-engine/materials/particle/nature/leaves9.tex new file mode 100644 index 0000000..e333878 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves9.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves9.tex-json b/modules/wallpaper-engine/materials/particle/nature/leaves9.tex-json new file mode 100644 index 0000000..8aaca98 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/leaves9.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 30, + "height" : 102.4, + "width" : 85.334 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/leaves9_preview.gif b/modules/wallpaper-engine/materials/particle/nature/leaves9_preview.gif new file mode 100644 index 0000000..59559de Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/leaves9_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/rain1.tex b/modules/wallpaper-engine/materials/particle/nature/rain1.tex new file mode 100644 index 0000000..0e90326 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/rain1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/rain1.tex-json b/modules/wallpaper-engine/materials/particle/nature/rain1.tex-json new file mode 100644 index 0000000..4023134 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/rain1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 4, + "height" : 512, + "width" : 512 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/rain1_preview.gif b/modules/wallpaper-engine/materials/particle/nature/rain1_preview.gif new file mode 100644 index 0000000..3435e5d Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/rain1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/rosepetals.tex b/modules/wallpaper-engine/materials/particle/nature/rosepetals.tex new file mode 100644 index 0000000..af5b263 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/rosepetals.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/rosepetals.tex-json b/modules/wallpaper-engine/materials/particle/nature/rosepetals.tex-json new file mode 100644 index 0000000..9c6bb35 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/rosepetals.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 5, + "height" : 128, + "width" : 102.5 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/rosepetals_preview.gif b/modules/wallpaper-engine/materials/particle/nature/rosepetals_preview.gif new file mode 100644 index 0000000..ea79052 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/rosepetals_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/snow.tex b/modules/wallpaper-engine/materials/particle/nature/snow.tex new file mode 100644 index 0000000..0b9579c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/snow.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/snow.tex-json b/modules/wallpaper-engine/materials/particle/nature/snow.tex-json new file mode 100644 index 0000000..539855a --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/snow.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 4, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/snow_preview.gif b/modules/wallpaper-engine/materials/particle/nature/snow_preview.gif new file mode 100644 index 0000000..d1c2b0b Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/snow_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/nature/waterplants1.tex b/modules/wallpaper-engine/materials/particle/nature/waterplants1.tex new file mode 100644 index 0000000..8cbe096 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/waterplants1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/nature/waterplants1.tex-json b/modules/wallpaper-engine/materials/particle/nature/waterplants1.tex-json new file mode 100644 index 0000000..11ddf13 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/nature/waterplants1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/nature/waterplants1_preview.gif b/modules/wallpaper-engine/materials/particle/nature/waterplants1_preview.gif new file mode 100644 index 0000000..fa73e7a Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/nature/waterplants1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/normal_pinch.tex b/modules/wallpaper-engine/materials/particle/normal_pinch.tex new file mode 100644 index 0000000..536cdb7 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_pinch.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_pinch.tex-json b/modules/wallpaper-engine/materials/particle/normal_pinch.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_pinch.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/normal_pinch_rotate.tex b/modules/wallpaper-engine/materials/particle/normal_pinch_rotate.tex new file mode 100644 index 0000000..f7b75ec Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_pinch_rotate.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_pinch_rotate.tex-json b/modules/wallpaper-engine/materials/particle/normal_pinch_rotate.tex-json new file mode 100644 index 0000000..f41d9db --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_pinch_rotate.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nomip" : false +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/normal_ring.tex b/modules/wallpaper-engine/materials/particle/normal_ring.tex new file mode 100644 index 0000000..1a8b6fd Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_ring.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_ring.tex-json b/modules/wallpaper-engine/materials/particle/normal_ring.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_ring.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/normal_ring_rotate.tex b/modules/wallpaper-engine/materials/particle/normal_ring_rotate.tex new file mode 100644 index 0000000..d73646d Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_ring_rotate.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_ring_rotate.tex-json b/modules/wallpaper-engine/materials/particle/normal_ring_rotate.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_ring_rotate.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/normal_ring_smooth.tex b/modules/wallpaper-engine/materials/particle/normal_ring_smooth.tex new file mode 100644 index 0000000..65f68b2 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_ring_smooth.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_ring_smooth.tex-json b/modules/wallpaper-engine/materials/particle/normal_ring_smooth.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_ring_smooth.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/normal_splash.tex b/modules/wallpaper-engine/materials/particle/normal_splash.tex new file mode 100644 index 0000000..05a1a39 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_splash.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_splash.tex-json b/modules/wallpaper-engine/materials/particle/normal_splash.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_splash.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/normal_swirl.tex b/modules/wallpaper-engine/materials/particle/normal_swirl.tex new file mode 100644 index 0000000..7161a56 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/normal_swirl.tex differ diff --git a/modules/wallpaper-engine/materials/particle/normal_swirl.tex-json b/modules/wallpaper-engine/materials/particle/normal_swirl.tex-json new file mode 100644 index 0000000..06ec912 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/normal_swirl.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888n", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/orientation_debug.tex b/modules/wallpaper-engine/materials/particle/orientation_debug.tex new file mode 100644 index 0000000..992067d Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/orientation_debug.tex differ diff --git a/modules/wallpaper-engine/materials/particle/orientation_debug.tex-json b/modules/wallpaper-engine/materials/particle/orientation_debug.tex-json new file mode 100644 index 0000000..6de14bb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/orientation_debug.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/ring.tex b/modules/wallpaper-engine/materials/particle/ring.tex new file mode 100644 index 0000000..4599720 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/ring.tex differ diff --git a/modules/wallpaper-engine/materials/particle/ring.tex-json b/modules/wallpaper-engine/materials/particle/ring.tex-json new file mode 100644 index 0000000..0d9b302 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/ring.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/sickle.tex b/modules/wallpaper-engine/materials/particle/sickle.tex new file mode 100644 index 0000000..03ae191 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/sickle.tex differ diff --git a/modules/wallpaper-engine/materials/particle/sickle.tex-json b/modules/wallpaper-engine/materials/particle/sickle.tex-json new file mode 100644 index 0000000..6de14bb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/sickle.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke1.tex b/modules/wallpaper-engine/materials/particle/smoke/smoke1.tex new file mode 100644 index 0000000..3b832e4 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke1.tex-json b/modules/wallpaper-engine/materials/particle/smoke/smoke1.tex-json new file mode 100644 index 0000000..f8504cb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/smoke/smoke1.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke1_preview.gif b/modules/wallpaper-engine/materials/particle/smoke/smoke1_preview.gif new file mode 100644 index 0000000..ed4b970 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke1_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke2.tex b/modules/wallpaper-engine/materials/particle/smoke/smoke2.tex new file mode 100644 index 0000000..49e1ec4 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke2.tex differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke2.tex-json b/modules/wallpaper-engine/materials/particle/smoke/smoke2.tex-json new file mode 100644 index 0000000..23e8a8e --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/smoke/smoke2.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke2_preview.gif b/modules/wallpaper-engine/materials/particle/smoke/smoke2_preview.gif new file mode 100644 index 0000000..7eee906 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke2_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke2light.tex b/modules/wallpaper-engine/materials/particle/smoke/smoke2light.tex new file mode 100644 index 0000000..ca4c710 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke2light.tex differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke2light.tex-json b/modules/wallpaper-engine/materials/particle/smoke/smoke2light.tex-json new file mode 100644 index 0000000..60a9547 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/smoke/smoke2light.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 64, + "width" : 64 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke2light_preview.gif b/modules/wallpaper-engine/materials/particle/smoke/smoke2light_preview.gif new file mode 100644 index 0000000..828ce6e Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke2light_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke3.tex b/modules/wallpaper-engine/materials/particle/smoke/smoke3.tex new file mode 100644 index 0000000..f51431a Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke3.tex differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke3.tex-json b/modules/wallpaper-engine/materials/particle/smoke/smoke3.tex-json new file mode 100644 index 0000000..f8504cb --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/smoke/smoke3.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 64, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke3_preview.gif b/modules/wallpaper-engine/materials/particle/smoke/smoke3_preview.gif new file mode 100644 index 0000000..60bdded Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke3_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke4.tex b/modules/wallpaper-engine/materials/particle/smoke/smoke4.tex new file mode 100644 index 0000000..9fd8f4c Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke4.tex differ diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke4.tex-json b/modules/wallpaper-engine/materials/particle/smoke/smoke4.tex-json new file mode 100644 index 0000000..45d62b1 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/smoke/smoke4.tex-json @@ -0,0 +1,14 @@ +{ + "clampuvs" : false, + "format" : "rg88", + "nonpoweroftwo" : true, + "spritesheetsequences" : + [ + { + "duration" : 1, + "frames" : 32, + "height" : 128, + "width" : 128 + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/smoke/smoke4_preview.gif b/modules/wallpaper-engine/materials/particle/smoke/smoke4_preview.gif new file mode 100644 index 0000000..8dead32 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/smoke/smoke4_preview.gif differ diff --git a/modules/wallpaper-engine/materials/particle/star.tex b/modules/wallpaper-engine/materials/particle/star.tex new file mode 100644 index 0000000..2d3f3f1 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/star.tex differ diff --git a/modules/wallpaper-engine/materials/particle/star.tex-json b/modules/wallpaper-engine/materials/particle/star.tex-json new file mode 100644 index 0000000..0d9b302 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/star.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/swirl_0.tex b/modules/wallpaper-engine/materials/particle/swirl_0.tex new file mode 100644 index 0000000..a7a7f60 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/swirl_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/swirl_0.tex-json b/modules/wallpaper-engine/materials/particle/swirl_0.tex-json new file mode 100644 index 0000000..337b65a --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/swirl_0.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rg88", + "alphachannelpriority" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/tech/tech_0.tex b/modules/wallpaper-engine/materials/particle/tech/tech_0.tex new file mode 100644 index 0000000..d1a35d4 Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/tech/tech_0.tex differ diff --git a/modules/wallpaper-engine/materials/particle/tech/tech_0.tex-json b/modules/wallpaper-engine/materials/particle/tech/tech_0.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/tech/tech_0.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/particle/tech/tech_1.tex b/modules/wallpaper-engine/materials/particle/tech/tech_1.tex new file mode 100644 index 0000000..6ae9f3e Binary files /dev/null and b/modules/wallpaper-engine/materials/particle/tech/tech_1.tex differ diff --git a/modules/wallpaper-engine/materials/particle/tech/tech_1.tex-json b/modules/wallpaper-engine/materials/particle/tech/tech_1.tex-json new file mode 100644 index 0000000..3da8f12 --- /dev/null +++ b/modules/wallpaper-engine/materials/particle/tech/tech_1.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rg88", + "alphachannelpriority" : true, + "clampuvs" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/backbufferpassthrough.json b/modules/wallpaper-engine/materials/util/backbufferpassthrough.json new file mode 100644 index 0000000..6a460cf --- /dev/null +++ b/modules/wallpaper-engine/materials/util/backbufferpassthrough.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthroughlinear", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/util/black.png b/modules/wallpaper-engine/materials/util/black.png new file mode 100644 index 0000000..b6aa9ce Binary files /dev/null and b/modules/wallpaper-engine/materials/util/black.png differ diff --git a/modules/wallpaper-engine/materials/util/black.tex b/modules/wallpaper-engine/materials/util/black.tex new file mode 100644 index 0000000..bd82e5a Binary files /dev/null and b/modules/wallpaper-engine/materials/util/black.tex differ diff --git a/modules/wallpaper-engine/materials/util/black.tex-json b/modules/wallpaper-engine/materials/util/black.tex-json new file mode 100644 index 0000000..cfb325f --- /dev/null +++ b/modules/wallpaper-engine/materials/util/black.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : false, + "nointerpolation" : false +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/blur_h_bloom.json b/modules/wallpaper-engine/materials/util/blur_h_bloom.json new file mode 100644 index 0000000..1c2b8c7 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/blur_h_bloom.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "blur_h_bloom", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_8FrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/ccsimple.json b/modules/wallpaper-engine/materials/util/ccsimple.json new file mode 100644 index 0000000..cfe989e --- /dev/null +++ b/modules/wallpaper-engine/materials/util/ccsimple.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "ccsimple", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/clouds_256.png b/modules/wallpaper-engine/materials/util/clouds_256.png new file mode 100644 index 0000000..abc9577 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/clouds_256.png differ diff --git a/modules/wallpaper-engine/materials/util/clouds_256.tex b/modules/wallpaper-engine/materials/util/clouds_256.tex new file mode 100644 index 0000000..5818d75 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/clouds_256.tex differ diff --git a/modules/wallpaper-engine/materials/util/clouds_256.tex-json b/modules/wallpaper-engine/materials/util/clouds_256.tex-json new file mode 100644 index 0000000..e80bb4c --- /dev/null +++ b/modules/wallpaper-engine/materials/util/clouds_256.tex-json @@ -0,0 +1,5 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nointerpolation" : false +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/combine.json b/modules/wallpaper-engine/materials/util/combine.json new file mode 100644 index 0000000..81e381e --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "combine", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer", "util/black"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_dhdr_upsample.json b/modules/wallpaper-engine/materials/util/combine_dhdr_upsample.json new file mode 100644 index 0000000..ba3786d --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_dhdr_upsample.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "combine_hdr", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"], + "combos": { + "DISPLAYHDR" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_hdr_editor.json b/modules/wallpaper-engine/materials/util/combine_hdr_editor.json new file mode 100644 index 0000000..31b66c5 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_hdr_editor.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "combine_hdr_editor", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_hdr_upsample.json b/modules/wallpaper-engine/materials/util/combine_hdr_upsample.json new file mode 100644 index 0000000..3ddd0d8 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_hdr_upsample.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "combine_hdr", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_hdr_upsample_dbg.json b/modules/wallpaper-engine/materials/util/combine_hdr_upsample_dbg.json new file mode 100644 index 0000000..b3e69c6 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_hdr_upsample_dbg.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "combine_hdr", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"], + "combos": { + "COMBINEDBG" : 1 + } + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_hdr_upsample_linear.json b/modules/wallpaper-engine/materials/util/combine_hdr_upsample_linear.json new file mode 100644 index 0000000..e805d6b --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_hdr_upsample_linear.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "combine_hdr", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"], + "combos": { + "LINEAR": 1 + } + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_ldr.json b/modules/wallpaper-engine/materials/util/combine_ldr.json new file mode 100644 index 0000000..b0d04cf --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_ldr.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "combine", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer", "_rt_Bloom"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/combine_srgb.json b/modules/wallpaper-engine/materials/util/combine_srgb.json new file mode 100644 index 0000000..557442c --- /dev/null +++ b/modules/wallpaper-engine/materials/util/combine_srgb.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthroughsrgb", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/compiler_backdrop.json b/modules/wallpaper-engine/materials/util/compiler_backdrop.json new file mode 100644 index 0000000..0da3cef --- /dev/null +++ b/modules/wallpaper-engine/materials/util/compiler_backdrop.json @@ -0,0 +1,7 @@ +{ + "passes": [{ + "shader": "compilerbackdrop", + "depthtest": "disabled", + "blending": "translucent" + }] +} diff --git a/modules/wallpaper-engine/materials/util/composelayer.json b/modules/wallpaper-engine/materials/util/composelayer.json new file mode 100644 index 0000000..de25a06 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/composelayer.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "composelayer", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent", + "cullmode": "nocull", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/composelayer_clearalpha.json b/modules/wallpaper-engine/materials/util/composelayer_clearalpha.json new file mode 100644 index 0000000..66fd566 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/composelayer_clearalpha.json @@ -0,0 +1,13 @@ +{ + "passes": [{ + "shader": "composelayer", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "normal", + "cullmode": "nocull", + "textures": ["_rt_FullFrameBuffer"], + "combos": { + "CLEARALPHA": 1 + } + }] +} diff --git a/modules/wallpaper-engine/materials/util/composelayer_depthtest.json b/modules/wallpaper-engine/materials/util/composelayer_depthtest.json new file mode 100644 index 0000000..3ab1008 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/composelayer_depthtest.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "composelayer", + "depthtest": "enabled", + "depthwrite": "disabled", + "blending": "translucent", + "cullmode": "nocull", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/debugrt.json b/modules/wallpaper-engine/materials/util/debugrt.json new file mode 100644 index 0000000..a0e90f2 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/debugrt.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/debugrt_fb.json b/modules/wallpaper-engine/materials/util/debugrt_fb.json new file mode 100644 index 0000000..a0e90f2 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/debugrt_fb.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/debugrt_fb_bloom.json b/modules/wallpaper-engine/materials/util/debugrt_fb_bloom.json new file mode 100644 index 0000000..91395d3 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/debugrt_fb_bloom.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_Bloom"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/debugrt_fb_eighth.json b/modules/wallpaper-engine/materials/util/debugrt_fb_eighth.json new file mode 100644 index 0000000..f8b94c0 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/debugrt_fb_eighth.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_EighthFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/debugrt_fb_quarter.json b/modules/wallpaper-engine/materials/util/debugrt_fb_quarter.json new file mode 100644 index 0000000..1a91fc5 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/debugrt_fb_quarter.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_QuarterFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/debugrt_reflection.json b/modules/wallpaper-engine/materials/util/debugrt_reflection.json new file mode 100644 index 0000000..854e2d2 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/debugrt_reflection.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_Reflection"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/downsample_eighth_blur_v.json b/modules/wallpaper-engine/materials/util/downsample_eighth_blur_v.json new file mode 100644 index 0000000..1c43564 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/downsample_eighth_blur_v.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "downsample_eighth_blur_v", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_4FrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/downsample_quarter.json b/modules/wallpaper-engine/materials/util/downsample_quarter.json new file mode 100644 index 0000000..111e46f --- /dev/null +++ b/modules/wallpaper-engine/materials/util/downsample_quarter.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "downsample_quarter", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"], + "cullmode" : "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/util/downsample_quarter_bloom.json b/modules/wallpaper-engine/materials/util/downsample_quarter_bloom.json new file mode 100644 index 0000000..d852d61 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/downsample_quarter_bloom.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "downsample_quarter_bloom", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/downsample_quarter_linear.json b/modules/wallpaper-engine/materials/util/downsample_quarter_linear.json new file mode 100644 index 0000000..daf6234 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/downsample_quarter_linear.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "downsample_quarter_linear", + "depthtest": "disabled", + "depthwrite": "disabled", + "textures": ["_rt_FullFrameBuffer"], + "cullmode" : "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/util/effectcomposebackground.json b/modules/wallpaper-engine/materials/util/effectcomposebackground.json new file mode 100644 index 0000000..28aed41 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/effectcomposebackground.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "effectcomposebackground", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "textures": [null, "_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/effectpassthrough.json b/modules/wallpaper-engine/materials/util/effectpassthrough.json new file mode 100644 index 0000000..5cb3d5f --- /dev/null +++ b/modules/wallpaper-engine/materials/util/effectpassthrough.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "genericimage3", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/util/effectpassthrough_4.json b/modules/wallpaper-engine/materials/util/effectpassthrough_4.json new file mode 100644 index 0000000..4f8167f --- /dev/null +++ b/modules/wallpaper-engine/materials/util/effectpassthrough_4.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "genericimage4", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/materials/util/error.json b/modules/wallpaper-engine/materials/util/error.json new file mode 100644 index 0000000..416f255 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/error.json @@ -0,0 +1,5 @@ +{ + "passes": [{ + "shader": "error" + }] +} diff --git a/modules/wallpaper-engine/materials/util/fade.json b/modules/wallpaper-engine/materials/util/fade.json new file mode 100644 index 0000000..55011d6 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/fade.json @@ -0,0 +1,11 @@ +{ + "passes": [{ + "shader": "fade", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent", + "usershadervalues": { + "schemecolor": "tint" + } + }] +} diff --git a/modules/wallpaper-engine/materials/util/flat.json b/modules/wallpaper-engine/materials/util/flat.json new file mode 100644 index 0000000..e3fa738 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/flat.json @@ -0,0 +1,5 @@ +{ + "passes": [{ + "shader": "flat" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/flatalpha.json b/modules/wallpaper-engine/materials/util/flatalpha.json new file mode 100644 index 0000000..4ded798 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/flatalpha.json @@ -0,0 +1,6 @@ +{ + "passes": [{ + "shader": "flat", + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/flatalphavertexcolor.json b/modules/wallpaper-engine/materials/util/flatalphavertexcolor.json new file mode 100644 index 0000000..3dc4fe5 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/flatalphavertexcolor.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flat", + "combos": { + "vertexcolor": 1 + }, + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/flatnormal.png b/modules/wallpaper-engine/materials/util/flatnormal.png new file mode 100644 index 0000000..8baee7e Binary files /dev/null and b/modules/wallpaper-engine/materials/util/flatnormal.png differ diff --git a/modules/wallpaper-engine/materials/util/flatnormal.tex b/modules/wallpaper-engine/materials/util/flatnormal.tex new file mode 100644 index 0000000..519f15c Binary files /dev/null and b/modules/wallpaper-engine/materials/util/flatnormal.tex differ diff --git a/modules/wallpaper-engine/materials/util/flatnormal.tex-json b/modules/wallpaper-engine/materials/util/flatnormal.tex-json new file mode 100644 index 0000000..8f8023d --- /dev/null +++ b/modules/wallpaper-engine/materials/util/flatnormal.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "dxt5n", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/flatpointalphavertexcolor.json b/modules/wallpaper-engine/materials/util/flatpointalphavertexcolor.json new file mode 100644 index 0000000..69254d5 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/flatpointalphavertexcolor.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flatpoint", + "blending": "translucent", + "culling" : "nocull", + "depthwrite" : "disabled", + "depthtest" : "disabled" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/flattexture.json b/modules/wallpaper-engine/materials/util/flattexture.json new file mode 100644 index 0000000..db05cde --- /dev/null +++ b/modules/wallpaper-engine/materials/util/flattexture.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "minimalalpha", + "cullmode": "nocull", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/fullscreenlayer.json b/modules/wallpaper-engine/materials/util/fullscreenlayer.json new file mode 100644 index 0000000..d627fdd --- /dev/null +++ b/modules/wallpaper-engine/materials/util/fullscreenlayer.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent", + "cullmode": "nocull", + "textures": ["_rt_FullFrameBuffer"] + }] +} diff --git a/modules/wallpaper-engine/materials/util/fur.png b/modules/wallpaper-engine/materials/util/fur.png new file mode 100644 index 0000000..2d27336 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/fur.png differ diff --git a/modules/wallpaper-engine/materials/util/fur.tex b/modules/wallpaper-engine/materials/util/fur.tex new file mode 100644 index 0000000..911fc84 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/fur.tex differ diff --git a/modules/wallpaper-engine/materials/util/fur.tex-json b/modules/wallpaper-engine/materials/util/fur.tex-json new file mode 100644 index 0000000..c993d86 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/fur.tex-json @@ -0,0 +1,7 @@ +{ + "clampuvs" : false, + "format" : "r8", + "nointerpolation" : false, + "nomip" : true, + "forcerawcompression" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/gizmo.json b/modules/wallpaper-engine/materials/util/gizmo.json new file mode 100644 index 0000000..3ac9ab1 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/gizmo.json @@ -0,0 +1,6 @@ +{ + "passes": [{ + "shader": "flat", + "cullmode": "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/gizmovertexcolor.json b/modules/wallpaper-engine/materials/util/gizmovertexcolor.json new file mode 100644 index 0000000..99ecc13 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/gizmovertexcolor.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flat", + "combos": { + "vertexcolor": 1 + }, + "cullmode": "nocull" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/hdr_downsample.json b/modules/wallpaper-engine/materials/util/hdr_downsample.json new file mode 100644 index 0000000..7c59891 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/hdr_downsample.json @@ -0,0 +1,7 @@ +{ + "passes": [{ + "shader": "hdr_downsample", + "depthtest": "disabled", + "depthwrite": "disabled" + }] +} diff --git a/modules/wallpaper-engine/materials/util/hdr_downsample_bloom.json b/modules/wallpaper-engine/materials/util/hdr_downsample_bloom.json new file mode 100644 index 0000000..c6b55f6 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/hdr_downsample_bloom.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "hdr_downsample", + "depthtest": "disabled", + "depthwrite": "disabled", + "combos": {"BLOOM":1} + }] +} diff --git a/modules/wallpaper-engine/materials/util/hdr_upsample.json b/modules/wallpaper-engine/materials/util/hdr_upsample.json new file mode 100644 index 0000000..744b518 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/hdr_upsample.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "hdr_downsample", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "combos": {"UPSAMPLE":1} + }] +} diff --git a/modules/wallpaper-engine/materials/util/hdr_upsample_cubic.json b/modules/wallpaper-engine/materials/util/hdr_upsample_cubic.json new file mode 100644 index 0000000..13772ec --- /dev/null +++ b/modules/wallpaper-engine/materials/util/hdr_upsample_cubic.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "hdr_downsample", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "combos": {"UPSAMPLE":1,"BICUBIC":1} + }] +} diff --git a/modules/wallpaper-engine/materials/util/noflow.png b/modules/wallpaper-engine/materials/util/noflow.png new file mode 100644 index 0000000..130c555 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/noflow.png differ diff --git a/modules/wallpaper-engine/materials/util/noflow.tex b/modules/wallpaper-engine/materials/util/noflow.tex new file mode 100644 index 0000000..79720b4 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/noflow.tex differ diff --git a/modules/wallpaper-engine/materials/util/noflow.tex-json b/modules/wallpaper-engine/materials/util/noflow.tex-json new file mode 100644 index 0000000..89e82a1 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/noflow.tex-json @@ -0,0 +1,4 @@ +{ + "format" : "rgba8888", + "nomip" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/noise.png b/modules/wallpaper-engine/materials/util/noise.png new file mode 100644 index 0000000..1e02adf Binary files /dev/null and b/modules/wallpaper-engine/materials/util/noise.png differ diff --git a/modules/wallpaper-engine/materials/util/noise.tex b/modules/wallpaper-engine/materials/util/noise.tex new file mode 100644 index 0000000..6c6b642 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/noise.tex differ diff --git a/modules/wallpaper-engine/materials/util/noise.tex-json b/modules/wallpaper-engine/materials/util/noise.tex-json new file mode 100644 index 0000000..1b7ebb5 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/noise.tex-json @@ -0,0 +1,7 @@ +{ + "clampuvs" : false, + "format" : "rgba8888", + "nointerpolation" : false, + "nomip" : true, + "forcerawcompression" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/occlusiontest.json b/modules/wallpaper-engine/materials/util/occlusiontest.json new file mode 100644 index 0000000..5222ab4 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/occlusiontest.json @@ -0,0 +1,6 @@ +{ + "passes": [{ + "shader": "occlusiontest", + "depthwrite": "disabled" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/shadowcaster.json b/modules/wallpaper-engine/materials/util/shadowcaster.json new file mode 100644 index 0000000..61b90e4 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/shadowcaster.json @@ -0,0 +1,5 @@ +{ + "passes": [{ + "shader": "shadowcaster" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer.json b/modules/wallpaper-engine/materials/util/solidlayer.json new file mode 100644 index 0000000..a811b1f --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flat", + "cullmode": "nocull", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_depthtest.json b/modules/wallpaper-engine/materials/util/solidlayer_depthtest.json new file mode 100644 index 0000000..918dbad --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_depthtest.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "flat", + "cullmode": "nocull", + "depthtest": "enabled", + "depthwrite": "disabled", + "blending": "translucent" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_instance.json b/modules/wallpaper-engine/materials/util/solidlayer_instance.json new file mode 100644 index 0000000..b7c2afa --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_instance.json @@ -0,0 +1,17 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "version" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "util/white" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_instance_3.json b/modules/wallpaper-engine/materials/util/solidlayer_instance_3.json new file mode 100644 index 0000000..b25e432 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_instance_3.json @@ -0,0 +1,17 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "version" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage3", + "textures" : [ "util/white" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_instance_4.json b/modules/wallpaper-engine/materials/util/solidlayer_instance_4.json new file mode 100644 index 0000000..65f4da9 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_instance_4.json @@ -0,0 +1,17 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "version" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage4", + "textures" : [ "util/white" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest.json b/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest.json new file mode 100644 index 0000000..e984687 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest.json @@ -0,0 +1,17 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "version" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "enabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "util/white" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest_3.json b/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest_3.json new file mode 100644 index 0000000..4b66ab7 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest_3.json @@ -0,0 +1,17 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "version" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "enabled", + "depthwrite" : "disabled", + "shader" : "genericimage3", + "textures" : [ "util/white" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest_4.json b/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest_4.json new file mode 100644 index 0000000..cf47165 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/solidlayer_instance_depthtest_4.json @@ -0,0 +1,17 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "version" : 2 + }, + "cullmode" : "nocull", + "depthtest" : "enabled", + "depthwrite" : "disabled", + "shader" : "genericimage4", + "textures" : [ "util/white" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/volumetrics_back.json b/modules/wallpaper-engine/materials/util/volumetrics_back.json new file mode 100644 index 0000000..00106ed --- /dev/null +++ b/modules/wallpaper-engine/materials/util/volumetrics_back.json @@ -0,0 +1,7 @@ +{ + "passes": [{ + "shader": "volumetricsback", + "cullmode": "normal", + "blending": "normal" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/volumetrics_blur_h.json b/modules/wallpaper-engine/materials/util/volumetrics_blur_h.json new file mode 100644 index 0000000..3136a8b --- /dev/null +++ b/modules/wallpaper-engine/materials/util/volumetrics_blur_h.json @@ -0,0 +1,13 @@ +{ + "passes": [{ + "shader": "blur_k3", + "depthwrite": "disabled", + "depthtest": "disabled", + "blending": "normal", + "cullmode" : "nocull", + "combos": { + "VERTICAL": 0 + }, + "textures": ["_rt_volumetricsLightBuffer"] + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/volumetrics_blur_v.json b/modules/wallpaper-engine/materials/util/volumetrics_blur_v.json new file mode 100644 index 0000000..42d408b --- /dev/null +++ b/modules/wallpaper-engine/materials/util/volumetrics_blur_v.json @@ -0,0 +1,13 @@ +{ + "passes": [{ + "shader": "blur_k3", + "depthwrite": "disabled", + "depthtest": "disabled", + "blending": "normal", + "cullmode" : "nocull", + "combos": { + "VERTICAL": 1 + }, + "textures": ["_rt_volumetricsLightBufferB"] + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/volumetrics_combine.json b/modules/wallpaper-engine/materials/util/volumetrics_combine.json new file mode 100644 index 0000000..61e933d --- /dev/null +++ b/modules/wallpaper-engine/materials/util/volumetrics_combine.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "passthrough", + "depthwrite": "disabled", + "depthtest": "disabled", + "blending": "additive", + "cullmode" : "nocull", + "textures": ["_rt_volumetricsLightBuffer"] + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/volumetrics_front.json b/modules/wallpaper-engine/materials/util/volumetrics_front.json new file mode 100644 index 0000000..cbf140b --- /dev/null +++ b/modules/wallpaper-engine/materials/util/volumetrics_front.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "volumetricsfront", + "depthwrite": "disabled", + "depthtest": "disabled", + "cullmode": "normal", + "blending": "additive" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/volumetrics_fullscreen.json b/modules/wallpaper-engine/materials/util/volumetrics_fullscreen.json new file mode 100644 index 0000000..39e6493 --- /dev/null +++ b/modules/wallpaper-engine/materials/util/volumetrics_fullscreen.json @@ -0,0 +1,12 @@ +{ + "passes": [{ + "shader": "volumetricsfront", + "depthwrite": "disabled", + "depthtest": "disabled", + "cullmode": "nocull", + "blending": "additive", + "combos": { + "FULLSCREEN": 1 + } + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/white.png b/modules/wallpaper-engine/materials/util/white.png new file mode 100644 index 0000000..4d48cc3 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/white.png differ diff --git a/modules/wallpaper-engine/materials/util/white.tex b/modules/wallpaper-engine/materials/util/white.tex new file mode 100644 index 0000000..3cbe3f5 Binary files /dev/null and b/modules/wallpaper-engine/materials/util/white.tex differ diff --git a/modules/wallpaper-engine/materials/util/white.tex-json b/modules/wallpaper-engine/materials/util/white.tex-json new file mode 100644 index 0000000..cfb325f --- /dev/null +++ b/modules/wallpaper-engine/materials/util/white.tex-json @@ -0,0 +1,5 @@ +{ + "format" : "rgba8888", + "clampuvs" : false, + "nointerpolation" : false +} \ No newline at end of file diff --git a/modules/wallpaper-engine/materials/util/wireframe.json b/modules/wallpaper-engine/materials/util/wireframe.json new file mode 100644 index 0000000..f77351d --- /dev/null +++ b/modules/wallpaper-engine/materials/util/wireframe.json @@ -0,0 +1,6 @@ +{ + "passes": [{ + "shader": "wireframe", + "depthwrite": "disabled" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/models/editor/camera/camera.mdl b/modules/wallpaper-engine/models/editor/camera/camera.mdl new file mode 100644 index 0000000..7016e64 Binary files /dev/null and b/modules/wallpaper-engine/models/editor/camera/camera.mdl differ diff --git a/modules/wallpaper-engine/models/util/composelayer.json b/modules/wallpaper-engine/models/util/composelayer.json new file mode 100644 index 0000000..58004c0 --- /dev/null +++ b/modules/wallpaper-engine/models/util/composelayer.json @@ -0,0 +1,4 @@ +{ + "material" : "materials/util/composelayer.json", + "passthrough" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/models/util/composelayer_depthtest.json b/modules/wallpaper-engine/models/util/composelayer_depthtest.json new file mode 100644 index 0000000..0a8dc26 --- /dev/null +++ b/modules/wallpaper-engine/models/util/composelayer_depthtest.json @@ -0,0 +1,4 @@ +{ + "material" : "materials/util/composelayer_depthtest.json", + "passthrough" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/models/util/fullscreenlayer.json b/modules/wallpaper-engine/models/util/fullscreenlayer.json new file mode 100644 index 0000000..1b92cd0 --- /dev/null +++ b/modules/wallpaper-engine/models/util/fullscreenlayer.json @@ -0,0 +1,5 @@ +{ + "material" : "materials/util/fullscreenlayer.json", + "fullscreen" : true, + "passthrough" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/models/util/projectlayer.json b/modules/wallpaper-engine/models/util/projectlayer.json new file mode 100644 index 0000000..36b78a4 --- /dev/null +++ b/modules/wallpaper-engine/models/util/projectlayer.json @@ -0,0 +1,6 @@ +{ + "material" : "materials/util/composelayer.json", + "passthrough" : true, + "autosize" : true, + "projectlayer" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/models/util/solidlayer.json b/modules/wallpaper-engine/models/util/solidlayer.json new file mode 100644 index 0000000..39efe85 --- /dev/null +++ b/modules/wallpaper-engine/models/util/solidlayer.json @@ -0,0 +1,4 @@ +{ + "material" : "materials/util/solidlayer.json", + "solidlayer" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/models/util/solidlayer_depthtest.json b/modules/wallpaper-engine/models/util/solidlayer_depthtest.json new file mode 100644 index 0000000..7ee8fa3 --- /dev/null +++ b/modules/wallpaper-engine/models/util/solidlayer_depthtest.json @@ -0,0 +1,4 @@ +{ + "material" : "materials/util/solidlayer_depthtest.json", + "solidlayer" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/particles/example.json b/modules/wallpaper-engine/particles/example.json new file mode 100644 index 0000000..3d45240 --- /dev/null +++ b/modules/wallpaper-engine/particles/example.json @@ -0,0 +1,37 @@ +{ + "material": "materials/particle/halo.json", + "maxcount": 500, + "starttime": 0, + "emitter": [{ + "name": "sphererandom", + "rate": 20, + "origin": "0 0 0", + "directions" : "1 1 0", + "distancemin": 32, + "distancemax": 512 + }], + "initializer": [{ + "name": "lifetimerandom", + "min": 3, + "max": 5 + }, { + "name": "sizerandom", + "min": 50, + "max": 200 + }, { + "name": "velocityrandom", + "min": "-50 -50 0", + "max": "50 50 0" + }, { + "name": "colorrandom", + "min": "255 255 255", + "max": "255 255 255" + }], + "operator": [{ + "name": "movement", + "gravity": "0 0 0" + }, { + "name": "alphafade", + "fadeintime": 0.5 + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/particles/example3d.json b/modules/wallpaper-engine/particles/example3d.json new file mode 100644 index 0000000..5f202b4 --- /dev/null +++ b/modules/wallpaper-engine/particles/example3d.json @@ -0,0 +1,37 @@ +{ + "material": "materials/particle/halo.json", + "maxcount": 500, + "starttime": 0, + "emitter": [{ + "name": "sphererandom", + "rate": 20, + "origin": "0 0 0", + "directions" : "1 1 1", + "distancemin": 0.5, + "distancemax": 1 + }], + "initializer": [{ + "name": "lifetimerandom", + "min": 3, + "max": 5 + }, { + "name": "sizerandom", + "min": 0.1, + "max": 0.5 + }, { + "name": "velocityrandom", + "min": "-1 -1 -1", + "max": "1 1 1" + }, { + "name": "colorrandom", + "min": "255 255 255", + "max": "255 255 255" + }], + "operator": [{ + "name": "movement", + "gravity": "0 0 0" + }, { + "name": "alphafade", + "fadeintime": 0.5 + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/particles/examplecursoravoid.json b/modules/wallpaper-engine/particles/examplecursoravoid.json new file mode 100644 index 0000000..1ac4a46 --- /dev/null +++ b/modules/wallpaper-engine/particles/examplecursoravoid.json @@ -0,0 +1,113 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "id" : 6, + "name" : "boxrandom", + "rate" : 200 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 60, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 181 63", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material": "materials/particle/halo.json", + "maxcount" : 1000, + "operator" : + [ + { + "drag" : 2.50000000000000003, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 9, + "name" : "controlpointattract", + "scale" : -5000, + "threshold" : 64 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/particles/examplecursorfollow.json b/modules/wallpaper-engine/particles/examplecursorfollow.json new file mode 100644 index 0000000..80bb730 --- /dev/null +++ b/modules/wallpaper-engine/particles/examplecursorfollow.json @@ -0,0 +1,116 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 1, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 32, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 150 + } + ], + "flags" : null, + "initializer" : + [ + { + "exponent" : 2, + "id" : 2, + "max" : 4, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "134 132 255", + "min" : "255 130 130", + "name" : "colorrandom" + } + ], + "material": "materials/particle/halo.json", + "maxcount" : 500, + "operator" : + [ + { + "drag" : 0.4, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "name" : "sizechange" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/particles/exampleturbolence.json b/modules/wallpaper-engine/particles/exampleturbolence.json new file mode 100644 index 0000000..6a7a487 --- /dev/null +++ b/modules/wallpaper-engine/particles/exampleturbolence.json @@ -0,0 +1,136 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "locktopointer" : true, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "locktopointer" : false, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemin" : 256, + "id" : 5, + "name" : "sphererandom", + "rate" : 15000 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "exponent" : 3, + "id" : 3, + "max" : 20, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "200 200 0", + "min" : "-200 -200 0", + "name" : "velocityrandom" + } + ], + "material": "materials/particle/halo.json", + "maxcount" : 25000, + "operator" : + [ + { + "drag" : 4.0000000000000001, + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 8, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -10000, + "threshold" : 128 + }, + { + "id" : 9, + "name" : "turbulence", + "scale" : 0.0053000000026077031, + "speedmax" : 1000, + "speedmin" : 500, + "timescale" : -50 + }, + { + "endtime" : 0.80000000000000004, + "endvalue" : "0.2823529411764706 0.7450980392156863 1", + "id" : 10, + "name" : "colorchange", + "starttime" : 0.20000000000000001, + "startvalue" : "1 0.49019607843137253 0.49019607843137253" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.02, + "maxlength" : 5, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/particles/exampleturbolence3d.json b/modules/wallpaper-engine/particles/exampleturbolence3d.json new file mode 100644 index 0000000..c59b088 --- /dev/null +++ b/modules/wallpaper-engine/particles/exampleturbolence3d.json @@ -0,0 +1,141 @@ +{ + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "locktopointer" : true, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "locktopointer" : false, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "locktopointer" : false, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 1", + "distancemax" : 2, + "distancemin" : 1.5, + "id" : 5, + "name" : "sphererandom", + "rate" : 10000, + "speedmax" : -2, + "speedmin" : -6 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 0.1, + "name" : "lifetimerandom" + }, + { + "exponent" : 3, + "id" : 3, + "max" : 0.17, + "min" : 0.08, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1 1 1", + "min" : "-1 -1 -1", + "name" : "velocityrandom" + } + ], + "material" : "materials/particle/halo.json", + "maxcount" : 15000, + "operator" : + [ + { + "drag" : 4.0, + "gravity" : "0 5 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "alphafade" + }, + { + "id" : 8, + "mask" : "1 1 1", + "name" : "turbulence", + "scale" : 0.6, + "speedmax" : 30, + "speedmin" : 10, + "timescale" : -50 + }, + { + "endtime" : 0.80000001, + "endvalue" : "0.2823529411764706 0.7450980392156863 1", + "id" : 9, + "name" : "colorchange", + "starttime" : 0.2, + "startvalue" : "1 0.49019607843137253 0.49019607843137253" + }, + { + "axis" : "0 1 0", + "distanceinner" : 0, + "distanceouter" : 1, + "flags" : 1, + "id" : 10, + "name" : "vortex", + "speedinner" : 0, + "speedouter" : 5 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "maxlength" : 5, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/materials/presets/dna.json b/modules/wallpaper-engine/presets/abstract/materials/presets/dna.json new file mode 100644 index 0000000..6e54cad --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/materials/presets/dna.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/particles/presets/dna.json b/modules/wallpaper-engine/presets/abstract/particles/presets/dna.json new file mode 100644 index 0000000..eebc6b3 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/particles/presets/dna.json @@ -0,0 +1,133 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 500 0" + }, + { + "flags" : 1, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 1", + "distancemax" : 32, + "distancemin" : 32, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 32 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 80, + "min" : 50, + "name" : "sizerandom" + }, + { + "axis" : "0 1 0", + "count" : 2.2000000000000002, + "id" : 4, + "name" : "mapsequencearoundcontrolpoint" + }, + { + "count" : 64, + "id" : 5, + "name" : "mapsequencebetweencontrolpoints" + } + ], + "material" : "materials/presets/dna.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 1, + "id" : 8, + "name" : "alphafade" + }, + { + "axis" : "0 1 0", + "distanceinner" : 0, + "distanceouter" : 0, + "flags" : 1, + "id" : 9, + "name" : "vortex", + "speedinner" : -250, + "speedouter" : -250 + }, + { + "endtime" : 0.69999999999999996, + "endvalue" : "1 0 0", + "id" : 10, + "name" : "colorchange" + }, + { + "endvalue" : 0, + "id" : 11, + "name" : "sizechange", + "startvalue" : 1 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/preset.json b/modules/wallpaper-engine/presets/abstract/preset.json new file mode 100644 index 0000000..a6bf1c5 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/preset.json @@ -0,0 +1,38 @@ +{ + "name" : "ui_editor_preset_abstract_title", + "description" : "ui_editor_preset_abstract_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "DNA", + "value" : 0 + } + ] + }, + "variants" : + [ + { + "preview" : "previewdna/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "DNA", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dna.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dna.json", + "particles/presets/dna.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/previewdna/materials/presets/dna.json b/modules/wallpaper-engine/presets/abstract/previewdna/materials/presets/dna.json new file mode 100644 index 0000000..6e54cad --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/previewdna/materials/presets/dna.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/previewdna/particles/presets/dna.json b/modules/wallpaper-engine/presets/abstract/previewdna/particles/presets/dna.json new file mode 100644 index 0000000..eebc6b3 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/previewdna/particles/presets/dna.json @@ -0,0 +1,133 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 500 0" + }, + { + "flags" : 1, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 1", + "distancemax" : 32, + "distancemin" : 32, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 32 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 80, + "min" : 50, + "name" : "sizerandom" + }, + { + "axis" : "0 1 0", + "count" : 2.2000000000000002, + "id" : 4, + "name" : "mapsequencearoundcontrolpoint" + }, + { + "count" : 64, + "id" : 5, + "name" : "mapsequencebetweencontrolpoints" + } + ], + "material" : "materials/presets/dna.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 1, + "id" : 8, + "name" : "alphafade" + }, + { + "axis" : "0 1 0", + "distanceinner" : 0, + "distanceouter" : 0, + "flags" : 1, + "id" : 9, + "name" : "vortex", + "speedinner" : -250, + "speedouter" : -250 + }, + { + "endtime" : 0.69999999999999996, + "endvalue" : "1 0 0", + "id" : 10, + "name" : "colorchange" + }, + { + "endvalue" : 0, + "id" : 11, + "name" : "sizechange", + "startvalue" : 1 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/previewdna/presets/abstract/preset.json b/modules/wallpaper-engine/presets/abstract/previewdna/presets/abstract/preset.json new file mode 100644 index 0000000..a6bf1c5 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/previewdna/presets/abstract/preset.json @@ -0,0 +1,38 @@ +{ + "name" : "ui_editor_preset_abstract_title", + "description" : "ui_editor_preset_abstract_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "DNA", + "value" : 0 + } + ] + }, + "variants" : + [ + { + "preview" : "previewdna/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "DNA", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dna.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dna.json", + "particles/presets/dna.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/previewdna/project.json b/modules/wallpaper-engine/presets/abstract/previewdna/project.json new file mode 100644 index 0000000..47a2786 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/previewdna/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewdna" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/previewdna/scene.json b/modules/wallpaper-engine/presets/abstract/previewdna/scene.json new file mode 100644 index 0000000..3b86824 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/previewdna/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 6, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "DNA", + "origin" : "128.000 0.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/dna.json", + "scale" : "0.703 0.703 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/abstract/previewdna/template.json b/modules/wallpaper-engine/presets/abstract/previewdna/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/abstract/previewdna/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/materials/presets/bubbles1.json b/modules/wallpaper-engine/presets/bubbles/materials/presets/bubbles1.json new file mode 100644 index 0000000..ec08b3e --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/materials/presets/bubbles1.json @@ -0,0 +1,22 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.0, + "ui_editor_properties_refract_amount" : 0.17000000178813934 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/bubbles/bubble1", "particle/bubbles/bubble1normal" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/materials/presets/bubbles2.json b/modules/wallpaper-engine/presets/bubbles/materials/presets/bubbles2.json new file mode 100644 index 0000000..409c860 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/materials/presets/bubbles2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/bubbles/bubble3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/particles/presets/bubbles1.json b/modules/wallpaper-engine/presets/bubbles/particles/presets/bubbles1.json new file mode 100644 index 0000000..ba7bd1d --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/particles/presets/bubbles1.json @@ -0,0 +1,123 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 15 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "scale" : 0.29999999999999999 + } + ], + "material" : "materials/presets/bubbles1.json", + "maxcount" : 50, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 50 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 10, + "name" : "controlpointattract", + "scale" : -300 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/particles/presets/bubbles2.json b/modules/wallpaper-engine/presets/bubbles/particles/presets/bubbles2.json new file mode 100644 index 0000000..225d486 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/particles/presets/bubbles2.json @@ -0,0 +1,115 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 250, + "min" : 90, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "scale" : 0.29999999999999999, + "speedmax" : 90, + "speedmin" : 10 + } + ], + "material" : "materials/presets/bubbles2.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 100 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.01, + "maxlength" : 2, + "name" : "spritetrail" + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/preset.json b/modules/wallpaper-engine/presets/bubbles/preset.json new file mode 100644 index 0000000..a8a46f9 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_bubbles_title", + "description" : "ui_editor_preset_bubbles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_bubbles_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_bubbles_variant_2", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewbubbles1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Cartoon bubbles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/bubbles1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/bubbles1.json", + "particles/presets/bubbles1.json" + ] + }, + { + "preview" : "previewbubbles2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ocean bubbles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/bubbles2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/bubbles2.json", + "particles/presets/bubbles2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.tga b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/presets/bubbles1.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/presets/bubbles1.json new file mode 100644 index 0000000..ec08b3e --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/materials/presets/bubbles1.json @@ -0,0 +1,22 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.0, + "ui_editor_properties_refract_amount" : 0.17000000178813934 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/bubbles/bubble1", "particle/bubbles/bubble1normal" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/models/effectpreview.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/particles/presets/bubbles1.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/particles/presets/bubbles1.json new file mode 100644 index 0000000..ba7bd1d --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/particles/presets/bubbles1.json @@ -0,0 +1,123 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 15 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "scale" : 0.29999999999999999 + } + ], + "material" : "materials/presets/bubbles1.json", + "maxcount" : 50, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 50 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 10, + "name" : "controlpointattract", + "scale" : -300 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/presets/bubbles/preset.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/presets/bubbles/preset.json new file mode 100644 index 0000000..aade51b --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/presets/bubbles/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_bubbles_title", + "description" : "ui_editor_preset_bubbles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Cartoon", + "value" : 0 + }, + { + "label" : "Ocean", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewbubbles1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Cartoon bubbles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/bubbles1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/bubbles1.json", + "particles/presets/bubbles1.json" + ] + }, + { + "preview" : "previewbubbles2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ocean bubbles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/bubbles2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/bubbles2.json", + "particles/presets/bubbles2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/project.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/project.json new file mode 100644 index 0000000..9252900 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "previewbubbles1" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/scene.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/scene.json new file mode 100644 index 0000000..069b6b3 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Cartoon bubbles", + "origin" : "132.405 11.725 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/bubbles1.json", + "particlesrc" : null, + "scale" : "0.237 0.237 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles1/template.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.tga b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/presets/bubbles2.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/presets/bubbles2.json new file mode 100644 index 0000000..409c860 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/materials/presets/bubbles2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/bubbles/bubble3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/models/effectpreview.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/particles/presets/bubbles2.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/particles/presets/bubbles2.json new file mode 100644 index 0000000..225d486 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/particles/presets/bubbles2.json @@ -0,0 +1,115 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 250, + "min" : 90, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "scale" : 0.29999999999999999, + "speedmax" : 90, + "speedmin" : 10 + } + ], + "material" : "materials/presets/bubbles2.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 100 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.01, + "maxlength" : 2, + "name" : "spritetrail" + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/presets/bubbles/preset.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/presets/bubbles/preset.json new file mode 100644 index 0000000..aade51b --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/presets/bubbles/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_bubbles_title", + "description" : "ui_editor_preset_bubbles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Cartoon", + "value" : 0 + }, + { + "label" : "Ocean", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewbubbles1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Cartoon bubbles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/bubbles1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/bubbles1.json", + "particles/presets/bubbles1.json" + ] + }, + { + "preview" : "previewbubbles2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ocean bubbles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/bubbles2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/bubbles2.json", + "particles/presets/bubbles2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/project.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/project.json new file mode 100644 index 0000000..99ac454 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "previewbubbles2" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/scene.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/scene.json new file mode 100644 index 0000000..6c6e26c --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Ocean bubbles", + "origin" : "129.587 7.497 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/bubbles2.json", + "particlesrc" : null, + "scale" : "0.324 0.324 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/bubbles/previewbubbles2/template.json b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/bubbles/previewbubbles2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/clock/preset.json b/modules/wallpaper-engine/presets/clock/preset.json new file mode 100644 index 0000000..1c63ed2 --- /dev/null +++ b/modules/wallpaper-engine/presets/clock/preset.json @@ -0,0 +1,90 @@ +{ + "name" : "ui_editor_preset_clock_title", + "description" : "ui_editor_preset_clock_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_clock_variant_clock", + "value" : 0 + }, + { + "label" : "ui_editor_preset_clock_variant_3dclock", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewclock/project.json", + "objects" : + [ + { + "alpha" : 1.0, + "anchor" : "none", + "angles" : "0.000 0.000 0.000", + "backgroundcolor" : "0.000 0.000 0.000", + "color" : "1.000 1.000 1.000", + "copybackground" : true, + "font" : "fonts/RobotoMono-Regular.ttf", + "horizontalalign" : "center", + "locktransforms" : false, + "name" : "Clock", + "opaquebackground" : false, + "origin" : "960.000 540.000 0.000", + "parallaxDepth" : "1.000 1.000", + "perspective" : false, + "pointsize" : 32.0, + "scale" : "1.000 1.000 1.000", + "size" : "379.000 117.000", + "solid" : true, + "text" : + { + "script" : "'use strict';\n\nexport var scriptProperties = createScriptProperties()\n\t// Whether you want a 24h or 12h style format\n\t.addCheckbox({\n\t\tname: 'use24hFormat',\n\t\tlabel: 'ui_editor_properties_use_24h_format',\n\t\tvalue: true\n\t})\n\t// Whether you want to see the seconds or not\n\t.addCheckbox({\n\t\tname: 'showSeconds',\n\t\tlabel: 'ui_editor_properties_show_seconds',\n\t\tvalue: false\n\t})\n\t// This will be used to separate each element\n\t.addText({\n\t\tname: 'delimiter',\n\t\tlabel: 'ui_editor_properties_delimiter',\n\t\tvalue: ':'\n\t})\n\t.finish();\n\n/**\n * @param {String} value (for property 'text')\n */\nexport function update(value) {\n\tlet time = new Date();\n\tvar hours = time.getHours();\n\tif (!scriptProperties.use24hFormat) {\n\t\thours %= 12;\n\t\tif (hours == 0) {\n\t\t\thours = 12;\n\t\t}\n\t}\n\thours = (\"00\" + hours).slice(-2);\n\tlet minutes = (\"00\" + time.getMinutes()).slice(-2);\n\tvalue = hours + scriptProperties.delimiter + minutes;\n\tif (scriptProperties.showSeconds) {\n\t\tlet seconds = (\"00\" + time.getSeconds()).slice(-2);\n\t\tvalue += scriptProperties.delimiter + seconds;\n\t}\n\treturn value;\n}\n", + "value" : "12:34" + }, + "verticalalign" : "center", + "visible" : true + } + ] + }, + { + "preview" : "preview3dclock/project.json", + "objects" : + [ + { + "alpha" : 1.0, + "anchor" : "none", + "angles" : "0.000 0.000 0.000", + "backgroundcolor" : "0.000 0.000 0.000", + "color" : "1.000 1.000 1.000", + "copybackground" : true, + "font" : "fonts/Monofur-PK7og.ttf", + "horizontalalign" : "center", + "locktransforms" : false, + "name" : "3D Clock", + "opaquebackground" : false, + "origin" : "960.000 540.000 0.000", + "parallaxDepth" : "1.000 1.000", + "perspective" : true, + "pointsize" : 32.0, + "scale" : "1.000 1.000 1.000", + "size" : "500.000 100.000", + "solid" : true, + "text" : + { + "script" : "'use strict';\n\nimport * as WEMath from 'WEMath';\n\n// This will be used to separate each element\nlet delimiter = ':';\n\n// Whether you want to see the seconds or not\nlet showSeconds = true;\n\n// Whether you want a 24h or 12h style format\nlet use24hFormat = true;\n\n/**\n * @param {String} value (for property 'text')\n */\nvar shadowLayer;\nexport function update(value) {\n\tlet time = new Date();\n\tvar hours;\n\tvar suffix = '';\n\tif (use24hFormat) {\n\t\thours = (\"00\" + time.getHours()).slice(-2);\n\t} else {\n\t\thours = time.getHours();\n\t\tsuffix = hours >= 12 ? 'PM' : 'AM';\n\t\thours %= 12;\n\t\tif (hours == 0) {\n\t\t\thours = 12;\n\t\t}\n\t}\n\tlet minutes = (\"00\" + time.getMinutes()).slice(-2);\n\tlet seconds = (\"00\" + time.getSeconds()).slice(-2);\n\tvalue = hours + delimiter + minutes;\n\tif (showSeconds) {\n\t\tvalue += delimiter + seconds;\n\t}\n\tif (!use24hFormat) {\n\t\tvalue += ' ' + suffix;\n\t}\n\n\tvar delta = thisLayer.origin.subtract(input.cursorWorldPosition);\n\tvar shadowOffset = delta.copy();\n\tshadowOffset.z = 0;\n\tdelta = delta.divide(new Vec3(engine.canvasSize, 1));\n\tdelta.z = 0;\n\tvar rotation = new Vec3(delta.y, -delta.x, 4 * WEMath.mix(delta.x, -delta.x, Math.min(1, Math.max(0, delta.y * 0.1 + 0.5)))).multiply(50);\n\tthisLayer.angles = rotation;\n\tshadowLayer.angles = rotation;\n\tshadowLayer.origin = thisLayer.origin.add(shadowOffset.multiply(0.01));\n\tshadowLayer.text = value;\n\treturn value;\n}\n\n/**\n * @param {String} value (for property 'text')\n */\nexport function init() {\n\tshadowLayer = thisScene.createLayer({\n\t\ttext: 'shadow',\n\t\tcolor: '0 0 0',\n\t\talpha: 1,\n\t\tpointsize: thisLayer.pointsize,\n\t\tfont: thisLayer.font,\n\t\tperspective: true\n\t});\n\tshadowLayer.origin = thisLayer.origin;\n\tshadowLayer.angles = thisLayer.angles;\n\tshadowLayer.scale = thisLayer.scale;\n\tthisScene.sortLayer(shadowLayer, thisScene.getLayerIndex(thisLayer));\n}\n", + "value" : "12:34" + }, + "verticalalign" : "center", + "visible" : true + } + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/clock/preview3dclock/project.json b/modules/wallpaper-engine/presets/clock/preview3dclock/project.json new file mode 100644 index 0000000..0289630 --- /dev/null +++ b/modules/wallpaper-engine/presets/clock/preview3dclock/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview3dclock", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/clock/preview3dclock/scene.json b/modules/wallpaper-engine/presets/clock/preview3dclock/scene.json new file mode 100644 index 0000000..a1967fa --- /dev/null +++ b/modules/wallpaper-engine/presets/clock/preview3dclock/scene.json @@ -0,0 +1,72 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.300 0.300 0.300", + "bloom" : false, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.376 0.376 0.376", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "nearz" : 0.10000000149011612, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.300 0.300 0.300" + }, + "objects" : + [ + { + "alpha" : 1.0, + "anchor" : "none", + "angles" : "0.000 0.000 0.000", + "backgroundcolor" : "0.000 0.000 0.000", + "color" : "1.000 1.000 1.000", + "colorBlendMode" : 0, + "copybackground" : true, + "font" : "fonts/Monofur-PK7og.ttf", + "horizontalalign" : "center", + "id" : 8, + "image" : null, + "locktransforms" : false, + "model" : null, + "name" : "3D Clock", + "opaquebackground" : false, + "origin" : "128.000 139.759 0.000", + "padding" : 0, + "parallaxDepth" : "1.000 1.000", + "particle" : null, + "perspective" : true, + "pointsize" : 24.0, + "scale" : "0.585 0.585 0.585", + "size" : "500.000 100.000", + "solid" : true, + "text" : + { + "script" : "'use strict';\n\nimport * as WEMath from 'WEMath';\n\n// This will be used to separate each element\nlet delimiter = ':';\n\n// Whether you want to see the seconds or not\nlet showSeconds = true;\n\n// Whether you want a 24h or 12h style format\nlet use24hFormat = true;\n\n/**\n * @param {String} value (for property 'text')\n */\nvar shadowLayer;\nexport function update(value) {\n\tshadowLayer.visible = thisLayer.visible;\n\tlet time = new Date();\n\tvar hours;\n\tvar suffix = '';\n\tif (use24hFormat) {\n\t\thours = (\"00\" + time.getHours()).slice(-2);\n\t} else {\n\t\thours = time.getHours();\n\t\tsuffix = hours >= 12 ? 'PM' : 'AM';\n\t\thours %= 12;\n\t\tif (hours == 0) {\n\t\t\thours = 12;\n\t\t}\n\t}\n\tlet minutes = (\"00\" + time.getMinutes()).slice(-2);\n\tlet seconds = (\"00\" + time.getSeconds()).slice(-2);\n\tvalue = hours + delimiter + minutes;\n\tif (showSeconds) {\n\t\tvalue += delimiter + seconds;\n\t}\n\tif (!use24hFormat) {\n\t\tvalue += ' ' + suffix;\n\t}\n\n\tvar delta = thisLayer.origin.subtract(input.cursorWorldPosition);\n\tvar shadowOffset = delta.copy();\n\tshadowOffset.z = 0;\n\tdelta = delta.divide(new Vec3(engine.canvasSize, 1));\n\tdelta.z = 0;\n\tvar rotation = new Vec3(delta.y, -delta.x, 4 * WEMath.mix(delta.x, -delta.x, Math.min(1, Math.max(0, delta.y * 0.1 + 0.5)))).multiply(50);\n\tthisLayer.angles = rotation;\n\tshadowLayer.angles = rotation;\n\tshadowLayer.origin = thisLayer.origin.add(shadowOffset.multiply(0.03));\n\tshadowLayer.text = value;\n\treturn value;\n}\n\n/**\n * @param {String} value (for property 'text')\n */\nexport function init() {\n\tshadowLayer = thisScene.createLayer({\n\t\ttext: 'shadow',\n\t\tcolor: '0 0 0',\n\t\talpha: 1,\n\t\tpointsize: thisLayer.pointsize,\n\t\tfont: thisLayer.font,\n\t\tperspective: true\n\t});\n\tshadowLayer.origin = thisLayer.origin;\n\tshadowLayer.angles = thisLayer.angles;\n\tshadowLayer.scale = thisLayer.scale;\n\tthisScene.sortLayer(shadowLayer, thisScene.getLayerIndex(thisLayer));\n}\n", + "value" : "<3D Clock>" + }, + "verticalalign" : "center", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/clock/previewclock/project.json b/modules/wallpaper-engine/presets/clock/previewclock/project.json new file mode 100644 index 0000000..10514fd --- /dev/null +++ b/modules/wallpaper-engine/presets/clock/previewclock/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewclock", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/clock/previewclock/scene.json b/modules/wallpaper-engine/presets/clock/previewclock/scene.json new file mode 100644 index 0000000..f5e4621 --- /dev/null +++ b/modules/wallpaper-engine/presets/clock/previewclock/scene.json @@ -0,0 +1,72 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.300 0.300 0.300", + "bloom" : false, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.267 0.267 0.267", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "nearz" : 0.10000000149011612, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.300 0.300 0.300" + }, + "objects" : + [ + { + "alpha" : 1.0, + "anchor" : "none", + "angles" : "0.000 0.000 0.000", + "backgroundcolor" : "0.000 0.000 0.000", + "color" : "1.000 1.000 1.000", + "colorBlendMode" : 0, + "copybackground" : true, + "font" : "fonts/RobotoMono-Regular.ttf", + "horizontalalign" : "center", + "id" : 13, + "image" : null, + "locktransforms" : false, + "model" : null, + "name" : "Clock", + "opaquebackground" : false, + "origin" : "128.000 135.567 0.000", + "padding" : 0, + "parallaxDepth" : "1.000 1.000", + "particle" : null, + "perspective" : false, + "pointsize" : 24.0, + "scale" : "0.726 0.726 0.726", + "size" : "379.000 117.000", + "solid" : true, + "text" : + { + "script" : "'use strict';\n\n// This will be used to separate each element\nlet delimiter = ':';\n\n// Whether you want to see the seconds or not\nlet showSeconds = false;\n\n// Whether you want a 24h or 12h style format\nlet use24hFormat = true;\n\n/**\n * @param {String} value (for property 'text')\n */\nexport function update(value) {\n\tlet time = new Date();\n\tvar hours = time.getHours();\n\tif (!use24hFormat) {\n\t\thours %= 12;\n\t\tif (hours == 0) {\n\t\t\thours = 12;\n\t\t}\n\t}\n\thours = (\"00\" + hours).slice(-2);\n\tlet minutes = (\"00\" + time.getMinutes()).slice(-2);\n\tvalue = hours + delimiter + minutes;\n\tif (showSeconds) {\n\t\tlet seconds = (\"00\" + time.getSeconds()).slice(-2);\n\t\tvalue += delimiter + seconds;\n\t}\n\treturn value;\n}\n", + "value" : "" + }, + "verticalalign" : "center", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/countdown/preset.json b/modules/wallpaper-engine/presets/countdown/preset.json new file mode 100644 index 0000000..50af0d7 --- /dev/null +++ b/modules/wallpaper-engine/presets/countdown/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_countdown_title", + "description" : "ui_editor_preset_countdown_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_countdown_variant_release", + "value" : 0 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcountdown/project.json", + "objects" : + [ + { + "alpha" : 1.0, + "anchor" : "none", + "angles" : "0.000 0.000 0.000", + "backgroundcolor" : "0.000 0.000 0.000", + "color" : "1.000 1.000 1.000", + "colorBlendMode" : 0, + "copybackground" : true, + "font" : "systemfont_arial", + "horizontalalign" : "center", + "locktransforms" : false, + "name" : "Countdown", + "opaquebackground" : false, + "origin" : "960.000 540.000 0.000", + "parallaxDepth" : "1.000 1.000", + "perspective" : false, + "pointsize" : 32.0, + "scale" : "1.000 1.000 1.000", + "size" : "1032.000 115.000", + "solid" : true, + "text" : + { + "script" : "'use strict';\n\nexport var scriptProperties = createScriptProperties()\n\t// The time that the coutdown will end on.\n\t.addText({\n\t\tname: 'date',\n\t\tlabel: 'ui_editor_properties_date',\n\t\tvalue: '2019-12-25T00:00:00'\n\t})\n\t// Whether the year should be ignored.\n\t.addCheckbox({\n\t\tname: 'recurring',\n\t\tlabel: 'ui_editor_properties_recurring',\n\t\tvalue: true\n\t})\n\t// This text will be shown for non-recurring countdowns after they concluded.\n\t.addCheckbox({\n\t\tname: 'finalMessage',\n\t\tlabel: 'ui_editor_properties_end_message',\n\t\tvalue: 'The countdown finished!'\n\t})\n\t.finish();\n\n/**\n * @param {String} value (for property 'text')\n */\nvar originalText;\nexport function update(value) {\n\tvar currentDate = new Date();\n\tvar targetDate = new Date(scriptProperties.date);\n\tvar isRecurringEachYear = scriptProperties.recurring;\n\tif (isRecurringEachYear) {\n\t\ttargetDate.setUTCFullYear(currentDate.getUTCFullYear());\n\t\tif ((targetDate.getTime() - currentDate.getTime()) < 0) {\n\t\t\ttargetDate.setUTCFullYear(currentDate.getUTCFullYear() + 1);\n\t\t}\n\t}\n\n\tvar diff = targetDate.getTime() - currentDate.getTime();\n\tif (!isRecurringEachYear\n\t\t&& diff < 0) {\n\t\treturn scriptProperties.finalMessage;\n\t}\n\n\tvar years = Math.floor(diff / (1000 * 60 * 60 * 24 * 365));\n\tvar days = Math.floor(diff / (1000 * 60 * 60 * 24));\n\tvar hours = Math.floor(diff / (1000 * 60 * 60)) % 24;\n\tvar minutes = Math.floor(diff / (1000 * 60)) % 60;\n\n\tif (!isRecurringEachYear) {\n\t\tdays %= 365;\n\t}\n\n\tvalue = originalText + '\\n';\n\tif (years > 0 && !isRecurringEachYear) {\n\t\tvalue += years + ' years, ';\n\t}\n\tif (days > 0) {\n\t\tvalue += days + ' days, ';\n\t}\n\tvalue += hours + ' hours';\n\tif (days == 0) {\n\t\tvalue += ', ' + minutes + ' minutes';\n\t}\n\treturn value;\n}\n\n/**\n * @param {String} value (for property 'text')\n */\nexport function init(value) {\n\toriginalText = value;\n\treturn value;\n}\n", + "scriptproperties" : + { + "date" : "2019-12-25T00:00:00", + "finalMessage" : "The countdown finished!", + "recurring" : true + }, + "value" : "Time until Christmas:" + }, + "verticalalign" : "center", + "visible" : true + } + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/countdown/previewcountdown/project.json b/modules/wallpaper-engine/presets/countdown/previewcountdown/project.json new file mode 100644 index 0000000..332f5a4 --- /dev/null +++ b/modules/wallpaper-engine/presets/countdown/previewcountdown/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewcountdown", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/countdown/previewcountdown/scene.json b/modules/wallpaper-engine/presets/countdown/previewcountdown/scene.json new file mode 100644 index 0000000..40d1ea2 --- /dev/null +++ b/modules/wallpaper-engine/presets/countdown/previewcountdown/scene.json @@ -0,0 +1,78 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.300 0.300 0.300", + "bloom" : false, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999997615814209, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.506 0.231 0.231", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "nearz" : 0.10000000149011612, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.300 0.300 0.300" + }, + "objects" : + [ + { + "alpha" : 1.0, + "anchor" : "none", + "angles" : "0.000 0.000 0.000", + "backgroundcolor" : "0.000 0.000 0.000", + "color" : "1.000 1.000 1.000", + "colorBlendMode" : 0, + "copybackground" : true, + "font" : "systemfont_arial", + "horizontalalign" : "center", + "id" : 13, + "image" : null, + "locktransforms" : false, + "model" : null, + "name" : "Countdown", + "opaquebackground" : false, + "origin" : "128.000 141.596 0.000", + "padding" : 0, + "parallaxDepth" : "1.000 1.000", + "particle" : null, + "perspective" : false, + "pointsize" : 24.0, + "scale" : "0.245 0.245 0.245", + "size" : "927.000 115.000", + "solid" : true, + "text" : + { + "script" : "'use strict';\n\nexport var scriptProperties = createScriptProperties()\n\t// The time that the coutdown will end on.\n\t.addText({\n\t\tname: 'date',\n\t\tlabel: 'ui_editor_properties_date',\n\t\tvalue: '2019-12-25T00:00:00'\n\t})\n\t// Whether the year should be ignored.\n\t.addCheckbox({\n\t\tname: 'recurring',\n\t\tlabel: 'ui_editor_properties_recurring',\n\t\tvalue: true\n\t})\n\t// This text will be shown for non-recurring countdowns after they concluded.\n\t.addCheckbox({\n\t\tname: 'finalMessage',\n\t\tlabel: 'ui_editor_properties_end_message',\n\t\tvalue: 'The countdown finished!'\n\t})\n\t.finish();\n\n/**\n * @param {String} value (for property 'text')\n */\nvar originalText;\nexport function update(value) {\n\tvar currentDate = new Date();\n\tvar targetDate = new Date(scriptProperties.date);\n\tvar isRecurringEachYear = scriptProperties.recurring;\n\tif (isRecurringEachYear) {\n\t\ttargetDate.setUTCFullYear(currentDate.getUTCFullYear());\n\t\tif ((targetDate.getTime() - currentDate.getTime()) < 0) {\n\t\t\ttargetDate.setUTCFullYear(currentDate.getUTCFullYear() + 1);\n\t\t}\n\t}\n\n\tvar diff = targetDate.getTime() - currentDate.getTime();\n\tif (!isRecurringEachYear\n\t\t&& diff < 0) {\n\t\treturn scriptProperties.finalMessage;\n\t}\n\n\tvar years = Math.floor(diff / (1000 * 60 * 60 * 24 * 365));\n\tvar days = Math.floor(diff / (1000 * 60 * 60 * 24));\n\tvar hours = Math.floor(diff / (1000 * 60 * 60)) % 24;\n\tvar minutes = Math.floor(diff / (1000 * 60)) % 60;\n\n\tif (!isRecurringEachYear) {\n\t\tdays %= 365;\n\t}\n\n\tvalue = originalText + '\\n';\n\tif (years > 0 && !isRecurringEachYear) {\n\t\tvalue += years + ' years, ';\n\t}\n\tif (days > 0) {\n\t\tvalue += days + ' days, ';\n\t}\n\tvalue += hours + ' hours';\n\tif (days == 0) {\n\t\tvalue += ', ' + minutes + ' minutes';\n\t}\n\treturn value;\n}\n\n/**\n * @param {String} value (for property 'text')\n */\nexport function init(value) {\n\toriginalText = value;\n\treturn value;\n}\n", + "scriptproperties" : + { + "date" : "2019-12-25T00:00:00", + "finalMessage" : "The countdown finished!", + "recurring" : true + }, + "value" : "Time until Christmas:" + }, + "verticalalign" : "center", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/materials/presets/ember.json b/modules/wallpaper-engine/presets/ember/materials/presets/ember.json new file mode 100644 index 0000000..444f5da --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/materials/presets/ember.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/materials/presets/ember_small.json b/modules/wallpaper-engine/presets/ember/materials/presets/ember_small.json new file mode 100644 index 0000000..444f5da --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/materials/presets/ember_small.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/materials/presets/emberglow.json b/modules/wallpaper-engine/presets/ember/materials/presets/emberglow.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/materials/presets/emberglow.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/ember/materials/presets/emberglow_small.json b/modules/wallpaper-engine/presets/ember/materials/presets/emberglow_small.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/materials/presets/emberglow_small.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/ember/particles/presets/ember.json b/modules/wallpaper-engine/presets/ember/particles/presets/ember.json new file mode 100644 index 0000000..1f42f8a --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/particles/presets/ember.json @@ -0,0 +1,135 @@ +{ + "children" : + [ + { + "id" : 12, + "name" : "particles/presets/emberglow.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : "512 256 0", + "id" : 6, + "name" : "boxrandom", + "rate" : 10 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 218 108", + "min" : "255 143 102", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "offset" : -0.5, + "scale" : 0.10000000000000001 + } + ], + "material" : "materials/presets/ember.json", + "maxcount" : 40, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 1, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "mask" : "1 0 0", + "name" : "turbulence", + "phasemax" : 5, + "scale" : 0.0019999999776482581, + "speedmax" : 150, + "speedmin" : 100 + }, + { + "frequencymax" : 20, + "id" : 10, + "name" : "oscillatealpha", + "scalemin" : 0.69999999999999996 + }, + { + "id" : 11, + "name" : "sizechange", + "starttime" : 0.69999999999999996 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.0070000000745058062, + "name" : "spritetrail" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/particles/presets/ember_small.json b/modules/wallpaper-engine/presets/ember/particles/presets/ember_small.json new file mode 100644 index 0000000..9491de1 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/particles/presets/ember_small.json @@ -0,0 +1,134 @@ +{ + "children" : + [ + { + "id" : 12, + "name" : "particles/presets/emberglow_small.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : 32, + "id" : 6, + "name" : "sphererandom" + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 218 108", + "min" : "251 124 23", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "offset" : -0.5, + "scale" : 0.10000000000000001 + } + ], + "material" : "materials/presets/ember_small.json", + "maxcount" : 40, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 1, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "mask" : "1 0 0", + "name" : "turbulence", + "phasemax" : 5, + "scale" : 0.0019999999776482581, + "speedmax" : 150, + "speedmin" : 100 + }, + { + "frequencymax" : 20, + "frequencymin" : 5, + "id" : 10, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + }, + { + "id" : 11, + "name" : "sizechange", + "starttime" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.0070000000745058062, + "name" : "spritetrail" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/particles/presets/emberglow.json b/modules/wallpaper-engine/presets/ember/particles/presets/emberglow.json new file mode 100644 index 0000000..c7ce437 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/particles/presets/emberglow.json @@ -0,0 +1,108 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 0", + "distancemax" : "200 256 0", + "id" : 6, + "name" : "boxrandom", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2000, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 221 155", + "min" : "255 196 175", + "name" : "colorrandom" + }, + { + "exponent" : 2, + "id" : 5, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/emberglow.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/particles/presets/emberglow_small.json b/modules/wallpaper-engine/presets/ember/particles/presets/emberglow_small.json new file mode 100644 index 0000000..dfbbcff --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/particles/presets/emberglow_small.json @@ -0,0 +1,115 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : 32, + "id" : 6, + "name" : "sphererandom", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 221 155", + "min" : "255 196 175", + "name" : "colorrandom" + }, + { + "exponent" : 2, + "id" : 5, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "alpharandom" + }, + { + "id" : 9, + "name" : "turbulentvelocityrandom", + "offset" : -0.10000000000000001, + "scale" : 0.29999999999999999, + "speedmax" : 50, + "speedmin" : 0 + } + ], + "material" : "materials/presets/emberglow_small.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preset.json b/modules/wallpaper-engine/presets/ember/preset.json new file mode 100644 index 0000000..dc17d99 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_ember_title", + "description" : "ui_editor_preset_ember_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_variant_large", + "value" : 0 + }, + { + "label" : "ui_editor_preset_variant_small", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "preview_large/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ember", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ember.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ember.json", + "materials/presets/emberglow.json", + "particles/presets/ember.json", + "particles/presets/emberglow.json" + ] + }, + { + "preview" : "preview_small/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ember small", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ember_small.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ember_small.json", + "materials/presets/emberglow_small.json", + "particles/presets/ember_small.json", + "particles/presets/emberglow_small.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.json b/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.tga b/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/ember/preview_large/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/ember/preview_large/materials/presets/ember.json b/modules/wallpaper-engine/presets/ember/preview_large/materials/presets/ember.json new file mode 100644 index 0000000..444f5da --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/materials/presets/ember.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/materials/presets/emberglow.json b/modules/wallpaper-engine/presets/ember/preview_large/materials/presets/emberglow.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/materials/presets/emberglow.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/ember/preview_large/models/effectpreview.json b/modules/wallpaper-engine/presets/ember/preview_large/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/particles/presets/ember.json b/modules/wallpaper-engine/presets/ember/preview_large/particles/presets/ember.json new file mode 100644 index 0000000..1f42f8a --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/particles/presets/ember.json @@ -0,0 +1,135 @@ +{ + "children" : + [ + { + "id" : 12, + "name" : "particles/presets/emberglow.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : "512 256 0", + "id" : 6, + "name" : "boxrandom", + "rate" : 10 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 218 108", + "min" : "255 143 102", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "offset" : -0.5, + "scale" : 0.10000000000000001 + } + ], + "material" : "materials/presets/ember.json", + "maxcount" : 40, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 1, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "mask" : "1 0 0", + "name" : "turbulence", + "phasemax" : 5, + "scale" : 0.0019999999776482581, + "speedmax" : 150, + "speedmin" : 100 + }, + { + "frequencymax" : 20, + "id" : 10, + "name" : "oscillatealpha", + "scalemin" : 0.69999999999999996 + }, + { + "id" : 11, + "name" : "sizechange", + "starttime" : 0.69999999999999996 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.0070000000745058062, + "name" : "spritetrail" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/particles/presets/emberglow.json b/modules/wallpaper-engine/presets/ember/preview_large/particles/presets/emberglow.json new file mode 100644 index 0000000..c7ce437 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/particles/presets/emberglow.json @@ -0,0 +1,108 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 0", + "distancemax" : "200 256 0", + "id" : 6, + "name" : "boxrandom", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2000, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 221 155", + "min" : "255 196 175", + "name" : "colorrandom" + }, + { + "exponent" : 2, + "id" : 5, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/emberglow.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/presets/ember/preset.json b/modules/wallpaper-engine/presets/ember/preview_large/presets/ember/preset.json new file mode 100644 index 0000000..00ebfdb --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/presets/ember/preset.json @@ -0,0 +1,24 @@ +{ + "name" : "ui_editor_preset_ember_title", + "description" : "ui_editor_preset_ember_description", + "tag" : "scene2d", + "group" : "preset", + //"preview" : "preview/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ember.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ember.json", + "materials/presets/emberglow.json", + "particles/presets/ember.json", + "particles/presets/emberglow.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/project.json b/modules/wallpaper-engine/presets/ember/preview_large/project.json new file mode 100644 index 0000000..22f84fc --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "preview" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/scene.json b/modules/wallpaper-engine/presets/ember/preview_large/scene.json new file mode 100644 index 0000000..788a323 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/scene.json @@ -0,0 +1,46 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 29, + "image" : null, + "model" : null, + "name" : "Rain", + "origin" : "110.971 2.479 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/ember.json", + "particlesrc" : null, + "scale" : "0.324 0.324 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_large/template.json b/modules/wallpaper-engine/presets/ember/preview_large/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_large/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.json b/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.tga b/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/ember/preview_small/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/ember/preview_small/materials/presets/ember_small.json b/modules/wallpaper-engine/presets/ember/preview_small/materials/presets/ember_small.json new file mode 100644 index 0000000..444f5da --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/materials/presets/ember_small.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/materials/presets/emberglow_small.json b/modules/wallpaper-engine/presets/ember/preview_small/materials/presets/emberglow_small.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/materials/presets/emberglow_small.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/ember/preview_small/models/effectpreview.json b/modules/wallpaper-engine/presets/ember/preview_small/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/particles/presets/ember_small.json b/modules/wallpaper-engine/presets/ember/preview_small/particles/presets/ember_small.json new file mode 100644 index 0000000..9491de1 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/particles/presets/ember_small.json @@ -0,0 +1,134 @@ +{ + "children" : + [ + { + "id" : 12, + "name" : "particles/presets/emberglow_small.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : 32, + "id" : 6, + "name" : "sphererandom" + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 218 108", + "min" : "251 124 23", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "offset" : -0.5, + "scale" : 0.10000000000000001 + } + ], + "material" : "materials/presets/ember_small.json", + "maxcount" : 40, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 1, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "mask" : "1 0 0", + "name" : "turbulence", + "phasemax" : 5, + "scale" : 0.0019999999776482581, + "speedmax" : 150, + "speedmin" : 100 + }, + { + "frequencymax" : 20, + "frequencymin" : 5, + "id" : 10, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + }, + { + "id" : 11, + "name" : "sizechange", + "starttime" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.0070000000745058062, + "name" : "spritetrail" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/particles/presets/emberglow_small.json b/modules/wallpaper-engine/presets/ember/preview_small/particles/presets/emberglow_small.json new file mode 100644 index 0000000..dfbbcff --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/particles/presets/emberglow_small.json @@ -0,0 +1,115 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : 32, + "id" : 6, + "name" : "sphererandom", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 221 155", + "min" : "255 196 175", + "name" : "colorrandom" + }, + { + "exponent" : 2, + "id" : 5, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "alpharandom" + }, + { + "id" : 9, + "name" : "turbulentvelocityrandom", + "offset" : -0.10000000000000001, + "scale" : 0.29999999999999999, + "speedmax" : 50, + "speedmin" : 0 + } + ], + "material" : "materials/presets/emberglow_small.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/presets/ember/preset.json b/modules/wallpaper-engine/presets/ember/preview_small/presets/ember/preset.json new file mode 100644 index 0000000..dc17d99 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/presets/ember/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_ember_title", + "description" : "ui_editor_preset_ember_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_variant_large", + "value" : 0 + }, + { + "label" : "ui_editor_preset_variant_small", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "preview_large/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ember", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ember.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ember.json", + "materials/presets/emberglow.json", + "particles/presets/ember.json", + "particles/presets/emberglow.json" + ] + }, + { + "preview" : "preview_small/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ember small", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ember_small.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ember_small.json", + "materials/presets/emberglow_small.json", + "particles/presets/ember_small.json", + "particles/presets/emberglow_small.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/project.json b/modules/wallpaper-engine/presets/ember/preview_small/project.json new file mode 100644 index 0000000..9f5283a --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "preview_small" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/scene.json b/modules/wallpaper-engine/presets/ember/preview_small/scene.json new file mode 100644 index 0000000..52c5944 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/scene.json @@ -0,0 +1,46 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 25, + "image" : null, + "model" : null, + "name" : "Ember small", + "origin" : "126.869 -1.058 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/ember_small.json", + "particlesrc" : null, + "scale" : "0.478 0.478 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/ember/preview_small/template.json b/modules/wallpaper-engine/presets/ember/preview_small/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/ember/preview_small/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/materials/presets/fern1.json b/modules/wallpaper-engine/presets/fern/materials/presets/fern1.json new file mode 100644 index 0000000..47bba4a --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/materials/presets/fern1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "presets/fern1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/materials/presets/fern1.tga b/modules/wallpaper-engine/presets/fern/materials/presets/fern1.tga new file mode 100644 index 0000000..3adc55c Binary files /dev/null and b/modules/wallpaper-engine/presets/fern/materials/presets/fern1.tga differ diff --git a/modules/wallpaper-engine/presets/fern/models/presets/fern1.json b/modules/wallpaper-engine/presets/fern/models/presets/fern1.json new file mode 100644 index 0000000..56f1a9d --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/models/presets/fern1.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/presets/fern1.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preset.json b/modules/wallpaper-engine/presets/fern/preset.json new file mode 100644 index 0000000..2f726fa --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preset.json @@ -0,0 +1,45 @@ +{ + "name" : "ui_editor_preset_foliage_title", + "description" : "ui_editor_preset_foliage_description", + "tag" : "scene2d", + "group" : "preset", + "preview" : "preview/project.json", + "objects" : + [ + { + "name" : "Fern", + "angles" : "0.000 0.000 0.000", + "effects" : + [ + { + "file" : "effects/foliagesway/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Phase" : 0, + "Power" : 1.4199999570846558, + "Speed" : 2.2699999809265137, + "Strength" : 15 + } + } + ] + } + ], + "image" : "models/presets/fern1.json", + "origin" : "0.000 0.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fern1.json", + "materials/presets/fern1.tga", + "models/presets/fern1.json", + { + "node" : "effect", + "file" : "effects/foliagesway/effect.json" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/effects/foliagesway/effect.json b/modules/wallpaper-engine/presets/fern/preview/effects/foliagesway/effect.json new file mode 100644 index 0000000..9102d47 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/effects/foliagesway/effect.json @@ -0,0 +1,18 @@ +{ + "name" : "Foliage Sway", + "description" : "Sways the object in each corner of the image.", + "group" : "geometry", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/foliagesway.json" + } + ], + "dependencies" : + [ + "materials/effects/foliagesway.json", + "shaders/effects/foliagesway.frag", + "shaders/effects/foliagesway.vert" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.json b/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.tga b/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/fern/preview/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/effects/foliagesway.json b/modules/wallpaper-engine/presets/fern/preview/materials/effects/foliagesway.json new file mode 100644 index 0000000..2619381 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/materials/effects/foliagesway.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/foliagesway", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.json b/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.json new file mode 100644 index 0000000..47bba4a --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "presets/fern1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.tex b/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.tex new file mode 100644 index 0000000..0576a5e Binary files /dev/null and b/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.tex differ diff --git a/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.tga b/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.tga new file mode 100644 index 0000000..3adc55c Binary files /dev/null and b/modules/wallpaper-engine/presets/fern/preview/materials/presets/fern1.tga differ diff --git a/modules/wallpaper-engine/presets/fern/preview/models/effectpreview.json b/modules/wallpaper-engine/presets/fern/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/models/presets/fern1.json b/modules/wallpaper-engine/presets/fern/preview/models/presets/fern1.json new file mode 100644 index 0000000..56f1a9d --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/models/presets/fern1.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/presets/fern1.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/presets/fern/preset.json b/modules/wallpaper-engine/presets/fern/preview/presets/fern/preset.json new file mode 100644 index 0000000..46cf44b --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/presets/fern/preset.json @@ -0,0 +1,45 @@ +{ + "name" : "Fern", + "description" : "A single fern object.", + "scene" : "2d", + "group" : "preset", + //"preview" : "preview/project.json", + "objects" : + [ + { + "name" : "Fern", + "angles" : "0.000 0.000 0.000", + "effects" : + [ + { + "file" : "effects/foliagesway/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Phase" : 0, + "Power" : 1.4199999570846558, + "Speed" : 2.2699999809265137, + "Strength" : 15 + } + } + ] + } + ], + "image" : "models/presets/fern1.json", + "origin" : "0.000 0.000 0.000", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fern1.json", + "materials/presets/fern1.tga", + "models/presets/fern1.json", + { + "node" : "effect", + "file" : "effects/foliagesway/effect.json" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/project.json b/modules/wallpaper-engine/presets/fern/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/scene.json b/modules/wallpaper-engine/presets/fern/preview/scene.json new file mode 100644 index 0000000..853ac88 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/scene.json @@ -0,0 +1,65 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "copybackground" : true, + "effects" : + [ + { + "file" : "effects/foliagesway/effect.json", + "passes" : + [ + { + "constantshadervalues" : + { + "Phase" : 0, + "Power" : 1.4199999570846558, + "Speed" : 2.2699999809265137, + "Strength" : 15 + } + } + ] + } + ], + "id" : 18, + "image" : "models/presets/fern1.json", + "model" : null, + "name" : "Fern", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "0.477 0.477 1.000", + "size" : "299.000 512.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fern/preview/shaders/effects/foliagesway.frag b/modules/wallpaper-engine/presets/fern/preview/shaders/effects/foliagesway.frag new file mode 100644 index 0000000..c3837a9 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/shaders/effects/foliagesway.frag @@ -0,0 +1,8 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; // {"material":"Framebuffer","hidden":true} + +void main() { + gl_FragColor = texSample2D(g_Texture0, v_TexCoord); +} diff --git a/modules/wallpaper-engine/presets/fern/preview/shaders/effects/foliagesway.vert b/modules/wallpaper-engine/presets/fern/preview/shaders/effects/foliagesway.vert new file mode 100644 index 0000000..b28c7d9 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/shaders/effects/foliagesway.vert @@ -0,0 +1,39 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +uniform float g_Speed; // {"material":"Speed","default":1,"range":[0.01, 10]} +uniform float g_Strength; // {"material":"Strength","default":100,"range":[0.01, 500]} +uniform float g_Phase; // {"material":"Phase","default":0,"range":[0, 6.28]} +uniform float g_Power; // {"material":"Power","default":1,"range":[0.01, 2]} +uniform vec2 g_DirectionWeights; // {"material":"Direction weights","default":"1 0.2"} +uniform vec4 g_CornerWeights; // {"material":"Corner weights","default":"1 1 0 0"} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + vec3 position = a_Position; + + vec4 sines = g_Phase + g_Speed * g_Time * vec4(1, -0.16161616, 0.0083333, -0.00019841); + sines = sin(sines); + vec4 csines = 0.4 + g_Phase + g_Speed * g_Time * vec4(-0.5, 0.041666666, -0.0013888889, 0.000024801587); + csines = sin(csines); + + sines = pow(abs(sines), g_Power) * sign(sines); + csines = pow(abs(csines), g_Power) * sign(csines); + + float weight = saturate(g_CornerWeights.x * (1.0 - a_TexCoord.x) * (1.0 - a_TexCoord.y) + + g_CornerWeights.y * (a_TexCoord.x) * (1.0 - a_TexCoord.y) + + g_CornerWeights.z * (a_TexCoord.x) * (a_TexCoord.y) + + g_CornerWeights.w * (1.0 - a_TexCoord.x) * (a_TexCoord.y)); + + position.x += dot(sines, CAST4(1.0)) * g_Strength * weight * g_DirectionWeights.x; + position.y += dot(csines, CAST4(1.0)) * g_Strength * weight * g_DirectionWeights.y; + + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/presets/fern/preview/template.json b/modules/wallpaper-engine/presets/fern/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/fern/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/materials/presets/torch.json b/modules/wallpaper-engine/presets/fire/materials/presets/torch.json new file mode 100644 index 0000000..3c7f0fe --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/materials/presets/torch.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fire/fire1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/materials/presets/torchembers.json b/modules/wallpaper-engine/presets/fire/materials/presets/torchembers.json new file mode 100644 index 0000000..64dc4af --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/materials/presets/torchembers.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.2999999523162842 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/debris/debris1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/materials/presets/wildfire.json b/modules/wallpaper-engine/presets/fire/materials/presets/wildfire.json new file mode 100644 index 0000000..2add5d4 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/materials/presets/wildfire.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fire/fire2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/materials/presets/wildfireembers.json b/modules/wallpaper-engine/presets/fire/materials/presets/wildfireembers.json new file mode 100644 index 0000000..64dc4af --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/materials/presets/wildfireembers.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.2999999523162842 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/debris/debris1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/particles/presets/torch.json b/modules/wallpaper-engine/presets/fire/particles/presets/torch.json new file mode 100644 index 0000000..dd8b656 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/particles/presets/torch.json @@ -0,0 +1,140 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/torchembers.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 350, + "min" : 250, + "name" : "sizerandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "phasemax" : 0.10000000149011612, + "scale" : 0.20000000000000001, + "speedmax" : 120, + "speedmin" : 0, + "timescale" : 0.20000000000000001 + } + ], + "material" : "materials/presets/torch.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endtime" : 0.80000000000000004, + "endvalue" : "1 0 0", + "id" : 10, + "name" : "colorchange", + "startvalue" : "1 0.7490196078431373 0" + }, + { + "endtime" : 0.20000000000000001, + "endvalue" : 1, + "id" : 11, + "name" : "sizechange", + "starttime" : 0, + "startvalue" : 0 + }, + { + "endvalue" : 0.5, + "id" : 12, + "name" : "sizechange", + "starttime" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/particles/presets/torchembers.json b/modules/wallpaper-engine/presets/fire/particles/presets/torchembers.json new file mode 100644 index 0000000..82877f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/particles/presets/torchembers.json @@ -0,0 +1,124 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 6 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 6, + "min" : 4, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 15, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 0 0", + "min" : "255 135 0", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "angularvelocityrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "phasemax" : 1, + "scale" : 0.20000000000000001, + "speedmax" : 90, + "speedmin" : 40, + "timescale" : 0.20000000000000001 + } + ], + "material" : "materials/presets/torchembers.json", + "maxcount" : 20, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 10 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 10, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/particles/presets/wildfire.json b/modules/wallpaper-engine/presets/fire/particles/presets/wildfire.json new file mode 100644 index 0000000..3191e7d --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/particles/presets/wildfire.json @@ -0,0 +1,126 @@ +{ + "animationmode" : "sequence", + "children" : + [ + { + "id" : 11, + "name" : "particles/presets/wildfireembers.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.07 0", + "distancemax" : 650, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 25 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 550, + "min" : 450, + "name" : "sizerandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "phasemax" : 0.10000000149011612, + "scale" : 0.20000000000000001, + "speedmax" : 120, + "speedmin" : 0, + "timescale" : 0.20000000000000001 + } + ], + "material" : "materials/presets/wildfire.json", + "maxcount" : 150, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endtime" : 0.59999999999999998, + "endvalue" : "1 0 0", + "id" : 10, + "name" : "colorchange", + "startvalue" : "1 0.7490196078431373 0" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 1, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/particles/presets/wildfireembers.json b/modules/wallpaper-engine/presets/fire/particles/presets/wildfireembers.json new file mode 100644 index 0000000..10a1d2c --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/particles/presets/wildfireembers.json @@ -0,0 +1,125 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : 900, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 30 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 15, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 0 0", + "min" : "255 135 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "angularvelocityrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "scale" : 0.29999999999999999 + } + ], + "material" : "materials/presets/wildfireembers.json", + "maxcount" : 100, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 11, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/preset.json b/modules/wallpaper-engine/presets/fire/preset.json new file mode 100644 index 0000000..88e4b4b --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_fire_title", + "description" : "ui_editor_preset_fire_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_fire_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_fire_variant_2", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtorch/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Torch", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/torch.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/torch.json", + "materials/presets/torchembers.json", + "particles/presets/torch.json", + "particles/presets/torchembers.json" + ] + }, + { + "preview" : "previewwildfire/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Wildfire", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/wildfire.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/wildfire.json", + "materials/presets/wildfireembers.json", + "particles/presets/wildfire.json", + "particles/presets/wildfireembers.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.json b/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.tga b/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/fire/previewtorch/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/materials/presets/torch.json b/modules/wallpaper-engine/presets/fire/previewtorch/materials/presets/torch.json new file mode 100644 index 0000000..3c7f0fe --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/materials/presets/torch.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fire/fire1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/materials/presets/torchembers.json b/modules/wallpaper-engine/presets/fire/previewtorch/materials/presets/torchembers.json new file mode 100644 index 0000000..64dc4af --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/materials/presets/torchembers.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.2999999523162842 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/debris/debris1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/models/effectpreview.json b/modules/wallpaper-engine/presets/fire/previewtorch/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/particles/presets/torch.json b/modules/wallpaper-engine/presets/fire/previewtorch/particles/presets/torch.json new file mode 100644 index 0000000..d59042a --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/particles/presets/torch.json @@ -0,0 +1,146 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/torchembers.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 350, + "min" : 250, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "phasemax" : 0.10000000149011612, + "scale" : 0.20000000000000001, + "speedmax" : 120, + "speedmin" : 0, + "timescale" : 0.20000000000000001 + } + ], + "material" : "materials/presets/torch.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endtime" : 0.80000000000000004, + "endvalue" : "1 0 0", + "id" : 10, + "name" : "colorchange", + "startvalue" : "1 0.7490196078431373 0" + }, + { + "endtime" : 0.20000000000000001, + "endvalue" : 1, + "id" : 11, + "name" : "sizechange", + "starttime" : 0, + "startvalue" : 0 + }, + { + "endvalue" : 0.5, + "id" : 12, + "name" : "sizechange", + "starttime" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/particles/presets/torchembers.json b/modules/wallpaper-engine/presets/fire/previewtorch/particles/presets/torchembers.json new file mode 100644 index 0000000..82877f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/particles/presets/torchembers.json @@ -0,0 +1,124 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 6 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 6, + "min" : 4, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 15, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 0 0", + "min" : "255 135 0", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "angularvelocityrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "phasemax" : 1, + "scale" : 0.20000000000000001, + "speedmax" : 90, + "speedmin" : 40, + "timescale" : 0.20000000000000001 + } + ], + "material" : "materials/presets/torchembers.json", + "maxcount" : 20, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 10 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 10, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/presets/fire/preset.json b/modules/wallpaper-engine/presets/fire/previewtorch/presets/fire/preset.json new file mode 100644 index 0000000..fdb4fd7 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/presets/fire/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_fire_title", + "description" : "ui_editor_preset_fire_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Torch", + "value" : 0 + }, + { + "label" : "Wildfire", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtorch/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/torch.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/torch.json", + "materials/presets/torchembers.json", + "particles/presets/torch.json", + "particles/presets/torchembers.json" + ] + }, + { + "preview" : "previewwildfire/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/wildfire.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/wildfire.json", + "materials/presets/wildfireembers.json", + "particles/presets/wildfire.json", + "particles/presets/wildfireembers.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/project.json b/modules/wallpaper-engine/presets/fire/previewtorch/project.json new file mode 100644 index 0000000..701e037 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewtorch", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/scene.json b/modules/wallpaper-engine/presets/fire/previewtorch/scene.json new file mode 100644 index 0000000..297ce98 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Fog 1", + "origin" : "130.311 19.925 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/torch.json", + "particlesrc" : null, + "scale" : "0.495 0.495 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewtorch/template.json b/modules/wallpaper-engine/presets/fire/previewtorch/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewtorch/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.json b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.tga b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/materials/presets/wildfire.json b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/presets/wildfire.json new file mode 100644 index 0000000..2add5d4 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/presets/wildfire.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fire/fire2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/materials/presets/wildfireembers.json b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/presets/wildfireembers.json new file mode 100644 index 0000000..64dc4af --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/materials/presets/wildfireembers.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.2999999523162842 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/debris/debris1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/models/effectpreview.json b/modules/wallpaper-engine/presets/fire/previewwildfire/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/particles/presets/wildfire.json b/modules/wallpaper-engine/presets/fire/previewwildfire/particles/presets/wildfire.json new file mode 100644 index 0000000..03cc93f --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/particles/presets/wildfire.json @@ -0,0 +1,132 @@ +{ + "animationmode" : "sequence", + "children" : + [ + { + "id" : 11, + "name" : "particles/presets/wildfireembers.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.07 0", + "distancemax" : 650, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 25 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 550, + "min" : 450, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "phasemax" : 0.10000000149011612, + "scale" : 0.20000000000000001, + "speedmax" : 120, + "speedmin" : 0, + "timescale" : 0.20000000000000001 + } + ], + "material" : "materials/presets/wildfire.json", + "maxcount" : 150, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endtime" : 0.59999999999999998, + "endvalue" : "1 0 0", + "id" : 10, + "name" : "colorchange", + "startvalue" : "1 0.7490196078431373 0" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 1, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/particles/presets/wildfireembers.json b/modules/wallpaper-engine/presets/fire/previewwildfire/particles/presets/wildfireembers.json new file mode 100644 index 0000000..10a1d2c --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/particles/presets/wildfireembers.json @@ -0,0 +1,125 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : 900, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 30 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 15, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 0 0", + "min" : "255 135 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "angularvelocityrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "scale" : 0.29999999999999999 + } + ], + "material" : "materials/presets/wildfireembers.json", + "maxcount" : 100, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 11, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/presets/fire/preset.json b/modules/wallpaper-engine/presets/fire/previewwildfire/presets/fire/preset.json new file mode 100644 index 0000000..d7a82f5 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/presets/fire/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_fire_title", + "description" : "ui_editor_preset_fire_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Torch", + "value" : 0 + }, + { + "label" : "Wildfire", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtorch/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Torch", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/torch.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/torch.json", + "materials/presets/torchembers.json", + "particles/presets/torch.json", + "particles/presets/torchembers.json" + ] + }, + { + "preview" : "previewwildfire/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Wildfire", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/wildfire.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/wildfire.json", + "materials/presets/wildfireembers.json", + "particles/presets/wildfire.json", + "particles/presets/wildfireembers.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/project.json b/modules/wallpaper-engine/presets/fire/previewwildfire/project.json new file mode 100644 index 0000000..4c2f75c --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewwildfire", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/scene.json b/modules/wallpaper-engine/presets/fire/previewwildfire/scene.json new file mode 100644 index 0000000..ea61ee8 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 29, + "image" : null, + "model" : null, + "name" : "Wildfire", + "origin" : "130.845 9.565 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/wildfire.json", + "particlesrc" : null, + "scale" : "0.441 0.441 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fire/previewwildfire/template.json b/modules/wallpaper-engine/presets/fire/previewwildfire/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/fire/previewwildfire/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_halo.json b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_halo.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_halo.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_halo_4.json b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_halo_4.json new file mode 100644 index 0000000..06b0471 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_halo_4.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_hit_distort.json b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_hit_distort.json new file mode 100644 index 0000000..ea78b0a --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_hit_distort.json @@ -0,0 +1,21 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_refract_amount" : 0.05000000074505806 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "util/white", "particle/normal_ring_smooth" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_star.json b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_star.json new file mode 100644 index 0000000..6411e68 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/materials/presets/fireworks_star.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/star" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1.json new file mode 100644 index 0000000..66946c3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1.json @@ -0,0 +1,134 @@ +{ + "children" : + [ + { + "name" : "particles/presets/fireworkshitdistort.json", + "type" : "eventdeath" + }, + { + "id" : 10, + "name" : "particles/presets/fireworks1flare.json", + "type" : "eventdeath" + }, + { + "id" : 11, + "name" : "particles/presets/fireworks1hit.json", + "type" : "eventdeath" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 0, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0.6 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 500, + "min" : 400, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1000 3500 0", + "min" : "-1000 2500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 240 128", + "min" : "255 250 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo_4.json", + "maxcount" : 4, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -1000 0", + "id" : 7, + "name" : "movement" + }, + { + "endvalue" : 0.050000000000000003, + "id" : 8, + "name" : "sizechange" + }, + { + "frequencymax" : 50, + "frequencymin" : 20, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1flare.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1flare.json new file mode 100644 index 0000000..9ca0f50 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1flare.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 240 128", + "min" : "255 197 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 4, + "operator" : + [ + { + "id" : 6, + "name" : "alphafade" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 8, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1hit.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1hit.json new file mode 100644 index 0000000..4d0b2ec --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks1hit.json @@ -0,0 +1,108 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 150, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 1500 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 10, + "id" : 2, + "max" : 1.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 127 7", + "min" : "255 75 23", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 150, + "operator" : + [ + { + "drag" : 3.5, + "gravity" : "0 -1000 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2.json new file mode 100644 index 0000000..8b4dacb --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2.json @@ -0,0 +1,139 @@ +{ + "children" : + [ + { + "name" : "particles/presets/fireworkshitdistort.json", + "type" : "eventdeath" + }, + { + "id" : 10, + "name" : "particles/presets/fireworks2flare.json", + "type" : "eventdeath" + }, + { + "flags" : 0, + "id" : 11, + "name" : "particles/presets/fireworks2hit.json", + "type" : "eventdeath" + }, + { + "name" : "particles/presets/fireworks2stars.json", + "type" : "eventdeath" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 0, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0.7 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 500, + "min" : 400, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1000 3500 0", + "min" : "-1000 2500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 159 68", + "min" : "255 181 63", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo_4.json", + "maxcount" : 4, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -1000 0", + "id" : 7, + "name" : "movement" + }, + { + "endvalue" : 0.050000000000000003, + "id" : 8, + "name" : "sizechange" + }, + { + "frequencymax" : 50, + "frequencymin" : 20, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2flare.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2flare.json new file mode 100644 index 0000000..0cf050d --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2flare.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "128 210 255", + "min" : "85 180 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 4, + "operator" : + [ + { + "id" : 6, + "name" : "alphafade" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 8, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2hit.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2hit.json new file mode 100644 index 0000000..bc7d561 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2hit.json @@ -0,0 +1,122 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 150, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 1100 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 10, + "id" : 2, + "max" : 1.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "7 200 255", + "min" : "23 50 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 150, + "operator" : + [ + { + "drag" : 3.5, + "gravity" : "0 -1000 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 1 + }, + { + "id" : 8, + "name" : "turbulence", + "scale" : 0.01, + "speedmax" : 1500 + }, + { + "frequencymax" : 20, + "frequencymin" : 5, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2stars.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2stars.json new file mode 100644 index 0000000..bed965c --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks2stars.json @@ -0,0 +1,140 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.5 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 7, + "instantaneous" : 50, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 800, + "speedmin" : 500 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 1, + "id" : 2, + "max" : 1.1000000000000001, + "min" : 0.90000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 90, + "min" : 70, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "76 121 255", + "min" : "112 186 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + }, + { + "id" : 6, + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/fireworks_star.json", + "maxcount" : 50, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -400 0", + "id" : 8, + "name" : "movement" + }, + { + "force" : "0 0 0", + "id" : 9, + "name" : "angularmovement" + }, + { + "id" : 10, + "name" : "sizechange", + "starttime" : 0.80000000000000004 + }, + { + "blendinend" : 0, + "blendinstart" : 0, + "frequencymax" : 30, + "frequencymin" : 30, + "id" : 11, + "name" : "oscillatealpha", + "phasemax" : 0.10000000000000001, + "scalemin" : 0 + }, + { + "endtime" : 0.59999999999999998, + "endvalue" : 1, + "id" : 12, + "name" : "alphachange", + "starttime" : 0.5, + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3.json new file mode 100644 index 0000000..c4f32c6 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3.json @@ -0,0 +1,135 @@ +{ + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/fireworkshitdistort.json", + "type" : "eventdeath" + }, + { + "id" : 11, + "name" : "particles/presets/fireworks3flare.json", + "type" : "eventdeath" + }, + { + "id" : 12, + "name" : "particles/presets/fireworks3hit.json", + "type" : "eventdeath" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 0, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0.5 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 500, + "min" : 400, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1000 3500 0", + "min" : "-1000 2500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 240 128", + "min" : "255 250 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo_4.json", + "maxcount" : 4, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -1000 0", + "id" : 7, + "name" : "movement" + }, + { + "endvalue" : 0.050000000000000003, + "id" : 8, + "name" : "sizechange" + }, + { + "frequencymax" : 50, + "frequencymin" : 20, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3flare.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3flare.json new file mode 100644 index 0000000..9ca0f50 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3flare.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 240 128", + "min" : "255 197 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 4, + "operator" : + [ + { + "id" : 6, + "name" : "alphafade" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 8, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3hit.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3hit.json new file mode 100644 index 0000000..6a82fd3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworks3hit.json @@ -0,0 +1,119 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 200, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 750, + "speedmin" : 400 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 1, + "id" : 2, + "max" : 1.5, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 20, + "min" : 10, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 250 76", + "min" : "255 238 112", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -400 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.80000000000000004 + }, + { + "blendinend" : 0.59999999999999998, + "blendinstart" : 0.5, + "frequencymax" : 30, + "frequencymin" : 30, + "id" : 8, + "name" : "oscillatealpha", + "phasemax" : 0.10000000000000001, + "scalemin" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworkshitdistort.json b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworkshitdistort.json new file mode 100644 index 0000000..423024d --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/particles/presets/fireworkshitdistort.json @@ -0,0 +1,105 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1500, + "min" : 1500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_hit_distort.json", + "maxcount" : 500, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 6, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 7, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preset.json b/modules/wallpaper-engine/presets/fireworks/preset.json new file mode 100644 index 0000000..bac0a71 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preset.json @@ -0,0 +1,99 @@ +{ + "name" : "ui_editor_preset_fireworks_title", + "description" : "ui_editor_preset_fireworks_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_fireworks_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_fireworks_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_fireworks_variant_3", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "preview_fireworks1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "materials/presets/fireworks_hit_distort.json", + "particles/presets/fireworks1.json", + "particles/presets/fireworks1flare.json", + "particles/presets/fireworks1hit.json", + "particles/presets/fireworkshitdistort.json" + ] + }, + { + "preview" : "preview_fireworks2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "materials/presets/fireworks_hit_distort.json", + "materials/presets/fireworks_star.json", + "particles/presets/fireworks2.json", + "particles/presets/fireworks2flare.json", + "particles/presets/fireworks2hit.json", + "particles/presets/fireworkshitdistort.json", + "particles/presets/fireworks2stars.json" + ] + }, + { + "preview" : "preview_fireworks3/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "materials/presets/fireworks_hit_distort.json", + "particles/presets/fireworks3.json", + "particles/presets/fireworks3flare.json", + "particles/presets/fireworks3hit.json", + "particles/presets/fireworkshitdistort.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.tga b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/presets/fireworks_halo.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/presets/fireworks_halo.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/presets/fireworks_halo.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/presets/fireworks_halo_4.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/presets/fireworks_halo_4.json new file mode 100644 index 0000000..06b0471 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/materials/presets/fireworks_halo_4.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/models/effectpreview.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1.json new file mode 100644 index 0000000..51c5ffe --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1.json @@ -0,0 +1,130 @@ +{ + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/fireworks1flare.json", + "type" : "eventdeath" + }, + { + "id" : 11, + "name" : "particles/presets/fireworks1hit.json", + "type" : "eventdeath" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 0, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0.5 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 500, + "min" : 400, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1000 3500 0", + "min" : "-1000 2500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 240 128", + "min" : "255 250 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo_4.json", + "maxcount" : 4, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -1000 0", + "id" : 7, + "name" : "movement" + }, + { + "endvalue" : 0.050000000000000003, + "id" : 8, + "name" : "sizechange" + }, + { + "frequencymax" : 50, + "frequencymin" : 20, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1flare.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1flare.json new file mode 100644 index 0000000..9ca0f50 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1flare.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 240 128", + "min" : "255 197 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 4, + "operator" : + [ + { + "id" : 6, + "name" : "alphafade" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 8, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1hit.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1hit.json new file mode 100644 index 0000000..4d0b2ec --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/particles/presets/fireworks1hit.json @@ -0,0 +1,108 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 150, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 1500 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 10, + "id" : 2, + "max" : 1.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 127 7", + "min" : "255 75 23", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 150, + "operator" : + [ + { + "drag" : 3.5, + "gravity" : "0 -1000 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/presets/fireworks/preset.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/presets/fireworks/preset.json new file mode 100644 index 0000000..6335340 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/presets/fireworks/preset.json @@ -0,0 +1,87 @@ +{ + "name" : "ui_editor_preset_fireworks_title", + "description" : "ui_editor_preset_fireworks_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Fireworks 1", + "value" : 0 + }, + { + "label" : "Fireworks 2", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "preview_fireworks1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks1.json", + "particles/presets/fireworks1flare.json", + "particles/presets/fireworks1hit.json" + ] + }, + { + "preview" : "preview_fireworks2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks2.json", + "particles/presets/fireworks2flare.json", + "particles/presets/fireworks2hit.json" + ] + }, + { + "preview" : "preview_fireworks3/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks3.json", + "particles/presets/fireworks3flare.json", + "particles/presets/fireworks3hit.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/project.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/project.json new file mode 100644 index 0000000..8f92b8d --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview_fireworks1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/scene.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/scene.json new file mode 100644 index 0000000..dbe6599 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/scene.json @@ -0,0 +1,44 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 1024, + "width" : 1024 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "name" : "fireworks1", + "origin" : "509.592 81.218 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/fireworks1.json", + "particlesrc" : null, + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/template.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_halo.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_halo.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_halo.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_halo_4.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_halo_4.json new file mode 100644 index 0000000..06b0471 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_halo_4.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_stars.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_stars.json new file mode 100644 index 0000000..6411e68 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/materials/presets/fireworks_stars.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/star" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2.json new file mode 100644 index 0000000..875ad90 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2.json @@ -0,0 +1,135 @@ +{ + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/fireworks2flare.json", + "type" : "eventdeath" + }, + { + "flags" : 0, + "id" : 11, + "name" : "particles/presets/fireworks2hit.json", + "type" : "eventdeath" + }, + { + "name" : "particles/presets/fireworks2stars.json", + "type" : "eventdeath" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 0, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0.7 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 500, + "min" : 400, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1000 3500 0", + "min" : "-1000 2500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 159 68", + "min" : "255 181 63", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo_4.json", + "maxcount" : 4, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -1000 0", + "id" : 7, + "name" : "movement" + }, + { + "endvalue" : 0.050000000000000003, + "id" : 8, + "name" : "sizechange" + }, + { + "frequencymax" : 50, + "frequencymin" : 20, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2flare.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2flare.json new file mode 100644 index 0000000..0cf050d --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2flare.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "128 210 255", + "min" : "85 180 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 4, + "operator" : + [ + { + "id" : 6, + "name" : "alphafade" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 8, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2hit.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2hit.json new file mode 100644 index 0000000..d2c5589 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2hit.json @@ -0,0 +1,116 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 150, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 1100 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 10, + "id" : 2, + "max" : 1.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "7 200 255", + "min" : "23 50 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 150, + "operator" : + [ + { + "drag" : 3.5, + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 1 + }, + { + "frequencymax" : 20, + "frequencymin" : 5, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2stars.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2stars.json new file mode 100644 index 0000000..1162fb2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/particles/presets/fireworks2stars.json @@ -0,0 +1,140 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.5 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 7, + "instantaneous" : 50, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 800, + "speedmin" : 500 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 1, + "id" : 2, + "max" : 1.1000000000000001, + "min" : 0.90000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 90, + "min" : 70, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "76 121 255", + "min" : "112 186 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + }, + { + "id" : 6, + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/fireworks_stars.json", + "maxcount" : 50, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -400 0", + "id" : 8, + "name" : "movement" + }, + { + "force" : "0 0 0", + "id" : 9, + "name" : "angularmovement" + }, + { + "id" : 10, + "name" : "sizechange", + "starttime" : 0.80000000000000004 + }, + { + "blendinend" : 0, + "blendinstart" : 0, + "frequencymax" : 30, + "frequencymin" : 30, + "id" : 11, + "name" : "oscillatealpha", + "phasemax" : 0.10000000000000001, + "scalemin" : 0 + }, + { + "endtime" : 0.59999999999999998, + "endvalue" : 1, + "id" : 12, + "name" : "alphachange", + "starttime" : 0.5, + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/presets/fireworks/preset.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/presets/fireworks/preset.json new file mode 100644 index 0000000..4bd6e42 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/presets/fireworks/preset.json @@ -0,0 +1,91 @@ +{ + "name" : "ui_editor_preset_fireworks_title", + "description" : "ui_editor_preset_fireworks_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Fireworks 1", + "value" : 0 + }, + { + "label" : "Fireworks 2", + "value" : 1 + }, + { + "label" : "Fireworks 3", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "preview_fireworks1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks1.json", + "particles/presets/fireworks1flare.json", + "particles/presets/fireworks1hit.json" + ] + }, + { + "preview" : "preview_fireworks2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks2.json", + "particles/presets/fireworks2flare.json", + "particles/presets/fireworks2hit.json" + ] + }, + { + "preview" : "preview_fireworks3/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks3.json", + "particles/presets/fireworks3flare.json", + "particles/presets/fireworks3hit.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/project.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/project.json new file mode 100644 index 0000000..607a55a --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "preview_fireworks2" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/scene.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/scene.json new file mode 100644 index 0000000..3255db6 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks2/scene.json @@ -0,0 +1,36 @@ +{ + "camera" : + { + "center" : "-83.140 -123.288 -1.000", + "eye" : "-83.140 -123.288 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "camerafade" : true, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 1024, + "width" : 1024 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "model" : null, + "name" : "Fireworks 2", + "origin" : "480.288 187.839 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/fireworks2.json", + "particlesrc" : null, + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/materials/presets/fireworks_halo.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/materials/presets/fireworks_halo.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/materials/presets/fireworks_halo.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/materials/presets/fireworks_halo_4.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/materials/presets/fireworks_halo_4.json new file mode 100644 index 0000000..06b0471 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/materials/presets/fireworks_halo_4.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3.json new file mode 100644 index 0000000..9bd329f --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3.json @@ -0,0 +1,130 @@ +{ + "children" : + [ + { + "id" : 11, + "name" : "particles/presets/fireworks3flare.json", + "type" : "eventdeath" + }, + { + "id" : 12, + "name" : "particles/presets/fireworks3hit.json", + "type" : "eventdeath" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 0, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 500, + "min" : 400, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "1000 3500 0", + "min" : "-1000 2500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 240 128", + "min" : "255 250 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo_4.json", + "maxcount" : 4, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -1000 0", + "id" : 7, + "name" : "movement" + }, + { + "endvalue" : 0.050000000000000003, + "id" : 8, + "name" : "sizechange" + }, + { + "frequencymax" : 50, + "frequencymin" : 20, + "id" : 9, + "name" : "oscillatealpha", + "scalemin" : 0.20000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3flare.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3flare.json new file mode 100644 index 0000000..9ca0f50 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3flare.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 240 128", + "min" : "255 197 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 4, + "operator" : + [ + { + "id" : 6, + "name" : "alphafade" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.5 + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 8, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3hit.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3hit.json new file mode 100644 index 0000000..6a82fd3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/particles/presets/fireworks3hit.json @@ -0,0 +1,119 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "instantaneous" : 200, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "speedmax" : 750, + "speedmin" : 400 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 1, + "id" : 2, + "max" : 1.5, + "min" : 0.80000000000000004, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 20, + "min" : 10, + "name" : "sizerandom" + }, + { + "exponent" : 1, + "id" : 4, + "max" : "255 250 76", + "min" : "255 238 112", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireworks_halo.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 4, + "gravity" : "0 -400 0", + "id" : 6, + "name" : "movement" + }, + { + "id" : 7, + "name" : "sizechange", + "starttime" : 0.80000000000000004 + }, + { + "blendinend" : 0.59999999999999998, + "blendinstart" : 0.5, + "frequencymax" : 30, + "frequencymin" : 30, + "id" : 8, + "name" : "oscillatealpha", + "phasemax" : 0.10000000000000001, + "scalemin" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/presets/fireworks/preset.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/presets/fireworks/preset.json new file mode 100644 index 0000000..4bd6e42 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/presets/fireworks/preset.json @@ -0,0 +1,91 @@ +{ + "name" : "ui_editor_preset_fireworks_title", + "description" : "ui_editor_preset_fireworks_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Fireworks 1", + "value" : 0 + }, + { + "label" : "Fireworks 2", + "value" : 1 + }, + { + "label" : "Fireworks 3", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "preview_fireworks1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks1.json", + "particles/presets/fireworks1flare.json", + "particles/presets/fireworks1hit.json" + ] + }, + { + "preview" : "preview_fireworks2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks2.json", + "particles/presets/fireworks2flare.json", + "particles/presets/fireworks2hit.json" + ] + }, + { + "preview" : "preview_fireworks3/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireworks 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireworks3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireworks_halo.json", + "materials/presets/fireworks_halo_4.json", + "particles/presets/fireworks3.json", + "particles/presets/fireworks3flare.json", + "particles/presets/fireworks3hit.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/project.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/project.json new file mode 100644 index 0000000..496e287 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "preview_fireworks3" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/scene.json b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/scene.json new file mode 100644 index 0000000..70031d9 --- /dev/null +++ b/modules/wallpaper-engine/presets/fireworks/preview_fireworks3/scene.json @@ -0,0 +1,36 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "camerafade" : true, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 1024, + "width" : 1024 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "model" : null, + "name" : "Fireworks 2", + "origin" : "510.125 107.530 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/fireworks3.json", + "particlesrc" : null, + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/materials/presets/fog1.json b/modules/wallpaper-engine/presets/fog/materials/presets/fog1.json new file mode 100644 index 0000000..3444389 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/materials/presets/fog1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fog/fog1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/materials/presets/fog2.json b/modules/wallpaper-engine/presets/fog/materials/presets/fog2.json new file mode 100644 index 0000000..02fa39f --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/materials/presets/fog2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fog/fog3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/particles/presets/fog1.json b/modules/wallpaper-engine/presets/fog/particles/presets/fog1.json new file mode 100644 index 0000000..9aa3af5 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/particles/presets/fog1.json @@ -0,0 +1,121 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.2 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1.5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "80 0 0", + "min" : "25 0 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "max" : 0.20000000000000001, + "min" : 0.14999999999999999, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/fog1.json", + "maxcount" : 20, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/particles/presets/fog2.json b/modules/wallpaper-engine/presets/fog/particles/presets/fog2.json new file mode 100644 index 0000000..e50c5f3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/particles/presets/fog2.json @@ -0,0 +1,117 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.2 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2200, + "min" : 1200, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 1.7", + "min" : "0 0 1.4", + "name" : "rotationrandom" + }, + { + "id" : 6, + "max" : 0.29999999999999999, + "min" : 0.14999999999999999, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/fog2.json", + "maxcount" : 20, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/preset.json b/modules/wallpaper-engine/presets/fog/preset.json new file mode 100644 index 0000000..3410d21 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_fog_title", + "description" : "ui_editor_preset_fog_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_fog_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_fog_variant_2", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewfog1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fog1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fog1.json", + "particles/presets/fog1.json" + ] + }, + { + "preview" : "previewfog2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fog2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fog2.json", + "particles/presets/fog2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.json b/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.tga b/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/fog/previewfog1/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/materials/presets/fog1.json b/modules/wallpaper-engine/presets/fog/previewfog1/materials/presets/fog1.json new file mode 100644 index 0000000..3444389 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/materials/presets/fog1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fog/fog1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/models/effectpreview.json b/modules/wallpaper-engine/presets/fog/previewfog1/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/particles/presets/fog1.json b/modules/wallpaper-engine/presets/fog/previewfog1/particles/presets/fog1.json new file mode 100644 index 0000000..9aa3af5 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/particles/presets/fog1.json @@ -0,0 +1,121 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.2 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1.5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "80 0 0", + "min" : "25 0 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "max" : 0.20000000000000001, + "min" : 0.14999999999999999, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/fog1.json", + "maxcount" : 20, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/presets/fog/preset.json b/modules/wallpaper-engine/presets/fog/previewfog1/presets/fog/preset.json new file mode 100644 index 0000000..c7ec35e --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/presets/fog/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_fog_title", + "description" : "ui_editor_preset_fog_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Fog 1", + "value" : 0 + }, + { + "label" : "Fog 2", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewfog1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fog1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fog1.json", + "particles/presets/fog1.json" + ] + }, + { + "preview" : "previewfog2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fog2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fog2.json", + "particles/presets/fog2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/project.json b/modules/wallpaper-engine/presets/fog/previewfog1/project.json new file mode 100644 index 0000000..0b9b34d --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewfog1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/scene.json b/modules/wallpaper-engine/presets/fog/previewfog1/scene.json new file mode 100644 index 0000000..38cf34f --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Fog 1", + "origin" : "120.071 46.079 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/fog1.json", + "particlesrc" : null, + "scale" : "0.515 0.515 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog1/template.json b/modules/wallpaper-engine/presets/fog/previewfog1/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.json b/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.tga b/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/fog/previewfog2/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/materials/presets/fog2.json b/modules/wallpaper-engine/presets/fog/previewfog2/materials/presets/fog2.json new file mode 100644 index 0000000..02fa39f --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/materials/presets/fog2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/fog/fog3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/models/effectpreview.json b/modules/wallpaper-engine/presets/fog/previewfog2/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/particles/presets/fog2.json b/modules/wallpaper-engine/presets/fog/previewfog2/particles/presets/fog2.json new file mode 100644 index 0000000..e50c5f3 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/particles/presets/fog2.json @@ -0,0 +1,117 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.2 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2200, + "min" : 1200, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 1.7", + "min" : "0 0 1.4", + "name" : "rotationrandom" + }, + { + "id" : 6, + "max" : 0.29999999999999999, + "min" : 0.14999999999999999, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/fog2.json", + "maxcount" : 20, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/presets/fog/preset.json b/modules/wallpaper-engine/presets/fog/previewfog2/presets/fog/preset.json new file mode 100644 index 0000000..c7ec35e --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/presets/fog/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_fog_title", + "description" : "ui_editor_preset_fog_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Fog 1", + "value" : 0 + }, + { + "label" : "Fog 2", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewfog1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fog1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fog1.json", + "particles/presets/fog1.json" + ] + }, + { + "preview" : "previewfog2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fog 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fog2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fog2.json", + "particles/presets/fog2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/project.json b/modules/wallpaper-engine/presets/fog/previewfog2/project.json new file mode 100644 index 0000000..0cf9709 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewfog2", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/scene.json b/modules/wallpaper-engine/presets/fog/previewfog2/scene.json new file mode 100644 index 0000000..a480129 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Fog 1", + "origin" : "124.532 -5.509 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/fog2.json", + "particlesrc" : null, + "scale" : "0.907 0.907 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/fog/previewfog2/template.json b/modules/wallpaper-engine/presets/fog/previewfog2/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/fog/previewfog2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/materials/presets/fireflies.json b/modules/wallpaper-engine/presets/interactive/materials/presets/fireflies.json new file mode 100644 index 0000000..6be4fc8 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/materials/presets/fireflies.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/materials/presets/firefliestrail.json b/modules/wallpaper-engine/presets/interactive/materials/presets/firefliestrail.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/materials/presets/firefliestrail.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/interactive/materials/presets/trail_0.json b/modules/wallpaper-engine/presets/interactive/materials/presets/trail_0.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/materials/presets/trail_0.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/materials/presets/trail_1.json b/modules/wallpaper-engine/presets/interactive/materials/presets/trail_1.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/materials/presets/trail_1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/materials/presets/trail_2.json b/modules/wallpaper-engine/presets/interactive/materials/presets/trail_2.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/materials/presets/trail_2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/particles/presets/fireflies.json b/modules/wallpaper-engine/presets/interactive/particles/presets/fireflies.json new file mode 100644 index 0000000..a4bbb55 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/particles/presets/fireflies.json @@ -0,0 +1,150 @@ +{ + "children" : + [ + { + "id" : 12, + "maxcount" : 20, + "name" : "particles/presets/firefliestrail.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.5 0", + "distancemax" : 512, + "distancemin" : 32, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 90, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "174 255 106", + "min" : "136 255 80", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireflies.json", + "maxcount" : 10, + "operator" : + [ + { + "drag" : 2.50000000000000003, + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 7, + "name" : "alphafade" + }, + { + "frequencymax" : 20, + "frequencymin" : 10, + "id" : 8, + "name" : "oscillatealpha", + "scalemin" : 0.69999999999999996 + }, + { + "id" : 9, + "mask" : "1 1 0", + "name" : "turbulence", + "scale" : 0.01, + "speedmax" : 50, + "speedmin" : 30 + }, + { + "controlpoint" : 1, + "id" : 10, + "name" : "controlpointattract", + "scale" : -500, + "threshold" : 64 + }, + { + "frequencymax" : 1, + "frequencymin" : 0.29999999999999999, + "id" : 11, + "name" : "oscillateposition", + "scalemax" : 15, + "scalemin" : 5 + }, + { + "frequencymin" : 5, + "id" : 12, + "name" : "oscillatesize", + "scalemax" : 1.1000000000000001, + "scalemin" : 0.90000000000000002 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/particles/presets/firefliestrail.json b/modules/wallpaper-engine/presets/interactive/particles/presets/firefliestrail.json new file mode 100644 index 0000000..80a9ae6 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/particles/presets/firefliestrail.json @@ -0,0 +1,123 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 2, + "id" : 2, + "max" : 1, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "exponent" : 2, + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "5 5 0", + "min" : "-5 -5 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "150 255 132", + "min" : "136 255 67", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : 0.40000000000000002, + "min" : 0.20000000000000001, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/firefliestrail.json", + "maxcount" : 10, + "operator" : + [ + { + "drag" : 0.01, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + }, + { + "id" : 10, + "name" : "sizechange" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/particles/presets/trail_0.json b/modules/wallpaper-engine/presets/interactive/particles/presets/trail_0.json new file mode 100644 index 0000000..36d1615 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/particles/presets/trail_0.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 1", + "distancemax" : 64, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 15, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "89 153 255", + "min" : "255 70 70", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/trail_0.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 9, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : 1024, + "threshold" : 512 + }, + { + "distanceinner" : 32, + "distanceouter" : 128, + "id" : 10, + "name" : "vortex", + "speedinner" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.5, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/particles/presets/trail_1.json b/modules/wallpaper-engine/presets/interactive/particles/presets/trail_1.json new file mode 100644 index 0000000..1c79641 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/particles/presets/trail_1.json @@ -0,0 +1,108 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 1, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "flags" : 2, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 32 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 15, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "26 255 0", + "min" : "255 0 0", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/trail_1.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 0, + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/particles/presets/trail_2.json b/modules/wallpaper-engine/presets/interactive/particles/presets/trail_2.json new file mode 100644 index 0000000..36db8d5 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/particles/presets/trail_2.json @@ -0,0 +1,116 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 32 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 15, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "130 178 255", + "min" : "190 226 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/trail_2.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 -500 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 8, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -2048, + "threshold" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.5, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/preset.json b/modules/wallpaper-engine/presets/interactive/preset.json new file mode 100644 index 0000000..bd33951 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/preset.json @@ -0,0 +1,106 @@ +{ + "name" : "ui_editor_preset_interactive_title", + "description" : "ui_editor_preset_interactive_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_interactive_variant_drops", + "value" : 2 + }, + { + "label" : "ui_editor_preset_interactive_variant_trails_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_interactive_variant_trails_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_interactive_variant_fireflies", + "value" : 3 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtrails0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_0.json", + "particles/presets/trail_0.json" + ] + }, + { + "preview" : "previewtrails1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_1.json", + "particles/presets/trail_1.json" + ] + }, + { + "preview" : "previewtrails2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Drops", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_2.json", + "particles/presets/trail_2.json" + ] + }, + { + "preview" : "previewfireflies/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireflies", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireflies.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireflies.json", + "materials/presets/firefliestrail.json", + "particles/presets/fireflies.json", + "particles/presets/firefliestrail.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/materials/presets/fireflies.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/materials/presets/fireflies.json new file mode 100644 index 0000000..6be4fc8 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/materials/presets/fireflies.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/materials/presets/firefliestrail.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/materials/presets/firefliestrail.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/materials/presets/firefliestrail.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/particles/presets/fireflies.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/particles/presets/fireflies.json new file mode 100644 index 0000000..f49cad4 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/particles/presets/fireflies.json @@ -0,0 +1,143 @@ +{ + "children" : + [ + { + "id" : 12, + "maxcount" : 20, + "name" : "particles/presets/firefliestrail.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.5 0", + "distancemax" : 128, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 90, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "174 255 106", + "min" : "136 255 80", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/fireflies.json", + "maxcount" : 10, + "operator" : + [ + { + "drag" : 2.50000000000000003, + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 7, + "name" : "alphafade" + }, + { + "frequencymax" : 20, + "frequencymin" : 10, + "id" : 8, + "name" : "oscillatealpha", + "scalemin" : 0.69999999999999996 + }, + { + "id" : 9, + "mask" : "1 1 0", + "name" : "turbulence", + "scale" : 0.01, + "speedmax" : 50, + "speedmin" : 30 + }, + { + "controlpoint" : 1, + "id" : 10, + "name" : "controlpointattract", + "scale" : -500, + "threshold" : 64 + }, + { + "frequencymax" : 1, + "frequencymin" : 0.29999999999999999, + "id" : 11, + "name" : "oscillateposition", + "scalemax" : 15, + "scalemin" : 5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/particles/presets/firefliestrail.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/particles/presets/firefliestrail.json new file mode 100644 index 0000000..99ccde8 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/particles/presets/firefliestrail.json @@ -0,0 +1,123 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 30 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 2, + "id" : 2, + "max" : 1, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "exponent" : 2, + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "5 5 0", + "min" : "-5 -5 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "150 255 132", + "min" : "136 255 67", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : 0.40000000000000002, + "min" : 0.20000000000000001, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/firefliestrail.json", + "maxcount" : 25, + "operator" : + [ + { + "drag" : 0.01, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + }, + { + "id" : 10, + "name" : "sizechange" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/presets/fireflies/preset.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/presets/fireflies/preset.json new file mode 100644 index 0000000..5dd2bbb --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/presets/fireflies/preset.json @@ -0,0 +1,24 @@ +{ + "name" : "ui_editor_preset_fireflies_particles_title", + "description" : "ui_editor_preset_fireflies_particles_description", + "tag" : "scene2d", + "group" : "preset", + "preview" : "preview/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Fireflies", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/fireflies.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/fireflies.json", + "materials/presets/firefliestrail.json", + "particles/presets/fireflies.json", + "particles/presets/firefliestrail.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/project.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/scene.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/scene.json new file mode 100644 index 0000000..be932f7 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/scene.json @@ -0,0 +1,46 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 50, + "image" : null, + "model" : null, + "name" : "Fireflies", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/fireflies.json", + "particlesrc" : null, + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewfireflies/template.json b/modules/wallpaper-engine/presets/interactive/previewfireflies/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewfireflies/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails0/materials/presets/trail_0.json b/modules/wallpaper-engine/presets/interactive/previewtrails0/materials/presets/trail_0.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails0/materials/presets/trail_0.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails0/particles/presets/trail_0.json b/modules/wallpaper-engine/presets/interactive/previewtrails0/particles/presets/trail_0.json new file mode 100644 index 0000000..36d1615 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails0/particles/presets/trail_0.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 1", + "distancemax" : 64, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 15, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "89 153 255", + "min" : "255 70 70", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/trail_0.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 9, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : 1024, + "threshold" : 512 + }, + { + "distanceinner" : 32, + "distanceouter" : 128, + "id" : 10, + "name" : "vortex", + "speedinner" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.5, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails0/presets/interactive/preset.json b/modules/wallpaper-engine/presets/interactive/previewtrails0/presets/interactive/preset.json new file mode 100644 index 0000000..21f1ac4 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails0/presets/interactive/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_interactive_title", + "description" : "ui_editor_preset_interactive_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Trails 0", + "value" : 0 + }, + { + "label" : "Trails 1", + "value" : 1 + }, + { + "label" : "Drops", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtrails0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_0.json", + "particles/presets/trail_0.json" + ] + }, + { + "preview" : "previewtrails1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_1.json", + "particles/presets/trail_1.json" + ] + }, + { + "preview" : "previewtrails2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Drops", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_2.json", + "particles/presets/trail_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails0/project.json b/modules/wallpaper-engine/presets/interactive/previewtrails0/project.json new file mode 100644 index 0000000..8b7b9c9 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails0/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewtrails0" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails0/scene.json b/modules/wallpaper-engine/presets/interactive/previewtrails0/scene.json new file mode 100644 index 0000000..230ae30 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails0/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Trails 0", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/trail_0.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails0/template.json b/modules/wallpaper-engine/presets/interactive/previewtrails0/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails0/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails1/materials/presets/trail_1.json b/modules/wallpaper-engine/presets/interactive/previewtrails1/materials/presets/trail_1.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails1/materials/presets/trail_1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails1/particles/presets/trail_1.json b/modules/wallpaper-engine/presets/interactive/previewtrails1/particles/presets/trail_1.json new file mode 100644 index 0000000..1c79641 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails1/particles/presets/trail_1.json @@ -0,0 +1,108 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 1, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "flags" : 2, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 32 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 15, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "26 255 0", + "min" : "255 0 0", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/trail_1.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 0, + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails1/presets/interactive/preset.json b/modules/wallpaper-engine/presets/interactive/previewtrails1/presets/interactive/preset.json new file mode 100644 index 0000000..21f1ac4 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails1/presets/interactive/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_interactive_title", + "description" : "ui_editor_preset_interactive_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Trails 0", + "value" : 0 + }, + { + "label" : "Trails 1", + "value" : 1 + }, + { + "label" : "Drops", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtrails0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_0.json", + "particles/presets/trail_0.json" + ] + }, + { + "preview" : "previewtrails1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_1.json", + "particles/presets/trail_1.json" + ] + }, + { + "preview" : "previewtrails2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Drops", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_2.json", + "particles/presets/trail_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails1/project.json b/modules/wallpaper-engine/presets/interactive/previewtrails1/project.json new file mode 100644 index 0000000..4060080 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails1/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewtrails1" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails1/scene.json b/modules/wallpaper-engine/presets/interactive/previewtrails1/scene.json new file mode 100644 index 0000000..adab6d5 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Trails 1", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/trail_1.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails1/template.json b/modules/wallpaper-engine/presets/interactive/previewtrails1/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails2/materials/presets/trail_2.json b/modules/wallpaper-engine/presets/interactive/previewtrails2/materials/presets/trail_2.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails2/materials/presets/trail_2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails2/particles/presets/trail_2.json b/modules/wallpaper-engine/presets/interactive/previewtrails2/particles/presets/trail_2.json new file mode 100644 index 0000000..36db8d5 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails2/particles/presets/trail_2.json @@ -0,0 +1,116 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 32 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 15, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "130 178 255", + "min" : "190 226 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/trail_2.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 -500 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "controlpoint" : 1, + "id" : 8, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -2048, + "threshold" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.5, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails2/presets/interactive/preset.json b/modules/wallpaper-engine/presets/interactive/previewtrails2/presets/interactive/preset.json new file mode 100644 index 0000000..21f1ac4 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails2/presets/interactive/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_interactive_title", + "description" : "ui_editor_preset_interactive_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Trails 0", + "value" : 0 + }, + { + "label" : "Trails 1", + "value" : 1 + }, + { + "label" : "Drops", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewtrails0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_0.json", + "particles/presets/trail_0.json" + ] + }, + { + "preview" : "previewtrails1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Trails 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_1.json", + "particles/presets/trail_1.json" + ] + }, + { + "preview" : "previewtrails2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Drops", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/trail_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/trail_2.json", + "particles/presets/trail_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails2/project.json b/modules/wallpaper-engine/presets/interactive/previewtrails2/project.json new file mode 100644 index 0000000..5c91ef2 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails2/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewtrails2" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails2/scene.json b/modules/wallpaper-engine/presets/interactive/previewtrails2/scene.json new file mode 100644 index 0000000..f74cb90 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Drops", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/trail_2.json", + "scale" : "0.477 0.477 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/interactive/previewtrails2/template.json b/modules/wallpaper-engine/presets/interactive/previewtrails2/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/interactive/previewtrails2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves1.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves1.json new file mode 100644 index 0000000..3856bdf --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves1b.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves1b.json new file mode 100644 index 0000000..4870e39 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves1b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves2.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves2.json new file mode 100644 index 0000000..f51d561 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves2.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves7" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves2b.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves2b.json new file mode 100644 index 0000000..b4c22f7 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves2b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves8" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves3.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves3.json new file mode 100644 index 0000000..c92a152 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves3.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves3b.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves3b.json new file mode 100644 index 0000000..f92645a --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves3b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves5" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves4.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves4.json new file mode 100644 index 0000000..f51d561 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves4.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves7" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves4b.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves4b.json new file mode 100644 index 0000000..ba04e74 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves4b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves6" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/materials/presets/leaves5.json b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves5.json new file mode 100644 index 0000000..c60e071 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/materials/presets/leaves5.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/rosepetals" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves1.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves1.json new file mode 100644 index 0000000..9b327ab --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves1.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves1b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves1.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves1b.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves1b.json new file mode 100644 index 0000000..859eb29 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves1b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves1b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves2.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves2.json new file mode 100644 index 0000000..b2da7f4 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves2.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves2b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 236 0", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves2.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves2b.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves2b.json new file mode 100644 index 0000000..4a4e5c2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves2b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves2b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves3.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves3.json new file mode 100644 index 0000000..de789d0 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves3.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves3b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 236 0", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves3.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves3b.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves3b.json new file mode 100644 index 0000000..69ea7c8 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves3b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves3b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves4.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves4.json new file mode 100644 index 0000000..28c98cb --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves4.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves4b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 236 0", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves4.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves4b.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves4b.json new file mode 100644 index 0000000..9906693 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves4b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves4b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/particles/presets/leaves5.json b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves5.json new file mode 100644 index 0000000..93e57d5 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/particles/presets/leaves5.json @@ -0,0 +1,141 @@ +{ + "animationmode" : "randomframe", + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 10, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 20 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "exponent" : 2, + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 192 248", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "5 5 5", + "min" : "-5 -5 -5", + "name" : "angularvelocityrandom" + }, + { + "id" : 9, + "max" : "6.283 6.283 6.283", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/leaves5.json", + "maxcount" : 200, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 11, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 12, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 13, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/preset.json b/modules/wallpaper-engine/presets/leaves/preset.json new file mode 100644 index 0000000..72de7ba --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/preset.json @@ -0,0 +1,134 @@ +{ + "name" : "ui_editor_preset_leaves_title", + "description" : "ui_editor_preset_leaves_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_leaves_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_leaves_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_leaves_variant_3", + "value" : 2 + }, + { + "label" : "ui_editor_preset_leaves_variant_4", + "value" : 3 + }, + { + "label" : "ui_editor_preset_leaves_variant_5", + "value" : 4 + } + ] + }, + "variants" : + [ + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves1.json", + "materials/presets/leaves1b.json", + "particles/presets/leaves1.json", + "particles/presets/leaves1b.json" + ] + }, + { + "preview" : "previewleaves2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves2.json", + "materials/presets/leaves2b.json", + "particles/presets/leaves2.json", + "particles/presets/leaves2b.json" + ] + }, + { + "preview" : "previewleaves3/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves3.json", + "materials/presets/leaves3b.json", + "particles/presets/leaves3.json", + "particles/presets/leaves3b.json" + ] + }, + { + "preview" : "previewleaves4/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 4", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves4.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves4.json", + "materials/presets/leaves4b.json", + "particles/presets/leaves4.json", + "particles/presets/leaves4b.json" + ] + }, + { + "preview" : "previewleaves5/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Sakura", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves5.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves5.json", + "particles/presets/leaves5.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.tga b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/presets/leaves1.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/presets/leaves1.json new file mode 100644 index 0000000..3856bdf --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/presets/leaves1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/presets/leaves1b.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/presets/leaves1b.json new file mode 100644 index 0000000..4870e39 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/materials/presets/leaves1b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/models/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/particles/presets/leaves1.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/particles/presets/leaves1.json new file mode 100644 index 0000000..9b327ab --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/particles/presets/leaves1.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves1b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves1.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/particles/presets/leaves1b.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/particles/presets/leaves1b.json new file mode 100644 index 0000000..859eb29 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/particles/presets/leaves1b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves1b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/presets/leaves/preset.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/presets/leaves/preset.json new file mode 100644 index 0000000..e12e279 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/presets/leaves/preset.json @@ -0,0 +1,112 @@ +{ + "name" : "ui_editor_preset_leaves_title", + "description" : "ui_editor_preset_leaves_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Leaves 1", + "value" : 0 + }, + { + "label" : "Leaves 2", + "value" : 1 + }, + { + "label" : "Leaves 3", + "value" : 2 + }, + { + "label" : "Leaves 4", + "value" : 3 + } + ] + }, + "variants" : + [ + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves1.json", + "materials/presets/leaves1b.json", + "particles/presets/leaves1.json", + "particles/presets/leaves1b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves2.json", + "materials/presets/leaves2b.json", + "particles/presets/leaves2.json", + "particles/presets/leaves2b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves3.json", + "materials/presets/leaves3b.json", + "particles/presets/leaves3.json", + "particles/presets/leaves3b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 4", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves4.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves4.json", + "materials/presets/leaves4b.json", + "particles/presets/leaves4.json", + "particles/presets/leaves4b.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/project.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/project.json new file mode 100644 index 0000000..b745097 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewleaves1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/scene.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/scene.json new file mode 100644 index 0000000..d5a49d3 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Leaves 1", + "origin" : "130.145 50.945 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/leaves1.json", + "particlesrc" : null, + "scale" : "0.354 0.354 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves1/template.json b/modules/wallpaper-engine/presets/leaves/previewleaves1/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.tga b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/presets/leaves2.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/presets/leaves2.json new file mode 100644 index 0000000..f51d561 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/presets/leaves2.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves7" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/presets/leaves2b.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/presets/leaves2b.json new file mode 100644 index 0000000..b4c22f7 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/materials/presets/leaves2b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves8" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/models/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/particles/presets/leaves2.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/particles/presets/leaves2.json new file mode 100644 index 0000000..b2da7f4 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/particles/presets/leaves2.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves2b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 236 0", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves2.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/particles/presets/leaves2b.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/particles/presets/leaves2b.json new file mode 100644 index 0000000..4a4e5c2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/particles/presets/leaves2b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves2b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/presets/leaves/preset.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/presets/leaves/preset.json new file mode 100644 index 0000000..e12e279 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/presets/leaves/preset.json @@ -0,0 +1,112 @@ +{ + "name" : "ui_editor_preset_leaves_title", + "description" : "ui_editor_preset_leaves_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Leaves 1", + "value" : 0 + }, + { + "label" : "Leaves 2", + "value" : 1 + }, + { + "label" : "Leaves 3", + "value" : 2 + }, + { + "label" : "Leaves 4", + "value" : 3 + } + ] + }, + "variants" : + [ + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves1.json", + "materials/presets/leaves1b.json", + "particles/presets/leaves1.json", + "particles/presets/leaves1b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves2.json", + "materials/presets/leaves2b.json", + "particles/presets/leaves2.json", + "particles/presets/leaves2b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves3.json", + "materials/presets/leaves3b.json", + "particles/presets/leaves3.json", + "particles/presets/leaves3b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 4", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves4.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves4.json", + "materials/presets/leaves4b.json", + "particles/presets/leaves4.json", + "particles/presets/leaves4b.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/project.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/project.json new file mode 100644 index 0000000..ca67d61 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewleaves2", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/scene.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/scene.json new file mode 100644 index 0000000..3a72b93 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Leaves 2", + "origin" : "140.687 68.545 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/leaves2.json", + "particlesrc" : null, + "scale" : "0.376 0.376 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves2/template.json b/modules/wallpaper-engine/presets/leaves/previewleaves2/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.tga b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/presets/leaves3.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/presets/leaves3.json new file mode 100644 index 0000000..c92a152 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/presets/leaves3.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/presets/leaves3b.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/presets/leaves3b.json new file mode 100644 index 0000000..f92645a --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/materials/presets/leaves3b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves5" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/models/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/particles/presets/leaves3.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/particles/presets/leaves3.json new file mode 100644 index 0000000..de789d0 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/particles/presets/leaves3.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves3b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 236 0", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves3.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/particles/presets/leaves3b.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/particles/presets/leaves3b.json new file mode 100644 index 0000000..69ea7c8 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/particles/presets/leaves3b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves3b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/presets/leaves/preset.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/presets/leaves/preset.json new file mode 100644 index 0000000..e12e279 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/presets/leaves/preset.json @@ -0,0 +1,112 @@ +{ + "name" : "ui_editor_preset_leaves_title", + "description" : "ui_editor_preset_leaves_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Leaves 1", + "value" : 0 + }, + { + "label" : "Leaves 2", + "value" : 1 + }, + { + "label" : "Leaves 3", + "value" : 2 + }, + { + "label" : "Leaves 4", + "value" : 3 + } + ] + }, + "variants" : + [ + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves1.json", + "materials/presets/leaves1b.json", + "particles/presets/leaves1.json", + "particles/presets/leaves1b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves2.json", + "materials/presets/leaves2b.json", + "particles/presets/leaves2.json", + "particles/presets/leaves2b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves3.json", + "materials/presets/leaves3b.json", + "particles/presets/leaves3.json", + "particles/presets/leaves3b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 4", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves4.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves4.json", + "materials/presets/leaves4b.json", + "particles/presets/leaves4.json", + "particles/presets/leaves4b.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/project.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/project.json new file mode 100644 index 0000000..167d04a --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewleaves3", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/scene.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/scene.json new file mode 100644 index 0000000..a5ad129 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Leaves 3", + "origin" : "133.780 51.711 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/leaves3.json", + "particlesrc" : null, + "scale" : "0.396 0.396 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves3/template.json b/modules/wallpaper-engine/presets/leaves/previewleaves3/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves3/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.tga b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/presets/leaves4.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/presets/leaves4.json new file mode 100644 index 0000000..f51d561 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/presets/leaves4.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves7" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/presets/leaves4b.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/presets/leaves4b.json new file mode 100644 index 0000000..ba04e74 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/materials/presets/leaves4b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/leaves6" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/models/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/particles/presets/leaves4.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/particles/presets/leaves4.json new file mode 100644 index 0000000..28c98cb --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/particles/presets/leaves4.json @@ -0,0 +1,141 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/leaves4b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 236 0", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves4.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/particles/presets/leaves4b.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/particles/presets/leaves4b.json new file mode 100644 index 0000000..9906693 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/particles/presets/leaves4b.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 9, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 5 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 75, + "min" : 70, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "0 0 1", + "min" : "0 0 -1", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/leaves4b.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 10, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 11, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/presets/leaves/preset.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/presets/leaves/preset.json new file mode 100644 index 0000000..e12e279 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/presets/leaves/preset.json @@ -0,0 +1,112 @@ +{ + "name" : "ui_editor_preset_leaves_title", + "description" : "ui_editor_preset_leaves_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Leaves 1", + "value" : 0 + }, + { + "label" : "Leaves 2", + "value" : 1 + }, + { + "label" : "Leaves 3", + "value" : 2 + }, + { + "label" : "Leaves 4", + "value" : 3 + } + ] + }, + "variants" : + [ + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves1.json", + "materials/presets/leaves1b.json", + "particles/presets/leaves1.json", + "particles/presets/leaves1b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves2.json", + "materials/presets/leaves2b.json", + "particles/presets/leaves2.json", + "particles/presets/leaves2b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves3.json", + "materials/presets/leaves3b.json", + "particles/presets/leaves3.json", + "particles/presets/leaves3b.json" + ] + }, + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 4", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves4.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves4.json", + "materials/presets/leaves4b.json", + "particles/presets/leaves4.json", + "particles/presets/leaves4b.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/project.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/project.json new file mode 100644 index 0000000..4af8f63 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewleaves4", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/scene.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/scene.json new file mode 100644 index 0000000..47d2e83 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "-40.236 38.133 -1.000", + "eye" : "-40.236 38.133 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Leaves 4", + "origin" : "127.999 73.191 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/leaves4.json", + "particlesrc" : null, + "scale" : "0.304 0.304 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves4/template.json b/modules/wallpaper-engine/presets/leaves/previewleaves4/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves4/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.tga b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/presets/leaves5.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/presets/leaves5.json new file mode 100644 index 0000000..c60e071 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/materials/presets/leaves5.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/rosepetals" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/models/effectpreview.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/particles/presets/leaves5.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/particles/presets/leaves5.json new file mode 100644 index 0000000..93e57d5 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/particles/presets/leaves5.json @@ -0,0 +1,141 @@ +{ + "animationmode" : "randomframe", + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 1", + "distancemax" : 750, + "distancemin" : 0, + "id" : 10, + "name" : "sphererandom", + "origin" : "350 750 0", + "rate" : 20 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "exponent" : 2, + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-50 -15 0", + "min" : "-100 -100 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 192 248", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "rotationrandom" + }, + { + "id" : 7, + "name" : "turbulentvelocityrandom", + "offset" : 3, + "scale" : 0.5, + "speedmax" : 100, + "speedmin" : 35 + }, + { + "id" : 8, + "max" : "5 5 5", + "min" : "-5 -5 -5", + "name" : "angularvelocityrandom" + }, + { + "id" : 9, + "max" : "6.283 6.283 6.283", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/leaves5.json", + "maxcount" : 200, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 11, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 12, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 13, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 3, + "starttime" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/presets/leaves/preset.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/presets/leaves/preset.json new file mode 100644 index 0000000..860de90 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/presets/leaves/preset.json @@ -0,0 +1,134 @@ +{ + "name" : "ui_editor_preset_leaves_title", + "description" : "ui_editor_preset_leaves_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Leaves 1", + "value" : 0 + }, + { + "label" : "Leaves 2", + "value" : 1 + }, + { + "label" : "Leaves 3", + "value" : 2 + }, + { + "label" : "Leaves 4", + "value" : 3 + }, + { + "label" : "Sakura", + "value" : 4 + } + ] + }, + "variants" : + [ + { + "preview" : "previewleaves1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves1.json", + "materials/presets/leaves1b.json", + "particles/presets/leaves1.json", + "particles/presets/leaves1b.json" + ] + }, + { + "preview" : "previewleaves2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves2.json", + "materials/presets/leaves2b.json", + "particles/presets/leaves2.json", + "particles/presets/leaves2b.json" + ] + }, + { + "preview" : "previewleaves3/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 3", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves3.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves3.json", + "materials/presets/leaves3b.json", + "particles/presets/leaves3.json", + "particles/presets/leaves3b.json" + ] + }, + { + "preview" : "previewleaves4/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Leaves 4", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves4.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves4.json", + "materials/presets/leaves4b.json", + "particles/presets/leaves4.json", + "particles/presets/leaves4b.json" + ] + }, + { + "preview" : "previewleaves5/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Sakura", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/leaves5.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/leaves5.json", + "particles/presets/leaves5.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/project.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/project.json new file mode 100644 index 0000000..4fb00ec --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewleaves5", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/scene.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/scene.json new file mode 100644 index 0000000..dad5a40 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "-29.315 -15.164 -1.000", + "eye" : "-29.315 -15.164 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.4 0.4 0.4", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 20, + "image" : null, + "model" : null, + "name" : "Sakura", + "origin" : "116.308 -2.830 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/leaves5.json", + "particlesrc" : null, + "scale" : "0.584 0.584 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/leaves/previewleaves5/template.json b/modules/wallpaper-engine/presets/leaves/previewleaves5/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/leaves/previewleaves5/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/materials/presets/discharge.json b/modules/wallpaper-engine/presets/lightning/materials/presets/discharge.json new file mode 100644 index 0000000..1898385 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/materials/presets/discharge.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.0 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/materials/presets/lightning1.json b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning1.json new file mode 100644 index 0000000..619a8a0 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/lightning/lightning1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/materials/presets/lightning1b.json b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning1b.json new file mode 100644 index 0000000..b236216 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning1b.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/lightning/lightning3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/materials/presets/lightning2.json b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning2.json new file mode 100644 index 0000000..b236216 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/lightning/lightning3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/materials/presets/lightning2glow.json b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning2glow.json new file mode 100644 index 0000000..8d82a9b --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/materials/presets/lightning2glow.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/particles/presets/discharge.json b/modules/wallpaper-engine/presets/lightning/particles/presets/discharge.json new file mode 100644 index 0000000..999b1c3 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/particles/presets/discharge.json @@ -0,0 +1,118 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 2, + "id" : 1, + "offset" : "512 512 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 0.20000000000000001, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 150, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "200 200 0", + "min" : "-200 -200 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "0 53 255", + "name" : "colorrandom" + }, + { + "count" : 10, + "id" : 6, + "limitbehavior" : "mirror", + "name" : "mapsequencebetweencontrolpoints" + } + ], + "material" : "materials/presets/discharge.json", + "maxcount" : 64, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 0 + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/particles/presets/lightning1.json b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning1.json new file mode 100644 index 0000000..c99e4e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning1.json @@ -0,0 +1,110 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 8, + "name" : "particles/presets/lightning1b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 2 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.29999999999999999, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 800, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "132 185 255", + "min" : "198 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning1.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/particles/presets/lightning1b.json b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning1b.json new file mode 100644 index 0000000..767b2e1 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning1b.json @@ -0,0 +1,104 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "132 185 255", + "min" : "198 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning1b.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/particles/presets/lightning2.json b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning2.json new file mode 100644 index 0000000..3b1d930 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning2.json @@ -0,0 +1,115 @@ +{ + "animationmode" : null, + "children" : + [ + { + "flags" : 0, + "id" : 8, + "name" : "particles/presets/lightning2glow.json", + "origin" : "0 0 0", + "type" : "eventspawn" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "132 185 255", + "min" : "198 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 -1.6", + "min" : "0 0 -1.5", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning2.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/particles/presets/lightning2glow.json b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning2glow.json new file mode 100644 index 0000000..7c93472 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/particles/presets/lightning2glow.json @@ -0,0 +1,117 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 250 0", + "rate" : 0, + "speedmax" : 0 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.10000000000000001, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "exponent" : 5, + "id" : 3, + "max" : 3000, + "min" : 300, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "187 217 255", + "min" : "196 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning2glow.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "drag" : 5, + "id" : 8, + "name" : "movement" + }, + { + "id" : 9, + "name" : "sizechange" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/preset.json b/modules/wallpaper-engine/presets/lightning/preset.json new file mode 100644 index 0000000..91a5631 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/preset.json @@ -0,0 +1,86 @@ +{ + "name" : "ui_editor_preset_lightning_title", + "description" : "ui_editor_preset_lightning_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_lightning_variant_lightning_cloud", + "value" : 0 + }, + { + "label" : "ui_editor_preset_lightning_variant_thunderbolt", + "value" : 1 + }, + { + "label" : "ui_editor_preset_lightning_variant_discharge", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightning1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Lightning cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning1.json", + "materials/presets/lightning1b.json", + "particles/presets/lightning1.json", + "particles/presets/lightning1b.json" + ] + }, + { + "preview" : "previewlightning2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Thunderbolt", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning2.json", + "materials/presets/lightning2glow.json", + "particles/presets/lightning2.json", + "particles/presets/lightning2glow.json" + ] + }, + { + "preview" : "previewdischarge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Discharge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/discharge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/discharge.json", + "particles/presets/discharge.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewdischarge/materials/presets/discharge.json b/modules/wallpaper-engine/presets/lightning/previewdischarge/materials/presets/discharge.json new file mode 100644 index 0000000..1898385 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewdischarge/materials/presets/discharge.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.0 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewdischarge/particles/presets/discharge.json b/modules/wallpaper-engine/presets/lightning/previewdischarge/particles/presets/discharge.json new file mode 100644 index 0000000..999b1c3 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewdischarge/particles/presets/discharge.json @@ -0,0 +1,118 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 2, + "id" : 1, + "offset" : "512 512 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 0.20000000000000001, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 150, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "200 200 0", + "min" : "-200 -200 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "0 53 255", + "name" : "colorrandom" + }, + { + "count" : 10, + "id" : 6, + "limitbehavior" : "mirror", + "name" : "mapsequencebetweencontrolpoints" + } + ], + "material" : "materials/presets/discharge.json", + "maxcount" : 64, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 0 + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewdischarge/presets/lightning/preset.json b/modules/wallpaper-engine/presets/lightning/previewdischarge/presets/lightning/preset.json new file mode 100644 index 0000000..abc41fc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewdischarge/presets/lightning/preset.json @@ -0,0 +1,86 @@ +{ + "name" : "ui_editor_preset_lightning_title", + "description" : "ui_editor_preset_lightning_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Lightning cloud", + "value" : 0 + }, + { + "label" : "Thunderbolt", + "value" : 1 + }, + { + "label" : "Discharge", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightning1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Lightning cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning1.json", + "materials/presets/lightning1b.json", + "particles/presets/lightning1.json", + "particles/presets/lightning1b.json" + ] + }, + { + "preview" : "previewlightning2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Thunderbolt", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning2.json", + "materials/presets/lightning2glow.json", + "particles/presets/lightning2.json", + "particles/presets/lightning2glow.json" + ] + }, + { + "preview" : "previewdischarge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Discharge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/discharge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/discharge.json", + "particles/presets/discharge.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewdischarge/project.json b/modules/wallpaper-engine/presets/lightning/previewdischarge/project.json new file mode 100644 index 0000000..1691f34 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewdischarge/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewdischarge" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewdischarge/scene.json b/modules/wallpaper-engine/presets/lightning/previewdischarge/scene.json new file mode 100644 index 0000000..afe3e82 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewdischarge/scene.json @@ -0,0 +1,52 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 7, + "image" : null, + "instanceoverride" : + { + "controlpoint1" : "205.257 193.451 0.000" + }, + "locktransforms" : false, + "model" : null, + "name" : "Discharge", + "origin" : "25.141 23.491 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/discharge.json", + "scale" : "0.293 0.293 1.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewdischarge/template.json b/modules/wallpaper-engine/presets/lightning/previewdischarge/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewdischarge/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.tga b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/presets/lightning1.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/presets/lightning1.json new file mode 100644 index 0000000..619a8a0 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/presets/lightning1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/lightning/lightning1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/presets/lightning1b.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/presets/lightning1b.json new file mode 100644 index 0000000..b236216 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/materials/presets/lightning1b.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/lightning/lightning3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/models/effectpreview.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/particles/presets/lightning1.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/particles/presets/lightning1.json new file mode 100644 index 0000000..c99e4e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/particles/presets/lightning1.json @@ -0,0 +1,110 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 8, + "name" : "particles/presets/lightning1b.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 2 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.29999999999999999, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 800, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "132 185 255", + "min" : "198 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning1.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/particles/presets/lightning1b.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/particles/presets/lightning1b.json new file mode 100644 index 0000000..767b2e1 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/particles/presets/lightning1b.json @@ -0,0 +1,104 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "132 185 255", + "min" : "198 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning1b.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/presets/lightning/preset.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/presets/lightning/preset.json new file mode 100644 index 0000000..a44a6e8 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/presets/lightning/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_lightning_title", + "description" : "ui_editor_preset_lightning_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Lightning cloud", + "value" : 0 + }, + { + "label" : "Thunderbolt", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightning1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Lightning cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning1.json", + "materials/presets/lightning1b.json", + "particles/presets/lightning1.json", + "particles/presets/lightning1b.json" + ] + }, + { + "preview" : "previewlightning2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Thunderbolt", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning2.json", + "materials/presets/lightning2glow.json", + "particles/presets/lightning2.json", + "particles/presets/lightning2glow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/project.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/project.json new file mode 100644 index 0000000..93f6e93 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightning1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/scene.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/scene.json new file mode 100644 index 0000000..a147500 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Lightning cloud", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/lightning1.json", + "particlesrc" : null, + "scale" : "0.253 0.253 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning1/template.json b/modules/wallpaper-engine/presets/lightning/previewlightning1/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.tga b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/presets/lightning2.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/presets/lightning2.json new file mode 100644 index 0000000..b236216 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/presets/lightning2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/lightning/lightning3" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/presets/lightning2glow.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/presets/lightning2glow.json new file mode 100644 index 0000000..8d82a9b --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/materials/presets/lightning2glow.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/models/effectpreview.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/particles/presets/lightning2.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/particles/presets/lightning2.json new file mode 100644 index 0000000..3b1d930 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/particles/presets/lightning2.json @@ -0,0 +1,115 @@ +{ + "animationmode" : null, + "children" : + [ + { + "flags" : 0, + "id" : 8, + "name" : "particles/presets/lightning2glow.json", + "origin" : "0 0 0", + "type" : "eventspawn" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1200, + "min" : 1000, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "132 185 255", + "min" : "198 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 -1.6", + "min" : "0 0 -1.5", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning2.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/particles/presets/lightning2glow.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/particles/presets/lightning2glow.json new file mode 100644 index 0000000..7c93472 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/particles/presets/lightning2glow.json @@ -0,0 +1,117 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 250 0", + "rate" : 0, + "speedmax" : 0 + } + ], + "flags" : 2, + "initializer" : + [ + { + "id" : 2, + "max" : 0.10000000000000001, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "exponent" : 5, + "id" : 3, + "max" : 3000, + "min" : 300, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "187 217 255", + "min" : "196 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/lightning2glow.json", + "maxcount" : 8, + "operator" : + [ + { + "fadeintime" : 0, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "drag" : 5, + "id" : 8, + "name" : "movement" + }, + { + "id" : 9, + "name" : "sizechange" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/presets/lightning/preset.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/presets/lightning/preset.json new file mode 100644 index 0000000..a44a6e8 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/presets/lightning/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_lightning_title", + "description" : "ui_editor_preset_lightning_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Lightning cloud", + "value" : 0 + }, + { + "label" : "Thunderbolt", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightning1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Lightning cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning1.json", + "materials/presets/lightning1b.json", + "particles/presets/lightning1.json", + "particles/presets/lightning1b.json" + ] + }, + { + "preview" : "previewlightning2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Thunderbolt", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/lightning2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/lightning2.json", + "materials/presets/lightning2glow.json", + "particles/presets/lightning2.json", + "particles/presets/lightning2glow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/project.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/project.json new file mode 100644 index 0000000..fc48e5b --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightning2", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/scene.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/scene.json new file mode 100644 index 0000000..2036929 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Thunderbolt", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/lightning2.json", + "particlesrc" : null, + "scale" : "0.221 0.221 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightning/previewlightning2/template.json b/modules/wallpaper-engine/presets/lightning/previewlightning2/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightning/previewlightning2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/materials/presets/dust_motes_0.json b/modules/wallpaper-engine/presets/lightshafts/materials/presets/dust_motes_0.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/materials/presets/dust_motes_0.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_0.json b/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_0.json new file mode 100644 index 0000000..56e7fe4 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_0.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_1.json b/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_1.json new file mode 100644 index 0000000..2cd4074 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_1.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/light/light_shafts_6"] + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_2.json b/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_2.json new file mode 100644 index 0000000..16b9e99 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/materials/presets/light_shafts_2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/particles/presets/dust_motes_0.json b/modules/wallpaper-engine/presets/lightshafts/particles/presets/dust_motes_0.json new file mode 100644 index 0000000..7a95146 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/particles/presets/dust_motes_0.json @@ -0,0 +1,132 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : "1024 512 0", + "id" : 6, + "name" : "boxrandom" + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "10 10 0", + "min" : "-10 -10 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 242 176", + "min" : "251 255 180", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/dust_motes_0.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 1, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.29999999999999999, + "fadeouttime" : 0.69999999999999996, + "id" : 8, + "name" : "alphafade" + }, + { + "frequencymax" : 1, + "frequencymin" : 0.5, + "id" : 9, + "name" : "oscillateposition", + "scalemax" : 10 + }, + { + "frequencymax" : 7, + "frequencymin" : 3, + "id" : 10, + "name" : "oscillatealpha", + "scalemax" : 0.80000000000000004, + "scalemin" : 0.5 + }, + { + "controlpoint" : 1, + "id" : 11, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -1024, + "threshold" : 32 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_0.json b/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_0.json new file mode 100644 index 0000000..f0f9bba --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_0.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "-70 0 0", + "rate" : 0.20000000000000001 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 850, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "20 10 0", + "min" : "20 10 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : "0 0 0", + "min" : "0 0 0", + "name" : "rotationrandom" + }, + { + "id" : 7, + "max" : "0 0 -0.05", + "min" : "0 0 -0.05", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/light_shafts_0.json", + "maxcount" : 16, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 10, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 11, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 10 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_1.json b/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_1.json new file mode 100644 index 0000000..507af47 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_1.json @@ -0,0 +1,41 @@ +{ + "material": "materials/presets/light_shafts_1.json", + "maxcount": 16, + "starttime": 15, + "emitter": [{ + "name": "sphererandom", + "rate": 0.3, + "origin": "0 0 0", + "directions" : "1 0.03 0", + "distancemin": 10, + "distancemax": 320 + }], + "initializer": [{ + "name": "lifetimerandom", + "min": 8, + "max": 20 + }, { + "name": "sizerandom", + "min": 350, + "max": 750 + }, { + "name": "velocityrandom", + "min": "-20 0 0", + "max": "-5 10 0" + }, { + "name": "colorrandom", + "min": "110 92 20", + "max": "170 110 40" + }, { + "name": "rotationrandom", + "min": -0.4, + "max": -0.3 + }], + "operator": [{ + "name": "movement", + "gravity": "0 0 0" + }, { + "name": "alphafade", + "fadeintime": 0.1 + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_2.json b/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_2.json new file mode 100644 index 0000000..5c27e43 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/particles/presets/light_shafts_2.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "-70 0 0", + "rate" : 0.20000000000000001 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 850, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "20 10 0", + "min" : "20 10 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : "0 0 0", + "min" : "0 0 0", + "name" : "rotationrandom" + }, + { + "id" : 7, + "max" : "0 0 -0.05", + "min" : "0 0 -0.05", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/light_shafts_2.json", + "maxcount" : 16, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 10, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 11, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 10 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/preset.json new file mode 100644 index 0000000..7290344 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/preset.json @@ -0,0 +1,276 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_light_shafts_variant_corner", + "value" : 0 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_radial", + "value" : 1 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_linear", + "value" : 2 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_dust_motes", + "value" : 3 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_1", + "value" : 4 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_2", + "value" : 5 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_3", + "value" : 6 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlscorner/project.json", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYCORNER" : 1, + "RAYMODE" : 2, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1, + "colorwintensity" : 1, + "noiseamount" : 0.33000001, + "noisescale" : 0.85, + "point1" : "0.85704 0.06238", + "point2" : "0.94690 0.66185", + "point3" : "0.07415 0.95000", + "point0" : "0.24560 0.09457", + "rayfeather" : "0.22 0.1", + "rayradius" : 0.15, + "rayscale" : "0.4 1.01", + "raysmoothness" : 0.54, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - corner", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "previewlsradial/project.json", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 1, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1.12, + "colorwintensity" : 1, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.75 0.25", + "point1" : "0.75 0.75", + "point2" : "0.25 0.75", + "point3" : "0.25 0.25", + "rayfeather" : "0.01 0.07", + "rayradius" : 0.14, + "rayscale" : "0.66 1.01", + "raysmoothness" : 0.6, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - radial", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "previewlslinear/project.json", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 0, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 0.9, + "colorwintensity" : 1, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.4 0.25", + "point1" : "0.6 0.25", + "point2" : "0.8 0.8", + "point3" : "0.2 0.8", + "rayfeather" : "0.16 0.13", + "rayradius" : 0.14, + "rayscale" : "0.8 0.2", + "raysmoothness" : 0.5, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - linear", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "previewdustmotes0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Dust motes", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dust_motes_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dust_motes_0.json", + "particles/presets/dust_motes_0.json" + ] + }, + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/materials/presets/dust_motes_0.json b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/materials/presets/dust_motes_0.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/materials/presets/dust_motes_0.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/particles/presets/dust_motes_0.json b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/particles/presets/dust_motes_0.json new file mode 100644 index 0000000..f6645db --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/particles/presets/dust_motes_0.json @@ -0,0 +1,132 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : "512 256 0", + "id" : 6, + "name" : "boxrandom" + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "10 10 0", + "min" : "-10 -10 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 242 176", + "min" : "251 255 180", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/dust_motes_0.json", + "maxcount" : 128, + "operator" : + [ + { + "drag" : 1, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.29999999999999999, + "fadeouttime" : 0.69999999999999996, + "id" : 8, + "name" : "alphafade" + }, + { + "frequencymax" : 1, + "frequencymin" : 0.5, + "id" : 9, + "name" : "oscillateposition", + "scalemax" : 10 + }, + { + "frequencymax" : 7, + "frequencymin" : 3, + "id" : 10, + "name" : "oscillatealpha", + "scalemax" : 0.80000000000000004, + "scalemin" : 0.5 + }, + { + "controlpoint" : 1, + "id" : 11, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -1024, + "threshold" : 32 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/presets/lightshafts/preset.json new file mode 100644 index 0000000..a397fd5 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/presets/lightshafts/preset.json @@ -0,0 +1,104 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Light shafts 0", + "value" : 0 + }, + { + "label" : "Light shafts 1", + "value" : 1 + }, + { + "label" : "Light shafts 2", + "value" : 2 + }, + { + "label" : "Dust motes", + "value" : 3 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + }, + { + "preview" : "previewdustmotes0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Dust motes", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dust_motes_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dust_motes_0.json", + "particles/presets/dust_motes_0.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/project.json b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/project.json new file mode 100644 index 0000000..ce0b429 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewdustmotes" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/scene.json new file mode 100644 index 0000000..3e6831f --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/scene.json @@ -0,0 +1,50 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.4 0.4 0.4", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : + { + "count" : 2 + }, + "model" : null, + "name" : "Dust motes", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/dust_motes_0.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/template.json b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewdustmotes0/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/materials/presets/light_shafts_0.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/materials/presets/light_shafts_0.json new file mode 100644 index 0000000..56e7fe4 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/materials/presets/light_shafts_0.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/particles/presets/light_shafts_0.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/particles/presets/light_shafts_0.json new file mode 100644 index 0000000..4e362f6 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/particles/presets/light_shafts_0.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "-70 0 0", + "rate" : 0.20000000000000001 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 850, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "20 0 0", + "min" : "20 0 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : "0 0 0", + "min" : "0 0 0", + "name" : "rotationrandom" + }, + { + "id" : 7, + "max" : "0 0 -0.05", + "min" : "0 0 -0.05", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/light_shafts_0.json", + "maxcount" : 16, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 10, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 11, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 10 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/presets/lightshafts/preset.json new file mode 100644 index 0000000..ed33d67 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/presets/lightshafts/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Light shafts 0", + "value" : 0 + }, + { + "label" : "Light shafts 1", + "value" : 1 + }, + { + "label" : "Light shafts 2", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/project.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/project.json new file mode 100644 index 0000000..64a57b4 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightshafts0" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/scene.json new file mode 100644 index 0000000..249d0d1 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Light shafts 0", + "origin" : "64.004 144.175 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "0.406 0.406 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/template.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts0/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/materials/presets/light_shafts_1.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/materials/presets/light_shafts_1.json new file mode 100644 index 0000000..2cd4074 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/materials/presets/light_shafts_1.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/light/light_shafts_6"] + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/particles/presets/light_shafts_1.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/particles/presets/light_shafts_1.json new file mode 100644 index 0000000..8f84ebe --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/particles/presets/light_shafts_1.json @@ -0,0 +1,41 @@ +{ + "material": "materials/presets/light_shafts_1.json", + "maxcount": 15, + "starttime": 15, + "emitter": [{ + "name": "sphererandom", + "rate": 0.3, + "origin": "0 0 0", + "directions" : "1 0.03 0", + "distancemin": 10, + "distancemax": 320 + }], + "initializer": [{ + "name": "lifetimerandom", + "min": 8, + "max": 20 + }, { + "name": "sizerandom", + "min": 350, + "max": 750 + }, { + "name": "velocityrandom", + "min": "-20 0 0", + "max": "-5 10 0" + }, { + "name": "colorrandom", + "min": "110 92 20", + "max": "170 110 40" + }, { + "name": "rotationrandom", + "min": -0.4, + "max": -0.3 + }], + "operator": [{ + "name": "movement", + "gravity": "0 0 0" + }, { + "name": "alphafade", + "fadeintime": 0.1 + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/presets/lightshafts/preset.json new file mode 100644 index 0000000..ed33d67 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/presets/lightshafts/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Light shafts 0", + "value" : 0 + }, + { + "label" : "Light shafts 1", + "value" : 1 + }, + { + "label" : "Light shafts 2", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/project.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/project.json new file mode 100644 index 0000000..d060c6a --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightshafts1" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/scene.json new file mode 100644 index 0000000..5a49629 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Light shafts 1", + "origin" : "146.233 132.341 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "0.434 0.434 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/template.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/materials/presets/light_shafts_2.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/materials/presets/light_shafts_2.json new file mode 100644 index 0000000..16b9e99 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/materials/presets/light_shafts_2.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/particles/presets/light_shafts_2.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/particles/presets/light_shafts_2.json new file mode 100644 index 0000000..5c27e43 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/particles/presets/light_shafts_2.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "-70 0 0", + "rate" : 0.20000000000000001 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 850, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "20 10 0", + "min" : "20 10 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : "0 0 0", + "min" : "0 0 0", + "name" : "rotationrandom" + }, + { + "id" : 7, + "max" : "0 0 -0.05", + "min" : "0 0 -0.05", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/light_shafts_2.json", + "maxcount" : 16, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 10, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 11, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 10 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/presets/lightshafts/preset.json new file mode 100644 index 0000000..ed33d67 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/presets/lightshafts/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Light shafts 0", + "value" : 0 + }, + { + "label" : "Light shafts 1", + "value" : 1 + }, + { + "label" : "Light shafts 2", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/project.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/project.json new file mode 100644 index 0000000..afc5843 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightshafts2" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/scene.json new file mode 100644 index 0000000..42de9a9 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Light shafts 2", + "origin" : "104.706 66.769 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "0.533 0.533 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/template.json b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlightshafts2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/effects/lightshafts/effect.json b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/effects/lightshafts/effect.json new file mode 100644 index 0000000..ad068cc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/effects/lightshafts/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "lightshafts", + "name" : "ui_editor_effect_light_shafts_title", + "description" : "ui_editor_effect_light_shafts_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/lightshafts.json" + } + ], + "dependencies" : + [ + "materials/effects/lightshafts.json", + "shaders/effects/lightshafts.frag", + "shaders/effects/lightshafts.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/materials/effects/lightshafts.json b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/materials/effects/lightshafts.json new file mode 100644 index 0000000..13538fc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/materials/effects/lightshafts.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/lightshafts", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/presets/lightshafts/preset.json new file mode 100644 index 0000000..0560735 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/presets/lightshafts/preset.json @@ -0,0 +1,275 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_light_shafts_variant_corner", + "value" : 0 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_radial", + "value" : 1 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_directional", + "value" : 2 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_dust_motes", + "value" : 3 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_1", + "value" : 4 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_2", + "value" : 5 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_3", + "value" : 6 + } + ] + }, + "variants" : + [ + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 2, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 0.85, + "point0" : "0.85704 0.06238", + "point1" : "0.94690 0.66185", + "point2" : "0.07415 0.95000", + "point3" : "0.24560 0.09457", + "rayfeather" : "0.22 0.1", + "rayradius" : 0.15, + "rayscale" : "0.4 1.01", + "raysmoothness" : 0.54, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - corner", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 1, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1.12, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.75 0.25", + "point1" : "0.75 0.75", + "point2" : "0.25 0.75", + "point3" : "0.25 0.25", + "rayfeather" : "0.01 0.07", + "rayradius" : 0.14, + "rayscale" : "0.66 1.01", + "raysmoothness" : 0.6, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - radial", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 0, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 0.9, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.4 0.25", + "point1" : "0.6 0.25", + "point2" : "0.8 0.8", + "point3" : "0.2 0.8", + "rayfeather" : "0.16 0.13", + "rayradius" : 0.14, + "rayscale" : "0.8 0.2", + "raysmoothness" : 0.5, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - linear", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "previewdustmotes0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Dust motes", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dust_motes_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dust_motes_0.json", + "particles/presets/dust_motes_0.json" + ] + }, + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/project.json b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/project.json new file mode 100644 index 0000000..4499a23 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightshafteffectcorner", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/scene.json new file mode 100644 index 0000000..95879ba --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/scene.json @@ -0,0 +1,96 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "bloomtint" : "1.00000 1.00000 1.00000", + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.38824 0.38824 0.38824", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "perspectiveoverridefov" : 95.0, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "id" : 14, + "name" : "", + "passes" : + [ + { + "combos" : + { + "DIRECTDRAW" : 1, + "RAYMODE" : 2, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 0.85, + "point0" : "0.85704 0.06238", + "point1" : "0.94690 0.66185", + "point2" : "0.07415 0.95000", + "point3" : "0.24560 0.09457", + "rayfeather" : "0.22 0.1", + "rayradius" : 0.15, + "rayscale" : "0.4 1.01", + "raysmoothness" : 0.54, + "rayspeed" : 0.38999999 + }, + "id" : 15 + } + ], + "visible" : true + } + ], + "id" : 13, + "name" : "Light shafts - corner", + "origin" : "135.21112 117.58400 0.00000", + "scale" : "1.20791 1.20791 1.20791", + "shape" : "quad" + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/shaders/effects/lightshafts.frag b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/shaders/effects/lightshafts.frag new file mode 100644 index 0000000..fd24582 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/shaders/effects/lightshafts.frag @@ -0,0 +1,124 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_directional":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}} + +#include "common_fragment.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}} + +uniform float g_Time; + +uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"} +uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"} +uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"} +uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"} +uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"} +uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"} + +void main() { + vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z; +#if DIRECTDRAW + vec4 albedo = CAST4(0.0); +#else + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); +#endif + + float mask = step(0.0, v_TexCoordFx.z); + vec2 shapeScale = g_Scale; + +#if RAYMODE == 1 + vec2 rayCenter = vec2(0.5, 0.5); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5; + fxCoord.y = length(rayDelta) * 2.0; + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + fxCoord.y = (fxCoord.y - 0.0001) * 1.00021; + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#elif RAYMODE == 2 + vec2 rayCenter = vec2(0, 0); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4; + fxCoord.y = max(rayDelta.x, rayDelta.y); + //fxCoord.y = length(rayDelta); + fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#else + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + vec2 fxCoordRef = fxCoord; + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#endif + + float grad = 1.0 - fxCoord.y; + mask *= grad; + + vec2 fxCoord2 = fxCoord; + fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y); + fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y); + + fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111); + fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399); + + float fx0 = texSample2D(g_Texture1, fxCoord).r; + float fx1 = texSample2D(g_Texture1, fxCoord2).r; + float fx = fx0 * fx1; + fx = pow(fx, g_Exponent); + + fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx); + +#if RENDERING == 0 + vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y) * g_Intensity; +#else + vec2 gradientUVs = vec2(fxCoordRef.y, 0); +#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88 + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr; +#else + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb; +#endif + vec3 fxColor = gradColor * g_Intensity; +#endif + +#if MASK + float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r; + //albedo = mix(sample, albedo, mask); + mask *= maskSample; +#endif + + fx *= mask; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx); + albedo.a = max(albedo.a, fx); + +#if WRITEALPHA + albedo.a = fx; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/shaders/effects/lightshafts.vert b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/shaders/effects/lightshafts.vert new file mode 100644 index 0000000..663132f --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/shaders/effects/lightshafts.vert @@ -0,0 +1,34 @@ + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture3Resolution; +#endif + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +void main() { + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform); + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + +#if MASK + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlscorner/template.json b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlscorner/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/effects/lightshafts/effect.json b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/effects/lightshafts/effect.json new file mode 100644 index 0000000..ad068cc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/effects/lightshafts/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "lightshafts", + "name" : "ui_editor_effect_light_shafts_title", + "description" : "ui_editor_effect_light_shafts_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/lightshafts.json" + } + ], + "dependencies" : + [ + "materials/effects/lightshafts.json", + "shaders/effects/lightshafts.frag", + "shaders/effects/lightshafts.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/materials/effects/lightshafts.json b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/materials/effects/lightshafts.json new file mode 100644 index 0000000..13538fc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/materials/effects/lightshafts.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/lightshafts", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/presets/lightshafts/preset.json new file mode 100644 index 0000000..0560735 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/presets/lightshafts/preset.json @@ -0,0 +1,275 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_light_shafts_variant_corner", + "value" : 0 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_radial", + "value" : 1 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_directional", + "value" : 2 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_dust_motes", + "value" : 3 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_1", + "value" : 4 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_2", + "value" : 5 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_3", + "value" : 6 + } + ] + }, + "variants" : + [ + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 2, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 0.85, + "point0" : "0.85704 0.06238", + "point1" : "0.94690 0.66185", + "point2" : "0.07415 0.95000", + "point3" : "0.24560 0.09457", + "rayfeather" : "0.22 0.1", + "rayradius" : 0.15, + "rayscale" : "0.4 1.01", + "raysmoothness" : 0.54, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - corner", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 1, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1.12, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.75 0.25", + "point1" : "0.75 0.75", + "point2" : "0.25 0.75", + "point3" : "0.25 0.25", + "rayfeather" : "0.01 0.07", + "rayradius" : 0.14, + "rayscale" : "0.66 1.01", + "raysmoothness" : 0.6, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - radial", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 0, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 0.9, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.4 0.25", + "point1" : "0.6 0.25", + "point2" : "0.8 0.8", + "point3" : "0.2 0.8", + "rayfeather" : "0.16 0.13", + "rayradius" : 0.14, + "rayscale" : "0.8 0.2", + "raysmoothness" : 0.5, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - linear", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "previewdustmotes0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Dust motes", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dust_motes_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dust_motes_0.json", + "particles/presets/dust_motes_0.json" + ] + }, + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/project.json b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/project.json new file mode 100644 index 0000000..4499a23 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightshafteffectcorner", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/scene.json new file mode 100644 index 0000000..7b24456 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/scene.json @@ -0,0 +1,95 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "bloomtint" : "1.00000 1.00000 1.00000", + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.38824 0.38824 0.38824", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "perspectiveoverridefov" : 95.0, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "id" : 24, + "name" : "", + "passes" : + [ + { + "combos" : + { + "DIRECTDRAW" : 1, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 0.9, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.4 0.25", + "point1" : "0.6 0.25", + "point2" : "0.8 0.8", + "point3" : "0.2 0.8", + "rayfeather" : "0.16 0.13", + "rayradius" : 0.14, + "rayscale" : "0.8 0.2", + "raysmoothness" : 0.5, + "rayspeed" : 0.38999999 + }, + "id" : 25 + } + ], + "visible" : true + } + ], + "id" : 23, + "name" : "Light shafts - linear", + "origin" : "126.79814 126.79816 0.00000", + "scale" : "2.03800 2.03800 2.03800", + "shape" : "quad" + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/shaders/effects/lightshafts.frag b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/shaders/effects/lightshafts.frag new file mode 100644 index 0000000..fd24582 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/shaders/effects/lightshafts.frag @@ -0,0 +1,124 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_directional":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}} + +#include "common_fragment.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}} + +uniform float g_Time; + +uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"} +uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"} +uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"} +uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"} +uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"} +uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"} + +void main() { + vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z; +#if DIRECTDRAW + vec4 albedo = CAST4(0.0); +#else + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); +#endif + + float mask = step(0.0, v_TexCoordFx.z); + vec2 shapeScale = g_Scale; + +#if RAYMODE == 1 + vec2 rayCenter = vec2(0.5, 0.5); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5; + fxCoord.y = length(rayDelta) * 2.0; + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + fxCoord.y = (fxCoord.y - 0.0001) * 1.00021; + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#elif RAYMODE == 2 + vec2 rayCenter = vec2(0, 0); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4; + fxCoord.y = max(rayDelta.x, rayDelta.y); + //fxCoord.y = length(rayDelta); + fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#else + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + vec2 fxCoordRef = fxCoord; + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#endif + + float grad = 1.0 - fxCoord.y; + mask *= grad; + + vec2 fxCoord2 = fxCoord; + fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y); + fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y); + + fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111); + fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399); + + float fx0 = texSample2D(g_Texture1, fxCoord).r; + float fx1 = texSample2D(g_Texture1, fxCoord2).r; + float fx = fx0 * fx1; + fx = pow(fx, g_Exponent); + + fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx); + +#if RENDERING == 0 + vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y) * g_Intensity; +#else + vec2 gradientUVs = vec2(fxCoordRef.y, 0); +#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88 + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr; +#else + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb; +#endif + vec3 fxColor = gradColor * g_Intensity; +#endif + +#if MASK + float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r; + //albedo = mix(sample, albedo, mask); + mask *= maskSample; +#endif + + fx *= mask; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx); + albedo.a = max(albedo.a, fx); + +#if WRITEALPHA + albedo.a = fx; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/shaders/effects/lightshafts.vert b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/shaders/effects/lightshafts.vert new file mode 100644 index 0000000..663132f --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/shaders/effects/lightshafts.vert @@ -0,0 +1,34 @@ + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture3Resolution; +#endif + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +void main() { + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform); + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + +#if MASK + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlslinear/template.json b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlslinear/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/effects/lightshafts/effect.json b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/effects/lightshafts/effect.json new file mode 100644 index 0000000..ad068cc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/effects/lightshafts/effect.json @@ -0,0 +1,33 @@ +{ + "version" : 1, + "replacementkey" : "lightshafts", + "name" : "ui_editor_effect_light_shafts_title", + "description" : "ui_editor_effect_light_shafts_description", + "group" : "colorize", + "preview" : "preview/project.json", + "passes" : + [ + { + "material" : "materials/effects/lightshafts.json" + } + ], + "dependencies" : + [ + "materials/effects/lightshafts.json", + "shaders/effects/lightshafts.frag", + "shaders/effects/lightshafts.vert" + ], + "gizmos" : + [ + { + "type" : "EffectPerspectiveUV", + "vars" : + { + "p0" : "point0", + "p1" : "point1", + "p2" : "point2", + "p3" : "point3" + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/materials/effects/lightshafts.json b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/materials/effects/lightshafts.json new file mode 100644 index 0000000..13538fc --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/materials/effects/lightshafts.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "effects/lightshafts", + "blending": "normal", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull" + }] +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/presets/lightshafts/preset.json b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/presets/lightshafts/preset.json new file mode 100644 index 0000000..0560735 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/presets/lightshafts/preset.json @@ -0,0 +1,275 @@ +{ + "name" : "ui_editor_preset_light_shafts_title", + "description" : "ui_editor_preset_light_shafts_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_light_shafts_variant_corner", + "value" : 0 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_radial", + "value" : 1 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_directional", + "value" : 2 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_dust_motes", + "value" : 3 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_1", + "value" : 4 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_2", + "value" : 5 + }, + { + "label" : "ui_editor_preset_light_shafts_variant_3", + "value" : 6 + } + ] + }, + "variants" : + [ + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 2, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 0.85, + "point0" : "0.85704 0.06238", + "point1" : "0.94690 0.66185", + "point2" : "0.07415 0.95000", + "point3" : "0.24560 0.09457", + "rayfeather" : "0.22 0.1", + "rayradius" : 0.15, + "rayscale" : "0.4 1.01", + "raysmoothness" : 0.54, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - corner", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 1, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1.12, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.75 0.25", + "point1" : "0.75 0.75", + "point2" : "0.25 0.75", + "point3" : "0.25 0.25", + "rayfeather" : "0.01 0.07", + "rayradius" : 0.14, + "rayscale" : "0.66 1.01", + "raysmoothness" : 0.6, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - radial", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "", + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "name" : "", + "passes" : + [ + { + "combos" : + { + "RAYMODE" : 0, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 0.9, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.4 0.25", + "point1" : "0.6 0.25", + "point2" : "0.8 0.8", + "point3" : "0.2 0.8", + "rayfeather" : "0.16 0.13", + "rayradius" : 0.14, + "rayscale" : "0.8 0.2", + "raysmoothness" : 0.5, + "rayspeed" : 0.38999999 + } + } + ], + "visible" : true + } + ], + "name" : "Light shafts - linear", + "shape" : "quad" + } + ], + "dependencies" : + [ + { + "file" : "effects/lightshafts/effect.json" + } + ] + }, + { + "preview" : "previewdustmotes0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Dust motes", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/dust_motes_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/dust_motes_0.json", + "particles/presets/dust_motes_0.json" + ] + }, + { + "preview" : "previewlightshafts0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_0.json", + "particles/presets/light_shafts_0.json" + ] + }, + { + "preview" : "previewlightshafts1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_1.json", + "particles/presets/light_shafts_1.json" + ] + }, + { + "preview" : "previewlightshafts2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Light shafts 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/light_shafts_2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/light_shafts_2.json", + "particles/presets/light_shafts_2.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/project.json b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/project.json new file mode 100644 index 0000000..4499a23 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewlightshafteffectcorner", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/scene.json b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/scene.json new file mode 100644 index 0000000..bf53926 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/scene.json @@ -0,0 +1,96 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 -1.00000", + "eye" : "0.00000 0.00000 0.00000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.30000 0.30000 0.30000", + "bloom" : false, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "bloomtint" : "1.00000 1.00000 1.00000", + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.38824 0.38824 0.38824", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.0099999998, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "perspectiveoverridefov" : 95.0, + "skylightcolor" : "0.30000 0.30000 0.30000", + "zoom" : 1.0 + }, + "objects" : + [ + { + "castshadow" : false, + "effects" : + [ + { + "file" : "effects/lightshafts/effect.json", + "id" : 21, + "name" : "", + "passes" : + [ + { + "combos" : + { + "DIRECTDRAW" : 1, + "RAYMODE" : 1, + "RENDERING" : 1 + }, + "constantshadervalues" : + { + "colorastart" : "1 1 1", + "colorend" : "0.43529411764705883 0.8862745098039215 1", + "colorwexponent" : 1.12, + "colorwintensity" : 2, + "noiseamount" : 0.33000001, + "noisescale" : 1.17, + "point0" : "0.75 0.25", + "point1" : "0.75 0.75", + "point2" : "0.25 0.75", + "point3" : "0.25 0.25", + "rayfeather" : "0.01 0.07", + "rayradius" : 0.14, + "rayscale" : "0.66 1.01", + "raysmoothness" : 0.6, + "rayspeed" : 0.38999999 + }, + "id" : 22 + } + ], + "visible" : true + } + ], + "id" : 20, + "name" : "Light shafts - radial", + "origin" : "128.00000 128.00000 0.00000", + "scale" : "2.09076 2.09076 2.09076", + "shape" : "quad" + } + ], + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/shaders/effects/lightshafts.frag b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/shaders/effects/lightshafts.frag new file mode 100644 index 0000000..fd24582 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/shaders/effects/lightshafts.frag @@ -0,0 +1,124 @@ + +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":31,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_write_alpha","combo":"WRITEALPHA","type":"options","default":0,"require":{"DIRECTDRAW":0}} +// [COMBO] {"material":"ui_editor_properties_direction","combo":"RAYMODE","type":"options","default":0,"options":{"ui_editor_properties_directional":0,"ui_editor_properties_radial":1,"ui_editor_properties_corner":2}} +// [COMBO] {"material":"ui_editor_properties_rendering","combo":"RENDERING","type":"options","default":0,"options":{"ui_editor_properties_color":0,"ui_editor_properties_gradient":1}} + +#include "common_fragment.h" +#include "common_blending.h" + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_noise","default":"util/noise"} +uniform sampler2D g_Texture2; // {"label":"ui_editor_properties_gradient_map","default":"gradient/gradient_iridescent","formatcombo":true,"require":{"RENDERING":1}} +uniform sampler2D g_Texture3; // {"label":"ui_editor_properties_opacity_mask","mode":"opacitymask","combo":"MASK","paintdefaultcolor":"0 0 0 1","require":{"DIRECTDRAW":0}} + +uniform float g_Time; + +uniform float g_Speed; // {"material":"rayspeed","label":"ui_editor_properties_speed","default":0.2,"range":[0.1, 1.0],"group":"ui_editor_properties_shape"} +uniform vec2 g_Scale; // {"material":"rayscale","label":"ui_editor_properties_scale","default":"0.5 0.1","linked":true,"range":[0.1, 2.0],"group":"ui_editor_properties_shape","group":"ui_editor_properties_shape"} +uniform float g_Smoothness; // {"material":"raysmoothness","label":"ui_editor_properties_smoothness","default":0.75,"range":[0.1, 1.0],"group":"ui_editor_properties_blending"} +uniform vec2 g_Feather; // {"material":"rayfeather","label":"ui_editor_properties_feather","default":"0.05 0.2","linked":true,"range":[0.0, 0.5],"group":"ui_editor_properties_blending"} +uniform float g_Radius; // {"material":"rayradius","label":"ui_editor_properties_radius","default":0.2,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_NoiseScale; // {"material":"noisescale","label":"ui_editor_properties_noise_scale","default":1.0,"range":[0.0, 5.0],"group":"ui_editor_properties_shape"} +uniform float g_NoiseAmount; // {"material":"noiseamount","label":"ui_editor_properties_noise_amount","default":0.33,"range":[0.0, 1.0],"group":"ui_editor_properties_shape"} + +uniform float g_Intensity; // {"material":"colorwintensity","label":"ui_editor_properties_intensity","default":1,"range":[0.01, 10.0],"group":"ui_editor_properties_blending"} +uniform float g_Exponent; // {"material":"colorwexponent","label":"ui_editor_properties_exponent","default":1,"range":[0.2, 2.0],"group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysStart; // {"material":"colorastart","label":"ui_editor_properties_color_start","default":"1 1 1","type":"color","group":"ui_editor_properties_blending"} +uniform vec3 g_ColorRaysEnd; // {"material":"colorend","label":"ui_editor_properties_color_end","default":"0.5 0.8 1","type":"color","group":"ui_editor_properties_blending"} + +void main() { + vec2 fxCoord = v_TexCoordFx.xy / v_TexCoordFx.z; +#if DIRECTDRAW + vec4 albedo = CAST4(0.0); +#else + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); +#endif + + float mask = step(0.0, v_TexCoordFx.z); + vec2 shapeScale = g_Scale; + +#if RAYMODE == 1 + vec2 rayCenter = vec2(0.5, 0.5); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 + 0.5; + fxCoord.y = length(rayDelta) * 2.0; + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + fxCoord.y = (fxCoord.y - 0.0001) * 1.00021; + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#elif RAYMODE == 2 + vec2 rayCenter = vec2(0, 0); + vec2 rayDelta = fxCoord - rayCenter; + fxCoord.x = atan2(rayDelta.y, rayDelta.x) / 6.283185 * 4; + fxCoord.y = max(rayDelta.x, rayDelta.y); + //fxCoord.y = length(rayDelta); + fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + fxCoord.y = smoothstep(g_Radius, 1.0, fxCoord.y); + + vec2 fxCoordRef = fxCoord; + shapeScale.x *= 4; + + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#else + //fxCoord.y += texSample2D(g_Texture1, vec2(fxCoord.x * 0.054111 * g_NoiseScale, 0)).r * g_NoiseAmount - (g_NoiseAmount * 0.5); + vec2 fxCoordRef = fxCoord; + mask *= smoothstep(0.50001, 0.5 - g_Feather.x, abs(fxCoord.x - 0.5)); + mask *= smoothstep(0.50001, 0.5 - g_Feather.y, abs(fxCoord.y - 0.5)); +#endif + + float grad = 1.0 - fxCoord.y; + mask *= grad; + + vec2 fxCoord2 = fxCoord; + fxCoord.xy *= vec2(0.054111 * shapeScale.x, 0.003111 * shapeScale.y); + fxCoord2.xy *= vec2(0.07333 * shapeScale.x, 0.005967111 * shapeScale.y); + + fxCoord.xy += g_Time * g_Speed * vec2(0.003, 0.000375111); + fxCoord2.xy -= g_Time * g_Speed * vec2(0.0047111, 0.0007399); + + float fx0 = texSample2D(g_Texture1, fxCoord).r; + float fx1 = texSample2D(g_Texture1, fxCoord2).r; + float fx = fx0 * fx1; + fx = pow(fx, g_Exponent); + + fx = smoothstep((1.0 - g_Smoothness) * 0.29999, 0.3 + g_Smoothness * 0.7, fx); + +#if RENDERING == 0 + vec3 fxColor = mix(g_ColorRaysStart, g_ColorRaysEnd, fxCoordRef.y) * g_Intensity; +#else + vec2 gradientUVs = vec2(fxCoordRef.y, 0); +#if TEX2FORMAT == FORMAT_R8 || TEX2FORMAT == FORMAT_RG88 + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rrr; +#else + vec3 gradColor = texSample2D(g_Texture2, gradientUVs).rgb; +#endif + vec3 fxColor = gradColor * g_Intensity; +#endif + +#if MASK + float maskSample = texSample2D(g_Texture3, v_TexCoord.zw).r; + //albedo = mix(sample, albedo, mask); + mask *= maskSample; +#endif + + fx *= mask; + albedo.rgb = ApplyBlending(BLENDMODE, albedo.rgb, fxColor, fx); + albedo.a = max(albedo.a, fx); + +#if WRITEALPHA + albedo.a = fx; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/shaders/effects/lightshafts.vert b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/shaders/effects/lightshafts.vert new file mode 100644 index 0000000..663132f --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/shaders/effects/lightshafts.vert @@ -0,0 +1,34 @@ + +#include "common.h" +#include "common_perspective.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +#if MASK +uniform vec4 g_Texture3Resolution; +#endif + +uniform vec2 g_Point0; // {"material":"point0","label":"p0","default":"0.67728 0.01297","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point1; // {"material":"point1","label":"p1","default":"0.76007 0.14043","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point2; // {"material":"point2","label":"p2","default":"0.46654 1.09592","require":{"DIRECTDRAW":0}} +uniform vec2 g_Point3; // {"material":"point3","label":"p3","default":"0.16363 0.44881","require":{"DIRECTDRAW":0}} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; +varying vec3 v_TexCoordFx; + +void main() { + mat3 xform = inverse(squareToQuad(g_Point0, g_Point1, g_Point2, g_Point3)); + + v_TexCoord = a_TexCoord.xyxy; + v_TexCoordFx = mul(vec3(a_TexCoord.xy, 1.0), xform); + + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + +#if MASK + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture3Resolution.z / g_Texture3Resolution.x, + a_TexCoord.y * g_Texture3Resolution.w / g_Texture3Resolution.y); +#endif +} diff --git a/modules/wallpaper-engine/presets/lightshafts/previewlsradial/template.json b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/lightshafts/previewlsradial/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_charge.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_charge.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_charge.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_charge_rays.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_charge_rays.json new file mode 100644 index 0000000..c428037 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_charge_rays.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_5" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_focus.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_focus.json new file mode 100644 index 0000000..56e7fe4 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_focus.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_focus_trails.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_focus_trails.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_focus_trails.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_0.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_0.json new file mode 100644 index 0000000..fdbc283 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_0.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_0_swirl.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_0_swirl.json new file mode 100644 index 0000000..f552a6b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_0_swirl.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1.json new file mode 100644 index 0000000..91d3609 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1_grow.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1_grow.json new file mode 100644 index 0000000..e2cf19e --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1_grow.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1_swirl.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1_swirl.json new file mode 100644 index 0000000..f552a6b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_glyph_1_swirl.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_gravity.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_gravity.json new file mode 100644 index 0000000..3a6cfcb --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_gravity.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_pulse.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_pulse.json new file mode 100644 index 0000000..a815305 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_pulse.json @@ -0,0 +1,21 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_refract_amount" : 0.039999999105930328 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_6", "particle/normal_ring_smooth" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_sparkle.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_sparkle.json new file mode 100644 index 0000000..36fd713 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_sparkle.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/flare_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_trinity.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_trinity.json new file mode 100644 index 0000000..8d82a9b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_trinity.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_0.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_0.json new file mode 100644 index 0000000..d6a52ea --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_0.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : + { + "REFRACT" : 0 + }, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_0_glow.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_0_glow.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_0_glow.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_1.json b/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_1.json new file mode 100644 index 0000000..d6a52ea --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/magic_vortex_1.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : + { + "REFRACT" : 0 + }, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/powerup.json b/modules/wallpaper-engine/presets/magic/materials/presets/powerup.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/powerup.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/magic/materials/presets/poweruptrail.json b/modules/wallpaper-engine/presets/magic/materials/presets/poweruptrail.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/materials/presets/poweruptrail.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_charge.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_charge.json new file mode 100644 index 0000000..97b2251 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_charge.json @@ -0,0 +1,119 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 9, + "name" : "particles/presets/magic_charge_rays.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.69999999999999996, + "name" : "lifetimerandom" + }, + { + "exponent" : 5, + "id" : 3, + "max" : 450, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 231 47", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_charge.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 7, + "name" : "sizechange", + "startvalue" : 0 + }, + { + "id" : 8, + "name" : "sizechange", + "starttime" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_charge_rays.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_charge_rays.json new file mode 100644 index 0000000..dc01d20 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_charge_rays.json @@ -0,0 +1,116 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.03 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 750, + "min" : 350, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 6.283", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/magic_charge_rays.json", + "maxcount" : 8, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 8, + "name" : "alphafade" + }, + { + "endvalue" : 1.5, + "id" : 9, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_focus.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_focus.json new file mode 100644 index 0000000..f66c21a --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_focus.json @@ -0,0 +1,124 @@ +{ + "animationmode" : null, + "children" : + [ + { + "flags" : 0, + "id" : 10, + "maxcount" : 16, + "name" : "particles/presets/magic_focus_trails.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 256, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5, + "speedmax" : -260, + "speedmin" : -260 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.69999999999999996, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 15, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "83 225 255", + "min" : "60 143 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_focus.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : 0, + "threshold" : 9999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_focus_trails.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_focus_trails.json new file mode 100644 index 0000000..0ab16be --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_focus_trails.json @@ -0,0 +1,107 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 15, + "speedmax" : 15, + "speedmin" : 10 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.29999999999999999, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "83 225 255", + "min" : "60 143 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_focus_trails.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_0.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_0.json new file mode 100644 index 0000000..28a623b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_0.json @@ -0,0 +1,130 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/magic_glyphs_0_swirl.json" + }, + { + "id" : 11, + "name" : "particles/presets/magic_glyphs_0_swirl.json", + "scale" : "0.55 0.55 0.55" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 3.141", + "min" : "0 0 3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_0.json", + "maxcount" : 1, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "1 0.8352941176470589 0.5725490196078431", + "id" : 9, + "name" : "colorchange", + "startvalue" : "1 0.5137254901960784 0.5137254901960784" + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_0_swirl.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_0_swirl.json new file mode 100644 index 0000000..f84883c --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_0_swirl.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -30", + "min" : "0 0 -10", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_0_swirl.json", + "maxcount" : 12, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "1 0.7098039215686275 0.24313725490196078", + "id" : 9, + "name" : "colorchange", + "startvalue" : "1 0 0" + }, + { + "id" : 10, + "name" : "oscillatesize", + "scalemax" : 1.1000000000000001, + "scalemin" : 0.90000000000000002 + }, + { + "id" : 11, + "name" : "oscillatealpha", + "scalemin" : 0.29999999999999999 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1.json new file mode 100644 index 0000000..5ac6493 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1.json @@ -0,0 +1,129 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/magic_glyphs_1_swirl.json" + }, + { + "id" : 11, + "name" : "particles/presets/magic_glyphs_1_grow.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 3.141", + "min" : "0 0 3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_1.json", + "maxcount" : 1, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "0.7098039215686275 1 0.5725490196078431", + "id" : 9, + "name" : "colorchange", + "startvalue" : "0.5137254901960784 0.6549019607843137 1" + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1_grow.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1_grow.json new file mode 100644 index 0000000..86fcd90 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1_grow.json @@ -0,0 +1,126 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 650, + "min" : 650, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -3.141", + "min" : "0 0 -3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_1_grow.json", + "maxcount" : 1, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "0.7098039215686275 1 0.5725490196078431", + "id" : 9, + "name" : "colorchange", + "startvalue" : "0.5137254901960784 0.6549019607843137 1" + }, + { + "endtime" : 0.5, + "endvalue" : 1.1499999999999999, + "id" : 10, + "name" : "sizechange", + "startvalue" : 2 + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1_swirl.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1_swirl.json new file mode 100644 index 0000000..6f7e682 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_glyphs_1_swirl.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -30", + "min" : "0 0 -10", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_1_swirl.json", + "maxcount" : 12, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "1 0.7098039215686275 0.24313725490196078", + "id" : 9, + "name" : "colorchange", + "startvalue" : "0 0.03137254901960784 1" + }, + { + "id" : 10, + "name" : "oscillatesize", + "scalemax" : 1.1000000000000001, + "scalemin" : 0.90000000000000002 + }, + { + "id" : 11, + "name" : "oscillatealpha", + "scalemin" : 0.29999999999999999 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_gravity.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_gravity.json new file mode 100644 index 0000000..c25953e --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_gravity.json @@ -0,0 +1,119 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 128, + "distancemin" : 64, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5, + "speedmax" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "500 500 0", + "min" : "-500 -500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "83 225 255", + "min" : "60 143 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_gravity.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + }, + { + "id" : 10, + "name" : "controlpointattract", + "scale" : 10000, + "threshold" : 9999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_pulse.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_pulse.json new file mode 100644 index 0000000..f6a4fcc --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_pulse.json @@ -0,0 +1,120 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 650, + "min" : 650, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -3.141", + "min" : "0 0 -3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_pulse.json", + "maxcount" : 16, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "fadeouttime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endtime" : 1, + "endvalue" : 2, + "id" : 9, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_sparkle.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_sparkle.json new file mode 100644 index 0000000..e869b5f --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_sparkle.json @@ -0,0 +1,117 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.03 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 6", + "min" : "0 0 0", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/magic_sparkle.json", + "maxcount" : 8, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 8, + "name" : "alphafade" + }, + { + "endvalue" : 2, + "id" : 9, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_trinity.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_trinity.json new file mode 100644 index 0000000..f7afd3a --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_trinity.json @@ -0,0 +1,119 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 64, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 96 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "bounds" : "0 1", + "count" : 3.02, + "id" : 4, + "limitbehavior" : "repeat", + "name" : "mapsequencearoundcontrolpoint", + "speedmax" : "0 100 0", + "speedmin" : "0 10 0" + } + ], + "material" : "materials/presets/magic_trinity.json", + "maxcount" : 200, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "endtime" : 0.69999999999999996, + "endvalue" : "1 0.615686274509804 0", + "id" : 8, + "name" : "colorchange" + }, + { + "id" : 9, + "name" : "sizechange", + "startvalue" : 2 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_0.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_0.json new file mode 100644 index 0000000..12ab3b5 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_0.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 11, + "name" : "particles/presets/magic_vortex_0_glow.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 32, + "distancemin" : 32, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 512, + "speedmax" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.69999999999999996, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 11 0", + "min" : "255 114 64", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 1, + "min" : 1, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/magic_vortex_0.json", + "maxcount" : 256, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "distanceinner" : 0, + "distanceouter" : 32, + "id" : 9, + "name" : "vortex", + "speedinner" : 0, + "speedouter" : 3000 + }, + { + "id" : 10, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -1500, + "threshold" : 99999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_0_glow.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_0_glow.json new file mode 100644 index 0000000..d3c475c --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_0_glow.json @@ -0,0 +1,106 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.59999999999999998, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 350, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 93 58", + "min" : "255 71 71", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_vortex_0_glow.json", + "maxcount" : 32, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 6, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 7, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_1.json b/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_1.json new file mode 100644 index 0000000..df36f4f --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/magic_vortex_1.json @@ -0,0 +1,131 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 256, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 450, + "speedmax" : 128, + "speedmin" : 128 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.69999999999999996, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "4 255 0", + "min" : "134 255 64", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 1, + "min" : 1, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/magic_vortex_1.json", + "maxcount" : 512, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.69999999999999996, + "fadeouttime" : 0.69999999999999996, + "id" : 8, + "name" : "alphafade" + }, + { + "distanceinner" : 0, + "distanceouter" : 32, + "id" : 9, + "name" : "vortex", + "speedinner" : 0, + "speedouter" : 2500 + }, + { + "id" : 10, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : 1200, + "threshold" : 99999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/powerup.json b/modules/wallpaper-engine/presets/magic/particles/presets/powerup.json new file mode 100644 index 0000000..6170322 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/powerup.json @@ -0,0 +1,123 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 8, + "maxcount" : 32, + "name" : "particles/presets/poweruptrails.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 3, + "name" : "sphererandom", + "origin" : "0 -128 0", + "rate" : 2 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 1, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 2, + "max" : "0 120 0", + "min" : "0 80 0", + "name" : "velocityrandom" + }, + { + "id" : 9, + "max" : "255 227 85", + "min" : "255 227 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/powerup.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 60 0", + "id" : 4, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 5, + "name" : "alphafade" + }, + { + "frequencymax" : 3, + "frequencymin" : 2, + "id" : 6, + "name" : "oscillateposition", + "scalemin" : 8 + }, + { + "controlpoint" : 1, + "id" : 7, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -512, + "threshold" : 96 + } + ], + "renderer" : [], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/particles/presets/poweruptrails.json b/modules/wallpaper-engine/presets/magic/particles/presets/poweruptrails.json new file mode 100644 index 0000000..77bef06 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/particles/presets/poweruptrails.json @@ -0,0 +1,109 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 6 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 85, + "min" : 80, + "name" : "sizerandom" + } + ], + "material" : "materials/presets/poweruptrail.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "id" : 8, + "name" : "sizechange" + }, + { + "endvalue" : "1 1 1", + "id" : 10, + "name" : "colorchange", + "startvalue" : "1 0.8901960784313725 0.3333333333333333" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/preset.json new file mode 100644 index 0000000..4c87933 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/preset.json @@ -0,0 +1,272 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_magic_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_magic_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_magic_variant_3", + "value" : 2 + }, + { + "label" : "ui_editor_preset_magic_variant_4", + "value" : 10 + }, + { + "label" : "ui_editor_preset_magic_variant_5", + "value" : 3 + }, + { + "label" : "ui_editor_preset_magic_variant_6", + "value" : 4 + }, + { + "label" : "ui_editor_preset_magic_variant_7", + "value" : 5 + }, + { + "label" : "ui_editor_preset_magic_variant_8", + "value" : 6 + }, + { + "label" : "ui_editor_preset_magic_variant_9", + "value" : 7 + }, + { + "label" : "ui_editor_preset_magic_variant_10", + "value" : 8 + }, + { + "label" : "ui_editor_preset_magic_variant_11", + "value" : 9 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_0.json", + "materials/presets/magic_vortex_0_glow.json", + "particles/presets/magic_vortex_0.json", + "particles/presets/magic_vortex_0_glow.json" + ] + }, + { + "preview" : "previewvortex1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_1.json", + "particles/presets/magic_vortex_1.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + }, + { + "preview" : "previewfocus/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic focus", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_focus.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_focus.json", + "materials/presets/magic_focus_trails.json", + "particles/presets/magic_focus.json", + "particles/presets/magic_focus_trails.json" + ] + }, + { + "preview" : "previewtrinity/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic trinity", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_trinity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_trinity.json", + "particles/presets/magic_trinity.json" + ] + }, + { + "preview" : "previewpulse/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic pulse", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_pulse.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_pulse.json", + "particles/presets/magic_pulse.json" + ] + }, + { + "preview" : "previewpowerup/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Power up", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/powerup.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/powerup.json", + "materials/presets/poweruptrail.json", + "particles/presets/powerup.json", + "particles/presets/poweruptrails.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/materials/presets/magic_charge.json b/modules/wallpaper-engine/presets/magic/previewcharge/materials/presets/magic_charge.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/materials/presets/magic_charge.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/materials/presets/magic_charge_rays.json b/modules/wallpaper-engine/presets/magic/previewcharge/materials/presets/magic_charge_rays.json new file mode 100644 index 0000000..c428037 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/materials/presets/magic_charge_rays.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_5" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/particles/presets/magic_charge.json b/modules/wallpaper-engine/presets/magic/previewcharge/particles/presets/magic_charge.json new file mode 100644 index 0000000..97b2251 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/particles/presets/magic_charge.json @@ -0,0 +1,119 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 9, + "name" : "particles/presets/magic_charge_rays.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.69999999999999996, + "name" : "lifetimerandom" + }, + { + "exponent" : 5, + "id" : 3, + "max" : 450, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 231 47", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_charge.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "endtime" : 0.5, + "endvalue" : 1, + "id" : 7, + "name" : "sizechange", + "startvalue" : 0 + }, + { + "id" : 8, + "name" : "sizechange", + "starttime" : 0.5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/particles/presets/magic_charge_rays.json b/modules/wallpaper-engine/presets/magic/previewcharge/particles/presets/magic_charge_rays.json new file mode 100644 index 0000000..dc01d20 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/particles/presets/magic_charge_rays.json @@ -0,0 +1,116 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.03 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 750, + "min" : 350, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 6.283", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/magic_charge_rays.json", + "maxcount" : 8, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 8, + "name" : "alphafade" + }, + { + "endvalue" : 1.5, + "id" : 9, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewcharge/presets/magic/preset.json new file mode 100644 index 0000000..32537da --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/presets/magic/preset.json @@ -0,0 +1,158 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex", + "value" : 3 + }, + { + "label" : "Glyphs 0", + "value" : 4 + }, + { + "label" : "Glyphs 1", + "value" : 5 + } + ] + }, + "variants" : + [ + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex.json", + "materials/presets/magic_vortex_glow.json", + "particles/presets/magic_vortex.json", + "particles/presets/magic_vortex_glow.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/project.json b/modules/wallpaper-engine/presets/magic/previewcharge/project.json new file mode 100644 index 0000000..c514db4 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewcharge" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/scene.json b/modules/wallpaper-engine/presets/magic/previewcharge/scene.json new file mode 100644 index 0000000..5676396 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 23, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic charge", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewcharge/template.json b/modules/wallpaper-engine/presets/magic/previewcharge/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewcharge/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/materials/presets/magic_focus.json b/modules/wallpaper-engine/presets/magic/previewfocus/materials/presets/magic_focus.json new file mode 100644 index 0000000..56e7fe4 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/materials/presets/magic_focus.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/light_shafts_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/materials/presets/magic_focus_trails.json b/modules/wallpaper-engine/presets/magic/previewfocus/materials/presets/magic_focus_trails.json new file mode 100644 index 0000000..9c8f8fa --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/materials/presets/magic_focus_trails.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/particles/presets/magic_focus.json b/modules/wallpaper-engine/presets/magic/previewfocus/particles/presets/magic_focus.json new file mode 100644 index 0000000..06a2c06 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/particles/presets/magic_focus.json @@ -0,0 +1,124 @@ +{ + "animationmode" : null, + "children" : + [ + { + "flags" : 0, + "id" : 10, + "maxcount" : 16, + "name" : "particles/presets/magic_focus_trails.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 256, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 6, + "speedmax" : -260, + "speedmin" : -260 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 0.69999999999999996, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 15, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "83 225 255", + "min" : "60 143 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_focus.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "id" : 9, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : 0, + "threshold" : 9999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/particles/presets/magic_focus_trails.json b/modules/wallpaper-engine/presets/magic/previewfocus/particles/presets/magic_focus_trails.json new file mode 100644 index 0000000..70f2150 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/particles/presets/magic_focus_trails.json @@ -0,0 +1,107 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 16, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 15, + "speedmax" : 15, + "speedmin" : 10 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.29999999999999999, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 25, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "83 225 255", + "min" : "60 143 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_focus_trails.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewfocus/presets/magic/preset.json new file mode 100644 index 0000000..d96ac2b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/presets/magic/preset.json @@ -0,0 +1,204 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex 0", + "value" : 3 + }, + { + "label" : "Vortex 1", + "value" : 4 + }, + { + "label" : "Glyphs 0", + "value" : 5 + }, + { + "label" : "Glyphs 1", + "value" : 6 + }, + { + "label" : "Focus", + "value" : 7 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_0.json", + "materials/presets/magic_vortex_0_glow.json", + "particles/presets/magic_vortex_0.json", + "particles/presets/magic_vortex_0_glow.json" + ] + }, + { + "preview" : "previewvortex1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_1.json", + "particles/presets/magic_vortex_1.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + }, + { + "preview" : "previewfocus/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic focus", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_focus.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_focus.json", + "materials/presets/magic_focus_trails.json", + "particles/presets/magic_focus.json", + "particles/presets/magic_focus_trails.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/project.json b/modules/wallpaper-engine/presets/magic/previewfocus/project.json new file mode 100644 index 0000000..d69df3b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewfocus" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/scene.json b/modules/wallpaper-engine/presets/magic/previewfocus/scene.json new file mode 100644 index 0000000..a80224f --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic focus", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_focus.json", + "scale" : "0.760 0.760 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewfocus/template.json b/modules/wallpaper-engine/presets/magic/previewfocus/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewfocus/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/materials/presets/magic_glyph_0.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/materials/presets/magic_glyph_0.json new file mode 100644 index 0000000..fdbc283 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/materials/presets/magic_glyph_0.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/materials/presets/magic_glyph_0_swirl.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/materials/presets/magic_glyph_0_swirl.json new file mode 100644 index 0000000..f552a6b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/materials/presets/magic_glyph_0_swirl.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/particles/presets/magic_glyphs_0.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/particles/presets/magic_glyphs_0.json new file mode 100644 index 0000000..28a623b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/particles/presets/magic_glyphs_0.json @@ -0,0 +1,130 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/magic_glyphs_0_swirl.json" + }, + { + "id" : 11, + "name" : "particles/presets/magic_glyphs_0_swirl.json", + "scale" : "0.55 0.55 0.55" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 3.141", + "min" : "0 0 3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_0.json", + "maxcount" : 1, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "1 0.8352941176470589 0.5725490196078431", + "id" : 9, + "name" : "colorchange", + "startvalue" : "1 0.5137254901960784 0.5137254901960784" + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/particles/presets/magic_glyphs_0_swirl.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/particles/presets/magic_glyphs_0_swirl.json new file mode 100644 index 0000000..f84883c --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/particles/presets/magic_glyphs_0_swirl.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -30", + "min" : "0 0 -10", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_0_swirl.json", + "maxcount" : 12, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "1 0.7098039215686275 0.24313725490196078", + "id" : 9, + "name" : "colorchange", + "startvalue" : "1 0 0" + }, + { + "id" : 10, + "name" : "oscillatesize", + "scalemax" : 1.1000000000000001, + "scalemin" : 0.90000000000000002 + }, + { + "id" : 11, + "name" : "oscillatealpha", + "scalemin" : 0.29999999999999999 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/presets/magic/preset.json new file mode 100644 index 0000000..9bd8441 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/presets/magic/preset.json @@ -0,0 +1,158 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex", + "value" : 3 + }, + { + "label" : "Glyphs 0", + "value" : 4 + }, + { + "label" : "Glyphs 1", + "value" : 5 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex.json", + "materials/presets/magic_vortex_glow.json", + "particles/presets/magic_vortex.json", + "particles/presets/magic_vortex_glow.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/project.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/project.json new file mode 100644 index 0000000..4a67547 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewglyphs0" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/scene.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/scene.json new file mode 100644 index 0000000..5311349 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Glyphs 0", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "0.800 0.800 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs0/template.json b/modules/wallpaper-engine/presets/magic/previewglyphs0/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs0/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1.json new file mode 100644 index 0000000..91d3609 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1_grow.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1_grow.json new file mode 100644 index 0000000..e2cf19e --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1_grow.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1_swirl.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1_swirl.json new file mode 100644 index 0000000..f552a6b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/materials/presets/magic_glyph_1_swirl.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/magic/glyph_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1.json new file mode 100644 index 0000000..5ac6493 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1.json @@ -0,0 +1,129 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/magic_glyphs_1_swirl.json" + }, + { + "id" : 11, + "name" : "particles/presets/magic_glyphs_1_grow.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 3.141", + "min" : "0 0 3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_1.json", + "maxcount" : 1, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "0.7098039215686275 1 0.5725490196078431", + "id" : 9, + "name" : "colorchange", + "startvalue" : "0.5137254901960784 0.6549019607843137 1" + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1_grow.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1_grow.json new file mode 100644 index 0000000..86fcd90 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1_grow.json @@ -0,0 +1,126 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 100 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 650, + "min" : 650, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -3.141", + "min" : "0 0 -3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_1_grow.json", + "maxcount" : 1, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "0.7098039215686275 1 0.5725490196078431", + "id" : 9, + "name" : "colorchange", + "startvalue" : "0.5137254901960784 0.6549019607843137 1" + }, + { + "endtime" : 0.5, + "endvalue" : 1.1499999999999999, + "id" : 10, + "name" : "sizechange", + "startvalue" : 2 + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1_swirl.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1_swirl.json new file mode 100644 index 0000000..6f7e682 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/particles/presets/magic_glyphs_1_swirl.json @@ -0,0 +1,128 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 600, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -30", + "min" : "0 0 -10", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_glyph_1_swirl.json", + "maxcount" : 12, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endvalue" : "1 0.7098039215686275 0.24313725490196078", + "id" : 9, + "name" : "colorchange", + "startvalue" : "0 0.03137254901960784 1" + }, + { + "id" : 10, + "name" : "oscillatesize", + "scalemax" : 1.1000000000000001, + "scalemin" : 0.90000000000000002 + }, + { + "id" : 11, + "name" : "oscillatealpha", + "scalemin" : 0.29999999999999999 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/presets/magic/preset.json new file mode 100644 index 0000000..9bd8441 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/presets/magic/preset.json @@ -0,0 +1,158 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex", + "value" : 3 + }, + { + "label" : "Glyphs 0", + "value" : 4 + }, + { + "label" : "Glyphs 1", + "value" : 5 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex.json", + "materials/presets/magic_vortex_glow.json", + "particles/presets/magic_vortex.json", + "particles/presets/magic_vortex_glow.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/project.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/project.json new file mode 100644 index 0000000..684f670 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewglyphs1" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/scene.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/scene.json new file mode 100644 index 0000000..cfb1eb3 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Glyphs 1", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "0.600 0.600 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewglyphs1/template.json b/modules/wallpaper-engine/presets/magic/previewglyphs1/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewglyphs1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewgravitation/materials/presets/magic_gravity.json b/modules/wallpaper-engine/presets/magic/previewgravitation/materials/presets/magic_gravity.json new file mode 100644 index 0000000..3a6cfcb --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewgravitation/materials/presets/magic_gravity.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewgravitation/particles/presets/magic_gravity.json b/modules/wallpaper-engine/presets/magic/previewgravitation/particles/presets/magic_gravity.json new file mode 100644 index 0000000..c25953e --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewgravitation/particles/presets/magic_gravity.json @@ -0,0 +1,119 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 128, + "distancemin" : 64, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5, + "speedmax" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "500 500 0", + "min" : "-500 -500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "83 225 255", + "min" : "60 143 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_gravity.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 9, + "name" : "alphafade" + }, + { + "id" : 10, + "name" : "controlpointattract", + "scale" : 10000, + "threshold" : 9999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewgravitation/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewgravitation/presets/magic/preset.json new file mode 100644 index 0000000..70d37f9 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewgravitation/presets/magic/preset.json @@ -0,0 +1,158 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex", + "value" : 3 + }, + { + "label" : "Glyphs 0", + "value" : 4 + }, + { + "label" : "Glyphs 1", + "value" : 5 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex.json", + "materials/presets/magic_vortex_glow.json", + "particles/presets/magic_vortex.json", + "particles/presets/magic_vortex_glow.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewgravitation/project.json b/modules/wallpaper-engine/presets/magic/previewgravitation/project.json new file mode 100644 index 0000000..a6f68c4 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewgravitation/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewgravitation" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewgravitation/scene.json b/modules/wallpaper-engine/presets/magic/previewgravitation/scene.json new file mode 100644 index 0000000..751f297 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewgravitation/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic gravitation", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewgravitation/template.json b/modules/wallpaper-engine/presets/magic/previewgravitation/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewgravitation/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/materials/presets/powerup.json b/modules/wallpaper-engine/presets/magic/previewpowerup/materials/presets/powerup.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/materials/presets/powerup.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/materials/presets/poweruptrail.json b/modules/wallpaper-engine/presets/magic/previewpowerup/materials/presets/poweruptrail.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/materials/presets/poweruptrail.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/particles/presets/powerup.json b/modules/wallpaper-engine/presets/magic/previewpowerup/particles/presets/powerup.json new file mode 100644 index 0000000..6170322 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/particles/presets/powerup.json @@ -0,0 +1,123 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 8, + "maxcount" : 32, + "name" : "particles/presets/poweruptrails.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 3, + "name" : "sphererandom", + "origin" : "0 -128 0", + "rate" : 2 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 1, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 2, + "max" : "0 120 0", + "min" : "0 80 0", + "name" : "velocityrandom" + }, + { + "id" : 9, + "max" : "255 227 85", + "min" : "255 227 85", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/powerup.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 60 0", + "id" : 4, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 5, + "name" : "alphafade" + }, + { + "frequencymax" : 3, + "frequencymin" : 2, + "id" : 6, + "name" : "oscillateposition", + "scalemin" : 8 + }, + { + "controlpoint" : 1, + "id" : 7, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -512, + "threshold" : 96 + } + ], + "renderer" : [], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/particles/presets/poweruptrails.json b/modules/wallpaper-engine/presets/magic/previewpowerup/particles/presets/poweruptrails.json new file mode 100644 index 0000000..77bef06 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/particles/presets/poweruptrails.json @@ -0,0 +1,109 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 6 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 85, + "min" : 80, + "name" : "sizerandom" + } + ], + "material" : "materials/presets/poweruptrail.json", + "maxcount" : 32, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "id" : 8, + "name" : "sizechange" + }, + { + "endvalue" : "1 1 1", + "id" : 10, + "name" : "colorchange", + "startvalue" : "1 0.8901960784313725 0.3333333333333333" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewpowerup/presets/magic/preset.json new file mode 100644 index 0000000..b5b78c5 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/presets/magic/preset.json @@ -0,0 +1,272 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Powerup", + "value" : 10 + }, + { + "label" : "Vortex 0", + "value" : 3 + }, + { + "label" : "Vortex 1", + "value" : 4 + }, + { + "label" : "Glyphs 0", + "value" : 5 + }, + { + "label" : "Glyphs 1", + "value" : 6 + }, + { + "label" : "Focus", + "value" : 7 + }, + { + "label" : "Trinity", + "value" : 8 + }, + { + "label" : "Pulse", + "value" : 9 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_0.json", + "materials/presets/magic_vortex_0_glow.json", + "particles/presets/magic_vortex_0.json", + "particles/presets/magic_vortex_0_glow.json" + ] + }, + { + "preview" : "previewvortex1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_1.json", + "particles/presets/magic_vortex_1.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + }, + { + "preview" : "previewfocus/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic focus", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_focus.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_focus.json", + "materials/presets/magic_focus_trails.json", + "particles/presets/magic_focus.json", + "particles/presets/magic_focus_trails.json" + ] + }, + { + "preview" : "previewtrinity/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic trinity", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_trinity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_trinity.json", + "particles/presets/magic_trinity.json" + ] + }, + { + "preview" : "previewpulse/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic pulse", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_pulse.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_pulse.json", + "particles/presets/magic_pulse.json" + ] + }, + { + "preview" : "previewpowerup/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Power up", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/powerup.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/powerup.json", + "materials/presets/poweruptrail.json", + "particles/presets/powerup.json", + "particles/presets/poweruptrails.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/project.json b/modules/wallpaper-engine/presets/magic/previewpowerup/project.json new file mode 100644 index 0000000..a725b07 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewpowerup" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/scene.json b/modules/wallpaper-engine/presets/magic/previewpowerup/scene.json new file mode 100644 index 0000000..ff30403 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/scene.json @@ -0,0 +1,52 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 6, + "image" : null, + "instanceoverride" : + { + "size" : 0.51000000000000001 + }, + "locktransforms" : false, + "model" : null, + "name" : "Power up", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/powerup.json", + "scale" : "0.324 0.324 1.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpowerup/template.json b/modules/wallpaper-engine/presets/magic/previewpowerup/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpowerup/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.json b/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.tex b/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.tex new file mode 100644 index 0000000..55de60a Binary files /dev/null and b/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.tex differ diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/materials/presets/magic_pulse.json b/modules/wallpaper-engine/presets/magic/previewpulse/materials/presets/magic_pulse.json new file mode 100644 index 0000000..a815305 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/materials/presets/magic_pulse.json @@ -0,0 +1,21 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_refract_amount" : 0.039999999105930328 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_6", "particle/normal_ring_smooth" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/models/effectpreview.json b/modules/wallpaper-engine/presets/magic/previewpulse/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/particles/presets/magic_pulse.json b/modules/wallpaper-engine/presets/magic/previewpulse/particles/presets/magic_pulse.json new file mode 100644 index 0000000..6a3aac6 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/particles/presets/magic_pulse.json @@ -0,0 +1,120 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 1 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 650, + "min" : 650, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 -3.141", + "min" : "0 0 -3.141", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/magic_pulse.json", + "maxcount" : 16, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "fadeouttime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 8, + "name" : "angularmovement" + }, + { + "endtime" : 1, + "endvalue" : 2, + "id" : 9, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "axis" : "0 0 0", + "id" : 1, + "name" : "sprite", + "orientation" : "screen" + } + ], + "sequencemultiplier" : null, + "starttime" : 2 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewpulse/presets/magic/preset.json new file mode 100644 index 0000000..dd0f990 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/presets/magic/preset.json @@ -0,0 +1,248 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex 0", + "value" : 3 + }, + { + "label" : "Vortex 1", + "value" : 4 + }, + { + "label" : "Glyphs 0", + "value" : 5 + }, + { + "label" : "Glyphs 1", + "value" : 6 + }, + { + "label" : "Focus", + "value" : 7 + }, + { + "label" : "Trinity", + "value" : 8 + }, + { + "label" : "Pulse", + "value" : 9 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_0.json", + "materials/presets/magic_vortex_0_glow.json", + "particles/presets/magic_vortex_0.json", + "particles/presets/magic_vortex_0_glow.json" + ] + }, + { + "preview" : "previewvortex1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_1.json", + "particles/presets/magic_vortex_1.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + }, + { + "preview" : "previewfocus/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic focus", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_focus.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_focus.json", + "materials/presets/magic_focus_trails.json", + "particles/presets/magic_focus.json", + "particles/presets/magic_focus_trails.json" + ] + }, + { + "preview" : "previewtrinity/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic trinity", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_trinity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_trinity.json", + "particles/presets/magic_trinity.json" + ] + }, + { + "preview" : "previewpulse/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic pulse", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_pulse.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_pulse.json", + "particles/presets/magic_pulse.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/project.json b/modules/wallpaper-engine/presets/magic/previewpulse/project.json new file mode 100644 index 0000000..6c75e93 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewpulse" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/scene.json b/modules/wallpaper-engine/presets/magic/previewpulse/scene.json new file mode 100644 index 0000000..25daddf --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/scene.json @@ -0,0 +1,65 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "depth" : 1, + "id" : 38, + "image" : "models/effectpreview.json", + "name" : "", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "1.000 1.000 1.000", + "size" : "256.000 256.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "id" : 16, + "image" : null, + "instanceoverride" : + { + "lifetime" : 0.5 + }, + "model" : null, + "name" : "Magic pulse", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_pulse.json", + "scale" : "0.774 0.774 1.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewpulse/template.json b/modules/wallpaper-engine/presets/magic/previewpulse/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewpulse/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewsparkle/materials/presets/magic_sparkle.json b/modules/wallpaper-engine/presets/magic/previewsparkle/materials/presets/magic_sparkle.json new file mode 100644 index 0000000..36fd713 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewsparkle/materials/presets/magic_sparkle.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/light/flare_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewsparkle/particles/presets/magic_sparkle.json b/modules/wallpaper-engine/presets/magic/previewsparkle/particles/presets/magic_sparkle.json new file mode 100644 index 0000000..e869b5f --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewsparkle/particles/presets/magic_sparkle.json @@ -0,0 +1,117 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.03 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 5 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "170 110 40", + "min" : "110 92 20", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : "0 0 6", + "min" : "0 0 0", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/magic_sparkle.json", + "maxcount" : 8, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 8, + "name" : "alphafade" + }, + { + "endvalue" : 2, + "id" : 9, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewsparkle/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewsparkle/presets/magic/preset.json new file mode 100644 index 0000000..79c22b3 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewsparkle/presets/magic/preset.json @@ -0,0 +1,158 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex", + "value" : 3 + }, + { + "label" : "Glyphs 0", + "value" : 4 + }, + { + "label" : "Glyphs 1", + "value" : 5 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex.json", + "materials/presets/magic_vortex_glow.json", + "particles/presets/magic_vortex.json", + "particles/presets/magic_vortex_glow.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewsparkle/project.json b/modules/wallpaper-engine/presets/magic/previewsparkle/project.json new file mode 100644 index 0000000..bf6c938 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewsparkle/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewsparkle" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewsparkle/scene.json b/modules/wallpaper-engine/presets/magic/previewsparkle/scene.json new file mode 100644 index 0000000..ad19355 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewsparkle/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic sparkle", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewsparkle/template.json b/modules/wallpaper-engine/presets/magic/previewsparkle/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewsparkle/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewtrinity/materials/presets/magic_trinity.json b/modules/wallpaper-engine/presets/magic/previewtrinity/materials/presets/magic_trinity.json new file mode 100644 index 0000000..8d82a9b --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewtrinity/materials/presets/magic_trinity.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewtrinity/particles/presets/magic_trinity.json b/modules/wallpaper-engine/presets/magic/previewtrinity/particles/presets/magic_trinity.json new file mode 100644 index 0000000..1c9da3c --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewtrinity/particles/presets/magic_trinity.json @@ -0,0 +1,119 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 64, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 96 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 20, + "name" : "sizerandom" + }, + { + "bounds" : "0 1", + "count" : 3.02, + "id" : 4, + "limitbehavior" : "repeat", + "name" : "mapsequencearoundcontrolpoint", + "speedmax" : "0 100 0", + "speedmin" : "0 10 0" + } + ], + "material" : "materials/presets/magic_trinity.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 7, + "name" : "alphafade" + }, + { + "endtime" : 0.69999999999999996, + "endvalue" : "1 0.615686274509804 0", + "id" : 8, + "name" : "colorchange" + }, + { + "id" : 9, + "name" : "sizechange", + "startvalue" : 2 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewtrinity/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewtrinity/presets/magic/preset.json new file mode 100644 index 0000000..1bfd799 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewtrinity/presets/magic/preset.json @@ -0,0 +1,226 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex 0", + "value" : 3 + }, + { + "label" : "Vortex 1", + "value" : 4 + }, + { + "label" : "Glyphs 0", + "value" : 5 + }, + { + "label" : "Glyphs 1", + "value" : 6 + }, + { + "label" : "Focus", + "value" : 7 + }, + { + "label" : "Trinity", + "value" : 8 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_0.json", + "materials/presets/magic_vortex_0_glow.json", + "particles/presets/magic_vortex_0.json", + "particles/presets/magic_vortex_0_glow.json" + ] + }, + { + "preview" : "previewvortex1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_1.json", + "particles/presets/magic_vortex_1.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + }, + { + "preview" : "previewfocus/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic focus", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_focus.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_focus.json", + "materials/presets/magic_focus_trails.json", + "particles/presets/magic_focus.json", + "particles/presets/magic_focus_trails.json" + ] + }, + { + "preview" : "previewtrinity/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic trinity", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_trinity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_trinity.json", + "particles/presets/magic_trinity.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewtrinity/project.json b/modules/wallpaper-engine/presets/magic/previewtrinity/project.json new file mode 100644 index 0000000..e207253 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewtrinity/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewtrinity" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewtrinity/scene.json b/modules/wallpaper-engine/presets/magic/previewtrinity/scene.json new file mode 100644 index 0000000..3e49259 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewtrinity/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic trinity", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_trinity.json", + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewtrinity/template.json b/modules/wallpaper-engine/presets/magic/previewtrinity/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewtrinity/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/materials/presets/magic_vortex.json b/modules/wallpaper-engine/presets/magic/previewvortex0/materials/presets/magic_vortex.json new file mode 100644 index 0000000..d6a52ea --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/materials/presets/magic_vortex.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : + { + "REFRACT" : 0 + }, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/materials/presets/magic_vortex_glow.json b/modules/wallpaper-engine/presets/magic/previewvortex0/materials/presets/magic_vortex_glow.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/materials/presets/magic_vortex_glow.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/particles/presets/magic_vortex.json b/modules/wallpaper-engine/presets/magic/previewvortex0/particles/presets/magic_vortex.json new file mode 100644 index 0000000..47aa2fa --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/particles/presets/magic_vortex.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 11, + "name" : "particles/presets/magic_vortex_glow.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 32, + "distancemin" : 32, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 512, + "speedmax" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.69999999999999996, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 11 0", + "min" : "255 114 64", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 1, + "min" : 1, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/magic_vortex.json", + "maxcount" : 256, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + }, + { + "distanceinner" : 0, + "distanceouter" : 32, + "id" : 9, + "name" : "vortex", + "speedinner" : 0, + "speedouter" : 3000 + }, + { + "id" : 10, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -1500, + "threshold" : 99999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/particles/presets/magic_vortex_glow.json b/modules/wallpaper-engine/presets/magic/previewvortex0/particles/presets/magic_vortex_glow.json new file mode 100644 index 0000000..023bf18 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/particles/presets/magic_vortex_glow.json @@ -0,0 +1,106 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 5, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.59999999999999998, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1000, + "min" : 350, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 93 58", + "min" : "255 71 71", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/magic_vortex_glow.json", + "maxcount" : 500, + "operator" : + [ + { + "fadeintime" : 0.5, + "id" : 6, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 7, + "name" : "sizechange", + "startvalue" : 0 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewvortex0/presets/magic/preset.json new file mode 100644 index 0000000..2a5157d --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/presets/magic/preset.json @@ -0,0 +1,158 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex", + "value" : 3 + }, + { + "label" : "Glyphs 0", + "value" : 4 + }, + { + "label" : "Glyphs 1", + "value" : 5 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex.json", + "materials/presets/magic_vortex_glow.json", + "particles/presets/magic_vortex.json", + "particles/presets/magic_vortex_glow.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/project.json b/modules/wallpaper-engine/presets/magic/previewvortex0/project.json new file mode 100644 index 0000000..9713366 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewvortex" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/scene.json b/modules/wallpaper-engine/presets/magic/previewvortex0/scene.json new file mode 100644 index 0000000..5bf8679 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic vortex", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_vortex.json", + "scale" : "0.364 0.364 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex0/template.json b/modules/wallpaper-engine/presets/magic/previewvortex0/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex0/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex1/materials/presets/magic_vortex_1.json b/modules/wallpaper-engine/presets/magic/previewvortex1/materials/presets/magic_vortex_1.json new file mode 100644 index 0000000..d6a52ea --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex1/materials/presets/magic_vortex_1.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : + { + "REFRACT" : 0 + }, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex1/particles/presets/magic_vortex_1.json b/modules/wallpaper-engine/presets/magic/previewvortex1/particles/presets/magic_vortex_1.json new file mode 100644 index 0000000..df36f4f --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex1/particles/presets/magic_vortex_1.json @@ -0,0 +1,131 @@ +{ + "animationmode" : null, + "children" : [], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 256, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 450, + "speedmax" : 128, + "speedmin" : 128 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.69999999999999996, + "min" : 0.40000000000000002, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 10, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "4 255 0", + "min" : "134 255 64", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 1, + "min" : 1, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/magic_vortex_1.json", + "maxcount" : 512, + "operator" : + [ + { + "drag" : 0.5, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.69999999999999996, + "fadeouttime" : 0.69999999999999996, + "id" : 8, + "name" : "alphafade" + }, + { + "distanceinner" : 0, + "distanceouter" : 32, + "id" : 9, + "name" : "vortex", + "speedinner" : 0, + "speedouter" : 2500 + }, + { + "id" : 10, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : 1200, + "threshold" : 99999 + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex1/presets/magic/preset.json b/modules/wallpaper-engine/presets/magic/previewvortex1/presets/magic/preset.json new file mode 100644 index 0000000..c1bd49f --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex1/presets/magic/preset.json @@ -0,0 +1,180 @@ +{ + "name" : "ui_editor_preset_magic_title", + "description" : "ui_editor_preset_magic_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Charge", + "value" : 0 + }, + { + "label" : "Sparkle", + "value" : 1 + }, + { + "label" : "Gravitation", + "value" : 2 + }, + { + "label" : "Vortex 0", + "value" : 3 + }, + { + "label" : "Vortex 1", + "value" : 4 + }, + { + "label" : "Glyphs 0", + "value" : 5 + }, + { + "label" : "Glyphs 1", + "value" : 6 + } + ] + }, + "variants" : + [ + { + "preview" : "previewcharge/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic charge", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_charge.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_charge.json", + "materials/presets/magic_charge_rays.json", + "particles/presets/magic_charge.json", + "particles/presets/magic_charge_rays.json" + ] + }, + { + "preview" : "previewsparkle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic sparkle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_sparkle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_sparkle.json", + "particles/presets/magic_sparkle.json" + ] + }, + { + "preview" : "previewgravitation/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic gravitation", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_gravity.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_gravity.json", + "particles/presets/magic_gravity.json" + ] + }, + { + "preview" : "previewvortex0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_0.json", + "materials/presets/magic_vortex_0_glow.json", + "particles/presets/magic_vortex_0.json", + "particles/presets/magic_vortex_0_glow.json" + ] + }, + { + "preview" : "previewvortex1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Magic vortex 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_vortex_1.json", + "particles/presets/magic_vortex_1.json" + ] + }, + { + "preview" : "previewglyphs0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_0.json", + "materials/presets/magic_glyph_0_swirl.json", + "particles/presets/magic_glyphs_0.json", + "particles/presets/magic_glyphs_0_swirl.json" + ] + }, + { + "preview" : "previewglyphs1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Glyphs 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/magic_glyphs_1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/magic_glyph_1.json", + "materials/presets/magic_glyph_1_swirl.json", + "materials/presets/magic_glyph_1_grow.json", + "particles/presets/magic_glyphs_1.json", + "particles/presets/magic_glyphs_1_swirl.json", + "particles/presets/magic_glyphs_1_grow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex1/project.json b/modules/wallpaper-engine/presets/magic/previewvortex1/project.json new file mode 100644 index 0000000..8008375 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex1/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewvortex1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex1/scene.json b/modules/wallpaper-engine/presets/magic/previewvortex1/scene.json new file mode 100644 index 0000000..17bca83 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Magic vortex 1", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/magic_vortex_1.json", + "scale" : "0.378 0.378 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/magic/previewvortex1/template.json b/modules/wallpaper-engine/presets/magic/previewvortex1/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/magic/previewvortex1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/materials/presets/raindownpour.json b/modules/wallpaper-engine/presets/rain/materials/presets/raindownpour.json new file mode 100644 index 0000000..2bac338 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/materials/presets/raindownpour.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.0 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/rain1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/materials/presets/rainperspective.json b/modules/wallpaper-engine/presets/rain/materials/presets/rainperspective.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/materials/presets/rainperspective.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/materials/presets/rainrefractive.json b/modules/wallpaper-engine/presets/rain/materials/presets/rainrefractive.json new file mode 100644 index 0000000..bacca08 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/materials/presets/rainrefractive.json @@ -0,0 +1,22 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1, + "ui_editor_properties_refract_amount" : 0.05000000074505806 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop", "particle/drop_normal" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/particles/presets/raindownpour.json b/modules/wallpaper-engine/presets/rain/particles/presets/raindownpour.json new file mode 100644 index 0000000..e7a9d94 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/particles/presets/raindownpour.json @@ -0,0 +1,117 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 0", + "distancemax" : 800, + "distancemin" : 32, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 1200 0", + "rate" : 100 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1600, + "min" : 800, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-40 -3500 0", + "min" : "-50 -5000 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 10, + "max" : 0.7, + "min" : 0.5, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/raindownpour.json", + "maxcount" : 64, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/particles/presets/rainperspective.json b/modules/wallpaper-engine/presets/rain/particles/presets/rainperspective.json new file mode 100644 index 0000000..bba83a7 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/particles/presets/rainperspective.json @@ -0,0 +1,108 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.25 1", + "distancemax" : 1024, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 768 0", + "rate" : 400 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 5, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 -3000 0", + "min" : "0 -3000 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : 0.29999999999999999, + "min" : 0.050000000000000003, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/rainperspective.json", + "maxcount" : 512, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.0050000000000000001, + "maxlength" : 100, + "name" : "spritetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/particles/presets/rainrefractive.json b/modules/wallpaper-engine/presets/rain/particles/presets/rainrefractive.json new file mode 100644 index 0000000..1272a47 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/particles/presets/rainrefractive.json @@ -0,0 +1,110 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : "1024 0 0", + "id" : 7, + "name" : "boxrandom", + "origin" : "0 1024 0", + "rate" : 1000 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.20000000000000001, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 20, + "min" : 10, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "2500 -15000 0", + "min" : "1000 -10000 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "197 214 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : 0.5, + "min" : 0.40000000000000002, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/rainrefractive.json", + "maxcount" : 256, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "maxlength" : 20, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/preset.json b/modules/wallpaper-engine/presets/rain/preset.json new file mode 100644 index 0000000..7913754 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_rain_title", + "description" : "ui_editor_preset_rain_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_rain_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_rain_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_rain_variant_3", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewperspective/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain perspective", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/rainperspective.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/rainperspective.json", + "particles/presets/rainperspective.json" + ] + }, + { + "preview" : "previewdownpour/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain downpour", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/raindownpour.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/raindownpour.json", + "particles/presets/raindownpour.json" + ] + }, + { + "preview" : "previewrefractive/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain refractive", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/rainrefractive.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/rainrefractive.json", + "particles/presets/rainrefractive.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.json b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.tga b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/materials/presets/raindownpour.json b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/presets/raindownpour.json new file mode 100644 index 0000000..2bac338 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/materials/presets/raindownpour.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.0 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/rain1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/models/effectpreview.json b/modules/wallpaper-engine/presets/rain/previewdownpour/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/particles/presets/raindownpour.json b/modules/wallpaper-engine/presets/rain/previewdownpour/particles/presets/raindownpour.json new file mode 100644 index 0000000..602acf1 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/particles/presets/raindownpour.json @@ -0,0 +1,111 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 0", + "distancemax" : 800, + "distancemin" : 32, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 1200 0", + "rate" : 100 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 1600, + "min" : 800, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-40 -3500 0", + "min" : "-50 -5000 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/raindownpour.json", + "maxcount" : 50, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/presets/rain/preset.json b/modules/wallpaper-engine/presets/rain/previewdownpour/presets/rain/preset.json new file mode 100644 index 0000000..a34d19c --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/presets/rain/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_rain_title", + "description" : "ui_editor_preset_rain_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Rain downpour", + "value" : 0 + }, + { + "label" : "Rain refractive", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewdownpour/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain downpour", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/raindownpour.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/raindownpour.json", + "particles/presets/raindownpour.json" + ] + }, + { + "preview" : "previewrefractive/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain refractive", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/rainrefractive.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/rainrefractive.json", + "particles/presets/rainrefractive.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/project.json b/modules/wallpaper-engine/presets/rain/previewdownpour/project.json new file mode 100644 index 0000000..9ec5823 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "raindownpour", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/scene.json b/modules/wallpaper-engine/presets/rain/previewdownpour/scene.json new file mode 100644 index 0000000..4e5ae2d --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0 0 0", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Rain downpour", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/raindownpour.json", + "particlesrc" : null, + "scale" : "0.378 0.378 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewdownpour/template.json b/modules/wallpaper-engine/presets/rain/previewdownpour/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewdownpour/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewperspective/materials/presets/rainperspective.json b/modules/wallpaper-engine/presets/rain/previewperspective/materials/presets/rainperspective.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewperspective/materials/presets/rainperspective.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewperspective/particles/presets/rainperspective.json b/modules/wallpaper-engine/presets/rain/previewperspective/particles/presets/rainperspective.json new file mode 100644 index 0000000..50d35be --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewperspective/particles/presets/rainperspective.json @@ -0,0 +1,108 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0 1", + "distancemax" : 1024, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 768 0", + "rate" : 400 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 0.5, + "min" : 0.5, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 5, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 -3000 0", + "min" : "0 -3000 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : 0.29999999999999999, + "min" : 0.050000000000000003, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/rainperspective.json", + "maxcount" : 512, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.0050000000000000001, + "maxlength" : 100, + "name" : "spritetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewperspective/presets/rain/preset.json b/modules/wallpaper-engine/presets/rain/previewperspective/presets/rain/preset.json new file mode 100644 index 0000000..d70b511 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewperspective/presets/rain/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_rain_title", + "description" : "ui_editor_preset_rain_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Rain perspective", + "value" : 0 + }, + { + "label" : "Rain downpour", + "value" : 1 + }, + { + "label" : "Rain refractive", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewperspective/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain perspective", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/rainperspective.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/rainperspective.json", + "particles/presets/rainperspective.json" + ] + }, + { + "preview" : "previewdownpour/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain downpour", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/raindownpour.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/raindownpour.json", + "particles/presets/raindownpour.json" + ] + }, + { + "preview" : "previewrefractive/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain refractive", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/rainrefractive.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/rainrefractive.json", + "particles/presets/rainrefractive.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewperspective/project.json b/modules/wallpaper-engine/presets/rain/previewperspective/project.json new file mode 100644 index 0000000..0b87446 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewperspective/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewperspective" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewperspective/scene.json b/modules/wallpaper-engine/presets/rain/previewperspective/scene.json new file mode 100644 index 0000000..177edcf --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewperspective/scene.json @@ -0,0 +1,54 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0 0 0", + "clearenabled" : null, + "fov" : 100, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : + { + "size" : 2, + "alpha" : 2 + }, + "locktransforms" : false, + "model" : null, + "name" : "Rain perspective", + "origin" : "128.000 128.000 -64.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/rainperspective.json", + "scale" : "0.500 0.500 0.100", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewperspective/template.json b/modules/wallpaper-engine/presets/rain/previewperspective/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewperspective/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.json b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.tga b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.json b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.json new file mode 100644 index 0000000..b47a207 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "grid" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.png b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.png new file mode 100644 index 0000000..f026060 Binary files /dev/null and b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.png differ diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.tex b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.tex new file mode 100644 index 0000000..916b469 Binary files /dev/null and b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.tex differ diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.tex-json b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.tex-json new file mode 100644 index 0000000..b2d18ff --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/grid.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nointerpolation" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/materials/particle/refractiverain.json b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/particle/refractiverain.json new file mode 100644 index 0000000..95535b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/materials/particle/refractiverain.json @@ -0,0 +1,22 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : + { + "REFRACT" : 1 + }, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1, + "ui_editor_properties_refract_amount" : 0.10000000149011612 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop", "particle/drop_normal" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/models/effectpreview.json b/modules/wallpaper-engine/presets/rain/previewrefractive/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/models/grid.json b/modules/wallpaper-engine/presets/rain/previewrefractive/models/grid.json new file mode 100644 index 0000000..1b4159f --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/models/grid.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/grid.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/particles/presets/refractiverain.json b/modules/wallpaper-engine/presets/rain/previewrefractive/particles/presets/refractiverain.json new file mode 100644 index 0000000..4753280 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/particles/presets/refractiverain.json @@ -0,0 +1,110 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : "1024 0 0", + "id" : 7, + "name" : "boxrandom", + "origin" : "0 1024 0", + "rate" : 1000 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 0.20000000000000001, + "min" : 0.20000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 40, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "2500 -15000 0", + "min" : "1000 -10000 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "197 214 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : 1, + "min" : 1, + "name" : "alpharandom" + } + ], + "material" : "materials/particle/refractiverain.json", + "maxcount" : 200, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "maxlength" : 20, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/presets/refractiverain/preset.json b/modules/wallpaper-engine/presets/rain/previewrefractive/presets/refractiverain/preset.json new file mode 100644 index 0000000..eb7d3d8 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/presets/refractiverain/preset.json @@ -0,0 +1,22 @@ +{ + "name" : "ui_editor_preset_refractive_rain_title", + "description" : "ui_editor_preset_refractive_rain_description", + "tag" : "scene2d", + "group" : "preset", + "preview" : "preview/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Rain", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/refractiverain.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/particle/refractiverain.json", + "particles/presets/refractiverain.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/project.json b/modules/wallpaper-engine/presets/rain/previewrefractive/project.json new file mode 100644 index 0000000..22f84fc --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "preview" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/scene.json b/modules/wallpaper-engine/presets/rain/previewrefractive/scene.json new file mode 100644 index 0000000..ae764a8 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/scene.json @@ -0,0 +1,59 @@ +{ + "camera" : + { + "center" : "0.000 0.000 0.000", + "eye" : "0.000 0.000 1.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "colorBlendMode" : 0, + "copybackground" : true, + "id" : 25, + "image" : "models/grid.json", + "name" : "grid", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "scale" : "38.194 38.194 1.000", + "size" : "16.000 16.000", + "visible" : true + }, + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Rain", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/refractiverain.json", + "particlesrc" : null, + "scale" : "1.000 1.000 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/rain/previewrefractive/template.json b/modules/wallpaper-engine/presets/rain/previewrefractive/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/rain/previewrefractive/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/materials/presets/ash.json b/modules/wallpaper-engine/presets/smoke/materials/presets/ash.json new file mode 100644 index 0000000..be5e875 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/materials/presets/ash.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/debris/debris1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/materials/presets/smoke1.json b/modules/wallpaper-engine/presets/smoke/materials/presets/smoke1.json new file mode 100644 index 0000000..60b620c --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/materials/presets/smoke1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/materials/presets/smoke2.json b/modules/wallpaper-engine/presets/smoke/materials/presets/smoke2.json new file mode 100644 index 0000000..60b620c --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/materials/presets/smoke2.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/materials/presets/vapor0.json b/modules/wallpaper-engine/presets/smoke/materials/presets/vapor0.json new file mode 100644 index 0000000..9c9790d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/materials/presets/vapor0.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/materials/presets/vapor1.json b/modules/wallpaper-engine/presets/smoke/materials/presets/vapor1.json new file mode 100644 index 0000000..9c9790d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/materials/presets/vapor1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/materials/presets/vapor1b.json b/modules/wallpaper-engine/presets/smoke/materials/presets/vapor1b.json new file mode 100644 index 0000000..9c9790d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/materials/presets/vapor1b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/particles/presets/ash.json b/modules/wallpaper-engine/presets/smoke/particles/presets/ash.json new file mode 100644 index 0000000..0245627 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/particles/presets/ash.json @@ -0,0 +1,132 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.5 0.5", + "distancemax" : 900, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 100 0", + "rate" : 10 + } + ], + "flags" : 6, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 7, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 35, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 0 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "161 157 127", + "min" : "169 141 141", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : "0 0 2", + "min" : "0 0 -2", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/ash.json", + "maxcount" : 150, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 -10 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 9, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 10, + "name" : "angularmovement" + }, + { + "id" : 11, + "name" : "turbulence", + "scale" : 0.0049999999776482581, + "speedmax" : 50, + "speedmin" : 25, + "timescale" : 5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 5 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/particles/presets/smoke1.json b/modules/wallpaper-engine/presets/smoke/particles/presets/smoke1.json new file mode 100644 index 0000000..fd57cc4 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/particles/presets/smoke1.json @@ -0,0 +1,130 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 4, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 700, + "min" : 500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "114 114 114", + "min" : "146 146 146", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "scale" : 0.10000000000000001, + "speedmax" : 260, + "speedmin" : 250 + }, + { + "id" : 7, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/smoke1.json", + "maxcount" : 50, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 11, + "name" : "sizechange", + "startvalue" : 0.10000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 2, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/particles/presets/smoke2.json b/modules/wallpaper-engine/presets/smoke/particles/presets/smoke2.json new file mode 100644 index 0000000..3b6bc56 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/particles/presets/smoke2.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 50 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 4, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 190, + "min" : 160, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "191 191 191", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "phasemax" : 0.5, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.5 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/smoke2.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.29999999999999999 + }, + { + "endvalue" : "0.42745098039215684 0.42745098039215684 0.42745098039215684", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/particles/presets/vapor0.json b/modules/wallpaper-engine/presets/smoke/particles/presets/vapor0.json new file mode 100644 index 0000000..7f74374 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/particles/presets/vapor0.json @@ -0,0 +1,145 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 5, + "distancemin" : 0, + "flags" : 2, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 8 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 120, + "min" : 90, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "184 184 184", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "phasemax" : 0, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.5 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/vapor0.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 0, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.20000000000000001 + }, + { + "endvalue" : "0.42745098039215684 0.42745098039215684 0.42745098039215684", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + }, + { + "controlpoint" : 1, + "id" : 12, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -750, + "threshold" : 64 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 3 + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/particles/presets/vapor1.json b/modules/wallpaper-engine/presets/smoke/particles/presets/vapor1.json new file mode 100644 index 0000000..1d143ee --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/particles/presets/vapor1.json @@ -0,0 +1,151 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/vapor1_child.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 5, + "distancemin" : 0, + "flags" : 2, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 8 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1.3, + "min" : 1.3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "184 184 184", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "phasemax" : 0, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.5 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/vapor1.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 0, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.20000000000000001 + }, + { + "endvalue" : "0.7137254901960784 0.7137254901960784 0.7137254901960784", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + }, + { + "controlpoint" : 1, + "id" : 12, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -650, + "threshold" : 64 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 3 + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/particles/presets/vapor1_child.json b/modules/wallpaper-engine/presets/smoke/particles/presets/vapor1_child.json new file mode 100644 index 0000000..37aaf8a --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/particles/presets/vapor1_child.json @@ -0,0 +1,146 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 5, + "distancemin" : 0, + "flags" : 2, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 8 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1.1, + "min" : 1.1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "184 184 184", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "offset" : 0, + "phasemax" : 0, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.90000000000000002 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/vapor1b.json", + "maxcount" : 32, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 0, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.20000000000000001 + }, + { + "endvalue" : "0.7411764705882353 0.7411764705882353 0.7411764705882353", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + }, + { + "controlpoint" : 1, + "id" : 12, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -550, + "threshold" : 64 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 3 + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/preset.json b/modules/wallpaper-engine/presets/smoke/preset.json new file mode 100644 index 0000000..4181aff --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/preset.json @@ -0,0 +1,128 @@ +{ + "name" : "ui_editor_preset_smoke_title", + "description" : "ui_editor_preset_smoke_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_smoke_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_smoke_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_smoke_variant_3", + "value" : 2 + }, + { + "label" : "ui_editor_preset_smoke_variant_4", + "value" : 3 + }, + { + "label" : "ui_editor_preset_smoke_variant_5", + "value" : 4 + } + ] + }, + "variants" : + [ + { + "preview" : "previewvapor0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Vapor 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/vapor0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/vapor0.json", + "particles/presets/vapor0.json" + ] + }, + { + "preview" : "previewvapor1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Vapor 2", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/vapor1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/vapor1.json", + "materials/presets/vapor1b.json", + "particles/presets/vapor1.json", + "particles/presets/vapor1_child.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke stream", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke2.json", + "particles/presets/smoke2.json" + ] + }, + { + "preview" : "previewsmoke1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke1.json", + "particles/presets/smoke1.json" + ] + }, + { + "preview" : "previewash/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ash", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ash.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ash.json", + "particles/presets/ash.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.json b/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.tga b/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/smoke/previewash/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/smoke/previewash/materials/presets/ash.json b/modules/wallpaper-engine/presets/smoke/previewash/materials/presets/ash.json new file mode 100644 index 0000000..be5e875 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/materials/presets/ash.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/debris/debris1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/models/effectpreview.json b/modules/wallpaper-engine/presets/smoke/previewash/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/particles/presets/ash.json b/modules/wallpaper-engine/presets/smoke/previewash/particles/presets/ash.json new file mode 100644 index 0000000..2b72117 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/particles/presets/ash.json @@ -0,0 +1,132 @@ +{ + "animationmode" : "randomframe", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.5 0.5", + "distancemax" : 900, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 100 0", + "rate" : 10 + } + ], + "flags" : 6, + "initializer" : + [ + { + "id" : 2, + "max" : 10, + "min" : 7, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 60, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 0 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "161 157 127", + "min" : "169 141 141", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : "0 0 2", + "min" : "0 0 -2", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/ash.json", + "maxcount" : 150, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 -10 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 9, + "name" : "alphafade" + }, + { + "force" : "0 0 0", + "id" : 10, + "name" : "angularmovement" + }, + { + "id" : 11, + "name" : "turbulence", + "scale" : 0.0049999999776482581, + "speedmax" : 50, + "speedmin" : 25, + "timescale" : 5 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 5 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/presets/smoke/preset.json b/modules/wallpaper-engine/presets/smoke/previewash/presets/smoke/preset.json new file mode 100644 index 0000000..3c81733 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/presets/smoke/preset.json @@ -0,0 +1,82 @@ +{ + "name" : "ui_editor_preset_smoke_title", + "description" : "ui_editor_preset_smoke_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Smoke stream", + "value" : 0 + }, + { + "label" : "Smoke cloud", + "value" : 1 + }, + { + "label" : "Ash", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke stream", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke2.json", + "particles/presets/smoke2.json" + ] + }, + { + "preview" : "previewsmoke1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke1.json", + "particles/presets/smoke1.json" + ] + }, + { + "preview" : "previewash/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ash", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ash.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ash.json", + "particles/presets/ash.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/project.json b/modules/wallpaper-engine/presets/smoke/previewash/project.json new file mode 100644 index 0000000..855298f --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewash", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/scene.json b/modules/wallpaper-engine/presets/smoke/previewash/scene.json new file mode 100644 index 0000000..d98d9f0 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "26.713 24.968 -1.000", + "eye" : "26.713 24.968 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Ash", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/ash.json", + "particlesrc" : null, + "scale" : "0.558 0.558 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewash/template.json b/modules/wallpaper-engine/presets/smoke/previewash/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewash/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.tga b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/presets/smoke1.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/presets/smoke1.json new file mode 100644 index 0000000..60b620c --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/materials/presets/smoke1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/models/effectpreview.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/particles/presets/smoke1.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/particles/presets/smoke1.json new file mode 100644 index 0000000..fd57cc4 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/particles/presets/smoke1.json @@ -0,0 +1,130 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 64, + "distancemin" : 0, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 10 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 4, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 700, + "min" : 500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "114 114 114", + "min" : "146 146 146", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "turbulentvelocityrandom", + "scale" : 0.10000000000000001, + "speedmax" : 260, + "speedmin" : 250 + }, + { + "id" : 7, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/smoke1.json", + "maxcount" : 50, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 11, + "name" : "sizechange", + "startvalue" : 0.10000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 2, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/presets/smoke/preset.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/presets/smoke/preset.json new file mode 100644 index 0000000..44f71b4 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/presets/smoke/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_smoke_title", + "description" : "ui_editor_preset_smoke_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Smoke stream", + "value" : 0 + }, + { + "label" : "Smoke cloud", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewsmoke2/smoke2.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke stream", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke2.json", + "particles/presets/smoke2.json" + ] + }, + { + "preview" : "previewsmoke1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke1.json", + "particles/presets/smoke1.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/project.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/project.json new file mode 100644 index 0000000..375f357 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewsmoke1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/scene.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/scene.json new file mode 100644 index 0000000..0e5d8c0 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Smoke cloud", + "origin" : "126.486 7.499 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/smoke1.json", + "particlesrc" : null, + "scale" : "0.350 0.350 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke1/template.json b/modules/wallpaper-engine/presets/smoke/previewsmoke1/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.tga b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/presets/smoke1.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/presets/smoke1.json new file mode 100644 index 0000000..60b620c --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/presets/smoke1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/presets/smoke2.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/presets/smoke2.json new file mode 100644 index 0000000..60b620c --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/materials/presets/smoke2.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/models/effectpreview.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/particles/presets/smoke2.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/particles/presets/smoke2.json new file mode 100644 index 0000000..3b6bc56 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/particles/presets/smoke2.json @@ -0,0 +1,135 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 50 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 4, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 190, + "min" : 160, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "191 191 191", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "phasemax" : 0.5, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.5 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/smoke2.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 1, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.29999999999999999 + }, + { + "endvalue" : "0.42745098039215684 0.42745098039215684 0.42745098039215684", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/presets/smoke/preset.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/presets/smoke/preset.json new file mode 100644 index 0000000..44f71b4 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/presets/smoke/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_smoke_title", + "description" : "ui_editor_preset_smoke_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Smoke stream", + "value" : 0 + }, + { + "label" : "Smoke cloud", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewsmoke2/smoke2.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke stream", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke2.json", + "particles/presets/smoke2.json" + ] + }, + { + "preview" : "previewsmoke1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke1.json", + "particles/presets/smoke1.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/project.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/project.json new file mode 100644 index 0000000..375f357 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewsmoke1", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/scene.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/scene.json new file mode 100644 index 0000000..c9d392e --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.5294117647058824 0.5294117647058824 0.5294117647058824", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 21, + "image" : null, + "model" : null, + "name" : "Smoke stream", + "origin" : "127.613 11.003 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/smoke2.json", + "particlesrc" : null, + "scale" : "0.378 0.378 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewsmoke2/template.json b/modules/wallpaper-engine/presets/smoke/previewsmoke2/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewsmoke2/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor0/materials/presets/vapor0.json b/modules/wallpaper-engine/presets/smoke/previewvapor0/materials/presets/vapor0.json new file mode 100644 index 0000000..9c9790d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor0/materials/presets/vapor0.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor0/particles/presets/vapor0.json b/modules/wallpaper-engine/presets/smoke/previewvapor0/particles/presets/vapor0.json new file mode 100644 index 0000000..7287bea --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor0/particles/presets/vapor0.json @@ -0,0 +1,144 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 8 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 2, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 120, + "min" : 90, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "184 184 184", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "phasemax" : 0, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.5 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/vapor0.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 0, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.20000000000000001 + }, + { + "endvalue" : "0.42745098039215684 0.42745098039215684 0.42745098039215684", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + }, + { + "controlpoint" : 1, + "id" : 12, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -512, + "threshold" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 3 + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor0/presets/smoke/preset.json b/modules/wallpaper-engine/presets/smoke/previewvapor0/presets/smoke/preset.json new file mode 100644 index 0000000..a6b9d7f --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor0/presets/smoke/preset.json @@ -0,0 +1,128 @@ +{ + "name" : "ui_editor_preset_smoke_title", + "description" : "ui_editor_preset_smoke_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Vapor 0", + "value" : 0 + }, + { + "label" : "Vapor 1", + "value" : 1 + }, + { + "label" : "Smoke stream", + "value" : 2 + }, + { + "label" : "Smoke cloud", + "value" : 3 + }, + { + "label" : "Ash", + "value" : 4 + } + ] + }, + "variants" : + [ + { + "preview" : "previewvapor0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Vapor 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/vapor0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/vapor0.json", + "particles/presets/vapor0.json" + ] + }, + { + "preview" : "previewvapor1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Vapor 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/vapor1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/vapor1.json", + "materials/presets/vapor1b.json", + "particles/presets/vapor1.json", + "particles/presets/vapor1_child.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke stream", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke2.json", + "particles/presets/smoke2.json" + ] + }, + { + "preview" : "previewsmoke1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke1.json", + "particles/presets/smoke1.json" + ] + }, + { + "preview" : "previewash/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ash", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ash.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ash.json", + "particles/presets/ash.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor0/project.json b/modules/wallpaper-engine/presets/smoke/previewvapor0/project.json new file mode 100644 index 0000000..1b1e9a8 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor0/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewvapor0" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor0/scene.json b/modules/wallpaper-engine/presets/smoke/previewvapor0/scene.json new file mode 100644 index 0000000..5bb0631 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor0/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.48627450980392156 0.48627450980392156 0.48627450980392156", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Vapor 0", + "origin" : "124.759 3.766 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/vapor0.json", + "scale" : "0.661 0.661 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor0/template.json b/modules/wallpaper-engine/presets/smoke/previewvapor0/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor0/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/materials/presets/vapor1.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/materials/presets/vapor1.json new file mode 100644 index 0000000..9c9790d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/materials/presets/vapor1.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/materials/presets/vapor1b.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/materials/presets/vapor1b.json new file mode 100644 index 0000000..9c9790d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/materials/presets/vapor1b.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/beam/beam_1" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/particles/presets/vapor1.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/particles/presets/vapor1.json new file mode 100644 index 0000000..eade91d --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/particles/presets/vapor1.json @@ -0,0 +1,150 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 13, + "name" : "particles/presets/vapor1_child.json" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 8 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1.3, + "min" : 1.3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "184 184 184", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "phasemax" : 0, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.5 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/vapor1.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 0, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.20000000000000001 + }, + { + "endvalue" : "0.7137254901960784 0.7137254901960784 0.7137254901960784", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + }, + { + "controlpoint" : 1, + "id" : 12, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -350, + "threshold" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 3 + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/particles/presets/vapor1_child.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/particles/presets/vapor1_child.json new file mode 100644 index 0000000..0e94ed6 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/particles/presets/vapor1_child.json @@ -0,0 +1,145 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 1, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 6, + "distancemin" : 0, + "id" : 7, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 8 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 1.1, + "min" : 1.1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 50, + "min" : 30, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "184 184 184", + "min" : "206 206 206", + "name" : "colorrandom" + }, + { + "id" : 5, + "name" : "turbulentvelocityrandom", + "offset" : 0, + "phasemax" : 0, + "scale" : 0.10000000000000001, + "speedmax" : 250, + "speedmin" : 250, + "timescale" : 0.90000000000000002 + }, + { + "id" : 6, + "max" : "0 0 2", + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/vapor1b.json", + "maxcount" : 200, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 8, + "name" : "movement" + }, + { + "fadeintime" : 0.20000000000000001, + "fadeouttime" : 0.80000000000000004, + "id" : 9, + "name" : "alphafade" + }, + { + "endvalue" : 0, + "id" : 10, + "name" : "sizechange", + "starttime" : 0.5, + "startvalue" : 0.20000000000000001 + }, + { + "endvalue" : "0.7411764705882353 0.7411764705882353 0.7411764705882353", + "id" : 11, + "name" : "colorchange", + "starttime" : 0.5, + "startvalue" : "1 1 1" + }, + { + "controlpoint" : 1, + "id" : 12, + "name" : "controlpointattract", + "origin" : "0 0 0", + "scale" : -350, + "threshold" : 128 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "rope", + "subdivision" : 3 + } + ], + "sequencemultiplier" : 2, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/presets/smoke/preset.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/presets/smoke/preset.json new file mode 100644 index 0000000..a6b9d7f --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/presets/smoke/preset.json @@ -0,0 +1,128 @@ +{ + "name" : "ui_editor_preset_smoke_title", + "description" : "ui_editor_preset_smoke_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Vapor 0", + "value" : 0 + }, + { + "label" : "Vapor 1", + "value" : 1 + }, + { + "label" : "Smoke stream", + "value" : 2 + }, + { + "label" : "Smoke cloud", + "value" : 3 + }, + { + "label" : "Ash", + "value" : 4 + } + ] + }, + "variants" : + [ + { + "preview" : "previewvapor0/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Vapor 0", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/vapor0.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/vapor0.json", + "particles/presets/vapor0.json" + ] + }, + { + "preview" : "previewvapor1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Vapor 1", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/vapor1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/vapor1.json", + "materials/presets/vapor1b.json", + "particles/presets/vapor1.json", + "particles/presets/vapor1_child.json" + ] + }, + { + "preview" : "previewsmoke2/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke stream", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke2.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke2.json", + "particles/presets/smoke2.json" + ] + }, + { + "preview" : "previewsmoke1/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Smoke cloud", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/smoke1.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/smoke1.json", + "particles/presets/smoke1.json" + ] + }, + { + "preview" : "previewash/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Ash", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/ash.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/ash.json", + "particles/presets/ash.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/project.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/project.json new file mode 100644 index 0000000..83da0dc --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewvapor1" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/scene.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/scene.json new file mode 100644 index 0000000..a3f30f0 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.48627450980392156 0.48627450980392156 0.48627450980392156", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Vapor 1", + "origin" : "123.884 -0.430 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/vapor1.json", + "scale" : "0.844 0.844 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/smoke/previewvapor1/template.json b/modules/wallpaper-engine/presets/smoke/previewvapor1/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/smoke/previewvapor1/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/materials/presets/snowflat.json b/modules/wallpaper-engine/presets/snow/materials/presets/snowflat.json new file mode 100644 index 0000000..2af1dba --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/materials/presets/snowflat.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode" : "nocull", + "textures": ["particle/chromaticdot"] + }] +} diff --git a/modules/wallpaper-engine/presets/snow/materials/presets/snowperspective.json b/modules/wallpaper-engine/presets/snow/materials/presets/snowperspective.json new file mode 100644 index 0000000..0b5fc26 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/materials/presets/snowperspective.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode" : "nocull", + "blending": "additive", + "textures": ["particle/chromaticdot"] + }] +} diff --git a/modules/wallpaper-engine/presets/snow/materials/presets/snowstorm.json b/modules/wallpaper-engine/presets/snow/materials/presets/snowstorm.json new file mode 100644 index 0000000..2117c7f --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/materials/presets/snowstorm.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.2000000476837158 + }, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/snow" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/materials/presets/snowstormfog.json b/modules/wallpaper-engine/presets/snow/materials/presets/snowstormfog.json new file mode 100644 index 0000000..5c8eb0f --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/materials/presets/snowstormfog.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/particles/presets/snowflat.json b/modules/wallpaper-engine/presets/snow/particles/presets/snowflat.json new file mode 100644 index 0000000..838ab8b --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/particles/presets/snowflat.json @@ -0,0 +1,46 @@ +{ + "material": "materials/presets/snowflat.json", + "maxcount": 300, + "starttime": 15, + "emitter": [{ + "name": "sphererandom", + "rate": 15, + "origin": "0 650 0", + "directions" : "1 0.03 0", + "distancemin": 10, + "distancemax": 1200 + }], + "initializer": [{ + "name": "lifetimerandom", + "min": 15, + "max": 23 + }, { + "name": "sizerandom", + "min": 2, + "max": 30 + }, { + "name": "velocityrandom", + "min": "-10 -50 0", + "max": "-37 -90 0" + }, { + "name": "colorrandom", + "min": "255 255 255", + "max": "95 98 100" + }], + "operator": [{ + "name": "movement", + "gravity": "0 0 0" + }, { + "name": "oscillateposition", + "mask": "1 0.5 0", + "scalemin": 20, + "scalemax": 35, + "frequencymin": 0.8, + "frequencymax": 1.0, + "phasemin": 0, + "phasemax": 1 + }, { + "name": "alphafade", + "fadeintime": 0.1 + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/particles/presets/snowperspective.json b/modules/wallpaper-engine/presets/snow/particles/presets/snowperspective.json new file mode 100644 index 0000000..8e075c7 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/particles/presets/snowperspective.json @@ -0,0 +1,123 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 0.03 1", + "distancemax" : 1000, + "distancemin" : 10, + "id" : 6, + "name" : "sphererandom", + "origin" : "150 550 0", + "rate" : 25, + "sign" : "0 0 1" + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 30, + "min" : 2, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-37 -90 0", + "min" : "-10 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "95 98 100", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/snowperspective.json", + "maxcount" : 360, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "frequencymax" : 1.0, + "frequencymin" : 0.80000000000000004, + "id" : 8, + "mask" : "1 0.5 0", + "name" : "oscillateposition", + "phasemax" : 1, + "phasemin" : 0, + "scalemax" : 35, + "scalemin" : 20 + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/particles/presets/snowstorm.json b/modules/wallpaper-engine/presets/snow/particles/presets/snowstorm.json new file mode 100644 index 0000000..3d01870 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/particles/presets/snowstorm.json @@ -0,0 +1,130 @@ +{ + "animationmode" : "randomframe", + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/snowstormfog.json", + "origin" : "0 650 0" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "0.9 0.03 1", + "distancemax" : 1200, + "distancemin" : 10, + "id" : 6, + "name" : "sphererandom", + "origin" : "150 650 0", + "rate" : 250, + "sign" : "0 0 1" + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 30, + "min" : 2, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-100 -300 0", + "min" : "-300 -1500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "95 98 100", + "min" : "90 92 95", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/snowstorm.json", + "maxcount" : 300, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "frequencymax" : 1.0, + "frequencymin" : 0.80000000000000004, + "id" : 8, + "mask" : "1 0.5 0", + "name" : "oscillateposition", + "phasemax" : 1, + "phasemin" : 0, + "scalemax" : 35, + "scalemin" : 20 + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/particles/presets/snowstormfog.json b/modules/wallpaper-engine/presets/snow/particles/presets/snowstormfog.json new file mode 100644 index 0000000..e4b343a --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/particles/presets/snowstormfog.json @@ -0,0 +1,121 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 750, + "distancemin" : 32, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 2 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2500, + "min" : 1500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-20 -250 0", + "min" : "-30 -350 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "149 180 255", + "min" : "220 250 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "alpharandom" + }, + { + "id" : 7, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/snowstormfog.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 1, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/preset.json b/modules/wallpaper-engine/presets/snow/preset.json new file mode 100644 index 0000000..edd4ba6 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/preset.json @@ -0,0 +1,84 @@ +{ + "name" : "ui_editor_preset_snow_particles_title", + "description" : "ui_editor_preset_snow_particles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_snow_particles_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_snow_particles_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_snow_particles_variant_3", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewperspective/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow perspective", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowperspective.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowperspective.json", + "particles/presets/snowperspective.json" + ] + }, + { + "preview" : "previewflat/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow flat", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowflat.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowflat.json", + "particles/presets/snowflat.json" + ] + }, + { + "preview" : "previewstorm/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow storm", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowstorm.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowstorm.json", + "materials/presets/snowstormfog.json", + "particles/presets/snowstorm.json", + "particles/presets/snowstormfog.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.json b/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.tga b/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/snow/previewflat/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/snow/previewflat/materials/presets/snowparticles.json b/modules/wallpaper-engine/presets/snow/previewflat/materials/presets/snowparticles.json new file mode 100644 index 0000000..8be9396 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/materials/presets/snowparticles.json @@ -0,0 +1,8 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthwrite": "disabled", + "blending": "additive", + "textures": ["particle/chromaticdot"] + }] +} diff --git a/modules/wallpaper-engine/presets/snow/previewflat/models/effectpreview.json b/modules/wallpaper-engine/presets/snow/previewflat/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/particles/presets/snowparticles.json b/modules/wallpaper-engine/presets/snow/previewflat/particles/presets/snowparticles.json new file mode 100644 index 0000000..762239d --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/particles/presets/snowparticles.json @@ -0,0 +1,46 @@ +{ + "material": "materials/presets/snowparticles.json", + "maxcount": 300, + "starttime": 15, + "emitter": [{ + "name": "sphererandom", + "rate": 10, + "origin": "0 650 0", + "directions" : "1 0.03 0", + "distancemin": 10, + "distancemax": 256 + }], + "initializer": [{ + "name": "lifetimerandom", + "min": 8, + "max": 20 + }, { + "name": "sizerandom", + "min": 2, + "max": 30 + }, { + "name": "velocityrandom", + "min": "-10 -50 0", + "max": "-37 -90 0" + }, { + "name": "colorrandom", + "min": "90 92 95", + "max": "95 98 100" + }], + "operator": [{ + "name": "movement", + "gravity": "0 0 0" + }, { + "name": "oscillateposition", + "mask": "1 0.5 0", + "scalemin": 20, + "scalemax": 35, + "frequencymin": 0.1, + "frequencymax": 0.6, + "phasemin": 0, + "phasemax": 1 + }, { + "name": "alphafade", + "fadeintime": 0.1 + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/presets/snowparticles/preset.json b/modules/wallpaper-engine/presets/snow/previewflat/presets/snowparticles/preset.json new file mode 100644 index 0000000..45ee841 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/presets/snowparticles/preset.json @@ -0,0 +1,22 @@ +{ + "name" : "Snow Particles", + "description" : "Adds snow particles slowly following from the top of the screen.", + "scene" : "2d", + "group" : "preset", + //"preview" : "preview/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow particles", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowparticles.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowparticles.json", + "particles/presets/snowparticles.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/project.json b/modules/wallpaper-engine/presets/snow/previewflat/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/scene.json b/modules/wallpaper-engine/presets/snow/previewflat/scene.json new file mode 100644 index 0000000..560c5f8 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/scene.json @@ -0,0 +1,45 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Snow particles", + "origin" : "254.149 78.658 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/snowparticles.json", + "scale" : "0.716 0.716 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewflat/template.json b/modules/wallpaper-engine/presets/snow/previewflat/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewflat/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.json b/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.tga b/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/snow/previewperspective/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/materials/presets/snowperspective.json b/modules/wallpaper-engine/presets/snow/previewperspective/materials/presets/snowperspective.json new file mode 100644 index 0000000..df98802 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/materials/presets/snowperspective.json @@ -0,0 +1,9 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "textures": ["particle/chromaticdot"] + }] +} diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/models/effectpreview.json b/modules/wallpaper-engine/presets/snow/previewperspective/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/particles/presets/snowperspective.json b/modules/wallpaper-engine/presets/snow/previewperspective/particles/presets/snowperspective.json new file mode 100644 index 0000000..0f22416 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/particles/presets/snowperspective.json @@ -0,0 +1,123 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "0.6 0.03 1", + "distancemax" : 900, + "distancemin" : 10, + "id" : 6, + "name" : "sphererandom", + "origin" : "150 650 0", + "rate" : 25, + "sign" : "0 0 1" + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 20, + "min" : 8, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 30, + "min" : 2, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-37 -90 0", + "min" : "-10 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "95 98 100", + "min" : "90 92 95", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/snowperspective.json", + "maxcount" : 300, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "frequencymax" : 1.0, + "frequencymin" : 0.80000000000000004, + "id" : 8, + "mask" : "1 0.5 0", + "name" : "oscillateposition", + "phasemax" : 1, + "phasemin" : 0, + "scalemax" : 35, + "scalemin" : 20 + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/presets/snow/preset.json b/modules/wallpaper-engine/presets/snow/previewperspective/presets/snow/preset.json new file mode 100644 index 0000000..4b32ba9 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/presets/snow/preset.json @@ -0,0 +1,64 @@ +{ + "name" : "ui_editor_preset_snow_particles_title", + "description" : "ui_editor_preset_snow_particles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Snow perspective", + "value" : 0 + }, + { + "label" : "Snow flat", + "value" : 1 + }, + { + "label" : "Snow storm", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewflat/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow perspective", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowperspective.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowperspective.json", + "particles/presets/snowperspective.json" + ] + }, + { + "preview" : "previewflat/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow flat", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowflat.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowflat.json", + "particles/presets/snowflat.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/project.json b/modules/wallpaper-engine/presets/snow/previewperspective/project.json new file mode 100644 index 0000000..0532573 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewperspective", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/scene.json b/modules/wallpaper-engine/presets/snow/previewperspective/scene.json new file mode 100644 index 0000000..1fceb16 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 23, + "image" : null, + "model" : null, + "name" : "Snow perspective", + "origin" : "122.368 42.925 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/snowperspective.json", + "particlesrc" : null, + "scale" : "0.408 0.408 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewperspective/template.json b/modules/wallpaper-engine/presets/snow/previewperspective/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewperspective/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.json b/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.tga b/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/snow/previewstorm/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/materials/presets/snowstorm.json b/modules/wallpaper-engine/presets/snow/previewstorm/materials/presets/snowstorm.json new file mode 100644 index 0000000..6ba91e0 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/materials/presets/snowstorm.json @@ -0,0 +1,18 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "combos" : {}, + "constantshadervalues" : + { + "ui_editor_properties_overbright" : 1.2000000476837158 + }, + "cullmode" : "normal", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/nature/snow" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/materials/presets/snowstormfog.json b/modules/wallpaper-engine/presets/snow/previewstorm/materials/presets/snowstormfog.json new file mode 100644 index 0000000..5c8eb0f --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/materials/presets/snowstormfog.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/smoke/smoke2" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/models/effectpreview.json b/modules/wallpaper-engine/presets/snow/previewstorm/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/particles/presets/snowstorm.json b/modules/wallpaper-engine/presets/snow/previewstorm/particles/presets/snowstorm.json new file mode 100644 index 0000000..db81d93 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/particles/presets/snowstorm.json @@ -0,0 +1,130 @@ +{ + "animationmode" : "randomframe", + "children" : + [ + { + "id" : 10, + "name" : "particles/presets/snowstormfog.json", + "origin" : "0 650 0" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "0.6 0.03 1", + "distancemax" : 900, + "distancemin" : 10, + "id" : 6, + "name" : "sphererandom", + "origin" : "150 650 0", + "rate" : 250, + "sign" : "0 0 1" + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 2, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 30, + "min" : 2, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-100 -300 0", + "min" : "-300 -1500 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "95 98 100", + "min" : "90 92 95", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/snowstorm.json", + "maxcount" : 300, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "frequencymax" : 1.0, + "frequencymin" : 0.80000000000000004, + "id" : 8, + "mask" : "1 0.5 0", + "name" : "oscillateposition", + "phasemax" : 1, + "phasemin" : 0, + "scalemax" : 35, + "scalemin" : 20 + }, + { + "fadeintime" : 0.10000000000000001, + "id" : 9, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 15 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/particles/presets/snowstormfog.json b/modules/wallpaper-engine/presets/snow/previewstorm/particles/presets/snowstormfog.json new file mode 100644 index 0000000..e4b343a --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/particles/presets/snowstormfog.json @@ -0,0 +1,121 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 750, + "distancemin" : 32, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 2 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 5, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 2500, + "min" : 1500, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "-20 -250 0", + "min" : "-30 -350 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "149 180 255", + "min" : "220 250 255", + "name" : "colorrandom" + }, + { + "id" : 6, + "max" : 0.20000000000000001, + "min" : 0.10000000000000001, + "name" : "alpharandom" + }, + { + "id" : 7, + "name" : "rotationrandom" + } + ], + "material" : "materials/presets/snowstormfog.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 10, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : 1, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/presets/snow/preset.json b/modules/wallpaper-engine/presets/snow/previewstorm/presets/snow/preset.json new file mode 100644 index 0000000..6d44187 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/presets/snow/preset.json @@ -0,0 +1,84 @@ +{ + "name" : "ui_editor_preset_snow_particles_title", + "description" : "ui_editor_preset_snow_particles_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Snow perspective", + "value" : 0 + }, + { + "label" : "Snow flat", + "value" : 1 + }, + { + "label" : "Snow storm", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewperspective/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow perspective", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowperspective.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowperspective.json", + "particles/presets/snowperspective.json" + ] + }, + { + "preview" : "previewflat/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow flat", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowflat.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowflat.json", + "particles/presets/snowflat.json" + ] + }, + { + "preview" : "previewstorm/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Snow storm", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/snowstorm.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/snowstorm.json", + "materials/presets/snowstormfog.json", + "particles/presets/snowstorm.json", + "particles/presets/snowstormfog.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/project.json b/modules/wallpaper-engine/presets/snow/previewstorm/project.json new file mode 100644 index 0000000..ae92358 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewstorm", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/scene.json b/modules/wallpaper-engine/presets/snow/previewstorm/scene.json new file mode 100644 index 0000000..9e1ece4 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Snow storm", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/snowstorm.json", + "particlesrc" : null, + "scale" : "0.394 0.394 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/snow/previewstorm/template.json b/modules/wallpaper-engine/presets/snow/previewstorm/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/snow/previewstorm/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/materials/presets/spark.json b/modules/wallpaper-engine/presets/spark/materials/presets/spark.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/materials/presets/spark.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/spark/materials/presets/sparktrails.json b/modules/wallpaper-engine/presets/spark/materials/presets/sparktrails.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/materials/presets/sparktrails.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/spark/particles/presets/spark.json b/modules/wallpaper-engine/presets/spark/particles/presets/spark.json new file mode 100644 index 0000000..05aabe3 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/particles/presets/spark.json @@ -0,0 +1,116 @@ +{ + "children" : + [ + { + "flags" : 0, + "id" : 9, + "name" : "particles/presets/sparktrails.json", + "type" : "eventspawn" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : 32, + "id" : 6, + "name" : "sphererandom", + "rate" : 0.20000001192092895, + "speedmax" : 0 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 700, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "251 255 181", + "min" : "255 237 145", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 0.5, + "min" : 0.5, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/spark.json", + "maxcount" : 1, + "operator" : + [ + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "id" : 8, + "name" : "alphachange", + "starttime" : 0.10000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 10 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/particles/presets/sparktrails.json b/modules/wallpaper-engine/presets/spark/particles/presets/sparktrails.json new file mode 100644 index 0000000..7c0b74c --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/particles/presets/sparktrails.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "0.1 1 0", + "distancemax" : 32, + "distancemin" : 16, + "id" : 5, + "instantaneous" : 100, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "sign" : "0 1 0", + "speedmax" : 1024, + "speedmin" : 0 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 2, + "id" : 2, + "max" : 1, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 7, + "min" : 3, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "254 255 181", + "min" : "255 249 170", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/sparktrails.json", + "maxcount" : 100, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 -3500 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.029999999999999999, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preset.json b/modules/wallpaper-engine/presets/spark/preset.json new file mode 100644 index 0000000..16ad9d1 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preset.json @@ -0,0 +1,24 @@ +{ + "name" : "ui_editor_preset_spark_title", + "description" : "ui_editor_preset_spark_description", + "tag" : "scene2d", + "group" : "preset", + "preview" : "preview/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Spark", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/spark.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/spark.json", + "materials/presets/sparktrails.json", + "particles/presets/spark.json", + "particles/presets/sparktrails.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.json b/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.tga b/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/spark/preview/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/spark/preview/materials/presets/spark.json b/modules/wallpaper-engine/presets/spark/preview/materials/presets/spark.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/materials/presets/spark.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/spark/preview/materials/presets/sparktrails.json b/modules/wallpaper-engine/presets/spark/preview/materials/presets/sparktrails.json new file mode 100644 index 0000000..122f683 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/materials/presets/sparktrails.json @@ -0,0 +1,10 @@ +{ + "passes": [{ + "shader": "genericparticle", + "depthtest": "disabled", + "depthwrite": "disabled", + "blending": "additive", + "cullmode": "nocull", + "textures": ["particle/halo"] + }] +} diff --git a/modules/wallpaper-engine/presets/spark/preview/models/effectpreview.json b/modules/wallpaper-engine/presets/spark/preview/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/particles/presets/spark.json b/modules/wallpaper-engine/presets/spark/preview/particles/presets/spark.json new file mode 100644 index 0000000..05aabe3 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/particles/presets/spark.json @@ -0,0 +1,116 @@ +{ + "children" : + [ + { + "flags" : 0, + "id" : 9, + "name" : "particles/presets/sparktrails.json", + "type" : "eventspawn" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "distancemax" : 32, + "id" : 6, + "name" : "sphererandom", + "rate" : 0.20000001192092895, + "speedmax" : 0 + } + ], + "flags" : 0, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 700, + "min" : 600, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "251 255 181", + "min" : "255 237 145", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 0.5, + "min" : 0.5, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/spark.json", + "maxcount" : 1, + "operator" : + [ + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + }, + { + "id" : 8, + "name" : "alphachange", + "starttime" : 0.10000000000000001 + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "starttime" : 10 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/particles/presets/sparktrails.json b/modules/wallpaper-engine/presets/spark/preview/particles/presets/sparktrails.json new file mode 100644 index 0000000..20e1de3 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/particles/presets/sparktrails.json @@ -0,0 +1,111 @@ +{ + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "0.1 1 0", + "distancemax" : 32, + "distancemin" : 16, + "id" : 5, + "instantaneous" : 100, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0, + "sign" : "0 1 0", + "speedmax" : 1024, + "speedmin" : 0 + } + ], + "flags" : 1, + "initializer" : + [ + { + "exponent" : 2, + "id" : 2, + "max" : 1, + "min" : 0.10000000000000001, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 20, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "254 255 181", + "min" : "255 249 170", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/sparktrails.json", + "maxcount" : 100, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 -3500 0", + "id" : 6, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.10000000000000001, + "id" : 7, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.010000000745058061, + "name" : "spritetrail" + } + ], + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/presets/spark/preset.json b/modules/wallpaper-engine/presets/spark/preview/presets/spark/preset.json new file mode 100644 index 0000000..241c6ed --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/presets/spark/preset.json @@ -0,0 +1,24 @@ +{ + "name" : "ui_editor_preset_spark_title", + "description" : "ui_editor_preset_spark_description", + "tag" : "scene2d", + "group" : "preset", + "preview" : "preview_large/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Spark", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/spark.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/spark.json", + "materials/presets/sparktrails.json", + "particles/presets/spark.json", + "particles/presets/sparktrails.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/project.json b/modules/wallpaper-engine/presets/spark/preview/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/scene.json b/modules/wallpaper-engine/presets/spark/preview/scene.json new file mode 100644 index 0000000..76ef20c --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/scene.json @@ -0,0 +1,46 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Spark", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/spark.json", + "particlesrc" : null, + "scale" : "0.720 0.720 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/spark/preview/template.json b/modules/wallpaper-engine/presets/spark/preview/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/spark/preview/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/materials/presets/shootingstar.json b/modules/wallpaper-engine/presets/stars/materials/presets/shootingstar.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/materials/presets/shootingstar.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/materials/presets/shootingstarglow.json b/modules/wallpaper-engine/presets/stars/materials/presets/shootingstarglow.json new file mode 100644 index 0000000..f083b88 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/materials/presets/shootingstarglow.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/materials/presets/starcircle.json b/modules/wallpaper-engine/presets/stars/materials/presets/starcircle.json new file mode 100644 index 0000000..8677a05 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/materials/presets/starcircle.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/misc/star_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/materials/presets/starfield.json b/modules/wallpaper-engine/presets/stars/materials/presets/starfield.json new file mode 100644 index 0000000..413e28e --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/materials/presets/starfield.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/particles/presets/shootingstar.json b/modules/wallpaper-engine/presets/stars/particles/presets/shootingstar.json new file mode 100644 index 0000000..67c6141 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/particles/presets/shootingstar.json @@ -0,0 +1,120 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 9, + "name" : "particles/presets/shootingstarglow.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "-256 256 0", + "rate" : 0.20000000000000001 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 5, + "min" : 2, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "250 0 0", + "min" : "100 0 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/shootingstar.json", + "maxcount" : 16, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 -40 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 9 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/particles/presets/shootingstarglow.json b/modules/wallpaper-engine/presets/stars/particles/presets/shootingstarglow.json new file mode 100644 index 0000000..76df2b0 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/particles/presets/shootingstarglow.json @@ -0,0 +1,112 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 150, + "min" : 100, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 0.5, + "min" : 0.6, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/shootingstarglow.json", + "maxcount" : 4, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/particles/presets/starcircle.json b/modules/wallpaper-engine/presets/stars/particles/presets/starcircle.json new file mode 100644 index 0000000..ccd6ddf --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/particles/presets/starcircle.json @@ -0,0 +1,132 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 256, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "mapsequencearoundcontrolpoint" + }, + { + "id" : 7, + "name" : "rotationrandom" + }, + { + "id" : 11, + "max" : "0 0 10", + "min" : "0 0 10", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/starcircle.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.29999999999999999, + "id" : 10, + "name" : "alphafade" + }, + { + "drag" : 0.10000000000000001, + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/particles/presets/starfield.json b/modules/wallpaper-engine/presets/stars/particles/presets/starfield.json new file mode 100644 index 0000000..7ffd257 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/particles/presets/starfield.json @@ -0,0 +1,117 @@ +{ + "animationmode" : "sequence", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 500, + "speedmax" : 1, + "speedmin" : 1 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 5, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 2000", + "min" : "0 0 1500", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/starfield.json", + "maxcount" : 512, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "maxlength" : 20, + "name" : "spritetrail" + } + ], + "sequencemultiplier" : 1, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/preset.json b/modules/wallpaper-engine/presets/stars/preset.json new file mode 100644 index 0000000..0ee9a1b --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/preset.json @@ -0,0 +1,84 @@ +{ + "name" : "ui_editor_preset_stars_title", + "description" : "ui_editor_preset_stars_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "ui_editor_preset_stars_variant_1", + "value" : 0 + }, + { + "label" : "ui_editor_preset_stars_variant_2", + "value" : 1 + }, + { + "label" : "ui_editor_preset_stars_variant_3", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewstarfield/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Star field", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starfield.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starfield.json", + "particles/presets/starfield.json" + ] + }, + { + "preview" : "previewstarcircle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Star circle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starcircle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starcircle.json", + "particles/presets/starcircle.json" + ] + }, + { + "preview" : "previewshootingstar/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Shooting star", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/shootingstar.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/shootingstar.json", + "materials/presets/shootingstarglow.json", + "particles/presets/shootingstar.json", + "particles/presets/shootingstarglow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/materials/presets/shootingstar.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/materials/presets/shootingstar.json new file mode 100644 index 0000000..c2e0b36 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/materials/presets/shootingstar.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/drop" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/materials/presets/shootingstarglow.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/materials/presets/shootingstarglow.json new file mode 100644 index 0000000..f083b88 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/materials/presets/shootingstarglow.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "additive", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo_4" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/particles/presets/shootingstar.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/particles/presets/shootingstar.json new file mode 100644 index 0000000..67c6141 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/particles/presets/shootingstar.json @@ -0,0 +1,120 @@ +{ + "animationmode" : null, + "children" : + [ + { + "id" : 9, + "name" : "particles/presets/shootingstarglow.json", + "type" : "eventfollow" + } + ], + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "-256 256 0", + "rate" : 0.20000000000000001 + } + ], + "flags" : 1, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 5, + "min" : 2, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "250 0 0", + "min" : "100 0 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/shootingstar.json", + "maxcount" : 16, + "operator" : + [ + { + "drag" : 0.10000000000000001, + "gravity" : "0 -40 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 0.20000000000000001, + "name" : "ropetrail" + } + ], + "sequencemultiplier" : null, + "starttime" : 9 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/particles/presets/shootingstarglow.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/particles/presets/shootingstarglow.json new file mode 100644 index 0000000..b16e548 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/particles/presets/shootingstarglow.json @@ -0,0 +1,112 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 0, + "distancemin" : 0, + "id" : 6, + "instantaneous" : 1, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 0 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 3, + "min" : 3, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 150, + "min" : 100, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + }, + { + "id" : 5, + "max" : 0.14999999999999999, + "min" : 0.10000000000000001, + "name" : "alpharandom" + } + ], + "material" : "materials/presets/shootingstarglow.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.5, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/presets/stars/preset.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/presets/stars/preset.json new file mode 100644 index 0000000..16b19b8 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/presets/stars/preset.json @@ -0,0 +1,84 @@ +{ + "name" : "ui_editor_preset_stars_title", + "description" : "ui_editor_preset_stars_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Star field", + "value" : 0 + }, + { + "label" : "Star circle", + "value" : 1 + }, + { + "label" : "Shooting star", + "value" : 2 + } + ] + }, + "variants" : + [ + { + "preview" : "previewstarfield/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Star field", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starfield.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starfield.json", + "particles/presets/starfield.json" + ] + }, + { + "preview" : "previewstarcircle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Star circle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starcircle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starcircle.json", + "particles/presets/starcircle.json" + ] + }, + { + "preview" : "previewshootingstar/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Shooting star", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/shootingstar.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/shootingstar.json", + "materials/presets/shootingstarglow.json", + "particles/presets/shootingstar.json", + "particles/presets/shootingstarglow.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/project.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/project.json new file mode 100644 index 0000000..81fde80 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewshootingstar", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/scene.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/scene.json new file mode 100644 index 0000000..31e25bb --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/scene.json @@ -0,0 +1,52 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7019607843137254 0.7019607843137254 0.7019607843137254", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 22, + "image" : null, + "instanceoverride" : + { + "count" : 10 + }, + "locktransforms" : false, + "model" : null, + "name" : "Shooting star", + "origin" : "161.847 37.998 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/shootingstar.json", + "scale" : "1.000 1.000 1.000", + "visible" : true + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewshootingstar/template.json b/modules/wallpaper-engine/presets/stars/previewshootingstar/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewshootingstar/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarcircle/materials/presets/starcircle.json b/modules/wallpaper-engine/presets/stars/previewstarcircle/materials/presets/starcircle.json new file mode 100644 index 0000000..8677a05 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarcircle/materials/presets/starcircle.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/misc/star_0" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarcircle/particles/presets/starcircle.json b/modules/wallpaper-engine/presets/stars/previewstarcircle/particles/presets/starcircle.json new file mode 100644 index 0000000..ccd6ddf --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarcircle/particles/presets/starcircle.json @@ -0,0 +1,132 @@ +{ + "animationmode" : null, + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 256, + "distancemin" : 256, + "id" : 8, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 20 + } + ], + "flags" : null, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 200, + "min" : 50, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "50 50 0", + "min" : "-50 -50 0", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 191 0", + "name" : "colorrandom" + }, + { + "id" : 6, + "name" : "mapsequencearoundcontrolpoint" + }, + { + "id" : 7, + "name" : "rotationrandom" + }, + { + "id" : 11, + "max" : "0 0 10", + "min" : "0 0 10", + "name" : "angularvelocityrandom" + } + ], + "material" : "materials/presets/starcircle.json", + "maxcount" : 500, + "operator" : + [ + { + "gravity" : "0 0 0", + "id" : 9, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.29999999999999999, + "id" : 10, + "name" : "alphafade" + }, + { + "drag" : 0.10000000000000001, + "force" : "0 0 0", + "id" : 12, + "name" : "angularmovement" + } + ], + "renderer" : + [ + { + "id" : 1, + "name" : "sprite" + } + ], + "sequencemultiplier" : null, + "starttime" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarcircle/presets/stars/preset.json b/modules/wallpaper-engine/presets/stars/previewstarcircle/presets/stars/preset.json new file mode 100644 index 0000000..9a7a739 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarcircle/presets/stars/preset.json @@ -0,0 +1,60 @@ +{ + "name" : "ui_editor_preset_stars_title", + "description" : "ui_editor_preset_stars_description", + "tag" : "scene2d", + "group" : "preset", + "options" : + { + "droplistVisible" : true, + "droplistOptions" : + [ + { + "label" : "Star field", + "value" : 0 + }, + { + "label" : "Star circle", + "value" : 1 + } + ] + }, + "variants" : + [ + { + "preview" : "previewstarfield/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Star field", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starfield.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starfield.json", + "particles/presets/starfield.json" + ] + }, + { + "preview" : "previewstarcircle/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Star circle", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starcircle.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starcircle.json", + "particles/presets/starcircle.json" + ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarcircle/project.json b/modules/wallpaper-engine/presets/stars/previewstarcircle/project.json new file mode 100644 index 0000000..67f9db6 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarcircle/project.json @@ -0,0 +1,17 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "previewstarcircle" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarcircle/scene.json b/modules/wallpaper-engine/presets/stars/previewstarcircle/scene.json new file mode 100644 index 0000000..6f6be98 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarcircle/scene.json @@ -0,0 +1,47 @@ +{ + "camera" : + { + "center" : "0.000 0.000 -1.000", + "eye" : "0.000 0.000 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0.7 0.7 0.7", + "clearenabled" : null, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 12, + "image" : null, + "instanceoverride" : null, + "model" : null, + "name" : "Star circle", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/starcircle.json", + "scale" : "0.392 0.392 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarcircle/template.json b/modules/wallpaper-engine/presets/stars/previewstarcircle/template.json new file mode 100644 index 0000000..923e509 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarcircle/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview empty", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.json b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.json new file mode 100644 index 0000000..7d0d862 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.json @@ -0,0 +1,13 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage2", + "textures" : [ "effectpreview" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.tex-json b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.tex-json new file mode 100644 index 0000000..b2e96f2 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.tex-json @@ -0,0 +1,6 @@ +{ + "clampuvs" : true, + "format" : "rgba8888", + "nomip" : true, + "nonpoweroftwo" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.tga b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.tga new file mode 100644 index 0000000..89d8bdc Binary files /dev/null and b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/effectpreview.tga differ diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/materials/presets/starfield.json b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/presets/starfield.json new file mode 100644 index 0000000..413e28e --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/materials/presets/starfield.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "blending" : "translucent", + "combos" : {}, + "constantshadervalues" : {}, + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericparticle", + "textures" : [ "particle/halo" ] + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/models/effectpreview.json b/modules/wallpaper-engine/presets/stars/previewstarfield/models/effectpreview.json new file mode 100644 index 0000000..71c57e3 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/models/effectpreview.json @@ -0,0 +1,4 @@ +{ + "autosize" : true, + "material" : "materials/effectpreview.json" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/particles/presets/starfield.json b/modules/wallpaper-engine/presets/stars/previewstarfield/particles/presets/starfield.json new file mode 100644 index 0000000..7ffd257 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/particles/presets/starfield.json @@ -0,0 +1,117 @@ +{ + "animationmode" : "sequence", + "children" : null, + "controlpoint" : + [ + { + "flags" : 0, + "id" : 0, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 1, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 2, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 3, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 4, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 5, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 6, + "offset" : "0 0 0" + }, + { + "flags" : 0, + "id" : 7, + "offset" : "0 0 0" + } + ], + "emitter" : + [ + { + "directions" : "1 1 0", + "distancemax" : 512, + "distancemin" : 0, + "id" : 6, + "name" : "sphererandom", + "origin" : "0 0 0", + "rate" : 500, + "speedmax" : 1, + "speedmin" : 1 + } + ], + "flags" : 4, + "initializer" : + [ + { + "id" : 2, + "max" : 1, + "min" : 1, + "name" : "lifetimerandom" + }, + { + "id" : 3, + "max" : 5, + "min" : 5, + "name" : "sizerandom" + }, + { + "id" : 4, + "max" : "0 0 2000", + "min" : "0 0 1500", + "name" : "velocityrandom" + }, + { + "id" : 5, + "max" : "255 255 255", + "min" : "255 255 255", + "name" : "colorrandom" + } + ], + "material" : "materials/presets/starfield.json", + "maxcount" : 512, + "operator" : + [ + { + "drag" : 0.20000000000000001, + "gravity" : "0 0 0", + "id" : 7, + "name" : "movement" + }, + { + "fadeintime" : 0.10000000000000001, + "fadeouttime" : 0.90000000000000002, + "id" : 8, + "name" : "alphafade" + } + ], + "renderer" : + [ + { + "id" : 1, + "length" : 1, + "maxlength" : 20, + "name" : "spritetrail" + } + ], + "sequencemultiplier" : 1, + "starttime" : 1 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/presets/stars/preset.json b/modules/wallpaper-engine/presets/stars/previewstarfield/presets/stars/preset.json new file mode 100644 index 0000000..e7430ef --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/presets/stars/preset.json @@ -0,0 +1,22 @@ +{ + "name" : "ui_editor_preset_stars_title", + "description" : "ui_editor_preset_stars_description", + "tag" : "scene2d", + "group" : "preset", + "preview" : "preview/project.json", + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "name" : "Stars", + "origin" : "0.000 0.000 0.000", + "particle" : "particles/presets/starfield.json", + "scale" : "1.000 1.000 1.000" + } + ], + "dependencies" : + [ + "materials/presets/starfield.json", + "particles/presets/starfield.json" + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/project.json b/modules/wallpaper-engine/presets/stars/previewstarfield/project.json new file mode 100644 index 0000000..58c0988 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/project.json @@ -0,0 +1,18 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "preview", + "type" : "scene" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/scene.json b/modules/wallpaper-engine/presets/stars/previewstarfield/scene.json new file mode 100644 index 0000000..46a4d6d --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/scene.json @@ -0,0 +1,48 @@ +{ + "camera" : + { + "center" : "1.949 -3.580 -1.000", + "eye" : "1.949 -3.580 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "bloomstrength" : 2, + "bloomthreshold" : 0.64999997615814209, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.10000000149011612, + "cameraparallaxmouseinfluence" : 0, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1, + "camerashakespeed" : 3, + "clearcolor" : "0 0 0", + "clearenabled" : null, + "fov" : 50.0, + "orthogonalprojection" : + { + "height" : 256, + "width" : 256 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "id" : 18, + "image" : null, + "model" : null, + "name" : "Stars", + "origin" : "128.000 128.000 0.000", + "parallaxDepth" : "1.000 1.000", + "particle" : "particles/presets/starfield.json", + "particlesrc" : null, + "scale" : "0.381 0.381 0.180" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/presets/stars/previewstarfield/template.json b/modules/wallpaper-engine/presets/stars/previewstarfield/template.json new file mode 100644 index 0000000..73849b1 --- /dev/null +++ b/modules/wallpaper-engine/presets/stars/previewstarfield/template.json @@ -0,0 +1,4 @@ +{ + "name": "FX Preview", + "type": "scene2d" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/gifs/gifscene.json b/modules/wallpaper-engine/scenes/gifs/gifscene.json new file mode 100644 index 0000000..3b7ff4e --- /dev/null +++ b/modules/wallpaper-engine/scenes/gifs/gifscene.json @@ -0,0 +1,27 @@ +{ + "camera" : + { + "center" : "0 0 -1.000", + "eye" : "0 0 0.000", + "up" : "0.000 1.000 0.000" + }, + "general" : + { + "bloom" : false, + "clearcolor" : "0.000 0.00 0.000", + "orthogonalprojection" : + { + "auto" : true + }, + "spritesheetrefreshsync" : true + }, + "objects" : + [ + { + "angles" : "0.000 0.000 0.000", + "image" : "models/background.json", + "origin" : "0 0 0.000", + "scale" : "1.0 1 1.000" + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/gifs/materials/background.json b/modules/wallpaper-engine/scenes/gifs/materials/background.json new file mode 100644 index 0000000..64a9262 --- /dev/null +++ b/modules/wallpaper-engine/scenes/gifs/materials/background.json @@ -0,0 +1,15 @@ +{ + "passes" : + [ + { + "cullmode" : "nocull", + "depthtest" : "disabled", + "depthwrite" : "disabled", + "shader" : "genericimage", + "textures" : [ "background" ], + "combos" : { + "spritesheet" : 1 + } + } + ] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/gifs/materials/background.tex-json b/modules/wallpaper-engine/scenes/gifs/materials/background.tex-json new file mode 100644 index 0000000..f0b513a --- /dev/null +++ b/modules/wallpaper-engine/scenes/gifs/materials/background.tex-json @@ -0,0 +1,7 @@ +{ + "nonpoweroftwo" : true, + "nointerpolation" : true, + "clampuvs" : true, + "nomip" : true, + "format" : "rgba8888" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/gifs/models/background.json b/modules/wallpaper-engine/scenes/gifs/models/background.json new file mode 100644 index 0000000..f56abaa --- /dev/null +++ b/modules/wallpaper-engine/scenes/gifs/models/background.json @@ -0,0 +1,5 @@ +{ + "material" : "materials/background.json", + "nopadding" : true, + "autosize" : true +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/modeleditor/project.json b/modules/wallpaper-engine/scenes/modeleditor/project.json new file mode 100644 index 0000000..0f7218c --- /dev/null +++ b/modules/wallpaper-engine/scenes/modeleditor/project.json @@ -0,0 +1,19 @@ +{ + "file" : "scene.json", + "general" : + { + "properties" : + { + "schemecolor" : + { + "order" : 0, + "text" : "ui_browse_properties_scheme_color", + "type" : "color", + "value" : "0 0 0" + } + } + }, + "title" : "modeleditor", + "type" : "scene", + "version" : 0 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/modeleditor/scene.json b/modules/wallpaper-engine/scenes/modeleditor/scene.json new file mode 100644 index 0000000..66c8fd6 --- /dev/null +++ b/modules/wallpaper-engine/scenes/modeleditor/scene.json @@ -0,0 +1,72 @@ +{ + "camera" : + { + "center" : "0.00000 0.00000 0.00000", + "eye" : "1.70000 1.00000 2.90000", + "up" : "0.00000 1.00000 0.00000" + }, + "general" : + { + "ambientcolor" : "0.40000 0.40000 0.40000", + "bloom" : true, + "bloomhdrfeather" : 0.1, + "bloomhdriterations" : 8, + "bloomhdrscatter" : 1.619, + "bloomhdrstrength" : 2.0, + "bloomhdrthreshold" : 1.0, + "bloomstrength" : 2.0, + "bloomthreshold" : 0.64999998, + "camerafade" : true, + "cameraparallax" : false, + "cameraparallaxamount" : 0.5, + "cameraparallaxdelay" : 0.1, + "cameraparallaxmouseinfluence" : 0.5, + "camerapreview" : true, + "camerashake" : false, + "camerashakeamplitude" : 0.5, + "camerashakeroughness" : 1.0, + "camerashakespeed" : 3.0, + "clearcolor" : "0.50000 0.50000 0.50000", + "clearenabled" : true, + "farz" : 10000.0, + "fov" : 50.0, + "hdr" : false, + "nearz" : 0.1, + "lightconfig" : + { + "point" : 2 + }, + "orthogonalprojection" : null, + "skylightcolor" : "0.30000 0.30000 0.30000", + "transparentsorting" : true, + "zoom" : 1.0 + }, + "objects" : [{ + "angles" : "0.00000 0.00000 0.00000", + "color" : "0.63137 1.00000 0.95294", + "id" : 2, + "intensity" : 6.0, + "light" : "lpoint", + "locktransforms" : false, + "name" : "", + "origin" : "15.64404 15.90002 15.00000", + "parallaxDepth" : "0.00000 0.00000", + "radius" : 150, + "scale" : "1.00000 1.00000 1.00000", + "visible" : true + }, { + "angles" : "0.00000 0.00000 0.00000", + "color" : "0.5 0.20000 1.0", + "id" : 3, + "intensity" : 5.0, + "light" : "lpoint", + "locktransforms" : false, + "name" : "", + "origin" : "-2.64404 -5.90002 -4.00000", + "parallaxDepth" : "0.00000 0.00000", + "radius" : 50, + "scale" : "1.00000 1.00000 1.00000", + "visible" : true + }], + "version" : 3 +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/particleeditor/project.json b/modules/wallpaper-engine/scenes/particleeditor/project.json new file mode 100644 index 0000000..96e4797 --- /dev/null +++ b/modules/wallpaper-engine/scenes/particleeditor/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "particleeditor" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/particleeditor/scene.json b/modules/wallpaper-engine/scenes/particleeditor/scene.json new file mode 100644 index 0000000..552bb6d --- /dev/null +++ b/modules/wallpaper-engine/scenes/particleeditor/scene.json @@ -0,0 +1,16 @@ +{ + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "camerafade" : true, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 512, + "width" : 512 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : [] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/particleeditor3dscale/project.json b/modules/wallpaper-engine/scenes/particleeditor3dscale/project.json new file mode 100644 index 0000000..96e4797 --- /dev/null +++ b/modules/wallpaper-engine/scenes/particleeditor3dscale/project.json @@ -0,0 +1,4 @@ +{ + "file" : "scene.json", + "title" : "particleeditor" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scenes/particleeditor3dscale/scene.json b/modules/wallpaper-engine/scenes/particleeditor3dscale/scene.json new file mode 100644 index 0000000..1642f49 --- /dev/null +++ b/modules/wallpaper-engine/scenes/particleeditor3dscale/scene.json @@ -0,0 +1,16 @@ +{ + "general" : + { + "ambientcolor" : "0.3 0.3 0.3", + "bloom" : false, + "camerafade" : true, + "clearcolor" : "0.7 0.7 0.7", + "orthogonalprojection" : + { + "height" : 6, + "width" : 6 + }, + "skylightcolor" : "0.3 0.3 0.3" + }, + "objects" : [] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/scripts/jsclasses/baseclasses.js b/modules/wallpaper-engine/scripts/jsclasses/baseclasses.js new file mode 100644 index 0000000..2744850 --- /dev/null +++ b/modules/wallpaper-engine/scripts/jsclasses/baseclasses.js @@ -0,0 +1,485 @@ +class Vec2 { + constructor(x,y){ + if(typeof x === 'string'){ + x=x.split(' '); + this.x=parseFloat(x[0]); + this.y=parseFloat(x[1]); + }else if(x instanceof Vec3){ + this.x=x.x; + this.y=x.y; + }else if(x instanceof Vec2){ + this.x=x.x; + this.y=x.y; + }else if(typeof x!=='undefined'){ + this.x=x; + this.y=(typeof y==='number')?y:x; + }else{ + this.x=this.y=0; + } + } + length(){ + return Math.sqrt(this.x*this.x+this.y*this.y); + } + lengthSqr(){ + return this.x*this.x+this.y*this.y; + } + normalize(){ + return this.divide(this.length()); + } + copy(){ + return new Vec2( + this.x, + this.y + ); + } + add(f) { + if(typeof f === 'number'){ + return new Vec2( + this.x+f, + this.y+f + ); + }else{ + return new Vec2( + this.x+f.x, + this.y+f.y + ); + } + } + subtract(f) { + if(typeof f === 'number'){ + return new Vec2( + this.x-f, + this.y-f + ); + }else{ + return new Vec2( + this.x-f.x, + this.y-f.y + ); + } + } + multiply(f){ + if(typeof f === 'number'){ + return new Vec2( + this.x*f, + this.y*f + ); + }else{ + return new Vec2( + this.x*f.x, + this.y*f.y + ); + } + } + divide(f){ + if(typeof f === 'number'){ + return new Vec2( + this.x/f, + this.y/f + ); + }else{ + return new Vec2( + this.x/f.x, + this.y/f.y + ); + } + } + dot(f){ + return this.x*f.x+this.y*f.y; + } + reflect(f) { + return this.subtract(f.multiply(2*this.dot(f))); + } + perpendicular(){ + return new Vec2(this.y, -this.x); + } + mix(v, a) { + return new Vec2( + this.x+(v.x-this.x)*a, + this.y+(v.y-this.y)*a + ); + } + min(v) { + return new Vec2( + Math.min(this.x, v.x), + Math.min(this.y, v.y) + ); + } + max(v) { + return new Vec2( + Math.max(this.x, v.x), + Math.max(this.y, v.y) + ); + } + //smoothStep(min, max) { + // let x = Math.max(0, Math.min(1, (this.x-min.x)/(max.x-min.x))); + // let y = Math.max(0, Math.min(1, (this.y-min.y)/(max.y-min.y))); + // return new Vec2(x*x*(3-2*x), y*y*(3-2*y)); + //} + toString(){ + return this.x+' '+this.y; + } + toJSONString(){ + return this.toString(); + } +} +class Vec3 { + constructor(x,y,z){ + if(typeof x === 'string'){ + x=x.split(' '); + this.x=parseFloat(x[0]); + this.y=parseFloat(x[1]); + this.z=parseFloat(x[2]); + }else if(x instanceof Vec3){ + this.x=x.x; + this.y=x.y; + this.z=x.z; + }else if(x instanceof Vec2){ + this.x=x.x; + this.y=x.y; + this.z=0; + }else if(typeof x!=='undefined'){ + this.x=x; + this.y=(typeof y==='number')?y:x; + this.z=(typeof z==='number')?z:((typeof y==='number')?0:x); + }else{ + this.x=this.y=this.z=0; + } + } + length(){ + return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z); + } + lengthSqr(){ + return this.x*this.x+this.y*this.y+this.z*this.z; + } + normalize(){ + return this.divide(this.length()); + } + copy(){ + return new Vec3( + this.x, + this.y, + this.z + ); + } + add(f) { + if(typeof f === 'number'){ + return new Vec3( + this.x+f, + this.y+f, + this.z+f + ); + }else if(f instanceof Vec2){ + return new Vec3( + this.x+f.x, + this.y+f.y, + this.z + ); + }else{ + return new Vec3( + this.x+f.x, + this.y+f.y, + this.z+f.z + ); + } + } + subtract(f) { + if(typeof f === 'number'){ + return new Vec3( + this.x-f, + this.y-f, + this.z-f + ); + }else if(f instanceof Vec2){ + return new Vec3( + this.x-f.x, + this.y-f.y, + this.z + ); + }else{ + return new Vec3( + this.x-f.x, + this.y-f.y, + this.z-f.z + ); + } + } + multiply(f){ + if(typeof f === 'number'){ + return new Vec3( + this.x*f, + this.y*f, + this.z*f + ); + }else if(f instanceof Vec2){ + return new Vec3( + this.x*f.x, + this.y*f.y, + this.z + ); + }else{ + return new Vec3( + this.x*f.x, + this.y*f.y, + this.z*f.z + ); + } + } + divide(f){ + if(typeof f === 'number'){ + return new Vec3( + this.x/f, + this.y/f, + this.z/f + ); + }else if(f instanceof Vec2){ + return new Vec3( + this.x/f.x, + this.y/f.y, + this.z + ); + }else{ + return new Vec3( + this.x/f.x, + this.y/f.y, + this.z/f.z + ); + } + } + cross(f){ + return new Vec3( + this.y*f.z-this.z*f.y, + this.z*f.x-this.x*f.z, + this.x*f.y-this.y*f.x + ); + } + dot(f){ + return this.x*f.x+this.y*f.y+this.z*f.z; + } + reflect(f) { + return this.subtract(f.multiply(2*this.dot(f))); + } + mix(v, a) { + return new Vec3( + this.x+(v.x-this.x)*a, + this.y+(v.y-this.y)*a, + this.z+(v.z-this.z)*a + ); + } + min(v) { + return new Vec3( + Math.min(this.x, v.x), + Math.min(this.y, v.y), + Math.min(this.z, v.z) + ); + } + max(v) { + return new Vec3( + Math.max(this.x, v.x), + Math.max(this.y, v.y), + Math.max(this.z, v.z) + ); + } + //smoothStep(min, max) { + // let x = Math.max(0, Math.min(1, (this.x-min.x)/(max.x-min.x))); + // let y = Math.max(0, Math.min(1, (this.y-min.y)/(max.y-min.y))); + // let z = Math.max(0, Math.min(1, (this.z-min.z)/(max.z-min.z))); + // return new Vec3(x*x*(3-2*x), y*y*(3-2*y), z*z*(3-2*z)); + //} + toString(){ + return this.x+' '+this.y+' '+this.z; + } + toJSONString(){ + return this.toString(); + } +} +class Vec4 { + constructor(x,y,z,w){ + if(typeof x === 'string'){ + x=x.split(' '); + this.x=parseFloat(x[0]); + this.y=parseFloat(x[1]); + this.z=parseFloat(x[2]); + this.w=parseFloat(x[3]); + }else if(x instanceof Vec4){ + this.x=x.x; + this.y=x.y; + this.z=x.z; + this.w=x.w; + }else if(x instanceof Vec3){ + this.x=x.x; + this.y=x.y; + this.z=x.z; + this.w=0; + }else if(x instanceof Vec2){ + this.x=x.x; + this.y=x.y; + this.z=0; + this.w=0; + }else if(typeof x!=='undefined'){ + this.x=x; + this.y=(typeof y==='number')?y:x; + this.z=(typeof z==='number')?z:((typeof y==='number')?0:x); + this.w=(typeof w==='number')?w:((typeof z==='number')?z:((typeof y==='number')?0:x)); + }else{ + this.x=this.y=this.z=this.w=0; + } + } + toString(){ + return this.x+' '+this.y+' '+this.z+' '+this.w; + } + toJSONString(){ + return this.toString(); + } +} +class Mat4 { + constructor(){ + this.m = [1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1]; + } + toString(){ + return this.m[0]+' '+this.m[1]+' '+this.m[2]+' '+this.m[3]+' '+ + this.m[4]+' '+this.m[5]+' '+this.m[6]+' '+this.m[7]+' '+ + this.m[8]+' '+this.m[9]+' '+this.m[10]+' '+this.m[11]+' '+ + this.m[12]+' '+this.m[13]+' '+this.m[14]+' '+this.m[15]; + } + translation(v){ + if(v instanceof Vec3){ + this.m[12]=v.x; + this.m[13]=v.y; + this.m[14]=v.z; + return this; + }else if(v instanceof Vec2){ + this.m[12]=v.x; + this.m[13]=v.y; + this.m[14]=0; + return this; + }else{ + return new Vec3(this.m[12], this.m[13], this.m[14]); + } + } + right(){ + return new Vec3(this.m[0], this.m[1], this.m[2]); + } + up(){ + return new Vec3(this.m[4], this.m[5], this.m[6]); + } + forward(){ + return new Vec3(this.m[8], this.m[9], this.m[10]); + } + toJSONString(){ + return this.toString(); + } +} +class Mat3 { + constructor(){ + this.m = [1, 0, 0, + 0, 1, 0, + 0, 0, 1]; + } + toString(){ + return this.m[0]+' '+this.m[1]+' '+this.m[2]+' ' + this.m[3]+' '+this.m[4]+' '+this.m[5]+' ' + this.m[6]+' '+this.m[7]+' '+this.m[8]; + } + translation(v){ + if(v instanceof Vec2){ + this.m[6]=v.x; + this.m[7]=v.y; + return this; + }else{ + return new Vec2(this.m[6], this.m[7]); + } + } + angle(){ + return Math.atan2(this.m[0], -this.m[1]) * (180.0 / Math.PI); + } + toJSONString(){ + return this.toString(); + } +} +class MediaPlaybackEvent { + static PLAYBACK_STOPPED = 0 + static PLAYBACK_PLAYING = 1 + static PLAYBACK_PAUSED = 2 +} +function stringifyAdapter(key, value){ + if (value && value.toJSONString){ + return value.toJSONString(); + } + return value; +} +this._Vec2 = Vec2.prototype; +this._Vec3 = Vec3.prototype; +this._Vec4 = Vec4.prototype; +this._Mat4 = Mat4.prototype; +this._Mat3 = Mat3.prototype; +this._Internal = { + updateScriptProperties(script, vars) { + vars = JSON.parse(vars); + Object.keys(vars).forEach((key) => { + if (script.scriptProperties.hasOwnProperty(key)) { + if (script.scriptProperties[key] instanceof Vec3){ + script.scriptProperties[key] = new Vec3(vars[key]); + } else { + script.scriptProperties[key] = vars[key]; + } + } + }); + }, + convertUserProperties(p) { + p = JSON.parse(p); + let r = {}; + for (var k in p) { + switch (p[k].type){ + default: + r[k] = p[k].value; + break; + case 'color': + r[k] = new Vec3(p[k].value); + break; + } + } + return r; + }, + stringifyConfig(obj) { + return JSON.stringify(obj, stringifyAdapter); + } +}; +this.createScriptProperties=function(){ + var vars={}; + var obj = { + order: 0, + addSlider: function(options){ + vars[options.name] = options.value; + vars[options.name + '_config'] = { order: obj.order++, label: options.label, + min: options.min, max: options.max, mode: (options.integer===true)?'int':undefined }; + return obj; + }, + addCheckbox: function(options){ + vars[options.name] = options.value; + vars[options.name + '_config'] = { order: obj.order++, label: options.label }; + return obj; + }, + addText: function(options){ + vars[options.name] = options.value; + vars[options.name + '_config'] = { order: obj.order++, label: options.label }; + return obj; + }, + addCombo: function(options){ + vars[options.name] = options.options[0].value; + vars[options.name + '_config'] = { order: obj.order++, label: options.label, options: options.options, mode: 'combo' }; + return obj; + }, + addColor: function(options){ + vars[options.name] = options.value; + vars[options.name + '_config'] = { order: obj.order++, label: options.label }; + return obj; + }, + finish: function(){return vars;} + }; + return obj; +} +this.shared = {}; diff --git a/modules/wallpaper-engine/scripts/jsmodules/wecolor.js b/modules/wallpaper-engine/scripts/jsmodules/wecolor.js new file mode 100644 index 0000000..8c3a9d7 --- /dev/null +++ b/modules/wallpaper-engine/scripts/jsmodules/wecolor.js @@ -0,0 +1,47 @@ +'use strict'; + +export function rgb2hsv(r) { + var g, b; + g = r.y, b = r.z, r = r.x; + var max = Math.max(r, g, b), min = Math.min(r, g, b), + d = max - min, + h, + s = (max === 0 ? 0 : d / max), + v = max; + + switch (max) { + case min: h = 0; break; + case r: h = (g - b) + d * (g < b ? 6: 0); h /= 6 * d; break; + case g: h = (b - r) + d * 2; h /= 6 * d; break; + case b: h = (r - g) + d * 4; h /= 6 * d; break; + } + + return new Vec3(h, s, v); +} + +export function hsv2rgb(h) { + var r, g, b, i, f, p, q, t, s, v; + s = h.y, v = h.z, h = h.x; + i = Math.floor(h * 6); + f = h * 6 - i; + p = v * (1 - s); + q = v * (1 - f * s); + t = v * (1 - (1 - f) * s); + switch (i % 6) { + case 0: r = v, g = t, b = p; break; + case 1: r = q, g = v, b = p; break; + case 2: r = p, g = v, b = t; break; + case 3: r = p, g = q, b = v; break; + case 4: r = t, g = p, b = v; break; + case 5: r = v, g = p, b = q; break; + } + return new Vec3(r, g, b); +} + +export function normalizeColor(color) { + return new Vec3(color.x / 255, color.y / 255, color.z / 255); +} + +export function expandColor(color) { + return new Vec3(color.x * 255, color.y * 255, color.z * 255); +} diff --git a/modules/wallpaper-engine/scripts/jsmodules/wemath.js b/modules/wallpaper-engine/scripts/jsmodules/wemath.js new file mode 100644 index 0000000..b8f519b --- /dev/null +++ b/modules/wallpaper-engine/scripts/jsmodules/wemath.js @@ -0,0 +1,13 @@ +'use strict'; + +export let deg2rad = Math.PI / 180; +export let rad2deg = 180 / Math.PI; + +export function smoothStep(min, max, v) { + let x = Math.max(0, Math.min(1, (v-min)/(max-min))); + return x*x*(3-2*x); +}; + +export function mix(a, b, v) { + return a+(b-a)*v; +}; diff --git a/modules/wallpaper-engine/scripts/jsmodules/wevector.js b/modules/wallpaper-engine/scripts/jsmodules/wevector.js new file mode 100644 index 0000000..1026160 --- /dev/null +++ b/modules/wallpaper-engine/scripts/jsmodules/wevector.js @@ -0,0 +1,15 @@ +'use strict'; + +import * as WEMath from 'WEMath'; + +export function angleVector2(angle) { + angle = angle * WEMath.deg2rad; + return new Vec2( + Math.cos(angle), + Math.sin(angle) + ); +} + +export function vectorAngle2(direction) { + return Math.atan2(direction.y, direction.x) * WEMath.rad2deg; +} diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11fallback.frag b/modules/wallpaper-engine/shaders/HLSL/dx11fallback.frag new file mode 100644 index 0000000..67fbc54 --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11fallback.frag @@ -0,0 +1,17 @@ + +struct PS_OUTPUT +{ + float4 gl_FragColor : SV_TARGET; +}; + +struct VS_OUTPUT +{ + float4 gl_Position : SV_POSITION; +}; + +PS_OUTPUT main(VS_OUTPUT IN) +{ + PS_OUTPUT OUT; + OUT.gl_FragColor = float4(0.5, 0, 0, 1); + return OUT; +} diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11fallback.vert b/modules/wallpaper-engine/shaders/HLSL/dx11fallback.vert new file mode 100644 index 0000000..90ce405 --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11fallback.vert @@ -0,0 +1,24 @@ + +struct VS_INPUT +{ + float3 a_Position : POSITION; +}; + +struct VS_OUTPUT +{ + float4 gl_Position : SV_POSITION; +}; + +cbuffer g_bufDynamic:register(b1) +{ + const float4x4 g_ModelViewProjectionMatrix; +} + +VS_OUTPUT main(VS_INPUT IN) +{ + VS_OUTPUT OUT; + + OUT.gl_Position = mul(float4(IN.a_Position, 1.0), g_ModelViewProjectionMatrix); + + return OUT; +} diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11playlistgaussian.frag b/modules/wallpaper-engine/shaders/HLSL/dx11playlistgaussian.frag new file mode 100644 index 0000000..b8a00c7 --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11playlistgaussian.frag @@ -0,0 +1,40 @@ +struct PS_OUTPUT +{ + float4 gl_FragColor : SV_TARGET; +}; + +struct VS_OUTPUT +{ + float4 gl_Position : SV_POSITION; + float2 v_TexCoord : TEXCOORD0; +}; + +Texture2D g_Texture0:register(t0); +SamplerState g_Texture0SamplerState:register(s0); + +static float weight[3][3] = {{21.0 / 256.0, 31.0 / 256.0, 21.0 / 256.0}, + {31.0 / 256.0, 48.0 / 256.0, 31.0 / 256.0}, + {21.0 / 256.0, 31.0 / 256.0, 21.0 / 256.0}}; + +PS_OUTPUT main(VS_OUTPUT IN) +{ + float3 color = (float3)0.0; + + float w; + float h; + g_Texture0.GetDimensions(w, h); + float2 uvd = 3.333 / float2(w, h); + + for (int x = 0; x < 3; ++x) + { + for (int y = 0; y < 3; ++y) + { + color += g_Texture0.SampleLevel(g_Texture0SamplerState, IN.v_TexCoord + float2(x - 1, y - 1) * uvd, 0.0).rgb * weight[x][y]; + } + } + + PS_OUTPUT OUT; + OUT.gl_FragColor.rgb = color; + OUT.gl_FragColor.a = 1.0; + return OUT; +} diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11playlistgaussian.vert b/modules/wallpaper-engine/shaders/HLSL/dx11playlistgaussian.vert new file mode 100644 index 0000000..73b6a8f --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11playlistgaussian.vert @@ -0,0 +1,21 @@ +struct VS_INPUT +{ + float3 a_Position : POSITION; + float2 v_TexCoord : TEXCOORD0; +}; + +struct VS_OUTPUT +{ + float4 a_Position : SV_POSITION; + float2 v_TexCoord : TEXCOORD0; +}; + +VS_OUTPUT main(VS_INPUT IN) +{ + VS_OUTPUT OUT; + + OUT.a_Position = float4(IN.a_Position, 1.0); + OUT.v_TexCoord = IN.v_TexCoord; + + return OUT; +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.frag b/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.frag new file mode 100644 index 0000000..8304ed4 --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.frag @@ -0,0 +1,810 @@ +struct VS_OUTPUT +{ + float4 v_Position : SV_POSITION; + float2 v_TexCoord : TEXCOORD0; +#if FADEEFFECT == 23 + float2 v_TexCoordBase : TEXCOORD1; + float3 v_WorldPos : TEXCOORD2; + float3 v_WorldNormal : TEXCOORD3; +#endif +}; + +struct PS_OUTPUT +{ + float4 p_FragColor : SV_TARGET; +}; + +Texture2D g_Texture0:register(t0); +Texture2D g_Texture0MipMapped:register(t0); +Texture2D g_Texture1Noise:register(t1); +Texture2D g_Texture2Clouds:register(t2); + +SamplerState g_Texture0SamplerState:register(s0); +SamplerState g_Texture0SamplerStateWrap:register(s1); + +cbuffer g_bufDynamic:register(b0) +{ + const float g_Progress; + const float g_Hash; + const float g_Hash2; + const float g_Random; + + const float g_AspectRatio; + const float g_Width; + const float g_Height; + + const float4x4 g_ViewProjection; + const float4x4 g_ViewProjectionInv; +} + +float2 rotateFloat2(float2 v, float r) +{ + float2 cs = float2(cos(r), sin(r)); + return float2(v.x * cs.x - v.y * cs.y, v.x * cs.y + v.y * cs.x); +} + +float3 mod289(float3 x) { + return x - floor(x * (1.0 / 289.0)) * 289.0; +} + +float2 mod289(float2 x) { + return x - floor(x * (1.0 / 289.0)) * 289.0; +} + +float3 permute(float3 x) { + return mod289(((x*34.0)+10.0)*x); +} + +float snoise(float2 v) +{ + const float4 C = float4(0.211324865405187, + 0.366025403784439, + -0.577350269189626, + 0.024390243902439); + float2 i = floor(v + dot(v, C.yy) ); + float2 x0 = v - i + dot(i, C.xx); + + float2 i1; + i1 = (x0.x > x0.y) ? float2(1.0, 0.0) : float2(0.0, 1.0); + float4 x12 = x0.xyxy + C.xxzz; + x12.xy -= i1; + + i = mod289(i); + float3 p = permute( permute( i.y + float3(0.0, i1.y, 1.0 )) + + i.x + float3(0.0, i1.x, 1.0 )); + + float3 m = max(0.5 - float3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0); + m = m*m ; + m = m*m ; + + float3 x = 2.0 * frac(p * C.www) - 1.0; + float3 h = abs(x) - 0.5; + float3 ox = floor(x + 0.5); + float3 a0 = x - ox; + + m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); + + float3 g; + g.x = a0.x * x0.x + h.x * x0.y; + g.yz = a0.yz * x12.xz + h.yz * x12.yw; + return 127.0 * dot(m, g); +} + +float4 mod289(float4 x) { + return x - floor(x * (1.0 / 289.0)) * 289.0; +} + +float4 permute(float4 x) { + return mod289(((x*34.0)+10.0)*x); +} + +float4 taylorInvSqrt(float4 r) +{ + return 1.79284291400159 - 0.85373472095314 * r; +} + +float snoise(float3 v) +{ + const float2 C = float2(1.0/6.0, 1.0/3.0) ; + const float4 D = float4(0.0, 0.5, 1.0, 2.0); + + float3 i = floor(v + dot(v, C.yyy) ); + float3 x0 = v - i + dot(i, C.xxx) ; + + float3 g = step(x0.yzx, x0.xyz); + float3 l = 1.0 - g; + float3 i1 = min( g.xyz, l.zxy ); + float3 i2 = max( g.xyz, l.zxy ); + float3 x1 = x0 - i1 + C.xxx; + float3 x2 = x0 - i2 + C.yyy; + float3 x3 = x0 - D.yyy; + + i = mod289(i); + float4 p = permute(permute(permute( + i.z + float4(0.0, i1.z, i2.z, 1.0 )) + + i.y + float4(0.0, i1.y, i2.y, 1.0 )) + + i.x + float4(0.0, i1.x, i2.x, 1.0 )); + + float n_ = 0.142857142857; + float3 ns = n_ * D.wyz - D.xzx; + + float4 j = p - 49.0 * floor(p * ns.z * ns.z); + + float4 x_ = floor(j * ns.z); + float4 y_ = floor(j - 7.0 * x_ ); + + float4 x = x_ *ns.x + ns.yyyy; + float4 y = y_ *ns.x + ns.yyyy; + float4 h = 1.0 - abs(x) - abs(y); + + float4 b0 = float4( x.xy, y.xy ); + float4 b1 = float4( x.zw, y.zw ); + + float4 s0 = floor(b0)*2.0 + 1.0; + float4 s1 = floor(b1)*2.0 + 1.0; + float4 sh = -step(h, (float4)0.0); + + float4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ; + float4 a1 = b1.xzyw + s1.xzyw*sh.zzww ; + + float3 p0 = float3(a0.xy,h.x); + float3 p1 = float3(a0.zw,h.y); + float3 p2 = float3(a1.xy,h.z); + float3 p3 = float3(a1.zw,h.w); + + float4 norm = taylorInvSqrt(float4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3))); + p0 *= norm.x; + p1 *= norm.y; + p2 *= norm.z; + p3 *= norm.w; + + float4 m = max(0.5 - float4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0); + m = m * m; + return 105.0 * dot( m*m, float4( dot(p0,x0), dot(p1,x1), + dot(p2,x2), dot(p3,x3))); +} + +float fbm(in float2 st, const in int octaves) +{ + float value = 0.0; + float amplitude = .5; + float frequency = 0.; + for (int i = 0; i < octaves; i++) + { + value += amplitude * snoise(st); + st *= 2.; + amplitude *= .5; + } + return value; +} + +float nrand(float2 uv) +{ + return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453); +} + +float nrandFloorAspect(float2 uv, float scale) +{ + float2 aspectScale = scale * float2(g_AspectRatio, 1.0); + return nrand(floor(frac(uv + g_Hash) * aspectScale) / aspectScale); +} + +float3 blur13(float2 u, float2 d) +{ + float2 o1 = (float2)(1.4091998770852122) * d; + float2 o2 = (float2)(3.2979348079914822) * d; + float2 o3 = (float2)(5.2062900776825969) * d; + return g_Texture0.SampleLevel(g_Texture0SamplerState, u, 0.0).rgb * 0.1976406528809576 + + g_Texture0.SampleLevel(g_Texture0SamplerState, u + o1, 0.0).rgb * 0.2959855056006557 + + g_Texture0.SampleLevel(g_Texture0SamplerState, u - o1, 0.0).rgb * 0.2959855056006557 + + g_Texture0.SampleLevel(g_Texture0SamplerState, u + o2, 0.0).rgb * 0.0935333619980593 + + g_Texture0.SampleLevel(g_Texture0SamplerState, u - o2, 0.0).rgb * 0.0935333619980593 + + g_Texture0.SampleLevel(g_Texture0SamplerState, u + o3, 0.0).rgb * 0.0116608059608062 + + g_Texture0.SampleLevel(g_Texture0SamplerState, u - o3, 0.0).rgb * 0.0116608059608062; +} + +float drawGradient(float2 uvs, float2 start, float2 end, inout float distFromRay) +{ + float2 dir = end - start; + float2 delta = uvs - start; + float len = length(dir); + dir /= len; + + float distAlongRay = dot(dir, delta) / len; + distFromRay = abs(dot(float2(dir.y, -dir.x), delta)); + return distAlongRay; +} + +float4 PerformEffect(VS_OUTPUT IN, float2 texCoord, float progress) +{ + float4 color = float4(g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0).rgb, 1.0); + +#if FADEEFFECT == 0 +// Fade + color.a = 1.0 - progress; + color.rgb *= color.a; +#elif FADEEFFECT == 1 +// Mosaic + float r = nrandFloorAspect(texCoord, 50.0); + float smooth = 0.5; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - r)); + color.rgb *= color.a; +#elif FADEEFFECT == 2 +// Diffuse + float r = nrandFloorAspect(texCoord, 1000.0); + float smooth = 0.5; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - r)); + color.rgb *= color.a; +#elif FADEEFFECT == 3 +// Horizontal slide + texCoord.x -= progress; + color = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0); + color.a = step(0.0, texCoord.x); + color.rgb *= color.a; +#elif FADEEFFECT == 4 +// Vertical slide + texCoord.y -= progress; + color = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0); + color.a = step(0.0, texCoord.y); + color.rgb *= color.a; +#elif FADEEFFECT == 5 +// Horizontal fade + float smooth = 0.5; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - texCoord.x)); + color.rgb *= color.a; +#elif FADEEFFECT == 6 +// Vertical fade + float smooth = 0.5; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - texCoord.y)); + color.rgb *= color.a; +#elif FADEEFFECT == 7 +// Cloud blend + float2 noiseUV = texCoord * float2(g_AspectRatio, 1.0); + float r = fbm(noiseUV + g_Hash, 6); + r = smoothstep(-0.5, 0.5, r); + float smooth = 0.333; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - r)); + color.rgb *= color.a; +#elif FADEEFFECT == 8 +// Burnt paper + float2 noiseUV = texCoord * float2(g_AspectRatio, 1.0); + float r = fbm(noiseUV + g_Hash, 6); + r = smoothstep(-0.8, 1.0, r); + float rNoise = snoise(noiseUV * 55.333 * (0.5 + g_Progress) + g_Hash + g_Progress * 50.0); + rNoise = smoothstep(-1.5, 1.0, rNoise); + + float smooth = 0.00001; + float smoothDistort = 0.666; + float smoothDistortColor = 0.05; + float smoothDistortBurn = 0.5; + float smoothShadow = 0.1; + float rp = smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - r)); + float rpOffset = smoothstep(0.0, smoothDistort * progress, progress * (1.0 + smoothDistort) - r); + + float2 offset = float2(ddx(r), ddy(r)) * pow(rpOffset, 2.0) * -30.0; + color = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord + offset, 0.0); + + color.a = 1.0 - rp; + float shadow = (1.0 - step(0.01, color.a)) * smoothstep(smoothShadow * 2, smoothShadow, progress * (1.0 + smoothShadow) - r); + float colorOrangeAmt = smoothstep(0.0, smoothDistortColor * progress, progress * (1.0 + smoothDistortColor) - r) * step(shadow, 0.0); + float darkenSrc = smoothstep(smoothDistortBurn * (progress * 0.5), smoothDistortBurn * (progress * 0.8), progress * (1.0 + smoothDistortBurn) - r); + + color.rgb = lerp(color.rgb, color.rgb * 0.1 * float3(0.4, 0.03, 0.01), darkenSrc); + color.rgb = lerp(color.rgb, float3(1, 0.333, 0) * rNoise * 1.5, colorOrangeAmt); + color.a *= pow(1.0 - smoothstep(0.9, 1.0, progress), 0.5); + + color.rgb = lerp(color.rgb, (float3)0.0, step(0.001, shadow)); + color.a = max(color.a, pow(shadow, 2.0) * 0.5); + + float smoothDistortGlow = 0.05; + float glowAmt = smoothstep(0.0, smoothDistortGlow * progress, progress * (1.0 + smoothDistortGlow) - r) * + smoothstep(smoothDistortGlow * progress, 0.0, progress * (1.0 - smoothDistortGlow) - r); + glowAmt *= 1.0 - progress; + + glowAmt = max(0.0, glowAmt - colorOrangeAmt); + glowAmt = pow(glowAmt, 2.0); + color.a = max(glowAmt, color.a); + color.rgb += 2.0 * glowAmt * float3(1, 0.333, 0); + + color.rgb *= color.a; +#elif FADEEFFECT == 9 +// Circular blend + float2 delta = texCoord - float2(0.5, 0.5); + delta.x *= g_AspectRatio; + float dist = length(delta); + float smooth = 0.1; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - dist)); + color.rgb *= color.a; +#elif FADEEFFECT == 10 +// Zipper + float delta = texCoord.x - 0.5; + float offset = step(delta, 0.0) * 2.0 - 1.0; + float smoothY = 0.5; + float smooth = 0.333; + float side = step(0.5, texCoord.x); + float progressZipper = max(0.0, progress * (1.0 + smoothY) - texCoord.y * smoothY); + progressZipper = smoothstep(0.0, 1.0, pow(progressZipper, 2.0)); + + float2 uvs = texCoord; + uvs.x += offset * progressZipper * (0.5 + smooth); + + color = g_Texture0.SampleLevel(g_Texture0SamplerState, uvs, 0.0); + color.a = lerp(step(uvs.x, 0.5), step(0.5, uvs.x), side); + + float shadow = 1.0 - lerp(smoothstep(0.5, 0.5 + smooth, uvs.x), smoothstep(0.5, 0.5 - smooth, uvs.x), side); + color.rgb = lerp(color.rgb, (float3)0.0, step(shadow, 0.9999)); + color.a = max(color.a, shadow * 0.5); + color.rgb *= color.a; +#elif FADEEFFECT == 11 +// Door + float delta = texCoord.x - 0.5; + float offset = step(delta, 0.0) * 2.0 - 1.0; + float smooth = 0.333; + float side = step(0.5, texCoord.x); + + float2 uvs = texCoord; + uvs.x += offset * progress * (0.5 + smooth); + + color = g_Texture0.SampleLevel(g_Texture0SamplerState, uvs, 0.0); + color.a = lerp(step(uvs.x, 0.5), step(0.5, uvs.x), side); + + float shadow = 1.0 - lerp(smoothstep(0.5, 0.5 + smooth, uvs.x), smoothstep(0.5, 0.5 - smooth, uvs.x), side); + color.rgb = lerp(color.rgb, (float3)0.0, step(shadow, 0.9999)); + color.a = max(color.a, shadow * 0.5); + color.rgb *= color.a; +#elif FADEEFFECT == 12 +// Lines + float r = nrandFloorAspect(float2(0.0, texCoord.y), 100.0); + float smooth = 0.2; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - r)); + color.rgb *= color.a; +#elif FADEEFFECT == 13 +// Zoom + float2 deltaC = texCoord - float2(0.5, 0.5); + deltaC.x *= g_AspectRatio; + float dist = length(deltaC); + float smooth = 1.0; + float distortUVAmt = smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - dist)); + + float2 delta = texCoord - float2(0.5, 0.5); + delta.x *= g_AspectRatio; + texCoord -= (float2)0.5; + //texCoord *= 1.0 - distortUVAmt; + texCoord *= 1.0 - progress * 0.5 * distortUVAmt * 2.0; + texCoord += (float2)0.5; + color.rgb = (blur13(texCoord, progress * 50.0 * delta / g_Height) + blur13(texCoord, progress * 33.0 * delta / g_Height)) * 0.5; + color.a = 1.0 - progress; + color.rgb *= color.a; +#elif FADEEFFECT == 14 +// Drip vertical + float r = smoothstep(-0.5, 0.5, fbm(float2(texCoord.x * 10.0 + g_Hash, 0.0), 2)); + float2 uvs = texCoord; + + float smooth = 0.2; + uvs.y -= max(0.0, progress * (1.0 + smooth) - r * smooth); + uvs.y -= texCoord.y * progress; + color = g_Texture0.SampleLevel(g_Texture0SamplerState, uvs, 0.0); + //float r = nrandFloorAspect(float2(0.0, texCoord.y), 100.0); + color.a = step(0.0, uvs.y); // - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - r)); + + float shadow = smoothstep(-0.1333, 0.0, uvs.y); + color.rgb = lerp(color.rgb, (float)0.0, step(uvs.y, 0.0)); + color.a = max(color.a, shadow * (1.0 - progress)); + color.rgb *= color.a; +#elif FADEEFFECT == 15 +// Pixelate + float2 scale = floor((10.0 + g_Height * (1.0 - pow(abs(progress), 0.1))) * float2(g_AspectRatio, 1.0)); + color.a = 1.0 - smoothstep(0.7, 1.0, progress); + texCoord -= (float2)0.5; + texCoord *= scale; + texCoord = floor(texCoord); + texCoord /= scale; + texCoord += (float2)0.5; + color.rgb = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0).rgb; + color.rgb *= color.a; +#elif FADEEFFECT == 16 +// Bricks + color.a = 1.0; +#elif FADEEFFECT == 17 +// Paint + float2 noiseUV = texCoord * float2(g_AspectRatio, 1.0); + float h = (g_Hash - 0.5) * 0.1; + + float rayDist0; + float grad0 = drawGradient(texCoord, float2(-1, -0.2 + h), float2(1, 0.15 + h), rayDist0); + grad0 *= step(rayDist0, 0.4); + + float rayDist1; + float grad1 = drawGradient(texCoord, float2(1.5, 0.1 + h), float2(0, 0.53 + h), rayDist1); + grad1 *= step(rayDist1, 0.4); + + float rayDist2; + float grad2 = drawGradient(texCoord, float2(-0.5, 0.6 + h), float2(1.2, 0.8 + h), rayDist2); + grad2 *= step(rayDist2, 0.4); + + grad0 = saturate(grad0); + grad1 = saturate(grad1); + grad2 = saturate(grad2); + + float v0 = grad0 * 0.25; + v0 = step(0.001, v0); + float v1 = grad1 * 0.25; + v1 = step(0.001, v1); + float v2 = grad2 * 0.25; + v2 = step(0.001, v2); + + float l0 = grad0 * 0.25; + float l1 = (0.333 + grad1 * 0.25); + float l2 = (0.666 + grad2 * 0.333); + + float r = fbm(noiseUV * 10.0 + g_Hash, 8); + r = smoothstep(-1.0, 1.0, r); + float rs = fbm(noiseUV * 10.0 + g_Hash, 3); + rs = smoothstep(-1.0, 1.0, rs); + progress += r * 0.02; + + float mask0 = step(rayDist0, 0.4 - r * 0.1); + float mask1 = step(rayDist1, 0.4 - r * 0.1); + float mask2 = step(rayDist2, 0.4 - r * 0.1); + + float shadowMask0 = max(0.0, smoothstep(0.03, 0.0, max(0.0, rayDist0 - (0.4 - rs * 0.1))) - mask0); + float shadowMask1 = max(0.0, smoothstep(0.03, 0.0, max(0.0, rayDist1 - (0.4 - rs * 0.1))) - mask1); + float shadowMask2 = max(0.0, smoothstep(0.03, 0.0, max(0.0, rayDist2 - (0.4 - rs * 0.1))) - mask2); + + float f0 = v0 * step(l0, progress) * mask0; + float f0S = v0 * step(l0, progress) * shadowMask0; + float f1 = v1 * step(l1, progress) * mask1; + float f1S = v1 * step(l1, progress) * shadowMask1; + float f2 = v2 * step(l2, progress) * mask2; + float f2S = v2 * step(l2, progress) * shadowMask2; + + float v = max(f0, max(f1, f2)); + float vS = max(f0S, max(f1S, f2S)); + vS = lerp(vS, 0.0, f1); + vS = lerp(vS, 0.0, f2); + + color.rgb = lerp(color.rgb, color.rgb * 0.333, vS); + color.a = 1.0 - v; + color.rgb *= color.a; +#elif FADEEFFECT == 18 +// Fade to black + color.rgb *= smoothstep(0.5, 0.0, progress); + color.a = smoothstep(1.0, 0.5, progress); +#elif FADEEFFECT == 19 +// Twister + float2 delta = texCoord - float2(0.5, 0.5); + delta.x *= g_AspectRatio; + float dist = length(delta); + float smooth = 0.1; + color.a = 1.0 - smoothstep(0.0, smooth, max(0.0, progress * (1.0 + smooth) - dist)); + + delta.x /= g_AspectRatio; + float smoothTwist = 0.5; + float twistAmt = smoothstep(0.0, smoothTwist, max(0.0, progress * (1.0 + smoothTwist) - dist)); + delta /= 1.0 + twistAmt; + texCoord = float2(0.5, 0.5) + rotateFloat2(delta, progress * 20.0 * twistAmt); + color.rgb = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0).rgb; + + color.rgb *= color.a; +#elif FADEEFFECT == 20 +// Black hole + float holeSize = smoothstep(0, 0.8, progress) * smoothstep(1.0, 0.8, progress); + float noiseAmt = 0.01 * smoothstep(0.95, 0.8, progress); + float2 noiseOffset = float2(snoise((float2)progress * 100), g_AspectRatio * snoise((float2)(progress * 100 + g_Hash))); + float2 center = float2(0.5, 0.5) + holeSize * noiseAmt * noiseOffset; + float2 delta = texCoord - center; + + float dist = length(delta * float2(g_AspectRatio, 1.0)); + float holeAmt = smoothstep(holeSize * 0.05, holeSize * 0.04, dist); + + // Sample distorted frame + texCoord -= float2(0.5, 0.5); + float smoothDistort = 1.0; + float distortAmt = pow(smoothstep(0.0, smoothDistort, max(0.0, (progress * 0.97) * (smoothDistort))), 2.0); + texCoord *= (1.0 + (1.0 / length(delta)) * distortAmt); + + float angle = progress * 4 * pow(smoothstep(holeSize * 0.2, 0.0, dist), 2.0); + angle = lerp(angle, -angle, step(0.5, g_Hash)); + texCoord = rotateFloat2(texCoord, angle); + + texCoord += float2(0.5, 0.5); + color.r = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0).r; + color.g = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord - angle * 0.04, 0.0).g; + color.b = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord + angle * 0.04, 0.0).b; + + float2 shadowDelta = texCoord - float2(0.5, 0.5); + float shadowAngle = atan2(shadowDelta.y, -shadowDelta.x); + float shadowAmt = abs(dot(float2(1.0, 0.0), shadowDelta)) * sin(shadowAngle * 6.0); + color.rgb = lerp(color.rgb, (float3)0.0, pow(shadowAmt, 2.0) * distortAmt * 4.0); + + color.a = step(0.0, texCoord.x) * step(texCoord.x, 1.0) * + step(0.0, texCoord.y) * step(texCoord.y, 1.0); + delta = texCoord - center; + color.a *= step(dot(delta, delta), 0.5); + color.a *= step(progress, 0.9); + color.rgb *= color.a; + + // Apply hole color + float holeCornea = smoothstep(holeSize * 0.03, holeSize * 0.05, dist); + float3 colorOuter = color.rgb; + color.rgb = lerp(color.rgb, (float3)0.0, holeAmt); + color.rgb = lerp(color.rgb, pow(colorOuter, (float3)2.0), holeAmt * holeCornea); + color.a = max(color.a, holeAmt); +#elif FADEEFFECT == 21 +// CRT + float2 texCoordOrig = texCoord; + texCoord -= (float2)0.5; + texCoord.y *= (1.0 + pow(smoothstep(0.2, 0.6, progress), 2.0) * g_Height * 0.5); + texCoord.x *= (1.0 - pow(smoothstep(0.05, 0.25, progress), 2.0) * 0.8); + texCoord.x *= (1.0 + pow(smoothstep(0.4, 0.8, progress), 2.0) * g_Width * 0.25); + texCoord += (float2)0.5; + + float scroll = smoothstep(0.0, 0.1, progress) * smoothstep(0.2, 0.1, progress) * 0.2; + scroll -= pow(smoothstep(0.1, 0.4, progress), 1.4) * 5.0; + float amtGlowWhite = smoothstep(0.1, 0.4, progress); + float fadeBlack = smoothstep(0.7, 0.81, progress); + float amtOutsideBounds = saturate(step(texCoord.y, 0.0) + step(1.0, texCoord.y) + + step(texCoord.x, 0.0) + step(1.0, texCoord.x) + + fadeBlack); + + float2 texCoordPreScroll = texCoord; + texCoord.y = frac(texCoord.y + scroll); + float chroma = pow(smoothstep(0.07, 0.2, progress), 2.0); + float chromaMax = 0.04; //0.02; + float mip = smoothstep(0.1, 0.3, progress) * 4.0; + color.rgb = float3(g_Texture0MipMapped.SampleLevel(g_Texture0SamplerState, texCoord, mip).r, + g_Texture0MipMapped.SampleLevel(g_Texture0SamplerState, texCoord + float2(0, chromaMax * chroma), mip).g, + g_Texture0MipMapped.SampleLevel(g_Texture0SamplerState, texCoord + float2(0, -chromaMax * chroma), mip).b); + color.a = smoothstep(1.0, 0.7, progress); + + float smoothFade = 15.0; + float amtOutsideGlow = amtOutsideBounds * (smoothstep(smoothFade, 1.0, texCoordPreScroll.y) * smoothstep(-smoothFade, 0.0, texCoordPreScroll.y)); + amtOutsideGlow *= smoothstep(smoothFade, 1.0, texCoordPreScroll.x) * smoothstep(-smoothFade, 0.0, texCoordPreScroll.x); + amtOutsideGlow = pow(amtOutsideGlow, 4.0); + + float3 outsideColor = snoise(float3(texCoordOrig * float2(g_AspectRatio, 1.0) * 100.0, progress * 10.0)); + outsideColor = smoothstep((float3)-1.0, (float3)1.0, outsideColor) * smoothstep(0.5, 0.4, progress) * 0.1 * + smoothstep(0.5, 0.0, abs(texCoordOrig.y - 0.5)); + + color.rgb = lerp(color.rgb, (float3)0.666, amtGlowWhite); + color.rgb = lerp(color.rgb, outsideColor, amtOutsideBounds); + color.rgb = lerp(color.rgb, float3(0.25, 0.27, 0.33), amtOutsideGlow * (1.0 - fadeBlack)); + color.rgb *= color.a; + + //color = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoordOrig, 4.0); +#elif FADEEFFECT == 22 +// Radial wipe + float2 delta = texCoord - float2(0.5, 0.5); + float angle = (atan2(-delta.x, delta.y) + 3.141) / 6.283; + float smooth = 0.02; + float shadowSmooth = 0.1; + + progress *= 1.0 + smooth; + color.a = smoothstep(progress - smooth, progress, angle); + color.rgb *= color.a; +#elif FADEEFFECT == 23 +// Glass shatter + color.r = g_Texture0.SampleLevel(g_Texture0SamplerState, frac(texCoord), 0.0).r; + color.g = g_Texture0.SampleLevel(g_Texture0SamplerState, frac(IN.v_TexCoordBase), 0.0).g; + color.b = g_Texture0.SampleLevel(g_Texture0SamplerState, frac(texCoord - (IN.v_TexCoordBase - texCoord)), 0.0).b; + + float3 lightDir = float3(0.707, -0.707, 0.0); + float3 worldNormal = normalize(IN.v_WorldNormal); + float3 eyeVector = float3(0, 0, 0) - IN.v_WorldPos; + float specular = max(0.0, dot(normalize(eyeVector + lightDir), worldNormal)); + specular = pow(specular, 4.0); + + float light = dot(lightDir, worldNormal) + 1.0; + light = pow(light, 1.0); + color.rgb *= light; + color.rgb += (float3)specular * 2.0; + + color.a = smoothstep(1.0, 0.9, g_Progress); + color.rgb *= color.a; +#elif FADEEFFECT == 24 +// Bullets + float2 center = float2(0.25 + 0.5 * g_Hash, 0.25 + 0.5 * g_Hash2); + + float shakeTimer = smoothstep(0.05, 0.2, progress); + float shakeTimerOct = smoothstep(0.05, 0.5, progress); + float motionTimer = smoothstep(0.4, 1.0, progress); + float impactTimer = smoothstep(0.0, 0.1, progress); + float blackBlendTimer = smoothstep(0.8, 0.7, progress); + float alphaTimer = smoothstep(1.0, 0.9, progress); + float shakeTranslationBlend = smoothstep(0.05, 0.1, progress) * smoothstep(0.4, 0.05, progress) + smoothstep(0.6, 0.8, progress) * smoothstep(0.9, 0.8, progress); + + shakeTimerOct = pow(shakeTimerOct, 0.2); + + float2 zoomDelta = texCoord - center; + float2 zoomDeltaReference = zoomDelta; + zoomDelta.x *= g_AspectRatio; + zoomDelta = rotateFloat2(zoomDelta, shakeTimerOct * 0.4 * g_Hash2 * lerp(1,-1,step(0.5, g_Hash)) + shakeTimer * (1.0 - shakeTimer) * 0.3 * sin(shakeTimer * 4)); + zoomDelta.x /= g_AspectRatio; + + float2 shakeNoise = float2(snoise(float2(progress * 10.0, 0.0)), snoise(float2(progress * 10.0, 10.0))) * 0.02 * shakeTranslationBlend; + zoomDelta *= 1.0 - motionTimer; + zoomDelta *= 1.0 - shakeTimerOct * 0.05; + zoomDelta += shakeNoise; + + zoomDeltaReference *= 1.0 - motionTimer; + zoomDeltaReference *= 1.0 - shakeTimerOct * 0.05; + zoomDeltaReference += shakeNoise; + float2 centerMotion = (center - float2(0.5, 0.5)) * (motionTimer) * (1.0 - motionTimer); + texCoord = center + zoomDelta + centerMotion; + float2 texCoordUnrotated = center + zoomDeltaReference + centerMotion; + + float2 texCoordSkewed = texCoord; + texCoordSkewed = texCoordSkewed * (fbm(texCoord * float2(g_AspectRatio, 1.0) * 7.0 + g_Hash, 4) * 0.02 + 1.0); + + float2 delta = texCoordSkewed - center; + delta.x *= g_AspectRatio; + + float distance = length(delta); + float distanceOriginal = distance; + distance = pow(distance, 0.3); + float angle = atan2(delta.x, -delta.y) + g_Hash * 99; + + float y = distance * 10.0; + + angle = angle * 10.0; + float testOffset1 = snoise(float2(floor(angle), y * 0.4)); + float testOffset2 = snoise(float2(floor(angle) + 1.0, y * 0.4)); + float testOffset = lerp(testOffset1, testOffset2, frac(angle)); + + float blend1 = snoise(float2(floor(angle), 0.0)); + float blend2 = snoise(float2(floor(angle) + 1.0, 0.0)); + float blend = lerp(blend1, blend2, frac(angle)); + blend = smoothstep(0.5, 0.2, blend); + + float patternDistance = pow(max(0.0, distance - 0.25), 0.1) * 3.0; + float test = sin(patternDistance * 40.0 + testOffset * distance * 2.0); + float origFlow = test; + test = abs(test); + test = pow(test, 8.0 + 10.0 * testOffset); + test = smoothstep(0.0, 0.2 + 0.8 * testOffset, test); + + float baseOpacity = smoothstep(0.01, 0.017, distanceOriginal) * + smoothstep(0.2, 0.01, distanceOriginal); + baseOpacity = pow(baseOpacity, 4.0) * impactTimer; + + // Fade out + blend *= smoothstep(0.6 * impactTimer, 0.3 * impactTimer, distance - saturate(1.0 - testOffset) * 0.2); + + // Fade in + blend *= smoothstep(0.25, 0.3, distance); + + baseOpacity *= 1.0 - snoise(texCoordSkewed * 10.0 + g_Hash) * (1.0 - abs(origFlow * 2.0 - 1.0)) * 2; + + float gradx = ddx(test + testOffset); + float grady = ddy(test + testOffset); + + float r = fbm(float2(angle * 0.3, y * 0.4), 3); + r = smoothstep(-0.5, 0.5, r); + + float blackCenter = smoothstep(0.017, 0.01, distanceOriginal) * impactTimer; + color.a = alphaTimer * lerp(1.0, blackBlendTimer, blackCenter); + + color.rgb = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord + float2(gradx, -grady) * blend, 0.0).rgb; + color.rgb = lerp(color.rgb, (0.7 + r) * float3(0.8, 0.85, 1.0), (pow(test * blend * r, 2.0) + baseOpacity - blend * (abs(gradx) - abs(grady)))); + color.rgb = lerp(color.rgb, (float3)0.0, blackCenter); + + float2 flareDelta = texCoordUnrotated - center; + flareDelta.x *= g_AspectRatio; + float flareTimerFade = smoothstep(0.0, 0.1, progress); + flareDelta.x *= pow(flareTimerFade, 0.1); + flareTimerFade = flareTimerFade * (1.0 - flareTimerFade); + flareDelta.y /= pow(flareTimerFade, 0.5) + 0.00001; + float flare = 1.0 - length(flareDelta); + flare *= flareTimerFade; + flare = saturate(flare); + flare = pow(flare * 4.0, 2.0); + color.rgb *= (float3)(1.0) + flare * float3(1.0, 0.7, 0.2); + + color.rgb *= color.a; +#elif FADEEFFECT == 25 +// Ice + float freezeOutTimer = pow(smoothstep(1.0, 0.5, progress), 2); + float freezeTimer = (smoothstep(0.0, 0.2, progress) * 0.333 + smoothstep(0.25, 0.5, progress) * 0.667) * freezeOutTimer; + float fadeTimer = smoothstep(1.0, 0.95, progress); + + float2 center = (float2)0.5; + float2 delta = texCoord - center; + delta.x *= g_AspectRatio; + float distance = length(delta) / max(g_AspectRatio, 1.0); + + float noise = fbm(texCoord * float2(g_AspectRatio, 1.0) * 2.0 + g_Hash, 8) * 0.5 + 0.5; + float rift = fbm(texCoord * float2(g_AspectRatio, 1.0) * 3.0 + g_Hash2, 8) * 0.5 + 0.5; + rift = smoothstep(0.4, 0.5, rift) * smoothstep(0.55, 0.5, rift); + + float blendTransition = 0.3; + float blendDistance = 0.9 - distance; + noise *= blendTransition + progress * 0.2 + smoothstep(0.3, 0.4, progress) * 0.1 + smoothstep(0.5, 0.6, progress) * 0.1; + noise *= 1.0 + rift * (0.5 + 0.5 * progress) * 0.05; + + float blendNoise = noise + rift * 0.1; + float blend = smoothstep(blendDistance - blendNoise * 0.51, blendDistance - blendNoise * 0.5, freezeTimer * (1.0 + blendTransition)); + + float mip = blend * 3.0 + blend * rift * 3.0; + float2 texCoordOffset = float2(ddx(noise), ddy(noise)) * 100.0; + texCoordOffset = pow(abs(texCoordOffset), 2.0) * sign(texCoordOffset); + texCoord += texCoordOffset * blend; + color.rgb = g_Texture0MipMapped.SampleLevel(g_Texture0SamplerState, texCoord, mip).rgb; + color.rgb *= 1.0 + length(texCoordOffset) * 3.0 * blend; + color.rgb += float3(0.6, 0.65, 1.0) * blend * noise * 4.0 * pow(distance + rift * 0.1, 2.0); + + texCoord += texCoordOffset * blend * 2.0; + float flashLine = smoothstep(progress - 0.4, progress - 0.27, texCoord.x * 0.1 + 0.2 - texCoord.y * 0.005); + flashLine = flashLine * (1.0 - flashLine) * 2.0; + float flashVert = abs(texCoord.y * 2.0 - 1.0); + flashLine *= flashVert; + float flashBlend = flashLine; + color.rgb += color.rgb * flashBlend * blend; + + color.a = max(blend, step(0.99, freezeOutTimer)) * fadeTimer; + color.rgb *= color.a; +#elif FADEEFFECT == 26 +// Boilover + //color = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0); + color.a = 1.0; + float blendRipple = smoothstep(0.0, 0.1, progress); + float blendUpscale = pow(smoothstep(0.8, 1.0, progress), 2.0); + float light = 1.0; + + for (int i = 0; i < 25; ++i) + { + //float2 centerOffset = float2(snoise(float2(i + g_Hash * 99, i * 99 + g_Hash2 * 33)), + // snoise(float2(i * 17 + g_Hash * 71, i * 22 + g_Hash2 * 17))); + float3 sharedNoise = g_Texture1Noise.SampleLevel(g_Texture0SamplerStateWrap, float2(i / 25.0 + g_Hash, i / 25.0 + g_Hash2), 0.0).rgb; + float2 centerOffset = sharedNoise.rg * 2.0 - 1.0; + float2 center = float2(0.5, 0.5) + centerOffset * 0.55; + + //float maxDist = 0.1 + (fbm(center * 99, 2) * 0.5 + 0.5) * 0.33 * progress + 0.5 * blendUpscale; + float maxDist = 0.1 + (g_Texture2Clouds.SampleLevel(g_Texture0SamplerStateWrap, center * 99, 0.0).r) * 0.33 * progress + 0.5 * blendUpscale; + //float timerOffset = (snoise(float2(i + g_Hash * 54, i * 41 + g_Hash2 * 87)) * 0.5 + 0.5) * 0.9; + float timerOffset = sharedNoise.b * 0.9; + float animTimer = smoothstep(timerOffset, timerOffset + 0.0001 + 0.5 * smoothstep(1.0, 0.9, progress), progress); + animTimer = pow(animTimer, 2.0); + + float2 delta = texCoord - center; + float2 deltaRef = delta; + delta.x *= g_AspectRatio; + float distance = length(delta); + + float rippleTimer = smoothstep(timerOffset - 0.5, timerOffset + 0.5, progress); + float ripplePos = distance; + ripplePos = smoothstep(ripplePos, ripplePos + 0.1, rippleTimer) * + smoothstep(ripplePos + 0.2, ripplePos + 0.1, rippleTimer); + + float2 rippleOffset = normalize(deltaRef) * -0.01 * ripplePos * blendRipple; + + float test = smoothstep(maxDist, 0.0, distance); + float anim = test * animTimer * 20.0; + + float angle = atan2(deltaRef.x, -deltaRef.y); + float mask = g_Texture2Clouds.SampleLevel(g_Texture0SamplerStateWrap, float2(angle * 0.25, (anim + progress) * 0.1), 0.0).r; + //float mask = fbm(float2(angle, anim + progress * 5.0), 3) * 0.5 + 0.5; + color.a *= step(anim, mask * 2.0); + + delta *= saturate(1.0 - anim); + delta.x /= g_AspectRatio; + float2 uvOffset = delta - deltaRef + rippleOffset; + texCoord += uvOffset; + + light += dot(normalize(float3(uvOffset, 1.0)), float3(-0.707, 0.707, 0.0)) * 10; + } + + color.a *= smoothstep(1.0, 0.9, progress); + + color.rgb = g_Texture0.SampleLevel(g_Texture0SamplerState, texCoord, 0.0).rgb * light; + //color.rgb = g_Texture2Clouds.SampleLevel(g_Texture0SamplerState, texCoord, 0.0).rgb; + color.rgb *= color.a; +#endif + return color; +} + +PS_OUTPUT main(VS_OUTPUT IN) +{ + PS_OUTPUT OUT; + OUT.p_FragColor = PerformEffect(IN, IN.v_TexCoord, g_Progress); + return OUT; +} diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.geom b/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.geom new file mode 100644 index 0000000..61ea7b7 --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.geom @@ -0,0 +1,162 @@ +struct GS_INPUT +{ + float4 a_Position : SV_POSITION; + float2 a_TexCoord : TEXCOORD0; +}; + +struct GS_OUTPUT +{ + float4 v_Position : SV_POSITION; + float2 v_TexCoord : TEXCOORD0; +}; + +cbuffer g_bufDynamic:register(b0) +{ + const float g_Progress; + const float g_Hash; + const float g_Hash2; + const float g_Random; + + const float g_AspectRatio; + const float g_Width; + const float g_Height; + + const float4x4 g_ViewProjection; + const float4x4 g_ViewProjectionInv; +} + +float2 rotateFloat2(float2 v, float r) +{ + float2 cs = float2(cos(r), sin(r)); + return float2(v.x * cs.x - v.y * cs.y, v.x * cs.y + v.y * cs.x); +} + +#if FADEEFFECT == 16 +// Bricks +#define BRICKS_PER_SET 7 +#define SET_COUNT 4 +float2 uvsFromInitialPosition(float2 initialPosition) +{ + float2 uvs = initialPosition * 0.5 + float2(0.5, 0.5); + uvs.y = 1.0 - uvs.y; + return uvs; +} + +void makeBrickGeom(float2 origin, float angle, float2 size, float2 uvOrigin, inout TriangleStream OutputStream) +{ + float2 halfSize = size * 0.5; + halfSize *= float2(g_AspectRatio, 1.0); + float2 halfSizeAnimX = rotateFloat2(float2(halfSize.x, 0.0), angle); + float2 halfSizeAnimY = rotateFloat2(float2(0.0, halfSize.y), angle); + halfSizeAnimX /= float2(g_AspectRatio, 1.0); + halfSizeAnimY /= float2(g_AspectRatio, 1.0); + + float2 anim00 = float2(origin.x, origin.y) - halfSizeAnimX - halfSizeAnimY; + float2 anim01 = float2(origin.x, origin.y) - halfSizeAnimX + halfSizeAnimY; + float2 anim10 = float2(origin.x, origin.y) + halfSizeAnimX - halfSizeAnimY; + float2 anim11 = float2(origin.x, origin.y) + halfSizeAnimX + halfSizeAnimY; + + float2 halfSizeUVS = size * 0.5; + float2 pos00 = float2(uvOrigin.x - halfSizeUVS.x, uvOrigin.y - halfSizeUVS.y); + float2 pos01 = float2(uvOrigin.x - halfSizeUVS.x, uvOrigin.y + halfSizeUVS.y); + float2 pos10 = float2(uvOrigin.x + halfSizeUVS.x, uvOrigin.y - halfSizeUVS.y); + float2 pos11 = float2(uvOrigin.x + halfSizeUVS.x, uvOrigin.y + halfSizeUVS.y); + + GS_OUTPUT OUT; + OUT.v_Position = float4(anim00, 0, 1); + OUT.v_TexCoord = uvsFromInitialPosition(pos00); + OutputStream.Append(OUT); + + OUT.v_Position = float4(anim01, 0, 1); + OUT.v_TexCoord = uvsFromInitialPosition(pos01); + OutputStream.Append(OUT); + + OUT.v_Position = float4(anim10, 0, 1); + OUT.v_TexCoord = uvsFromInitialPosition(pos10); + OutputStream.Append(OUT); + + OUT.v_Position = float4(anim11, 0, 1); + OUT.v_TexCoord = uvsFromInitialPosition(pos11); + OutputStream.Append(OUT); + + OutputStream.RestartStrip(); +} + +void makeBrick(float2 origin, float2 size, inout TriangleStream OutputStream) +{ + float animPosY = origin.y * 0.5 + 0.5; + float animPosX = origin.x * 0.5 + 0.5; + float fallDuration = 0.3; + float fallOffset = smoothstep(0.0, fallDuration, g_Progress * (1.0 + fallDuration * 1.5) - animPosY - animPosX * 0.2); + fallOffset = pow(fallOffset, 2.0); + + float2 animOrigin = origin; + animOrigin.y -= fallOffset * (animPosY + 0.2) * 2.6; + animOrigin.x += fallOffset * origin.x * 0.333; + + float angle = fallOffset * 3.0 * -origin.x; + + makeBrickGeom(animOrigin, angle, size, origin, OutputStream); +} + +[maxvertexcount(4 * BRICKS_PER_SET * SET_COUNT)] +void main(point GS_INPUT IN[1], inout TriangleStream OutputStream) +{ + float setHeight = 2.0 / (SET_COUNT); + float brickHeight = setHeight * 0.5; + float brickWidth = 2.0 * 0.333334; + float brickWidthHalf = brickWidth * 0.5; + float brickHeightHalf = brickHeight * 0.5; + + float2 pos = float2(-1.0, -1.0); + for (int set = 0; set < SET_COUNT; ++set) + { + // First row + pos.x = -1.0; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + pos.x += brickWidth; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + pos.x += brickWidth; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + // Second row + pos.x = -1.0 - brickWidthHalf; + pos.y += brickHeight; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + pos.x += brickWidth; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + pos.x += brickWidth; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + pos.x += brickWidth; + makeBrick(pos + float2(brickWidthHalf, brickHeightHalf), float2(brickWidth, brickHeight), OutputStream); + + pos.y += brickHeight; + } +} +#else +[maxvertexcount(4)] +void main(point GS_INPUT IN[1], inout TriangleStream OutputStream) +{ + GS_OUTPUT OUT; + OUT.v_Position = float4(-1, -1, 0, 1); + OUT.v_TexCoord = float2(0, 1); + OutputStream.Append(OUT); + + OUT.v_Position = float4(-1, 1, 0, 1); + OUT.v_TexCoord = float2(0, 0); + OutputStream.Append(OUT); + + OUT.v_Position = float4(1, -1, 0, 1); + OUT.v_TexCoord = float2(1, 1); + OutputStream.Append(OUT); + + OUT.v_Position = float4(1, 1, 0, 1); + OUT.v_TexCoord = float2(1, 0); + OutputStream.Append(OUT); +} +#endif diff --git a/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.vert b/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.vert new file mode 100644 index 0000000..c385b26 --- /dev/null +++ b/modules/wallpaper-engine/shaders/HLSL/dx11playlisttransition.vert @@ -0,0 +1,125 @@ +struct VS_INPUT +{ + float3 a_Position : POSITION; + float2 a_TexCoord : TEXCOORD0; +#if FADEEFFECT == 23 + float3 a_Center : TEXCOORD1; + float3 a_Normal : NORMAL; +#endif +}; + +struct VS_OUTPUT +{ + float4 v_Position : SV_POSITION; + float2 v_TexCoord : TEXCOORD0; +#if FADEEFFECT == 23 + float2 v_TexCoordBase : TEXCOORD1; + float3 v_WorldPos : TEXCOORD2; + float3 v_WorldNormal : TEXCOORD3; +#endif +}; + +cbuffer g_bufDynamic:register(b0) +{ + const float g_Progress; + const float g_Hash; + const float g_Hash2; + const float g_Random; + + const float g_AspectRatio; + const float g_Width; + const float g_Height; + + const float4x4 g_ViewProjection; + const float4x4 g_ViewProjectionInv; +} + +float nrand(float2 uv) +{ + return frac(sin(dot(uv, float2(12.9898, 78.233))) * 43758.5453); +} + +float2 rotateFloat2(float2 v, float r) +{ + float2 cs = float2(cos(r), sin(r)); + return float2(v.x * cs.x - v.y * cs.y, v.x * cs.y + v.y * cs.x); +} + +float4x4 rotation3d(float3 axis, float angle) +{ + axis = normalize(axis); + float s = sin(angle); + float c = cos(angle); + float oc = 1.0 - c; + + return float4x4( + oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0, + oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0, + oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0, + 0.0, 0.0, 0.0, 1.0 + ); +} + +VS_OUTPUT main(VS_INPUT IN) +{ + VS_OUTPUT OUT; + + OUT.v_Position = float4(IN.a_Position, 1.0); + OUT.v_TexCoord = IN.a_TexCoord; + +#if FADEEFFECT == 23 +// Glass shatter + float3 axis = float3(nrand(IN.a_Center * 247.0), nrand(IN.a_Center * 115.0), nrand(IN.a_Center * 531.0)); + axis -= (float3)0.5; + axis = normalize(axis); + + float centerDistance = saturate(length(IN.a_Center)); + float animProgress = centerDistance * 0.05; + animProgress = pow(smoothstep(0.4, 0.8, g_Progress - animProgress), 0.5); + + float3 center = IN.a_Center; + + float3 position = IN.a_Position - center; + + // Move them out of the center + center = center * (1.0 + saturate((g_Progress - 0.4) * (1.0 / 0.6)) * 4.0); + + // Move pieaces up and down linearly + center.y += pow(saturate((g_Progress - 0.4) * 2.5), 0.5) * 2.0 + saturate((g_Progress - 0.4)) * -5.0; + + // Apply creak offset + float creakTimer = smoothstep(0.0, 0.06, g_Progress) * 0.05 + + smoothstep(0.1, 0.14, g_Progress) * 0.08 + + smoothstep(0.3, 0.36, g_Progress) * 0.15; + float creakAmt = max(abs(IN.a_TexCoord.x - 0.5), abs(IN.a_TexCoord.y - 0.5)) * 0.5; + float creakSmooth = 0.1; + creakAmt = smoothstep(creakAmt, creakAmt + creakSmooth, creakTimer); + + float creakRand = nrand(position.xy * 100); + float2 creakOffset = float2(0.02 / g_AspectRatio, 0.02) * (0.5 + creakRand * 1.0); + position.xy *= lerp(1.0, max(step(IN.a_Position.z, -0.0001), 1.0 - creakOffset), creakAmt); + + float4x4 anim = rotation3d(axis, animProgress * g_Progress * 10.0); + float4x4 animLight = rotation3d(axis, animProgress * g_Progress * 10.0 + creakAmt * 0.25); + position = mul(float4(position, 0.0), anim).xyz; + + position += center; + + float3 worldSpaceNormal = mul(float4(IN.a_Normal, 0.0), animLight).xyz; + float4 screenSpaceNormal = mul(float4(worldSpaceNormal, 0.0), g_ViewProjection); + + screenSpaceNormal.xyz = normalize(screenSpaceNormal.xyz); + + OUT.v_TexCoordBase = OUT.v_TexCoord; + OUT.v_TexCoord.x -= screenSpaceNormal.x * 0.1; + OUT.v_TexCoord.y -= screenSpaceNormal.y * 0.1; + + OUT.v_TexCoordBase = lerp(OUT.v_TexCoord, OUT.v_TexCoordBase, 0.1); + + OUT.v_Position = mul(float4(position, 1.0), g_ViewProjection); + OUT.v_WorldPos = position; + OUT.v_WorldNormal = worldSpaceNormal; +#endif + + return OUT; +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/base/model_fragment_v1.h b/modules/wallpaper-engine/shaders/base/model_fragment_v1.h new file mode 100644 index 0000000..c8074a5 --- /dev/null +++ b/modules/wallpaper-engine/shaders/base/model_fragment_v1.h @@ -0,0 +1,48 @@ + +#include "common_fragment.h" + +uniform mat4 g_ViewProjectionMatrix; +uniform vec3 g_Screen; + +#if REFLECTION +vec3 ApplyReflection(DECLARE_SAMPLER2D_PARAMETER(reflectionTexture), float reflectionTextureMipMapInfo, float reflectivity, float roughness, float metallic, vec3 screenPos, vec3 normal, vec3 normalizedViewVector) +{ +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + vec2 screenUV = (screenPos.xy / screenPos.z) * 0.5 + 0.5; + + float fresnelTerm = abs(dot(normal, normalizedViewVector)); + normal = normalize(mul(normal, CAST3X3(g_ViewProjectionMatrix))); + +#ifdef HLSL + normal.y = -normal.y; +#endif + +#if PLATFORM_ANDROID + normal.xy = normal.xy * vec2(0.20 / g_Screen.z, 0.20); +#else + // Make consistent on X since the width is usually more variable (multi monitors) - bad for phones tho + normal.xy = normal.xy * vec2(0.15, 0.15 * g_Screen.z); +#endif + screenUV += normal.xy * pow(fresnelTerm, 4.0) * 10; + float clipReflection = smoothstep(1.3, 1.0, screenUV.x) * smoothstep(-0.3, 0.0, screenUV.x) * + smoothstep(1.3, 1.0, screenUV.y) * smoothstep(-0.3, 0.0, screenUV.y); + + vec3 reflectionColor = texSample2DLod(reflectionTexture, screenUV, roughness * reflectionTextureMipMapInfo).rgb * clipReflection; + reflectionColor = reflectionColor * (1.0 - fresnelTerm) * reflectivity; + reflectionColor = pow(max(CAST3(0.001), reflectionColor), CAST3(2.0 - metallic)); + + return saturate(reflectionColor); +} +#endif + +void ApplyAlphaToCoverage(inout float alpha) +{ +#if ALPHATOCOVERAGE + alpha = (alpha - 0.5) / max(fwidth(alpha), 0.0001) + 0.5; +#if GLSL + if (alpha < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/base/model_vertex_v1.h b/modules/wallpaper-engine/shaders/base/model_vertex_v1.h new file mode 100644 index 0000000..8331d9b --- /dev/null +++ b/modules/wallpaper-engine/shaders/base/model_vertex_v1.h @@ -0,0 +1,227 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat3 g_NormalModelMatrix; +uniform vec3 g_LightAmbientColor; +uniform vec3 g_LightSkylightColor; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; + +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +#if (LIGHTING || REFLECTION) && NORMALMAP +attribute vec4 a_Tangent4; +#endif + +#if MORPHING +#if HLSL +in uint gl_VertexID; +#endif + +uniform uint g_MorphOffsets[12]; +uniform float g_MorphWeights[12]; +#endif + +#if MORPHING +void ApplyMorphPositionNormal(in uint vertexID, DECLARE_SAMPLER2D_PARAMETER(morphTexture), in vec4 morphTextureTexel, in uint morphOffsets[12], in float morphWeights[12], inout vec3 localPos, inout vec3 localNormal) +{ + vec3 morphPos = CAST3(0.0); + vec3 morphNormal = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < morphOffsets[0] % 12u; ++morphTarget) + { + uint morphMapOffset = vertexID + morphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * morphTextureTexel.xy; + +#if MORPHING_NORMALS + uint morphMapIndex = (morphMapOffset * 6u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 6u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(morphTextureTexel.z); + uint morphPixel1y = morphMapIndex / CASTU(morphTextureTexel.w); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(morphTextureTexel.z); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(morphTextureTexel.w); + + vec4 morphCol1 = texSample2DLod(morphTexture, vec2(morphPixel1x, morphPixel1y) * morphTextureTexel.xy + offset, 0.0); + vec4 morphCol2 = texSample2DLod(morphTexture, vec2(morphPixel2x, morphPixel2y) * morphTextureTexel.xy + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.zw, morphCol2.x); + + vec3 posDelta = mix(posDeltaV1, posDeltaV2, step(1.0, morphMapFlip)); + morphPos += posDelta.rgb * morphWeights[1u + morphTarget]; + + vec3 normalDeltaV1 = vec3(morphCol1.w, morphCol2.xy); + vec3 normalDeltaV2 = morphCol2.yzw; + + vec3 normalDelta = mix(normalDeltaV1, normalDeltaV2, step(1.0, morphMapFlip)); + morphNormal += normalDelta * morphWeights[1u + morphTarget]; +#else + uint morphMapIndex = (morphMapOffset * 3u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 3u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(morphTextureTexel.z); + uint morphPixel1y = morphMapIndex / CASTU(morphTextureTexel.w); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(morphTextureTexel.z); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(morphTextureTexel.w); + + vec4 morphCol1 = texSample2DLod(morphTexture, vec2(morphPixel1x, morphPixel1y) * morphTextureTexel.xy + offset, 0.0); + vec4 morphCol2 = texSample2DLod(morphTexture, vec2(morphPixel2x, morphPixel2y) * morphTextureTexel.xy + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.w, morphCol2.xy); + vec3 posDeltaV3 = vec3(morphCol1.zw, morphCol2.x); + vec3 posDeltaV4 = morphCol1.yzw; + + vec3 posDelta = mix(posDeltaV1, mix(posDeltaV4, mix(posDeltaV3, posDeltaV2, + step(2.5, morphMapFlip)), step(1.5, morphMapFlip)), step(0.5, morphMapFlip)); + morphPos += posDelta.rgb * morphWeights[1u + morphTarget]; +#endif + } + + localPos += morphPos * morphWeights[0]; + +#if MORPHING_NORMALS + localNormal = normalize(localNormal + morphNormal * 3.465); +#endif +} + +void ApplyMorphPosition(in uint vertexID, DECLARE_SAMPLER2D_PARAMETER(morphTexture), in vec4 morphTextureTexel, in uint morphOffsets[12], in float morphWeights[12], inout vec3 localPos) +{ + vec3 morphPos = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < morphOffsets[0] % 12u; ++morphTarget) + { + uint morphMapOffset = vertexID + morphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * morphTextureTexel.xy; + +#if MORPHING_NORMALS + uint morphMapIndex = (morphMapOffset * 6u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 6u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(morphTextureTexel.z); + uint morphPixel1y = morphMapIndex / CASTU(morphTextureTexel.w); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(morphTextureTexel.z); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(morphTextureTexel.w); + + vec4 morphCol1 = texSample2DLod(morphTexture, vec2(morphPixel1x, morphPixel1y) * morphTextureTexel.xy + offset, 0.0); + vec4 morphCol2 = texSample2DLod(morphTexture, vec2(morphPixel2x, morphPixel2y) * morphTextureTexel.xy + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.zw, morphCol2.x); + + vec3 posDelta = mix(posDeltaV1, posDeltaV2, step(1.0, morphMapFlip)); + morphPos += posDelta.rgb * morphWeights[1u + morphTarget]; +#else + uint morphMapIndex = (morphMapOffset * 3u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 3u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(morphTextureTexel.z); + uint morphPixel1y = morphMapIndex / CASTU(morphTextureTexel.w); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(morphTextureTexel.z); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(morphTextureTexel.w); + + vec4 morphCol1 = texSample2DLod(morphTexture, vec2(morphPixel1x, morphPixel1y) * morphTextureTexel.xy + offset, 0.0); + vec4 morphCol2 = texSample2DLod(morphTexture, vec2(morphPixel2x, morphPixel2y) * morphTextureTexel.xy + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.w, morphCol2.xy); + vec3 posDeltaV3 = vec3(morphCol1.zw, morphCol2.x); + vec3 posDeltaV4 = morphCol1.yzw; + + vec3 posDelta = mix(posDeltaV1, mix(posDeltaV4, mix(posDeltaV3, posDeltaV2, + step(2.5, morphMapFlip)), step(1.5, morphMapFlip)), step(0.5, morphMapFlip)); + morphPos += posDelta.rgb * morphWeights[1u + morphTarget]; +#endif + } + + localPos += morphPos * morphWeights[0]; +} +#endif + +void ApplySkinningPositionNormal(in vec3 position, in vec3 normal, in uvec4 blendIndices, in vec4 blendWeights, out vec4 worldPosition, out vec3 worldNormal) +{ +#if SKINNING + position.xyz = mul(vec4(position, 1.0), g_Bones[blendIndices.x] * blendWeights.x + + g_Bones[blendIndices.y] * blendWeights.y + + g_Bones[blendIndices.z] * blendWeights.z + + g_Bones[blendIndices.w] * blendWeights.w); +#endif + + worldPosition = mul(vec4(position, 1.0), g_ModelMatrix); + +#if SKINNING + normal = mul(normal, CAST3X3(g_Bones[blendIndices.x]) * blendWeights.x + + CAST3X3(g_Bones[blendIndices.y]) * blendWeights.y + + CAST3X3(g_Bones[blendIndices.z]) * blendWeights.z + + CAST3X3(g_Bones[blendIndices.w]) * blendWeights.w); +#endif + + worldNormal = mul(normal, g_NormalModelMatrix); +} + +void ApplyPositionNormal(in vec3 position, in vec3 normal, out vec4 worldPosition, out vec3 worldNormal) +{ + worldPosition = mul(vec4(position, 1.0), g_ModelMatrix); + worldNormal = mul(normal, g_NormalModelMatrix); +} + +void ApplySkinningPosition(in vec3 position, in uvec4 blendIndices, in vec4 blendWeights, out vec4 worldPosition) +{ +#if SKINNING + position.xyz = mul(vec4(position, 1.0), g_Bones[blendIndices.x] * blendWeights.x + + g_Bones[blendIndices.y] * blendWeights.y + + g_Bones[blendIndices.z] * blendWeights.z + + g_Bones[blendIndices.w] * blendWeights.w); +#endif + + worldPosition = mul(vec4(position, 1.0), g_ModelMatrix); +} + +void ApplyPosition(in vec3 position, out vec4 worldPosition) +{ + worldPosition = mul(vec4(position, 1.0), g_ModelMatrix); +} + +#if (LIGHTING || REFLECTION) && NORMALMAP +void ApplySkinningTangentSpace(in vec3 worldNormal, in vec4 modelTangent, in uvec4 blendIndices, in vec4 blendWeights, out mat3 tangentSpace) +{ +#if SKINNING + vec3 tangent = mul(modelTangent.xyz, CAST3X3(g_Bones[blendIndices.x]) * blendWeights.x + + CAST3X3(g_Bones[blendIndices.y]) * blendWeights.y + + CAST3X3(g_Bones[blendIndices.z]) * blendWeights.z + + CAST3X3(g_Bones[blendIndices.w]) * blendWeights.w); +#else + vec3 tangent = modelTangent.xyz; +#endif + + tangentSpace = BuildTangentSpace(g_NormalModelMatrix, worldNormal, vec4(tangent, modelTangent.w)); + tangentSpace[0] = normalize(tangentSpace[0]); + tangentSpace[1] = normalize(tangentSpace[1]); + tangentSpace[2] = normalize(tangentSpace[2]); +} + +void ApplyTangentSpace(in vec3 worldNormal, in vec4 modelTangent, out mat3 tangentSpace) +{ + vec3 tangent = modelTangent.xyz; + tangentSpace = BuildTangentSpace(g_NormalModelMatrix, worldNormal, vec4(tangent, modelTangent.w)); + tangentSpace[0] = normalize(tangentSpace[0]); + tangentSpace[1] = normalize(tangentSpace[1]); + tangentSpace[2] = normalize(tangentSpace[2]); +} +#endif + +vec3 ApplyAmbientLighting(in vec3 normal) +{ + return mix(g_LightSkylightColor, g_LightAmbientColor, dot(normal, vec3(0, 1, 0)) * 0.5 + 0.5); +} + +void ClipSpaceToScreenSpace(in vec4 clipSpacePosition, out vec3 screenSpacePosition) +{ + screenSpacePosition = clipSpacePosition.xyw; +#ifdef HLSL + screenSpacePosition.y = -screenSpacePosition.y; +#endif +} diff --git a/modules/wallpaper-engine/shaders/blur_h_bloom.frag b/modules/wallpaper-engine/shaders/blur_h_bloom.frag new file mode 100644 index 0000000..87133cd --- /dev/null +++ b/modules/wallpaper-engine/shaders/blur_h_bloom.frag @@ -0,0 +1,22 @@ + +varying vec2 v_TexCoord[13]; + +uniform sampler2D g_Texture0; + +void main() { + vec3 albedo = texSample2D(g_Texture0, v_TexCoord[0]).rgb * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]).rgb * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]).rgb * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]).rgb * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]).rgb * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]).rgb * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]).rgb * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]).rgb * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]).rgb * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]).rgb * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]).rgb * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]).rgb * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]).rgb * 0.006299; + + gl_FragColor = vec4(albedo, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/blur_h_bloom.vert b/modules/wallpaper-engine/shaders/blur_h_bloom.vert new file mode 100644 index 0000000..f0c86cf --- /dev/null +++ b/modules/wallpaper-engine/shaders/blur_h_bloom.vert @@ -0,0 +1,26 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec2 g_TexelSize; + +varying vec2 v_TexCoord[13]; + +void main() { + gl_Position = vec4(a_Position, 1); + + float localTexel = g_TexelSize.y * 8.0; + v_TexCoord[0] = vec2(a_TexCoord.x, a_TexCoord.y - localTexel * 6.0); + v_TexCoord[1] = vec2(a_TexCoord.x, a_TexCoord.y - localTexel * 5.0); + v_TexCoord[2] = vec2(a_TexCoord.x, a_TexCoord.y - localTexel * 4.0); + v_TexCoord[3] = vec2(a_TexCoord.x, a_TexCoord.y - localTexel * 3.0); + v_TexCoord[4] = vec2(a_TexCoord.x, a_TexCoord.y - localTexel * 2.0); + v_TexCoord[5] = vec2(a_TexCoord.x, a_TexCoord.y - localTexel); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x, a_TexCoord.y + localTexel * 1.0); + v_TexCoord[8] = vec2(a_TexCoord.x, a_TexCoord.y + localTexel * 2.0); + v_TexCoord[9] = vec2(a_TexCoord.x, a_TexCoord.y + localTexel * 3.0); + v_TexCoord[10] = vec2(a_TexCoord.x, a_TexCoord.y + localTexel * 4.0); + v_TexCoord[11] = vec2(a_TexCoord.x, a_TexCoord.y + localTexel * 5.0); + v_TexCoord[12] = vec2(a_TexCoord.x, a_TexCoord.y + localTexel * 6.0); +} diff --git a/modules/wallpaper-engine/shaders/blur_k3.frag b/modules/wallpaper-engine/shaders/blur_k3.frag new file mode 100644 index 0000000..c492298 --- /dev/null +++ b/modules/wallpaper-engine/shaders/blur_k3.frag @@ -0,0 +1,14 @@ + +#include "common_blur.h" + +varying vec4 v_TexCoord; +uniform sampler2D g_Texture0; + +void main() { +#if VERTICAL + vec3 albedo = blur3(v_TexCoord.xy, vec2(0, v_TexCoord.w)); +#else + vec3 albedo = blur3(v_TexCoord.xy, vec2(v_TexCoord.z, 0)); +#endif + gl_FragColor = vec4(albedo, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/blur_k3.vert b/modules/wallpaper-engine/shaders/blur_k3.vert new file mode 100644 index 0000000..b53f74e --- /dev/null +++ b/modules/wallpaper-engine/shaders/blur_k3.vert @@ -0,0 +1,14 @@ + + +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec4 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.zw = CAST2(1.0) / g_Texture0Resolution.xy; +} diff --git a/modules/wallpaper-engine/shaders/brushinvert.frag b/modules/wallpaper-engine/shaders/brushinvert.frag new file mode 100644 index 0000000..f9332a4 --- /dev/null +++ b/modules/wallpaper-engine/shaders/brushinvert.frag @@ -0,0 +1,16 @@ + +uniform sampler2D g_Texture0; + +varying vec3 g_ScreenPosition; + +void main() { + + vec2 texCoords = g_ScreenPosition.xy / g_ScreenPosition.z; + texCoords = texCoords * vec2(0.5, -0.5) + 0.5; + vec4 sample = texSample2D(g_Texture0, texCoords); + + float lightness = dot(sample.rgb, vec3(0.3, 0.59, 0.11)); + float color = step(lightness, 0.5); + + gl_FragColor = vec4(vec3(1, 1, 1) * color, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/brushinvert.vert b/modules/wallpaper-engine/shaders/brushinvert.vert new file mode 100644 index 0000000..018fc6b --- /dev/null +++ b/modules/wallpaper-engine/shaders/brushinvert.vert @@ -0,0 +1,12 @@ + +attribute vec3 a_Position; + +uniform mat4 g_ModelViewProjectionMatrix; + +varying vec3 g_ScreenPosition; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + g_ScreenPosition = gl_Position.xyw; +} diff --git a/modules/wallpaper-engine/shaders/brushpreview.frag b/modules/wallpaper-engine/shaders/brushpreview.frag new file mode 100644 index 0000000..634c871 --- /dev/null +++ b/modules/wallpaper-engine/shaders/brushpreview.frag @@ -0,0 +1,16 @@ + +uniform vec4 g_RenderVar0; + +varying vec2 g_TexCoord; + +void main() { + float dist = length(g_TexCoord - CAST2(0.5)) / 0.5; + + //dist = smoothstep(1 - 0.4999 * g_RenderVar0.y, 0.4999 * g_RenderVar0.y, dist); + float delta = (1 - 0.4999 * g_RenderVar0.y) - (0.4999 * g_RenderVar0.y); + dist = (dist - 0.4999 * g_RenderVar0.y) / delta; + dist = 1.0 - max(0, min(1, dist)); + + dist = max(0, min(1, dist)); + gl_FragColor = vec4(vec3(1, 0, 0), dist * g_RenderVar0.x); +} diff --git a/modules/wallpaper-engine/shaders/brushpreview.vert b/modules/wallpaper-engine/shaders/brushpreview.vert new file mode 100644 index 0000000..87b3652 --- /dev/null +++ b/modules/wallpaper-engine/shaders/brushpreview.vert @@ -0,0 +1,12 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform mat4 g_ModelViewProjectionMatrix; + +varying vec2 g_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + g_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/ccsimple.frag b/modules/wallpaper-engine/shaders/ccsimple.frag new file mode 100644 index 0000000..986b747 --- /dev/null +++ b/modules/wallpaper-engine/shaders/ccsimple.frag @@ -0,0 +1,21 @@ + +#include "common.h" + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; +uniform vec4 g_Params; // {"material":"params","default":"1 1 1 0"} + +void main() +{ + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + albedo.rgb = mix(CAST3(0.5), albedo.rgb, g_Params.y); + + vec3 hsv = rgb2hsv(albedo.xyz); + hsv.z *= g_Params.x; + hsv.y *= g_Params.z; + hsv.x += g_Params.w; + albedo.rgb = hsv2rgb(hsv); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/shaders/ccsimple.vert b/modules/wallpaper-engine/shaders/ccsimple.vert new file mode 100644 index 0000000..7505149 --- /dev/null +++ b/modules/wallpaper-engine/shaders/ccsimple.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/chroma4.frag b/modules/wallpaper-engine/shaders/chroma4.frag new file mode 100644 index 0000000..0b2f771 --- /dev/null +++ b/modules/wallpaper-engine/shaders/chroma4.frag @@ -0,0 +1,191 @@ + +// [PASS] shadow shadowcaster +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":1} +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} +// [COMBO] {"material":"ui_editor_properties_rim_lighting","combo":"RIMLIGHTING","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_toon_shading","combo":"SHADINGGRADIENT","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_tint_mask_in_alpha","combo":"TINTMASKALPHA","default":0} + +#define RIM_LIGHTING_AMOUNT g_RimAmount +#define RIM_LIGHTING_EXPONENT g_RimExponent + +#if SHADINGGRADIENT +#define GRADIENT_SAMPLER g_Texture4 +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_shading_gradient","default":"gradient/gradient_toon_smooth","formatcombo":true,"nonremovable":true,"require":{"SHADINGGRADIENT":1}} +#endif +uniform float g_RimAmount; // {"material":"rimamount","label":"ui_editor_properties_rim_lighting_amount","default":2.0,"range":[0,5],"group":"ui_editor_properties_rim_lighting"} +uniform float g_RimExponent; // {"material":"rimexponent","label":"ui_editor_properties_rim_lighting_exponent","default":4.0,"range":[0.01,10],"group":"ui_editor_properties_rim_lighting"} + +#if LIGHTS_SHADOW_MAPPING +#define SHADOW_ATLAS_SAMPLER g_Texture6 +#define SHADOW_ATLAS_TEXEL g_Texture6Texel +uniform sampler2DComparison g_Texture6; // {"hidden":true,"default":"_rt_shadowAtlas"} +uniform vec4 g_Texture6Texel; +#endif + +#if LIGHTS_COOKIE +#define COOKIE_SAMPLER g_Texture7 +uniform sampler2D g_Texture7; // {"hidden":true,"default":"_alias_lightCookie"} +#endif + +#include "base/model_fragment_v1.h" +#include "common_pbr_2.h" +#include "common_fog.h" + +uniform float g_Brightness; // {"material":"brightness","label":"ui_editor_properties_hdr_brightness","default":1,"range":[0,10]} + +uniform float g_TintAlpha; // {"material":"alpha","label":"ui_editor_properties_opacity","default":1,"range":[0,1]} + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","format":"normalmap","formatcombo":true,"combo":"NORMALMAP"} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}]} + +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} + +varying vec3 v_WorldNormal; + +#ifdef NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#endif + +#if LIGHTING || REFLECTION +varying vec3 v_WorldPos; +#endif + +varying vec2 v_TexCoord; + +varying vec4 v_ViewDir; +varying vec3 v_LightAmbientColor; + +#if REFLECTION +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; +#endif + +varying vec3 v_ScreenPos; + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} + +// + +#require LightingV1 + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + //albedo.rgb *= g_TintColor; +#if TINTMASKALPHA + float tintMask = albedo.a; + albedo.rgb = mix(albedo.rgb, CAST3(max(albedo.x, max(albedo.y, albedo.z))) * g_TintColor, albedo.a); + albedo.a = 1.0; +#endif + + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.xy); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + + float viewDist = length(v_ViewDir.xyz); + vec3 normalizedViewVector = v_ViewDir.xyz / viewDist; + +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_TexCoord.xy)); + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#else + vec3 normal = normalize(v_WorldNormal.xyz); +#endif + + // + + vec3 light = CAST3(0.0); + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + +#if LIGHTING + vec3 specularTint = g_SpecularTint; +#if TINTMASKALPHA + specularTint = mix(CAST3(1.0), specularTint, tintMask); +#endif + light = PerformLighting_V1(v_WorldPos, albedo.rgb, normal, normalizedViewVector, specularTint, f0, roughness, metallic); + vec3 ambient = v_LightAmbientColor * albedo.rgb; +#else + vec3 ambient = albedo.rgb; +#endif + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * albedo.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + light.rgb += (CAST3(pigmentFactor - 0.25)) * g_TintPigmentation * dot(light.rgb, vec3(0.299,0.587,0.114)); // * light.rgb; + albedo.rgb = CombineLighting(light, ambient); + +#if REFLECTION + float reflectivity = g_Reflectivity; +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + albedo.rgb += ApplyReflection(MAKE_SAMPLER2D_ARGUMENT(g_Texture3), g_Texture3MipMapInfo, reflectivity, roughness, metallic, v_ScreenPos.xyz, normal, normalizedViewVector); +#endif + +#if HDR + albedo.rgb *= g_Brightness; + +#if (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + albedo.rgb += g_EmissiveColor * albedo.rgb * emissiveOverbright; +#endif +#endif + +#if FOG_HEIGHT || FOG_DIST + vec2 fogPixelState = CalculateFogPixelState(viewDist, v_ViewDir.w); + albedo.rgb = ApplyFog(albedo.rgb, fogPixelState); +#if ADDITIVE + albedo.a = ApplyFogAlpha(albedo.a, fogPixelState); +#endif +#endif + + gl_FragColor = albedo; + + ApplyAlphaToCoverage(gl_FragColor.a); +} diff --git a/modules/wallpaper-engine/shaders/chroma4.vert b/modules/wallpaper-engine/shaders/chroma4.vert new file mode 100644 index 0000000..95eb528 --- /dev/null +++ b/modules/wallpaper-engine/shaders/chroma4.vert @@ -0,0 +1,81 @@ + +#include "base/model_vertex_v1.h" + +uniform vec3 g_EyePosition; +uniform mat4 g_ViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +attribute vec2 a_TexCoord; + +varying vec3 v_WorldNormal; +varying vec4 v_ViewDir; +varying vec2 v_TexCoord; + +varying vec3 v_LightAmbientColor; + +#if LIGHTING || REFLECTION +#if NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +#endif +varying vec3 v_WorldPos; +#endif + +varying vec3 v_ScreenPos; + +#if MORPHING +uniform sampler2D g_Texture5; // {"material":"morph","hidden":true} +uniform vec4 g_Texture5Texel; +#endif + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} + +void main() { + vec3 localPos = a_Position; + vec3 localNormal = a_Normal; + +#if MORPHING + ApplyMorphPositionNormal(gl_VertexID, MAKE_SAMPLER2D_ARGUMENT(g_Texture5), g_Texture5Texel, g_MorphOffsets, g_MorphWeights, localPos, localNormal); +#endif + + vec4 worldPos; + vec3 worldNormal; + +#if SKINNING + ApplySkinningPositionNormal(localPos, localNormal, a_BlendIndices, a_BlendWeights, worldPos, worldNormal); +#else + ApplyPositionNormal(localPos, localNormal, worldPos, worldNormal); +#endif + + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; + +#if LIGHTING || REFLECTION + v_WorldPos = worldPos.xyz; +#endif + +#if NORMALMAP + mat3 tangentSpace; +#if SKINNING + ApplySkinningTangentSpace(worldNormal, a_Tangent4, a_BlendIndices, a_BlendWeights, tangentSpace); +#else + ApplyTangentSpace(worldNormal, a_Tangent4, tangentSpace); +#endif + + v_Tangent = tangentSpace[0]; + v_Bitangent = tangentSpace[1]; + v_Normal = tangentSpace[2]; +#endif + + v_WorldNormal.xyz = worldNormal; + + ClipSpaceToScreenSpace(gl_Position, v_ScreenPos); + + v_LightAmbientColor = ApplyAmbientLighting(worldNormal); +} diff --git a/modules/wallpaper-engine/shaders/combine.frag b/modules/wallpaper-engine/shaders/combine.frag new file mode 100644 index 0000000..72e138c --- /dev/null +++ b/modules/wallpaper-engine/shaders/combine.frag @@ -0,0 +1,16 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; +uniform sampler2D g_Texture1; + + +void main() { + + vec3 albedo = texSample2D(g_Texture0, v_TexCoord).rgb; + + vec3 bloom = texSample2D(g_Texture1, v_TexCoord).rgb; + albedo += bloom; + + gl_FragColor = vec4(albedo, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/combine.vert b/modules/wallpaper-engine/shaders/combine.vert new file mode 100644 index 0000000..7505149 --- /dev/null +++ b/modules/wallpaper-engine/shaders/combine.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/combine_hdr.frag b/modules/wallpaper-engine/shaders/combine_hdr.frag new file mode 100644 index 0000000..3fd79de --- /dev/null +++ b/modules/wallpaper-engine/shaders/combine_hdr.frag @@ -0,0 +1,46 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; +uniform sampler2D g_Texture1; + +uniform vec2 g_TexelSize; + +uniform vec4 g_RenderVar0; + +// Proper gamma conversion http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html +vec3 lin(vec3 v) +{ + vec3 c = step(0.04045, v); + return c * (pow((v + 0.055) / 1.055, CAST3(2.4))) + (1.0 - c) * (v / 12.92); +} + +void main() +{ + vec3 albedo = texSample2D(g_Texture0, v_TexCoord).rgb; + vec3 bloom1 = texSample2D(g_Texture1, v_TexCoord + g_TexelSize).rgb + + texSample2D(g_Texture1, v_TexCoord - g_TexelSize).rgb + + texSample2D(g_Texture1, v_TexCoord + vec2(g_TexelSize.x, -g_TexelSize.y)).rgb + + texSample2D(g_Texture1, v_TexCoord + vec2(-g_TexelSize.x, g_TexelSize.y)).rgb; + bloom1 *= 0.25; + +#if DISPLAYHDR == 1 + albedo = saturate(albedo); + albedo += bloom1; + //vec3 hdrFactors = g_RenderVar0.y * smoothstep(CAST3(1.0), CAST3(5.0), albedo) + g_RenderVar0.x; + float hdrFactors = g_RenderVar0.y * smoothstep(CAST3(1.0), CAST3(5.0), dot(vec3(0.299, 0.587, 0.114), albedo)) + g_RenderVar0.x; + gl_FragColor = vec4(lin((max(CAST3(0.0), albedo))) * hdrFactors, 1.0); +#else +#if COMBINEDBG == 1 + albedo = mix(albedo + bloom1, bloom1, step(0.5, v_TexCoord.x) * step(v_TexCoord.y, 0.5)); +#else + albedo += bloom1; +#endif + +#if LINEAR == 1 + gl_FragColor = vec4(saturate(albedo), 1.0); +#else + gl_FragColor = vec4(saturate(lin(albedo)) * g_RenderVar0.x, 1.0); +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/combine_hdr.vert b/modules/wallpaper-engine/shaders/combine_hdr.vert new file mode 100644 index 0000000..7505149 --- /dev/null +++ b/modules/wallpaper-engine/shaders/combine_hdr.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/combine_hdr_editor.frag b/modules/wallpaper-engine/shaders/combine_hdr_editor.frag new file mode 100644 index 0000000..71b1d85 --- /dev/null +++ b/modules/wallpaper-engine/shaders/combine_hdr_editor.frag @@ -0,0 +1,19 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; + +uniform vec2 g_TexelSize; + +// Proper gamma conversion http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html +vec3 srgb(vec3 v) +{ + vec3 c = step(0.04045, v); + return c * (pow((v + 0.055) / 1.055, 2.4)) + (1 - c) * (v / 12.92); +} + +void main() +{ + vec3 albedo = texSample2D(g_Texture0, v_TexCoord).rgb; + gl_FragColor = vec4(srgb(saturate(albedo)), 1.0); +} diff --git a/modules/wallpaper-engine/shaders/combine_hdr_editor.vert b/modules/wallpaper-engine/shaders/combine_hdr_editor.vert new file mode 100644 index 0000000..7505149 --- /dev/null +++ b/modules/wallpaper-engine/shaders/combine_hdr_editor.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/common.h b/modules/wallpaper-engine/shaders/common.h new file mode 100644 index 0000000..364d5a2 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common.h @@ -0,0 +1,37 @@ + +#define M_PI 3.14159265359 +#define M_PI_HALF 1.57079632679 +#define M_PI_2 6.28318530718 + +#define SQRT_2 1.41421356237 +#define SQRT_3 1.73205080756 + +vec3 hsv2rgb(vec3 c) +{ + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(frac(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); +} + +vec3 rgb2hsv(vec3 RGB) +{ + vec4 P = (RGB.g < RGB.b) ? vec4(RGB.bg, -1.0, 2.0/3.0) : vec4(RGB.gb, 0.0, -1.0/3.0); + vec4 Q = (RGB.r < P.x) ? vec4(P.xyw, RGB.r) : vec4(RGB.r, P.yzx); + float C = Q.x - min(Q.w, Q.y); + float H = abs((Q.w - Q.y) / (6.0 * C + 1e-10) + Q.z); + + vec3 HCV = vec3(H, C, Q.x); + float S = HCV.y / (HCV.z + 1e-10); + return vec3(HCV.x, S, HCV.z); +} + +vec2 rotateVec2(vec2 v, float r) +{ + vec2 cs = vec2(cos(r), sin(r)); + return vec2(v.x * cs.x - v.y * cs.y, v.x * cs.y + v.y * cs.x); +} + +float greyscale(vec3 color) +{ + return dot(color, vec3(0.11, 0.59, 0.3)); +} diff --git a/modules/wallpaper-engine/shaders/common_blending.h b/modules/wallpaper-engine/shaders/common_blending.h new file mode 100644 index 0000000..47ba179 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_blending.h @@ -0,0 +1,264 @@ + +vec4 Desaturate(vec3 color, float Desaturation) +{ + vec3 grayXfer = vec3(0.3, 0.59, 0.11); + vec3 gray = CAST3(dot(grayXfer, color)); + return vec4(mix(color, gray, Desaturation), 1.0); +} + +vec3 RGBToHSL(vec3 color) +{ + vec3 hsl; + float fmin = min(min(color.r, color.g), color.b); + float fmax = max(max(color.r, color.g), color.b); + float delta = fmax - fmin; + hsl.z = (fmax + fmin) / 2.0; + + if (delta == 0.0) + { + hsl.x = 0.0; + hsl.y = 0.0; + } + else + { + if (hsl.z < 0.5) + hsl.y = delta / (fmax + fmin); + else + hsl.y = delta / (2.0 - fmax - fmin); + float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta; + float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta; + float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta; + if (color.r == fmax ) + hsl.x = deltaB - deltaG; + else if (color.g == fmax) + hsl.x = (1.0 / 3.0) + deltaR - deltaB; + else if (color.b == fmax) + hsl.x = (2.0 / 3.0) + deltaG - deltaR; + + if (hsl.x < 0.0) + hsl.x += 1.0; + else if (hsl.x > 1.0) + hsl.x -= 1.0; + } + + return hsl; +} + +float HueToRGB(float f1, float f2, float hue) +{ + if (hue < 0.0) + hue += 1.0; + else if (hue > 1.0) + hue -= 1.0; + float res; + if ((6.0 * hue) < 1.0) + res = f1 + (f2 - f1) * 6.0 * hue; + else if ((2.0 * hue) < 1.0) + res = f2; + else if ((3.0 * hue) < 2.0) + res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0; + else + res = f1; + return res; +} + +vec3 HSLToRGB(vec3 hsl) +{ + vec3 rgb; + if (hsl.y == 0.0) + rgb = CAST3(hsl.z); + else + { + float f2; + if (hsl.z < 0.5) + f2 = hsl.z * (1.0 + hsl.y); + else + f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z); + float f1 = 2.0 * hsl.z - f2; + rgb.r = HueToRGB(f1, f2, hsl.x + (1.0/3.0)); + rgb.g = HueToRGB(f1, f2, hsl.x); + rgb.b= HueToRGB(f1, f2, hsl.x - (1.0/3.0)); + } + + return rgb; +} + +vec3 ContrastSaturationBrightness(vec3 color, float brt, float sat, float con) +{ + const float AvgLumR = 0.5; + const float AvgLumG = 0.5; + const float AvgLumB = 0.5; + + const vec3 LumCoeff = vec3(0.2125, 0.7154, 0.0721); + + vec3 AvgLumin = vec3(AvgLumR, AvgLumG, AvgLumB); + vec3 brtColor = color * brt; + vec3 intensity = CAST3(dot(brtColor, LumCoeff)); + vec3 satColor = mix(intensity, brtColor, sat); + vec3 conColor = mix(AvgLumin, satColor, con); + return conColor; +} + +#define BlendLinearDodgef(base, blend) (base + blend) +#define BlendLinearBurnf(base, blend) max(base + blend - 1.0, 0.0) +#define BlendLightenf(base, blend) max(blend, base) +#define BlendDarkenf(base, blend) min(blend, base) +#define BlendLinearLightf(base, blend) (blend < 0.5 ? BlendLinearBurnf(base, (2.0 * blend)) : BlendLinearDodgef(base, (2.0 * (blend - 0.5)))) +#define BlendScreenf(base, blend) (1.0 - ((1.0 - base) * (1.0 - blend))) +#define BlendOverlayf(base, blend) (base < 0.5 ? (2.0 * base * blend) : (1.0 - 2.0 * (1.0 - base) * (1.0 - blend))) +#define BlendSoftLightf(base, blend) ((blend < 0.5) ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend))) +#define BlendColorDodgef(base, blend) ((blend == 1.0) ? blend : min(base / (1.0 - blend), 1.0)) +#define BlendColorBurnf(base, blend) ((blend == 0.0) ? blend : max((1.0 - ((1.0 - base) / blend)), 0.0)) +#define BlendVividLightf(base, blend) ((blend < 0.5) ? BlendColorBurnf(base, (2.0 * blend)) : BlendColorDodgef(base, (2.0 * (blend - 0.5)))) +#define BlendPinLightf(base, blend) ((blend < 0.5) ? BlendDarkenf(base, (2.0 * blend)) : BlendLightenf(base, (2.0 *(blend - 0.5)))) +#define BlendHardMixf(base, blend) ((BlendVividLightf(base, blend) < 0.5) ? 0.0 : 1.0) +#define BlendReflectf(base, blend) ((blend == 1.0) ? blend : min(base * base / (1.0 - blend), 1.0)) +#define BlendNormal(base, blend) (blend) +#define BlendLighten BlendLightenf +#define BlendDarken BlendDarkenf +#define BlendMultiply(base, blend) (base * blend) +#define BlendAverage(base, blend) ((base + blend) / 2.0) +#define BlendAdd(base, blend) min(base + blend, CAST3(1.0)) +#define BlendSubstract(base, blend) max(base + blend - CAST3(1.0), CAST3(0.0)) +#define BlendDifference(base, blend) abs(base - blend) +#define BlendNegation(base, blend) (CAST3(1.0) - abs(CAST3(1.0) - base - blend)) +#define BlendExclusion(base, blend) (base + blend - 2.0 * base * blend) +#define BlendScreen(base, blend) vec3(BlendScreenf(base.r, blend.r), BlendScreenf(base.g, blend.g), BlendScreenf(base.b, blend.b)) +#define BlendOverlay(base, blend) vec3(BlendOverlayf(base.r, blend.r), BlendOverlayf(base.g, blend.g), BlendOverlayf(base.b, blend.b)) +#define BlendSoftLight(base, blend) vec3(BlendSoftLightf(base.r, blend.r), BlendSoftLightf(base.g, blend.g), BlendSoftLightf(base.b, blend.b)) +#define BlendHardLight(base, blend) BlendOverlay(blend, base) +#define BlendColorDodge(base, blend) vec3(BlendColorDodgef(base.r, blend.r), BlendColorDodgef(base.g, blend.g), BlendColorDodgef(base.b, blend.b)) +#define BlendColorBurn(base, blend) vec3(BlendColorBurnf(base.r, blend.r), BlendColorBurnf(base.g, blend.g), BlendColorBurnf(base.b, blend.b)) +#define BlendLinearLight(base, blend) vec3(BlendLinearLightf(base.r, blend.r), BlendLinearLightf(base.g, blend.g), BlendLinearLightf(base.b, blend.b)) +#define BlendVividLight(base, blend) vec3(BlendVividLightf(base.r, blend.r), BlendVividLightf(base.g, blend.g), BlendVividLightf(base.b, blend.b)) +#define BlendPinLight(base, blend) vec3(BlendPinLightf(base.r, blend.r), BlendPinLightf(base.g, blend.g), BlendPinLightf(base.b, blend.b)) +#define BlendHardMix(base, blend) vec3(BlendHardMixf(base.r, blend.r), BlendHardMixf(base.g, blend.g), BlendHardMixf(base.b, blend.b)) +#define BlendReflect(base, blend) vec3(BlendReflectf(base.r, blend.r), BlendReflectf(base.g, blend.g), BlendReflectf(base.b, blend.b)) +#define BlendGlow(base, blend) BlendReflect(blend, base) +#define BlendPhoenix(base, blend) (min(base, blend) - max(base, blend) + CAST3(1.0)) +#define BlendOpacity(base, blend, F, O) mix(base, F(base, blend), O) +#define BlendLinearDodge(base, blend) min(base + blend, CAST3(1.0)) +#define BlendLinearBurn(base, blend) max(base + blend - CAST3(1.0), CAST3(0.0)) +#define BlendTint(base, blend) (CAST3(max(base.x, max(base.y, base.z))) * blend) + +vec3 BlendHue(vec3 base, vec3 blend) +{ + vec3 baseHSL = RGBToHSL(base); + return HSLToRGB(vec3(RGBToHSL(blend).r, baseHSL.g, baseHSL.b)); +} + +vec3 BlendSaturation(vec3 base, vec3 blend) +{ + vec3 baseHSL = RGBToHSL(base); + return HSLToRGB(vec3(baseHSL.r, RGBToHSL(blend).g, baseHSL.b)); +} + +vec3 BlendColor(vec3 base, vec3 blend) +{ + vec3 blendHSL = RGBToHSL(blend); + return HSLToRGB(vec3(blendHSL.r, blendHSL.g, RGBToHSL(base).b)); +} + +vec3 BlendLuminosity(vec3 base, vec3 blend) +{ + vec3 baseHSL = RGBToHSL(base); + return HSLToRGB(vec3(baseHSL.r, baseHSL.g, RGBToHSL(blend).b)); +} + +vec3 ApplyBlending(const int blendMode, in vec3 A, in vec3 B, in float opacity) +{ +#if BLENDMODE == 1 + return mix(A,BlendDarken(A,B),opacity); +#endif +#if BLENDMODE == 2 + return mix(A,BlendMultiply(A,B),opacity); +#endif +#if BLENDMODE == 3 + return mix(A,BlendColorBurn(A,B),opacity); +#endif +#if BLENDMODE == 4 + return mix(A,BlendSubstract(A,B),opacity); +#endif +#if BLENDMODE == 5 + return min(A, B); +#endif +#if BLENDMODE == 6 + return mix(A,BlendLighten(A,B),opacity); +#endif +#if BLENDMODE == 7 + return mix(A,BlendScreen(A,B),opacity); +#endif +#if BLENDMODE == 8 + return mix(A,BlendColorDodge(A,B),opacity); +#endif +#if BLENDMODE == 9 + return mix(A,BlendAdd(A,B),opacity); +#endif +#if BLENDMODE == 10 + return max(A, B); +#endif +#if BLENDMODE == 11 + return mix(A,BlendOverlay(A,B),opacity); +#endif +#if BLENDMODE == 12 + return mix(A,BlendSoftLight(A,B),opacity); +#endif +#if BLENDMODE == 13 + return mix(A,BlendHardLight(A,B),opacity); +#endif +#if BLENDMODE == 14 + return mix(A,BlendVividLight(A,B),opacity); +#endif +#if BLENDMODE == 15 + return mix(A,BlendLinearLight(A,B),opacity); +#endif +#if BLENDMODE == 16 + return mix(A,BlendPinLight(A,B),opacity); +#endif +#if BLENDMODE == 17 + return mix(A,BlendHardMix(A,B),opacity); +#endif +#if BLENDMODE == 18 + return mix(A,BlendDifference(A,B),opacity); +#endif +#if BLENDMODE == 19 + return mix(A,BlendExclusion(A,B),opacity); +#endif +#if BLENDMODE == 20 + return mix(A,BlendSubstract(A,B),opacity); +#endif +#if BLENDMODE == 21 + return mix(A,BlendReflect(A,B),opacity); +#endif +#if BLENDMODE == 22 + return mix(A,BlendGlow(A,B),opacity); +#endif +#if BLENDMODE == 23 + return mix(A,BlendPhoenix(A,B),opacity); +#endif +#if BLENDMODE == 24 + return mix(A,BlendAverage(A,B),opacity); +#endif +#if BLENDMODE == 25 + return mix(A,BlendNegation(A,B),opacity); +#endif +#if BLENDMODE == 26 + return mix(A,BlendHue(A,B),opacity); +#endif +#if BLENDMODE == 27 + return mix(A,BlendSaturation(A,B),opacity); +#endif +#if BLENDMODE == 28 + return mix(A,BlendColor(A,B),opacity); +#endif +#if BLENDMODE == 29 + return mix(A,BlendLuminosity(A,B),opacity); +#endif +#if BLENDMODE == 30 + return mix(A,BlendTint(A,B),opacity); +#endif +#if BLENDMODE == 31 + return A + B * opacity; +#endif + return mix(A,BlendNormal(A,B),opacity); +} diff --git a/modules/wallpaper-engine/shaders/common_blur.h b/modules/wallpaper-engine/shaders/common_blur.h new file mode 100644 index 0000000..ba5404f --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_blur.h @@ -0,0 +1,112 @@ +vec3 blur13(vec2 u, vec2 d) +{ + vec2 o1 = CAST2(1.4091998770852122) * d; + vec2 o2 = CAST2(3.2979348079914822) * d; + vec2 o3 = CAST2(5.2062900776825969) * d; + return texSample2D(g_Texture0, u).rgb * 0.1976406528809576 + + texSample2D(g_Texture0, u + o1).rgb * 0.2959855056006557 + + texSample2D(g_Texture0, u - o1).rgb * 0.2959855056006557 + + texSample2D(g_Texture0, u + o2).rgb * 0.0935333619980593 + + texSample2D(g_Texture0, u - o2).rgb * 0.0935333619980593 + + texSample2D(g_Texture0, u + o3).rgb * 0.0116608059608062 + + texSample2D(g_Texture0, u - o3).rgb * 0.0116608059608062; +} +vec3 blur7(vec2 u, vec2 d) +{ + vec2 o1 = CAST2(2.3515644035337887) * d; + vec2 o2 = CAST2(0.469433779698372) * d; + vec2 o3 = CAST2(1.4091998770852121) * d; + vec2 o4 = CAST2(3) * d; + return texSample2D(g_Texture0, u + o1).rgb * 0.2028175528299753 + + texSample2D(g_Texture0, u + o2).rgb * 0.4044856614512112 + + texSample2D(g_Texture0, u - o3).rgb * 0.3213933537319605 + + texSample2D(g_Texture0, u - o4).rgb * 0.0713034319868530; +} +vec3 blur3(vec2 u, vec2 d) +{ + return texSample2D(g_Texture0, u + d).rgb * 0.25 + + texSample2D(g_Texture0, u).rgb * 0.5 + + texSample2D(g_Texture0, u - d).rgb * 0.25; +} +vec4 blur13a(vec2 u, vec2 d) +{ + vec2 o1 = CAST2(1.4091998770852122) * d; + vec2 o2 = CAST2(3.2979348079914822) * d; + vec2 o3 = CAST2(5.2062900776825969) * d; + return texSample2D(g_Texture0, u) * 0.1976406528809576 + + texSample2D(g_Texture0, u + o1) * 0.2959855056006557 + + texSample2D(g_Texture0, u - o1) * 0.2959855056006557 + + texSample2D(g_Texture0, u + o2) * 0.0935333619980593 + + texSample2D(g_Texture0, u - o2) * 0.0935333619980593 + + texSample2D(g_Texture0, u + o3) * 0.0116608059608062 + + texSample2D(g_Texture0, u - o3) * 0.0116608059608062; +} +vec4 blur7a(vec2 u, vec2 d) +{ + vec2 o1 = CAST2(2.3515644035337887) * d; + vec2 o2 = CAST2(0.469433779698372) * d; + vec2 o3 = CAST2(1.4091998770852121) * d; + vec2 o4 = CAST2(3) * d; + return texSample2D(g_Texture0, u + o1) * 0.2028175528299753 + + texSample2D(g_Texture0, u + o2) * 0.4044856614512112 + + texSample2D(g_Texture0, u - o3) * 0.3213933537319605 + + texSample2D(g_Texture0, u - o4) * 0.0713034319868530; +} +vec4 blur3a(vec2 u, vec2 d) +{ + return texSample2D(g_Texture0, u + d) * 0.25 + + texSample2D(g_Texture0, u) * 0.5 + + texSample2D(g_Texture0, u - d) * 0.25; +} +vec2 blurRotateVec2(vec2 v, float r) +{ + vec2 cs = vec2(cos(r), sin(r)); + return vec2(v.x * cs.x - v.y * cs.y, v.x * cs.y + v.y * cs.x); +} +vec4 blurRadial13a(vec2 u, vec2 center, float amt) +{ + vec2 delta = u - center; + amt = amt * 0.025; + float o1 = 1.4091998770852122 * amt; + float o2 = 3.2979348079914822 * amt; + float o3 = 5.2062900776825969 * amt; + vec2 r1 = blurRotateVec2(delta, o1) - delta; + vec2 r2 = blurRotateVec2(delta, o2) - delta; + vec2 r3 = blurRotateVec2(delta, o3) - delta; + return texSample2D(g_Texture0, u) * 0.1976406528809576 + + texSample2D(g_Texture0, center + r1 + delta) * 0.2959855056006557 + + texSample2D(g_Texture0, center - r1 + delta) * 0.2959855056006557 + + texSample2D(g_Texture0, center + r2 + delta) * 0.0935333619980593 + + texSample2D(g_Texture0, center - r2 + delta) * 0.0935333619980593 + + texSample2D(g_Texture0, center + r3 + delta) * 0.0116608059608062 + + texSample2D(g_Texture0, center - r3 + delta) * 0.0116608059608062; +} +vec4 blurRadial7a(vec2 u, vec2 center, float amt) +{ + vec2 delta = u - center; + amt = amt * 0.025; + float o1 = 2.3515644035337887 * amt; + float o2 = 0.469433779698372 * amt; + float o3 = 1.4091998770852121 * amt; + float o4 = 3 * amt; + vec2 r1 = blurRotateVec2(delta, o1) - delta; + vec2 r2 = blurRotateVec2(delta, o2) - delta; + vec2 r3 = blurRotateVec2(delta, -o3) - delta; + vec2 r4 = blurRotateVec2(delta, -o4) - delta; + + return texSample2D(g_Texture0, center + r1 + delta) * 0.2028175528299753 + + texSample2D(g_Texture0, center + r2 + delta) * 0.4044856614512112 + + texSample2D(g_Texture0, center + r3 + delta) * 0.3213933537319605 + + texSample2D(g_Texture0, center + r4 + delta) * 0.0713034319868530; +} +vec4 blurRadial3a(vec2 u, vec2 center, float amt) +{ + vec2 delta = u - center; + amt = amt * 0.025; + float o1 = amt; + vec2 r1 = blurRotateVec2(delta, o1) - delta; + + return texSample2D(g_Texture0, center + delta) * 0.5 + + texSample2D(g_Texture0, center + r1 + delta) * 0.25 + + texSample2D(g_Texture0, center - r1 + delta) * 0.25; +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/common_composite.h b/modules/wallpaper-engine/shaders/common_composite.h new file mode 100644 index 0000000..c1bdbd1 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_composite.h @@ -0,0 +1,50 @@ + +#include "common.h" +#include "common_blending.h" + +uniform float g_CompositeAlpha; // {"material":"compositealpha","label":"ui_editor_properties_alpha","default":1,"range":[0.0, 2.0]} +uniform vec2 g_CompositeOffset; // {"material":"compositeoffset","label":"ui_editor_properties_offset","default":"0 0","linked":true,"range":[-10.0, 10.0]} +uniform vec3 g_CompositeColor; // {"material":"compositecolor","label":"ui_editor_properties_color","default":"1 1 1","type":"color"} + +vec2 ApplyCompositeOffset(vec2 texCoords, vec2 textureResolution) +{ +#if COMPOSITE != 0 + return texCoords + g_CompositeOffset / textureResolution; +#else + return texCoords; +#endif +} + +vec4 ApplyComposite(vec4 original, vec4 effect) +{ +#if COMPOSITEMONO == 1 + effect.rgb = CAST3(greyscale(effect.rgb)); +#endif + + effect.rgb *= g_CompositeColor; + + // Only return the effect +#if COMPOSITE == 0 + return effect; +#endif + + // Overlay the effect with a blend mode +#if COMPOSITE == 1 + effect.rgb = ApplyBlending(BLENDMODE, original.rgb, effect.rgb, effect.a * g_CompositeAlpha); + effect.a = max(effect.a * saturate(g_CompositeAlpha), original.a); +#endif + + // Put the effect below the original +#if COMPOSITE == 2 + effect.a *= saturate(g_CompositeAlpha); + effect = mix(effect, original, original.a); +#endif + + // Turn the pixels where the original is invisible +#if COMPOSITE == 3 + effect.a *= saturate(g_CompositeAlpha); + effect.a *= 1.0 - original.a; +#endif + + return effect; +} diff --git a/modules/wallpaper-engine/shaders/common_fog.h b/modules/wallpaper-engine/shaders/common_fog.h new file mode 100644 index 0000000..917dbe5 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_fog.h @@ -0,0 +1,55 @@ + +#if FOG_DIST +uniform vec3 g_FogDistanceColor; +uniform vec4 g_FogDistanceParams; +#endif + +#if FOG_HEIGHT +uniform vec3 g_FogHeightColor; +uniform vec4 g_FogHeightParams; +#endif + +vec2 CalculateFogPixelState(float viewDirLength, float worldPosHeight) +{ + vec2 result = CAST2(0); +#if FOG_DIST + result.x = (viewDirLength - g_FogDistanceParams.x) / g_FogDistanceParams.y; +#endif +#if FOG_HEIGHT + result.y = (worldPosHeight - g_FogHeightParams.x) / g_FogHeightParams.y; +#endif + return result; +} + +vec3 ApplyFog(in vec3 color, in vec2 fogPixelState) +{ +#if FOG_HEIGHT + float fogHeight = saturate(fogPixelState.y); + color.rgb = mix(color.rgb, g_FogHeightColor, + g_FogHeightParams.z + g_FogHeightParams.w * fogHeight * fogHeight); +#endif +#if FOG_DIST + float fogDistance = saturate(fogPixelState.x); + color.rgb = mix(color.rgb, g_FogDistanceColor, + g_FogDistanceParams.z + g_FogDistanceParams.w * fogDistance * fogDistance); +#endif + return color; +} + +float ApplyFogAlpha(in float alpha, in vec2 fogPixelState) +{ +#if FOG_DIST + float fogDistance = saturate(fogPixelState.x); + fogDistance = g_FogDistanceParams.z + g_FogDistanceParams.w * fogDistance * fogDistance; +#else + float fogDistance = 0.0; +#endif +#if FOG_HEIGHT + float fogHeight = saturate(fogPixelState.y); + fogHeight = g_FogHeightParams.z + g_FogHeightParams.w * fogHeight * fogHeight; +#else + float fogHeight = 0.0; +#endif + float fogFactor = saturate(max(fogDistance, fogHeight)); + return alpha * (1.0 - (fogFactor * fogFactor)); +} diff --git a/modules/wallpaper-engine/shaders/common_foliage.h b/modules/wallpaper-engine/shaders/common_foliage.h new file mode 100644 index 0000000..53e132c --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_foliage.h @@ -0,0 +1,40 @@ + +float CalcLeavesUVWeight(vec2 uvs, vec2 uvBounds) +{ +#if LEAVESUVMODE == 1 + return saturate((1.0 - uvs.y - uvBounds.x) * uvBounds.y); +#elif LEAVESUVMODE == 2 + return saturate((uvs.y - uvBounds.x) * uvBounds.y); +#elif LEAVESUVMODE == 3 + return saturate((uvs.x - uvBounds.x) * uvBounds.y); +#elif LEAVESUVMODE == 4 + return saturate((1.0 - uvs.x - uvBounds.x) * uvBounds.y); +#endif + return 1.0; +} + +vec3 CalcFoliageAnimation(vec3 worldPos, vec3 localPos, vec2 uvs, float direction, float time, float speedLeaves, float speedBase, float strengthLeaves, float strengthBase, float phase, float scale, float cutoff, float treeHeight, float treeRadius, vec2 uvBounds) +{ + vec3 foliageOffsetForward = vec3(cos(direction), 0, sin(direction)); + vec3 foliageOffsetUp = vec3(0, 1, 0); + + vec4 fastSines = sin(phase + speedLeaves * time * vec4(1.71717171, -1.56161616, -1.9333, 1.041666666) + worldPos.xzzy * scale * 3.333); + vec4 slowSines = sin(phase + speedBase * time * vec4(0.53333, -0.019841, -0.13888889, 0.0024801587) + worldPos.xyyx * scale); + fastSines = smoothstep(CAST4(cutoff) + fastSines * 0.1, CAST4(1.0 - cutoff) - fastSines.zwyx * 0.1, fastSines * CAST4(0.5) + CAST4(0.5)) * CAST4(2.0) - CAST4(1.0); + float cutoffBase = cutoff * 0.6666; + slowSines = smoothstep(CAST4(cutoffBase) + slowSines * 0.1, CAST4(1.0 - cutoffBase) - slowSines.zwyx * 0.1, slowSines * CAST4(0.5) + CAST4(0.5)) * CAST4(2.0) - CAST4(1.0); + + float leafMask = strengthLeaves * smoothstep(-1.2, -0.3, sin(dot(worldPos.xyz, foliageOffsetForward) + speedBase * time)); + float leafDistance = dot(localPos.xz, localPos.xz); + float baseMask = smoothstep(0.0, treeHeight, localPos.y); + + vec2 blendParamsA = vec2(treeRadius * treeRadius, treeRadius); + vec2 blendParamsB = vec2(treeRadius, treeRadius * treeRadius); + vec2 blendParams = mix(blendParamsA, blendParamsB, step(1.0, treeRadius)); + leafMask *= mix(smoothstep(blendParams.x, blendParams.y, leafDistance), baseMask, baseMask) * CalcLeavesUVWeight(uvs, uvBounds); + baseMask *= strengthBase; + + vec4 strengthMask = vec4(leafMask, leafMask, baseMask, baseMask); + return dot(strengthMask, vec4(fastSines.xy, slowSines.xy)) * foliageOffsetForward + + dot(strengthMask, vec4(fastSines.zw, slowSines.zw)) * foliageOffsetUp; +} diff --git a/modules/wallpaper-engine/shaders/common_fragment.h b/modules/wallpaper-engine/shaders/common_fragment.h new file mode 100644 index 0000000..6e35e52 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_fragment.h @@ -0,0 +1,132 @@ + +#define FORMAT_RGBA8888 0 +#define FORMAT_RGB888 1 +#define FORMAT_RGB565 2 + +#define FORMAT_ETC1_RGB8 3 +#define FORMAT_DXT5 4 +#define FORMAT_ETC2_RGBA8 5 +#define FORMAT_DXT3 6 +#define FORMAT_DXT1 7 + +#define FORMAT_RG88 8 +#define FORMAT_R8 9 +#define FORMAT_RG1616F 10 +#define FORMAT_R16F 11 + +#define FORMAT_BC7 12 + +vec3 DecompressNormal(vec4 normal) +{ +#if TEX1FORMAT >= FORMAT_ETC1_RGB8 && TEX1FORMAT <= FORMAT_DXT1 || TEX1FORMAT == FORMAT_BC7 + normal.yx = normal.yw * 2.0 - vec2(0.965, 1.0); +#else +#if TEX1FORMAT == FORMAT_RG88 + normal.xy = normal.rg * 2.0 - 1.0; +#else + normal.xy = normal.wy * 2.0 - 1.0; +#endif +#endif + normal.z = sqrt(saturate(1.0 - normal.x * normal.x - normal.y * normal.y)); + return normal.xyz; +} + +vec4 DecompressNormalWithMask(vec4 normal) +{ +#if TEX1FORMAT >= FORMAT_ETC1_RGB8 && TEX1FORMAT <= FORMAT_DXT1 || TEX1FORMAT == FORMAT_BC7 + normal.xw = normal.wx; + normal.xy = normal.xy * 2.0 - vec2(0.965, 1.0); +#else +#if TEX1FORMAT == FORMAT_RG88 + normal.xy = normal.gr * 2.0 - 1.0; +#else + normal.xw = normal.wx; + normal.xy = normal.xy * 2.0 - 1.0; +#endif +#endif + normal.z = sqrt(saturate(1.0 - normal.x * normal.x - normal.y * normal.y)); + return normal; +} + +float ComputeMaterialSpecularPower(const float roughness, const float metallic) +{ + return (1.01 - roughness) * mix(400.0, 250.0, metallic); +} + +float ComputeMaterialSpecularStrength(const float roughness, const float metallic) +{ + return (0.5 + metallic * 0.5) * (1.0 - roughness * 0.9); +} + +vec3 ComputeLight(const vec3 normal, const vec3 lightDelta, const vec3 color, const float radius) +{ + float lightDistance = length(lightDelta); + float lightAttn = saturate((radius - lightDistance) / radius); + return color * (saturate(dot(lightDelta / lightDistance, normal))) * lightAttn * lightAttn; +} + +vec3 ComputeLightSpecular(const vec3 normal, const vec3 lightDelta, const vec3 color, const float radius, const vec3 viewDir, const float specularPower, const float specularStrength, const float halfLambert, const float metallicTerm, inout vec3 specularResult) +{ + float lightDistance = length(lightDelta); + float lightAttn = saturate((radius - lightDistance) / radius); + vec3 lightDir = lightDelta / lightDistance; + float specular = max(0.0, dot(normalize(viewDir + lightDir), normal)); + specularResult += pow(specular, specularPower) * specularStrength * lightAttn * color; + float lightDot = dot(lightDir, normal); + float halfLambertLight = lightDot * 0.5 + 0.5; + lightDot = mix(lightDot, halfLambertLight, halfLambert); + float rim = metallicTerm * 2.0; + rim = pow((1.0 - saturate(dot(normal, viewDir))) * pow(halfLambertLight, 0.25), 6.0 - rim) * rim; + return color * (saturate(lightDot) + rim) * lightAttn * lightAttn; +} + +float ConvertSampleR8(vec4 _sample) +{ +#if HLSL_SM30 + return _sample.a; +#else + return _sample.r; +#endif +} + +vec4 ConvertTexture0Format(vec4 _sample) +{ +#if TEX0FORMAT == FORMAT_RG88 || TEX0FORMAT == FORMAT_RG1616F +#if HLSL_SM30 + return _sample.rrra; +#else + return _sample.rrrg; +#endif +#endif + +#if TEX0FORMAT == FORMAT_R8 || TEX0FORMAT == FORMAT_R16F +#if HLSL_SM30 + return vec4(1, 1, 1, _sample.a); +#else + return vec4(1, 1, 1, _sample.r); +#endif +#endif + return _sample; +} + +vec4 ConvertTextureFormat(const int format, vec4 _sample) +{ + if (format == FORMAT_RG88 || format == FORMAT_RG1616F) + { +#if HLSL_SM30 + return _sample.rrra; +#else + return _sample.rrrg; +#endif + } + + if (format == FORMAT_R8 || format == FORMAT_R16F) + { +#if HLSL_SM30 + return vec4(1, 1, 1, _sample.a); +#else + return vec4(1, 1, 1, _sample.r); +#endif + } + return _sample; +} diff --git a/modules/wallpaper-engine/shaders/common_particles.h b/modules/wallpaper-engine/shaders/common_particles.h new file mode 100644 index 0000000..c53bd06 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_particles.h @@ -0,0 +1,117 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform mat4 g_ModelMatrixInverse; + +uniform vec3 g_OrientationUp; +uniform vec3 g_OrientationRight; +uniform vec3 g_OrientationForward; + +uniform vec3 g_ViewUp; +uniform vec3 g_ViewRight; +uniform vec3 g_EyePosition; + +uniform vec4 g_RenderVar0; +uniform vec4 g_RenderVar1; +uniform vec4 g_Texture0Resolution; + +#if REFRACT +uniform float g_RefractAmount; // {"material":"ui_editor_properties_refract_amount","default":0.05,"range":[-1,1]} +#endif + +void ComputeParticleTangents(in vec3 rotation, inout mat3 mRotation, out vec3 right, out vec3 up) +{ + vec3 rCos = cos(rotation); + vec3 rSin = sin(rotation); + // Apply particle rotation + mRotation = mul(mul( + mat3(rCos.z, -rSin.z, 0, + rSin.z, rCos.z, 0, + 0, 0, 1), + mat3(1, 0, 0, + 0, rCos.x, -rSin.x, + 0, rSin.x, rCos.x)), + mat3(rCos.y, 0, rSin.y, + 0, 1, 0, + -rSin.y, 0, rCos.y)); + // Apply screen orientation + mRotation = mul(mRotation, mat3(g_OrientationRight, g_OrientationUp, g_OrientationForward)); + right = mul(vec3(1, 0, 0), mRotation); + up = mul(vec3(0, 1, 0), mRotation); +} + +void ComputeParticleTrailTangents(vec3 localPosition, vec3 localVelocity, out vec3 right, out vec3 up) +{ + //vec3 eyeDirection = mul(g_OrientationForward, CAST3X3(g_ModelMatrixInverse)); + vec3 eyeDirection = localPosition - mul(vec4(g_EyePosition, 1.0), g_ModelMatrixInverse).xyz; + right = cross(localVelocity, eyeDirection); + + right = normalize(right); + float trailLength = length(localVelocity); + localVelocity /= trailLength; + up = localVelocity * min(trailLength * g_RenderVar0.x, g_RenderVar0.y); +} + +vec3 ComputeParticlePosition(vec2 uvs, float textureRatio, vec4 positionAndSize, vec3 right, vec3 up) +{ + return positionAndSize.xyz + + (positionAndSize.w * right * (uvs.x-0.5) - + positionAndSize.w * up * (uvs.y-0.5) * textureRatio); +} + +void ComputeSpriteFrame(float lifetime, out vec4 uvs, out vec2 uvFrameSize, out float frameBlend) +{ + float numFrames = g_RenderVar1.z; + float frameWidth = g_RenderVar1.x; + float frameHeight = g_RenderVar1.y; + + float currentFrame = floor(lifetime * numFrames); + float nextFrame = min(numFrames - 1.0, currentFrame + 1.0); + +#if SPRITESHEETBLENDNPOT + float unpaddedWidth = g_Texture0Resolution.z / g_Texture0Resolution.x; + float scaledFrameWidth = frameWidth / unpaddedWidth; + uvs.y = floor(currentFrame * scaledFrameWidth) * frameHeight; + uvs.x = frac(currentFrame * scaledFrameWidth) * unpaddedWidth; + uvs.w = floor(nextFrame * scaledFrameWidth) * frameHeight; + uvs.z = frac(nextFrame * scaledFrameWidth) * unpaddedWidth; +#else + uvs.y = floor(currentFrame * frameWidth) * frameHeight; + uvs.x = frac(currentFrame * frameWidth); + uvs.w = floor(nextFrame * frameWidth) * frameHeight; + uvs.z = frac(nextFrame * frameWidth); +#endif + + frameBlend = frac(lifetime * numFrames); + uvFrameSize = vec2(frameWidth, frameHeight); +} + +void ComputeScreenRefractionTangents(in vec3 projectedPositionXYW, in mat3 matZRotation, out vec3 v_ScreenCoord, out vec4 v_ScreenTangents) +{ + v_ScreenCoord = projectedPositionXYW; +#ifdef HLSL + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif + + vec3 right = mul(matZRotation, g_ViewRight); + vec3 up = mul(matZRotation, g_ViewUp); + + + right = mul(right, CAST3X3(g_ModelMatrixInverse)); + up = mul(up, CAST3X3(g_ModelMatrixInverse)); + + right = normalize(right); + up = normalize(up); + + right.y = -right.y; + up.y = -up.y; + + v_ScreenTangents.xy = vec3(dot(right, g_ViewRight), + dot(up, -g_ViewRight), 0).xy; + v_ScreenTangents.zw = vec3(dot(right, g_ViewUp), + dot(up, -g_ViewUp), 0).xy; + +#if REFRACT + v_ScreenTangents *= g_RefractAmount; +#endif +} + diff --git a/modules/wallpaper-engine/shaders/common_pbr.h b/modules/wallpaper-engine/shaders/common_pbr.h new file mode 100644 index 0000000..43c31de --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_pbr.h @@ -0,0 +1,97 @@ + +#include "common.h" + +vec3 FresnelSchlick(float lightTheta, vec3 baseReflectance) +{ + return baseReflectance + (1.0 - baseReflectance) * pow(max(1.0 - lightTheta, 0.001), 5.0); +} + +vec3 PointSegmentDelta(vec3 pos, vec3 segmentA, vec3 segmentB) +{ + vec3 delta = segmentB - segmentA; + float v = dot(delta, delta); + if (v == 0.0) + return segmentA - pos; + return segmentA + saturate(dot(pos - segmentA, segmentB - segmentA) / v) * (segmentB - segmentA) - pos; +} + +float Distribution_GGX(vec3 N, vec3 H, float roughness) +{ + float rSqr = roughness * roughness; + float rSqr2 = rSqr * rSqr; + float NH = max(dot(N, H), 0.0); + float denominator = (NH * NH * (rSqr2 - 1.0) + 1.0); + return rSqr2 / (M_PI * denominator * denominator); +} + +float Schlick_GGX(float NV, float roughness) +{ + float roughnessBase = roughness + 1.0; + float roughnessScaled = (roughnessBase * roughnessBase) / 8.0; + return NV / (NV * (1.0 - roughnessScaled) + roughnessScaled); +} + +float GeoSmith(vec3 N, vec3 V, vec3 L, float roughness) +{ + return Schlick_GGX(max(dot(N, V), 0.001), roughness) * Schlick_GGX(max(dot(N, L), 0.001), roughness); +} + +// L = worldToLightVector, N = normalVector, V = worldToViewVector +vec3 ComputePBRLight(vec3 N, vec3 L, vec3 V, + vec3 albedo, vec3 lightColor, vec3 baseReflectance, float roughness, float metallic) +{ + float distance = length(L); + L = L / distance; + vec3 H = normalize(V + L); + + float NDF = Distribution_GGX(N, H, roughness); + float G = GeoSmith(N, V, L, roughness); + vec3 F = FresnelSchlick(max(dot(H, V), 0.0), baseReflectance); + vec3 numerator = NDF * G * F; + + float dNL = dot(N, L); + +#ifdef GRADIENT_SAMPLER + vec3 NL = CAST3(max(dNL * 0.5 + 0.5, 0.0)); +#if TEX4FORMAT == FORMAT_R8 || TEX4FORMAT == FORMAT_RG88 + NL = texSample2D(GRADIENT_SAMPLER, vec2(NL.x, 0.0)).rrr; +#else + NL = texSample2D(GRADIENT_SAMPLER, vec2(NL.x, 0.0)).rgb; +#endif + +#if RIMLIGHTING + float rimTerm = 1.0 - max(dot(N, V), 0.0); + rimTerm = pow(rimTerm, RIM_LIGHTING_EXPONENT) * RIM_LIGHTING_AMOUNT * NL.x * step(0.01, lightColor.x + lightColor.y + lightColor.z); + NL = max(NL, CAST3(rimTerm)); + metallic -= saturate(rimTerm); +#endif + vec3 denominator = 4.0 * max(dot(N, V), 0.0) * NL; + vec3 specular = numerator / max(denominator, CAST3(0.001)); +#else + float NL = max(dNL, 0.0); + +#if RIMLIGHTING + float rimTerm = 1.0 - max(dot(N, V), 0.0); + rimTerm = pow(rimTerm, RIM_LIGHTING_EXPONENT) * RIM_LIGHTING_AMOUNT * NL * step(0.01, lightColor.x + lightColor.y + lightColor.z); + NL = max(NL, rimTerm); + metallic -= saturate(rimTerm); +#endif + float denominator = 4.0 * max(dot(N, V), 0.0) * NL; + vec3 specular = numerator / max(denominator, 0.001); +#endif + + vec3 diffuse = (1.0 - metallic) * (CAST3(1.0) - F); + vec3 radiance = lightColor.xyz / (distance * distance); + return (diffuse * albedo / M_PI + specular) * radiance * NL; +} + +vec3 CombineLighting(vec3 light, vec3 ambient) +{ +#if HDR + float lightLen = length(light); + float overbright = (saturate(lightLen - 2.0) * 0.5) / max(0.01, lightLen); + return saturate(ambient + light) + (light * overbright); +#else + return ambient + light; +#endif +} diff --git a/modules/wallpaper-engine/shaders/common_pbr_2.h b/modules/wallpaper-engine/shaders/common_pbr_2.h new file mode 100644 index 0000000..9d7f773 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_pbr_2.h @@ -0,0 +1,381 @@ + +#include "common.h" + +vec3 FresnelSchlick(float lightTheta, vec3 baseReflectance) +{ + return baseReflectance + (1.0 - baseReflectance) * pow(max(1.0 - lightTheta, 0.001), 5.0); +} + +vec3 PointSegmentDelta(vec3 pos, vec3 segmentA, vec3 segmentB) +{ + vec3 delta = segmentB - segmentA; + float v = dot(delta, delta); + if (v == 0.0) + return segmentA - pos; + return segmentA + saturate(dot(pos - segmentA, segmentB - segmentA) / v) * (segmentB - segmentA) - pos; +} + +float Distribution_GGX(vec3 N, vec3 H, float roughness) +{ + float rSqr = roughness * roughness; + float rSqr2 = rSqr * rSqr; + float NH = max(dot(N, H), 0.0); + float denominator = (NH * NH * (rSqr2 - 1.0) + 1.0); + return rSqr2 / (M_PI * denominator * denominator); +} + +float Schlick_GGX(float NV, float roughness) +{ + float roughnessBase = roughness + 1.0; + float roughnessScaled = (roughnessBase * roughnessBase) / 8.0; + return NV / (NV * (1.0 - roughnessScaled) + roughnessScaled); +} + +float GeoSmith(vec3 N, vec3 V, vec3 L, float roughness) +{ + return Schlick_GGX(max(dot(N, V), 0.001), roughness) * Schlick_GGX(max(dot(N, L), 0.001), roughness); +} + +#ifdef SHADOW_ATLAS_SAMPLER +#define SHADOW_ATLAS_ANTIALIAS 0 +#if SHADOW_ATLAS_ANTIALIAS +float random(vec2 p){return frac(cos(dot(p,vec2(23.14069263277926,2.665144142690225)))*12345.6789);} +#endif +float PerformShadowMapping(vec3 projectedCoords, vec4 atlasTransform) +{ + projectedCoords.xy *= atlasTransform.zw; + projectedCoords.xy += atlasTransform.xy; + +#if SHADOW_ATLAS_ANTIALIAS + vec2 scaled = projectedCoords.xy * SHADOW_ATLAS_TEXEL.zw; + vec2 fr = frac(scaled); + vec4 boundsLowHigh = vec4(scaled - fr, 0, 0); + boundsLowHigh.zw = boundsLowHigh.xy + CAST2(1.0); + + vec4 rands = vec4(random(boundsLowHigh.xy), random(boundsLowHigh.zy), random(boundsLowHigh.xw), random(boundsLowHigh.zw)); + vec2 interpRandX = mix(rands.xy, rands.zw, fr.y); + float interpRand = mix(interpRandX.x, interpRandX.y, fr.x); + + vec2 offsets = CAST2(interpRand) * SHADOW_ATLAS_TEXEL.xy; +#else + vec2 offsets = SHADOW_ATLAS_TEXEL.xy; +#endif + + //return texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy, projectedCoords.z).r; + + //return ( + // texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy - offsets, projectedCoords.z).r + + // texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(offsets.x, -offsets.y), projectedCoords.z).r + + // texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(-offsets.x, offsets.y), projectedCoords.z).r + + // texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + offsets.x, projectedCoords.z).r + // ) + // / 4.0; + +#if LIGHTS_SHADOW_MAPPING_QUALITY == 1 + return texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy, projectedCoords.z).r; +#else + vec2 roundOffset = offsets * CAST2(0.81616); + offsets *= CAST2(1.02323); + return ( + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy - roundOffset, projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(0, -offsets.y), projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(roundOffset.x, -roundOffset.y), projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(-offsets.x, 0), projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy, projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(offsets.x, 0), projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(-roundOffset.x, roundOffset.y), projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + vec2(0, offsets.y), projectedCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, projectedCoords.xy + roundOffset, projectedCoords.z).r + ) + / 9.0; +#endif +} + +float PerformPointShadowMapping(vec4 shadowMapCoords) +{ +#if LIGHTS_SHADOW_MAPPING_QUALITY == 1 + return texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy, shadowMapCoords.z).r; +#else + vec2 offsets = SHADOW_ATLAS_TEXEL.xy; + vec2 roundOffset = offsets * CAST2(0.81616); + offsets *= CAST2(1.02323); + return ( + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy - roundOffset, shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + vec2(0, -offsets.y), shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + vec2(roundOffset.x, -roundOffset.y), shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + vec2(-offsets.x, 0), shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy, shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + vec2(offsets.x, 0), shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + vec2(-roundOffset.x, roundOffset.y), shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + vec2(0, offsets.y), shadowMapCoords.z).r + + texSample2DCompare(SHADOW_ATLAS_SAMPLER, shadowMapCoords.xy + roundOffset, shadowMapCoords.z).r + ) + / 9.0; +#endif +} +#endif + +vec3 CalculateProjectedCoords(vec3 worldPos, mat4 shadowViewProjection) +{ + vec4 proj = mul(vec4(worldPos, 1.0), shadowViewProjection); + proj.xyz /= proj.w; + + proj.xy = proj.xy * vec2(0.5, -0.5) + CAST2(0.5); + + // step(proj.w, 0.0) to identify behind projection + proj.y = mix(proj.y, 2.0, step(proj.w, 0.0)); + + return proj.xyz; +} + +vec4 CalculateProjectedCoordsCascades(vec3 worldPos, mat4 shadowViewProjection) +{ + vec4 proj = mul(vec4(worldPos, 1.0), shadowViewProjection); + proj.xyz /= proj.w; + + // Disable shadow outside bounds + proj.w = step(1.0, dot(CAST3(1.0), step(0.99, abs(proj.xyz)))); + + proj.xy = proj.xy * CAST2(0.5) + CAST2(0.5); + proj.y = 1.0 - proj.y; + + return proj; +} + +vec4 CalculateProjectedCoordsPoint(vec3 worldPos, vec3 lightOrigin, vec4 projectionInfo, vec4 atlasTransform) +{ + vec3 lightDelta = worldPos - lightOrigin; + vec3 lightDeltaAbs = abs(lightDelta); + vec2 viewportScale = vec2(0.5, 0.3333); + +#if LIGHTS_SHADOW_MAPPING_QUALITY == 2 || LIGHTS_SHADOW_MAPPING_QUALITY == 1 + vec2 viewportPointCompensation = vec2(0.47, -0.47); +#elif LIGHTS_SHADOW_MAPPING_QUALITY == 3 + vec2 viewportPointCompensation = vec2(0.48, -0.48); +#else + vec2 viewportPointCompensation = vec2(0.49, -0.49); +#endif + + vec2 viewportOffset; + vec2 viewportOffsetSteps = atlasTransform.zw * viewportScale; + mat4 viewMatrix; + + if (lightDeltaAbs.x >= lightDeltaAbs.y && lightDeltaAbs.x >= lightDeltaAbs.z) + { + if (lightDelta.x >= 0.0) + { + viewMatrix = mat4( + 0, 0, -1, 0, + 0, 1, 0, 0, + 1, 0, 0, 0, + -lightOrigin.z, -lightOrigin.y, lightOrigin.x, 1 + ); + viewportOffset = vec2(0.0, 0.0); + } + else + { + viewMatrix = mat4( + 0, 0, 1, 0, + 0, 1, 0, 0, + -1, 0, 0, 0, + lightOrigin.z, -lightOrigin.y, -lightOrigin.x, 1 + ); + viewportOffset = vec2(viewportOffsetSteps.x, 0.0); + } + } + else if (lightDeltaAbs.y >= lightDeltaAbs.x && lightDeltaAbs.y >= lightDeltaAbs.z) + { + if (lightDelta.y >= 0.0) + { + viewMatrix = mat4( + 1, 0, 0, 0, + 0, 0, -1, 0, + 0, 1, 0, 0, + -lightOrigin.x, -lightOrigin.z, lightOrigin.y, 1 + ); + viewportOffset = vec2(0.0, viewportOffsetSteps.y); + } + else + { + viewMatrix = mat4( + 1, 0, 0, 0, + 0, 0, 1, 0, + 0, -1, 0, 0, + -lightOrigin.x, lightOrigin.z, -lightOrigin.y, 1 + ); + viewportOffset = vec2(viewportOffsetSteps.x, viewportOffsetSteps.y); + } + } + else + { + if (lightDelta.z >= 0.0) + { + viewMatrix = mat4( + -1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, -1, 0, + lightOrigin.x, -lightOrigin.y, lightOrigin.z, 1 + ); + viewportOffset = vec2(0.0, viewportOffsetSteps.y * 2); + } + else + { + viewMatrix = mat4( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, 1, 0, + -lightOrigin.x, -lightOrigin.y, -lightOrigin.z, 1 + ); + viewportOffset = vec2(viewportOffsetSteps.x, viewportOffsetSteps.y * 2); + } + } + + mat4 project = mat4( + 1, 0, 0, 0, + 0, 1, 0, 0, + 0, 0, projectionInfo.x, projectionInfo.z, + 0, 0, projectionInfo.y, projectionInfo.w + ); + + vec4 projectedCoords = mul(mul(vec4(worldPos, 1.0), viewMatrix), project); + projectedCoords.xyz /= projectedCoords.w; + + projectedCoords.xy = projectedCoords.xy * viewportPointCompensation + CAST2(0.5); + projectedCoords.y = mix(projectedCoords.y, 2.0, step(projectedCoords.w, 0.0)); + + projectedCoords.xy *= atlasTransform.zw * viewportScale; + projectedCoords.xy += atlasTransform.xy + viewportOffset; + return projectedCoords; +} + +// L = worldToLightVector, N = normalVector, V = worldToViewVector +vec3 ComputePBRLightShadow(vec3 N, vec3 L, vec3 V, vec3 albedo, vec3 lightColor, + float radius, float exponent, vec3 specularTint, vec3 baseReflectance, float roughness, float metallic, float shadowFactor) +{ + float distance = length(L); + L = L / distance; + vec3 H = normalize(V + L); + + float falloff = saturate(1.0 - distance / radius); + // Ensure x > 0 && y >= 0 to avoid undefined behavior +#if HLSL + vec3 radiance = lightColor * pow(falloff + 1.17549435e-38, exponent); +#else + float flt_min = 6.103515625e-5; + vec3 radiance = lightColor * mix(0.0, pow(falloff + flt_min, exponent), step(0.0, falloff - flt_min)); +#endif + + float NDF = shadowFactor * Distribution_GGX(N, H, roughness); + float G = GeoSmith(N, V, L, roughness); + vec3 F = FresnelSchlick(max(dot(H, V), 0.0), baseReflectance); + vec3 numerator = NDF * G * F; + + vec3 diffuse = (1.0 - metallic) * (CAST3(1.0) - F); + float dNL = dot(N, L); + +#if DOUBLESIDEDLIGHTING + dNL = abs(dNL); +#endif + +#ifdef GRADIENT_SAMPLER + vec3 NL = CAST3(max(min(shadowFactor, dNL) * 0.5 + 0.5, 0.0)); +#if TEX4FORMAT == FORMAT_R8 || TEX4FORMAT == FORMAT_RG88 + NL = texSample2D(GRADIENT_SAMPLER, vec2(NL.x, 0.0)).rrr; +#else + NL = texSample2D(GRADIENT_SAMPLER, vec2(NL.x, 0.0)).rgb; +#endif + +#if RIMLIGHTING + float rimTerm = 1.0 - max(dot(N, V), 0.0); + rimTerm = shadowFactor * pow(rimTerm, RIM_LIGHTING_EXPONENT) * RIM_LIGHTING_AMOUNT * NL.x * step(0.001, lightColor.x + lightColor.y + lightColor.z); + NL = max(NL, CAST3(rimTerm)); + metallic -= saturate(rimTerm); +#endif + vec3 denominator = 4.0 * max(dot(N, V), 0.0) * NL; + vec3 specular = numerator / max(denominator, CAST3(0.001)); +#else + float NL = max(dNL * shadowFactor, 0.0); + +#if RIMLIGHTING + float rimTerm = 1.0 - max(dot(N, V), 0.0); + rimTerm = shadowFactor * pow(rimTerm, RIM_LIGHTING_EXPONENT) * RIM_LIGHTING_AMOUNT * NL * step(0.001, lightColor.x + lightColor.y + lightColor.z); + NL = max(NL, rimTerm); + metallic -= saturate(rimTerm); +#endif + float denominator = 4.0 * max(dot(N, V), 0.0) * NL; + vec3 specular = numerator / max(denominator, 0.001); +#endif + + return (diffuse * albedo / M_PI + specular * specularTint) * radiance * NL; +} + +// L = worldToLightVector, N = normalVector, V = worldToViewVector +vec3 ComputePBRLightShadowInfinite(vec3 N, vec3 L, vec3 V, vec3 albedo, vec3 lightColor, + vec3 specularTint, vec3 baseReflectance, float roughness, float metallic, float shadowFactor) +{ + vec3 H = normalize(V + L); + float NDF = shadowFactor * Distribution_GGX(N, H, roughness); + float G = GeoSmith(N, V, L, roughness); + vec3 F = FresnelSchlick(max(dot(H, V), 0.0), baseReflectance); + vec3 numerator = NDF * G * F; + + float dNL = dot(N, L); + +#if DOUBLESIDEDLIGHTING + dNL = abs(dNL); +#endif + +#ifdef GRADIENT_SAMPLER + vec3 NL = CAST3(max(min(shadowFactor, dNL) * 0.5 + 0.5, 0.0)); +#if TEX4FORMAT == FORMAT_R8 || TEX4FORMAT == FORMAT_RG88 + NL = texSample2D(GRADIENT_SAMPLER, vec2(NL.x, 0.0)).rrr; +#else + NL = texSample2D(GRADIENT_SAMPLER, vec2(NL.x, 0.0)).rgb; +#endif + +#if RIMLIGHTING + float rimTerm = 1.0 - max(dot(N, V), 0.0); + rimTerm = shadowFactor * pow(rimTerm, RIM_LIGHTING_EXPONENT) * RIM_LIGHTING_AMOUNT * NL.x * step(0.001, lightColor.x + lightColor.y + lightColor.z); + NL = max(NL, CAST3(rimTerm)); + metallic -= saturate(rimTerm); +#endif + vec3 denominator = 4.0 * max(dot(N, V), 0.0) * NL; + vec3 specular = numerator / max(denominator, CAST3(0.001)); +#else + float NL = max(dNL * shadowFactor, 0.0); + +#if RIMLIGHTING + float rimTerm = 1.0 - max(dot(N, V), 0.0); + rimTerm = shadowFactor * pow(rimTerm, RIM_LIGHTING_EXPONENT) * RIM_LIGHTING_AMOUNT * NL * step(0.001, lightColor.x + lightColor.y + lightColor.z); + NL = max(NL, rimTerm); + metallic -= saturate(rimTerm); +#endif + float denominator = 4.0 * max(dot(N, V), 0.0) * NL; + vec3 specular = numerator / max(denominator, 0.001); +#endif + + vec3 diffuse = (1.0 - metallic) * (CAST3(1.0) - F); + return (diffuse * albedo / M_PI + specular * specularTint) * lightColor * NL; +} + +vec3 CombineLighting(vec3 light, vec3 ambient) +{ +#if HDR + float lightLen = length(light); + float overbright = (saturate(lightLen - 2.0) * 0.5) / max(0.01, lightLen); + return saturate(ambient + light) + (light * overbright); +#else + return ambient + light; +#endif +} + +vec3 CombineLighting(vec3 light, vec3 baseAmbient, vec3 ambient) +{ +#if HDR + float lightLen = length(light); + float overbright = (saturate(lightLen - 2.0) * 0.5) / max(0.01, lightLen); + return max(baseAmbient, saturate(ambient + light)) + (light * overbright); +#else + return max(baseAmbient, ambient + light); +#endif +} diff --git a/modules/wallpaper-engine/shaders/common_perspective.h b/modules/wallpaper-engine/shaders/common_perspective.h new file mode 100644 index 0000000..779e6ed --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_perspective.h @@ -0,0 +1,65 @@ + +mat3 squareToQuad(vec2 p0, vec2 p1, vec2 p2, vec2 p3) { + mat3 m = mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0); + float dx0 = p0.x; + float dy0 = p0.y; + float dx1 = p1.x; + float dy1 = p1.y; + + float dx2 = p3.x; + float dy2 = p3.y; + float dx3 = p2.x; + float dy3 = p2.y; + + float diffx1 = dx1 - dx3; + float diffy1 = dy1 - dy3; + float diffx2 = dx2 - dx3; + float diffy2 = dy2 - dy3; + + float det = diffx1*diffy2 - diffx2*diffy1; + float sumx = dx0 - dx1 + dx3 - dx2; + float sumy = dy0 - dy1 + dy3 - dy2; + + if (det == 0.0 || (sumx == 0.0 && sumy == 0.0)) { + m[0][0] = dx1 - dx0; + m[0][1] = dy1 - dy0; + m[0][2] = 0.0; + m[1][0] = dx3 - dx1; + m[1][1] = dy3 - dy1; + m[1][2] = 0.0; + m[2][0] = dx0; + m[2][1] = dy0; + m[2][2] = 1.0; + return m; + } else { + float ovdet = 1.0 / det; + float g = (sumx * diffy2 - diffx2 * sumy) * ovdet; + float h = (diffx1 * sumy - sumx * diffy1) * ovdet; + + m[0][0] = dx1 - dx0 + g * dx1; + m[0][1] = dy1 - dy0 + g * dy1; + m[0][2] = g; + m[1][0] = dx2 - dx0 + h * dx2; + m[1][1] = dy2 - dy0 + h * dy2; + m[1][2] = h; + m[2][0] = dx0; + m[2][1] = dy0; + m[2][2] = 1.0; + return m; + } +} + +#if HLSL +mat3 inverse(mat3 m) { + float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2]; + float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2]; + float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2]; + float b01 = a22 * a11 - a12 * a21; + float b11 = -a22 * a10 + a12 * a20; + float b21 = a21 * a10 - a11 * a20; + float det = a00 * b01 + a01 * b11 + a02 * b21; + return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11), + b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10), + b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det; +} +#endif diff --git a/modules/wallpaper-engine/shaders/common_vertex.h b/modules/wallpaper-engine/shaders/common_vertex.h new file mode 100644 index 0000000..70254d8 --- /dev/null +++ b/modules/wallpaper-engine/shaders/common_vertex.h @@ -0,0 +1,15 @@ +mat3 BuildTangentSpace(const vec3 normal, const vec4 signedTangent) +{ + vec3 tangent = signedTangent.xyz; + vec3 bitangent = cross(normal, tangent) * signedTangent.w; + return mat3(tangent, bitangent, normal); +} + +mat3 BuildTangentSpace(const mat3 modelTransform, const vec3 normal, const vec4 signedTangent) +{ + vec3 tangent = signedTangent.xyz; + vec3 bitangent = cross(normal, tangent) * signedTangent.w; + return mat3(mul(tangent, modelTransform), + mul(bitangent, modelTransform), + mul(normal, modelTransform)); +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/compilerbackdrop.frag b/modules/wallpaper-engine/shaders/compilerbackdrop.frag new file mode 100644 index 0000000..43d3f21 --- /dev/null +++ b/modules/wallpaper-engine/shaders/compilerbackdrop.frag @@ -0,0 +1,9 @@ + +uniform float g_Alpha; + +varying vec2 v_TexCoord; + +void main() { + float fade = smoothstep(0.2, 0.3, v_TexCoord.y) * smoothstep(0.8, 0.7, v_TexCoord.y); + gl_FragColor = vec4(0, 0, 0, fade * g_Alpha); +} diff --git a/modules/wallpaper-engine/shaders/compilerbackdrop.vert b/modules/wallpaper-engine/shaders/compilerbackdrop.vert new file mode 100644 index 0000000..affc303 --- /dev/null +++ b/modules/wallpaper-engine/shaders/compilerbackdrop.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/composelayer.frag b/modules/wallpaper-engine/shaders/composelayer.frag new file mode 100644 index 0000000..5aef216 --- /dev/null +++ b/modules/wallpaper-engine/shaders/composelayer.frag @@ -0,0 +1,14 @@ + +varying vec2 v_TexCoord; +varying vec3 v_ScreenCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} + +void main() { + vec2 texCoord = v_ScreenCoord.xy / v_ScreenCoord.z * vec2(0.5, 0.5) + 0.5; + gl_FragColor = texSample2D(g_Texture0, texCoord); + +#if CLEARALPHA == 1 + gl_FragColor.a = 0; +#endif +} diff --git a/modules/wallpaper-engine/shaders/composelayer.vert b/modules/wallpaper-engine/shaders/composelayer.vert new file mode 100644 index 0000000..944aaa9 --- /dev/null +++ b/modules/wallpaper-engine/shaders/composelayer.vert @@ -0,0 +1,23 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec3 v_ScreenCoord; + +void main() { + v_ScreenCoord = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix).xyw; + vec3 position = vec3(a_TexCoord, 0.0); + +#ifdef HLSL + position.y = 1.0 - position.y; + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif + + position.xy = position.xy * 2.0 - 1.0; + gl_Position = vec4(position, 1.0); + + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/declarations.json b/modules/wallpaper-engine/shaders/declarations.json new file mode 100644 index 0000000..ad77f55 --- /dev/null +++ b/modules/wallpaper-engine/shaders/declarations.json @@ -0,0 +1,167 @@ +{ + "shaders": [{ + "value": "default", + "shader": "generic4", + "label": "Generic", + "combos": {}, + "textures": [{ + "suffix": "", + "formats": [{"value":"rgba8888", "label":"ui_editor_importer_texture_format_rgba8888"}, + {"value":"rg88", "label":"ui_editor_importer_texture_format_rg88"}, + {"value":"dxt5", "label":"ui_editor_importer_texture_format_dxt5"}], + "config": { + "format": "dxt5" + } + }] + }], + "imageshaders": [{ + "value": "imagegeneric", + "shader": "genericimage4", + "label": "Image", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": {}, + "textures": [{ + "suffix": "", + "formats": [{"value":"rgba8888", "label":"ui_editor_importer_texture_format_rgba8888"}, {"value":"dxt5", "label":"ui_editor_importer_texture_format_dxt5"}, {"value":"dxt1", "label":"ui_editor_importer_texture_format_dxt1"}], + "config": { + "clampuvs" : true, + "nonpoweroftwo": true, + "halfmip": true + } + }] + }], + "imageshadersrg88": [{ + "value": "imagegeneric", + "shader": "genericimage4", + "label": "Image", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": {}, + "textures": [{ + "suffix": "", + "formats": [{"value":"rg88", "label":"ui_editor_importer_texture_format_rg88"}], + "config": { + "clampuvs" : true, + "nonpoweroftwo": true, + "halfmip": true + } + }] + }], + "imageshadersr8": [{ + "value": "imagegeneric", + "shader": "genericimage4", + "label": "Image", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": {}, + "textures": [{ + "suffix": "", + "formats": [{"value":"r8", "label":"ui_editor_importer_texture_format_r8"}], + "config": { + "clampuvs" : true, + "nonpoweroftwo": true, + "nomip" : true, + "halfmip": true, + "format": "r8" + } + }] + }], + "imageshadersn": [{ + "value": "imagegeneric", + "shader": "genericimage4", + "label": "Image (normal map)", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": {}, + "textures": [{ + "suffix": "", + "formats": [{"value":"rg88n", "label":"ui_editor_importer_texture_format_rg88"}, {"value":"rgba8888n", "label":"ui_editor_importer_texture_format_rgba8888"}, {"value":"dxt5n", "label":"ui_editor_importer_texture_format_dxt5"}], + "config": { + "clampuvs" : true, + "nonpoweroftwo": true, + "halfmip": true, + "format": "rg88n" + } + }] + }], + "animatedimageshaders": [{ + "value": "imagegenericspritesheet", + "shader": "genericimage4", + "label": "Image (animated)", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "SPRITESHEET": 1 + }, + "textures": [{ + "suffix": "", + "formats": [{"value":"rgba8888", "label":"ui_editor_importer_texture_format_rgba8888"}, {"value":"dxt5", "label":"ui_editor_importer_texture_format_dxt5"}, {"value":"dxt1", "label":"ui_editor_importer_texture_format_dxt1"}], + "config": { + "nonpoweroftwo": true, + "nointerpolation" : true, + "clampuvs" : true, + "nomip" : true, + "halfmip": true, + "format": "rgba8888" + } + }] + }], + "animatedimageshaderssmooth": [{ + "value": "imagegenericspritesheet", + "shader": "genericimage4", + "label": "Image (animated)", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "SPRITESHEET": 1 + }, + "textures": [{ + "suffix": "", + "formats": [{"value":"rgba8888", "label":"ui_editor_importer_texture_format_rgba8888"}, {"value":"dxt5", "label":"ui_editor_importer_texture_format_dxt5"}], + "config": { + "nonpoweroftwo": true, + "clampuvs" : true, + "nomip" : true, + "halfmip": true, + "format": "rgba8888" + } + }] + }], + "animatedimageshadersn": [{ + "value": "imagegenericspritesheet", + "shader": "genericimage4", + "label": "Image (animated, normal map)", + "blending": "translucent", + "depthtest": "disabled", + "depthwrite": "disabled", + "cullmode": "nocull", + "combos": { + "SPRITESHEET": 1 + }, + "textures": [{ + "suffix": "", + "formats": [{"value":"rgba8888n", "label":"ui_editor_importer_texture_format_rgba8888"}, {"value":"dxt5n", "label":"ui_editor_importer_texture_format_dxt5"}], + "config": { + "nonpoweroftwo": true, + "nointerpolation" : true, + "clampuvs" : true, + "nomip" : true, + "halfmip": true, + "format": "rgba8888" + } + }] + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/downsample_eighth_blur_v.frag b/modules/wallpaper-engine/shaders/downsample_eighth_blur_v.frag new file mode 100644 index 0000000..87133cd --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_eighth_blur_v.frag @@ -0,0 +1,22 @@ + +varying vec2 v_TexCoord[13]; + +uniform sampler2D g_Texture0; + +void main() { + vec3 albedo = texSample2D(g_Texture0, v_TexCoord[0]).rgb * 0.006299 + + texSample2D(g_Texture0, v_TexCoord[1]).rgb * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[2]).rgb * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[3]).rgb * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[4]).rgb * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[5]).rgb * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[6]).rgb * 0.171834 + + texSample2D(g_Texture0, v_TexCoord[7]).rgb * 0.156756 + + texSample2D(g_Texture0, v_TexCoord[8]).rgb * 0.119007 + + texSample2D(g_Texture0, v_TexCoord[9]).rgb * 0.075189 + + texSample2D(g_Texture0, v_TexCoord[10]).rgb * 0.039533 + + texSample2D(g_Texture0, v_TexCoord[11]).rgb * 0.017298 + + texSample2D(g_Texture0, v_TexCoord[12]).rgb * 0.006299; + + gl_FragColor = vec4(albedo, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/downsample_eighth_blur_v.vert b/modules/wallpaper-engine/shaders/downsample_eighth_blur_v.vert new file mode 100644 index 0000000..a66084f --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_eighth_blur_v.vert @@ -0,0 +1,26 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec2 g_TexelSize; + +varying vec2 v_TexCoord[13]; + +void main() { + gl_Position = vec4(a_Position, 1); + + float localTexel = g_TexelSize.x * 8.0; + v_TexCoord[0] = vec2(a_TexCoord.x - localTexel * 6.0, a_TexCoord.y); + v_TexCoord[1] = vec2(a_TexCoord.x - localTexel * 5.0, a_TexCoord.y); + v_TexCoord[2] = vec2(a_TexCoord.x - localTexel * 4.0, a_TexCoord.y); + v_TexCoord[3] = vec2(a_TexCoord.x - localTexel * 3.0, a_TexCoord.y); + v_TexCoord[4] = vec2(a_TexCoord.x - localTexel * 2.0, a_TexCoord.y); + v_TexCoord[5] = vec2(a_TexCoord.x - localTexel, a_TexCoord.y); + v_TexCoord[6] = vec2(a_TexCoord.x, a_TexCoord.y); + v_TexCoord[7] = vec2(a_TexCoord.x + localTexel, a_TexCoord.y); + v_TexCoord[8] = vec2(a_TexCoord.x + localTexel * 2.0, a_TexCoord.y); + v_TexCoord[9] = vec2(a_TexCoord.x + localTexel * 3.0, a_TexCoord.y); + v_TexCoord[10] = vec2(a_TexCoord.x + localTexel * 4.0, a_TexCoord.y); + v_TexCoord[11] = vec2(a_TexCoord.x + localTexel * 5.0, a_TexCoord.y); + v_TexCoord[12] = vec2(a_TexCoord.x + localTexel * 6.0, a_TexCoord.y); +} diff --git a/modules/wallpaper-engine/shaders/downsample_quarter.frag b/modules/wallpaper-engine/shaders/downsample_quarter.frag new file mode 100644 index 0000000..5972ea8 --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_quarter.frag @@ -0,0 +1,14 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; + +void main() { + vec3 albedo = texSample2D(g_Texture0, v_TexCoord[0]).rgb + + texSample2D(g_Texture0, v_TexCoord[1]).rgb + + texSample2D(g_Texture0, v_TexCoord[2]).rgb + + texSample2D(g_Texture0, v_TexCoord[3]).rgb; + albedo *= 0.25; + + gl_FragColor = vec4(albedo, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/downsample_quarter.vert b/modules/wallpaper-engine/shaders/downsample_quarter.vert new file mode 100644 index 0000000..a0fca3f --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_quarter.vert @@ -0,0 +1,15 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec2 g_TexelSize; + +varying vec2 v_TexCoord[4]; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord[0] = a_TexCoord - g_TexelSize * 2; + v_TexCoord[1] = a_TexCoord + g_TexelSize * 2; + v_TexCoord[2] = a_TexCoord + vec2(-g_TexelSize.x, g_TexelSize.y) * 2; + v_TexCoord[3] = a_TexCoord + vec2(g_TexelSize.x, -g_TexelSize.y) * 2; +} diff --git a/modules/wallpaper-engine/shaders/downsample_quarter_bloom.frag b/modules/wallpaper-engine/shaders/downsample_quarter_bloom.frag new file mode 100644 index 0000000..e6d06f7 --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_quarter_bloom.frag @@ -0,0 +1,26 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; + +uniform float g_BloomStrength; // {"material":"bloomstrength","default":2,"range":[0,4]} +uniform float g_BloomThreshold; // {"material":"bloomthreshold","default":0.65,"range":[0,0.999]} +uniform vec3 g_BloomTint; // {"material":"bloomtint","default":"1 1 1"} + +void main() { + vec3 albedo = texSample2D(g_Texture0, v_TexCoord[0]).rgb + + texSample2D(g_Texture0, v_TexCoord[1]).rgb + + texSample2D(g_Texture0, v_TexCoord[2]).rgb + + texSample2D(g_Texture0, v_TexCoord[3]).rgb; + albedo *= 0.25; + + float scale = max(max(albedo.x, albedo.y), albedo.z); + albedo *= saturate(scale - g_BloomThreshold); + + // http://stackoverflow.com/a/34183839 + float grayscale = dot(vec3(0.2989, 0.5870, 0.1140), albedo); + float sat = 1.0; + albedo = -grayscale * sat + albedo * (1.0 + sat); + + gl_FragColor = vec4(max(CAST3(0), albedo * g_BloomStrength * g_BloomTint), 1.0); +} diff --git a/modules/wallpaper-engine/shaders/downsample_quarter_bloom.vert b/modules/wallpaper-engine/shaders/downsample_quarter_bloom.vert new file mode 100644 index 0000000..d02687b --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_quarter_bloom.vert @@ -0,0 +1,15 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec2 g_TexelSize; + +varying vec2 v_TexCoord[4]; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord[0] = a_TexCoord - g_TexelSize; + v_TexCoord[1] = a_TexCoord + g_TexelSize; + v_TexCoord[2] = a_TexCoord + vec2(-g_TexelSize.x, g_TexelSize.y); + v_TexCoord[3] = a_TexCoord + vec2(g_TexelSize.x, -g_TexelSize.y); +} diff --git a/modules/wallpaper-engine/shaders/downsample_quarter_linear.frag b/modules/wallpaper-engine/shaders/downsample_quarter_linear.frag new file mode 100644 index 0000000..6998ee2 --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_quarter_linear.frag @@ -0,0 +1,14 @@ + +varying vec2 v_TexCoord[4]; + +uniform sampler2D g_Texture0; + +void main() { + vec3 albedo = texSample2D(g_Texture0, v_TexCoord[0]).rgb + + texSample2D(g_Texture0, v_TexCoord[1]).rgb + + texSample2D(g_Texture0, v_TexCoord[2]).rgb + + texSample2D(g_Texture0, v_TexCoord[3]).rgb; + albedo *= 0.25; + + gl_FragColor = vec4(pow(albedo, 1/2.2), 1.0); +} diff --git a/modules/wallpaper-engine/shaders/downsample_quarter_linear.vert b/modules/wallpaper-engine/shaders/downsample_quarter_linear.vert new file mode 100644 index 0000000..a0fca3f --- /dev/null +++ b/modules/wallpaper-engine/shaders/downsample_quarter_linear.vert @@ -0,0 +1,15 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec2 g_TexelSize; + +varying vec2 v_TexCoord[4]; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord[0] = a_TexCoord - g_TexelSize * 2; + v_TexCoord[1] = a_TexCoord + g_TexelSize * 2; + v_TexCoord[2] = a_TexCoord + vec2(-g_TexelSize.x, g_TexelSize.y) * 2; + v_TexCoord[3] = a_TexCoord + vec2(g_TexelSize.x, -g_TexelSize.y) * 2; +} diff --git a/modules/wallpaper-engine/shaders/editor/meshviewportshading.frag b/modules/wallpaper-engine/shaders/editor/meshviewportshading.frag new file mode 100644 index 0000000..b724b54 --- /dev/null +++ b/modules/wallpaper-engine/shaders/editor/meshviewportshading.frag @@ -0,0 +1,35 @@ + +uniform mediump float g_Alpha; + +varying vec4 v_ScreenPos; +varying vec4 v_ScreenNorm; + +void main() { + gl_FragColor = vec4(0, 0, 0, g_Alpha); + + vec3 screenPos = v_ScreenPos.xyz / v_ScreenPos.w; + vec3 screenNorm = normalize(v_ScreenNorm.xyz); + + float light = dot(screenNorm, normalize(vec3(0.707, 0.707, 0.707))); + + float lightPowd = light; + lightPowd = pow(abs(lightPowd), 2.0) * sign(lightPowd); + + light = light * 0.5 + 0.5; + lightPowd = lightPowd * 0.5 + 0.5; + + vec3 shadow = vec3(1, 1, 1); + vec3 mid = vec3(1, 0.2, 0); + vec3 high = vec3(0, 0, 1.5); + + vec3 res = mix(mix(shadow, mid, smoothstep(0, 0.5, lightPowd)), high, smoothstep(0.5, 1.0, lightPowd)); + + //gl_FragColor.rgb = screenNorm.rgb * 0.5 + 0.5; + //gl_FragColor.rgb = pow(gl_FragColor.rgb, 2.0); + //gl_FragColor.b = -screenNorm.b; + //gl_FragColor.a *= 0.9; + + //light = light * 0.5 + 0.5; + res = vec3(1, 1, 1); + gl_FragColor.rgb = res * pow(light, 0.7); +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/editor/meshviewportshading.vert b/modules/wallpaper-engine/shaders/editor/meshviewportshading.vert new file mode 100644 index 0000000..ccf42f1 --- /dev/null +++ b/modules/wallpaper-engine/shaders/editor/meshviewportshading.vert @@ -0,0 +1,17 @@ + +uniform mat4 g_ModelViewMatrix; +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec4 a_Color; + +varying vec4 v_ScreenPos; +varying vec4 v_ScreenNorm; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + vec3 normal = normalize(a_Color.rgb * 2.0 - 1.0); + v_ScreenPos = gl_Position; + v_ScreenNorm = mul(vec4(normal, 0.0), g_ModelViewProjectionMatrix); +} diff --git a/modules/wallpaper-engine/shaders/editorpaintbrush.frag b/modules/wallpaper-engine/shaders/editorpaintbrush.frag new file mode 100644 index 0000000..80169d3 --- /dev/null +++ b/modules/wallpaper-engine/shaders/editorpaintbrush.frag @@ -0,0 +1,96 @@ + +#include "common_blur.h" + +varying vec2 v_TexCoord; +varying vec3 v_Position; + +uniform vec4 g_BrushPosition; // {"material":"brushposition","default":"0 0"} +uniform vec4 g_BrushSettings; // {"material":"brushsettings","default":"0 0 0 0"} +uniform vec4 g_BrushColor; // {"material":"brushcolor","default":"0 0 0"} + +uniform sampler2D g_Texture0; + +uniform vec4 g_Texture0Resolution; + +//uniform vec2 g_TexelSize; +//uniform vec2 g_TexelSizeHalf; + +#define BRUSHSIZE g_BrushSettings.x + +void main() { + vec4 albedo = CAST4(0); + albedo.rgb = g_BrushColor; + + vec2 adjusted = (v_Position.xy - g_BrushPosition.xy) * g_BrushPosition.zw + g_BrushPosition.xy; + + vec2 texelSize = 1; + vec4 multiSample = vec4( + length(vec2(adjusted.x - texelSize.x, adjusted.y - texelSize.y) - g_BrushPosition.xy), + length(vec2(adjusted.x + texelSize.x, adjusted.y - texelSize.y) - g_BrushPosition.xy), + length(vec2(adjusted.x + texelSize.x, adjusted.y + texelSize.y) - g_BrushPosition.xy), + length(vec2(adjusted.x - texelSize.x, adjusted.y + texelSize.y) - g_BrushPosition.xy) + ); + + float feather = max(0.5f, BRUSHSIZE * 0.5f * (1.0f - g_BrushSettings.y)); + vec4 blend4 = smoothstep(multiSample - feather, multiSample + feather, CAST4(BRUSHSIZE * 0.5f)); + float blend = dot(blend4, CAST4(0.25)); + + float opacity = mix(0.0f, g_BrushSettings.z, blend); + albedo.a = opacity; + +#ifdef PINCH + float pinchSign = albedo.g * 2.0 - 1.0; + vec2 pinchDelta = ((adjusted - g_BrushPosition.xy) * pinchSign) / BRUSHSIZE; + float pinchDistance = length(pinchDelta); + pinchDelta /= pinchDistance; + pinchDistance = saturate(pinchDistance); + + vec2 pinchColor = pinchDelta * pinchDistance * 0.5 + 0.5; + albedo.b = 0.0; + albedo.rg = mix(vec2(0.5, 0.5), pinchColor, albedo.r); +#endif + +#if SPIN + vec2 positionDelta = ((adjusted - g_BrushPosition.xy)) / BRUSHSIZE; + positionDelta.y = -positionDelta.y; + float temp = positionDelta.x; + positionDelta.x = positionDelta.y; + positionDelta.y = temp; + vec2 spinColor = positionDelta * 0.5 + 0.5; + + albedo.b = 0.0; + albedo.rg = mix(vec2(0.5, 0.5), spinColor, albedo.r); +#endif + + gl_FragColor = albedo; + +#if BLUR + // sample weights 3 + // 0.14975490496277529 + + // 0.23722688396633606 + + // 0.23722688396633606 + + // 0.37579132710455257 + // 0.72099 + // (0.27901 / 0.72099) + // (0.44198 / 0.72099) + + // ggrid distance + // sum: 0.318663 + + + vec2 tmpTexel = g_BrushColor.r * 10.0 / g_Texture0Resolution.xy; + + gl_FragColor.rgb = texSample2D(g_Texture0, v_TexCoord - tmpTexel * vec2((0.123317 / 0.318663), (0.123317 / 0.318663))).rgb * 0.37579132710455257 + + texSample2D(g_Texture0, v_TexCoord + vec2(tmpTexel.x, -tmpTexel.y) * vec2((0.195346 / 0.318663), (0.123317 / 0.318663))).rgb * 0.23722688396633606 + + texSample2D(g_Texture0, v_TexCoord + vec2(-tmpTexel.x, tmpTexel.y) * vec2((0.123317 / 0.318663), (0.195346 / 0.318663))).rgb * 0.23722688396633606 + + texSample2D(g_Texture0, v_TexCoord + tmpTexel * vec2((0.195346 / 0.318663), (0.195346 / 0.318663))).rgb * 0.14975490496277529; + + //gl_FragColor = texSample2D(g_Texture0, v_TexCoord - tmpTexel) + + // texSample2D(g_Texture0, v_TexCoord + vec2(tmpTexel.x, -tmpTexel.y)) + + // texSample2D(g_Texture0, v_TexCoord + vec2(-tmpTexel.x, tmpTexel.y)) + + // texSample2D(g_Texture0, v_TexCoord + tmpTexel); + //gl_FragColor *= 0.25; + + //gl_FragColor.a = 1; +#endif +} diff --git a/modules/wallpaper-engine/shaders/editorpaintbrush.vert b/modules/wallpaper-engine/shaders/editorpaintbrush.vert new file mode 100644 index 0000000..4bada50 --- /dev/null +++ b/modules/wallpaper-engine/shaders/editorpaintbrush.vert @@ -0,0 +1,15 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec3 v_Position; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_Position = a_Position; + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/editorsprite.frag b/modules/wallpaper-engine/shaders/editorsprite.frag new file mode 100644 index 0000000..2c57079 --- /dev/null +++ b/modules/wallpaper-engine/shaders/editorsprite.frag @@ -0,0 +1,13 @@ + +uniform sampler2D g_Texture0; +uniform vec3 g_Color; +uniform float g_Alpha; + +varying vec2 v_TexCoord; + +void main() { + vec4 color = texSample2D(g_Texture0, v_TexCoord); + color.rgb *= g_Color; + color.a *= g_Alpha; + gl_FragColor = color; +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/editorsprite.vert b/modules/wallpaper-engine/shaders/editorsprite.vert new file mode 100644 index 0000000..4f20668 --- /dev/null +++ b/modules/wallpaper-engine/shaders/editorsprite.vert @@ -0,0 +1,21 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +//uniform mat4 g_ModelMatrix; +//uniform mat4 g_ViewProjectionMatrix; +uniform mat4 g_ModelViewProjectionMatrix; + +uniform vec3 g_ViewUp; +uniform vec3 g_ViewRight; + +varying vec2 v_TexCoord; + +void main() { + vec3 position = a_Position + + (g_ViewRight * -(a_TexCoord.x-0.5) + + g_ViewUp * (a_TexCoord.y-0.5)) * -0.5; + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/effectcomposebackground.frag b/modules/wallpaper-engine/shaders/effectcomposebackground.frag new file mode 100644 index 0000000..111ce78 --- /dev/null +++ b/modules/wallpaper-engine/shaders/effectcomposebackground.frag @@ -0,0 +1,16 @@ + +varying vec2 v_TexCoord; +varying vec3 v_ScreenCoord; + +uniform sampler2D g_Texture0; // {"hidden":true} +uniform sampler2D g_Texture1; // {"hidden":true,"default":"_rt_FullFrameBuffer"} + +void main() { + vec4 result = texSample2D(g_Texture0, v_TexCoord); + + vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * CAST2(0.5) + 0.5; + vec4 bg = texSample2D(g_Texture1, screenCoord.xy); + + gl_FragColor.rgb = mix(bg.rgb, result.rgb, result.a); + gl_FragColor.a = 1.0; +} diff --git a/modules/wallpaper-engine/shaders/effectcomposebackground.vert b/modules/wallpaper-engine/shaders/effectcomposebackground.vert new file mode 100644 index 0000000..7536d95 --- /dev/null +++ b/modules/wallpaper-engine/shaders/effectcomposebackground.vert @@ -0,0 +1,19 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform mat4 g_EffectModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec3 v_ScreenCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; + v_ScreenCoord = mul(vec4((a_Position), 1.0), g_EffectModelViewProjectionMatrix).xyw; +#if HLSL + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif +} diff --git a/modules/wallpaper-engine/shaders/error.frag b/modules/wallpaper-engine/shaders/error.frag new file mode 100644 index 0000000..b895193 --- /dev/null +++ b/modules/wallpaper-engine/shaders/error.frag @@ -0,0 +1,8 @@ + +uniform sampler2D g_Texture0; + +varying vec2 v_TexCoord; + +void main() { + gl_FragColor = texSample2D(g_Texture0, v_TexCoord); +} diff --git a/modules/wallpaper-engine/shaders/error.vert b/modules/wallpaper-engine/shaders/error.vert new file mode 100644 index 0000000..40d3014 --- /dev/null +++ b/modules/wallpaper-engine/shaders/error.vert @@ -0,0 +1,12 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/fade.frag b/modules/wallpaper-engine/shaders/fade.frag new file mode 100644 index 0000000..ebe0916 --- /dev/null +++ b/modules/wallpaper-engine/shaders/fade.frag @@ -0,0 +1,10 @@ + +varying mediump vec2 v_TexCoord; + +uniform mediump float g_Alpha; + +uniform lowp vec3 color; // {"material":"tint","default":"0.315, 0.135, 0.1125"} + +void main() { + gl_FragColor = vec4(color * 0.7, g_Alpha); +} diff --git a/modules/wallpaper-engine/shaders/fade.vert b/modules/wallpaper-engine/shaders/fade.vert new file mode 100644 index 0000000..68f1aa8 --- /dev/null +++ b/modules/wallpaper-engine/shaders/fade.vert @@ -0,0 +1,7 @@ + +attribute vec3 a_Position; +attribute mediump vec2 a_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/flag.frag b/modules/wallpaper-engine/shaders/flag.frag new file mode 100644 index 0000000..5105087 --- /dev/null +++ b/modules/wallpaper-engine/shaders/flag.frag @@ -0,0 +1,67 @@ + +#include "common_fragment.h" + +uniform sampler2D g_Texture0; +uniform sampler2D g_Texture1; +uniform sampler2D g_Texture2; + +#if TINT +uniform vec3 g_Color1; // {"material":"color1","default":"0 0 0"} +uniform vec3 g_Color2; // {"material":"color2","default":"0 0 0"} +uniform vec3 g_Color3; // {"material":"color3","default":"1 1 1"} +#endif + +uniform float g_WaveStrength; // {"material":"Strength","default":0.5} + +varying vec2 v_TexCoord; +varying vec4 v_NormalCoord; + +void main() { + vec2 normalCoords1 = v_NormalCoord.xy; + vec2 normalCoords2 = v_NormalCoord.zw; + + normalCoords1.x -= ((0.5 - v_TexCoord.x) * (1 - v_TexCoord.y)) * 3; + normalCoords1.x += 2 * pow(v_TexCoord.y - 0.1, 3) * pow(v_TexCoord.x, 2); + normalCoords2.x -= ((1.0 - v_TexCoord.x) * (1 - v_TexCoord.y)) * 2; + + vec3 normal = DecompressNormal(texSample2D(g_Texture1, normalCoords1)); + normal *= DecompressNormal(texSample2D(g_Texture1, normalCoords2)); + //normal.xy += DecompressNormal(texSample2D(g_Texture1, normalCoords2)).xy; + + normal = mix(vec3(0, 0, 1), normal, g_WaveStrength); + normal = normalize(normal); + + vec2 baseCoords = v_TexCoord.xy + normal.xy * 0.02; + + //vec2 baseCoords2 = v_TexCoord.xy + normal.xy * 0.1; + //clip(baseCoords2.y - 0.1); + //clip(0.9 - baseCoords2.y); + //clip(baseCoords2.x - 0.18); + //clip(0.82 - baseCoords2.x); + + vec3 albedo = texSample2D(g_Texture0, baseCoords.xy).rgb; + float cloth = texSample2D(g_Texture2, baseCoords.xy * 4).r; + +#if TINT + vec3 color = mix(g_Color1, g_Color2, albedo.r); + color = mix(color, g_Color3, albedo.g); + color *= albedo.b * cloth; + color += cloth * 0.1; +#else + vec3 color = albedo; +#endif + + float light = 0.2 + dot(vec3(0.707, 0.707, 0), normal) * 0.5 + 0.5; + light += pow(light, 5) * 0.5; + color *= light + light * saturate(cloth * 2 - 1); + + // Vignette + //float vignette = length(v_TexCoord.xy - 0.5); + //color *= smoothstep(0.7, 0.2, vignette); + + // gl_FragColor = albedo; + gl_FragColor.rgb = color; + gl_FragColor.a = 1; + + //gl_FragColor.rgb = (normal * 0.5 + 0.5); +} diff --git a/modules/wallpaper-engine/shaders/flag.vert b/modules/wallpaper-engine/shaders/flag.vert new file mode 100644 index 0000000..da04ef1 --- /dev/null +++ b/modules/wallpaper-engine/shaders/flag.vert @@ -0,0 +1,24 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_NormalCoord; + +uniform float g_WaveSpeed; // {"material":"Speed","default":0.4} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + + v_NormalCoord.xy = a_TexCoord * vec2(1, 0.3) * 0.7; + v_NormalCoord.x -= g_Time * g_WaveSpeed; + + v_NormalCoord.zw = a_TexCoord * vec2(1, 0.7) * 0.3; + v_NormalCoord.z -= g_Time * g_WaveSpeed * 0.5; +} diff --git a/modules/wallpaper-engine/shaders/flat.frag b/modules/wallpaper-engine/shaders/flat.frag new file mode 100644 index 0000000..a3d224d --- /dev/null +++ b/modules/wallpaper-engine/shaders/flat.frag @@ -0,0 +1,13 @@ + +uniform mediump float g_Alpha; +uniform mediump vec3 g_Color; + +varying vec4 v_Color; + +void main() { + gl_FragColor = vec4(g_Color, g_Alpha); + +#ifdef VERTEXCOLOR + gl_FragColor *= v_Color.rgba; +#endif +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/flat.vert b/modules/wallpaper-engine/shaders/flat.vert new file mode 100644 index 0000000..0ae3421 --- /dev/null +++ b/modules/wallpaper-engine/shaders/flat.vert @@ -0,0 +1,16 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec4 a_Color; + +#ifdef VERTEXCOLOR +varying vec4 v_Color; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#ifdef VERTEXCOLOR + v_Color = a_Color.rgba; +#endif +} diff --git a/modules/wallpaper-engine/shaders/flatpoint.frag b/modules/wallpaper-engine/shaders/flatpoint.frag new file mode 100644 index 0000000..31a680f --- /dev/null +++ b/modules/wallpaper-engine/shaders/flatpoint.frag @@ -0,0 +1,10 @@ + +uniform mediump float g_Alpha; +uniform mediump vec3 g_Color; + +varying vec4 v_Color; + +void main() { + gl_FragColor = vec4(g_Color, g_Alpha); + gl_FragColor *= v_Color; +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/flatpoint.geom b/modules/wallpaper-engine/shaders/flatpoint.geom new file mode 100644 index 0000000..377daa0 --- /dev/null +++ b/modules/wallpaper-engine/shaders/flatpoint.geom @@ -0,0 +1,36 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec3 g_Screen; + +in vec4 gl_Position; +in vec4 v_Color; + +out vec4 v_Color; +out vec4 gl_Position; + +PS_INPUT CreateParticleVertex(vec2 sprite, in VS_OUTPUT IN, vec3 right, vec3 up) +{ + PS_INPUT v; + + v.gl_Position = mul(vec4(IN.gl_Position.xyz, 1.0), g_ModelViewProjectionMatrix); + v.gl_Position.xyz /= v.gl_Position.w; + v.gl_Position.w = 1; + v.gl_Position.xyz += (sprite.x * right + sprite.y * up) * IN.gl_Position.w * 0.002; + + v.v_Color = IN.v_Color; + + return v; +} + +[maxvertexcount(4)] +void main() { + + float resFactor = min(1.0, 1080.0 / g_Screen.y); + vec3 up = vec3(0, resFactor, 0); + vec3 right = vec3(resFactor / g_Screen.z, 0, 0); + + OUT.Append(CreateParticleVertex(vec2(-1, 1), IN[0], right, up)); + OUT.Append(CreateParticleVertex(vec2(-1, -1), IN[0], right, up)); + OUT.Append(CreateParticleVertex(vec2(1, 1), IN[0], right, up)); + OUT.Append(CreateParticleVertex(vec2(1, -1), IN[0], right, up)); +} diff --git a/modules/wallpaper-engine/shaders/flatpoint.vert b/modules/wallpaper-engine/shaders/flatpoint.vert new file mode 100644 index 0000000..cfdd533 --- /dev/null +++ b/modules/wallpaper-engine/shaders/flatpoint.vert @@ -0,0 +1,10 @@ + +attribute vec4 a_PositionVec4; +attribute vec4 a_Color; + +varying vec4 v_Color; + +void main() { + gl_Position = a_PositionVec4; + v_Color = a_Color; +} diff --git a/modules/wallpaper-engine/shaders/foliage4.frag b/modules/wallpaper-engine/shaders/foliage4.frag new file mode 100644 index 0000000..c96916a --- /dev/null +++ b/modules/wallpaper-engine/shaders/foliage4.frag @@ -0,0 +1,162 @@ + +// [PASS] shadow shadowcasterfoliage4 +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":1} +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} +// [COMBO] {"material":"ui_editor_properties_rim_lighting","combo":"RIMLIGHTING","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_toon_shading","combo":"SHADINGGRADIENT","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_double_sided_lighting","combo":"DOUBLESIDEDLIGHTING","default":0} +// [COMBO] {"material":"ui_editor_properties_leaves_uv_direction","combo":"LEAVESUVMODE","default":0,"options":{"ui_editor_properties_none":0,"ui_editor_properties_up":1,"ui_editor_properties_down":2,"ui_editor_properties_right":3,"ui_editor_properties_left":4}} +// [COMBO] {"material":"ui_editor_properties_animation_debug","combo":"FOLIAGEDEBUG","default":0,"options":{"ui_editor_properties_none":0,"ui_editor_properties_debug_size":1,"ui_editor_properties_debug_height":2,"ui_editor_properties_debug_radius":3,"ui_editor_properties_debug_uvs":4,"ui_editor_properties_debug_scale":5}} + +#define RIM_LIGHTING_AMOUNT g_RimAmount +#define RIM_LIGHTING_EXPONENT g_RimExponent + +#if SHADINGGRADIENT +#define GRADIENT_SAMPLER g_Texture4 +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_shading_gradient","default":"gradient/gradient_toon_smooth","formatcombo":true,"nonremovable":true,"require":{"SHADINGGRADIENT":1}} +#endif +uniform float g_RimAmount; // {"material":"rimamount","label":"ui_editor_properties_rim_lighting_amount","default":2.0,"range":[0,5],"group":"ui_editor_properties_rim_lighting"} +uniform float g_RimExponent; // {"material":"rimexponent","label":"ui_editor_properties_rim_lighting_exponent","default":4.0,"range":[0.01,10],"group":"ui_editor_properties_rim_lighting"} + +#if LIGHTS_SHADOW_MAPPING +#define SHADOW_ATLAS_SAMPLER g_Texture6 +#define SHADOW_ATLAS_TEXEL g_Texture6Texel +uniform sampler2DComparison g_Texture6; // {"hidden":true,"default":"_rt_shadowAtlas"} +uniform vec4 g_Texture6Texel; +#endif + +#if LIGHTS_COOKIE +#define COOKIE_SAMPLER g_Texture7 +uniform sampler2D g_Texture7; // {"hidden":true,"default":"_alias_lightCookie"} +#endif + +#include "base/model_fragment_v1.h" +#include "common_pbr_2.h" +#include "common_fog.h" + +uniform float g_Brightness; // {"material":"brightness","label":"ui_editor_properties_hdr_brightness","default":1,"range":[0,10]} + +uniform vec3 g_TintColor; // {"material":"color","label":"ui_editor_properties_tint_color","type": "color", "default":"1 1 1"} +uniform float g_TintAlpha; // {"material":"alpha","label":"ui_editor_properties_opacity","default":1,"range":[0,1]} + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","format":"normalmap","formatcombo":true,"combo":"NORMALMAP"} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}]} + +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} + +#if LIGHTING || REFLECTION +#ifdef NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +varying vec3 v_WorldNormal; +#endif +varying vec3 v_WorldPos; +#endif + +varying vec2 v_TexCoord; +varying vec4 v_ViewDir; +varying vec3 v_LightAmbientColor; + +#if REFLECTION +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; + +varying vec3 v_ScreenPos; +#endif + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} + +#require LightingV1 + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + albedo.rgb *= g_TintColor; + albedo.a *= g_TintAlpha; + + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.xy); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + + float viewDist = length(v_ViewDir.xyz); + vec3 normalizedViewVector = v_ViewDir.xyz / viewDist; + +#if LIGHTING || REFLECTION +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_TexCoord.xy)); + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#else + vec3 normal = normalize(v_WorldNormal); +#endif +#endif + + vec3 light = CAST3(0.0); + +#if LIGHTING + light = PerformLighting_V1(v_WorldPos, albedo.rgb, normal, normalizedViewVector, CAST3(1.0), f0, roughness, metallic); + vec3 ambient = v_LightAmbientColor * albedo.rgb; +#else + vec3 ambient = albedo.rgb; +#endif + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * albedo.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + albedo.rgb = CombineLighting(light, ambient); + +#if REFLECTION + float reflectivity = g_Reflectivity; +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + albedo.rgb += ApplyReflection(MAKE_SAMPLER2D_ARGUMENT(g_Texture3), g_Texture3MipMapInfo, reflectivity, roughness, metallic, v_ScreenPos.xyz, normal, normalizedViewVector); +#endif + +#if HDR + albedo.rgb *= g_Brightness; + +#if (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + albedo.rgb += g_EmissiveColor * albedo.rgb * emissiveOverbright; +#endif +#endif + +#if FOG_HEIGHT || FOG_DIST + vec2 fogPixelState = CalculateFogPixelState(viewDist, v_ViewDir.w); + albedo.rgb = ApplyFog(albedo.rgb, fogPixelState); +#if ADDITIVE + albedo.a = ApplyFogAlpha(albedo.a, fogPixelState); +#endif +#endif + +#if FOLIAGEDEBUG + albedo.rgb = v_LightAmbientColor.rgb; +#endif + + gl_FragColor = albedo; + + ApplyAlphaToCoverage(gl_FragColor.a); +} diff --git a/modules/wallpaper-engine/shaders/foliage4.vert b/modules/wallpaper-engine/shaders/foliage4.vert new file mode 100644 index 0000000..966c5bd --- /dev/null +++ b/modules/wallpaper-engine/shaders/foliage4.vert @@ -0,0 +1,130 @@ + +#include "base/model_vertex_v1.h" +#include "common_foliage.h" + +uniform vec3 g_EyePosition; +uniform mat4 g_ViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +attribute vec2 a_TexCoord; + +varying vec4 v_ViewDir; +varying vec2 v_TexCoord; + +varying vec3 v_LightAmbientColor; + +#if LIGHTING || REFLECTION +#if NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +varying vec3 v_WorldNormal; +#endif +varying vec3 v_WorldPos; +#endif + +#if REFLECTION +varying vec3 v_ScreenPos; +#endif + +#if MORPHING +uniform sampler2D g_Texture5; // {"material":"morph","hidden":true} +uniform vec4 g_Texture5Texel; +#endif + +uniform float g_Time; +uniform float g_SpeedLeaves; // {"material":"foliagespeedleaves","label":"ui_editor_properties_speed_leaves","default":5,"range":[0.01, 10],"group":"ui_editor_properties_foliage"} +uniform float g_SpeedBase; // {"material":"foliagespeedbase","label":"ui_editor_properties_speed_base","default":1,"range":[0.01, 10],"group":"ui_editor_properties_foliage"} +uniform float g_StrengthLeaves; // {"material":"strengthleaves","label":"ui_editor_properties_strength_leaves","default":0.015,"range":[0, 0.1],"group":"ui_editor_properties_foliage"} +uniform float g_StrengthBase; // {"material":"strengthbase","label":"ui_editor_properties_strength_base","default":0.04,"range":[0, 0.2],"group":"ui_editor_properties_foliage"} +uniform float g_Phase; // {"material":"foliagephase","label":"ui_editor_properties_phase","default":0,"range":[0, 6.28],"group":"ui_editor_properties_foliage"} +uniform float g_FoliageScale; // {"material":"foliagescale","label":"ui_editor_properties_scale","default":3,"range":[0, 10],"group":"ui_editor_properties_foliage"} +uniform float g_Direction; // {"material":"scrolldirection","label":"ui_editor_properties_direction","default":0,"range":[1.571,6.28],"direction":true,"group":"ui_editor_properties_foliage"} +uniform float g_CutOff; // {"material":"foliagecutoff","label":"ui_editor_properties_crunch","default":0.2,"range":[0.0, 0.39],"group":"ui_editor_properties_foliage"} +uniform float g_TreeHeight; // {"material":"foliageheight","label":"ui_editor_properties_tree_height","default":5,"range":[0.0, 100],"group":"ui_editor_properties_foliage"} +uniform float g_TreeRadius; // {"material":"foliageradius","label":"ui_editor_properties_tree_radius","default":0.5,"range":[0.0, 10],"group":"ui_editor_properties_foliage"} +uniform vec2 g_FoliageUVBounds; // {"material":"foliageuvbounds","label":"ui_editor_properties_leaves_uv_mapping","default":"0 1","nobindings":true,"conversion":"startdelta","group":"ui_editor_properties_foliage"} + +void main() { + vec3 localPos = a_Position; + vec3 localNormal = a_Normal; + +#if MORPHING + ApplyMorphPositionNormal(CASTU(gl_VertexID), MAKE_SAMPLER2D_ARGUMENT(g_Texture5), g_Texture5Texel, g_MorphOffsets, g_MorphWeights, localPos, localNormal); +#endif + + vec4 worldPos; + vec3 worldNormal; +#if SKINNING + ApplySkinningPositionNormal(localPos, localNormal, a_BlendIndices, a_BlendWeights, worldPos, worldNormal); +#else + ApplyPositionNormal(localPos, localNormal, worldPos, worldNormal); +#endif + + // + + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; + +#if LIGHTING || REFLECTION + v_WorldPos = worldPos.xyz; +#if NORMALMAP + mat3 tangentSpace; +#if SKINNING + ApplySkinningTangentSpace(worldNormal, a_Tangent4, a_BlendIndices, a_BlendWeights, tangentSpace); +#else + ApplyTangentSpace(worldNormal, a_Tangent4, tangentSpace); +#endif + + v_Tangent = tangentSpace[0]; + v_Bitangent = tangentSpace[1]; + v_Normal = tangentSpace[2]; +#else + v_WorldNormal = worldNormal; +#endif +#endif + +#if REFLECTION + ClipSpaceToScreenSpace(gl_Position, v_ScreenPos); +#endif + + v_LightAmbientColor = ApplyAmbientLighting(worldNormal); + +#if FOLIAGEDEBUG + float heightBlend = smoothstep(0.0, g_TreeHeight, localPos.y); + + float leafDistance = dot(localPos.xz, localPos.xz); + vec2 blendParamsA = vec2(g_TreeRadius * g_TreeRadius, g_TreeRadius); + vec2 blendParamsB = vec2(g_TreeRadius, g_TreeRadius * g_TreeRadius); + vec2 blendParams = mix(blendParamsA, blendParamsB, step(1.0, g_TreeRadius)); + float radiusBlend = smoothstep(blendParams.x, blendParams.y, leafDistance); +#endif +#if FOLIAGEDEBUG == 1 + v_LightAmbientColor.rgb = vec3(radiusBlend, heightBlend, 0); +#elif FOLIAGEDEBUG == 2 + v_LightAmbientColor.rgb = vec3(0,heightBlend,0); +#elif FOLIAGEDEBUG == 3 + v_LightAmbientColor.rgb = vec3(radiusBlend, 0, 0); +#elif FOLIAGEDEBUG == 4 + float uvWeight = CalcLeavesUVWeight(leafUVs, g_FoliageUVBounds); + v_LightAmbientColor.rgb = CAST3(uvWeight); +#elif FOLIAGEDEBUG == 5 + float colY = step(0.0, sin(worldPos.y * g_FoliageScale * 6.666)); + v_LightAmbientColor.rgb = CAST3(colY); +#endif +} diff --git a/modules/wallpaper-engine/shaders/font.frag b/modules/wallpaper-engine/shaders/font.frag new file mode 100644 index 0000000..d25394b --- /dev/null +++ b/modules/wallpaper-engine/shaders/font.frag @@ -0,0 +1,18 @@ + +#include "common_fragment.h" + +uniform vec4 g_Color4; + +uniform sampler2D g_Texture0; + +varying vec3 v_TexCoord; + +void main() { +#if COLORFONT + vec4 _sample = texSample2D(g_Texture0, v_TexCoord.xy); + gl_FragColor = vec4(_sample.rgb * mix(CAST3(1.0), g_Color4.rgb, v_TexCoord.z), _sample.a * g_Color4.a); +#else + float _sample = ConvertSampleR8(texSample2D(g_Texture0, v_TexCoord.xy)); + gl_FragColor = vec4(g_Color4.rgb, _sample * g_Color4.a); +#endif +} diff --git a/modules/wallpaper-engine/shaders/font.vert b/modules/wallpaper-engine/shaders/font.vert new file mode 100644 index 0000000..40e6fce --- /dev/null +++ b/modules/wallpaper-engine/shaders/font.vert @@ -0,0 +1,14 @@ + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec3 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position.xy, 0.0, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord.xy = a_TexCoord; + v_TexCoord.z = a_Position.z; +} diff --git a/modules/wallpaper-engine/shaders/fur4.frag b/modules/wallpaper-engine/shaders/fur4.frag new file mode 100644 index 0000000..712c421 --- /dev/null +++ b/modules/wallpaper-engine/shaders/fur4.frag @@ -0,0 +1,172 @@ + +// [PASS] shadow shadowcasterfur4 +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":1} +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} +// [COMBO] {"material":"ui_editor_properties_rim_lighting","combo":"RIMLIGHTING","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_toon_shading","combo":"SHADINGGRADIENT","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_fur_quality","combo":"INSTANCECOUNT","default":5,"options":{"ui_editor_properties_low":5,"ui_editor_properties_medium":9,"ui_editor_properties_high":13,"ui_editor_properties_ultra":21}} + +#define RIM_LIGHTING_AMOUNT g_RimAmount +#define RIM_LIGHTING_EXPONENT g_RimExponent + +#if SHADINGGRADIENT +#define GRADIENT_SAMPLER g_Texture4 +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_shading_gradient","default":"gradient/gradient_toon_smooth","formatcombo":true,"nonremovable":true,"require":{"SHADINGGRADIENT":1}} +#endif +uniform float g_RimAmount; // {"material":"rimamount","label":"ui_editor_properties_rim_lighting_amount","default":2.0,"range":[0,5],"group":"ui_editor_properties_rim_lighting"} +uniform float g_RimExponent; // {"material":"rimexponent","label":"ui_editor_properties_rim_lighting_exponent","default":4.0,"range":[0.01,10],"group":"ui_editor_properties_rim_lighting"} + +#if LIGHTS_SHADOW_MAPPING +#define SHADOW_ATLAS_SAMPLER g_Texture6 +#define SHADOW_ATLAS_TEXEL g_Texture6Texel +uniform sampler2DComparison g_Texture6; // {"hidden":true,"default":"_rt_shadowAtlas"} +uniform vec4 g_Texture6Texel; +#endif + +#if LIGHTS_COOKIE +#define COOKIE_SAMPLER g_Texture7 +uniform sampler2D g_Texture7; // {"hidden":true,"default":"_alias_lightCookie"} +#endif + +#include "base/model_fragment_v1.h" +#include "common_pbr_2.h" +#include "common_fog.h" + +uniform float g_Brightness; // {"material":"brightness","label":"ui_editor_properties_hdr_brightness","default":1,"range":[0,10]} + +uniform vec3 g_TintColor; // {"material":"color","label":"ui_editor_properties_tint_color","type": "color", "default":"1 1 1"} +uniform float g_TintAlpha; // {"material":"alpha","label":"ui_editor_properties_opacity","default":1,"range":[0,1]} + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","format":"normalmap","formatcombo":true,"combo":"NORMALMAP"} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}]} + +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} + +varying vec4 v_WorldNormal; + +#if LIGHTING || REFLECTION +#ifdef NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#endif +varying vec3 v_WorldPos; +#endif + +varying vec2 v_TexCoord; +varying vec4 v_ViewDir; +varying vec3 v_LightAmbientColor; + +#if REFLECTION +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; + +varying vec3 v_ScreenPos; +#endif + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} + +// + +#require LightingV1 + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + + albedo.rgb *= g_TintColor; + + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.xy); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + + float viewDist = length(v_ViewDir.xyz); + vec3 normalizedViewVector = v_ViewDir.xyz / viewDist; + +#if LIGHTING || REFLECTION +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_TexCoord.xy)); + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#else + vec3 normal = normalize(v_WorldNormal.xyz); +#endif +#endif + + vec3 light = CAST3(0.0); + +#if LIGHTING + light = PerformLighting_V1(v_WorldPos, albedo.rgb, normal, normalizedViewVector, CAST3(1.0), f0, roughness, metallic); + vec3 ambient = v_LightAmbientColor * albedo.rgb; +#else + vec3 ambient = albedo.rgb; +#endif + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * albedo.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + albedo.rgb = CombineLighting(light, ambient); + +#if REFLECTION + float reflectivity = g_Reflectivity; +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + albedo.rgb += ApplyReflection(MAKE_SAMPLER2D_ARGUMENT(g_Texture3), g_Texture3MipMapInfo, reflectivity, roughness, metallic, v_ScreenPos.xyz, normal, normalizedViewVector); +#endif + +#if HDR + albedo.rgb *= g_Brightness; + +#if (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + albedo.rgb += g_EmissiveColor * albedo.rgb * emissiveOverbright; +#endif +#endif + + // + +#if FOG_HEIGHT || FOG_DIST + vec2 fogPixelState = CalculateFogPixelState(viewDist, v_ViewDir.w); + albedo.rgb = ApplyFog(albedo.rgb, fogPixelState); +#if ADDITIVE + albedo.a = ApplyFogAlpha(albedo.a, fogPixelState); +#endif +#endif + + gl_FragColor = albedo; + + ApplyAlphaToCoverage(gl_FragColor.a); +} diff --git a/modules/wallpaper-engine/shaders/fur4.vert b/modules/wallpaper-engine/shaders/fur4.vert new file mode 100644 index 0000000..cbc3dda --- /dev/null +++ b/modules/wallpaper-engine/shaders/fur4.vert @@ -0,0 +1,97 @@ + +#include "base/model_vertex_v1.h" + +uniform vec3 g_EyePosition; +uniform mat4 g_ViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +attribute vec2 a_TexCoord; +#if HLSL +in uint gl_InstanceID; +#endif + +varying vec4 v_WorldNormal; +varying vec4 v_ViewDir; + +varying vec2 v_TexCoord; +varying vec3 v_LightAmbientColor; + +#if LIGHTING || REFLECTION +#if NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +#endif +varying vec3 v_WorldPos; +#endif + +#if REFLECTION +varying vec3 v_ScreenPos; +#endif + +#if MORPHING +uniform sampler2D g_Texture5; // {"material":"morph","hidden":true} +uniform vec4 g_Texture5Texel; +#endif + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} + +// + +void main() { + vec3 localPos = a_Position; + vec3 localNormal = a_Normal; + +#if MORPHING + ApplyMorphPositionNormal(CASTU(gl_VertexID), MAKE_SAMPLER2D_ARGUMENT(g_Texture5), g_Texture5Texel, g_MorphOffsets, g_MorphWeights, localPos, localNormal); +#endif + + vec4 worldPos; + vec3 worldNormal; +#if SKINNING + ApplySkinningPositionNormal(localPos, localNormal, a_BlendIndices, a_BlendWeights, worldPos, worldNormal); +#else + ApplyPositionNormal(localPos, localNormal, worldPos, worldNormal); +#endif + + // + + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoord; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; + +#if LIGHTING || REFLECTION + v_WorldPos = worldPos.xyz; +#if NORMALMAP + mat3 tangentSpace; +#if SKINNING + ApplySkinningTangentSpace(worldNormal, a_Tangent4, a_BlendIndices, a_BlendWeights, tangentSpace); +#else + ApplyTangentSpace(worldNormal, a_Tangent4, tangentSpace); +#endif + + v_Tangent = tangentSpace[0]; + v_Bitangent = tangentSpace[1]; + v_Normal = tangentSpace[2]; +#else +#endif +#endif + + v_WorldNormal.xyz = worldNormal; + +#if REFLECTION + ClipSpaceToScreenSpace(gl_Position, v_ScreenPos); +#endif + + v_LightAmbientColor = ApplyAmbientLighting(worldNormal); +} diff --git a/modules/wallpaper-engine/shaders/generic.frag b/modules/wallpaper-engine/shaders/generic.frag new file mode 100644 index 0000000..82059eb --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic.frag @@ -0,0 +1,109 @@ + +#include "common_fragment.h" + +uniform vec4 g_LightsColorRadius[4]; + +uniform float g_Metallic; // {"material":"Metal","default":0,"range":[0,1]} +uniform float g_Roughness; // {"material":"Rough","default":0,"range":[0,1]} +uniform float g_Light; // {"material":"Light","default":0,"range":[0,1]} + +#if DIFFUSETINT +uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"} +uniform float g_TintAlpha; // {"material":"Alpha","default":0,"range":[0,1]} +#endif + +uniform sampler2D g_Texture0; + +#if NORMALMAP + +uniform sampler2D g_Texture1; +#define g_NormalMapSampler g_Texture1 + +#if LIGHTMAP +uniform sampler2D g_Texture2; +#define g_LightmapMapSampler g_Texture2 +#endif + +#else + +#if LIGHTMAP +uniform sampler2D g_Texture1; +#define g_LightmapMapSampler g_Texture1 +#endif + +varying vec3 v_Normal; + +#endif + +#if REFLECTION +uniform sampler2D g_Texture3; +#define g_ReflectionSampler g_Texture3 + +varying vec3 v_ScreenPos; +uniform vec2 g_TexelSizeHalf; +#endif + +#if LIGHTMAP +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +varying vec3 v_ViewDir; +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; +varying vec3 v_LightAmbientColor; + +void main() { + // Vars + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec3 specularResult = vec3(0, 0, 0); + +#if DIFFUSETINT + albedo.rgb *= g_TintColor; + albedo.a *= g_TintAlpha; +#endif + +#if DETAILINALPHA + albedo.rgb *= texSample2D(g_Texture0, v_TexCoord.xy * 3).a * 2.0; +#endif + + vec3 viewDir = normalize(v_ViewDir); + float specularPower = ComputeMaterialSpecularPower(g_Roughness, g_Metallic); + float specularStrength = ComputeMaterialSpecularStrength(g_Roughness, g_Metallic); + +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_NormalMapSampler, v_TexCoord.xy)); +#else + vec3 normal = normalize(v_Normal); +#endif + + // Compute fragment + vec3 light = ComputeLightSpecular(normal, v_Light0DirectionL3X.xyz, g_LightsColorRadius[0].rgb, g_LightsColorRadius[0].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + +#if LIGHTMAP + vec3 lightmap = texSample2D(g_LightmapMapSampler, v_TexCoord.zw).rgb; + light *= lightmap; + specularResult *= lightmap; +#endif + + light += ComputeLightSpecular(normal, v_Light1DirectionL3Y.xyz, g_LightsColorRadius[1].rgb, g_LightsColorRadius[1].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += ComputeLightSpecular(normal, v_Light2DirectionL3Z.xyz, g_LightsColorRadius[2].rgb, g_LightsColorRadius[2].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += ComputeLightSpecular(normal, vec3(v_Light0DirectionL3X.w, v_Light1DirectionL3Y.w, v_Light2DirectionL3Z.w), g_LightsColorRadius[3].rgb, g_LightsColorRadius[3].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += v_LightAmbientColor; + albedo.rgb = albedo.rgb * light + specularResult; + +#if REFLECTION + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; +#ifdef HLSL_SM30 + screenUV += g_TexelSizeHalf; +#endif + albedo.rgb += texSample2D(g_ReflectionSampler, screenUV + normal.xy * 0.01).rgb * 0.35; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/shaders/generic.vert b/modules/wallpaper-engine/shaders/generic.vert new file mode 100644 index 0000000..cf90d3a --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic.vert @@ -0,0 +1,78 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ViewProjectionMatrix; +uniform vec3 g_EyePosition; +uniform vec3 g_LightsPosition[4]; +uniform vec3 g_LightAmbientColor; +uniform vec3 g_LightSkylightColor; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +#if LIGHTMAP +attribute vec4 a_TexCoordVec4; +#else +attribute vec2 a_TexCoord; +#endif + +#if NORMALMAP +attribute vec4 a_Tangent4; +#else +varying vec3 v_Normal; +#endif + +varying vec3 v_ViewDir; +#if LIGHTMAP +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; + +#if REFLECTION +varying vec3 v_ScreenPos; +#endif + +varying vec3 v_LightAmbientColor; + +void main() { + vec4 worldPos = mul(vec4(a_Position, 1.0), g_ModelMatrix); + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + vec3 normal = normalize(mul(a_Normal, CAST3X3(g_ModelMatrix))); +#if LIGHTMAP + v_TexCoord = a_TexCoordVec4; +#else + v_TexCoord = a_TexCoord; +#endif + +#if REFLECTION + v_ScreenPos = gl_Position.xyw; +#endif + + v_ViewDir = g_EyePosition - worldPos.xyz; + + v_Light0DirectionL3X.xyz = g_LightsPosition[0] - worldPos.xyz; + v_Light1DirectionL3Y.xyz = g_LightsPosition[1] - worldPos.xyz; + v_Light2DirectionL3Z.xyz = g_LightsPosition[2] - worldPos.xyz; + + vec3 l3 = g_LightsPosition[3] - worldPos.xyz; + +#if NORMALMAP + mat3 tangentSpace = BuildTangentSpace(CAST3X3(g_ModelMatrix), a_Normal, a_Tangent4); + v_Light0DirectionL3X.xyz = mul(tangentSpace, v_Light0DirectionL3X.xyz); + v_Light1DirectionL3Y.xyz = mul(tangentSpace, v_Light1DirectionL3Y.xyz); + v_Light2DirectionL3Z.xyz = mul(tangentSpace, v_Light2DirectionL3Z.xyz); + l3 = mul(tangentSpace, l3); + v_ViewDir = mul(tangentSpace, v_ViewDir); +#else + v_Normal = normal; +#endif + + v_Light0DirectionL3X.w = l3.x; + v_Light1DirectionL3Y.w = l3.y; + v_Light2DirectionL3Z.w = l3.z; + v_LightAmbientColor = mix(g_LightSkylightColor, g_LightAmbientColor, dot(normal, vec3(0, 1, 0)) * 0.5 + 0.5); +} diff --git a/modules/wallpaper-engine/shaders/generic2.frag b/modules/wallpaper-engine/shaders/generic2.frag new file mode 100644 index 0000000..c5ba18a --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic2.frag @@ -0,0 +1,84 @@ + +#include "common_fragment.h" + +uniform vec4 g_LightsColorRadius[4]; + +uniform float g_Metallic; // {"material":"Metal","default":0,"range":[0,1]} +uniform float g_Roughness; // {"material":"Rough","default":0,"range":[0,1]} +uniform float g_Brightness; // {"material":"Brigtness","default":1,"range":[0,10]} +uniform float g_Light; // {"material":"Light","default":0,"range":[0,1]} + +uniform vec3 g_TintColor; // {"material":"Color", "type": "color", "default":"1 1 1"} +uniform float g_TintAlpha; // {"material":"Alpha","default":1,"range":[0,1]} + + +uniform sampler2D g_Texture0; // {"label":"ui_editor_properties_albedo","default":"util/white"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","format":"normalmap","formatcombo":true,"combo":"NORMALMAP"} +uniform sampler2D g_Texture2; // {"default":"_rt_Reflection","hidden":true} + +#if NORMALMAP + +#else +varying vec3 v_Normal; +#endif + +#if REFLECTION +varying vec3 v_ScreenPos; +uniform vec2 g_TexelSizeHalf; +#endif + +varying vec2 v_TexCoord; +varying vec3 v_ViewDir; +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; +varying vec3 v_LightAmbientColor; + +void main() { + // Vars + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + vec3 specularResult = vec3(0, 0, 0); + + albedo.rgb *= g_TintColor; + albedo.a *= g_TintAlpha; + +#if DETAILINALPHA + albedo.rgb *= texSample2D(g_Texture0, v_TexCoord.xy * 3).a * 2.0; +#endif + + vec3 viewDir = normalize(v_ViewDir); + float specularPower = ComputeMaterialSpecularPower(g_Roughness, g_Metallic); + float specularStrength = ComputeMaterialSpecularStrength(g_Roughness, g_Metallic); + +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_TexCoord.xy)); +#else + vec3 normal = normalize(v_Normal); +#endif + + // Compute fragment + vec3 light = ComputeLightSpecular(normal, v_Light0DirectionL3X.xyz, g_LightsColorRadius[0].rgb, g_LightsColorRadius[0].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += ComputeLightSpecular(normal, v_Light1DirectionL3Y.xyz, g_LightsColorRadius[1].rgb, g_LightsColorRadius[1].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += ComputeLightSpecular(normal, v_Light2DirectionL3Z.xyz, g_LightsColorRadius[2].rgb, g_LightsColorRadius[2].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += ComputeLightSpecular(normal, vec3(v_Light0DirectionL3X.w, v_Light1DirectionL3Y.w, v_Light2DirectionL3Z.w), g_LightsColorRadius[3].rgb, g_LightsColorRadius[3].w, viewDir, specularPower, specularStrength, g_Light, g_Metallic, specularResult); + + light += v_LightAmbientColor; + albedo.rgb = albedo.rgb * light + specularResult; + +#if REFLECTION + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; +#ifdef HLSL_SM30 + screenUV += g_TexelSizeHalf; +#endif + albedo.rgb += texSample2D(g_Texture2, screenUV + normal.xy * 0.01).rgb * 0.35; +#endif + +#if HDR + albedo.rgb *= g_Brightness; +#endif + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/shaders/generic2.vert b/modules/wallpaper-engine/shaders/generic2.vert new file mode 100644 index 0000000..dcfce25 --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic2.vert @@ -0,0 +1,74 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ViewProjectionMatrix; +uniform vec3 g_EyePosition; +uniform vec3 g_LightsPosition[4]; +uniform vec3 g_LightAmbientColor; +uniform vec3 g_LightSkylightColor; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +attribute vec2 a_TexCoord; + +#if NORMALMAP +attribute vec4 a_Tangent4; +#else +varying vec3 v_Normal; +#endif + +varying vec3 v_ViewDir; +varying vec2 v_TexCoord; + +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; + +#if REFLECTION +varying vec3 v_ScreenPos; +#endif + +varying vec3 v_LightAmbientColor; + +void main() { + vec4 worldPos = mul(vec4(a_Position, 1.0), g_ModelMatrix); + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + vec3 normal = normalize(mul(a_Normal, CAST3X3(g_ModelMatrix))); + v_TexCoord = a_TexCoord; + +#if REFLECTION + v_ScreenPos = gl_Position.xyw; +#endif + + v_ViewDir = g_EyePosition - worldPos.xyz; + + v_Light0DirectionL3X.xyz = g_LightsPosition[0] - worldPos.xyz; + v_Light1DirectionL3Y.xyz = g_LightsPosition[1] - worldPos.xyz; + v_Light2DirectionL3Z.xyz = g_LightsPosition[2] - worldPos.xyz; + + vec3 l3 = g_LightsPosition[3] - worldPos.xyz; + +#if NORMALMAP + mat3 tangentSpace = BuildTangentSpace(CAST3X3(g_ModelMatrix), a_Normal, a_Tangent4); + +#ifdef VERSION + tangentSpace[0] = normalize(tangentSpace[0]); + tangentSpace[1] = normalize(tangentSpace[1]); + tangentSpace[2] = normalize(tangentSpace[2]); +#endif + + v_Light0DirectionL3X.xyz = mul(tangentSpace, v_Light0DirectionL3X.xyz); + v_Light1DirectionL3Y.xyz = mul(tangentSpace, v_Light1DirectionL3Y.xyz); + v_Light2DirectionL3Z.xyz = mul(tangentSpace, v_Light2DirectionL3Z.xyz); + l3 = mul(tangentSpace, l3); + v_ViewDir = mul(tangentSpace, v_ViewDir); +#else + v_Normal = normal; +#endif + + v_Light0DirectionL3X.w = l3.x; + v_Light1DirectionL3Y.w = l3.y; + v_Light2DirectionL3Z.w = l3.z; + v_LightAmbientColor = mix(g_LightSkylightColor, g_LightAmbientColor, dot(normal, vec3(0, 1, 0)) * 0.5 + 0.5); +} diff --git a/modules/wallpaper-engine/shaders/generic3.frag b/modules/wallpaper-engine/shaders/generic3.frag new file mode 100644 index 0000000..f4ef6ed --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic3.frag @@ -0,0 +1,276 @@ + +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":1} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} +// [COMBO] {"material":"ui_editor_properties_rim_lighting","combo":"RIMLIGHTING","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_toon_shading","combo":"SHADINGGRADIENT","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_tint_mask_in_alpha","combo":"TINTMASKALPHA","default":0} +// [COMBO_DISABLED] {"material":"ui_editor_properties_double_sided_lighting","combo":"DOUBLESIDEDLIGHTING","default":0} + +#define RIM_LIGHTING_AMOUNT g_RimAmount +#define RIM_LIGHTING_EXPONENT g_RimExponent + +uniform mat4 g_ViewProjectionMatrix; + +#if SHADINGGRADIENT +#define GRADIENT_SAMPLER g_Texture4 +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_shading_gradient","default":"gradient/gradient_toon_smooth","formatcombo":true,"nonremovable":true,"require":{"SHADINGGRADIENT":1}} +#endif +uniform float g_RimAmount; // {"material":"rimamount","label":"ui_editor_properties_rim_lighting_amount","default":2.0,"range":[0,5],"group":"ui_editor_properties_rim_lighting"} +uniform float g_RimExponent; // {"material":"rimexponent","label":"ui_editor_properties_rim_lighting_exponent","default":4.0,"range":[0.01,10],"group":"ui_editor_properties_rim_lighting"} + +#include "common_fragment.h" +#include "common_pbr.h" + +uniform float g_Brightness; // {"material":"brightness","label":"ui_editor_properties_hdr_brightness","default":1,"range":[0,10]} + +uniform vec3 g_TintColor; // {"material":"color","label":"ui_editor_properties_tint_color","type": "color", "default":"1 1 1"} +uniform float g_TintAlpha; // {"material":"alpha","label":"ui_editor_properties_opacity","default":1,"range":[0,1]} + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","format":"normalmap","formatcombo":true,"combo":"NORMALMAP"} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}]} + +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} + +#if LIGHTING || REFLECTION +#ifdef NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +varying vec3 v_WorldNormal; +#endif +varying vec3 v_WorldPos; +#endif + +varying vec2 v_TexCoord; +varying vec4 v_ViewDir; +varying vec3 v_LightAmbientColor; + +#if REFLECTION +uniform vec3 g_Screen; +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; + +varying vec3 v_ScreenPos; +#endif + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} + +#if LIGHTS_POINT +uniform vec4 g_LPoint_Color[LIGHTS_POINT]; +uniform vec4 g_LPoint_Origin[LIGHTS_POINT]; +#endif +#if LIGHTS_SPOT +uniform vec4 g_LSpot_Color[LIGHTS_SPOT]; +uniform vec4 g_LSpot_Origin[LIGHTS_SPOT]; +uniform vec4 g_LSpot_Direction[LIGHTS_SPOT]; +#endif +#if LIGHTS_TUBE +uniform vec4 g_LTube_Color[LIGHTS_TUBE]; +uniform vec4 g_LTube_OriginA[LIGHTS_TUBE]; +uniform vec4 g_LTube_OriginB[LIGHTS_TUBE]; +#endif +#if LIGHTS_DIRECTIONAL +uniform vec4 g_LDirectional_Color[LIGHTS_DIRECTIONAL]; +uniform vec4 g_LDirectional_Direction[LIGHTS_DIRECTIONAL]; +#endif + +#if LIGHTING +#if SHADERVERSION < 62 +// DEPRECATION BSSSSS +vec3 PerformLighting_Deprecated(vec3 worldPos, vec3 color, vec3 normal, vec3 viewVector, vec3 specularTint, vec3 ambient, float roughness, float metallic) +{ + vec3 light = CAST3(0); + +#if LIGHTS_POINT + for (uint l = 0u; l < CASTU(LIGHTS_POINT); ++l) + { + vec3 lightDelta = g_LPoint_Origin[l].xyz - worldPos; + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LPoint_Color[l].rgb, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_SPOT + for (uint l = 0u; l < CASTU(LIGHTS_SPOT); ++l) + { + vec3 lightDelta = g_LSpot_Origin[l].xyz - worldPos; + float spotCookie = -dot(normalize(lightDelta), g_LSpot_Direction[l].xyz); + spotCookie = smoothstep(g_LSpot_Direction[l].w, g_LSpot_Origin[l].w, spotCookie); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LSpot_Color[l].rgb, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_TUBE + for (uint l = 0u; l < CASTU(LIGHTS_TUBE); ++l) + { + vec3 lightDelta = PointSegmentDelta(worldPos, g_LTube_OriginA[l].xyz, g_LTube_OriginB[l].xyz); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LTube_Color[l].rgb, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_DIRECTIONAL + for (uint l = 0u; l < CASTU(LIGHTS_DIRECTIONAL); ++l) + { + light += ComputePBRLight(normal, g_LDirectional_Direction[l].xyz, viewVector, color, g_LDirectional_Color[l].rgb, ambient, roughness, metallic); + } +#endif + + return light; +} + +#else + +vec3 PerformLighting_Deprecated(vec3 worldPos, vec3 color, vec3 normal, vec3 viewVector, vec3 specularTint, vec3 ambient, float roughness, float metallic) +{ + vec3 light = CAST3(0); + +#if LIGHTS_POINT + for (uint l = 0u; l < CASTU(LIGHTS_POINT); ++l) + { + vec3 lightDelta = g_LPoint_Origin[l].xyz - worldPos; + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LPoint_Color[l].rgb * g_LPoint_Color[l].w * g_LPoint_Color[l].w, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_SPOT + for (uint l = 0u; l < CASTU(LIGHTS_SPOT); ++l) + { + vec3 lightDelta = g_LSpot_Origin[l].xyz - worldPos; + float spotCookie = -dot(normalize(lightDelta), g_LSpot_Direction[l].xyz); + spotCookie = smoothstep(g_LSpot_Direction[l].w, g_LSpot_Origin[l].w, spotCookie); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LSpot_Color[l].rgb * spotCookie * g_LSpot_Color[l].w * g_LSpot_Color[l].w, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_TUBE + for (uint l = 0u; l < CASTU(LIGHTS_TUBE); ++l) + { + vec3 lightDelta = PointSegmentDelta(worldPos, g_LTube_OriginA[l].xyz, g_LTube_OriginB[l].xyz); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LTube_Color[l].rgb * g_LTube_Color[l].w * g_LTube_Color[l].w, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_DIRECTIONAL + for (uint l = 0u; l < CASTU(LIGHTS_DIRECTIONAL); ++l) + { + light += ComputePBRLight(normal, g_LDirectional_Direction[l].xyz, viewVector, color, g_LDirectional_Color[l].rgb * g_LDirectional_Color[l].w * g_LDirectional_Color[l].w, ambient, roughness, metallic); + } +#endif + + return light; +} + +#endif +#endif + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + +#if TINTMASKALPHA + albedo.rgb = mix(albedo.rgb, CAST3(max(albedo.x, max(albedo.y, albedo.z))) * g_TintColor, albedo.a); + albedo.a = 1.0; +#else + albedo.rgb *= g_TintColor; +#endif + albedo.a *= g_TintAlpha; + + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.xy); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + + float viewDist = length(v_ViewDir.xyz); + vec3 normalizedViewVector = v_ViewDir.xyz / viewDist; + +#if LIGHTING || REFLECTION +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_TexCoord.xy)); + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#else + vec3 normal = normalize(v_WorldNormal); +#endif +#endif + + vec3 light = CAST3(0.0); + +#if LIGHTING + light = PerformLighting_Deprecated(v_WorldPos, albedo.rgb, normal, normalizedViewVector, CAST3(1.0), f0, roughness, metallic); + vec3 ambient = v_LightAmbientColor * albedo.rgb; +#else + vec3 ambient = albedo.rgb; +#endif + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * albedo.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + albedo.rgb = CombineLighting(light, ambient); + +#if REFLECTION + float reflectivity = g_Reflectivity; + +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; + + float fresnelTerm = abs(dot(normal, normalizedViewVector)); + normal = normalize(mul(normal, CAST3X3(g_ViewProjectionMatrix))); + +#ifdef HLSL + normal.y = -normal.y; +#endif + +#if PLATFORM_ANDROID + normal.xy = normal.xy * vec2(0.20 / g_Screen.z, 0.20); +#else + // Make consistent on X since the width is usually more variable (multi monitors) - bad for phones tho + normal.xy = normal.xy * vec2(0.15, 0.15 * g_Screen.z); +#endif + screenUV += normal.xy * pow(fresnelTerm, 4.0) * 10; + float clipReflection = smoothstep(1.3, 1.0, screenUV.x) * smoothstep(-0.3, 0.0, screenUV.x) * + smoothstep(1.3, 1.0, screenUV.y) * smoothstep(-0.3, 0.0, screenUV.y); + + vec3 reflectionColor = texSample2DLod(g_Texture3, screenUV, roughness * g_Texture3MipMapInfo).rgb * clipReflection; + reflectionColor = reflectionColor * (1.0 - fresnelTerm) * reflectivity; + reflectionColor = pow(max(CAST3(0.001), reflectionColor), CAST3(2.0 - metallic)); + + albedo.rgb += saturate(reflectionColor); +#endif + +#if HDR + albedo.rgb *= g_Brightness; + +#if (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + albedo.rgb += g_EmissiveColor * albedo.rgb * emissiveOverbright; +#endif +#endif + + gl_FragColor = albedo; + +#if ALPHATOCOVERAGE + gl_FragColor.a = (gl_FragColor.a - 0.5) / max(fwidth(gl_FragColor.a), 0.0001) + 0.5; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/generic3.vert b/modules/wallpaper-engine/shaders/generic3.vert new file mode 100644 index 0000000..971373e --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic3.vert @@ -0,0 +1,172 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ViewProjectionMatrix; +uniform vec3 g_EyePosition; +uniform vec3 g_LightAmbientColor; +uniform vec3 g_LightSkylightColor; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +attribute vec2 a_TexCoord; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; + +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +varying vec4 v_ViewDir; +varying vec2 v_TexCoord; +varying vec3 v_LightAmbientColor; + +#if LIGHTING || REFLECTION +#if NORMALMAP +attribute vec4 a_Tangent4; +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +varying vec3 v_WorldNormal; +#endif +varying vec3 v_WorldPos; +#endif + +#if REFLECTION +varying vec3 v_ScreenPos; +#endif + +#if MORPHING +#if HLSL +in uint gl_VertexID; +#endif + +uniform sampler2D g_Texture5; // {"material":"morph","hidden":true} +uniform vec4 g_Texture5Resolution; + +uniform uint g_MorphOffsets[12]; +uniform float g_MorphWeights[12]; +#endif + +void main() { + vec3 localPos = a_Position; + vec3 localNormal = a_Normal; + +#if MORPHING + vec2 texture5ResolutionInv = 1.0 / g_Texture5Resolution.xy; + vec3 morphPos = CAST3(0.0); + vec3 morphNormal = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < g_MorphOffsets[0] % 12u; ++morphTarget) + { + uint morphMapOffset = CASTU(gl_VertexID) + g_MorphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * texture5ResolutionInv; + +#if MORPHING_NORMALS + uint morphMapIndex = (morphMapOffset * 6u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 6u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(g_Texture5Resolution.x); + uint morphPixel1y = morphMapIndex / CASTU(g_Texture5Resolution.y); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(g_Texture5Resolution.x); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(g_Texture5Resolution.y); + + vec4 morphCol1 = texSample2DLod(g_Texture5, vec2(morphPixel1x, morphPixel1y) * texture5ResolutionInv + offset, 0.0); + vec4 morphCol2 = texSample2DLod(g_Texture5, vec2(morphPixel2x, morphPixel2y) * texture5ResolutionInv + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.zw, morphCol2.x); + + vec3 posDelta = mix(posDeltaV1, posDeltaV2, step(1.0, morphMapFlip)); + morphPos += posDelta.rgb * g_MorphWeights[1u + morphTarget]; + + vec3 normalDeltaV1 = vec3(morphCol1.w, morphCol2.xy); + vec3 normalDeltaV2 = morphCol2.yzw; + + vec3 normalDelta = mix(normalDeltaV1, normalDeltaV2, step(1.0, morphMapFlip)); + morphNormal += normalDelta * g_MorphWeights[1u + morphTarget]; +#else + uint morphMapIndex = (morphMapOffset * 3u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 3u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(g_Texture5Resolution.x); + uint morphPixel1y = morphMapIndex / CASTU(g_Texture5Resolution.y); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(g_Texture5Resolution.x); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(g_Texture5Resolution.y); + + vec4 morphCol1 = texSample2DLod(g_Texture5, vec2(morphPixel1x, morphPixel1y) * texture5ResolutionInv + offset, 0.0); + vec4 morphCol2 = texSample2DLod(g_Texture5, vec2(morphPixel2x, morphPixel2y) * texture5ResolutionInv + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.w, morphCol2.xy); + vec3 posDeltaV3 = vec3(morphCol1.zw, morphCol2.x); + vec3 posDeltaV4 = morphCol1.yzw; + + vec3 posDelta = mix(posDeltaV1, mix(posDeltaV4, mix(posDeltaV3, posDeltaV2, + step(2.5, morphMapFlip)), step(1.5, morphMapFlip)), step(0.5, morphMapFlip)); + morphPos += posDelta.rgb * g_MorphWeights[1u + morphTarget]; +#endif + } + + localPos += morphPos * g_MorphWeights[0]; + +#if MORPHING_NORMALS + localNormal = normalize(localNormal + morphNormal * 3.465); +#endif +#endif + +#if SKINNING + localPos = mul(vec4(localPos, 1.0), g_Bones[a_BlendIndices.x] * a_BlendWeights.x + + g_Bones[a_BlendIndices.y] * a_BlendWeights.y + + g_Bones[a_BlendIndices.z] * a_BlendWeights.z + + g_Bones[a_BlendIndices.w] * a_BlendWeights.w); +#endif + + vec4 worldPos = mul(vec4(localPos, 1.0), g_ModelMatrix); + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + +#if SKINNING + localNormal = mul(localNormal, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + + vec3 normal = normalize(mul(localNormal, CAST3X3(g_ModelMatrix))); + + v_TexCoord.xy = a_TexCoord; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; + +#if LIGHTING || REFLECTION + v_WorldPos = worldPos.xyz; +#if NORMALMAP +#if SKINNING + vec3 tangent = mul(a_Tangent4.xyz, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#else + vec3 tangent = a_Tangent4.xyz; +#endif + + mat3 tangentSpace = BuildTangentSpace(CAST3X3(g_ModelMatrix), localNormal, vec4(tangent, a_Tangent4.w)); + + v_Tangent = normalize(tangentSpace[0]); + v_Bitangent = normalize(tangentSpace[1]); + v_Normal = normalize(tangentSpace[2]); +#else + v_WorldNormal = normal; +#endif +#endif + +#if REFLECTION + v_ScreenPos = gl_Position.xyw; +#ifdef HLSL + v_ScreenPos.y = -v_ScreenPos.y; +#endif +#endif + + v_LightAmbientColor = mix(g_LightSkylightColor, g_LightAmbientColor, dot(normal, vec3(0, 1, 0)) * 0.5 + 0.5); +} diff --git a/modules/wallpaper-engine/shaders/generic4.frag b/modules/wallpaper-engine/shaders/generic4.frag new file mode 100644 index 0000000..9d3f320 --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic4.frag @@ -0,0 +1,193 @@ + +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":1} +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} +// [COMBO] {"material":"ui_editor_properties_rim_lighting","combo":"RIMLIGHTING","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_toon_shading","combo":"SHADINGGRADIENT","default":0,"require":{"LIGHTING":1}} +// [COMBO] {"material":"ui_editor_properties_tint_mask_in_alpha","combo":"TINTMASKALPHA","default":0} + +#define RIM_LIGHTING_AMOUNT g_RimAmount +#define RIM_LIGHTING_EXPONENT g_RimExponent + +uniform mat4 g_ViewProjectionMatrix; + +#if SHADINGGRADIENT +#define GRADIENT_SAMPLER g_Texture4 +uniform sampler2D g_Texture4; // {"label":"ui_editor_properties_shading_gradient","default":"gradient/gradient_toon_smooth","formatcombo":true,"nonremovable":true,"require":{"SHADINGGRADIENT":1}} +#endif +uniform float g_RimAmount; // {"material":"rimamount","label":"ui_editor_properties_rim_lighting_amount","default":2.0,"range":[0,5],"group":"ui_editor_properties_rim_lighting"} +uniform float g_RimExponent; // {"material":"rimexponent","label":"ui_editor_properties_rim_lighting_exponent","default":4.0,"range":[0.01,10],"group":"ui_editor_properties_rim_lighting"} + +#if LIGHTS_SHADOW_MAPPING +#define SHADOW_ATLAS_SAMPLER g_Texture6 +#define SHADOW_ATLAS_TEXEL g_Texture6Texel +uniform sampler2DComparison g_Texture6; // {"hidden":true,"default":"_rt_shadowAtlas"} +uniform vec4 g_Texture6Texel; +#endif + +#if LIGHTS_COOKIE +#define COOKIE_SAMPLER g_Texture7 +uniform sampler2D g_Texture7; // {"hidden":true,"default":"_alias_lightCookie"} +#endif + +#include "common_fragment.h" +#include "common_pbr_2.h" +#include "common_fog.h" + +uniform float g_Brightness; // {"material":"brightness","label":"ui_editor_properties_hdr_brightness","default":1,"range":[0,10]} + +uniform vec3 g_TintColor; // {"material":"color","label":"ui_editor_properties_tint_color","type": "color", "default":"1 1 1"} +uniform float g_TintAlpha; // {"material":"alpha","label":"ui_editor_properties_opacity","default":1,"range":[0,1]} + +uniform sampler2D g_Texture0; // {"material":"albedo","label":"ui_editor_properties_albedo","default":"util/white"} +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","format":"normalmap","formatcombo":true,"combo":"NORMALMAP"} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}]} + +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} + +#if LIGHTING || REFLECTION +#ifdef NORMALMAP +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +varying vec3 v_WorldNormal; +#endif +varying vec3 v_WorldPos; +#endif + +varying vec2 v_TexCoord; +varying vec4 v_ViewDir; +varying vec3 v_LightAmbientColor; +//varying vec4 v_VertexColor; + +#if REFLECTION +uniform vec3 g_Screen; +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; + +varying vec3 v_ScreenPos; +#endif + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} + +#require LightingV1 + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); // * v_VertexColor; + +#if TINTMASKALPHA + albedo.rgb = mix(albedo.rgb, CAST3(max(albedo.x, max(albedo.y, albedo.z))) * g_TintColor, albedo.a); + albedo.a = 1.0; +#else + albedo.rgb *= g_TintColor; +#endif + albedo.a *= g_TintAlpha; + + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.xy); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + + vec3 f0 = CAST3(0.04); + f0 = mix(f0, albedo.rgb, metallic); + + float viewDist = length(v_ViewDir.xyz); + vec3 normalizedViewVector = v_ViewDir.xyz / viewDist; + +#if LIGHTING || REFLECTION +#if NORMALMAP + vec3 normal = DecompressNormal(texSample2D(g_Texture1, v_TexCoord.xy)); + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#else + vec3 normal = normalize(v_WorldNormal); +#endif +#endif + + vec3 light = CAST3(0.0); + +#if LIGHTING + light = PerformLighting_V1(v_WorldPos, albedo.rgb, normal, normalizedViewVector, CAST3(1.0), f0, roughness, metallic); + vec3 ambient = v_LightAmbientColor * albedo.rgb; +#else + vec3 ambient = albedo.rgb; +#endif + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * albedo.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + albedo.rgb = CombineLighting(light, ambient); + +#if REFLECTION + float reflectivity = g_Reflectivity; + +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; + + float fresnelTerm = abs(dot(normal, normalizedViewVector)); + normal = normalize(mul(normal, CAST3X3(g_ViewProjectionMatrix))); + +#ifdef HLSL + normal.y = -normal.y; +#endif + +#if PLATFORM_ANDROID + normal.xy = normal.xy * vec2(0.20 / g_Screen.z, 0.20); +#else + // Make consistent on X since the width is usually more variable (multi monitors) - bad for phones tho + normal.xy = normal.xy * vec2(0.15, 0.15 * g_Screen.z); +#endif + screenUV += normal.xy * pow(fresnelTerm, 4.0) * 10; + float clipReflection = smoothstep(1.3, 1.0, screenUV.x) * smoothstep(-0.3, 0.0, screenUV.x) * + smoothstep(1.3, 1.0, screenUV.y) * smoothstep(-0.3, 0.0, screenUV.y); + + vec3 reflectionColor = texSample2DLod(g_Texture3, screenUV, roughness * g_Texture3MipMapInfo).rgb * clipReflection; + reflectionColor = reflectionColor * (1.0 - fresnelTerm) * reflectivity; + reflectionColor = pow(max(CAST3(0.001), reflectionColor), CAST3(2.0 - metallic)); + + albedo.rgb += saturate(reflectionColor); +#endif + +#if HDR + albedo.rgb *= g_Brightness; + +#if (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + albedo.rgb += g_EmissiveColor * albedo.rgb * emissiveOverbright; +#endif +#endif + +#if FOG_HEIGHT || FOG_DIST + vec2 fogPixelState = CalculateFogPixelState(viewDist, v_ViewDir.w); + albedo.rgb = ApplyFog(albedo.rgb, fogPixelState); +#if ADDITIVE + albedo.a = ApplyFogAlpha(albedo.a, fogPixelState); +#endif +#endif + + gl_FragColor = albedo; + +#if ALPHATOCOVERAGE + gl_FragColor.a = (gl_FragColor.a - 0.5) / max(fwidth(gl_FragColor.a), 0.0001) + 0.5; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/generic4.vert b/modules/wallpaper-engine/shaders/generic4.vert new file mode 100644 index 0000000..cdb85a1 --- /dev/null +++ b/modules/wallpaper-engine/shaders/generic4.vert @@ -0,0 +1,175 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ViewProjectionMatrix; +uniform vec3 g_EyePosition; +uniform vec3 g_LightAmbientColor; +uniform vec3 g_LightSkylightColor; + +attribute vec3 a_Position; +attribute vec3 a_Normal; +attribute vec2 a_TexCoord; +//attribute vec4 a_Color4u; +//varying vec4 v_VertexColor; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; + +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +varying vec4 v_ViewDir; +varying vec2 v_TexCoord; +varying vec3 v_LightAmbientColor; + +#if LIGHTING || REFLECTION +#if NORMALMAP +attribute vec4 a_Tangent4; +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +#else +varying vec3 v_WorldNormal; +#endif +varying vec3 v_WorldPos; +#endif + +#if REFLECTION +varying vec3 v_ScreenPos; +#endif + +#if MORPHING +#if HLSL +in uint gl_VertexID; +#endif + +uniform sampler2D g_Texture5; // {"material":"morph","hidden":true} +uniform vec4 g_Texture5Resolution; + +uniform uint g_MorphOffsets[12]; +uniform float g_MorphWeights[12]; +#endif + +void main() { + vec3 localPos = a_Position; + vec3 localNormal = a_Normal; + +#if MORPHING + vec2 texture5ResolutionInv = 1.0 / g_Texture5Resolution.xy; + vec3 morphPos = CAST3(0.0); + vec3 morphNormal = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < g_MorphOffsets[0] % 12u; ++morphTarget) + { + uint morphMapOffset = CASTU(gl_VertexID) + g_MorphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * texture5ResolutionInv; + +#if MORPHING_NORMALS + uint morphMapIndex = (morphMapOffset * 6u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 6u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(g_Texture5Resolution.x); + uint morphPixel1y = morphMapIndex / CASTU(g_Texture5Resolution.y); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(g_Texture5Resolution.x); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(g_Texture5Resolution.y); + + vec4 morphCol1 = texSample2DLod(g_Texture5, vec2(morphPixel1x, morphPixel1y) * texture5ResolutionInv + offset, 0.0); + vec4 morphCol2 = texSample2DLod(g_Texture5, vec2(morphPixel2x, morphPixel2y) * texture5ResolutionInv + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.zw, morphCol2.x); + + vec3 posDelta = mix(posDeltaV1, posDeltaV2, step(1.0, morphMapFlip)); + morphPos += posDelta.rgb * g_MorphWeights[1u + morphTarget]; + + vec3 normalDeltaV1 = vec3(morphCol1.w, morphCol2.xy); + vec3 normalDeltaV2 = morphCol2.yzw; + + vec3 normalDelta = mix(normalDeltaV1, normalDeltaV2, step(1.0, morphMapFlip)); + morphNormal += normalDelta * g_MorphWeights[1u + morphTarget]; +#else + uint morphMapIndex = (morphMapOffset * 3u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 3u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(g_Texture5Resolution.x); + uint morphPixel1y = morphMapIndex / CASTU(g_Texture5Resolution.y); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(g_Texture5Resolution.x); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(g_Texture5Resolution.y); + + vec4 morphCol1 = texSample2DLod(g_Texture5, vec2(morphPixel1x, morphPixel1y) * texture5ResolutionInv + offset, 0.0); + vec4 morphCol2 = texSample2DLod(g_Texture5, vec2(morphPixel2x, morphPixel2y) * texture5ResolutionInv + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.w, morphCol2.xy); + vec3 posDeltaV3 = vec3(morphCol1.zw, morphCol2.x); + vec3 posDeltaV4 = morphCol1.yzw; + + vec3 posDelta = mix(posDeltaV1, mix(posDeltaV4, mix(posDeltaV3, posDeltaV2, + step(2.5, morphMapFlip)), step(1.5, morphMapFlip)), step(0.5, morphMapFlip)); + morphPos += posDelta.rgb * g_MorphWeights[1u + morphTarget]; +#endif + } + + localPos += morphPos * g_MorphWeights[0]; + +#if MORPHING_NORMALS + localNormal = normalize(localNormal + morphNormal * 3.465); +#endif +#endif + +#if SKINNING + localPos = mul(vec4(localPos, 1.0), g_Bones[a_BlendIndices.x] * a_BlendWeights.x + + g_Bones[a_BlendIndices.y] * a_BlendWeights.y + + g_Bones[a_BlendIndices.z] * a_BlendWeights.z + + g_Bones[a_BlendIndices.w] * a_BlendWeights.w); +#endif + + vec4 worldPos = mul(vec4(localPos, 1.0), g_ModelMatrix); + gl_Position = mul(worldPos, g_ViewProjectionMatrix); + +#if SKINNING + localNormal = mul(localNormal, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + + vec3 normal = normalize(mul(localNormal, CAST3X3(g_ModelMatrix))); + + v_TexCoord.xy = a_TexCoord; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; + +#if LIGHTING || REFLECTION + v_WorldPos = worldPos.xyz; +#if NORMALMAP +#if SKINNING + vec3 tangent = mul(a_Tangent4.xyz, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#else + vec3 tangent = a_Tangent4.xyz; +#endif + + mat3 tangentSpace = BuildTangentSpace(CAST3X3(g_ModelMatrix), localNormal, vec4(tangent, a_Tangent4.w)); + + v_Tangent = normalize(tangentSpace[0]); + v_Bitangent = normalize(tangentSpace[1]); + v_Normal = normalize(tangentSpace[2]); +#else + v_WorldNormal = normal; +#endif +#endif + +#if REFLECTION + v_ScreenPos = gl_Position.xyw; +#ifdef HLSL + v_ScreenPos.y = -v_ScreenPos.y; +#endif +#endif + + //v_VertexColor = a_Color4u; + v_LightAmbientColor = mix(g_LightSkylightColor, g_LightAmbientColor, dot(normal, vec3(0, 1, 0)) * 0.5 + 0.5); +} diff --git a/modules/wallpaper-engine/shaders/genericimage.frag b/modules/wallpaper-engine/shaders/genericimage.frag new file mode 100644 index 0000000..16ba8f2 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage.frag @@ -0,0 +1,30 @@ + +#include "common_fragment.h" + +uniform sampler2D g_Texture0; + +uniform float g_Brightness; // {"material":"Bright","default":1,"range":[0,2]} +uniform float g_UserAlpha; // {"material":"Alpha","default":1,"range":[0,1]} +uniform float g_Power; // {"material":"Power","default":1,"range":[0,6]} + +varying vec2 v_TexCoord; + +#if MULTI +uniform sampler2D g_Texture1; + +varying vec2 v_TexCoord2; +#endif + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + +#if MULTI + albedo *= texSample2D(g_Texture1, v_TexCoord2.xy); +#endif + + albedo.rgb *= g_Brightness; + albedo.a *= g_UserAlpha; + albedo.rgb = pow(albedo.rgb, CAST3(g_Power)); + + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/shaders/genericimage.vert b/modules/wallpaper-engine/shaders/genericimage.vert new file mode 100644 index 0000000..b3cc349 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage.vert @@ -0,0 +1,41 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform float g_Time; +uniform vec4 g_Texture0Rotation; +uniform vec2 g_Texture0Translation; + +uniform float g_ScrollX; // {"material":"Scroll 1 X","default":0,"range":[-2,2]} +uniform float g_ScrollY; // {"material":"Scroll 1 Y","default":0,"range":[-2,2]} + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +#if MULTI +uniform float g_Scroll2X; // {"material":"Scroll 2 X","default":0,"range":[-2,2]} +uniform float g_Scroll2Y; // {"material":"Scroll 2 Y","default":0,"range":[-2,2]} + +varying vec2 v_TexCoord2; +#endif + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + vec2 scroll = vec2(g_ScrollX, g_ScrollY); + scroll = sign(scroll) * pow(vec2(g_ScrollX, g_ScrollY), CAST2(2.0)); + +#if SPRITESHEET + v_TexCoord = g_Texture0Translation + a_TexCoord.x * g_Texture0Rotation.xy + a_TexCoord.y * g_Texture0Rotation.zw; + //v_TexCoord = a_TexCoord; +#else + v_TexCoord = a_TexCoord + g_Time * scroll; +#endif + +#if MULTI + vec2 scroll2 = vec2(g_Scroll2X, g_Scroll2Y); + scroll2 = sign(scroll2) * pow(vec2(g_Scroll2X, g_Scroll2Y), CAST2(2.0)); + v_TexCoord2 = a_TexCoord + g_Time * scroll2; +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericimage2.frag b/modules/wallpaper-engine/shaders/genericimage2.frag new file mode 100644 index 0000000..e160541 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage2.frag @@ -0,0 +1,169 @@ + +#include "common_pbr.h" +#include "common_blending.h" + +uniform sampler2D g_Texture0; // {"label":"ui_editor_properties_albedo","nonremovable":true} + +#ifndef VERSION +uniform float g_Brightness; // {"material":"Brightness","label":"ui_editor_properties_brightness","default":1,"range":[0,2]} +uniform float g_UserAlpha; // {"material":"Alpha","label":"ui_editor_properties_alpha","default":1,"range":[0,1]} +#else +uniform vec4 g_Color4; +#endif + +#if PBRMASKS +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +#if LIGHTING || REFLECTION +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","combo":"NORMALMAP","format":"rg88","formatcombo":true,"mode":"normal","requireany":true,"require":{"LIGHTING":1,"REFLECTION":1}} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","mode":"opacitymask","paintdefaultcolor":"0 0 0 1","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}],"requireany":true,"require":{"LIGHTING":1,"REFLECTION":1}} +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.5,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0.5,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} +#endif + +#if LIGHTING +uniform vec4 g_LightsColorPremultiplied[3]; +uniform vec3 g_LightAmbientColor; + +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; +#endif + +// Local space normal direction and precomputed tangent space in light vectors +#if (LIGHTING || REFLECTION) && NORMALMAP == 0 +// World space normal direction without normal map +varying vec3 v_Normal; +#endif + +#if REFLECTION && NORMALMAP +uniform vec3 g_Screen; +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; + +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +varying vec3 v_ScreenPos; +#endif + +#if BLENDMODE +uniform sampler2D g_Texture4; // {"hidden":true,"default":"_rt_FullFrameBuffer"} +varying vec3 v_ScreenCoord; +#endif + +#ifdef SKINNING_ALPHA +varying float v_BoneAlpha; +#endif + +void main() { + vec4 color = texSample2D(g_Texture0, v_TexCoord.xy); + +#ifndef VERSION + color.rgb *= g_Brightness; + color.a *= g_UserAlpha; +#else + color *= g_Color4; +#endif + +#if LIGHTING || REFLECTION + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.zw); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + +#if NORMALMAP + vec2 compressedNormal = texSample2D(g_Texture1, v_TexCoord.xy).xy * 2.0 - 1.0; + vec3 normal = vec3(compressedNormal, + sqrt(saturate(1.0 - compressedNormal.x * compressedNormal.x - compressedNormal.y * compressedNormal.y))); + normal = normalize(normal); +#else + vec3 normal = normalize(v_Normal); +#endif +#endif + +#if LIGHTING + vec3 f0 = CAST3(0.04); + f0 = mix(f0, color.rgb, metallic); + + // Using the actual view vector is ugly for ortho rendering + vec3 normalizedViewVector = vec3(0, 0, 1); //normalize(v_ViewDir); + + vec3 light = ComputePBRLight(normal, v_Light0DirectionL3X.xyz, normalizedViewVector, color.rgb, g_LightsColorPremultiplied[0].rgb, f0, roughness, metallic); + light += ComputePBRLight(normal, v_Light1DirectionL3Y.xyz, normalizedViewVector, color.rgb, g_LightsColorPremultiplied[1].rgb, f0, roughness, metallic); + light += ComputePBRLight(normal, v_Light2DirectionL3Z.xyz, normalizedViewVector, color.rgb, g_LightsColorPremultiplied[2].rgb, f0, roughness, metallic); + light += ComputePBRLight(normal, vec3(v_Light0DirectionL3X.w, v_Light1DirectionL3Y.w, v_Light2DirectionL3Z.w), + normalizedViewVector, color.rgb, + vec3(g_LightsColorPremultiplied[0].w, g_LightsColorPremultiplied[1].w, g_LightsColorPremultiplied[2].w), + f0, roughness, metallic); + vec3 ambient = max(CAST3(0.001), g_LightAmbientColor) * color.rgb; + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * color.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + color.rgb = CombineLighting(light, ambient); +#endif + +#if REFLECTION && NORMALMAP + float reflectivity = g_Reflectivity; + +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + + vec2 tangent = normalize(v_Tangent.xy); + vec2 bitangent = normalize(v_Bitangent.xy); + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; + + float fresnelTerm = max(0.001, dot(normal, vec3(0, 0, 1))); +#if PLATFORM_ANDROID + normal.xy = normalize(normal.xy) * vec2(0.25 / g_Screen.z, 0.25); +#else + // Make consistent on X since the width is usually more variable (multi monitors) - bad for phones tho + normal.xy = normalize(normal.xy) * vec2(0.15, 0.15 * g_Screen.z); +#endif + screenUV += (tangent * normal.x + bitangent * normal.y) * fresnelTerm; + + vec3 reflectionColor = texSample2DLod(g_Texture3, screenUV, roughness * g_Texture3MipMapInfo).rgb; + reflectionColor = reflectionColor * (1.0 - fresnelTerm) * reflectivity; + reflectionColor = pow(max(CAST3(0.001), reflectionColor), CAST3(2.0 - metallic)); + + color.rgb += saturate(reflectionColor); +#endif + +#if HDR && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + color.rgb += g_EmissiveColor * color.rgb * emissiveOverbright; +#endif + +#ifdef SKINNING_ALPHA + color.a *= v_BoneAlpha; +#endif + + gl_FragColor = color; + +#if BLENDMODE + vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * vec2(0.5, 0.5) + 0.5; + vec4 screen = texSample2D(g_Texture4, screenCoord); + + gl_FragColor.rgb = ApplyBlending(BLENDMODE, screen.rgb, gl_FragColor.rgb, gl_FragColor.a); + gl_FragColor.a = screen.a; +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericimage2.vert b/modules/wallpaper-engine/shaders/genericimage2.vert new file mode 100644 index 0000000..ad92933 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage2.vert @@ -0,0 +1,186 @@ + +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":0} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} + +#include "common_vertex.h" + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Rotation; +uniform vec2 g_Texture0Translation; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if SKINNING +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +#if PBRMASKS +uniform vec4 g_Texture2Resolution; +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +#if LIGHTING || REFLECTION +uniform vec3 g_EyePosition; + +uniform mat4 g_ModelMatrix; +uniform mat3 g_NormalModelMatrix; + +uniform mat4 g_AltModelMatrix; +uniform mat3 g_AltNormalModelMatrix; +uniform mat4 g_AltViewProjectionMatrix; + +#if PRELIGHTING +#define M_MDL g_AltModelMatrix +#define M_NML g_AltNormalModelMatrix +#define M_VP g_AltViewProjectionMatrix +#define M_MVP mul(g_AltModelMatrix, g_AltViewProjectionMatrix) +#else +#define M_MDL g_ModelMatrix +#define M_NML g_NormalModelMatrix +#define M_VP g_ViewProjectionMatrix +#define M_MVP g_ModelViewProjectionMatrix +#endif +#else +#define M_MVP g_ModelViewProjectionMatrix +#endif + +#if LIGHTING +uniform mat4 g_ViewProjectionMatrix; +uniform vec3 g_LightsPosition[4]; + +varying vec4 v_Light0DirectionL3X; +varying vec4 v_Light1DirectionL3Y; +varying vec4 v_Light2DirectionL3Z; +#endif + +#if (LIGHTING || REFLECTION) && NORMALMAP == 0 +varying vec3 v_Normal; +#endif + +#if REFLECTION && NORMALMAP +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +varying vec3 v_ScreenPos; +#endif + +#if BLENDMODE +varying vec3 v_ScreenCoord; +#endif + +#ifdef SKINNING_ALPHA +uniform float g_BonesAlpha[BONECOUNT]; +varying float v_BoneAlpha; +#endif + +void main() { + +#if SKINNING + vec3 localPos = mul(vec4(a_Position, 1.0), g_Bones[a_BlendIndices.x] * a_BlendWeights.x + + g_Bones[a_BlendIndices.y] * a_BlendWeights.y + + g_Bones[a_BlendIndices.z] * a_BlendWeights.z + + g_Bones[a_BlendIndices.w] * a_BlendWeights.w); +#else + vec3 localPos = a_Position; +#endif + +#if SKINNING_ALPHA + v_BoneAlpha = saturate(g_BonesAlpha[a_BlendIndices.x] * a_BlendWeights.x + + g_BonesAlpha[a_BlendIndices.y] * a_BlendWeights.y + + g_BonesAlpha[a_BlendIndices.z] * a_BlendWeights.z + + g_BonesAlpha[a_BlendIndices.w] * a_BlendWeights.w); +#endif + +#if SPRITESHEET + v_TexCoord.xy = g_Texture0Translation + a_TexCoord.x * g_Texture0Rotation.xy + a_TexCoord.y * g_Texture0Rotation.zw; +#else + v_TexCoord.xy = a_TexCoord; +#endif + +#if PBRMASKS + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + +#if LIGHTING || REFLECTION + // Compute normal and tangent space for lighting and/or reflection later + vec3 normal = vec3(0, 0, 1.0); + vec3 tangent = vec3(1.0, 0, 0); + vec4 worldPos = mul(vec4(localPos, 1.0), M_MDL); + +#if SKINNING + normal = mul(normal, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + +#if NORMALMAP + +#if SKINNING + tangent = mul(tangent, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + mat3 tangentSpace = BuildTangentSpace(M_NML, normal, vec4(tangent, 1.0)); +#if REFLECTION + v_Tangent = tangentSpace[0]; + v_Bitangent = tangentSpace[1]; +#endif +#endif +#endif + + // Prepare lighting data +#if LIGHTING + v_Light0DirectionL3X.xyz = g_LightsPosition[0] - worldPos.xyz; + v_Light1DirectionL3Y.xyz = g_LightsPosition[1] - worldPos.xyz; + v_Light2DirectionL3Z.xyz = g_LightsPosition[2] - worldPos.xyz; + vec3 l3 = g_LightsPosition[3] - worldPos.xyz; + + gl_Position = mul(worldPos, M_VP); + +#if NORMALMAP + v_Light0DirectionL3X.xyz = mul(tangentSpace, v_Light0DirectionL3X.xyz); + v_Light1DirectionL3Y.xyz = mul(tangentSpace, v_Light1DirectionL3Y.xyz); + v_Light2DirectionL3Z.xyz = mul(tangentSpace, v_Light2DirectionL3Z.xyz); + l3 = mul(tangentSpace, l3); +#else + v_Normal = normalize(mul(normal, M_NML)); +#endif + + v_Light0DirectionL3X.w = l3.x; + v_Light1DirectionL3Y.w = l3.y; + v_Light2DirectionL3Z.w = l3.z; + +#else + gl_Position = mul(vec4(localPos, 1.0), M_MVP); +#endif + +#if REFLECTION && NORMALMAP + v_ScreenPos = gl_Position.xyw; +#ifdef HLSL + v_ScreenPos.y = -v_ScreenPos.y; + v_Tangent.y = -v_Tangent.y; + v_Bitangent.y = -v_Bitangent.y; +#endif +#endif + +#if PRELIGHTING + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#endif + +#if BLENDMODE + v_ScreenCoord = gl_Position.xyw; +#ifdef HLSL + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericimage3.frag b/modules/wallpaper-engine/shaders/genericimage3.frag new file mode 100644 index 0000000..f970514 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage3.frag @@ -0,0 +1,297 @@ + +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":0} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} + +#include "common_pbr.h" +#include "common_blending.h" + +uniform sampler2D g_Texture0; // {"label":"ui_editor_properties_albedo","nonremovable":true} + +uniform mat4 g_ViewProjectionMatrix; +uniform vec4 g_Color4; + +#if VERTEXCOLOR +varying vec4 v_Color; +#endif + +#if PBRMASKS +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +#if LIGHTING || REFLECTION +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","combo":"NORMALMAP","format":"rg88","formatcombo":true,"mode":"normal","requireany":true,"require":{"LIGHTING":1,"REFLECTION":1}} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","mode":"opacitymask","paintdefaultcolor":"0 0 0 1","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}],"requireany":true,"require":{"LIGHTING":1,"REFLECTION":1}} +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform vec3 g_SpecularTint; // {"material":"speculartint","label":"ui_editor_properties_specular_tint","type":"color","default":"1 1 1","group":"ui_editor_properties_material"} + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} +#endif + +#if LIGHTING +uniform vec3 g_LightAmbientColor; +#endif + +#if LIGHTING || REFLECTION +varying vec4 v_ViewDir; +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +varying vec3 v_WorldPos; +#if NORMALMAP == 0 +varying vec3 v_WorldNormal; +#endif +#endif + +#if REFLECTION && NORMALMAP +uniform vec3 g_Screen; +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE +varying vec3 v_ScreenPos; +#endif + +#if BLENDMODE +uniform sampler2D g_Texture4; // {"hidden":true,"default":"_rt_FullFrameBuffer"} +#endif + +#if MORPHING || SKINNING_ALPHA +varying float v_VertexAlpha; +#endif + +#if LIGHTS_POINT +uniform vec4 g_LPoint_Color[LIGHTS_POINT]; +uniform vec4 g_LPoint_Origin[LIGHTS_POINT]; +#endif +#if LIGHTS_SPOT +uniform vec4 g_LSpot_Color[LIGHTS_SPOT]; +uniform vec4 g_LSpot_Origin[LIGHTS_SPOT]; +uniform vec4 g_LSpot_Direction[LIGHTS_SPOT]; +#endif +#if LIGHTS_TUBE +uniform vec4 g_LTube_Color[LIGHTS_TUBE]; +uniform vec4 g_LTube_OriginA[LIGHTS_TUBE]; +uniform vec4 g_LTube_OriginB[LIGHTS_TUBE]; +#endif +#if LIGHTS_DIRECTIONAL +uniform vec4 g_LDirectional_Color[LIGHTS_DIRECTIONAL]; +uniform vec4 g_LDirectional_Direction[LIGHTS_DIRECTIONAL]; +#endif + +#if LIGHTING +#if SHADERVERSION < 62 +// DEPRECATION BSSSSS +vec3 PerformLighting_Deprecated(vec3 worldPos, vec3 color, vec3 normal, vec3 viewVector, vec3 specularTint, vec3 ambient, float roughness, float metallic) +{ + vec3 light = CAST3(0); + +#if LIGHTS_POINT + for (uint l = 0u; l < CASTU(LIGHTS_POINT); ++l) + { + vec3 lightDelta = g_LPoint_Origin[l].xyz - worldPos; + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LPoint_Color[l].rgb, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_SPOT + for (uint l = 0u; l < CASTU(LIGHTS_SPOT); ++l) + { + vec3 lightDelta = g_LSpot_Origin[l].xyz - worldPos; + float spotCookie = -dot(normalize(lightDelta), g_LSpot_Direction[l].xyz); + spotCookie = smoothstep(g_LSpot_Direction[l].w, g_LSpot_Origin[l].w, spotCookie); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LSpot_Color[l].rgb, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_TUBE + for (uint l = 0u; l < CASTU(LIGHTS_TUBE); ++l) + { + vec3 lightDelta = PointSegmentDelta(worldPos, g_LTube_OriginA[l].xyz, g_LTube_OriginB[l].xyz); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LTube_Color[l].rgb, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_DIRECTIONAL + for (uint l = 0u; l < CASTU(LIGHTS_DIRECTIONAL); ++l) + { + light += ComputePBRLight(normal, g_LDirectional_Direction[l].xyz, viewVector, color, g_LDirectional_Color[l].rgb, ambient, roughness, metallic); + } +#endif + + return light; +} + +#else + +vec3 PerformLighting_Deprecated(vec3 worldPos, vec3 color, vec3 normal, vec3 viewVector, vec3 specularTint, vec3 ambient, float roughness, float metallic) +{ + vec3 light = CAST3(0); + +#if LIGHTS_POINT + for (uint l = 0u; l < CASTU(LIGHTS_POINT); ++l) + { + vec3 lightDelta = g_LPoint_Origin[l].xyz - worldPos; + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LPoint_Color[l].rgb * g_LPoint_Color[l].w * g_LPoint_Color[l].w, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_SPOT + for (uint l = 0u; l < CASTU(LIGHTS_SPOT); ++l) + { + vec3 lightDelta = g_LSpot_Origin[l].xyz - worldPos; + float spotCookie = -dot(normalize(lightDelta), g_LSpot_Direction[l].xyz); + spotCookie = smoothstep(g_LSpot_Direction[l].w, g_LSpot_Origin[l].w, spotCookie); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LSpot_Color[l].rgb * spotCookie * g_LSpot_Color[l].w * g_LSpot_Color[l].w, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_TUBE + for (uint l = 0u; l < CASTU(LIGHTS_TUBE); ++l) + { + vec3 lightDelta = PointSegmentDelta(worldPos, g_LTube_OriginA[l].xyz, g_LTube_OriginB[l].xyz); + light += ComputePBRLight(normal, lightDelta, viewVector, color, g_LTube_Color[l].rgb * g_LTube_Color[l].w * g_LTube_Color[l].w, ambient, roughness, metallic); + } +#endif + +#if LIGHTS_DIRECTIONAL + for (uint l = 0u; l < CASTU(LIGHTS_DIRECTIONAL); ++l) + { + light += ComputePBRLight(normal, g_LDirectional_Direction[l].xyz, viewVector, color, g_LDirectional_Color[l].rgb * g_LDirectional_Color[l].w * g_LDirectional_Color[l].w, ambient, roughness, metallic); + } +#endif + + return light; +} + +#endif +#endif + +void main() { + vec4 color = texSample2D(g_Texture0, v_TexCoord.xy) * g_Color4; + +#if LIGHTING || REFLECTION + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.zw); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + +#if NORMALMAP + vec2 compressedNormal = texSample2D(g_Texture1, v_TexCoord.xy).xy * 2.0 - 1.0; + vec3 normal = vec3(compressedNormal, + sqrt(saturate(1.0 - compressedNormal.x * compressedNormal.x - compressedNormal.y * compressedNormal.y))); + normal = normalize(normal); +#else + vec3 normal = normalize(v_WorldNormal); +#endif +#endif + +#if LIGHTING || REFLECTION +#if SCENE_ORTHO + // View vector should be static on puppets on 2D wallpapers + vec3 normalizedViewVector = vec3(0, 0, 1); +#else + vec3 normalizedViewVector = normalize(v_ViewDir.xyz); +#endif + +#if NORMALMAP + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#endif +#endif + +#if LIGHTING + vec3 f0 = CAST3(0.04); + f0 = mix(f0, color.rgb, metallic); + + vec3 light = PerformLighting_Deprecated(v_WorldPos, color.rgb, normal, normalizedViewVector, g_SpecularTint, f0, roughness, metallic); + vec3 ambient = g_LightAmbientColor * color.rgb; + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * color.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + color.rgb = CombineLighting(light, ambient); +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; +#endif + +#if REFLECTION && NORMALMAP + float reflectivity = g_Reflectivity; + +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + + vec2 tangent = normalize(v_Tangent.xy); + vec2 bitangent = normalize(v_Bitangent.xy); + + float fresnelTerm = max(0.001, dot(normal, normalizedViewVector)); + normal = normalize(mul(normal, CAST3X3(g_ViewProjectionMatrix))); + +#ifdef HLSL + normal.y = -normal.y; +#endif + +#if PLATFORM_ANDROID + normal.xy = normal.xy * vec2(0.25 / g_Screen.z, 0.25); +#else + // Make consistent on X since the width is usually more variable (multi monitors) - bad for phones tho + normal.xy = normal.xy * vec2(0.15, 0.15 * g_Screen.z); +#endif + //screenUV += normal * fresnelTerm; + screenUV += normal.xy * pow(fresnelTerm, 4.0) * 4; + + vec3 reflectionColor = texSample2DLod(g_Texture3, screenUV, roughness * g_Texture3MipMapInfo).rgb; + reflectionColor = reflectionColor * (1.0 - fresnelTerm) * reflectivity; + reflectionColor = pow(max(CAST3(0.001), reflectionColor), CAST3(2.0 - metallic)); + + color.rgb += saturate(reflectionColor) * fresnelTerm; + //color.rgb = mix(color.rgb, vec3(screenUV, 0), 0.99); +#endif + +#if HDR && (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + color.rgb += g_EmissiveColor * color.rgb * emissiveOverbright; +#endif + +#if MORPHING || SKINNING_ALPHA + color.a *= v_VertexAlpha; +#endif + +#if VERTEXCOLOR + color *= v_Color; +#endif + + gl_FragColor = color; + +#if BLENDMODE + vec4 screen = texSample2D(g_Texture4, screenUV); + gl_FragColor.rgb = ApplyBlending(BLENDMODE, screen.rgb, gl_FragColor.rgb, gl_FragColor.a); + gl_FragColor.a = screen.a; +#endif + +#if ALPHATOCOVERAGE + gl_FragColor.a = (gl_FragColor.a - 0.5) / max(fwidth(gl_FragColor.a), 0.0001) + 0.5; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericimage3.vert b/modules/wallpaper-engine/shaders/genericimage3.vert new file mode 100644 index 0000000..da55f92 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage3.vert @@ -0,0 +1,230 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Rotation; +uniform vec2 g_Texture0Translation; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; +#endif + +#if MORPHING +attribute vec4 a_PositionVec4; +#else +attribute vec3 a_Position; +#endif +attribute vec2 a_TexCoord; + +#if VERTEXCOLOR +attribute vec4 a_Color; +varying vec4 v_Color; +#endif + +#if SKINNING +attribute vec3 a_Normal; +#if NORMALMAP +attribute vec4 a_Tangent4; +#endif +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +#if PBRMASKS +uniform vec4 g_Texture2Resolution; +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +uniform vec3 g_EyePosition; + +#if LIGHTING || REFLECTION +uniform mat3 g_NormalModelMatrix; + +uniform mat4 g_AltModelMatrix; +uniform mat3 g_AltNormalModelMatrix; +uniform mat4 g_AltViewProjectionMatrix; + +#if PRELIGHTING +#define M_MDL g_AltModelMatrix +#define M_NML g_AltNormalModelMatrix +#define M_VP g_AltViewProjectionMatrix +#define M_MVP mul(g_AltModelMatrix, g_AltViewProjectionMatrix) +#else +#define M_MDL g_ModelMatrix +#define M_NML g_NormalModelMatrix +#define M_VP g_ViewProjectionMatrix +#define M_MVP g_ModelViewProjectionMatrix +#endif +#else +#define M_MVP g_ModelViewProjectionMatrix +#define M_MDL g_ModelMatrix +#endif + +#if LIGHTING +uniform mat4 g_ViewProjectionMatrix; +#endif + +#if LIGHTING || REFLECTION +varying vec4 v_ViewDir; +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +varying vec3 v_WorldPos; +#if NORMALMAP == 0 +varying vec3 v_WorldNormal; +#endif +#elif FOG_COMPUTED && (FOG_DIST || FOG_HEIGHT) +varying vec4 v_ViewDir; +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE +varying vec3 v_ScreenPos; +#endif + +#ifdef SKINNING_ALPHA +uniform float g_BonesAlpha[BONECOUNT]; +#endif + +#if MORPHING +uniform sampler2D g_Texture5; // {"hidden":true} +uniform vec4 g_Texture5Resolution; + +uniform uint g_MorphOffsets[12]; +uniform float g_MorphWeights[12]; +#endif + +#if MORPHING || SKINNING_ALPHA +varying float v_VertexAlpha; +#endif + +void main() { +#if MORPHING + vec3 position = a_PositionVec4.xyz; +#else + vec3 position = a_Position.xyz; +#endif + +#if MORPHING || SKINNING_ALPHA + v_VertexAlpha = 1.0; +#endif + + vec3 localPos = position; + +#if MORPHING + vec2 texture5ResolutionInv = 1.0 / g_Texture5Resolution.xy; + vec3 morphPos = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < g_MorphOffsets[0] % 12u && a_PositionVec4.w > 0.0; ++morphTarget) + { + uint morphMapIndex = CASTU(a_PositionVec4.w) + g_MorphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * texture5ResolutionInv; + + uint morphPixelx = morphMapIndex % CASTU(g_Texture5Resolution.x); + uint morphPixely = morphMapIndex / CASTU(g_Texture5Resolution.y); + + vec4 morphCol = texSample2DLod(g_Texture5, vec2(morphPixelx, morphPixely) * texture5ResolutionInv + offset, 0.0); + + morphPos += morphCol.xyz * g_MorphWeights[1u + morphTarget]; +#if PRELIGHTING == 0 + v_VertexAlpha *= morphCol.w * g_MorphWeights[1u + morphTarget] + 1.0 * (1.0 - g_MorphWeights[1u + morphTarget]); +#endif + } + + localPos += morphPos * g_MorphWeights[0]; +#endif + +#if SKINNING + localPos = mul(vec4(localPos, 1.0), g_Bones[a_BlendIndices.x] * a_BlendWeights.x + + g_Bones[a_BlendIndices.y] * a_BlendWeights.y + + g_Bones[a_BlendIndices.z] * a_BlendWeights.z + + g_Bones[a_BlendIndices.w] * a_BlendWeights.w); +#endif + +#if SKINNING_ALPHA + v_VertexAlpha *= saturate(g_BonesAlpha[a_BlendIndices.x] * a_BlendWeights.x + + g_BonesAlpha[a_BlendIndices.y] * a_BlendWeights.y + + g_BonesAlpha[a_BlendIndices.z] * a_BlendWeights.z + + g_BonesAlpha[a_BlendIndices.w] * a_BlendWeights.w); +#endif + +#if SPRITESHEET + v_TexCoord.xy = g_Texture0Translation + a_TexCoord.x * g_Texture0Rotation.xy + a_TexCoord.y * g_Texture0Rotation.zw; +#else + v_TexCoord.xy = a_TexCoord; +#endif + +#if PBRMASKS + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + + vec4 worldPos = mul(vec4(localPos, 1.0), M_MDL); + vec3 viewDir = g_EyePosition - worldPos.xyz; + +#if LIGHTING || REFLECTION + vec3 normal = vec3(0, 0, 1.0); + +#if SKINNING + normal = mul(a_Normal, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + +#if NORMALMAP + vec4 tangent = vec4(1, 0, 0, 1); + +#if SKINNING + tangent.w = a_Tangent4.w; + tangent.xyz = mul(a_Tangent4.xyz, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + mat3 tangentSpace = BuildTangentSpace(M_NML, normal, tangent); + + v_Tangent = normalize(tangentSpace[0]); + v_Bitangent = normalize(tangentSpace[1]); + v_Normal = normalize(tangentSpace[2]); + v_WorldPos = worldPos.xyz; +#else + + v_WorldPos = worldPos.xyz; +#if SKINNING + v_WorldNormal = mul(a_Normal, M_NML); +#else + v_WorldNormal = mul(vec3(0, 0, 1), M_NML); +#endif + +#endif + v_ViewDir.xyz = viewDir; + v_ViewDir.w = 0.0; +#endif + +#if LIGHTING + gl_Position = mul(worldPos, M_VP); +#else + gl_Position = mul(vec4(localPos, 1.0), M_MVP); +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE + v_ScreenPos = gl_Position.xyw; +#ifdef HLSL + v_ScreenPos.y = -v_ScreenPos.y; +#endif +#endif + +#if PRELIGHTING + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); +#endif + +#if VERTEXCOLOR + v_Color = a_Color; +#endif + +#if FOG_COMPUTED && (FOG_DIST || FOG_HEIGHT) + v_ViewDir = vec4(viewDir, worldPos.y); +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericimage4.frag b/modules/wallpaper-engine/shaders/genericimage4.frag new file mode 100644 index 0000000..5776552 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage4.frag @@ -0,0 +1,215 @@ + +// [COMBO] {"material":"ui_editor_properties_lighting","combo":"LIGHTING","default":0} +// [COMBO] {"material":"ui_editor_properties_reflection","combo":"REFLECTION","default":0} +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} + +#if LIGHTS_SHADOW_MAPPING +#define SHADOW_ATLAS_SAMPLER g_Texture6 +#define SHADOW_ATLAS_TEXEL g_Texture6Texel +uniform sampler2DComparison g_Texture6; // {"hidden":true,"default":"_rt_shadowAtlas"} +uniform vec4 g_Texture6Texel; +#endif + +#if LIGHTS_COOKIE +#define COOKIE_SAMPLER g_Texture7 +uniform sampler2D g_Texture7; // {"hidden":true,"default":"_alias_lightCookie"} +#endif + +#include "common_pbr_2.h" +#include "common_blending.h" +#include "common_fog.h" + +uniform sampler2D g_Texture0; // {"label":"ui_editor_properties_albedo","nonremovable":true} + +uniform mat4 g_ViewProjectionMatrix; +uniform vec4 g_Color4; + +#if VERTEXCOLOR +varying vec4 v_Color; +#endif + +#if PBRMASKS +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +#if LIGHTING || REFLECTION +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal_map","combo":"NORMALMAP","format":"rg88","formatcombo":true,"mode":"normal","requireany":true,"require":{"LIGHTING":1,"REFLECTION":1}} +uniform sampler2D g_Texture2; // {"combo":"PBRMASKS","mode":"opacitymask","paintdefaultcolor":"0 0 0 1","components":[{"label":"ui_editor_properties_metallic_map","combo":"METALLIC_MAP"},{"label":"ui_editor_properties_roughness_map","combo":"ROUGHNESS_MAP"},{"label":"ui_editor_properties_reflection_map","combo":"REFLECTION_MAP"},{"label":"ui_editor_properties_emissive_map","combo":"EMISSIVE_MAP"}],"requireany":true,"require":{"LIGHTING":1,"REFLECTION":1}} +uniform float g_Roughness; // {"material":"roughness","label":"ui_editor_properties_roughness","default":0.7,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Metallic; // {"material":"metallic","label":"ui_editor_properties_metallic","default":0,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform vec3 g_SpecularTint; // {"material":"speculartint","label":"ui_editor_properties_specular_tint","type":"color","default":"1 1 1","group":"ui_editor_properties_material"} + +uniform vec3 g_EmissiveColor; // {"material":"emissivecolor", "label":"ui_editor_properties_emissive_color", "type": "color", "default":"1 1 1","group":"ui_editor_properties_material"} +uniform float g_EmissiveBrightness; // {"material":"emissivebrightness", "label":"ui_editor_properties_emissive_brightness", "default":1.0,"range":[0,10],"group":"ui_editor_properties_material"} +#endif + +#if LIGHTING +uniform vec3 g_LightAmbientColor; +//uniform vec3 g_AmbientLowPass; // {"material":"ambientlowpass", "label":"ui_editor_properties_ambient", "type": "color", "default":"0 0 0","group":"ui_editor_properties_material"} +#endif + +#if LIGHTING || REFLECTION +varying vec4 v_ViewDir; +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +varying vec3 v_WorldPos; +#if NORMALMAP == 0 +varying vec3 v_WorldNormal; +#endif +#elif FOG_COMPUTED && (FOG_HEIGHT || FOG_DIST) +varying vec4 v_ViewDir; +#endif + +#if REFLECTION && NORMALMAP +uniform vec3 g_Screen; +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_MipMappedFrameBuffer"} +uniform float g_Reflectivity; // {"material":"reflectivity","label":"ui_editor_properties_reflectivity","default":1,"range":[0,1],"group":"ui_editor_properties_material","nobindings":true} +uniform float g_Texture3MipMapInfo; +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE +varying vec3 v_ScreenPos; +#endif + +#if BLENDMODE +uniform sampler2D g_Texture4; // {"hidden":true,"default":"_rt_FullFrameBuffer"} +#endif + +#if MORPHING || SKINNING_ALPHA +varying float v_VertexAlpha; +#endif + +#require LightingV1 + +void main() { + vec4 color = texSample2D(g_Texture0, v_TexCoord.xy) * g_Color4; + +#if LIGHTING || REFLECTION + float metallic = g_Metallic; + float roughness = g_Roughness; + +#if PBRMASKS + vec4 componentMaps = texSample2D(g_Texture2, v_TexCoord.zw); +#endif + +#if METALLIC_MAP + metallic = componentMaps.x; +#endif + +#if ROUGHNESS_MAP + roughness = componentMaps.y; +#endif + +#if NORMALMAP + vec2 compressedNormal = texSample2D(g_Texture1, v_TexCoord.xy).xy * 2.0 - 1.0; + vec3 normal = vec3(compressedNormal, + sqrt(saturate(1.0 - compressedNormal.x * compressedNormal.x - compressedNormal.y * compressedNormal.y))); + normal = normalize(normal); +#else + vec3 normal = normalize(v_WorldNormal); +#endif +#endif + +#if LIGHTING || REFLECTION +#if SCENE_ORTHO + // View vector should be static on puppets on 2D wallpapers + vec3 normalizedViewVector = vec3(0, 0, 1); +#else + vec3 normalizedViewVector = normalize(v_ViewDir.xyz); +#endif + +#if NORMALMAP + mat3 tangentSpace = mat3(v_Tangent, v_Bitangent, v_Normal); + normal = mul(normal, tangentSpace); +#endif +#endif + +#if LIGHTING + vec3 f0 = CAST3(0.04); + f0 = mix(f0, color.rgb, metallic); + + vec3 light = PerformLighting_V1(v_WorldPos, color.rgb, normal, normalizedViewVector, g_SpecularTint, f0, roughness, metallic); + vec3 ambient = g_LightAmbientColor * color.rgb; + +#if EMISSIVE_MAP + light = max(light, g_EmissiveColor * color.rgb * (componentMaps.a * g_EmissiveBrightness)); +#endif + + //color.rgb = CombineLighting(light, color.rgb * g_AmbientLowPass, ambient); + color.rgb = CombineLighting(light, ambient); +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE + vec2 screenUV = (v_ScreenPos.xy / v_ScreenPos.z) * 0.5 + 0.5; +#endif + +#if REFLECTION && NORMALMAP + float reflectivity = g_Reflectivity; + +#if REFLECTION_MAP + reflectivity *= componentMaps.z; +#endif + + vec2 tangent = normalize(v_Tangent.xy); + vec2 bitangent = normalize(v_Bitangent.xy); + + float fresnelTerm = max(0.001, dot(normal, normalizedViewVector)); + normal = normalize(mul(normal, CAST3X3(g_ViewProjectionMatrix))); + +#ifdef HLSL + normal.y = -normal.y; +#endif + +#if PLATFORM_ANDROID + normal.xy = normal.xy * vec2(0.25 / g_Screen.z, 0.25); +#else + // Make consistent on X since the width is usually more variable (multi monitors) - bad for phones tho + normal.xy = normal.xy * vec2(0.15, 0.15 * g_Screen.z); +#endif + //screenUV += normal * fresnelTerm; + screenUV += normal.xy * pow(fresnelTerm, 4.0) * 4; + + vec3 reflectionColor = texSample2DLod(g_Texture3, screenUV, roughness * g_Texture3MipMapInfo).rgb; + reflectionColor = reflectionColor * (1.0 - fresnelTerm) * reflectivity; + reflectionColor = pow(max(CAST3(0.001), reflectionColor), CAST3(2.0 - metallic)); + + color.rgb += saturate(reflectionColor) * fresnelTerm; + //color.rgb = mix(color.rgb, vec3(screenUV, 0), 0.99); +#endif + +#if HDR && (LIGHTING || REFLECTION) && EMISSIVE_MAP + float emissiveOverbright = max(0.0, componentMaps.a * (g_EmissiveBrightness - 1.0)); + color.rgb += g_EmissiveColor * color.rgb * emissiveOverbright; +#endif + +#if MORPHING || SKINNING_ALPHA + color.a *= v_VertexAlpha; +#endif + +#if VERTEXCOLOR + color *= v_Color; +#endif + + gl_FragColor = color; + +#if BLENDMODE + vec4 screen = texSample2D(g_Texture4, screenUV); + gl_FragColor.rgb = ApplyBlending(BLENDMODE, screen.rgb, gl_FragColor.rgb, gl_FragColor.a); + gl_FragColor.a = screen.a; +#endif + +#if FOG_COMPUTED && (FOG_HEIGHT || FOG_DIST) + vec2 fogPixelState = CalculateFogPixelState(length(v_ViewDir.xyz), v_ViewDir.w); + gl_FragColor.rgb = ApplyFog(gl_FragColor.rgb, fogPixelState); +#endif + +#if ALPHATOCOVERAGE + gl_FragColor.a = (gl_FragColor.a - 0.5) / max(fwidth(gl_FragColor.a), 0.0001) + 0.5; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericimage4.vert b/modules/wallpaper-engine/shaders/genericimage4.vert new file mode 100644 index 0000000..147f005 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericimage4.vert @@ -0,0 +1,237 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelMatrix; +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Rotation; +uniform vec2 g_Texture0Translation; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; +#endif + +#if MORPHING +attribute vec4 a_PositionVec4; +#else +attribute vec3 a_Position; +#endif +attribute vec2 a_TexCoord; + +#if PRELIGHTINGDUALVERTEX +attribute vec3 a_PositionC1; +#endif + +#if VERTEXCOLOR +attribute vec4 a_Color; +varying vec4 v_Color; +#endif + +#if SKINNING +attribute vec3 a_Normal; +#if NORMALMAP +attribute vec4 a_Tangent4; +#endif +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +#if PBRMASKS +uniform vec4 g_Texture2Resolution; +varying vec4 v_TexCoord; +#else +varying vec2 v_TexCoord; +#endif + +uniform vec3 g_EyePosition; + +#if LIGHTING || REFLECTION +uniform mat3 g_NormalModelMatrix; + +uniform mat4 g_AltModelMatrix; +uniform mat3 g_AltNormalModelMatrix; +uniform mat4 g_AltViewProjectionMatrix; + +#if PRELIGHTING +#define M_MDL g_AltModelMatrix +#define M_NML g_AltNormalModelMatrix +#define M_VP g_AltViewProjectionMatrix +#define M_MVP mul(g_AltModelMatrix, g_AltViewProjectionMatrix) +#else +#define M_MDL g_ModelMatrix +#define M_NML g_NormalModelMatrix +#define M_VP g_ViewProjectionMatrix +#define M_MVP g_ModelViewProjectionMatrix +#endif +#else +#define M_MVP g_ModelViewProjectionMatrix +#define M_MDL g_ModelMatrix +#endif + +#if LIGHTING +uniform mat4 g_ViewProjectionMatrix; +#endif + +#if LIGHTING || REFLECTION +varying vec4 v_ViewDir; +varying vec3 v_Normal; +varying vec3 v_Tangent; +varying vec3 v_Bitangent; +varying vec3 v_WorldPos; +#if NORMALMAP == 0 +varying vec3 v_WorldNormal; +#endif +#elif FOG_COMPUTED && (FOG_DIST || FOG_HEIGHT) +varying vec4 v_ViewDir; +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE +varying vec3 v_ScreenPos; +#endif + +#ifdef SKINNING_ALPHA +uniform float g_BonesAlpha[BONECOUNT]; +#endif + +#if MORPHING +uniform sampler2D g_Texture5; // {"hidden":true} +uniform vec4 g_Texture5Resolution; + +uniform uint g_MorphOffsets[12]; +uniform float g_MorphWeights[12]; +#endif + +#if MORPHING || SKINNING_ALPHA +varying float v_VertexAlpha; +#endif + +void main() { +#if MORPHING + vec3 position = a_PositionVec4.xyz; +#else + vec3 position = a_Position.xyz; +#endif + +#if MORPHING || SKINNING_ALPHA + v_VertexAlpha = 1.0; +#endif + + vec3 localPos = position; + +#if MORPHING + vec2 texture5ResolutionInv = 1.0 / g_Texture5Resolution.xy; + vec3 morphPos = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < g_MorphOffsets[0] % 12u && a_PositionVec4.w > 0.0; ++morphTarget) + { + uint morphMapIndex = CASTU(a_PositionVec4.w) + g_MorphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * texture5ResolutionInv; + + uint morphPixelx = morphMapIndex % CASTU(g_Texture5Resolution.x); + uint morphPixely = morphMapIndex / CASTU(g_Texture5Resolution.y); + + vec4 morphCol = texSample2DLod(g_Texture5, vec2(morphPixelx, morphPixely) * texture5ResolutionInv + offset, 0.0); + + morphPos += morphCol.xyz * g_MorphWeights[1u + morphTarget]; +#if PRELIGHTING == 0 + v_VertexAlpha *= morphCol.w * g_MorphWeights[1u + morphTarget] + 1.0 * (1.0 - g_MorphWeights[1u + morphTarget]); +#endif + } + + localPos += morphPos * g_MorphWeights[0]; +#endif + +#if SKINNING + localPos = mul(vec4(localPos, 1.0), g_Bones[a_BlendIndices.x] * a_BlendWeights.x + + g_Bones[a_BlendIndices.y] * a_BlendWeights.y + + g_Bones[a_BlendIndices.z] * a_BlendWeights.z + + g_Bones[a_BlendIndices.w] * a_BlendWeights.w); +#endif + +#if SKINNING_ALPHA + v_VertexAlpha *= saturate(g_BonesAlpha[a_BlendIndices.x] * a_BlendWeights.x + + g_BonesAlpha[a_BlendIndices.y] * a_BlendWeights.y + + g_BonesAlpha[a_BlendIndices.z] * a_BlendWeights.z + + g_BonesAlpha[a_BlendIndices.w] * a_BlendWeights.w); +#endif + +#if SPRITESHEET + v_TexCoord.xy = g_Texture0Translation + a_TexCoord.x * g_Texture0Rotation.xy + a_TexCoord.y * g_Texture0Rotation.zw; +#else + v_TexCoord.xy = a_TexCoord; +#endif + +#if PBRMASKS + v_TexCoord.zw = vec2(a_TexCoord.x * g_Texture2Resolution.z / g_Texture2Resolution.x, + a_TexCoord.y * g_Texture2Resolution.w / g_Texture2Resolution.y); +#endif + + vec4 worldPos = mul(vec4(localPos, 1.0), M_MDL); + vec3 viewDir = g_EyePosition - worldPos.xyz; + +#if LIGHTING || REFLECTION + vec3 normal = vec3(0, 0, 1.0); + +#if SKINNING + normal = mul(a_Normal, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + +#if NORMALMAP + vec4 tangent = vec4(1, 0, 0, 1); + +#if SKINNING + tangent.w = a_Tangent4.w; + tangent.xyz = mul(a_Tangent4.xyz, CAST3X3(g_Bones[a_BlendIndices.x]) * a_BlendWeights.x + + CAST3X3(g_Bones[a_BlendIndices.y]) * a_BlendWeights.y + + CAST3X3(g_Bones[a_BlendIndices.z]) * a_BlendWeights.z + + CAST3X3(g_Bones[a_BlendIndices.w]) * a_BlendWeights.w); +#endif + mat3 tangentSpace = BuildTangentSpace(M_NML, normal, tangent); + + v_Tangent = normalize(tangentSpace[0]); + v_Bitangent = normalize(tangentSpace[1]); + v_Normal = normalize(tangentSpace[2]); + v_WorldPos = worldPos.xyz; +#else + + v_WorldPos = worldPos.xyz; +#if SKINNING + v_WorldNormal = mul(a_Normal, M_NML); +#else + v_WorldNormal = mul(vec3(0, 0, 1), M_NML); +#endif + +#endif + v_ViewDir.xyz = viewDir; + v_ViewDir.w = 0.0; +#endif + +#if LIGHTING + gl_Position = mul(worldPos, M_VP); +#else + gl_Position = mul(vec4(localPos, 1.0), M_MVP); +#endif + +#if REFLECTION && NORMALMAP || BLENDMODE + v_ScreenPos = gl_Position.xyw; +#ifdef HLSL + v_ScreenPos.y = -v_ScreenPos.y; +#endif +#endif + +#if PRELIGHTING +#if PRELIGHTINGDUALVERTEX + position = a_PositionC1; +#endif + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); +#endif + +#if VERTEXCOLOR + v_Color = a_Color; +#endif + +#if FOG_COMPUTED && (FOG_DIST || FOG_HEIGHT) + v_ViewDir = vec4(viewDir, worldPos.y); +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericparticle.frag b/modules/wallpaper-engine/shaders/genericparticle.frag new file mode 100644 index 0000000..7dbcdd3 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericparticle.frag @@ -0,0 +1,77 @@ + +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} +// [COMBO] {"material":"ui_editor_properties_refract","combo":"REFRACT","type":"options","default":0} + +#include "common_fragment.h" +#include "common_fog.h" + +uniform sampler2D g_Texture0; // {"label":"ui_editor_properties_albedo","default":"util/white"} + +uniform float g_Overbright; // {"material":"ui_editor_properties_overbright","default":1.0,"range":[0,5]} + +#if REFRACT +uniform sampler2D g_Texture1; // {"label":"ui_editor_properties_normal","format":"normalmap","formatcombo":true,"default":"util/flatnormal"} +uniform sampler2D g_Texture2; // {"default":"_rt_FullFrameBuffer","hidden":true} +#endif + +#if SPRITESHEET +varying vec4 v_TexCoord; +varying float v_TexCoordBlend; +#else +varying vec2 v_TexCoord; +#endif + +varying vec4 v_Color; + +#if REFRACT +varying vec3 v_ScreenCoord; +varying vec4 v_ScreenTangents; +#endif + +#if FOG_DIST || FOG_HEIGHT +varying vec4 v_ViewDir; +#endif + +void main() { +#if SPRITESHEET +#if SPRITESHEETBLEND + // This is wrong because it can sample colors that are invisible on one frame but changing this can negatively impact additive particles + vec4 color = v_Color * mix(ConvertTexture0Format(texSample2D(g_Texture0, v_TexCoord.xy)), + ConvertTexture0Format(texSample2D(g_Texture0, v_TexCoord.zw)), + v_TexCoordBlend); +#else + vec4 color = v_Color * ConvertTexture0Format(texSample2D(g_Texture0, v_TexCoord.xy)); +#endif +#else + vec4 color = v_Color * ConvertTexture0Format(texSample2D(g_Texture0, v_TexCoord.xy)); +#endif + +#if REFRACT + vec4 normal = DecompressNormalWithMask(texSample2D(g_Texture1, v_TexCoord.xy)); + //normal = vec4((v_TexCoord.xy - 0.5) * 2, 0, 1); + vec2 screenRefractionOffset = v_ScreenTangents.xy * normal.x + v_ScreenTangents.zw * normal.y; +#ifndef HLSL + screenRefractionOffset.y = -screenRefractionOffset.y; +#endif + vec2 refractTexCoord = v_ScreenCoord.xy / v_ScreenCoord.z * vec2(0.5, 0.5) + 0.5 + screenRefractionOffset * normal.a * v_Color.a; + + color.rgb *= texSample2D(g_Texture2, refractTexCoord).rgb; +#endif + + color.rgb *= g_Overbright; + +#if FOG_HEIGHT || FOG_DIST + vec2 fogPixelState = CalculateFogPixelState(length(v_ViewDir.xyz), v_ViewDir.w); + color.rgb = ApplyFog(color.rgb, fogPixelState); + color.a = ApplyFogAlpha(color.a, fogPixelState); +#endif + + gl_FragColor = color; + +#if ALPHATOCOVERAGE + gl_FragColor.a = (gl_FragColor.a - 0.5) / max(fwidth(gl_FragColor.a), 0.0001) + 0.5; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/genericparticle.geom b/modules/wallpaper-engine/shaders/genericparticle.geom new file mode 100644 index 0000000..b387466 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericparticle.geom @@ -0,0 +1,92 @@ + +#include "common_particles.h" + +in vec3 v_Rotation; +in vec4 v_Color; +in vec4 gl_Position; + +#if THICKFORMAT +in vec4 v_VelocityLifetime; +#endif + +#if SPRITESHEET +out vec4 v_TexCoord; +out float v_TexCoordBlend; +#else +out vec2 v_TexCoord; +#endif + +#if REFRACT +out vec3 v_ScreenCoord; +out vec4 v_ScreenTangents; +#endif + +out vec4 v_Color; +out vec4 gl_Position; + +#if FOG_DIST || FOG_HEIGHT +uniform mat4 g_ModelMatrix; +out vec4 v_ViewDir; +#endif + +#if SPRITESHEET +PS_INPUT CreateParticleVertex(vec2 sprite, float blend, mat3 mRotation, vec4 uvs, float textureRatio, in VS_OUTPUT IN, vec3 right, vec3 up) +#else +PS_INPUT CreateParticleVertex(vec2 sprite, float blend, mat3 mRotation, vec2 uvs, float textureRatio, in VS_OUTPUT IN, vec3 right, vec3 up) +#endif +{ + PS_INPUT v; + + vec3 position = ComputeParticlePosition(sprite, textureRatio, IN.gl_Position, right, up); + + v.gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord = uvs; + v.v_Color = IN.v_Color; + +#if SPRITESHEET + v.v_TexCoordBlend = blend; +#endif + +#if REFRACT + ComputeScreenRefractionTangents(v.gl_Position.xyw, mRotation, v.v_ScreenCoord, v.v_ScreenTangents); +#endif + +#if FOG_DIST || FOG_HEIGHT + vec3 worldPos = mul(vec4(position, 1.0), g_ModelMatrix).xyz; + v.v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v.v_ViewDir.w = worldPos.y; +#endif + + return v; +} + +[maxvertexcount(4)] +void main() { + + vec3 uvOffsets = vec3(1, 1, 0); + float spriteBlend = 0.0; + +#if SPRITESHEET + float textureRatio = g_RenderVar1.w; + vec4 uvs; + ComputeSpriteFrame(IN[0].v_VelocityLifetime.w, uvs, uvOffsets.xy, spriteBlend); +#else + vec2 uvs = vec2(0, 0); + float textureRatio = g_Texture0Resolution.y / g_Texture0Resolution.x; +#endif + + // Compute tangent vectors + vec3 right, up; + mat3 mRotation; +#if TRAILRENDERER + mRotation = CAST3X3(1.0); + ComputeParticleTrailTangents(IN[0].gl_Position, IN[0].v_VelocityLifetime.xyz, right, up); +#else + ComputeParticleTangents(IN[0].v_Rotation, mRotation, right, up); +#endif + + OUT.Append(CreateParticleVertex(vec2(0, 0), spriteBlend, mRotation, uvs, textureRatio, IN[0], right, up)); + OUT.Append(CreateParticleVertex(vec2(0, 1), spriteBlend, mRotation, uvs + uvOffsets.zyzy, textureRatio, IN[0], right, up)); + OUT.Append(CreateParticleVertex(vec2(1, 0), spriteBlend, mRotation, uvs + uvOffsets.xzxz, textureRatio, IN[0], right, up)); + OUT.Append(CreateParticleVertex(vec2(1, 1), spriteBlend, mRotation, uvs + uvOffsets.xyxy, textureRatio, IN[0], right, up)); +} diff --git a/modules/wallpaper-engine/shaders/genericparticle.vert b/modules/wallpaper-engine/shaders/genericparticle.vert new file mode 100644 index 0000000..d9f4aa3 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericparticle.vert @@ -0,0 +1,112 @@ + +#include "common_particles.h" + +// Declare dynamic attributes for all combinations +attribute vec3 a_Position; +attribute vec4 a_TexCoordVec4; +attribute vec4 a_Color; +varying vec4 v_Color; + +#if THICKFORMAT +attribute vec4 a_TexCoordVec4C1; +#endif + +#if GS_ENABLED || HLSL_GS40 + +varying vec3 v_Rotation; + +#if THICKFORMAT +varying vec4 v_VelocityLifetime; +#endif // THICKFORMAT + +#else // No geometry shaders + +attribute vec2 a_TexCoordC2; + +#if SPRITESHEET +varying vec4 v_TexCoord; +varying float v_TexCoordBlend; +#else +varying vec2 v_TexCoord; +#endif // SPRITESHEET + +#if REFRACT +varying vec3 v_ScreenCoord; +varying vec4 v_ScreenTangents; +#endif // REFRACT + +#if FOG_DIST || FOG_HEIGHT +uniform mat4 g_ModelMatrix; +varying vec4 v_ViewDir; +#endif + +#endif // GS_ENABLED + +void main() { + + // Prepare input layout +#if GS_ENABLED || HLSL_GS40 +#define in_ParticleRotation (a_TexCoordVec4.xyz) +#else +#define in_ParticleRotation vec3(a_TexCoordC2.xy, a_TexCoordVec4.z) +#endif + +#define in_ParticleSize (a_TexCoordVec4.w) +#define in_ParticleVelocity (a_TexCoordVec4C1.xyz) +#define in_ParticleLifeTime (a_TexCoordVec4C1.w) + +#if SPRITESHEET + float textureRatio = g_RenderVar1.w; +#else + float textureRatio = g_Texture0Resolution.y / g_Texture0Resolution.x; +#endif + + // Prepare geometry shader input + // or compute final vertex position +#if GS_ENABLED || HLSL_GS40 + +#if THICKFORMAT + v_VelocityLifetime = vec4(in_ParticleVelocity, frac(in_ParticleLifeTime)); +#endif + v_Rotation = in_ParticleRotation; + gl_Position = vec4(a_Position, in_ParticleSize); + +#else // No geometry shaders + + vec3 right, up; + mat3 mRotation; +#if TRAILRENDERER + mRotation = CAST3X3(1.0); + ComputeParticleTrailTangents(a_Position, in_ParticleVelocity, right, up); +#else + ComputeParticleTangents(in_ParticleRotation, mRotation, right, up); +#endif + + vec3 position = ComputeParticlePosition(a_TexCoordVec4.xy, textureRatio, vec4(a_Position.xyz, in_ParticleSize), right, up); + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord.xy = a_TexCoordVec4.xy; +#if SPRITESHEET + vec2 uvOffsets; + ComputeSpriteFrame(frac(in_ParticleLifeTime), v_TexCoord, uvOffsets, v_TexCoordBlend); + uvOffsets *= step(0.001, a_TexCoordVec4.xy); + v_TexCoord += uvOffsets.xyxy; +#endif + +#if FOG_DIST || FOG_HEIGHT + vec3 worldPos = mul(vec4(position, 1.0), g_ModelMatrix).xyz; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; +#endif + +#endif + + v_Color = a_Color; + +#if GS_ENABLED || HLSL_GS40 +#else +#if REFRACT + ComputeScreenRefractionTangents(gl_Position.xyw, mRotation, v_ScreenCoord, v_ScreenTangents); +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericropeparticle.frag b/modules/wallpaper-engine/shaders/genericropeparticle.frag new file mode 100644 index 0000000..e34ab0b --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericropeparticle.frag @@ -0,0 +1,36 @@ + +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} + +#include "common_fragment.h" +#include "common_fog.h" + +uniform sampler2D g_Texture0; // {"material":"ui_editor_properties_albedo","default":"util/white"} +uniform float g_Overbright; // {"material":"ui_editor_properties_overbright","default":1.0,"range":[0,5]} + +varying vec2 v_TexCoord; +varying vec4 v_Color; + +#if FOG_DIST || FOG_HEIGHT +varying vec4 v_ViewDir; +#endif + +void main() { + vec4 color = v_Color * ConvertTexture0Format(texSample2D(g_Texture0, v_TexCoord.xy)); + + color.rgb *= g_Overbright; + +#if FOG_HEIGHT || FOG_DIST + vec2 fogPixelState = CalculateFogPixelState(length(v_ViewDir.xyz), v_ViewDir.w); + color.rgb = ApplyFog(color.rgb, fogPixelState); + color.a = ApplyFogAlpha(color.a, fogPixelState); +#endif + + gl_FragColor = color; + +#if ALPHATOCOVERAGE + gl_FragColor.a = (gl_FragColor.a - 0.5) / max(fwidth(gl_FragColor.a), 0.0001) + 0.5; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/genericropeparticle.geom b/modules/wallpaper-engine/shaders/genericropeparticle.geom new file mode 100644 index 0000000..692d78f --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericropeparticle.geom @@ -0,0 +1,162 @@ + +#include "common_particles.h" + +#if THICKFORMAT +in vec4 v_EndPoint; +in vec4 v_Color2; +#else +in vec3 v_EndPoint; +#endif + +in vec4 v_Color; +in vec4 gl_Position; +in vec2 v_UVMinMax; + +in vec3 v_CPStart; +in vec3 v_CPEnd; + +#if FOG_DIST || FOG_HEIGHT +uniform mat4 g_ModelMatrix; +out vec4 v_ViewDir; +#endif + +out vec2 v_TexCoord; +out vec4 v_Color; +out vec4 gl_Position; + +vec3 cubicBezier(vec3 A, vec3 B, vec3 C, vec3 D, float t) +{ + vec3 p; + float OneMinusT = 1.0 - t; + float b0 = OneMinusT*OneMinusT*OneMinusT; + float b1 = 3.0*t*OneMinusT*OneMinusT; + float b2 = 3.0*t*t*OneMinusT; + float b3 = t*t*t; + return b0*A + b1*B + b2*C + b3*D; +} + +[maxvertexcount(4 + TRAILSUBDIVISION * 2)] +void main() { + + vec3 startPosition = IN[0].gl_Position.xyz; + vec3 endPosition = IN[0].v_EndPoint.xyz; + vec3 CPStart = IN[0].v_CPStart.xyz; + vec3 CPEnd = IN[0].v_CPEnd.xyz; + +#if THICKFORMAT + float sizeStart = IN[0].gl_Position.w; + float sizeEnd = IN[0].v_EndPoint.w; +#else + float sizeStart = IN[0].gl_Position.w; + float sizeEnd = IN[0].gl_Position.w; +#endif + + vec3 eyeDirection = mul(g_OrientationForward, CAST3X3(g_ModelMatrixInverse)); + vec3 trailDelta = endPosition - startPosition; + + vec3 trailRightStart = cross(CPStart, eyeDirection); + trailRightStart = normalize(trailRightStart) * sizeStart; + + vec3 trailRightEnd = cross(trailDelta - (CPEnd + trailDelta), eyeDirection); + trailRightEnd = normalize(trailRightEnd) * sizeEnd; + + float uvMinmimum = IN[0].v_UVMinMax.x; + float uvMaximum = IN[0].v_UVMinMax.y; + + CPStart = startPosition + CPStart * 0.15; + CPEnd = endPosition + CPEnd * 0.15; + + PS_INPUT v; + +#if FOG_DIST || FOG_HEIGHT + vec3 worldPos = mul(vec4(startPosition, 1.0), g_ModelMatrix).xyz; + v.v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v.v_ViewDir.w = worldPos.y; +#endif + +#if THICKFORMAT + // Update color per set + vec4 colorStart = IN[0].v_Color; + vec4 colorEnd = IN[0].v_Color2; + + v.v_Color = colorStart; + v.gl_Position = mul(vec4(startPosition - trailRightStart, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(1, uvMinmimum); + OUT.Append(v); + v.gl_Position = mul(vec4(startPosition + trailRightStart, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(0, uvMinmimum); + OUT.Append(v); + +#if TRAILSUBDIVISION != 0 + float subDivStep = 1.0 / (TRAILSUBDIVISION + 1); + float subDivCounter = subDivStep; + for (int s = 0; s < TRAILSUBDIVISION; ++s) + { + float s = smoothstep(0, 1, subDivCounter); + vec3 midPosition = cubicBezier(startPosition, CPStart, CPEnd, endPosition, s); + float midUV = mix(uvMinmimum, uvMaximum, s); + vec3 midRight = mix(trailRightStart, trailRightEnd, s); + vec4 color = mix(colorStart, colorEnd, s); + + v.v_Color = color; + + v.gl_Position = mul(vec4(midPosition - midRight, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(1, midUV); + OUT.Append(v); + v.gl_Position = mul(vec4(midPosition + midRight, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(0, midUV); + OUT.Append(v); + + subDivCounter += subDivStep; + } +#endif + v.v_Color = colorEnd; + v.gl_Position = mul(vec4(endPosition - trailRightEnd, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(1, uvMaximum); + OUT.Append(v); + v.gl_Position = mul(vec4(endPosition + trailRightEnd, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(0, uvMaximum); + OUT.Append(v); +#else // NOT THICKFORMAT + // Just set color once + v.v_Color = IN[0].v_Color; + v.gl_Position = mul(vec4(startPosition - trailRightStart, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(1, uvMinmimum); + OUT.Append(v); + v.gl_Position = mul(vec4(startPosition + trailRightStart, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(0, uvMinmimum); + OUT.Append(v); + +#if TRAILSUBDIVISION != 0 + float subDivStep = 1.0 / (TRAILSUBDIVISION + 1); + float subDivCounter = subDivStep; + for (int s = 0; s < TRAILSUBDIVISION; ++s) + { + float s = smoothstep(0, 1, subDivCounter); + vec3 midPosition = cubicBezier(startPosition, CPStart, CPEnd, endPosition, s); + float midUV = mix(uvMinmimum, uvMaximum, s); + vec3 midRight = mix(trailRightStart, trailRightEnd, s); + + v.gl_Position = mul(vec4(midPosition - midRight, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(1, midUV); + OUT.Append(v); + v.gl_Position = mul(vec4(midPosition + midRight, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(0, midUV); + OUT.Append(v); + subDivCounter += subDivStep; + } +#endif + + v.gl_Position = mul(vec4(endPosition - trailRightEnd, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(1, uvMaximum); + OUT.Append(v); + v.gl_Position = mul(vec4(endPosition + trailRightEnd, 1.0), g_ModelViewProjectionMatrix); + v.v_TexCoord.xy = vec2(0, uvMaximum); + OUT.Append(v); +#endif +} + + + + + diff --git a/modules/wallpaper-engine/shaders/genericropeparticle.vert b/modules/wallpaper-engine/shaders/genericropeparticle.vert new file mode 100644 index 0000000..baa1e62 --- /dev/null +++ b/modules/wallpaper-engine/shaders/genericropeparticle.vert @@ -0,0 +1,198 @@ + +#include "common_particles.h" + +#if GS_ENABLED || HLSL_GS40 +///////////////////////// +// Geometry shader +///////////////////////// +#if THICKFORMAT +attribute vec4 a_PositionVec4; +attribute vec4 a_TexCoordVec4; +attribute vec4 a_TexCoordVec4C1; +attribute vec4 a_TexCoordVec4C2; +attribute vec4 a_TexCoordVec4C3; +attribute vec4 a_Color; + +varying vec4 v_EndPoint; +varying vec4 v_Color2; +#else +attribute vec4 a_PositionVec4; +attribute vec4 a_TexCoordVec4; +attribute vec4 a_TexCoordVec4C1; +attribute vec3 a_TexCoordVec3C2; +attribute vec4 a_Color; + +varying vec3 v_EndPoint; +#endif + +varying vec4 v_Color; + +varying vec3 v_CPStart; +varying vec3 v_CPEnd; +varying vec2 v_UVMinMax; + +void main() { + +#define in_ParticleSize (a_PositionVec4.w) +#define in_SegmentUVTimeOffset (g_RenderVar0.z) +#define in_SegmentMaxCount (g_RenderVar0.w) +#define in_ParticleTrailLength (a_TexCoordVec4.w) +#define in_ParticleTrailPosition (a_TexCoordVec4C1.w) +#define in_SplineCP0 (a_TexCoordVec4C1.xyz) + + gl_Position = vec4(a_PositionVec4.xyz, in_ParticleSize); + v_EndPoint.xyz = a_TexCoordVec4.xyz; + + float usableLength = in_ParticleTrailLength - 1; + +#if THICKFORMAT +#define in_SplineCP1 (a_TexCoordVec4C2.xyz) + + v_EndPoint.w = a_TexCoordVec4C2.w; + + // New particles are at the end of the array + float uvMinimum = 1.0 - (in_ParticleTrailPosition) / usableLength; + float uvDelta = -1.0 / usableLength; + //uvMinimum += uvDelta; + v_Color2 = a_TexCoordVec4C3; +#else +#define in_SplineCP1 (a_TexCoordVec3C2.xyz) + + // Still spawning new elements, extend to physical end of trail + if (in_ParticleTrailLength < in_SegmentMaxCount) + { + usableLength += in_SegmentUVTimeOffset; + } + + float uvMinimum = (in_ParticleTrailPosition - (1.0 - in_SegmentUVTimeOffset)) / usableLength; + float uvDelta = 1.0 / usableLength; + + // The first element is shorter based on the history timer and always starts and UV 0 + if (in_ParticleTrailPosition < 0.5) + { + uvMinimum = 0.0; + uvDelta = in_SegmentUVTimeOffset / usableLength; + } +#endif + + v_UVMinMax.x = uvMinimum; + v_UVMinMax.y = uvMinimum + uvDelta; + + v_Color = a_Color; + v_CPStart = a_PositionVec4.xyz - in_SplineCP0; + v_CPEnd = v_EndPoint.xyz - in_SplineCP1; + + vec3 dt = v_EndPoint.xyz - a_PositionVec4.xyz; + v_CPStart = v_CPStart + dt; + v_CPEnd = v_CPEnd - dt; +} + +#else + +///////////////////////// +// No geometry shader +///////////////////////// + +attribute vec4 a_PositionVec4; +attribute vec4 a_TexCoordVec4; +attribute vec4 a_TexCoordVec4C1; + +#if THICKFORMAT +attribute vec4 a_TexCoordVec4C2; +attribute vec4 a_TexCoordVec4C3; +attribute vec2 a_TexCoordC4; +#else +attribute vec3 a_TexCoordVec3C2; +attribute vec2 a_TexCoordC3; +#endif + +attribute vec4 a_Color; + +varying vec4 v_Color; + +#if FOG_DIST || FOG_HEIGHT +uniform mat4 g_ModelMatrix; +varying vec4 v_ViewDir; +#endif + +varying vec2 v_TexCoord; + +void main() { + +#define in_SegmentUVTimeOffset (g_RenderVar0.z) +#define in_SegmentMaxCount (g_RenderVar0.w) +#define in_ParticleTrailLength (a_TexCoordVec4.w) +#define in_ParticleTrailPosition (a_TexCoordVec4C1.w) + + // Prepare input layout + vec3 startPosition = a_PositionVec4.xyz; + vec3 endPosition = a_TexCoordVec4.xyz; + vec3 CPStart = startPosition - a_TexCoordVec4C1.xyz; + + float sizeStart = a_PositionVec4.w; + vec4 colorStart = a_Color; + +#if THICKFORMAT + vec3 CPEnd = endPosition - a_TexCoordVec4C2.xyz; + float sizeEnd = a_TexCoordVec4C2.w; + vec4 colorEnd = a_TexCoordVec4C3; + vec2 uvs = a_TexCoordC4.xy; +#else + vec3 CPEnd = endPosition - a_TexCoordVec3C2.xyz; + float sizeEnd = sizeStart; + vec4 colorEnd = a_Color; + vec2 uvs = a_TexCoordC3.xy; +#endif + + vec3 eyeDirection = mul(g_OrientationForward, CAST3X3(g_ModelMatrixInverse)); + vec3 trailDelta = endPosition - startPosition; + + vec3 trailRightStart = cross(eyeDirection, trailDelta + CPStart); + trailRightStart = normalize(trailRightStart) * sizeStart; + + vec3 trailRightEnd = cross(eyeDirection, trailDelta - CPEnd); + trailRightEnd = normalize(trailRightEnd) * sizeEnd; + + vec4 color = mix(colorStart, colorEnd, uvs.y); + vec3 position = mix(startPosition, endPosition, uvs.y); + vec3 right = mix(trailRightStart, trailRightEnd, uvs.y); + right *= uvs.x * 2.0 - 1.0; + + gl_Position = mul(vec4(position + right, 1.0), g_ModelViewProjectionMatrix); + + float usableLength = in_ParticleTrailLength - 1; + +#if THICKFORMAT + float uvMinimum = 1.0 - (in_ParticleTrailPosition) / usableLength; + float uvDelta = -1.0 / usableLength; +#else + // Still spawning new elements, extend to physical end of trail + if (in_ParticleTrailLength < in_SegmentMaxCount) + { + usableLength += in_SegmentUVTimeOffset; + } + + float uvMinimum = (in_ParticleTrailPosition - (1.0 - in_SegmentUVTimeOffset)) / usableLength; + float uvDelta = 1.0 / usableLength; + + // The first element is shorter based on the history timer and always starts and UV 0 + if (in_ParticleTrailPosition < 0.5) + { + uvMinimum = 0.0; + uvDelta = in_SegmentUVTimeOffset / usableLength; + } +#endif + + v_TexCoord.xy = uvs.xy; + v_TexCoord.y = mix(uvMinimum, uvMinimum + uvDelta, uvs.y); + +#if FOG_DIST || FOG_HEIGHT + vec3 worldPos = mul(vec4(startPosition, 1.0), g_ModelMatrix).xyz; + v_ViewDir.xyz = g_EyePosition - worldPos.xyz; + v_ViewDir.w = worldPos.y; +#endif + + v_Color = color; +} + +#endif diff --git a/modules/wallpaper-engine/shaders/hdr_downsample.frag b/modules/wallpaper-engine/shaders/hdr_downsample.frag new file mode 100644 index 0000000..c70953c --- /dev/null +++ b/modules/wallpaper-engine/shaders/hdr_downsample.frag @@ -0,0 +1,95 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; +uniform vec4 g_RenderVar0; + +#if BICUBIC +vec4 cubic(float v) +{ + vec4 n = vec4(1.0, 2.0, 3.0, 4.0) - v; + vec4 s = n * n * n; + float x = s.x; + float y = s.y - 4.0 * s.x; + float z = s.z - 4.0 * s.y + 6.0 * s.x; + float w = 6.0 - x - y - z; + return vec4(x, y, z, w) * (1.0/6.0); +} + +vec4 textureBicubic(vec2 texCoords) +{ + float sc = 0.5; + vec2 texSize = sc / g_RenderVar0.xy; + vec2 invTexSize = g_RenderVar0.xy / sc; + + texCoords = texCoords * texSize - 0.5; + + vec2 fxy = frac(texCoords); + texCoords -= fxy; + + vec4 xcubic = cubic(fxy.x); + vec4 ycubic = cubic(fxy.y); + + vec4 c = texCoords.xxyy + vec2 (-0.5, +1.5).xyxy; + + vec4 s = vec4(xcubic.xz + xcubic.yw, ycubic.xz + ycubic.yw); + vec4 offset = c + vec4 (xcubic.yw, ycubic.yw) / s; + + offset *= invTexSize.xxyy; + + vec4 sample0 = texSample2D(g_Texture0, offset.xz); + vec4 sample1 = texSample2D(g_Texture0, offset.yz); + vec4 sample2 = texSample2D(g_Texture0, offset.xw); + vec4 sample3 = texSample2D(g_Texture0, offset.yw); + + float sx = s.x / (s.x + s.y); + float sy = s.z / (s.z + s.w); + + return mix( + mix(sample3, sample2, sx), mix(sample1, sample0, sx) + , sy); +} +#endif + +#if BLOOM +uniform float g_BloomStrength; // {"material":"bloomstrength","default":2} +uniform vec4 g_BloomBlendParams; // {"material":"blend","default":"1 1 0 1"} +uniform vec3 g_BloomTint; // {"material":"bloomtint","default":"1 1 1"} +#endif + +#if UPSAMPLE +uniform float g_BloomScatter; // {"material":"scatter","default":1} +#endif + +void main() { +#if BICUBIC + vec3 albedo = textureBicubic(v_TexCoord + g_RenderVar0.xy).rgb + + textureBicubic(v_TexCoord + g_RenderVar0.zy).rgb + + textureBicubic(v_TexCoord + g_RenderVar0.xw).rgb + + textureBicubic(v_TexCoord + g_RenderVar0.zw).rgb; +#else + vec3 albedo = texSample2D(g_Texture0, v_TexCoord + g_RenderVar0.xy).rgb + + texSample2D(g_Texture0, v_TexCoord + g_RenderVar0.zy).rgb + + texSample2D(g_Texture0, v_TexCoord + g_RenderVar0.xw).rgb + + texSample2D(g_Texture0, v_TexCoord + g_RenderVar0.zw).rgb; +#endif + +#if UPSAMPLE + albedo *= 0.25 * g_BloomScatter; +#else + albedo *= 0.25; +#endif + +#if BLOOM + albedo = max(CAST3(0), albedo); + float brightness = max(albedo.r, max(albedo.g, albedo.b)); + float soft = brightness - g_BloomBlendParams.y; + soft = clamp(soft, 0, g_BloomBlendParams.z); + soft = soft * soft * g_BloomBlendParams.w; + float contribution = max(soft, brightness - g_BloomBlendParams.x); + contribution /= max(brightness, 0.00001); + albedo *= contribution * g_BloomStrength * g_BloomTint; +#endif + + gl_FragColor = vec4(albedo, 1.0); +} diff --git a/modules/wallpaper-engine/shaders/hdr_downsample.vert b/modules/wallpaper-engine/shaders/hdr_downsample.vert new file mode 100644 index 0000000..9eaf559 --- /dev/null +++ b/modules/wallpaper-engine/shaders/hdr_downsample.vert @@ -0,0 +1,9 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/minimal.frag b/modules/wallpaper-engine/shaders/minimal.frag new file mode 100644 index 0000000..9ad66b3 --- /dev/null +++ b/modules/wallpaper-engine/shaders/minimal.frag @@ -0,0 +1,10 @@ + +#include "common_fragment.h" + +uniform sampler2D g_Texture0; + +varying vec2 v_TexCoord; + +void main() { + gl_FragColor = texSample2D(g_Texture0, v_TexCoord); +} diff --git a/modules/wallpaper-engine/shaders/minimal.vert b/modules/wallpaper-engine/shaders/minimal.vert new file mode 100644 index 0000000..2aa2380 --- /dev/null +++ b/modules/wallpaper-engine/shaders/minimal.vert @@ -0,0 +1,14 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/minimalalpha.frag b/modules/wallpaper-engine/shaders/minimalalpha.frag new file mode 100644 index 0000000..198234a --- /dev/null +++ b/modules/wallpaper-engine/shaders/minimalalpha.frag @@ -0,0 +1,11 @@ + +uniform float g_Alpha; + +uniform sampler2D g_Texture0; + +varying vec2 v_TexCoord; + +void main() { + gl_FragColor = texSample2D(g_Texture0, v_TexCoord); + gl_FragColor.a *= g_Alpha; +} diff --git a/modules/wallpaper-engine/shaders/minimalalpha.vert b/modules/wallpaper-engine/shaders/minimalalpha.vert new file mode 100644 index 0000000..2aa2380 --- /dev/null +++ b/modules/wallpaper-engine/shaders/minimalalpha.vert @@ -0,0 +1,14 @@ + +#include "common_vertex.h" + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/occlusiontest.frag b/modules/wallpaper-engine/shaders/occlusiontest.frag new file mode 100644 index 0000000..dfaaa52 --- /dev/null +++ b/modules/wallpaper-engine/shaders/occlusiontest.frag @@ -0,0 +1,4 @@ + +void main() { + gl_FragColor = vec4(1, 1, 1, 1); +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/occlusiontest.vert b/modules/wallpaper-engine/shaders/occlusiontest.vert new file mode 100644 index 0000000..53de60a --- /dev/null +++ b/modules/wallpaper-engine/shaders/occlusiontest.vert @@ -0,0 +1,16 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +uniform vec3 g_ViewUp; +uniform vec3 g_ViewRight; +uniform mat4 g_ModelViewProjectionMatrix; + +void main() { + vec3 position = a_Position + + (g_ViewRight * (a_TexCoord.x-0.5) + + g_ViewUp * (a_TexCoord.y-0.5)) * 0.5; + + gl_Position = mul(vec4(position, 1.0), g_ModelViewProjectionMatrix); + gl_Position.z = 0.999 * gl_Position.w; +} diff --git a/modules/wallpaper-engine/shaders/orthogrid.frag b/modules/wallpaper-engine/shaders/orthogrid.frag new file mode 100644 index 0000000..436cdb7 --- /dev/null +++ b/modules/wallpaper-engine/shaders/orthogrid.frag @@ -0,0 +1,35 @@ + +uniform float g_Time; + +varying vec2 v_TexCoord; + +varying vec4 v_ViewRect; + + +void main() { + vec4 color = vec4(0, 0, 0, 0); + + float s = sin((v_TexCoord.y - v_TexCoord.x) * 0.035 /*+ g_Time*/); + vec4 grid = vec4(1, 1, 0, 0.2) * smoothstep(0.7, 0.8, abs(s)); + + float f = (step(v_TexCoord.x, v_ViewRect.x) + step(v_ViewRect.z, v_TexCoord.x)) + + (step(v_TexCoord.y, v_ViewRect.y) + step(v_ViewRect.w, v_TexCoord.y)); + + color = mix(color, grid, saturate(f)); + + float borderWidth = 10.0f; + + float rightBorder = step(v_ViewRect.x - borderWidth, v_TexCoord.x) * step(v_TexCoord.x, v_ViewRect.x) + + step(v_ViewRect.z, v_TexCoord.x) * step(v_TexCoord.x, v_ViewRect.z + borderWidth); + float rightBorderMask = step(v_TexCoord.y, v_ViewRect.w + borderWidth) * step(v_ViewRect.y - borderWidth, v_TexCoord.y); + + float leftBorder = step(v_ViewRect.y - borderWidth, v_TexCoord.y) * step(v_TexCoord.y, v_ViewRect.y) + + step(v_ViewRect.w, v_TexCoord.y) * step(v_TexCoord.y, v_ViewRect.w + borderWidth); + float leftBorderMask = step(v_TexCoord.x, v_ViewRect.z + borderWidth) * step(v_ViewRect.x - borderWidth, v_TexCoord.x); + + float border = rightBorder * rightBorderMask + leftBorder * leftBorderMask; + + color = mix(color, vec4(1, 1, 0, 0.5), saturate(border)); + + gl_FragColor = color; +} diff --git a/modules/wallpaper-engine/shaders/orthogrid.vert b/modules/wallpaper-engine/shaders/orthogrid.vert new file mode 100644 index 0000000..b7a2cb6 --- /dev/null +++ b/modules/wallpaper-engine/shaders/orthogrid.vert @@ -0,0 +1,17 @@ + +uniform mat4 g_ModelMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec4 v_ViewRect; + +void main() { + gl_Position = vec4(a_Position, 1.0); + //v_TexCoord = a_TexCoord; + + v_TexCoord.x = mix(g_ModelMatrix[1][0], g_ModelMatrix[1][2], a_TexCoord.x); + v_TexCoord.y = mix(g_ModelMatrix[1][3], g_ModelMatrix[1][1], a_TexCoord.y); + v_ViewRect = g_ModelMatrix[0]; +} diff --git a/modules/wallpaper-engine/shaders/passthrough.frag b/modules/wallpaper-engine/shaders/passthrough.frag new file mode 100644 index 0000000..a828289 --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthrough.frag @@ -0,0 +1,8 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; + +void main() { + gl_FragColor = texSample2D(g_Texture0, v_TexCoord); +} diff --git a/modules/wallpaper-engine/shaders/passthrough.vert b/modules/wallpaper-engine/shaders/passthrough.vert new file mode 100644 index 0000000..60037b5 --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthrough.vert @@ -0,0 +1,26 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +#if SPRITESHEET +uniform vec4 g_Texture0Rotation; +uniform vec2 g_Texture0Translation; +#endif + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { +#ifdef TRANSFORM + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); +#else + gl_Position = vec4(a_Position, 1.0); +#endif + +#if SPRITESHEET + v_TexCoord.xy = g_Texture0Translation + a_TexCoord.x * g_Texture0Rotation.xy + a_TexCoord.y * g_Texture0Rotation.zw; +#else + v_TexCoord.xy = a_TexCoord; +#endif +} diff --git a/modules/wallpaper-engine/shaders/passthroughblend.frag b/modules/wallpaper-engine/shaders/passthroughblend.frag new file mode 100644 index 0000000..fa35890 --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthroughblend.frag @@ -0,0 +1,22 @@ + +#include "common_blending.h" + +varying vec2 v_TexCoord; +varying vec3 v_ScreenCoord; + +uniform sampler2D g_Texture0; +uniform sampler2D g_Texture1; + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + +#if BLENDMODE == 0 + gl_FragColor = albedo; +#else + vec2 screenCoord = v_ScreenCoord.xy / v_ScreenCoord.z * vec2(0.5, 0.5) + 0.5; + vec4 screen = texSample2D(g_Texture1, screenCoord); + + gl_FragColor.rgb = ApplyBlending(BLENDMODE, screen.rgb, albedo.rgb, albedo.a); + gl_FragColor.a = screen.a; +#endif +} diff --git a/modules/wallpaper-engine/shaders/passthroughblend.vert b/modules/wallpaper-engine/shaders/passthroughblend.vert new file mode 100644 index 0000000..229d84d --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthroughblend.vert @@ -0,0 +1,40 @@ + +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; +varying vec3 v_ScreenCoord; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +void main() { + +#if SKINNING + vec3 localPos = mul(vec4(a_Position, 1.0), g_Bones[a_BlendIndices[0]]) * a_BlendWeights[0] + + mul(vec4(a_Position, 1.0), g_Bones[a_BlendIndices[1]]) * a_BlendWeights[1] + + mul(vec4(a_Position, 1.0), g_Bones[a_BlendIndices[2]]) * a_BlendWeights[2] + + mul(vec4(a_Position, 1.0), g_Bones[a_BlendIndices[3]]) * a_BlendWeights[3]; +#else + vec3 localPos = a_Position; +#endif + +#ifdef TRANSFORM + gl_Position = mul(vec4(localPos, 1.0), g_ModelViewProjectionMatrix); + v_ScreenCoord = gl_Position.xyw; +#else + gl_Position = vec4(localPos, 1.0); + v_ScreenCoord = mul(vec4(localPos, 1.0), g_ModelViewProjectionMatrix).xyw; +#endif + +#ifdef HLSL + v_ScreenCoord.y = -v_ScreenCoord.y; +#endif + + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/passthroughlinear.frag b/modules/wallpaper-engine/shaders/passthroughlinear.frag new file mode 100644 index 0000000..4aa75ba --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthroughlinear.frag @@ -0,0 +1,16 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; +uniform vec2 g_HDRParams; + +vec3 _srgb(vec3 v) +{ + return max(1.055 * pow(v, 0.416666667) - 0.055, 0.0); +} + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + albedo.rgb = _srgb(albedo.rgb / g_HDRParams.x); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/shaders/passthroughlinear.vert b/modules/wallpaper-engine/shaders/passthroughlinear.vert new file mode 100644 index 0000000..7505149 --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthroughlinear.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/passthroughsrgb.frag b/modules/wallpaper-engine/shaders/passthroughsrgb.frag new file mode 100644 index 0000000..e62039f --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthroughsrgb.frag @@ -0,0 +1,10 @@ + +varying vec2 v_TexCoord; + +uniform sampler2D g_Texture0; + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoord); + albedo.rgb = pow(albedo.rgb, CAST3(2.2)); + gl_FragColor = albedo; +} diff --git a/modules/wallpaper-engine/shaders/passthroughsrgb.vert b/modules/wallpaper-engine/shaders/passthroughsrgb.vert new file mode 100644 index 0000000..7505149 --- /dev/null +++ b/modules/wallpaper-engine/shaders/passthroughsrgb.vert @@ -0,0 +1,10 @@ + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = vec4(a_Position, 1.0); + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/shaders/puppettexturechannels.frag b/modules/wallpaper-engine/shaders/puppettexturechannels.frag new file mode 100644 index 0000000..2c1fa6e --- /dev/null +++ b/modules/wallpaper-engine/shaders/puppettexturechannels.frag @@ -0,0 +1,35 @@ + +uniform vec4 g_Color4; + +uniform sampler2D g_Texture0; +uniform sampler2D g_Texture1; // {"combo":"DOUBLEBUFFERED","hidden":true} + +varying vec3 v_TexCoordBlend; +varying vec2 v_TexCoordBase; + +void main() { + vec4 albedo = texSample2D(g_Texture0, v_TexCoordBlend.xy); + +#if DOUBLEBUFFERED +#ifdef HLSL + clip(v_TexCoordBlend.z - 0.001); +#else + if (v_TexCoordBlend.z <= 0.001) + { + discard; + } +#endif + vec4 base = texSample2D(g_Texture1, v_TexCoordBase.xy); + base.rgb = mix(albedo.rgb, base.rgb, step(saturate(v_TexCoordBlend.z), base.a)); + + albedo = mix(base, albedo, v_TexCoordBlend.z); + albedo *= g_Color4; + + gl_FragColor = albedo; +#else + albedo.a *= saturate(v_TexCoordBlend.z); + albedo.rgb *= g_Color4 * max(1.0, v_TexCoordBlend.z); + + gl_FragColor = albedo; +#endif +} diff --git a/modules/wallpaper-engine/shaders/puppettexturechannels.vert b/modules/wallpaper-engine/shaders/puppettexturechannels.vert new file mode 100644 index 0000000..4bc58f1 --- /dev/null +++ b/modules/wallpaper-engine/shaders/puppettexturechannels.vert @@ -0,0 +1,22 @@ + +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_BlendMap[BLENDROWCOUNT]; +uniform vec4 g_Texture1Resolution; + +attribute vec3 a_Position; +attribute vec4 a_TexCoordVec4; +attribute uvec4 a_BlendIndices; + +varying vec3 v_TexCoordBlend; +varying vec2 v_TexCoordBase; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_TexCoordBlend.xy = a_TexCoordVec4.xy; + v_TexCoordBase.xy = a_TexCoordVec4.zw * (g_Texture1Resolution.zw / g_Texture1Resolution.xy); +#ifdef GLSL + v_TexCoordBlend.z = g_BlendMap[int(floor(float(a_BlendIndices.x) / 4.0))][int(mod(float(a_BlendIndices.x), 4.0))]; +#else + v_TexCoordBlend.z = g_BlendMap[a_BlendIndices.x / 4.0][mod(a_BlendIndices.x, 4.0)]; +#endif +} diff --git a/modules/wallpaper-engine/shaders/shadowcaster.frag b/modules/wallpaper-engine/shaders/shadowcaster.frag new file mode 100644 index 0000000..7dad77d --- /dev/null +++ b/modules/wallpaper-engine/shaders/shadowcaster.frag @@ -0,0 +1,16 @@ +#if ALPHATOCOVERAGE +uniform sampler2D g_Texture0; // {"material":"albedo"} + +varying vec2 v_TexCoord; +#endif + +void main() { +#if ALPHATOCOVERAGE + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + albedo.a = (albedo.a - 0.5) / max(fwidth(albedo.a), 0.0001) + 0.5; + gl_FragColor = albedo; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/shadowcaster.vert b/modules/wallpaper-engine/shaders/shadowcaster.vert new file mode 100644 index 0000000..84fc589 --- /dev/null +++ b/modules/wallpaper-engine/shaders/shadowcaster.vert @@ -0,0 +1,106 @@ + +// [COMBO] {"combo":"SKINNING"} +// [COMBO] {"combo":"MORPHING"} +// [COMBO] {"combo":"MORPHING_NORMALS"} +// [COMBO] {"combo":"BONECOUNT"} + +uniform mat4 g_ModelMatrix; + +uniform mat4 g_ViewportViewProjectionMatrices[6]; +in uint gl_InstanceID; +varying uint gl_ViewportIndex; + +attribute vec3 a_Position; + +#if SKINNING +uniform mat4x3 g_Bones[BONECOUNT]; + +attribute uvec4 a_BlendIndices; +attribute vec4 a_BlendWeights; +#endif + +#if MORPHING +#if HLSL +in uint gl_VertexID; +#endif + +uniform sampler2D g_Texture1; // {"material":"morph"} +uniform vec4 g_Texture1Resolution; + +uniform uint g_MorphOffsets[12]; +uniform float g_MorphWeights[12]; +#endif + +#if ALPHATOCOVERAGE +attribute vec2 a_TexCoord; +varying vec2 v_TexCoord; +#endif + +void main() { +#if ALPHATOCOVERAGE + v_TexCoord = a_TexCoord; +#endif + + vec3 localPos = a_Position; + +#if MORPHING + vec2 texture5ResolutionInv = 1.0 / g_Texture1Resolution.xy; + vec3 morphPos = CAST3(0.0); + for (uint morphTarget = 0u; morphTarget < g_MorphOffsets[0] % 12u; ++morphTarget) + { + uint morphMapOffset = gl_VertexID + g_MorphOffsets[1u + morphTarget]; + vec2 offset = 0.5 * texture5ResolutionInv; + +#if MORPHING_NORMALS + uint morphMapIndex = (morphMapOffset * 6u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 6u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(g_Texture1Resolution.x); + uint morphPixel1y = morphMapIndex / CASTU(g_Texture1Resolution.y); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(g_Texture1Resolution.x); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(g_Texture1Resolution.y); + + vec4 morphCol1 = texSample2DLod(g_Texture1, vec2(morphPixel1x, morphPixel1y) * texture5ResolutionInv + offset, 0.0); + vec4 morphCol2 = texSample2DLod(g_Texture1, vec2(morphPixel2x, morphPixel2y) * texture5ResolutionInv + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.zw, morphCol2.x); + + vec3 posDelta = mix(posDeltaV1, posDeltaV2, step(1.0, morphMapFlip)); + morphPos += posDelta.rgb * g_MorphWeights[1u + morphTarget]; +#else + uint morphMapIndex = (morphMapOffset * 3u) / 4u; + float morphMapFlip = CASTF((morphMapOffset * 3u) % 4u); + + uint morphPixel1x = morphMapIndex % CASTU(g_Texture1Resolution.x); + uint morphPixel1y = morphMapIndex / CASTU(g_Texture1Resolution.y); + uint morphPixel2x = (morphMapIndex + 1u) % CASTU(g_Texture1Resolution.x); + uint morphPixel2y = (morphMapIndex + 1u) / CASTU(g_Texture1Resolution.y); + + vec4 morphCol1 = texSample2DLod(g_Texture1, vec2(morphPixel1x, morphPixel1y) * texture5ResolutionInv + offset, 0.0); + vec4 morphCol2 = texSample2DLod(g_Texture1, vec2(morphPixel2x, morphPixel2y) * texture5ResolutionInv + offset, 0.0); + + vec3 posDeltaV1 = morphCol1.xyz; + vec3 posDeltaV2 = vec3(morphCol1.w, morphCol2.xy); + vec3 posDeltaV3 = vec3(morphCol1.zw, morphCol2.x); + vec3 posDeltaV4 = morphCol1.yzw; + + vec3 posDelta = mix(posDeltaV1, mix(posDeltaV4, mix(posDeltaV3, posDeltaV2, + step(2.5, morphMapFlip)), step(1.5, morphMapFlip)), step(0.5, morphMapFlip)); + morphPos += posDelta.rgb * g_MorphWeights[1u + morphTarget]; +#endif + } + + localPos += morphPos * g_MorphWeights[0]; +#endif + +#if SKINNING + localPos = mul(vec4(localPos, 1.0), g_Bones[a_BlendIndices.x] * a_BlendWeights.x + + g_Bones[a_BlendIndices.y] * a_BlendWeights.y + + g_Bones[a_BlendIndices.z] * a_BlendWeights.z + + g_Bones[a_BlendIndices.w] * a_BlendWeights.w); +#endif + + gl_Position = mul(mul(vec4(localPos, 1.0), g_ModelMatrix), g_ViewportViewProjectionMatrices[gl_InstanceID]); + gl_ViewportIndex = gl_InstanceID; +} diff --git a/modules/wallpaper-engine/shaders/shadowcasterfoliage4.frag b/modules/wallpaper-engine/shaders/shadowcasterfoliage4.frag new file mode 100644 index 0000000..48a62af --- /dev/null +++ b/modules/wallpaper-engine/shaders/shadowcasterfoliage4.frag @@ -0,0 +1,16 @@ +#if ALPHATOCOVERAGE +uniform sampler2D g_Texture0; // {"material":"albedo"} + +varying vec2 v_TexCoord; +#endif + +void main() { +#if ALPHATOCOVERAGE + vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy); + albedo.a = (albedo.a - 0.5) / max(fwidth(albedo.a - 0.9), 0.0001) + 0.5; + gl_FragColor = albedo; +#if GLSL + if (gl_FragColor.a < 0.5) discard; +#endif +#endif +} diff --git a/modules/wallpaper-engine/shaders/shadowcasterfoliage4.vert b/modules/wallpaper-engine/shaders/shadowcasterfoliage4.vert new file mode 100644 index 0000000..8092044 --- /dev/null +++ b/modules/wallpaper-engine/shaders/shadowcasterfoliage4.vert @@ -0,0 +1,70 @@ + +// [COMBO] {"combo":"SKINNING"} +// [COMBO] {"combo":"MORPHING"} +// [COMBO] {"combo":"MORPHING_NORMALS"} +// [COMBO] {"combo":"BONECOUNT"} +// [COMBO] {"combo":"LEAVESUVMODE"} + +#include "base/model_vertex_v1.h" +#include "common_foliage.h" + +uniform mat4 g_ViewportViewProjectionMatrices[6]; +in uint gl_InstanceID; +varying uint gl_ViewportIndex; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +#if MORPHING +uniform sampler2D g_Texture1; // {"material":"morph"} +uniform vec4 g_Texture1Resolution; +#endif + +#if ALPHATOCOVERAGE +varying vec2 v_TexCoord; +#endif + +uniform float g_Time; +uniform float g_SpeedLeaves; // {"material":"foliagespeedleaves"} +uniform float g_SpeedBase; // {"material":"foliagespeedbase"} +uniform float g_StrengthLeaves; // {"material":"strengthleaves"} +uniform float g_StrengthBase; // {"material":"strengthbase"} +uniform float g_Phase; // {"material":"foliagephase"} +uniform float g_FoliageScale; // {"material":"foliagescale"} +uniform float g_Direction; // {"material":"scrolldirection"} +uniform float g_CutOff; // {"material":"foliagecutoff"} +uniform float g_TreeHeight; // {"material":"foliageheight"} +uniform float g_TreeRadius; // {"material":"foliageradius"} +uniform vec2 g_FoliageUVBounds; // {"material":"foliageuvbounds"} + +void main() { +#if ALPHATOCOVERAGE + v_TexCoord = a_TexCoord; +#endif + + vec3 localPos = a_Position; + +#if MORPHING + ApplyMorphPosition(gl_VertexID, MAKE_SAMPLER2D_ARGUMENT(g_Texture1), g_Texture1Texel, g_MorphOffsets, g_MorphWeights, localPos); +#endif + + vec4 worldPos; +#if SKINNING + ApplySkinningPosition(localPos, a_BlendIndices, a_BlendWeights, worldPos); +#else + ApplyPosition(localPos, worldPos); +#endif + +#if LEAVESUVMODE + vec2 leafUVs = a_TexCoord; +#else + vec2 leafUVs = CAST2(1); +#endif + + worldPos.xyz += CalcFoliageAnimation(worldPos.xyz, localPos, leafUVs, g_Direction, g_Time, + g_SpeedLeaves, g_SpeedBase, g_StrengthLeaves, g_StrengthBase, + g_Phase, g_FoliageScale, g_CutOff, g_TreeHeight, g_TreeRadius, g_FoliageUVBounds); + + gl_Position = mul(worldPos, g_ViewportViewProjectionMatrices[gl_InstanceID]); + gl_ViewportIndex = gl_InstanceID; +} diff --git a/modules/wallpaper-engine/shaders/shadowcasterfur4.frag b/modules/wallpaper-engine/shaders/shadowcasterfur4.frag new file mode 100644 index 0000000..68f3cc6 --- /dev/null +++ b/modules/wallpaper-engine/shaders/shadowcasterfur4.frag @@ -0,0 +1,3 @@ + +void main() { +} diff --git a/modules/wallpaper-engine/shaders/shadowcasterfur4.vert b/modules/wallpaper-engine/shaders/shadowcasterfur4.vert new file mode 100644 index 0000000..07de509 --- /dev/null +++ b/modules/wallpaper-engine/shaders/shadowcasterfur4.vert @@ -0,0 +1,36 @@ + +// [COMBO] {"combo":"SKINNING"} +// [COMBO] {"combo":"MORPHING"} +// [COMBO] {"combo":"MORPHING_NORMALS"} +// [COMBO] {"combo":"BONECOUNT"} + +#include "base/model_vertex_v1.h" + +uniform mat4 g_ViewportViewProjectionMatrices[6]; +in uint gl_InstanceID; +varying uint gl_ViewportIndex; + +attribute vec3 a_Position; + +#if MORPHING +uniform sampler2D g_Texture1; // {"material":"morph"} +uniform vec4 g_Texture1Texel; +#endif + +void main() { + vec3 localPos = a_Position; + +#if MORPHING + ApplyMorphPosition(gl_VertexID, MAKE_SAMPLER2D_ARGUMENT(g_Texture1), g_Texture1Texel, g_MorphOffsets, g_MorphWeights, localPos); +#endif + + vec4 worldPos; +#if SKINNING + ApplySkinningPosition(localPos, a_BlendIndices, a_BlendWeights, worldPos); +#else + ApplyPosition(localPos, worldPos); +#endif + + gl_Position = mul(worldPos, g_ViewportViewProjectionMatrices[gl_InstanceID]); + gl_ViewportIndex = gl_InstanceID; +} diff --git a/modules/wallpaper-engine/shaders/volumetricsback.frag b/modules/wallpaper-engine/shaders/volumetricsback.frag new file mode 100644 index 0000000..776bbea --- /dev/null +++ b/modules/wallpaper-engine/shaders/volumetricsback.frag @@ -0,0 +1,3 @@ + +void main() { +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/volumetricsback.vert b/modules/wallpaper-engine/shaders/volumetricsback.vert new file mode 100644 index 0000000..32d5e1a --- /dev/null +++ b/modules/wallpaper-engine/shaders/volumetricsback.vert @@ -0,0 +1,9 @@ + +uniform mat4 g_ViewProjectionMatrix; +uniform mat4 g_AltViewProjectionMatrix; + +attribute vec3 a_Position; + +void main() { + gl_Position = mul(mul(vec4(a_Position, 1.0), g_AltViewProjectionMatrix), g_ViewProjectionMatrix); +} diff --git a/modules/wallpaper-engine/shaders/volumetricsfront.frag b/modules/wallpaper-engine/shaders/volumetricsfront.frag new file mode 100644 index 0000000..1ae08cd --- /dev/null +++ b/modules/wallpaper-engine/shaders/volumetricsfront.frag @@ -0,0 +1,188 @@ + +// [COMBO] {"material":"ui_editor_properties_fog","combo":"FOG","default":1} + +#include "common_fog.h" +#include "common_pbr_2.h" + +uniform mat4 g_AltModelMatrix; +uniform mat4 g_EffectModelMatrix; + +#if SHADOW +uniform sampler2DComparison g_Texture0; // {"hidden":true,"default":"_rt_shadowAtlas"} +#endif + +uniform sampler2DBackBuffer g_Texture1; // {"hidden":true,"default":"_rt_volumetricsBack"} +uniform sampler2D g_Texture3; // {"hidden":true,"default":"_rt_volumetricsSingle"} + +#ifdef COOKIE +uniform sampler2D g_Texture2; +#endif + +uniform vec4 g_RenderVar0; +uniform vec4 g_RenderVar1; +uniform vec4 g_RenderVar2; +uniform vec4 g_RenderVar3; +uniform vec4 g_RenderVar4; +uniform vec4 g_Texture1Resolution; +uniform vec4 g_Texture3Resolution; + +#define VAR_SHADOWMAP_TRANSFORMS g_RenderVar0 +#define VAR_SPOT_PARAMS g_RenderVar1 +#define VAR_LIGHT_ORIGIN (g_RenderVar2.xyz) +#define VAR_SPOT_FORWARD (g_RenderVar3.xyz) +#define VAR_COLOR (g_RenderVar4.xyz) + +#define VAR_DENSITY (g_RenderVar2.w) +#define VAR_EXPONENT (g_RenderVar4.w) + +#define VAR_SPOT_PARAMS_RADIUS (VAR_SPOT_PARAMS.x) +#define VAR_SPOT_PARAMS_INNER (VAR_SPOT_PARAMS.y) +#define VAR_SPOT_PARAMS_OUTER (VAR_SPOT_PARAMS.z) +#define VAR_SPOT_PARAMS_INTENSITY (VAR_SPOT_PARAMS.w) + +#define VAR_POINT_PARAMS_PROJECTION_INFO (g_RenderVar3) + +varying vec4 v_ScreenPos; + +#if FOG_DIST || FOG_HEIGHT +uniform vec3 g_EyePosition; +//varying vec2 v_FogParams; +#endif + +float hash12(vec2 p) +{ + vec3 p3 = frac(vec3(p.xyx) * 43758.5453); + p3 += CAST3(dot(p3, p3.yzx + 19.19)); + return frac((p3.x + p3.y) * p3.z); +} + +void main() { + vec3 screenUVDepth = (v_ScreenPos.xyz / v_ScreenPos.w); + vec2 screenUV = screenUVDepth.xy * vec2(0.5, -0.5) + vec2(0.5, 0.5); + + float backDepth = texSample2DBackBuffer(g_Texture1, screenUV.xy, g_Texture1Resolution.xy).r; + float limitDepth = texLoad2D(g_Texture3, screenUV.xy, g_Texture3Resolution.xy).r; + + clip(backDepth - screenUVDepth.z); + + backDepth = min(backDepth, limitDepth); + + vec3 screenUVDepthEnd = vec3(screenUVDepth.x, screenUVDepth.y, backDepth); + vec3 screenUVDepthLimit = vec3(screenUVDepth.x, screenUVDepth.y, limitDepth); + +#if SHADOW || COOKIE +#if QUALITY == 4 + const float sampleCount = 64.0; +#elif QUALITY == 3 + const float sampleCount = 32.0; +#elif QUALITY == 2 + const float sampleCount = 24.0; +#else + const float sampleCount = 12.0; +#endif +#else +#if QUALITY == 4 + const float sampleCount = 8.0; +#elif QUALITY == 3 + const float sampleCount = 5.0; +#elif QUALITY == 2 + const float sampleCount = 3.0; +#else + const float sampleCount = 2.0; +#endif +#endif + +#ifdef COOKIE + vec3 shadowFactor = 0.0; +#else + float shadowFactor = 0.0; +#endif + + vec4 worldStart = mul(vec4(screenUVDepth, 1.0), g_EffectModelMatrix); + vec4 worldEnd = mul(vec4(screenUVDepthEnd, 1.0), g_EffectModelMatrix); + vec4 worldLimit = mul(vec4(screenUVDepthLimit, 1.0), g_EffectModelMatrix); + + worldStart.xyz /= worldStart.w; + worldEnd.xyz /= worldEnd.w; + worldLimit.xyz /= worldLimit.w; + + vec3 worldStep = (worldEnd.xyz - worldStart.xyz) / CAST3(sampleCount + 1.0); + + float maxLightScale = VAR_SPOT_PARAMS_INTENSITY; + float invRadius = 1.0 / VAR_SPOT_PARAMS_RADIUS; + +#if POINTLIGHT + maxLightScale *= length(worldEnd.xyz - worldStart.xyz) * invRadius * 0.5; +#else + maxLightScale *= length(worldEnd.xyz - worldStart.xyz) * invRadius; +#endif + +#if SHADOW + worldStart.xyz += worldStep * hash12(screenUV); +#endif + + for (uint s = 0u; s < sampleCount; ++s) + { + worldStart.xyz += worldStep; + vec3 lightDelta = worldStart.xyz - VAR_LIGHT_ORIGIN; + float radiusFalloff = pow(saturate(1.0 - (length(lightDelta) * invRadius)), VAR_EXPONENT); + +#if COOKIE + float spotCookie = 1.0; +#elif POINTLIGHT + float spotCookie = 1.0; +#else + float spotCookie = dot(normalize(lightDelta), VAR_SPOT_FORWARD); + spotCookie = smoothstep(VAR_SPOT_PARAMS_OUTER, VAR_SPOT_PARAMS_INNER, spotCookie); +#endif + +#if POINTLIGHT + vec4 uvs = CalculateProjectedCoordsPoint(worldStart.xyz, VAR_LIGHT_ORIGIN, VAR_POINT_PARAMS_PROJECTION_INFO, VAR_SHADOWMAP_TRANSFORMS); +#else + vec4 uvs = mul(vec4(worldStart.xyz, 1.0), g_AltModelMatrix); + + // Increase UV to hide border inconsistencies due to different buffer sizes + uvs.xyz /= uvs.w; + uvs.xy = uvs.xy * vec2(0.525, -0.525) + CAST2(0.5); +#endif + +#ifdef COOKIE + vec3 cookieColor = texSample2D(g_Texture2, uvs.xy).rgb; +#endif + +#if SHADOW +#if POINTLIGHT + float shadowSample = texSample2DCompare(g_Texture0, uvs.xy, uvs.z).r * radiusFalloff; +#else + uvs.xy *= VAR_SHADOWMAP_TRANSFORMS.zw; + uvs.xy += VAR_SHADOWMAP_TRANSFORMS.xy; + + float shadowSample = texSample2DCompare(g_Texture0, uvs.xy, uvs.z).r * radiusFalloff * spotCookie; +#endif +#else + float shadowSample = radiusFalloff * spotCookie; +#endif + +#if FOG_HEIGHT || FOG_DIST + vec3 viewDir = g_EyePosition - worldStart.xyz; + + vec2 fogPixelState = CalculateFogPixelState(length(viewDir), worldStart.y); + shadowSample *= ApplyFogAlpha(shadowSample, fogPixelState); +#endif + +#ifdef COOKIE + shadowFactor += shadowSample * cookieColor; +#else + shadowFactor += shadowSample; +#endif + } + +#ifdef COOKIE + shadowFactor /= CAST3(sampleCount); +#else + shadowFactor /= sampleCount; +#endif + + gl_FragColor.rgb = VAR_DENSITY * maxLightScale * shadowFactor * VAR_COLOR * 0.1; + gl_FragColor.a = 1; +} \ No newline at end of file diff --git a/modules/wallpaper-engine/shaders/volumetricsfront.vert b/modules/wallpaper-engine/shaders/volumetricsfront.vert new file mode 100644 index 0000000..a5099d3 --- /dev/null +++ b/modules/wallpaper-engine/shaders/volumetricsfront.vert @@ -0,0 +1,21 @@ + +uniform mat4 g_ViewProjectionMatrix; +uniform mat4 g_AltViewProjectionMatrix; + +attribute vec3 a_Position; + +varying vec4 v_ScreenPos; + +void main() { +#if POINTLIGHT + gl_Position = mul(mul(vec4(a_Position, 1.0), g_AltViewProjectionMatrix), g_ViewProjectionMatrix); +#else + gl_Position = mul(mul(vec4(a_Position * vec3(0.99, 0.99, 1.0), 1.0), g_AltViewProjectionMatrix), g_ViewProjectionMatrix); +#endif + +#if FULLSCREEN + gl_Position = vec4(a_Position.xy, 0, 1.0); +#endif + + v_ScreenPos = gl_Position; +} diff --git a/modules/wallpaper-engine/shaders/wireframe.frag b/modules/wallpaper-engine/shaders/wireframe.frag new file mode 100644 index 0000000..199176d --- /dev/null +++ b/modules/wallpaper-engine/shaders/wireframe.frag @@ -0,0 +1,6 @@ + +varying mediump vec4 v_Color; + +void main() { + gl_FragColor = v_Color; +} diff --git a/modules/wallpaper-engine/shaders/wireframe.vert b/modules/wallpaper-engine/shaders/wireframe.vert new file mode 100644 index 0000000..91a056e --- /dev/null +++ b/modules/wallpaper-engine/shaders/wireframe.vert @@ -0,0 +1,12 @@ + +attribute vec3 a_Position; +attribute vec4 a_Color; + +uniform mat4 g_ModelViewProjectionMatrix; + +varying mediump vec4 v_Color; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + v_Color = a_Color; +} diff --git a/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/config.json b/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/config.json new file mode 100644 index 0000000..61da3d9 --- /dev/null +++ b/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/config.json @@ -0,0 +1,5 @@ +{ + "maximumprojectid" : "9223372036854775807", + "frag" : "pixelate.frag", + "vert" : "pixelate.vert" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/pixelate.frag b/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/pixelate.frag new file mode 100644 index 0000000..7c32c42 --- /dev/null +++ b/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/pixelate.frag @@ -0,0 +1,40 @@ +// [COMBO] {"material":"ui_editor_properties_point_filter","combo":"POINTFILTER","type":"options","default":1} +// [COMBO] {"material":"ui_editor_properties_multiply","combo":"MULTIPLY","type":"options","default":1} + +uniform vec4 g_Texture0Resolution; +uniform vec2 g_TexelSize; + +// The coordinates of the current pixel within the space spanning (0, 0) to (new x, new y). +varying vec2 v_PixelCoord; +// x and y are the width and height of a 'new' pixel in 0 to 1 coordinate space. z and w are the same for an old pixel +varying vec4 v_PixelSize; + +uniform sampler2D g_Texture0; // {"material":"framebuffer","label":"ui_editor_properties_framebuffer","hidden":true} + +#ifdef HLSL + #define fract frac +#endif + +void main() { +#if POINTFILTER + // Sample the nearest 'old' pixel + vec2 texCoord00 = round(v_PixelCoord) * v_PixelSize.xy; + texCoord00 = round(texCoord00 * g_Texture0Resolution.xy) * v_PixelSize.zw + v_PixelSize.zw * 0.5; + vec4 finalColor = texSample2D(g_Texture0, texCoord00); +#else + // Bilinear Filtering + vec2 texCoord00 = floor(v_PixelCoord) * v_PixelSize.xy; // Top-left + vec2 texCoord01 = texCoord00 + vec2(0.0, v_PixelSize.y); // Bottom-left + vec2 texCoord10 = texCoord00 + vec2(v_PixelSize.x, 0.0); // Top-right + vec2 texCoord11 = texCoord00 + vec2(v_PixelSize.x, v_PixelSize.y); // Bottom-right + vec2 lerp = fract(v_PixelCoord); + + // Sample each corner pixel, weighted by how close this subpixel is to them. + vec4 finalColor = texSample2D(g_Texture0, texCoord00) * (1.0 - lerp.x) * (1.0 - lerp.y) + + texSample2D(g_Texture0, texCoord01) * (1.0 - lerp.x) * lerp.y + + texSample2D(g_Texture0, texCoord10) * lerp.x * (1.0 - lerp.y) + + texSample2D(g_Texture0, texCoord11) * lerp.x * lerp.y; +#endif + + gl_FragColor = finalColor; +} diff --git a/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/pixelate.vert b/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/pixelate.vert new file mode 100644 index 0000000..b4447d1 --- /dev/null +++ b/modules/wallpaper-engine/zcompat/scene/shaders/2078835426/pixelate.vert @@ -0,0 +1,26 @@ +uniform mat4 g_ModelViewProjectionMatrix; +uniform vec4 g_Texture0Resolution; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +// The coordinates of the current pixel within the space spanning (0, 0) to (new x, new y). +varying vec2 v_PixelCoord; +// x and y are the width and height of a 'new' pixel in 0 to 1 coordinate space. z and w are the same for an old pixel +varying vec4 v_PixelSize; + +uniform float u_ResolutionScale; // {"material":"resolution_scale","label":"Resolution Scale","default":0.125,"range":[0.01, 1.0]} +uniform vec2 u_NewResolution; // {"material":"new_resolution","label":"New Resolution","default":"960 540"} + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + +#if MULTIPLY + v_PixelCoord = a_TexCoord * g_Texture0Resolution.xy * u_ResolutionScale; + v_PixelSize.xy = 1.0 / (g_Texture0Resolution.xy * u_ResolutionScale); +#else + v_PixelCoord = a_TexCoord * u_NewResolution; + v_PixelSize.xy = 1.0 / (u_NewResolution); +#endif + v_PixelSize.zw = 1.0 / g_Texture0Resolution.xy; +} diff --git a/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/Simple_Audio_Bars.frag b/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/Simple_Audio_Bars.frag new file mode 100644 index 0000000..4669252 --- /dev/null +++ b/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/Simple_Audio_Bars.frag @@ -0,0 +1,303 @@ +// [COMBO] {"material":"Position","combo":"SHAPE","type":"options","default":0,"options":{"Bottom":0,"Top":1,"Left":2,"Right":3,"Circle - Inner":4,"Circle - Outer":5,"Center - L/R":6,"Center - U/D":7,"Stereo - L/R":8,"Stereo - U/D":9}} +// [COMBO] {"material":"Transparency","combo":"TRANSPARENCY","type":"options","default":1,"options":{"Preserve original":0,"Replace original":1,"Add to original":2,"Subtract from original":3,"Intersect original":4,"Fully opaque":5}} +// [COMBO] {"material":"Frequency Resolution","combo":"RESOLUTION","type":"options","default":32,"options":{"16":16,"32":32,"64":64}} +// [COMBO] {"material":"ui_editor_properties_blend_mode","combo":"BLENDMODE","type":"imageblending","default":0} +// [COMBO] {"material":"Smooth curve","combo":"A_SMOOTH_CURVE","type":"options","default":0} +// [COMBO] {"material":"Anti-aliasing","combo":"ANTIALIAS","type":"options","default":0} +// [COMBO] {"material":"Hide Below Lower Bounds","combo":"CLIP_LOW","type":"options","default":0} +// [COMBO] {"material":"Hide Above Upper Bounds","combo":"CLIP_HIGH","type":"options","default":0} + +#include "common.h" +#include "common_blending.h" + +#define DEG2RAD 0.01745329251994329576923690768489 // 2 * PI / 360 +#define DEG2PCT 0.0027777777777777777777777777777 // 1 / 360 + +// Same as GLSL's modulo function. Return value's sign is equivalent to the y value's sign. +float mod2(float x, float y) { return x - y * floor(x/y); } + +varying vec2 v_TexCoord; + +uniform float u_BarCount; // {"material":"Bar Count","default":32,"range":[1, 200]} +uniform vec2 u_BarBounds; // {"material":"Lower/Upper Bar Bounds","linked":true,"default":"0.0, 1.0","range":[0,1]} +uniform vec2 u_CircleAngles; // {"material":"Circle Start/End Angles","linked":true,"default":"0.0, 360.0","range":[0,360]} +uniform vec3 u_BarColor; // {"default":"1 1 1","material":"Bar Color","type":"color"} +uniform float u_BarOpacity; // {"default":"1","material":"ui_editor_properties_opacity"} +uniform float u_BarSpacing; // {"default":"0.1","material":"Bar Spacing"} +uniform vec2 u_AASmoothness; // {"default":"0.02, 0.02","material":"Anti-alias blurring","range":[0.01,0.1],"linked":true} + + +uniform sampler2D g_Texture0; // {"material":"previous","label":"Prev","hidden":true} + + +#if RESOLUTION == 16 +uniform float g_AudioSpectrum16Left[16]; +uniform float g_AudioSpectrum16Right[16]; +#endif + +#if RESOLUTION == 32 +uniform float g_AudioSpectrum32Left[32]; +uniform float g_AudioSpectrum32Right[32]; +#endif + +#if RESOLUTION == 64 +uniform float g_AudioSpectrum64Left[64]; +uniform float g_AudioSpectrum64Right[64]; +#endif + + + +// Shape & Position +#define BOTTOM 0 +#define TOP 1 +#define LEFT 2 +#define RIGHT 3 +#define CIRCLE_INNER 4 +#define CIRCLE_OUTER 5 +#define CENTER_H 6 +#define CENTER_V 7 +#define STEREO_H 8 +#define STEREO_V 9 + + +// Transparency +#define PRESERVE 0 +#define REPLACE 1 +#define ADD 2 +#define SUBTRACT 3 +#define INTERSECT 4 +#define REMOVE 5 + + + + + + + +void main() { + + // Define the audio sample arrays +#if RESOLUTION == 16 +#define u_AudioSpectrumLeft g_AudioSpectrum16Left +#define u_AudioSpectrumRight g_AudioSpectrum16Right +#endif +#if RESOLUTION == 32 +#define u_AudioSpectrumLeft g_AudioSpectrum32Left +#define u_AudioSpectrumRight g_AudioSpectrum32Right +#endif +#if RESOLUTION == 64 +#define u_AudioSpectrumLeft g_AudioSpectrum64Left +#define u_AudioSpectrumRight g_AudioSpectrum64Right +#endif + + + + // Map the coordinates to the selected shape +#if SHAPE == BOTTOM + vec2 shapeCoord = v_TexCoord; +#endif +#if SHAPE == TOP + vec2 shapeCoord = v_TexCoord; + shapeCoord.y = 1.0 - shapeCoord.y; +#endif +#if SHAPE == LEFT + vec2 shapeCoord = v_TexCoord.yx; + shapeCoord.y = 1.0 - shapeCoord.y; +#endif +#if SHAPE == RIGHT + vec2 shapeCoord = v_TexCoord.yx; +#endif +#if SHAPE == CENTER_H + vec2 shapeCoord = v_TexCoord.yx; + shapeCoord.y = frac(0.5 - shapeCoord.y); +#endif +#if SHAPE == CENTER_V + vec2 shapeCoord = v_TexCoord.xy; + shapeCoord.y = frac(0.5 - shapeCoord.y); +#endif +#if SHAPE == STEREO_H + vec2 shapeCoord = v_TexCoord.yx; +#endif +#if SHAPE == STEREO_V + vec2 shapeCoord = v_TexCoord.xy; +#endif +#if SHAPE == CIRCLE_INNER || SHAPE == CIRCLE_OUTER + vec2 circleCoord = (v_TexCoord - 0.5) * 2.0; + vec2 shapeCoord; + float startAngle = u_CircleAngles.x * DEG2PCT; + float endAngle = u_CircleAngles.y * DEG2PCT; + shapeCoord.x = (atan2(circleCoord.y, circleCoord.x) + M_PI) / M_PI_2; + // Shift to start angle + shapeCoord.x = mod2(shapeCoord.x - min(startAngle, endAngle), 1.0); + // Scale to area between start and end angles + // y = 1 / (abs((x - 1) % 4 - 2) - 1) + shapeCoord.x = shapeCoord.x / (abs(mod2(endAngle - startAngle - 1.0, 4.0) - 2.0) - 1.0); + // Keep coordinates positive. Adds 1.0 if the end is before the start. + shapeCoord.x += float((endAngle - startAngle) < 0.0); + shapeCoord.y = sqrt(circleCoord.x * circleCoord.x + circleCoord.y * circleCoord.y); +#if SHAPE == CIRCLE_INNER + shapeCoord.y = 1.0 - shapeCoord.y; +#endif +#endif + + + + // Get the frequency for this pixel, ie where we will sample from in the audio spectrum array. 0 == lowest frequency, RESOLUTION == highest frequency. +#if A_SMOOTH_CURVE == 1 + float frequency = shapeCoord.x * float(RESOLUTION); +#else + // BarDist == How far this pixel is from the center of the bar that it belongs to. 0 = right in the middle, 1 = right on the edge. + float barDist = abs(frac(shapeCoord.x * u_BarCount) * 2.0 - 1.0); + float frequency = floor(shapeCoord.x * u_BarCount) / u_BarCount * float(RESOLUTION); +#endif + float barFreq1 = mod2(frequency, float(RESOLUTION)); + float barFreq2 = mod2((barFreq1 + 1.0), float(RESOLUTION)); + + + + // Get the height of the bar +// STEREO ****** STEREO ****** STEREO ****** STEREO ****** STEREO ****** STEREO ****** STEREO ****** STEREO ****** STEREO ****** STEREO ****** +#if SHAPE == STEREO_H || SHAPE == STEREO_V || SHAPE == CENTER_H || SHAPE == CENTER_V + float barVolume1L = u_AudioSpectrumLeft[int(barFreq1)]; + float barVolume2L = u_AudioSpectrumLeft[int(barFreq2)]; + float barVolume1R = u_AudioSpectrumRight[int(barFreq1)]; + float barVolume2R = u_AudioSpectrumRight[int(barFreq2)]; + float barVolumeLeft = mix(barVolume1L, barVolume2L, smoothstep(0.0, 1.0, frac(frequency))); + float barVolumeRight = mix(barVolume1R, barVolume2R, smoothstep(0.0, 1.0, frac(frequency))); + + bool isLeftChannel = shapeCoord.y < 0.49; + bool isRightChannel = shapeCoord.y > 0.51; + + // bar = 1 if this pixel is inside a bar, 0 if outside + float barHeightLeft = 0.5 * mix(u_BarBounds.x, u_BarBounds.y, barVolumeLeft); + float barHeightRight = 0.5 * mix(u_BarBounds.x, u_BarBounds.y, barVolumeRight); +#if ANTIALIAS == 1 + float verticalSmoothingLeft = u_AASmoothness.y * 0.05, verticalSmoothingRight = verticalSmoothingLeft; + verticalSmoothingLeft *= saturate(mix(0.0, 1.0, barVolumeLeft * 100.0)); // Don't blur when near 0 volume + verticalSmoothingRight *= saturate(mix(0.0, 1.0, barVolumeRight * 100.0)); + float barLeft = smoothstep(shapeCoord.y - verticalSmoothingLeft, shapeCoord.y + verticalSmoothingLeft, barHeightLeft); + float barRight = smoothstep(1.0 - shapeCoord.y - verticalSmoothingRight, 1.0 - shapeCoord.y + verticalSmoothingRight, barHeightRight); +#else + float barLeft = float(step(shapeCoord.y, barHeightLeft)); + float barRight = float(step(1.0 - shapeCoord.y, barHeightRight)); +#endif +#if SHAPE == CENTER_H || SHAPE == CENTER_V + // Clip the L/R channels for center, so they don't wrap around. + barLeft *= float(isLeftChannel); + barRight *= float(isRightChannel); +#endif + + // Bounds Clipping (Stereo) +#if CLIP_LOW == 1 +#if ANTIALIAS == 1 + barLeft *= 1.0 - smoothstep(shapeCoord.y - verticalSmoothingLeft, shapeCoord.y + verticalSmoothingLeft, 0.5 * u_BarBounds.x); + barRight *= 1.0 - smoothstep(1.0 - shapeCoord.y - verticalSmoothingRight, 1.0 - shapeCoord.y + verticalSmoothingRight, 0.5 * u_BarBounds.x); +#else + barLeft *= 1.0 - float(step(shapeCoord.y, 0.5 * u_BarBounds.x)); + barRight *= 1.0 - float(step(1.0 - shapeCoord.y, 0.5 * u_BarBounds.x)); +#endif +#endif +#if CLIP_HIGH == 1 +#if ANTIALIAS == 1 + barLeft *= smoothstep(shapeCoord.y - verticalSmoothingLeft, 1.0 - shapeCoord.y + verticalSmoothingLeft, u_BarBounds.y); + barRight *= smoothstep(1.0 - shapeCoord.y - verticalSmoothingRight, 1.0 - shapeCoord.y + verticalSmoothingRight, u_BarBounds.y); +#else + barLeft *= float(step(shapeCoord.y, u_BarBounds.y)); + barRight *= float(step(1.0 - shapeCoord.y, u_BarBounds.y)); +#endif +#endif + + float bar = max(barLeft, barRight); + + +// NON-STEREO *********** NON-STEREO *********** NON-STEREO *********** NON-STEREO *********** NON-STEREO *********** NON-STEREO *********** +#else + float barVolume1 = (u_AudioSpectrumLeft[int(barFreq1)] + u_AudioSpectrumRight[int(barFreq1)]) * 0.5; + float barVolume2 = (u_AudioSpectrumLeft[int(barFreq2)] + u_AudioSpectrumRight[int(barFreq2)]) * 0.5; + float barVolume = mix(barVolume1, barVolume2, smoothstep(0.0, 1.0, frac(frequency))); + + // How tall the bar is in the current pixel's column + float barHeight = mix(u_BarBounds.x, u_BarBounds.y, barVolume); + // bar = 1 if this pixel is inside a bar, 0 if outside +#if ANTIALIAS == 1 + float verticalSmoothing = u_AASmoothness.y * 0.05; + verticalSmoothing *= saturate(mix(0.0, 1.0, barVolume * 100.0)); // Don't blur when near 0 volume + float bar = smoothstep(1.0 - shapeCoord.y - verticalSmoothing, 1.0 - shapeCoord.y + verticalSmoothing, barHeight); +#else + float bar = float(step(1.0 - shapeCoord.y, barHeight)); +#endif + + // Bounds Clipping (Non-stereo) +#if CLIP_LOW == 1 +#if ANTIALIAS == 1 + bar *= 1.0 - smoothstep(1.0 - shapeCoord.y - verticalSmoothing, 1.0 - shapeCoord.y + verticalSmoothing, u_BarBounds.x); +#else + bar *= 1.0 - float(step(1.0 - shapeCoord.y, u_BarBounds.x)); +#endif +#endif +#if CLIP_HIGH == 1 +#if ANTIALIAS == 1 + bar *= smoothstep(1.0 - shapeCoord.y - verticalSmoothing, 1.0 - shapeCoord.y + verticalSmoothing, u_BarBounds.y); +#else + bar *= float(step(1.0 - shapeCoord.y, u_BarBounds.y)); +#endif +#endif + +#endif // End of stereo vs non-stereo + + + + // Semi-circle clipping +#if SHAPE == CIRCLE_INNER || SHAPE == CIRCLE_OUTER +// #if ANTIALIAS == 1 +// bar *= smoothstep(0.0, u_AASmoothness * 0.1, shapeCoord.x) * smoothstep(1.0, 1.0 - u_AASmoothness, shapeCoord.x * float(sign(endAngle - startAngle))); +// #else + bar *= float((shapeCoord.x > 0.0) && (shapeCoord.x * float(sign(endAngle - startAngle)) < 1.0)); +// #endif +#endif + + + + // Bar spacing +#if A_SMOOTH_CURVE != 1 +#if ANTIALIAS == 1 + bar *= max(1.0 - float(step(0.01, u_BarSpacing)), smoothstep(barDist - u_AASmoothness.x, barDist + u_AASmoothness.x, (1.0 - u_BarSpacing))); +#else + bar *= float(step(barDist, 1.0 - u_BarSpacing)); +#endif +#endif + + vec3 finalColor = u_BarColor; + + // Get the existing pixel color + vec4 scene = texSample2D(g_Texture0, v_TexCoord); + + // Apply blend mode + finalColor = ApplyBlending(BLENDMODE, mix(finalColor.rgb, scene.rgb, scene.a), finalColor.rgb, bar * u_BarOpacity); + + + +#if TRANSPARENCY == PRESERVE + float alpha = scene.a; +#endif +#if TRANSPARENCY == REPLACE + float alpha = bar * u_BarOpacity; +#endif +#if TRANSPARENCY == ADD + float alpha = max(scene.a, bar * u_BarOpacity); +#endif +#if TRANSPARENCY == SUBTRACT + float alpha = max(0.0, scene.a - bar * u_BarOpacity); +#endif +#if TRANSPARENCY == INTERSECT + float alpha = scene.a * bar * u_BarOpacity; +#endif +#if TRANSPARENCY == REMOVE + float alpha = u_BarOpacity; +#endif + + + + gl_FragColor = vec4(finalColor, alpha); + //gl_FragColor = vec4(CAST3(shapeCoord.x), alpha); +} diff --git a/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/Simple_Audio_Bars.vert b/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/Simple_Audio_Bars.vert new file mode 100644 index 0000000..a1e6ae6 --- /dev/null +++ b/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/Simple_Audio_Bars.vert @@ -0,0 +1,12 @@ +uniform mat4 g_ModelViewProjectionMatrix; + +attribute vec3 a_Position; +attribute vec2 a_TexCoord; + +varying vec2 v_TexCoord; + +void main() { + gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix); + + v_TexCoord = a_TexCoord; +} diff --git a/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/config.json b/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/config.json new file mode 100644 index 0000000..d233dea --- /dev/null +++ b/modules/wallpaper-engine/zcompat/scene/shaders/2084198056/config.json @@ -0,0 +1,5 @@ +{ + "maximumprojectid" : "2638335396", + "frag" : "Simple_Audio_Bars.frag", + "vert" : "Simple_Audio_Bars.vert" +} \ No newline at end of file diff --git a/modules/wallpaper-engine/zcompat/web/780658164.json b/modules/wallpaper-engine/zcompat/web/780658164.json new file mode 100644 index 0000000..303d7ee --- /dev/null +++ b/modules/wallpaper-engine/zcompat/web/780658164.json @@ -0,0 +1,19 @@ +{ + "actions" : [{ + "file" : "index_files/index.min.js.Download", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index2.min.js", + "replace" : "u(e,t){e.texImage2D", + "insert" : "u(e,t){if(t!=null)e.texImage2D" + }, { + "file" : "js/index3.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }] +} diff --git a/modules/wallpaper-engine/zcompat/web/780662613.json b/modules/wallpaper-engine/zcompat/web/780662613.json new file mode 100644 index 0000000..303d7ee --- /dev/null +++ b/modules/wallpaper-engine/zcompat/web/780662613.json @@ -0,0 +1,19 @@ +{ + "actions" : [{ + "file" : "index_files/index.min.js.Download", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index2.min.js", + "replace" : "u(e,t){e.texImage2D", + "insert" : "u(e,t){if(t!=null)e.texImage2D" + }, { + "file" : "js/index3.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }] +} diff --git a/modules/wallpaper-engine/zcompat/web/780675904.json b/modules/wallpaper-engine/zcompat/web/780675904.json new file mode 100644 index 0000000..303d7ee --- /dev/null +++ b/modules/wallpaper-engine/zcompat/web/780675904.json @@ -0,0 +1,19 @@ +{ + "actions" : [{ + "file" : "index_files/index.min.js.Download", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index2.min.js", + "replace" : "u(e,t){e.texImage2D", + "insert" : "u(e,t){if(t!=null)e.texImage2D" + }, { + "file" : "js/index3.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }] +} diff --git a/modules/wallpaper-engine/zcompat/web/784979889.json b/modules/wallpaper-engine/zcompat/web/784979889.json new file mode 100644 index 0000000..ccb6806 --- /dev/null +++ b/modules/wallpaper-engine/zcompat/web/784979889.json @@ -0,0 +1,7 @@ +{ + "actions" : [{ + "file" : "js/index.js", + "replace" : "renderer = new THREE.WebGLRenderer({alpha: true, antialias: true });", + "insert" : "renderer = new THREE.WebGLRenderer({alpha: false, antialias: true }); renderer.setClearColor( 0xe0dacd, 1);" + }] +} \ No newline at end of file diff --git a/modules/wallpaper-engine/zcompat/web/854685299.json b/modules/wallpaper-engine/zcompat/web/854685299.json new file mode 100644 index 0000000..303d7ee --- /dev/null +++ b/modules/wallpaper-engine/zcompat/web/854685299.json @@ -0,0 +1,19 @@ +{ + "actions" : [{ + "file" : "index_files/index.min.js.Download", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }, { + "file" : "js/index2.min.js", + "replace" : "u(e,t){e.texImage2D", + "insert" : "u(e,t){if(t!=null)e.texImage2D" + }, { + "file" : "js/index3.min.js", + "replace" : "u(t,e){t.texImage2D", + "insert" : "u(t,e){if(e!=null)t.texImage2D" + }] +} diff --git a/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg b/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg new file mode 100644 index 0000000..014b8e3 Binary files /dev/null and b/sDpJ0mPGhn4FnbWOsOI4HoiYUvnyKjJck4RJnPZo-3609584059.jpg differ diff --git a/virtualmonitor.sh b/virtualmonitor.sh new file mode 100644 index 0000000..e69de29