Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kan6868/solar2D-shader
https://github.com/kan6868/solar2D-shader
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kan6868/solar2D-shader
- Owner: kan6868
- Created: 2022-09-25T09:23:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T08:41:01.000Z (over 1 year ago)
- Last Synced: 2024-07-31T09:10:23.203Z (3 months ago)
- Language: Lua
- Size: 798 KB
- Stars: 13
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-solar2d - Solar2D Shader
README
# Shader Effect Of Solar2D
### The repository that synthesizes [Solar2D](https://solar2d.com) shaders made or collected by Kan.
***Note:***
Because I don't use Ios, macOS, Linux and Nintendo switch devices, I can't test shaders on these platforms. If you use my shader on these platforms and it works fine then please let me know.
Thanks you very much!
**- Symbol summary:**
| Symbol | Describe |
|-----------|--------------|
|☑ | Supported |
|☐ | Not test yet |
|☒ | Unsupported |**- List of shaders:**
- [Sway](#sway-shader)
- [Burn](#burn-shader)
- [CRT](#crt-shader)## Sway Shader
![Sway](https://i.imgur.com/b8xv2Ps.gif)
*- Lua code:*
```Lua
require "sway"
object.fill.effect = "filter.custom.sway"
object.fill.effect.offset = 0.0 -- make different
object.fill.effect.heightOffset = 0.6 -- The height where the wind begins to move
object.fill.effect.distortion = 0.5 -- The strength of geometry distortion.
```
*- Support platforms:*| OS/Platform |Supported|
| ------------- | ------ |
| Android |☑|
| Ios |☑|
| Window |☑|
| Mac |☑|
| Linux |☐|
| HTML5 |☑|
| Nintendo Switch |☑|## Burn Shader
![Burn](https://i.imgur.com/Z0NW4tN.gif)
- For mobile devices need to add 1 texture noise.
*- Lua code:*
```Lua
--Mobile version
object.fill = {
type = "composite",
paint1 = { type = "image", filename = "image.png" },
paint2 = { type = "image", filename = "noise.jpg" }
}require "burn_mobile"
object.fill.effect = "filter.custom.burn"
object.fill.effect.startTime = system.getTimer() / 1000
object.fill.effect.duration = 2.0
```
```Lua
--Other version (not need noise texture)
require "burn"
object.fill.effect = "filter.custom.burn"
object.fill.effect.startTime = system.getTimer()/1000
object.fill.effect.duration = 2.0
```
*- Support platforms:*| OS/Platform |Supported|
| ------------- | ------ |
| Android |☑|
| Ios |☑|
| Window |☑|
| Mac |☑|
| Linux |☐|
| HTML5 |☒|
| Nintendo Switch |☑|## CRT Shader
![CRT](https://user-images.githubusercontent.com/70838508/215328995-63515cca-4582-4ebf-8b31-c1d14330e63b.gif)
```Lua
require "crt"
object.fill.effect = "filter.custom.crt"
```
*- Support platforms:*| OS/Platform |Supported|
| ------------- | ------ |
| Android |☑|
| Ios |☑|
| Window |☑|
| Mac |☑|
| Linux |☐|
| HTML5 |☒|
| Nintendo Switch |☑|Ref: https://godotshaders.com/shader/vhs-and-crt-monitor-effect/;
## Sponsor this project
- Support me via [Patreon](https://www.patreon.com/kandev).
- Gift me a coffee cup: [Kofi](https://www.ko-fi.com/kandev)