diff --git a/.gitignore b/.gitignore index bd2670e..c5718c0 100644 --- a/.gitignore +++ b/.gitignore @@ -388,8 +388,6 @@ siv3d.a Screenshot/ AS_DEBUG/ [Ee]xample/ -[Ee]ngine/ -[Dd]ll/ ## include/ ## lib/ diff --git a/Test/App/dll/soundtouch/COPYING.TXT b/Test/App/dll/soundtouch/COPYING.TXT new file mode 100644 index 0000000..bbd24e6 --- /dev/null +++ b/Test/App/dll/soundtouch/COPYING.TXT @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authoried party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/Test/App/dll/soundtouch/SoundTouch_x64.dll b/Test/App/dll/soundtouch/SoundTouch_x64.dll new file mode 100644 index 0000000..d04cdc3 Binary files /dev/null and b/Test/App/dll/soundtouch/SoundTouch_x64.dll differ diff --git a/Test/App/engine/font/fontawesome/LICENSE.txt b/Test/App/engine/font/fontawesome/LICENSE.txt new file mode 100644 index 0000000..cc557ec --- /dev/null +++ b/Test/App/engine/font/fontawesome/LICENSE.txt @@ -0,0 +1,165 @@ +Fonticons, Inc. (https://fontawesome.com) + +-------------------------------------------------------------------------------- + +Font Awesome Free License + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license/free. + +-------------------------------------------------------------------------------- + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) + +The Font Awesome Free download is licensed under a Creative Commons +Attribution 4.0 International License and applies to all icons packaged +as SVG and JS file types. + +-------------------------------------------------------------------------------- + +# Fonts: SIL OFL 1.1 License + +In the Font Awesome Free download, the SIL OFL license applies to all icons +packaged as web and desktop font files. + +Copyright (c) 2022 Fonticons, Inc. (https://fontawesome.com) +with Reserved Font Name: "Font Awesome". + +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. + +-------------------------------------------------------------------------------- + +# Code: MIT License (https://opensource.org/licenses/MIT) + +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +Copyright 2022 Fonticons, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in the +Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +# Attribution + +Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +-------------------------------------------------------------------------------- + +# Brand Icons + +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** diff --git a/Test/App/engine/font/fontawesome/fontawesome-brands.otf.zstdcmp b/Test/App/engine/font/fontawesome/fontawesome-brands.otf.zstdcmp new file mode 100644 index 0000000..e309e83 Binary files /dev/null and b/Test/App/engine/font/fontawesome/fontawesome-brands.otf.zstdcmp differ diff --git a/Test/App/engine/font/fontawesome/fontawesome-solid.otf.zstdcmp b/Test/App/engine/font/fontawesome/fontawesome-solid.otf.zstdcmp new file mode 100644 index 0000000..32cb9a9 Binary files /dev/null and b/Test/App/engine/font/fontawesome/fontawesome-solid.otf.zstdcmp differ diff --git a/Test/App/engine/font/materialdesignicons/license.md b/Test/App/engine/font/materialdesignicons/license.md new file mode 100644 index 0000000..0bff2b8 --- /dev/null +++ b/Test/App/engine/font/materialdesignicons/license.md @@ -0,0 +1,97 @@ +Copyright (c) 2014, Austin Andrews (http://materialdesignicons.com/), +with Reserved Font Name Material Design Icons. + +Copyright (c) 2014, Google (http://www.google.com/design/) +uses the license at https://github.com/google/material-design-icons/blob/master/LICENSE + +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. \ No newline at end of file diff --git a/Test/App/engine/font/materialdesignicons/materialdesignicons-webfont.ttf.zstdcmp b/Test/App/engine/font/materialdesignicons/materialdesignicons-webfont.ttf.zstdcmp new file mode 100644 index 0000000..f2281af Binary files /dev/null and b/Test/App/engine/font/materialdesignicons/materialdesignicons-webfont.ttf.zstdcmp differ diff --git a/Test/App/engine/font/min/LICENSE b/Test/App/engine/font/min/LICENSE new file mode 100644 index 0000000..d952d62 --- /dev/null +++ b/Test/App/engine/font/min/LICENSE @@ -0,0 +1,92 @@ +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/Test/App/engine/font/min/siv3d-min.woff b/Test/App/engine/font/min/siv3d-min.woff new file mode 100644 index 0000000..1558026 Binary files /dev/null and b/Test/App/engine/font/min/siv3d-min.woff differ diff --git a/Test/App/engine/font/mplus/LICENSE_E b/Test/App/engine/font/mplus/LICENSE_E new file mode 100644 index 0000000..e5a3b52 --- /dev/null +++ b/Test/App/engine/font/mplus/LICENSE_E @@ -0,0 +1,16 @@ +M+ FONTS Copyright (C) 2002-2019 M+ FONTS PROJECT + +- + +LICENSE_E + + + + +These fonts are free software. +Unlimited permission is granted to use, copy, and distribute them, with +or without modification, either commercially or noncommercially. +THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY. + + +http://mplus-fonts.osdn.jp diff --git a/Test/App/engine/font/mplus/mplus-1p-black.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-black.ttf.zstdcmp new file mode 100644 index 0000000..1d3f1fb Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-black.ttf.zstdcmp differ diff --git a/Test/App/engine/font/mplus/mplus-1p-bold.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-bold.ttf.zstdcmp new file mode 100644 index 0000000..dcc2711 Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-bold.ttf.zstdcmp differ diff --git a/Test/App/engine/font/mplus/mplus-1p-heavy.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-heavy.ttf.zstdcmp new file mode 100644 index 0000000..50c8ba6 Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-heavy.ttf.zstdcmp differ diff --git a/Test/App/engine/font/mplus/mplus-1p-light.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-light.ttf.zstdcmp new file mode 100644 index 0000000..7b409b0 Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-light.ttf.zstdcmp differ diff --git a/Test/App/engine/font/mplus/mplus-1p-medium.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-medium.ttf.zstdcmp new file mode 100644 index 0000000..5f95c96 Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-medium.ttf.zstdcmp differ diff --git a/Test/App/engine/font/mplus/mplus-1p-regular.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-regular.ttf.zstdcmp new file mode 100644 index 0000000..999a8aa Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-regular.ttf.zstdcmp differ diff --git a/Test/App/engine/font/mplus/mplus-1p-thin.ttf.zstdcmp b/Test/App/engine/font/mplus/mplus-1p-thin.ttf.zstdcmp new file mode 100644 index 0000000..fde39dc Binary files /dev/null and b/Test/App/engine/font/mplus/mplus-1p-thin.ttf.zstdcmp differ diff --git a/Test/App/engine/font/noto-cjk/LICENSE b/Test/App/engine/font/noto-cjk/LICENSE new file mode 100644 index 0000000..d952d62 --- /dev/null +++ b/Test/App/engine/font/noto-cjk/LICENSE @@ -0,0 +1,92 @@ +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/Test/App/engine/font/noto-cjk/NotoSansCJK-Regular.ttc.zstdcmp b/Test/App/engine/font/noto-cjk/NotoSansCJK-Regular.ttc.zstdcmp new file mode 100644 index 0000000..79d8e99 Binary files /dev/null and b/Test/App/engine/font/noto-cjk/NotoSansCJK-Regular.ttc.zstdcmp differ diff --git a/Test/App/engine/font/noto-cjk/NotoSansJP-Regular.otf.zstdcmp b/Test/App/engine/font/noto-cjk/NotoSansJP-Regular.otf.zstdcmp new file mode 100644 index 0000000..3e9fa5d Binary files /dev/null and b/Test/App/engine/font/noto-cjk/NotoSansJP-Regular.otf.zstdcmp differ diff --git a/Test/App/engine/font/noto-emoji/LICENSE b/Test/App/engine/font/noto-emoji/LICENSE new file mode 100644 index 0000000..d952d62 --- /dev/null +++ b/Test/App/engine/font/noto-emoji/LICENSE @@ -0,0 +1,92 @@ +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/Test/App/engine/font/noto-emoji/NotoColorEmoji.ttf.zstdcmp b/Test/App/engine/font/noto-emoji/NotoColorEmoji.ttf.zstdcmp new file mode 100644 index 0000000..89a17bb Binary files /dev/null and b/Test/App/engine/font/noto-emoji/NotoColorEmoji.ttf.zstdcmp differ diff --git a/Test/App/engine/font/noto-emoji/NotoEmoji-Regular.ttf.zstdcmp b/Test/App/engine/font/noto-emoji/NotoEmoji-Regular.ttf.zstdcmp new file mode 100644 index 0000000..1d305ab Binary files /dev/null and b/Test/App/engine/font/noto-emoji/NotoEmoji-Regular.ttf.zstdcmp differ diff --git a/Test/App/engine/shader/d3d11/apply_srgb_curve.ps b/Test/App/engine/shader/d3d11/apply_srgb_curve.ps new file mode 100644 index 0000000..a7dddfe Binary files /dev/null and b/Test/App/engine/shader/d3d11/apply_srgb_curve.ps differ diff --git a/Test/App/engine/shader/d3d11/bitmapfont.ps b/Test/App/engine/shader/d3d11/bitmapfont.ps new file mode 100644 index 0000000..208d221 Binary files /dev/null and b/Test/App/engine/shader/d3d11/bitmapfont.ps differ diff --git a/Test/App/engine/shader/d3d11/copy.ps b/Test/App/engine/shader/d3d11/copy.ps new file mode 100644 index 0000000..251d343 Binary files /dev/null and b/Test/App/engine/shader/d3d11/copy.ps differ diff --git a/Test/App/engine/shader/d3d11/forward3d.ps b/Test/App/engine/shader/d3d11/forward3d.ps new file mode 100644 index 0000000..c94a4ca Binary files /dev/null and b/Test/App/engine/shader/d3d11/forward3d.ps differ diff --git a/Test/App/engine/shader/d3d11/forward3d.vs b/Test/App/engine/shader/d3d11/forward3d.vs new file mode 100644 index 0000000..4e08915 Binary files /dev/null and b/Test/App/engine/shader/d3d11/forward3d.vs differ diff --git a/Test/App/engine/shader/d3d11/fullscreen_triangle.ps b/Test/App/engine/shader/d3d11/fullscreen_triangle.ps new file mode 100644 index 0000000..dd81192 Binary files /dev/null and b/Test/App/engine/shader/d3d11/fullscreen_triangle.ps differ diff --git a/Test/App/engine/shader/d3d11/fullscreen_triangle.vs b/Test/App/engine/shader/d3d11/fullscreen_triangle.vs new file mode 100644 index 0000000..bbbdea5 Binary files /dev/null and b/Test/App/engine/shader/d3d11/fullscreen_triangle.vs differ diff --git a/Test/App/engine/shader/d3d11/gaussian_blur_9.ps b/Test/App/engine/shader/d3d11/gaussian_blur_9.ps new file mode 100644 index 0000000..7d7327a Binary files /dev/null and b/Test/App/engine/shader/d3d11/gaussian_blur_9.ps differ diff --git a/Test/App/engine/shader/d3d11/line3d.ps b/Test/App/engine/shader/d3d11/line3d.ps new file mode 100644 index 0000000..10c1cd2 Binary files /dev/null and b/Test/App/engine/shader/d3d11/line3d.ps differ diff --git a/Test/App/engine/shader/d3d11/line3d.vs b/Test/App/engine/shader/d3d11/line3d.vs new file mode 100644 index 0000000..79871ae Binary files /dev/null and b/Test/App/engine/shader/d3d11/line3d.vs differ diff --git a/Test/App/engine/shader/d3d11/msdffont.ps b/Test/App/engine/shader/d3d11/msdffont.ps new file mode 100644 index 0000000..629b3eb Binary files /dev/null and b/Test/App/engine/shader/d3d11/msdffont.ps differ diff --git a/Test/App/engine/shader/d3d11/msdffont_outline.ps b/Test/App/engine/shader/d3d11/msdffont_outline.ps new file mode 100644 index 0000000..7320fd4 Binary files /dev/null and b/Test/App/engine/shader/d3d11/msdffont_outline.ps differ diff --git a/Test/App/engine/shader/d3d11/msdffont_outlineshadow.ps b/Test/App/engine/shader/d3d11/msdffont_outlineshadow.ps new file mode 100644 index 0000000..b8a1935 Binary files /dev/null and b/Test/App/engine/shader/d3d11/msdffont_outlineshadow.ps differ diff --git a/Test/App/engine/shader/d3d11/msdffont_shadow.ps b/Test/App/engine/shader/d3d11/msdffont_shadow.ps new file mode 100644 index 0000000..92b7382 Binary files /dev/null and b/Test/App/engine/shader/d3d11/msdffont_shadow.ps differ diff --git a/Test/App/engine/shader/d3d11/msdfprint.ps b/Test/App/engine/shader/d3d11/msdfprint.ps new file mode 100644 index 0000000..164ced2 Binary files /dev/null and b/Test/App/engine/shader/d3d11/msdfprint.ps differ diff --git a/Test/App/engine/shader/d3d11/round_dot.ps b/Test/App/engine/shader/d3d11/round_dot.ps new file mode 100644 index 0000000..eb3175c Binary files /dev/null and b/Test/App/engine/shader/d3d11/round_dot.ps differ diff --git a/Test/App/engine/shader/d3d11/sdffont.ps b/Test/App/engine/shader/d3d11/sdffont.ps new file mode 100644 index 0000000..9f30088 Binary files /dev/null and b/Test/App/engine/shader/d3d11/sdffont.ps differ diff --git a/Test/App/engine/shader/d3d11/sdffont_outline.ps b/Test/App/engine/shader/d3d11/sdffont_outline.ps new file mode 100644 index 0000000..83ab893 Binary files /dev/null and b/Test/App/engine/shader/d3d11/sdffont_outline.ps differ diff --git a/Test/App/engine/shader/d3d11/sdffont_outlineshadow.ps b/Test/App/engine/shader/d3d11/sdffont_outlineshadow.ps new file mode 100644 index 0000000..e4a6c55 Binary files /dev/null and b/Test/App/engine/shader/d3d11/sdffont_outlineshadow.ps differ diff --git a/Test/App/engine/shader/d3d11/sdffont_shadow.ps b/Test/App/engine/shader/d3d11/sdffont_shadow.ps new file mode 100644 index 0000000..84e8603 Binary files /dev/null and b/Test/App/engine/shader/d3d11/sdffont_shadow.ps differ diff --git a/Test/App/engine/shader/d3d11/shape.ps b/Test/App/engine/shader/d3d11/shape.ps new file mode 100644 index 0000000..f99e321 Binary files /dev/null and b/Test/App/engine/shader/d3d11/shape.ps differ diff --git a/Test/App/engine/shader/d3d11/sky.ps b/Test/App/engine/shader/d3d11/sky.ps new file mode 100644 index 0000000..e861f45 Binary files /dev/null and b/Test/App/engine/shader/d3d11/sky.ps differ diff --git a/Test/App/engine/shader/d3d11/sprite.vs b/Test/App/engine/shader/d3d11/sprite.vs new file mode 100644 index 0000000..6ad7f2f Binary files /dev/null and b/Test/App/engine/shader/d3d11/sprite.vs differ diff --git a/Test/App/engine/shader/d3d11/square_dot.ps b/Test/App/engine/shader/d3d11/square_dot.ps new file mode 100644 index 0000000..412b2b4 Binary files /dev/null and b/Test/App/engine/shader/d3d11/square_dot.ps differ diff --git a/Test/App/engine/shader/d3d11/texture.ps b/Test/App/engine/shader/d3d11/texture.ps new file mode 100644 index 0000000..71c865b Binary files /dev/null and b/Test/App/engine/shader/d3d11/texture.ps differ diff --git a/Test/App/engine/shader/glsl/apply_srgb_curve.frag b/Test/App/engine/shader/glsl/apply_srgb_curve.frag new file mode 100644 index 0000000..f2e1145 --- /dev/null +++ b/Test/App/engine/shader/glsl/apply_srgb_curve.frag @@ -0,0 +1,85 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Functions +// + +// +// https://github.com/microsoft/DirectX-Graphics-Samples/blob/master/MiniEngine/Core/Shaders/ColorSpaceUtility.hlsli +// +// Copyright(c) 2015 Microsoft +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +float ApplySRGBCurve_Fast(float x) +{ + return x < 0.0031308f ? 12.92f * x : 1.13005f * sqrt(x - 0.00228f) - 0.13448f * x + 0.005719f; +} + +float ApplySRGBCurve(float x) +{ + return x < 0.0031308f ? 12.92f * x : 1.055f * pow(x, 1.0f / 2.4f) - 0.055f; +} + +vec3 ApplySRGBCurve0(vec3 color) +{ + return pow(color, vec3(1.0f / 2.2f)); +} + +vec3 ApplySRGBCurve1(vec3 color) +{ + float r = ApplySRGBCurve_Fast(color.r); + float g = ApplySRGBCurve_Fast(color.g); + float b = ApplySRGBCurve_Fast(color.b); + return vec3(r, g, b); +} + +vec3 ApplySRGBCurve2(vec3 color) +{ + float r = ApplySRGBCurve(color.r); + float g = ApplySRGBCurve(color.g); + float b = ApplySRGBCurve(color.b); + return vec3(r, g, b); +} + +void main() +{ + vec3 texColor = texture(Texture0, UV).rgb; + + FragColor = vec4(ApplySRGBCurve2(texColor), 1.0f); +} diff --git a/Test/App/engine/shader/glsl/bitmapfont.frag b/Test/App/engine/shader/glsl/bitmapfont.frag new file mode 100644 index 0000000..73d4129 --- /dev/null +++ b/Test/App/engine/shader/glsl/bitmapfont.frag @@ -0,0 +1,45 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float textAlpha = texture(Texture0, UV).a; + + vec4 color = vec4(Color.rgb, Color.a * textAlpha); + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/copy.frag b/Test/App/engine/shader/glsl/copy.frag new file mode 100644 index 0000000..479dce6 --- /dev/null +++ b/Test/App/engine/shader/glsl/copy.frag @@ -0,0 +1,43 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + vec4 texColor = texture(Texture0, UV); + + FragColor = texColor; +} diff --git a/Test/App/engine/shader/glsl/forward3d.frag b/Test/App/engine/shader/glsl/forward3d.frag new file mode 100644 index 0000000..c7f6438 --- /dev/null +++ b/Test/App/engine/shader/glsl/forward3d.frag @@ -0,0 +1,95 @@ +// Copyright (c) 2008-2023 Ryo Suzuki. +// Copyright (c) 2016-2023 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec3 WorldPosition; +layout(location = 1) in vec2 UV; +layout(location = 2) in vec3 Normal; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSPerFrame +{ + vec3 g_globalAmbientColor; + vec3 g_sunColor; + vec3 g_sunDirection; +}; + +layout(std140) uniform PSPerView +{ + vec3 g_eyePosition; +}; + +layout(std140) uniform PSPerMaterial +{ + vec3 g_ambientColor; + uint g_hasTexture; + vec4 g_diffuseColor; + vec3 g_specularColor; + float g_shininess; + vec3 g_emissionColor; +}; + +// +// Functions +// +vec4 GetDiffuseColor(vec2 uv) +{ + vec4 diffuseColor = g_diffuseColor; + + if (g_hasTexture == 1) + { + diffuseColor *= texture(Texture0, uv); + } + + return diffuseColor; +} + +vec3 CalculateDiffuseReflection(vec3 n, vec3 l, vec3 lightColor, vec3 diffuseColor, vec3 ambientColor) +{ + vec3 directColor = lightColor * max(dot(n, l), 0.0f); + return ((ambientColor + directColor) * diffuseColor); +} + +vec3 CalculateSpecularReflection(vec3 n, vec3 h, float shininess, float nl, vec3 lightColor, vec3 specularColor) +{ + float highlight = pow(max(dot(n, h), 0.0f), shininess) * float(0.0f < nl); + return (lightColor * specularColor * highlight); +} + +void main() +{ + vec3 lightColor = g_sunColor; + vec3 lightDirection = g_sunDirection; + + vec3 n = normalize(Normal); + vec3 l = lightDirection; + vec4 diffuseColor = GetDiffuseColor(UV); + vec3 ambientColor = (g_ambientColor * g_globalAmbientColor); + + // Diffuse + vec3 diffuseReflection = CalculateDiffuseReflection(n, l, lightColor, diffuseColor.rgb, ambientColor); + + // Specular + vec3 v = normalize(g_eyePosition - WorldPosition); + vec3 h = normalize(v + lightDirection); + vec3 specularReflection = CalculateSpecularReflection(n, h, g_shininess, dot(n, l), lightColor, g_specularColor); + + FragColor = vec4(diffuseReflection + specularReflection + g_emissionColor, diffuseColor.a); +} diff --git a/Test/App/engine/shader/glsl/forward3d.vert b/Test/App/engine/shader/glsl/forward3d.vert new file mode 100644 index 0000000..3fc0a51 --- /dev/null +++ b/Test/App/engine/shader/glsl/forward3d.vert @@ -0,0 +1,54 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// VSInput +// +layout(location = 0) in vec4 VertexPosition; +layout(location = 1) in vec3 VertexNormal; +layout(location = 2) in vec2 VertexUV; + +// +// VSOutput +// +layout(location = 0) out vec3 WorldPosition; +layout(location = 1) out vec2 UV; +layout(location = 2) out vec3 Normal; +out gl_PerVertex +{ + vec4 gl_Position; +}; + +// +// Constant Buffer +// +layout(std140) uniform VSPerView +{ + mat4x4 g_worldToProjected; +}; + +layout(std140) uniform VSPerObject +{ + mat4x4 g_localToWorld; +}; + +layout(std140) uniform VSPerMaterial +{ + vec4 g_uvTransform; +}; + +// +// Functions +// +void main() +{ + vec4 worldPosition = VertexPosition * g_localToWorld; + + gl_Position = worldPosition * g_worldToProjected; + WorldPosition = worldPosition.xyz; + UV = (VertexUV * g_uvTransform.xy + g_uvTransform.zw); + Normal = VertexNormal * mat3x3(g_localToWorld); +} diff --git a/Test/App/engine/shader/glsl/fullscreen_triangle.frag b/Test/App/engine/shader/glsl/fullscreen_triangle.frag new file mode 100644 index 0000000..e41ac5a --- /dev/null +++ b/Test/App/engine/shader/glsl/fullscreen_triangle.frag @@ -0,0 +1,28 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Functions +// +void main() +{ + FragColor = texture(Texture0, UV); +} diff --git a/Test/App/engine/shader/glsl/fullscreen_triangle.vert b/Test/App/engine/shader/glsl/fullscreen_triangle.vert new file mode 100644 index 0000000..5fbfa2d --- /dev/null +++ b/Test/App/engine/shader/glsl/fullscreen_triangle.vert @@ -0,0 +1,27 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// VSOutput +// +layout(location = 0) out vec2 UV; +out gl_PerVertex +{ + vec4 gl_Position; +}; + +// +// Functions +// +void main() +{ + float x = -1.0 + float((gl_VertexID & 1) << 2); + float y = -1.0 + float((gl_VertexID & 2) << 1); + gl_Position = vec4(x, y, 0, 1); + + UV.x = (x + 1.0) * 0.5; + UV.y = (-y + 1.0) * 0.5; +} diff --git a/Test/App/engine/shader/glsl/gaussian_blur_9.frag b/Test/App/engine/shader/glsl/gaussian_blur_9.frag new file mode 100644 index 0000000..1339d3d --- /dev/null +++ b/Test/App/engine/shader/glsl/gaussian_blur_9.frag @@ -0,0 +1,54 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec2 g_pixelSize; + vec2 g_direction; +}; + +// +// Functions +// +void main() +{ + // + // http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/ + // + vec2 offset1 = 1.38461538461538 * g_direction; + vec2 offset2 = 3.23076923076923 * g_direction; + + vec4 color = texture(Texture0, UV) * 0.227027027027027; + color += texture(Texture0, UV + (offset1 * g_pixelSize)) * 0.316216216216216; + color += texture(Texture0, UV - (offset1 * g_pixelSize)) * 0.316216216216216; + color += texture(Texture0, UV + (offset2 * g_pixelSize)) * 0.070270270270270; + color += texture(Texture0, UV - (offset2 * g_pixelSize)) * 0.070270270270270; + + FragColor = color; +} diff --git a/Test/App/engine/shader/glsl/line3d.frag b/Test/App/engine/shader/glsl/line3d.frag new file mode 100644 index 0000000..2344971 --- /dev/null +++ b/Test/App/engine/shader/glsl/line3d.frag @@ -0,0 +1,24 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// PSInput +// +layout(location = 0) in vec3 WorldPosition; +layout(location = 1) in vec4 Color; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Functions +// +void main() +{ + FragColor = Color; +} diff --git a/Test/App/engine/shader/glsl/line3d.vert b/Test/App/engine/shader/glsl/line3d.vert new file mode 100644 index 0000000..3cd0997 --- /dev/null +++ b/Test/App/engine/shader/glsl/line3d.vert @@ -0,0 +1,46 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// VSInput +// +layout(location = 0) in vec4 VertexPosition; +layout(location = 1) in vec4 VertexColor; + +// +// VSOutput +// +layout(location = 0) out vec3 WorldPosition; +layout(location = 1) out vec4 Color; +out gl_PerVertex +{ + vec4 gl_Position; +}; + +// +// Constant Buffer +// +layout(std140) uniform VSPerView +{ + mat4x4 g_worldToProjected; +}; + +layout(std140) uniform VSPerObject +{ + mat4x4 g_localToWorld; +}; + +// +// Functions +// +void main() +{ + vec4 worldPosition = VertexPosition * g_localToWorld; + + gl_Position = worldPosition * g_worldToProjected; + WorldPosition = worldPosition.xyz; + Color = VertexColor; +} diff --git a/Test/App/engine/shader/glsl/msdffont.frag b/Test/App/engine/shader/glsl/msdffont.frag new file mode 100644 index 0000000..bd2137c --- /dev/null +++ b/Test/App/engine/shader/glsl/msdffont.frag @@ -0,0 +1,58 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +float median(float r, float g, float b) +{ + return max(min(r, g), min(max(r, g), b)); +} + +void main() +{ + vec2 size = textureSize(Texture0, 0); + const float pxRange = 4.0; + vec2 msdfUnit = (pxRange / size); + + vec3 s = texture(Texture0, UV).rgb; + float d = median(s.r, s.g, s.b); + + float td = (d - 0.5); + float textAlpha = clamp(td * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + + vec4 color = vec4(Color.rgb, Color.a * textAlpha); + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/msdffont_outline.frag b/Test/App/engine/shader/glsl/msdffont_outline.frag new file mode 100644 index 0000000..a8f6dec --- /dev/null +++ b/Test/App/engine/shader/glsl/msdffont_outline.frag @@ -0,0 +1,65 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +float median(float r, float g, float b) +{ + return max(min(r, g), min(max(r, g), b)); +} + +void main() +{ + vec2 size = textureSize(Texture0, 0); + const float pxRange = 4.0; + vec2 msdfUnit = (pxRange / size); + + vec3 s = texture(Texture0, UV).rgb; + float d = median(s.r, s.g, s.b); + + float od = (d - g_sdfParam.y); + float outlineAlpha = clamp(od * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + + float td = (d - g_sdfParam.x); + float textAlpha = clamp(td * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + + float baseAlpha = (outlineAlpha - textAlpha); + + vec4 color; + color.rgb = mix(g_sdfOutlineColor.rgb, Color.rgb, textAlpha); + color.a = baseAlpha * g_sdfOutlineColor.a + textAlpha * Color.a; + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/msdffont_outlineshadow.frag b/Test/App/engine/shader/glsl/msdffont_outlineshadow.frag new file mode 100644 index 0000000..1424324 --- /dev/null +++ b/Test/App/engine/shader/glsl/msdffont_outlineshadow.frag @@ -0,0 +1,85 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +float median(float r, float g, float b) +{ + return max(min(r, g), min(max(r, g), b)); +} + +void main() +{ + vec2 size = textureSize(Texture0, 0); + const float pxRange = 4.0; + vec2 msdfUnit = (pxRange / size); + + vec3 s = texture(Texture0, UV).rgb; + float d = median(s.r, s.g, s.b); + + float od = (d - g_sdfParam.y); + float outlineAlpha = clamp(od * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + + float td = (d - g_sdfParam.x); + float textAlpha = clamp(td * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + + float baseAlpha = (outlineAlpha - textAlpha); + + vec4 textColor; + textColor.rgb = mix(g_sdfOutlineColor.rgb, Color.rgb, textAlpha); + textColor.a = baseAlpha * g_sdfOutlineColor.a + textAlpha * Color.a; + + + vec2 shadowOffset = (g_sdfParam.zw / size); + vec3 s2 = texture(Texture0, UV - shadowOffset).rgb; + float d2 = median(s2.r, s2.g, s2.b); + + float sd = (d2 - 0.5); + float shadowAlpha = clamp(sd * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + float sBase = shadowAlpha * (1.0 - textColor.a); + + vec4 color; + if (textColor.a == 0.0) + { + color.rgb = g_sdfShadowColor.rgb; + } + else + { + color.rgb = mix(textColor.rgb, g_sdfShadowColor.rgb, sBase); + } + color.a = (sBase * g_sdfShadowColor.a) + textColor.a; + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/msdffont_shadow.frag b/Test/App/engine/shader/glsl/msdffont_shadow.frag new file mode 100644 index 0000000..24f4270 --- /dev/null +++ b/Test/App/engine/shader/glsl/msdffont_shadow.frag @@ -0,0 +1,75 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +float median(float r, float g, float b) +{ + return max(min(r, g), min(max(r, g), b)); +} + +void main() +{ + vec2 size = textureSize(Texture0, 0); + const float pxRange = 4.0; + vec2 msdfUnit = (pxRange / size); + + vec3 s = texture(Texture0, UV).rgb; + float d = median(s.r, s.g, s.b); + + float td = (d - 0.5); + float textAlpha = clamp(td * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + + vec2 shadowOffset = (g_sdfParam.zw / size); + vec3 s2 = texture(Texture0, UV - shadowOffset).rgb; + float d2 = median(s2.r, s2.g, s2.b); + + float sd = (d2 - 0.5); + float shadowAlpha = clamp(sd * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0); + float sBase = shadowAlpha * (1.0 - textAlpha); + + vec4 color; + if (textAlpha == 0.0) + { + color.rgb = g_sdfShadowColor.rgb; + } + else + { + color.rgb = mix(Color.rgb, g_sdfShadowColor.rgb, sBase); + } + color.a = (sBase * g_sdfShadowColor.a) + (textAlpha * Color.a); + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/msdfprint.frag b/Test/App/engine/shader/glsl/msdfprint.frag new file mode 100644 index 0000000..97899c1 --- /dev/null +++ b/Test/App/engine/shader/glsl/msdfprint.frag @@ -0,0 +1,62 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +float median(float r, float g, float b) +{ + return max(min(r, g), min(max(r, g), b)); +} + +void main() +{ + vec2 size = textureSize(Texture0, 0); + const float pxRange = 4.0; + vec2 msdfUnit = (pxRange / size); + + vec3 s = texture(Texture0, UV).rgb; + float d = median(s.r, s.g, s.b); + + float td = (d - 0.5); + float textAlpha = sqrt(clamp(td * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0)); + + vec2 shadowOffset = vec2(0.875, 0.875) / size; + vec3 s2 = texture(Texture0, UV - shadowOffset).rgb; + float d2 = median(s2.r, s2.g, s2.b); + float sd = (d2 - 0.5); + float shadowAlpha = sqrt(clamp(sd * dot(msdfUnit, 0.5 / fwidth(UV)) + 0.5, 0.0, 1.0)); + + FragColor = vec4(textAlpha, textAlpha, textAlpha, max(textAlpha, shadowAlpha)); +} diff --git a/Test/App/engine/shader/glsl/round_dot.frag b/Test/App/engine/shader/glsl/round_dot.frag new file mode 100644 index 0000000..ab076ce --- /dev/null +++ b/Test/App/engine/shader/glsl/round_dot.frag @@ -0,0 +1,46 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float t = mod(UV.x, 2.0); + vec2 tex = UV; + tex.x = abs(1 - t) * 2.0; + vec4 color = Color; + + float dist = dot(tex, tex) * 0.5; + float delta = fwidth(dist); + float alpha = smoothstep(0.5 - delta, 0.5, dist); + color.a *= 1.0 - alpha; + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/sdffont.frag b/Test/App/engine/shader/glsl/sdffont.frag new file mode 100644 index 0000000..c84ac45 --- /dev/null +++ b/Test/App/engine/shader/glsl/sdffont.frag @@ -0,0 +1,48 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float d = texture(Texture0, UV).a; + + float td = (d - 0.5); + float textAlpha = clamp(td / fwidth(td) + 0.5, 0.0, 1.0); + + vec4 color = vec4(Color.rgb, Color.a * textAlpha); + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/sdffont_outline.frag b/Test/App/engine/shader/glsl/sdffont_outline.frag new file mode 100644 index 0000000..3b1b7e1 --- /dev/null +++ b/Test/App/engine/shader/glsl/sdffont_outline.frag @@ -0,0 +1,55 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float d = texture(Texture0, UV).a; + + float od = (d - g_sdfParam.y); + float outlineAlpha = clamp(od / fwidth(od) + 0.5, 0.0, 1.0); + + float td = (d - g_sdfParam.x); + float textAlpha = clamp(td / fwidth(td) + 0.5, 0.0, 1.0); + + float baseAlpha = (outlineAlpha - textAlpha); + + vec4 color; + color.rgb = mix(g_sdfOutlineColor.rgb, Color.rgb, textAlpha); + color.a = baseAlpha * g_sdfOutlineColor.a + textAlpha * Color.a; + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/sdffont_outlineshadow.frag b/Test/App/engine/shader/glsl/sdffont_outlineshadow.frag new file mode 100644 index 0000000..10ee15b --- /dev/null +++ b/Test/App/engine/shader/glsl/sdffont_outlineshadow.frag @@ -0,0 +1,75 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float d = texture(Texture0, UV).a; + + float od = (d - g_sdfParam.y); + float outlineAlpha = clamp(od / fwidth(od) + 0.5, 0.0, 1.0); + + float td = (d - g_sdfParam.x); + float textAlpha = clamp(td / fwidth(td) + 0.5, 0.0, 1.0); + + float baseAlpha = (outlineAlpha - textAlpha); + + vec4 textColor; + textColor.rgb = mix(g_sdfOutlineColor.rgb, Color.rgb, textAlpha); + textColor.a = baseAlpha * g_sdfOutlineColor.a + textAlpha * Color.a; + + + vec2 size = textureSize(Texture0, 0); + vec2 shadowOffset = (g_sdfParam.zw / size); + float d2 = texture(Texture0, UV - shadowOffset).a; + + float sd = (d2 - g_sdfParam.y); + float shadowAlpha = clamp(sd / fwidth(sd) + 0.5, 0.0, 1.0); + float sBase = shadowAlpha * (1.0 - textColor.a); + + vec4 color; + if (textColor.a == 0.0) + { + color.rgb = g_sdfShadowColor.rgb; + } + else + { + color.rgb = mix(textColor.rgb, g_sdfShadowColor.rgb, sBase); + } + color.a = (sBase * g_sdfShadowColor.a) + textColor.a; + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/sdffont_shadow.frag b/Test/App/engine/shader/glsl/sdffont_shadow.frag new file mode 100644 index 0000000..0043fe9 --- /dev/null +++ b/Test/App/engine/shader/glsl/sdffont_shadow.frag @@ -0,0 +1,65 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float d = texture(Texture0, UV).a; + + float td = (d - 0.5); + float textAlpha = clamp(td / fwidth(td) + 0.5, 0.0, 1.0); + + vec2 size = textureSize(Texture0, 0); + vec2 shadowOffset = (g_sdfParam.zw / size); + float d2 = texture(Texture0, UV - shadowOffset).a; + + float sd = (d2 - 0.5); + float shadowAlpha = clamp(sd / fwidth(sd) + 0.5, 0.0, 1.0); + float sBase = shadowAlpha * (1.0 - textAlpha); + + vec4 color; + if (textAlpha == 0.0) + { + color.rgb = g_sdfShadowColor.rgb; + } + else + { + color.rgb = mix(Color.rgb, g_sdfShadowColor.rgb, sBase); + } + color.a = (sBase * g_sdfShadowColor.a) + (textAlpha * Color.a); + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/shape.frag b/Test/App/engine/shader/glsl/shape.frag new file mode 100644 index 0000000..633214b --- /dev/null +++ b/Test/App/engine/shader/glsl/shape.frag @@ -0,0 +1,35 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// PSInput +// +layout(location = 0) in vec4 Color; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + FragColor = (Color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/sky.frag b/Test/App/engine/shader/glsl/sky.frag new file mode 100644 index 0000000..741934b --- /dev/null +++ b/Test/App/engine/shader/glsl/sky.frag @@ -0,0 +1,369 @@ +// Copyright (c) 2008-2023 Ryo Suzuki. +// Copyright (c) 2016-2023 OpenSiv3D Project. +// Licensed under the MIT License. + +// +// https://github.com/turanszkij/WickedEngine/blob/master/WickedEngine/shaders/skyHF.hlsli +// +// Copyright(c) 2021 Turanszki Janos +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Atmosphere based on: https://www.shadertoy.com/view/Ml2cWG +// Cloud noise based on: https://www.shadertoy.com/view/4tdSWr + +# version 410 + +// +// PSInput +// +layout(location = 0) in vec3 WorldPosition; +layout(location = 1) in vec2 UV; +layout(location = 2) in vec3 Normal; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSPerFrame +{ + vec3 g_globalAmbientColor; + vec3 g_sunColor; + vec3 g_sunDirection; +}; + +layout(std140) uniform PSPerView +{ + vec3 g_eyePosition; +}; + +layout(std140) uniform PSSky +{ + vec3 g_zenithColor; + float g_fogHeightSky; + + vec3 g_horizonColor; + float g_cloudiness; + + vec3 g_cloudUVTransform; // cos(theta), -sin(thita), sin(theta) + float g_cloudScale; + + float g_cloudTime; + float g_cloudPlaneHeight; + float g_starBrightness; + uint g_option; + + vec3 g_cloudColor; + float g_skyExposure; + + mat3x3 g_starsRotation; + + vec3 g_starOffset; + float g_starSaturation; +}; + +// +// Functions +// + +# define OPTION_SUN_ENABLED (1u << 0) +# define OPTION_CLOUDS_ENABLED (1u << 1) +# define OPTION_CLOUDS_LIGHTING_ENABLED (1u << 2) +# define PI (3.14159265f) + +// o : ray origin +// d : ray direction +// returns distance on the ray to the object if hit, 0 otherwise +float Trace_plane(vec3 o, vec3 d, vec3 planeOrigin,vec3 planeNormal) +{ + return dot(planeNormal, (planeOrigin - o) / dot(planeNormal, d)); +} + +vec2 hash(vec2 p) +{ + p = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3))); + return -1.0 + 2.0 * fract(sin(p) * 43758.5453123); +} + +float noise(in vec2 p) +{ + const float K1 = 0.366025404; // (sqrt(3)-1)/2; + const float K2 = 0.211324865; // (3-sqrt(3))/6; + vec2 i = floor(p + (p.x + p.y) * K1); + vec2 a = p - i + (i.x + i.y) * K2; + vec2 o = (a.x > a.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); //float2 of = 0.5 + 0.5*float2(sign(a.x-a.y), sign(a.y-a.x)); + vec2 b = a - o + K2; + vec2 c = a - 1.0 + 2.0 * K2; + vec3 h = max(0.5 - vec3(dot(a, a), dot(b, b), dot(c, c)), 0.0); + vec3 n = h * h * h * h * vec3(dot(a, hash(i + 0.0)), dot(b, hash(i + o)), dot(c, hash(i + 1.0))); + return dot(n, vec3(70.0, 70.0, 70.0)); +} + +vec3 CustomAtmosphericScattering(vec3 V, vec3 sunDirection, vec3 sunColor, bool sun_enabled, bool dark_enabled) +{ + vec3 skyColor = g_zenithColor; + bool sunDisc = sun_enabled; + + float zenith = V.y; // how much is above (0: horizon, 1: directly above) + float sunScatter = clamp(sunDirection.y + 0.1f, 0.0f, 1.0f); // how much the sun is directly above. Even if sunis at horizon, we add a constant scattering amount so that light still scatters at horizon + + float atmosphereDensity = 0.5 + g_fogHeightSky; // constant of air density, or "fog height" as interpreted here (bigger is more obstruction of sun) + float zenithDensity = atmosphereDensity / pow(max(0.000001f, zenith), 0.75f); + float sunScatterDensity = atmosphereDensity / pow(max(0.000001f, sunScatter), 0.75f); + + vec3 aberration = vec3(0.39, 0.57, 1.0); // the chromatic aberration effect on the horizon-zenith fade line + vec3 skyAbsorption = clamp(exp2(aberration * -zenithDensity) * 2.0f, 0.0f, 1.0f); // gradient on horizon + vec3 sunAbsorption = clamp(sunColor * exp2(aberration * -sunScatterDensity) * 2.0f, 0.0f, 1.0f); // gradient of sun when it's getting below horizon + + float sunAmount = distance(V, sunDirection); // sun falloff descreasing from mid point + float rayleigh = 1.0 + pow(1.0 - clamp(sunAmount, 0.0f, 1.0f), 2.0) * PI * 0.5; + float mie_disk = clamp(1.0 - pow(sunAmount, 0.1), 0.0f, 1.0f); + vec3 mie = mie_disk * mie_disk * (3.0 - 2.0 * mie_disk) * 2.0 * PI * sunAbsorption; + + vec3 totalColor = mix(g_horizonColor, g_zenithColor * zenithDensity * rayleigh, skyAbsorption); + totalColor = mix(totalColor * skyAbsorption, totalColor, sunScatter); // when sun goes below horizon, absorb sky color + if (sunDisc) + { + vec3 sun = smoothstep(0.03, 0.026, sunAmount) * sunColor * 50.0 * skyAbsorption; // sun disc + totalColor += sun; + totalColor += mie; + } + totalColor *= (sunAbsorption + length(sunAbsorption)) * 0.5f; // when sun goes below horizon, fade out whole sky + totalColor *= 0.25; // exposure level + + if (dark_enabled) + { + totalColor = max(pow(clamp(dot(sunDirection, V), 0.0f, 1.0f), 64) * sunColor, 0) * skyAbsorption; + } + + return totalColor; +} + +void CalculateClouds(inout vec3 sky, vec3 V, bool cloudsLightingEnabled, bool dark_enabled) +{ + if (g_cloudiness <= 0) + { + return; + } + + // Trace a cloud layer plane: + vec3 o = g_eyePosition; + vec3 d = V; + vec3 planeOrigin = vec3(0, g_cloudPlaneHeight, 0); + vec3 planeNormal = vec3(0, -1, 0); + float t = Trace_plane(o, d, planeOrigin, planeNormal); + + if (t < 0) + { + return; + } + + mat2x2 cloudUVTransform = mat2x2(g_cloudUVTransform.xy, g_cloudUVTransform.zx); + vec2 cloudPos = o.xz + (d.xz * cloudUVTransform) * t; + vec2 cloudUV = cloudPos * g_cloudScale; + float cloudTime = g_cloudTime; + mat2x2 m = mat2x2(1.6, 1.2, -1.2, 1.6); + uint quality = 8; + + // rotate uvs like a flow effect: + float flow = 0; + { + vec2 uv = cloudUV * 0.5f; + float amount = 0.1; + for (uint i = 0; i < quality; i++) + { + flow += noise(uv) * amount; + uv = (uv * m); + amount *= 0.4; + } + } + + // Main shape: + float clouds = 0.0; + { + float time = cloudTime * 0.2f; + float density = 1.1f; + vec2 uv = cloudUV * 0.8f; + uv -= flow - time; + for (uint i = 0; i < quality; i++) + { + clouds += density * noise(uv); + uv = (uv * m) + time; + density *= 0.6f; + } + } + + // Detail shape: + { + float detail_shape = 0.0; + float time = cloudTime * 0.1f; + float density = 0.8f; + vec2 uv = cloudUV; + uv -= flow - time; + for (uint i = 0; i < quality; i++) + { + detail_shape += abs(density * noise(uv)); + uv = (uv * m) + time; + density *= 0.7f; + } + clouds *= detail_shape + clouds; + clouds *= detail_shape; + } + + // lerp between "choppy clouds" and "uniform clouds". Lower cloudiness will produce choppy clouds, but very high cloudiness will switch to overcast unfiform clouds: + clouds = mix(clouds * 9.0f * g_cloudiness + 0.3f, clouds * 0.5f + 0.5f, pow(clamp(g_cloudiness, 0.0f, 1.0f), 8)); + clouds = clamp(clouds - (1 - g_cloudiness), 0.0f, 1.0f); // modulate constant cloudiness + clouds *= pow(1 - clamp(length(abs(cloudPos * 0.00001f)), 0.0f, 1.0f), 16); //fade close to horizon + + if (dark_enabled) + { + sky *= pow(clamp(1 - clouds, 0.0f, 1.0f), 16.0f); // only sun and clouds. Boost clouds to have nicer sun shafts occlusion + } + else if (cloudsLightingEnabled) + { + vec3 cloudLighting = (dot(-V, g_sunDirection) * 0.5f + 0.5f) * g_sunColor * (1 - g_cloudiness); + sky = mix(min(sky, 1.0f), g_cloudColor + cloudLighting, clouds); // sky and clouds on top + } + else + { + sky = mix(sky, g_cloudColor, clouds); // sky and clouds on top + } +} + +// Copyright(c) Pablo Roman Andrioli +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files(the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions : +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// Star Nest based on: https://www.shadertoy.com/view/XlfGRj + +#define iterations 22 +#define formuparam 0.53 +#define volsteps 3 +#define stepsize 0.1 +#define tile 0.850 +#define brightness 0.0015 +#define darkmatter 0.300 +#define distfading 0.730 + +vec3 GetStars(vec3 V, float starBrightness) +{ + vec3 dir = (V * g_starsRotation); + vec3 from = g_starOffset; + + //volumetric rendering + float s = 0.1f, fade = 1.0f; + vec3 v = vec3(0.0f); + + for (uint r = 0; r < volsteps; ++r) + { + vec3 p = from + s * dir * 0.5f; + p = abs(vec3(tile) - mod(p, vec3(tile * 2.0f))); // tiling fold + float pa = 0.0f, a = 0.0f; + + for (uint i = 0; i < iterations; ++i) + { + p = abs(p) / dot(p, p) - formuparam; // the magic formula + a += abs(length(p) - pa); // absolute sum of average change + pa = length(p); + } + + float dm = max(0.0f, darkmatter - a * a * 0.001f); //dark matter + a *= a * a; // add contrast + + if (6 < r) + { + fade*=1.-dm; // dark matter, don't render near + } + + v += fade; + v += vec3(s, s*s, s*s*s*s ) * a * brightness * fade; // coloring based on distance + fade *= distfading; // distance fading + s += stepsize; + } + + v = mix(vec3(length(v)), v, g_starSaturation); //color adjust + + return clamp(v * V.y * 0.02f * starBrightness, 0.0f, 1.0f); +} + +// Returns sky color modulated by the sun and clouds +// V : view direction +vec3 GetDynamicSkyColor(in vec3 V, bool sun_enabled, bool clouds_enabled, bool dark_enabled) +{ + vec3 sunDirection = g_sunDirection; + vec3 sunColor = g_sunColor; + + vec3 sky = CustomAtmosphericScattering + ( + V, // normalized ray direction + sunDirection, // position of the sun + sunColor, // color of the sun, for disc + sun_enabled, // use sun and total + dark_enabled // enable dark mode for light shafts etc. + ); + + if (0.0 < g_starBrightness) + { + float starBrightness = g_starBrightness * (1 - g_cloudiness) * (1 - g_cloudiness); + sky += GetStars(V, starBrightness); + } + + sky *= g_skyExposure; + + if (clouds_enabled) + { + bool cloudsLightingEnabled = (g_option & OPTION_CLOUDS_LIGHTING_ENABLED) != 0; + CalculateClouds(sky, V, cloudsLightingEnabled, dark_enabled); + } + + return sky; +} + +void main() +{ + vec3 dir = normalize(WorldPosition - g_eyePosition); + + bool sunEnabled = (g_option & OPTION_SUN_ENABLED) != 0; + + bool cloudsEnabled = (g_option & OPTION_CLOUDS_ENABLED) != 0; + + vec3 skyColor = GetDynamicSkyColor(dir, sunEnabled, cloudsEnabled, false); + + FragColor = vec4(skyColor, 1.0f); +} diff --git a/Test/App/engine/shader/glsl/sprite.vert b/Test/App/engine/shader/glsl/sprite.vert new file mode 100644 index 0000000..2cf4ec0 --- /dev/null +++ b/Test/App/engine/shader/glsl/sprite.vert @@ -0,0 +1,51 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// VSInput +// +layout(location = 0) in vec2 VertexPosition; +layout(location = 1) in vec2 VertexUV; +layout(location = 2) in vec4 VertexColor; + +// +// VSOutput +// +layout(location = 0) out vec4 Color; +layout(location = 1) out vec2 UV; +out gl_PerVertex +{ + vec4 gl_Position; +}; + +// +// Siv3D Functions +// +vec4 s3d_Transform2D(const vec2 pos, const vec4 t[2]) +{ + return vec4(t[0].zw + (pos.x * t[0].xy) + (pos.y * t[1].xy), t[1].zw); +} + +// +// Constant Buffer +// +layout(std140) uniform VSConstants2D +{ + vec4 g_transform[2]; + vec4 g_colorMul; +}; + +// +// Functions +// +void main() +{ + gl_Position = s3d_Transform2D(VertexPosition, g_transform); + + Color = (VertexColor * g_colorMul); + + UV = VertexUV; +} diff --git a/Test/App/engine/shader/glsl/square_dot.frag b/Test/App/engine/shader/glsl/square_dot.frag new file mode 100644 index 0000000..8ccd3aa --- /dev/null +++ b/Test/App/engine/shader/glsl/square_dot.frag @@ -0,0 +1,42 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + float tr = UV.y; + float d = abs(mod(UV.x, 3.0) - 1.0); + float range = 1.0 - tr; + vec4 color = Color; + color.a *= (d < range) ? 1.0 : (d < 1.0) ? ((1.0 - d) / tr) : 0.0; + + FragColor = (color + g_colorAdd); +} diff --git a/Test/App/engine/shader/glsl/texture.frag b/Test/App/engine/shader/glsl/texture.frag new file mode 100644 index 0000000..7fbae2d --- /dev/null +++ b/Test/App/engine/shader/glsl/texture.frag @@ -0,0 +1,43 @@ +// Copyright (c) 2008-2022 Ryo Suzuki. +// Copyright (c) 2016-2022 OpenSiv3D Project. +// Licensed under the MIT License. + +# version 410 + +// +// Textures +// +uniform sampler2D Texture0; + +// +// PSInput +// +layout(location = 0) in vec4 Color; +layout(location = 1) in vec2 UV; + +// +// PSOutput +// +layout(location = 0) out vec4 FragColor; + +// +// Constant Buffer +// +layout(std140) uniform PSConstants2D +{ + vec4 g_colorAdd; + vec4 g_sdfParam; + vec4 g_sdfOutlineColor; + vec4 g_sdfShadowColor; + vec4 g_internal; +}; + +// +// Functions +// +void main() +{ + vec4 texColor = texture(Texture0, UV); + + FragColor = ((texColor * Color) + g_colorAdd); +} diff --git a/Test/App/engine/soundfont/GMGSx.sf2.txt b/Test/App/engine/soundfont/GMGSx.sf2.txt new file mode 100644 index 0000000..c02cbd2 --- /dev/null +++ b/Test/App/engine/soundfont/GMGSx.sf2.txt @@ -0,0 +1,3 @@ +GMGSx.sf2 is soundfont created by Kenneth Rundt author of Synthfont. +It is public domain licensed and has similar sound output as gm.dls or Roland gs.sf2. +It can be obtained in Synthfont 2 installation folder. \ No newline at end of file diff --git a/Test/App/engine/soundfont/GMGSx.sf2.zstdcmp b/Test/App/engine/soundfont/GMGSx.sf2.zstdcmp new file mode 100644 index 0000000..aa3991b Binary files /dev/null and b/Test/App/engine/soundfont/GMGSx.sf2.zstdcmp differ diff --git a/Test/App/engine/texture/box-shadow/128.png b/Test/App/engine/texture/box-shadow/128.png new file mode 100644 index 0000000..7ef381c Binary files /dev/null and b/Test/App/engine/texture/box-shadow/128.png differ diff --git a/Test/App/engine/texture/box-shadow/16.png b/Test/App/engine/texture/box-shadow/16.png new file mode 100644 index 0000000..def1c96 Binary files /dev/null and b/Test/App/engine/texture/box-shadow/16.png differ diff --git a/Test/App/engine/texture/box-shadow/256.png b/Test/App/engine/texture/box-shadow/256.png new file mode 100644 index 0000000..81b3508 Binary files /dev/null and b/Test/App/engine/texture/box-shadow/256.png differ diff --git a/Test/App/engine/texture/box-shadow/32.png b/Test/App/engine/texture/box-shadow/32.png new file mode 100644 index 0000000..eea5b2d Binary files /dev/null and b/Test/App/engine/texture/box-shadow/32.png differ diff --git a/Test/App/engine/texture/box-shadow/64.png b/Test/App/engine/texture/box-shadow/64.png new file mode 100644 index 0000000..3676810 Binary files /dev/null and b/Test/App/engine/texture/box-shadow/64.png differ diff --git a/Test/App/engine/texture/box-shadow/8.png b/Test/App/engine/texture/box-shadow/8.png new file mode 100644 index 0000000..8194ab6 Binary files /dev/null and b/Test/App/engine/texture/box-shadow/8.png differ