├── .gitignore ├── LICENSE.md ├── README.md ├── lygia-1.3.0.tox └── sandbox.toe /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_* 2 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The Prosperity Public License 3.0.0 2 | 3 | Contributor: Patricio Gonzalez Vivo ( patriciogonzalezvivo.com ) 4 | 5 | Source Code: https://github.com/patriciogonzalezvivo/lygia 6 | 7 | ## Purpose 8 | 9 | This license allows you to use and share this software for noncommercial purposes for free and to try this software for commercial purposes for thirty days. 10 | 11 | ## Agreement 12 | 13 | In order to receive this license, you have to agree to its rules. Those rules are both obligations under that agreement and conditions to your license. Don't do anything with this software that triggers a rule you can't or won't follow. 14 | 15 | ## Notices 16 | 17 | Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above. 18 | 19 | ## Commercial Trial 20 | 21 | Limit your use of this software for commercial purposes to a thirty-day trial period. If you use this software for work, your company gets one trial period for all personnel, not one trial per person. 22 | 23 | ## Contributions Back 24 | 25 | Developing feedback, changes, or additions that you contribute back to the contributor on the terms of a standardized public software license such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html) doesn't count as use for a commercial purpose. 26 | 27 | ## Personal Uses 28 | 29 | Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, doesn't count as use for a commercial purpose. 30 | 31 | ## Noncommercial Organizations 32 | 33 | Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution doesn't count as use for a commercial purpose regardless of the source of funding or obligations resulting from the funding. 34 | 35 | ## Defense 36 | 37 | Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent. 38 | 39 | ## Copyright 40 | 41 | The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it. 42 | 43 | ## Patent 44 | 45 | The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license. 46 | 47 | ## Reliability 48 | 49 | The contributor can't revoke this license. 50 | 51 | ## Excuse 52 | 53 | You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule. 54 | 55 | ## No Liability 56 | 57 | **_As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim._** 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LygiaTD 2 | 3 | This is a TouchDesigner native port of [LYGIA Shader Library](https://github.com/patriciogonzalezvivo/lygia) by [Patricio Gonzalez Vivo](https://github.com/patriciogonzalezvivo). 4 | 5 | ## Description 6 | 7 | This repository is a statically built version of the library ~ and hence no internet connection is needed for file resolution during runtime. 8 | This version uses TouchDesigner's native include resolution mechanism for all the library's `#include`. 9 | The provided `.tox` file bundles all the files from the original libraries with modified paths and compliant names for it to work inside TouchDesigner. 10 | 11 | ## Versioning 12 | 13 | > current version is `v.1.3.0` 14 | 15 | This port will include static snapshots of the upstream repository and will be updated on every release porviding matching versions for each release. 16 | 17 | ## Changelog / Divergences 18 | 19 | - Imports do not have file extention but `_glsl` termination. 20 | - Since his is a TD only version, there is no longer need to declare a `SAMPLER_FNC` before the imports. The default `SAMPLER_FNC` is now `texture`. 21 | 22 | ## Usage 23 | 24 | You can find along the `.tox` file a demo `sandbox.toe` project showcasing it's use. 25 | Mainly you need to make the `.tox` file to your project either via the global component library or by dragging it inside your project. 26 | Once the file is on your project, all works as expected with one **main difference**: file extensions for the `{filename}.glsl` programs become inside TouchDesigner a corresponding prepopulated `textDAT` named `{filename}_glsl`, hence your import will look as follows: 27 | 28 | ``` 29 | #include "filter/gaussianBlur_glsl" 30 | ``` 31 | 32 | as opposed to 33 | 34 | ``` 35 | #include "filter/gaussianBlur.glsl" 36 | ``` 37 | 38 | > see attached figure. 39 | 40 | ![lygia](https://user-images.githubusercontent.com/1661889/201487441-4f8f867a-d75a-42f8-a1a6-d38002bd4d22.jpg) 41 | 42 | ## Motivation 43 | 44 | Shortly after the original library's release `v1.0.0` a TouchDesigner version of it was published [here](https://derivative.ca/community-post/asset/lygia-touchdesginer/66804) by [LeithBA](https://github.com/LeithBA). 45 | While the library works perfectly fine, it uses runtime web resolution for the files, which then makes having an internet connection available a requirement, on top of the overhead of such resolutions. 46 | On the other hand TouchDesigner has native include resolution at it's core. 47 | For those reasons I decided to bundle a native version of the library. 48 | 49 | ## Details 50 | 51 | The whole library is packaged by cloning the upstream source and parsing all the files, updating the include paths and populating the guts of several `textDAT`s placed in their corresponding project hierarchy. 52 | The parsing script might be released opensource if there is enough interest. 53 | 54 | ## LYGIA License 55 | 56 | LYGIA is dual-licensed under [the Prosperity License](https://prosperitylicense.com/versions/3.0.0) and the [Patron License](https://lygia.xyz/license) for [sponsors](https://github.com/sponsors/patriciogonzalezvivo) and [contributors](https://github.com/patriciogonzalezvivo/lygia/graphs/contributors). 57 | 58 | [Sponsors](https://github.com/sponsors/patriciogonzalezvivo) and [contributors](https://github.com/patriciogonzalezvivo/lygia/graphs/contributors) are automatically added to the [Patron License](https://lygia.xyz/license) and they can ignore any non-commercial rule of [the Prosperity Licensed](https://prosperitylicense.com/versions/3.0.0) software. 59 | 60 | Comming soon will be possible to get a permanent comercial license hook to a single and specific version of LYGIA. 61 | -------------------------------------------------------------------------------- /lygia-1.3.0.tox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vectorsize/lygia-td/7818681b51de67d48a256726ecf018918b9eb476/lygia-1.3.0.tox -------------------------------------------------------------------------------- /sandbox.toe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vectorsize/lygia-td/7818681b51de67d48a256726ecf018918b9eb476/sandbox.toe --------------------------------------------------------------------------------