Cleanup ModFiles

This commit is contained in:
2026-11-07 15:49:22 +01:00
parent f691cd6087
commit a189cf6c7f
264 changed files with 0 additions and 8674 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-168
View File
@@ -1,168 +0,0 @@
# Freelancer: HD Edition
![Freelancer: HD Edition](https://i.imgur.com/3e1H27L.png)
[![GitHub release](https://img.shields.io/github/release/BC46/freelancer-hd-edition.svg)](https://GitHub.com/BC46/freelancer-hd-edition/releases/)
[![Github all releases](https://img.shields.io/github/downloads/BC46/freelancer-hd-edition/total.svg)](https://GitHub.com/BC46/freelancer-hd-edition/releases/)
[![GitHub stars](https://img.shields.io/github/stars/BC46/freelancer-hd-edition?style=social)](https://GitHub.com/BC46/freelancer-hd-edition/stargazers/)
[![Discord](https://img.shields.io/discord/873144025350295612.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/ScqgYuFqmU)
[![Mod DB](https://button.moddb.com/popularity/medium/mods/51151.png)](https://www.moddb.com/mods/freelancer-hd-edition)
Freelancer: HD Edition is a mod that aims to improve every aspect of the game Freelancer (2003) while keeping the look and feel as close to vanilla as possible. Experience enhanced visuals with HD textures, high-quality soundtracks, and seamless gameplay with bug fixes and quality of life improvements. The mod is fully compatible with the original game, allowing for seamless integration into vanilla servers. Easy to install and customize, it revitalizes the beloved Freelancer experience for modern systems.
This mod was made possible with the help of the [Freelancer: Nomad Legacy](https://freelancer2.space/en/) developers. Thanks to them for providing us their station textures.
Join our Discord server to stay up to date with the latest news and information!
[![Support Server](https://img.shields.io/discord/873144025350295612.svg?label=Freelancer:%20HD%20Edition%20Discord&logo=Discord&colorB=7289da&style=for-the-badge)](https://discord.gg/ScqgYuFqmU)
## Key Features
- HD Space Stations
- HD Ships
- HD Planets
- HD Effects
- HD Asteroids
- HD Character Models
- HD Base Interiors & Planetscapes
- HD HUD & Icons
- HD Nebulae
- HD Starspheres
- Maximized Draw Distances
- Anti-Aliasing and Anisotropic Filtering support
- ReShade
- HQ Music
- Windows 10 & 11 compatibility fixes
- Jason's Freelancer Patch
- Full Widescreen support
- Improvements
- New features
- Bug fixes
- flplusplus
- No-CD Patch
- Official 1.1 Patch
- Tons of additional bug fixes
- Additional gameplay improvements
- Easy customization
- Full vanilla Multiplayer support
To learn more about all the changes made in this mod, please refer to the [Changelog](https://github.com/BC46/freelancer-hd-edition/blob/main/CHANGELOG.md).
## Installation instructions
[Visit this link to view the installation instructions.](https://github.com/BC46/freelancer-hd-edition/wiki/Freelancer:-HD-Edition-installation-instructions)
## Recommendations
Due to the large file size of many textures used in this mod, some users may experience significantly longer load times during gameplay. Therefore, it is strongly recommended to install Freelancer: HD Edition on an (M.2) SSD.
For the best vanilla Multiplayer experience with this mod, check out the [Zoner Universe server](https://www.zoneruniverse.com/). Also be sure to have a look at the [Freelancer Universe mod and server](https://discord.com/invite/JY6xAyv8ay) which are both compatible with Freelancer: HD Edition.
## Related projects
- [Freelancer: HD Edition Installer](https://github.com/oliverpechey/Freelancer-hd-edition-install-script)
- Source code for the Inno Setup script which is used to install Freelancer: HD Edition.
- Content that is free to use in other mods or anything else, no questions asked:
- [HD Base Interiors and Planetscapes](https://github.com/BC46/freelancer-hd-base-interiors-and-planetscapes) *([Mod DB](https://www.moddb.com/addons/freelancer-hd-base-interiors-and-planetscapes))*
- [HD Character Models](https://github.com/BC46/freelancer-hd-character-models) *([Mod DB](https://www.moddb.com/addons/freelancer-hd-character-models))*
- [HD Icons and HUD Backgrounds](https://github.com/BC46/freelancer-hd-icons-and-hud-backgrounds) *([Mod DB](https://www.moddb.com/games/freelancer/addons/freelancer-hd-icons-and-hud-backgrounds))*
- [Maximized Draw Distances](https://github.com/BC46/freelancer-maximized-draw-distances) *([Mod DB](https://www.moddb.com/games/freelancer/downloads/freelancer-maximized-draw-distances))*
- [Text Strings Revision](https://github.com/BC46/freelancer-text-strings-revision) *([Mod DB](https://www.moddb.com/games/freelancer/downloads/freelancer-text-strings-revision))*
## Contributing
Have something to contribute to make the mod even better? Feel free to create a pull request or feature request! We are always open to new suggestions and improvements. Making the repository public has allowed us as a community to create the best possible HD mod for Freelancer out there since many modders from around the world have contributed to this project.
## Credits
- [BC46](https://github.com/BC46)
- [HD Base Interiors and Planetscapes](https://www.moddb.com/addons/freelancer-hd-base-interiors-and-planetscapes) *([Mirror](https://github.com/BC46/freelancer-hd-base-interiors-and-planetscapes))*
- [HD Character Models](https://www.moddb.com/addons/freelancer-hd-character-models) *([Mirror](https://github.com/BC46/freelancer-hd-character-models))*
- HD Cockpits
- HD HUD
- HD Nebulae & Fog
- HD Ships
- HD Vanilla Starspheres
- HD System Map
- HD Vanilla Asteroids
- HD Vanilla Planets
- Many general HD and effect additions
- Many misc fixes
- Many misc improvements
- [Maximized Draw Distances](https://www.moddb.com/games/freelancer/downloads/freelancer-maximized-draw-distances) *([Mirror](https://github.com/BC46/freelancer-maximized-draw-distances))*
- [Text Strings Revision](https://www.moddb.com/games/freelancer/downloads/freelancer-text-strings-revision) *([Mirror](https://github.com/BC46/freelancer-text-strings-revision))*
- [BC46](https://github.com/BC46) & [Aingar](https://github.com/Aingar)
- [FLSharp](https://github.com/BC46/FLSharp)
- [Bolte](https://github.com/bolte-io)
- Support
- Testing
- Buck Danny
- [Unofficial FL SP 1.4 patch](https://www.moddb.com/games/freelancer/downloads/freelancer-unofficial-patch-14) *(included in Jason's Freelancer Patch)*
- [CallumDev](https://github.com/CallumDev)
- [flplusplus](https://github.com/CallumDev/flplusplus)
- [crosire](https://github.com/crosire) et al.
- [ReShade](https://github.com/crosire/reshade)
- [Daniel Stenberg](https://github.com/bagder) et al.
- [curl](https://github.com/curl/curl)
- Dege
- [dgVoodoo2](http://dege.freeweb.hu/dgVoodoo2/dgVoodoo2/)
- [dmutlu](https://github.com/dmutlu)
- [FL Save Convert](https://github.com/dmutlu/fl_convert)
- [DragonFire](https://github.com/Drakohen)
- Player engine trails and fixes
- HQ Music compression
- Support
- Testing
- [Elisha Riedlinger](https://github.com/elishacloud) et al.
- [DxWrapper](https://github.com/elishacloud/dxwrapper)
- Freestalker.fl
- [FLHQmusics Remaster](https://www.moddb.com/games/freelancer/addons/flhqmusics-remaster-read-description)
- [HD Asteroid Textures](https://www.moddb.com/games/freelancer/addons/hd-asteroid-textures-for-freelancer)
- New commodity icon
- DAVENAT0R
- [Flat Interface](https://www.moddb.com/games/freelancer/addons/freelancer-flat-interface)
- [Flat UI Icons V2](https://www.moddb.com/games/freelancer/addons/flat-ui-icons-v2)
- [HD Universe map](https://www.moddb.com/games/freelancer/news/freelancer-hd-starsphere-pack)
- [New interface](http://www.mediafire.com/download/4qluqu7564lztvs/New+interface.rar)
- [Jason Hood](https://github.com/adoxa)
- [Call Sign plugin](http://adoxa.altervista.org/freelancer/plugins.html#callsign)
- [Console plugin](http://adoxa.altervista.org/freelancer/plugins.html#console)
- [HUDless plugin](http://adoxa.altervista.org/freelancer/plugins.html#hudless)
- [HUD Shift plugin](http://adoxa.altervista.org/freelancer/plugins.html#hudshift)
- [Jason's Freelancer Patch v1.25](http://adoxa.altervista.org/freelancer/index.html)
- [MP Rep plugin](http://adoxa.altervista.org/freelancer/plugins.html#mprep)
- [MP3 Codec Fix](http://adoxa.altervista.org/freelancer/plugins.html#mp3codec)
- [Numeric Damage plugin](http://adoxa.altervista.org/freelancer/plugins.html#numeric)
- [Ranks plugin](http://adoxa.altervista.org/freelancer/plugins.html#ranks)
- [Story Factions plugin](http://adoxa.altervista.org/freelancer/plugins.html#storyfactions)
- [Territory plugin](http://adoxa.altervista.org/freelancer/plugins.html#territory)
- [Turret Zoom plugin](http://adoxa.altervista.org/freelancer/plugins.html#turretzoom)
- [Wheel Scroll plugin](http://adoxa.altervista.org/freelancer/plugins.html#wheelscroll)
- [Zone plugin](http://adoxa.altervista.org/freelancer/plugins.html#zone)
- Support
- Jean-loup Gailly & [Mark Adler](https://github.com/madler) et al.
- [zlib-ng](https://github.com/zlib-ng/zlib-ng)
- [Jeider](https://github.com/Jeider), RenderG & Whiskas T-Mech
- [Freelancer Advanced Widescreen HUD](https://www.moddb.com/mods/freelacer-advanced-widescreen-hud)
- [HD Station textures from Freelancer: The Nomad Legacy](https://www.moddb.com/mods/freelancer-nomad-legacy)
- [Laz](https://github.com/Lazrius), [Jason Hood](https://github.com/adoxa) & [BC46](https://github.com/BC46)
- [Windowed Mode Mouse Fix](https://github.com/FLHDE/windowed-mode-mouse-fix)
- Louva-Deus
- [Freelancer SDK/QuickFix](https://swat-portal.com/forum/filebase/file/619-freelancer-quickfix-1-0c/) *(included in Jason's Freelancer Patch)*
- M0tah
- [DelayDisplay plugin](https://forge.the-starport.net/projects/delaydisplay)
- [MultiIntro plugin](https://github.com/BC46/MultiIntro-Updated)
- [Microsoft](https://github.com/microsoft)
- [Freelancer Patch 1.1](https://www.moddb.com/games/freelancer/downloads/freelancer-patch-11)
- [Raikkonen](https://github.com/oliverpechey), [Keenan Weaver](https://github.com/keenanweaver) & [BC46](https://github.com/BC46)
- [Installation script](https://github.com/oliverpechey/Freelancer-hd-edition-install-script)
- Support
- Testing
- [Ruppetus](https://github.com/IrateRedKite)
- [Planetscapes Fixed for 16:9 Resolutions](https://www.moddb.com/games/freelancer/addons/planetscapes-fixed-for-169-resolutions)
- Many other .thn fixes
- [Skotty](https://github.com/erikroe)
- Additional text fixes
- Bug fixes
- [Thaddeus](https://github.com/thaddeus-ex)
- Fixed models
- w0dk4
- [Freelancer Global Server Workaround v1.0](https://www.moddb.com/games/freelancer/downloads/freelancer-global-server-workaround-v10)
- [Why485](https://github.com/brihernandez)
- [The Big Huge Effects Pack](https://the-starport.net/freelancer/forum/viewtopic.php?topic_id=1317)
- [XxSARGExX](https://github.com/XxSARGExX)
- Civilian engine effects
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

@@ -1,45 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Window" skin="WindowCS" position="0 0 295 420" align="Center" layer="Overlapped" name="WindowDeveloperOptions">
<Property key="Visible" value="true"/>
<Property key="Enabled" value="true"/>
<Property key="Caption" value="Developer Options"/>
<Widget type="ScrollView" skin="ScrollViewEmpty" position="0 0 285 375" align="Stretch">
<Property key="CanvasAlign" value="Left Top"/>
<Property key="CanvasSize" value="275 375"/>
<Widget type="Button" skin="Button" position="20 10 155 35" name="ButtonEditDefaultMat">
<Property key="Caption" value="Edit Default Material"/>
</Widget>
<Widget type="Button" skin="Button" position="20 100 180 35" name="ButtonPickMaterial">
<Property key="Caption" value="Pick Material for Editing"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="20 50 230 20">
<Property key="Caption" value="Note: Picking only works in space!"/>
</Widget>
<Widget type="Button" skin="Button" position="20 140 155 35" name="ButtonReloadTextures">
<Property key="Caption" value="Reload Textures"/>
</Widget>
<Widget type="Button" skin="Button" position="20 180 155 35" name="ButtonReloadMaterials">
<Property key="Caption" value="Reload Materials"/>
</Widget>
<Widget type="Button" skin="Button" position="20 220 155 35" name="ButtonReloadShader">
<Property key="Caption" value="Reload Shader"/>
</Widget>
<Widget type="Button" skin="Button" position="20 340 140 35" name="ButtonSaveMaterials">
<Property key="Caption" value="Save Materials"/>
</Widget>
<Widget type="EditBox" skin="TextBox" position="20 300 245 35" name="EditboxSaveMaterials">
<Property key="MultiLine" value="true"/>
<Property key="WordWrap" value="true"/>
<Property key="ReadOnly" value="true"/>
</Widget>
<Widget type="Button" skin="Button" position="20 260 155 35" name="ButtonReloadModSettings">
<Property key="Caption" value="Reload Mod Settings"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="20 75 230 20" name="CheckBoxPickTransparentObjects">
<Property key="Caption" value="Pick Transparent Objects"/>
</Widget>
</Widget>
</Widget>
<CodeGeneratorSettings/>
</MyGUI>
-91
View File
@@ -1,91 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Window" skin="WindowCS" position="0 0 440 315" layer="Overlapped" name="WindowEditMaterial">
<Property key="Visible" value="false"/>
<Property key="Enabled" value="true"/>
<Property key="Caption" value="Edit Material"/>
<Widget type="ScrollView" skin="ScrollViewEmpty" position="0 0 430 280" align="Stretch">
<Property key="CanvasSize" value="430 280"/>
<Property key="CanvasAlign" value="Left Top"/>
<Widget type="Button" skin="Button" position="-40 -85 110 45"/>
<Widget type="TextBox" skin="TextBox" position="15 10 105 20">
<Property key="Caption" value="Texture Name:"/>
</Widget>
<Widget type="EditBox" skin="EditBox" position="120 10 280 40" name="EditBoxTextureName">
<Property key="MultiLine" value="true"/>
<Property key="ReadOnly" value="true"/>
<Property key="WordWrap" value="true"/>
</Widget>
<Widget type="Widget" skin="PanelEmpty" position="10 55 415 55">
<Widget type="ScrollBar" skin="SliderH" position="105 30 270 20" name="SliderRoughness">
<Property key="MoveToClick" value="true"/>
<Property key="Range" value="101"/>
<Property key="Page" value="1"/>
<Property key="RangePosition" value="1"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="5 5 80 20">
<Property key="Caption" value="Roughness:"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="90 30 10 20">
<Property key="Caption" value="0"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="380 30 15 20">
<Property key="Caption" value="1"/>
</Widget>
<Widget type="EditBox" skin="EditBox" position="220 5 45 20" name="EditBoxRoughness">
<Property key="WordWrap" value="false"/>
<Property key="MultiLine" value="false"/>
<Property key="ReadOnly" value="false"/>
</Widget>
</Widget>
<Widget type="Widget" skin="PanelEmpty" position="10 115 415 55">
<Widget type="ScrollBar" skin="SliderH" position="105 30 270 20" name="SliderMetalness">
<Property key="MoveToClick" value="true"/>
<Property key="Range" value="101"/>
<Property key="Page" value="1"/>
<Property key="RangePosition" value="1"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="5 5 80 20">
<Property key="Caption" value="Metalness:"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="90 30 10 20">
<Property key="Caption" value="0"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="380 30 15 20">
<Property key="Caption" value="1"/>
</Widget>
<Widget type="EditBox" skin="EditBox" position="220 5 45 20" name="EditBoxMetalness">
<Property key="WordWrap" value="false"/>
<Property key="MultiLine" value="false"/>
<Property key="ReadOnly" value="false"/>
</Widget>
</Widget>
<Widget type="Widget" skin="PanelEmpty" position="10 175 415 55">
<Widget type="ScrollBar" skin="SliderH" position="105 30 270 20" name="SliderRoughnessTextureBias">
<Property key="MoveToClick" value="true"/>
<Property key="Range" value="201"/>
<Property key="Page" value="1"/>
<Property key="RangePosition" value="1"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="5 5 165 20">
<Property key="Caption" value="Roughness Texture Bias:"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="90 30 15 20">
<Property key="Caption" value="-1"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="380 30 15 20">
<Property key="Caption" value="1"/>
</Widget>
<Widget type="EditBox" skin="EditBox" position="220 5 45 20" name="EditBoxRoughnessTextureBias">
<Property key="WordWrap" value="false"/>
<Property key="MultiLine" value="false"/>
<Property key="ReadOnly" value="false"/>
</Widget>
</Widget>
<Widget type="Button" skin="Button" position="165 240 120 35" name="ButtonResetCurrentMaterial">
<Property key="Caption" value="Reset"/>
</Widget>
</Widget>
</Widget>
<CodeGeneratorSettings/>
</MyGUI>
@@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceImageSet" name="MultiListButtonImage">
<Group name="Icons" texture="MyGUI_BlackBlueSkins.png" size="12 10">
<Index name="None">
<Frame point="74 185"/>
</Index>
<Index name="Up">
<Frame point="74 198"/>
</Index>
<Index name="Down">
<Frame point="74 211"/>
</Index>
</Group>
</Resource>
</MyGUI>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

File diff suppressed because it is too large Load Diff
@@ -1,491 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource">
<Resource type="ResourceLayout" name="CheckBox" version="3.2.0">
<Widget type="Widget" skin="CheckBoxSkin" position="20 20 23 21" name="Root">
<Property key="TextAlign" value="Default"/>
<Property key="FontName" value="Default"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="RadioButton" version="3.2.0">
<Widget type="Widget" skin="RadioButtonSkin" position="20 20 21 20" name="Root">
<Property key="TextAlign" value="Default"/>
<Property key="FontName" value="Default"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ScrollBarH" version="3.2.0">
<Widget type="Widget" skin="ScrollPanelHSkin" position="25 50 125 15" name="Root">
<Property key="VerticalAlignment" value="false"/>
<UserString key="LE_TargetWidgetType" value="ScrollBar"/>
<Widget type="Widget" skin="PanelEmpty" position="14 0 98 15" align="Stretch" name="TrackPlace">
<Property key="NeedKey" value="false"/>
<Property key="InheritsPick" value="true"/>
<Widget type="Button" skin="ScrollTrackHSkin" position="35 1 19 14" align="Left VStretch" name="Track">
<UserString key="MinTrackSize" value="10"/>
</Widget>
<Widget type="Widget" skin="PanelEmpty" position="0 0 35 15" align="Left VStretch" name="FirstPart"/>
<Widget type="Widget" skin="PanelEmpty" position="54 0 44 15" align="Left VStretch" name="SecondPart"/>
</Widget>
<Widget type="Button" skin="ButtonLeftSkin" position="2 1 12 14" align="Left VCenter" name="Start"/>
<Widget type="Button" skin="ButtonRightSkin" position="112 1 12 14" align="Right VCenter" name="End"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ScrollBarV" version="3.2.0">
<Widget type="Widget" skin="ScrollPanelVSkin" position="25 50 15 125" name="Root">
<Property key="VerticalAlignment" value="true"/>
<UserString key="LE_TargetWidgetType" value="ScrollBar"/>
<Widget type="Widget" skin="PanelEmpty" position="0 14 15 99" align="Stretch" name="TrackPlace">
<Property key="NeedKey" value="false"/>
<Property key="InheritsPick" value="true"/>
<Widget type="Button" skin="ScrollTrackVSkin" position="1 25 14 19" align="HStretch Top" name="Track">
<UserString key="MinTrackSize" value="10"/>
</Widget>
<Widget type="Widget" skin="PanelEmpty" position="0 0 15 25" align="HStretch Top" name="FirstPart"/>
<Widget type="Widget" skin="PanelEmpty" position="0 44 15 55" align="HStretch Top" name="SecondPart"/>
</Widget>
<Widget type="Button" skin="ButtonUpSkin" position="1 2 14 11" align="HCenter Top" name="Start"/>
<Widget type="Button" skin="ButtonDownSkin" position="1 113 14 11" align="HCenter Bottom" name="End"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="SliderH" version="3.2.0">
<Widget type="Widget" skin="ScrollPanelHSkin" position="25 50 125 15" name="Root">
<Property key="MoveToClick" value="true"/>
<Property key="VerticalAlignment" value="false"/>
<UserString key="LE_TargetWidgetType" value="ScrollBar"/>
<Widget type="Widget" skin="PanelEmpty" position="2 0 122 15" align="Stretch" name="TrackPlace">
<Property key="NeedKey" value="false"/>
<Property key="InheritsPick" value="true"/>
<Widget type="Button" skin="SliderTrackHSkin" position="35 1 7 14" align="Left VStretch" name="Track"/>
<Widget type="Widget" skin="PanelEmpty" position="0 0 35 15" align="Left VStretch" name="FirstPart"/>
<Widget type="Widget" skin="PanelEmpty" position="42 0 80 15" align="Left VStretch" name="SecondPart"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="SliderV" version="3.2.0">
<Widget type="Widget" skin="ScrollPanelVSkin" position="20 20 15 125" name="Root">
<Property key="MoveToClick" value="true"/>
<Property key="VerticalAlignment" value="true"/>
<UserString key="LE_TargetWidgetType" value="ScrollBar"/>
<Widget type="Widget" skin="PanelEmpty" position="0 2 15 122" align="Stretch">
<Widget type="Button" skin="SliderTrackVSkin" position="1 25 14 7" align="HStretch Top" name="Track"/>
<Widget type="Widget" skin="PanelEmpty" position="0 0 15 25" align="HStretch Top" name="FirstPart"/>
<Widget type="Widget" skin="PanelEmpty" position="0 32 15 90" align="HStretch Top" name="SecondPart"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="SliderHEmpty" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="25 50 125 15" name="Root">
<Property key="MoveToClick" value="true"/>
<Property key="VerticalAlignment" value="false"/>
<UserString key="LE_TargetWidgetType" value="ScrollBar"/>
<Widget type="Widget" skin="PanelEmpty" position="2 0 122 15" align="Stretch" name="TrackPlace">
<Property key="NeedKey" value="false"/>
<Property key="InheritsPick" value="true"/>
<Widget type="Button" skin="SliderTrackHSkin" position="35 1 7 14" align="Left VStretch" name="Track"/>
<Widget type="Widget" skin="PanelEmpty" position="0 0 35 15" align="Left VStretch" name="FirstPart"/>
<Widget type="Widget" skin="PanelEmpty" position="42 0 80 15" align="Left VStretch" name="SecondPart"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="SliderVEmpty" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="20 20 15 125" name="Root">
<Property key="MoveToClick" value="true"/>
<Property key="VerticalAlignment" value="true"/>
<UserString key="LE_TargetWidgetType" value="ScrollBar"/>
<Widget type="Widget" skin="PanelEmpty" position="0 2 15 122" align="Stretch">
<Widget type="Button" skin="SliderTrackVSkin" position="1 25 14 7" align="HStretch Top" name="Track"/>
<Widget type="Widget" skin="PanelEmpty" position="0 0 15 25" align="HStretch Top" name="FirstPart"/>
<Widget type="Widget" skin="PanelEmpty" position="0 32 15 90" align="HStretch Top" name="SecondPart"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="Button" version="3.2.0">
<Widget type="Widget" skin="ButtonSkin" position="20 25 29 26" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ButtonImage" version="3.2.0">
<Widget type="Widget" skin="ButtonEmptySkin" position="20 20 16 16" name="Root">
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
<Widget type="ImageBox" skin="ImageBox" position="0 0 16 16" align="Stretch" name="Image">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="TextBox" version="3.2.0">
<Widget type="Widget" skin="TextBoxSkin" position="20 20 16 16" name="Root">
<Property key="TextAlign" value="Default"/>
<Property key="FontName" value="Default"/>
<Property key="TextColour" value="1 1 1"/>
<UserString key="LE_TargetWidgetType" value="TextBox"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="EditBox" version="3.2.0">
<Widget type="Widget" skin="EditBoxSkin" position="65 10 29 26" name="Root">
<UserString key="LE_TargetWidgetType" value="EditBox"/>
<Widget type="TextBox" skin="EditClientSkin" position="2 2 23 20" align="Stretch" name="Client">
<Property key="TextAlign" value="Left VCenter"/>
<Property key="FontName" value="Default"/>
<Property key="TextColour" value="1 1 1"/>
<Property key="Pointer" value="beam"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="EditBoxStretch" version="3.2.0">
<Widget type="Widget" skin="EditBoxSkin" position="25 10 55 55" name="Root">
<Property key="MultiLine" value="true"/>
<UserString key="LE_TargetWidgetType" value="EditBox"/>
<Widget type="TextBox" skin="EditClientSkin" position="2 3 33 32" align="Stretch" name="Client">
<Property key="TextAlign" value="Default"/>
<Property key="TextColour" value="1 1 1"/>
<Property key="FontName" value="Default"/>
<Property key="Pointer" value="beam"/>
</Widget>
<Widget type="ScrollBar" skin="ScrollBarH" position="2 36 34 15" align="HStretch Bottom" name="HScroll"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="36 2 15 34" align="Right VStretch" name="VScroll"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="EditBoxEmpty" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="65 10 16 16" name="Root">
<UserString key="LE_TargetWidgetType" value="EditBox"/>
<Widget type="TextBox" skin="EditClientSkin" position="0 0 16 16" align="Stretch" name="Client">
<Property key="TextAlign" value="Default"/>
<Property key="FontName" value="Default"/>
<Property key="TextColour" value="1 1 1"/>
<Property key="Pointer" value="beam"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="WordWrapEmpty" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="65 10 16 16" name="Root">
<Property key="WordWrap" value="true"/>
<Property key="Static" value="true"/>
<Property key="MultiLine" value="true"/>
<UserString key="LE_TargetWidgetType" value="EditBox"/>
<Widget type="TextBox" skin="EditClientSkin" position="0 0 16 16" align="Stretch" name="Client">
<Property key="TextAlign" value="Default"/>
<Property key="FontName" value="Default"/>
<Property key="TextColour" value="1 1 1"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ComboBox" version="3.2.0">
<Widget type="Widget" skin="EditBoxSkin" position="65 10 100 26" name="Root">
<Property key="MaxListLength" value="200"/>
<Property key="SmoothShow" value="true"/>
<UserString key="LE_TargetWidgetType" value="ComboBox"/>
<Widget type="TextBox" skin="EditClientSkin" position="2 2 75 20" align="Stretch" name="Client">
<Property key="TextAlign" value="Left VCenter"/>
<Property key="TextColour" value="1 1 1"/>
<Property key="FontName" value="Default"/>
<Property key="Pointer" value="beam"/>
</Widget>
<Widget type="ListBox" skin="ListBox" position="65 38 100 200" style="Popup" layer="Popup" name="List">
<Property key="Visible" value="false"/>
</Widget>
<Widget type="Button" skin="ButtonDownSkin" position="79 7 14 11" align="Right VCenter" name="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="Window" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="15 10 68 49" name="Root">
<Property key="Snap" value="true"/>
<Property key="Movable" value="false"/>
<UserString key="LE_TargetWidgetType" value="Window"/>
<Widget type="Widget" skin="CaptionEmptySkin" position="0 0 68 28" align="HStretch Top">
<Widget type="TextBox" skin="TextBox" position="2 3 62 24" align="HStretch Top" name="Caption">
<Property key="TextColour" value="0 0 0"/>
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
</Widget>
</Widget>
<Widget type="Widget" skin="WindowFrameSkin" position="0 28 68 20" align="Stretch">
<Widget type="Widget" skin="ClientTileSkin" position="4 2 58 12" align="Stretch" name="Client"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="WindowC" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="15 10 68 49" name="Root">
<Property key="Snap" value="true"/>
<UserString key="LE_TargetWidgetType" value="Window"/>
<Widget type="Widget" skin="CaptionSkin" position="0 0 68 28" align="HStretch Top">
<Widget type="TextBox" skin="TextBox" position="7 1 52 22" align="HStretch Top" name="Caption">
<Property key="TextColour" value="1 1 1"/>
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
</Widget>
</Widget>
<Widget type="Widget" skin="WindowFrameSkin" position="0 28 68 20" align="Stretch">
<Widget type="Widget" skin="ClientTileSkin" position="4 2 58 12" align="Stretch" name="Client"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="WindowCS" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="15 10 68 49" name="Root">
<Property key="Snap" value="true"/>
<UserString key="LE_TargetWidgetType" value="Window"/>
<Widget type="Widget" skin="CaptionSkin" position="0 0 68 28" align="HStretch Top">
<Widget type="TextBox" skin="TextBox" position="7 1 52 22" align="HStretch Top" name="Caption">
<Property key="TextColour" value="1 1 1"/>
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
</Widget>
</Widget>
<Widget type="Widget" skin="WindowFrameSkin" position="0 28 68 20" align="Stretch">
<Widget type="Widget" skin="ClientTileSkin" position="4 2 58 12" align="Stretch" name="Client"/>
<Widget type="Button" skin="WindowResizeRightDownSkin" position="57 9 9 9" align="Right Bottom" name="ResizeRightBottom">
<Property key="Pointer" value="size_left"/>
</Widget>
<Widget type="Button" skin="WindowResizeLeftDownSkin" position="0 9 9 9" align="Left Bottom" name="ResizeLeftBottom">
<Property key="Pointer" value="size_right"/>
</Widget>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="WindowCX" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="15 10 68 49" name="Root">
<Property key="Snap" value="true"/>
<UserString key="LE_TargetWidgetType" value="Window"/>
<Widget type="Widget" skin="WindowFrameSkin" position="0 28 68 20" align="Stretch">
<Widget type="Widget" skin="ClientTileSkin" position="4 2 58 12" align="Stretch" name="Client"/>
</Widget>
<Widget type="Widget" skin="CaptionWithButtonSkin" position="0 0 68 28" align="HStretch Top">
<Widget type="Button" skin="ButtonCloseSkin" position="44 6 18 17" align="Right Top" name="Button">
<UserString key="Event" value="close"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="7 1 29 22" align="HStretch Top" name="Caption">
<Property key="TextColour" value="1 1 1"/>
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
</Widget>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="WindowCSX" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="15 10 68 49" name="Root">
<Property key="Snap" value="true"/>
<UserString key="LE_TargetWidgetType" value="Window"/>
<Widget type="Widget" skin="WindowFrameSkin" position="0 28 68 20" align="Stretch">
<Widget type="Widget" skin="ClientTileSkin" position="4 2 58 12" align="Stretch" name="Client"/>
<Widget type="Button" skin="WindowResizeRightDownSkin" position="57 9 9 9" align="Right Bottom" name="ResizeRightBottom">
<Property key="Pointer" value="size_left"/>
</Widget>
<Widget type="Button" skin="WindowResizeLeftDownSkin" position="0 9 9 9" align="Left Bottom" name="ResizeLeftBottom">
<Property key="Pointer" value="size_right"/>
</Widget>
</Widget>
<Widget type="Widget" skin="CaptionWithButtonSkin" position="0 0 68 28" align="HStretch Top">
<Widget type="Button" skin="ButtonCloseSkin" position="44 6 18 17" align="Right Top" name="Button">
<UserString key="Event" value="close"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="7 1 29 22" align="HStretch Top" name="Caption">
<Property key="TextColour" value="1 1 1"/>
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="Default"/>
</Widget>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="MenuBar" version="3.2.0">
<Widget type="Widget" skin="MenuBarSkin" position="5 5 29 26" name="Root">
<Property key="VerticalAlignment" value="false"/>
<UserString key="LE_TargetWidgetType" value="MenuBar"/>
<UserString key="DistanceButton" value="6"/>
<UserString key="SubMenuLayer" value="Popup"/>
<UserString key="NormalSkin" value="MenuBarButton"/>
<UserString key="PopupSkin" value="MenuBarButton"/>
<UserString key="SeparatorSkin" value="MenuBarSeparator"/>
<UserString key="SubMenuSkin" value="PopupMenu"/>
<Widget type="Widget" skin="PanelEmpty" position="2 2 25 20" align="Stretch" name="Client"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="MenuBarButton" version="3.2.0">
<Widget type="Widget" skin="MenuItemSkin" position="20 25 25 20" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="MenuBarSeparator" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="20 20 10 10" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>
<UserString key="MinSize" value="10 10"/>
<Widget type="Widget" skin="SepDownVSkin" position="4 2 2 6" align="HCenter VStretch"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="PopupMenu" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="5 5 29 26" name="Root">
<Property key="VerticalAlignment" value="true"/>
<UserString key="SubMenuLayer" value="Popup"/>
<UserString key="SubMenuSkin" value="PopupMenu"/>
<UserString key="LE_TargetWidgetType" value="PopupMenu"/>
<UserString key="SeparatorSkin" value="PopupMenuSeparator"/>
<UserString key="NormalSkin" value="PopupMenuNormal"/>
<UserString key="PopupSkin" value="PopupMenuPopup"/>
<Widget type="Widget" skin="PanelEmpty" position="3 4 21 16" align="Stretch" name="Client"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="PopupMenuSeparator" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="20 20 10 10" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>
<UserString key="MinSize" value="10 10"/>
<Widget type="Widget" skin="SepDownHSkin" position="2 4 6 2" align="HStretch VCenter"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="PopupMenuNormal" version="3.2.0">
<Widget type="Widget" skin="MenuItemNormalSkin" position="20 25 43 14" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Left VCenter"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
<Widget type="Widget" skin="MenuItemCheckButtonSkin" position="1 0 15 13" align="Left VCenter" name="Check"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="PopupMenuPopup" version="3.2.0">
<Widget type="Widget" skin="MenuItemNormalSkin" position="20 25 43 14" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Left VCenter"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
<Widget type="Widget" skin="MenuItemPopupButtonSkin" position="31 1 10 12" align="Right VCenter">
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ProgressBar" version="3.2.0">
<Widget type="Widget" skin="ScrollPanelHSkin" position="25 50 125 15" name="Root">
<Property key="MoveToClick" value="true"/>
<UserString key="LE_TargetWidgetType" value="ProgressBar"/>
<UserString key="TrackWidth" value="7"/>
<UserString key="TrackFill" value="false"/>
<UserString key="TrackSkin" value="SliderTrackHSkin"/>
<Widget type="Widget" skin="PanelEmpty" position="2 1 122 14" align="Stretch" name="TrackPlace">
<Property key="NeedKey" value="false"/>
<Property key="InheritsPick" value="true"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ProgressBarFill" version="3.2.0">
<Widget type="Widget" skin="ScrollPanelHSkin" position="25 50 125 15" name="Root">
<Property key="MoveToClick" value="true"/>
<UserString key="LE_TargetWidgetType" value="ProgressBar"/>
<UserString key="TrackFill" value="true"/>
<UserString key="TrackSkin" value="ProgressBarTrackHSkin"/>
<UserString key="TrackWidth" value="6"/>
<Widget type="Widget" skin="PanelEmpty" position="2 1 122 14" align="Stretch" name="TrackPlace">
<Property key="NeedKey" value="false"/>
<Property key="InheritsPick" value="true"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ListBoxItem" version="3.2.0">
<Widget type="Widget" skin="ListBoxItemSkin" position="20 20 43 13" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Left VCenter"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ListBox" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="5 5 55 55" name="Root">
<UserString key="LE_TargetWidgetType" value="ListBox"/>
<UserString key="HeightLine" value="21"/>
<UserString key="SkinLine" value="ListBoxItem"/>
<Widget type="Widget" skin="PanelEmpty" position="3 3 32 47" align="Stretch" name="Client"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="35 3 15 47" align="Right VStretch" name="VScroll"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ItemBox" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="5 5 55 55" name="Root">
<UserString key="LE_TargetWidgetType" value="ItemBox"/>
<UserString key="DragLayer" value="DragAndDrop"/>
<Widget type="Widget" skin="PanelEmpty" position="3 3 32 32" align="Stretch" name="Client"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="35 3 15 32" align="Right VStretch" name="VScroll"/>
<Widget type="ScrollBar" skin="ScrollBarH" position="3 35 32 15" align="HStretch Bottom" name="HScroll"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ItemBoxEmpty" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="7 7 48 48" name="Root">
<UserString key="LE_TargetWidgetType" value="ItemBox"/>
<UserString key="DragLayer" value="DragAndDrop"/>
<Widget type="Widget" skin="PanelEmpty" position="1 1 32 32" align="Stretch" name="Client"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="33 1 15 32" align="Right VStretch" name="VScroll"/>
<Widget type="ScrollBar" skin="ScrollBarH" position="1 33 32 15" align="HStretch Bottom" name="HScroll"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ScrollView" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="5 5 55 55" name="Root">
<UserString key="LE_TargetWidgetType" value="ScrollView"/>
<Widget type="Widget" skin="PanelEmpty" position="3 3 32 32" align="Stretch" name="Client"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="35 3 15 32" align="Right VStretch" name="VScroll"/>
<Widget type="ScrollBar" skin="ScrollBarH" position="3 35 32 15" align="HStretch Bottom" name="HScroll"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="ScrollViewEmpty" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="8 8 47 47" name="Root">
<UserString key="LE_TargetWidgetType" value="ScrollView"/>
<Widget type="Widget" skin="PanelEmpty" position="0 0 32 32" align="Stretch" name="Client"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="32 0 15 32" align="Right VStretch" name="VScroll"/>
<Widget type="ScrollBar" skin="ScrollBarH" position="0 32 32 15" align="HStretch Bottom" name="HScroll"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="TabHeaderButton" version="3.2.0">
<Widget type="Widget" skin="TabHeaderButtonSkin" position="20 25 52 23" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="TabControl" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="5 5 89 60" name="Root">
<UserString key="LE_TargetWidgetType" value="TabControl"/>
<UserString key="ButtonSkin" value="TabHeaderButton"/>
<Widget type="Widget" skin="TabPanelSkin" position="0 21 89 39" align="Stretch">
<Widget type="Widget" skin="PanelEmpty" position="2 3 83 32" align="Stretch" name="TabItem"/>
</Widget>
<Widget type="Widget" skin="PanelEmpty" position="7 0 78 23" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="TabHeaderEmptySkin" position="52 0 26 23" name="Controls">
<Widget type="Button" skin="ButtonRightSkin" position="14 4 12 14" name="Right"/>
<Widget type="Button" skin="ButtonLeftSkin" position="1 4 12 14" name="Left"/>
</Widget>
<Widget type="Widget" skin="TabHeaderEmptySkin" position="0 0 52 23" name="Empty"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="MultiListBox" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="5 5 55 55" name="Root">
<UserString key="LE_TargetWidgetType" value="MultiListBox"/>
<UserString key="SkinButton" value="MultiListButton"/>
<UserString key="SkinList" value="MultiSubListBox"/>
<Widget type="Widget" skin="PanelEmpty" position="3 24 47 26" align="Stretch" name="Client"/>
<Widget type="Widget" skin="PanelEmpty" position="3 3 47 21" align="HStretch Top" name="HeaderPlace">
<Widget type="Widget" skin="MultiListButtonSkin" position="0 0 47 21" name="Empty"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="MultiListButton" version="3.2.0">
<Widget type="Widget" skin="MultiListButtonSkin" position="20 25 45 21" name="Root">
<Property key="FontName" value="Default"/>
<Property key="TextAlign" value="Center"/>
<UserString key="LE_TargetWidgetType" value="Button"/>
<Widget type="ImageBox" skin="ImageBox" position="29 4 12 10" align="Right VCenter" name="Image">
<Property key="ImageResource" value="MultiListButtonImage"/>
<Property key="ImageGroup" value="Icons"/>
<Property key="ImageName" value="Down"/>
<Property key="NeedMouse" value="false"/>
</Widget>
</Widget>
</Resource>
<Resource type="ResourceLayout" name="MultiSubListBox" version="3.2.0">
<Widget type="Widget" skin="PanelEmpty" position="8 8 47 47" name="Root">
<UserString key="LE_TargetWidgetType" value="ListBox"/>
<UserString key="HeightLine" value="21"/>
<UserString key="SkinLine" value="ListBoxItem"/>
<Widget type="Widget" skin="PanelEmpty" position="0 0 32 47" align="Stretch" name="Client"/>
<Widget type="ScrollBar" skin="ScrollBarV" position="32 0 15 47" align="Right VStretch" name="VScroll"/>
</Widget>
</Resource>
</MyGUI>
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="List">
<List file="MyGUI_BlackBlueImages.xml"/>
<List file="MyGUI_BlackBlueSkins.xml"/>
<List file="MyGUI_BlackBlueTemplates.xml"/>
</MyGUI>
@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceSkin" name="PanelEmpty" size="16 16"/>
<Resource type="ResourceSkin" name="RotatingSkin" size="16 16">
<BasisSkin type="RotatingSkin" offset="0 0 16 16" align="Stretch"/>
</Resource>
<Resource type="ResourceSkin" name="TextBoxSkin" size="16 16">
<BasisSkin type="SimpleText" offset="0 0 16 16" align="Stretch"/>
</Resource>
<Resource type="ResourceSkin" name="ImageBox" size="16 16">
<BasisSkin type="MainSkin" offset="0 0 16 16"/>
</Resource>
<Resource type="ResourceSkin" name="Canvas" size="16 16">
<BasisSkin type="MainSkin" offset="0 0 16 16"/>
</Resource>
<Resource type="ResourceSkin" name="EditClientSkin" size="16 16">
<BasisSkin type="EditText" offset="0 0 16 16" align="Stretch"/>
</Resource>
</MyGUI>
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="List">
<List file="MyGUI_GeneratedFonts.xml"/>
<List file="MyGUI_Fonts.xml"/>
<List file="MyGUI_CommonSkins.xml"/>
<List file="MyGUI_BlackBlueTheme.xml"/>
<List file="MyGUI_PointerImages.xml"/>
<List file="MyGUI_Pointers.xml"/>
<List file="MyGUI_Layers.xml"/>
<List file="MyGUI_Settings.xml"/>
</MyGUI>
-18
View File
@@ -1,18 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceTrueTypeFont" name="DejaVuSansFont_15">
<Property key="Source" value="DejaVuSans.ttf"/>
<Property key="Size" value="10"/>
<Property key="Hinting" value="use_native"/>
<Property key="Resolution" value="96"/>
<Property key="Antialias" value="false"/>
<Property key="TabWidth" value="8"/>
<Property key="OffsetHeight" value="0"/>
<Property key="SubstituteCode" value="0"/>
<Codes>
<Code range="32 126"/>
<Code range="1025 1105"/>
<Code range="8470 8470"/>
</Codes>
</Resource>
</MyGUI>
@@ -1,191 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceManualFont" name="DejaVuSansFontGenerated_15">
<Property key="Source" value="DejaVuSansFontGenerated_15.png"/>
<Property key="DefaultHeight" value="17"/>
<Codes>
<Code index="9" advance="8"/>
<Code index="32" bearing="0 13" advance="4"/>
<Code index="33" coord="112 16 1 9" bearing="2 4" advance="3"/>
<Code index="34" coord="21 0 3 4" bearing="1 4" advance="4"/>
<Code index="35" coord="49 76 9 10" bearing="1 3" advance="10"/>
<Code index="36" coord="8 88 8 11" bearing="1 4" advance="7"/>
<Code index="37" coord="114 16 11 9" bearing="0 4" advance="12"/>
<Code index="38" coord="0 26 9 9" bearing="1 4" advance="10"/>
<Code index="39" coord="25 0 1 4" bearing="1 4" advance="2"/>
<Code index="40" coord="13 100 3 12" bearing="1 2" advance="4"/>
<Code index="41" coord="17 100 3 12" bearing="1 2" advance="4"/>
<Code index="42" coord="54 0 7 6" bearing="0 4"/>
<Code index="43" coord="10 26 9 9" bearing="1 4" advance="10"/>
<Code index="44" coord="18 0 2 3" bearing="1 11" advance="3"/>
<Code index="45" coord="0 0 3 1" bearing="1 9" advance="4"/>
<Code index="46" coord="12 0 1 2" bearing="2 11" advance="2"/>
<Code index="47" coord="17 88 4 11" bearing="0 4"/>
<Code index="48" coord="20 26 6 9" bearing="1 4" advance="7"/>
<Code index="49" coord="27 26 5 9" bearing="2 4" advance="6"/>
<Code index="50" coord="33 26 7 9" bearing="1 4"/>
<Code index="51" coord="41 26 6 9" bearing="1 4" advance="7"/>
<Code index="52" coord="48 26 6 9" bearing="1 4" advance="7"/>
<Code index="53" coord="55 26 6 9" bearing="1 4" advance="7"/>
<Code index="54" coord="62 26 6 9" bearing="1 4" advance="7"/>
<Code index="55" coord="69 26 6 9" bearing="1 4" advance="7"/>
<Code index="56" coord="76 26 6 9" bearing="1 4" advance="7"/>
<Code index="57" coord="83 26 6 9" bearing="1 4" advance="7"/>
<Code index="58" coord="62 0 1 7" bearing="2 6" advance="2"/>
<Code index="59" coord="109 16 2 8" bearing="1 6" advance="3"/>
<Code index="60" coord="64 0 8 7" bearing="1 5" advance="10"/>
<Code index="61" coord="27 0 8 4" bearing="1 7" advance="10"/>
<Code index="62" coord="73 0 8 7" bearing="1 5" advance="10"/>
<Code index="63" coord="90 26 5 9" bearing="1 4" advance="6"/>
<Code index="64" coord="22 88 11 11" bearing="1 4" advance="12"/>
<Code index="65" coord="96 26 9 9" bearing="0 4"/>
<Code index="66" coord="106 26 7 9" bearing="1 4" advance="8"/>
<Code index="67" coord="114 26 7 9" bearing="1 4" advance="8"/>
<Code index="68" coord="0 36 8 9" bearing="1 4" advance="9"/>
<Code index="69" coord="9 36 6 9" bearing="1 4" advance="7"/>
<Code index="70" coord="16 36 5 9" bearing="1 4" advance="6"/>
<Code index="71" coord="22 36 8 9" bearing="1 4" advance="9"/>
<Code index="72" coord="31 36 8 9" bearing="1 4" advance="9"/>
<Code index="73" coord="40 36 1 9" bearing="1 4" advance="2"/>
<Code index="74" coord="21 100 3 12" bearing="-1 4" advance="4"/>
<Code index="75" coord="42 36 7 9" bearing="1 4"/>
<Code index="76" coord="50 36 6 9" bearing="1 4"/>
<Code index="77" coord="57 36 9 9" bearing="1 4" advance="10"/>
<Code index="78" coord="67 36 8 9" bearing="1 4" advance="9"/>
<Code index="79" coord="76 36 8 9" bearing="1 4" advance="9"/>
<Code index="80" coord="85 36 6 9" bearing="1 4" advance="7"/>
<Code index="81" coord="34 88 8 11" bearing="1 4" advance="9"/>
<Code index="82" coord="92 36 7 9" bearing="1 4"/>
<Code index="83" coord="100 36 7 9" bearing="1 4" advance="8"/>
<Code index="84" coord="108 36 7 9" bearing="0 4"/>
<Code index="85" coord="116 36 8 9" bearing="1 4" advance="9"/>
<Code index="86" coord="0 46 11 9" bearing="-1 4" advance="10"/>
<Code index="87" coord="12 46 13 9" bearing="-1 4" advance="12"/>
<Code index="88" coord="26 46 8 9" bearing="0 4"/>
<Code index="89" coord="35 46 7 9" bearing="0 4"/>
<Code index="90" coord="43 46 8 9" bearing="1 4" advance="9"/>
<Code index="91" coord="25 100 3 12" bearing="1 3" advance="4"/>
<Code index="92" coord="43 88 4 11" bearing="0 4"/>
<Code index="93" coord="29 100 3 12" bearing="1 3" advance="4"/>
<Code index="94" coord="36 0 8 4" bearing="1 4" advance="10"/>
<Code index="95" coord="4 0 7 1" bearing="0 15"/>
<Code index="96" coord="14 0 3 2" bearing="1 3" advance="6"/>
<Code index="97" coord="82 0 6 7" bearing="1 6" advance="7"/>
<Code index="98" coord="48 88 6 11" bearing="1 2" advance="7"/>
<Code index="99" coord="89 0 5 7" bearing="1 6" advance="6"/>
<Code index="100" coord="55 88 6 11" bearing="1 2" advance="7"/>
<Code index="101" coord="95 0 6 7" bearing="1 6" advance="7"/>
<Code index="102" coord="62 88 4 11" bearing="0 2"/>
<Code index="103" coord="59 76 6 10" bearing="1 6" advance="7"/>
<Code index="104" coord="67 88 6 11" bearing="1 2" advance="7"/>
<Code index="105" coord="66 76 1 10" bearing="1 3" advance="2"/>
<Code index="106" coord="109 100 2 13" bearing="0 3" advance="3"/>
<Code index="107" coord="74 88 6 11" bearing="1 2"/>
<Code index="108" coord="81 88 1 11" bearing="1 2" advance="2"/>
<Code index="109" coord="102 0 11 7" bearing="1 6" advance="12"/>
<Code index="110" coord="114 0 6 7" bearing="1 6" advance="7"/>
<Code index="111" coord="121 0 6 7" bearing="1 6" advance="7"/>
<Code index="112" coord="68 76 6 10" bearing="1 6" advance="7"/>
<Code index="113" coord="75 76 6 10" bearing="1 6" advance="7"/>
<Code index="114" coord="0 8 4 7" bearing="1 6"/>
<Code index="115" coord="5 8 6 7" bearing="1 6"/>
<Code index="116" coord="52 46 4 9" bearing="0 4" advance="5"/>
<Code index="117" coord="12 8 6 7" bearing="1 6" advance="7"/>
<Code index="118" coord="19 8 9 7" bearing="-1 6" advance="8"/>
<Code index="119" coord="29 8 9 7" bearing="0 6"/>
<Code index="120" coord="39 8 7 7" bearing="0 6"/>
<Code index="121" coord="82 76 8 10" bearing="0 6" advance="7"/>
<Code index="122" coord="47 8 5 7" bearing="1 6" advance="6"/>
<Code index="123" coord="33 100 5 12" bearing="2 3" advance="6"/>
<Code index="124" coord="112 100 1 13" bearing="2 3" advance="2"/>
<Code index="125" coord="39 100 5 12" bearing="2 3" advance="6"/>
<Code index="126" coord="45 0 8 4" bearing="1 7" advance="10"/>
<Code index="1025" coord="83 88 6 11" bearing="1 2" advance="7"/>
<Code index="1026" coord="45 100 9 12" bearing="0 4" advance="10"/>
<Code index="1027" coord="55 100 6 12" bearing="1 1"/>
<Code index="1028" coord="57 46 8 9" bearing="1 4" advance="9"/>
<Code index="1029" coord="66 46 7 9" bearing="1 4" advance="8"/>
<Code index="1030" coord="74 46 1 9" bearing="1 4" advance="2"/>
<Code index="1031" coord="90 88 3 11" bearing="0 2" advance="4"/>
<Code index="1032" coord="62 100 3 12" bearing="-1 4" advance="4"/>
<Code index="1033" coord="76 46 13 9" bearing="1 4"/>
<Code index="1034" coord="90 46 12 9" bearing="1 4" advance="13"/>
<Code index="1035" coord="103 46 9 9" bearing="0 4" advance="10"/>
<Code index="1036" coord="66 100 8 12" bearing="1 1"/>
<Code index="1037" coord="75 100 8 12" bearing="1 1" advance="9"/>
<Code index="1038" coord="84 100 7 12" bearing="0 1"/>
<Code index="1039" coord="94 88 7 11" bearing="1 4" advance="8"/>
<Code index="1040" coord="113 46 9 9" bearing="0 4"/>
<Code index="1041" coord="0 56 7 9" bearing="1 4" advance="8"/>
<Code index="1042" coord="8 56 7 9" bearing="1 4" advance="8"/>
<Code index="1043" coord="16 56 6 9" bearing="1 4"/>
<Code index="1044" coord="102 88 9 11" bearing="1 4" advance="10"/>
<Code index="1045" coord="23 56 6 9" bearing="1 4" advance="7"/>
<Code index="1046" coord="30 56 13 9" bearing="0 4" advance="14"/>
<Code index="1047" coord="44 56 7 9" bearing="1 4" advance="8"/>
<Code index="1048" coord="52 56 8 9" bearing="1 4" advance="9"/>
<Code index="1049" coord="92 100 8 12" bearing="1 1" advance="9"/>
<Code index="1050" coord="61 56 8 9" bearing="1 4"/>
<Code index="1051" coord="70 56 8 9" bearing="1 4" advance="9"/>
<Code index="1052" coord="79 56 9 9" bearing="1 4" advance="10"/>
<Code index="1053" coord="89 56 8 9" bearing="1 4" advance="9"/>
<Code index="1054" coord="98 56 8 9" bearing="1 4" advance="9"/>
<Code index="1055" coord="107 56 7 9" bearing="1 4" advance="8"/>
<Code index="1056" coord="115 56 6 9" bearing="1 4" advance="7"/>
<Code index="1057" coord="0 66 7 9" bearing="1 4" advance="8"/>
<Code index="1058" coord="8 66 7 9" bearing="0 4"/>
<Code index="1059" coord="16 66 7 9" bearing="0 4"/>
<Code index="1060" coord="24 66 9 9" bearing="1 4" advance="10"/>
<Code index="1061" coord="34 66 8 9" bearing="0 4"/>
<Code index="1062" coord="112 88 8 11" bearing="1 4" advance="9"/>
<Code index="1063" coord="43 66 7 9" bearing="1 4" advance="8"/>
<Code index="1064" coord="51 66 11 9" bearing="1 4" advance="12"/>
<Code index="1065" coord="0 100 12 11" bearing="1 4" advance="13"/>
<Code index="1066" coord="63 66 9 9" bearing="1 4" advance="10"/>
<Code index="1067" coord="73 66 9 9" bearing="1 4" advance="10"/>
<Code index="1068" coord="83 66 7 9" bearing="1 4" advance="8"/>
<Code index="1069" coord="91 66 8 9" bearing="1 4" advance="9"/>
<Code index="1070" coord="100 66 12 9" bearing="1 4" advance="13"/>
<Code index="1071" coord="113 66 7 9" bearing="1 4" advance="8"/>
<Code index="1072" coord="53 8 6 7" bearing="1 6" advance="7"/>
<Code index="1073" coord="101 100 7 12" bearing="0 1" advance="8"/>
<Code index="1074" coord="60 8 6 7" bearing="1 6" advance="7"/>
<Code index="1075" coord="67 8 5 7" bearing="1 6" advance="6"/>
<Code index="1076" coord="0 76 8 9" bearing="1 6" advance="9"/>
<Code index="1077" coord="73 8 6 7" bearing="1 6" advance="7"/>
<Code index="1078" coord="80 8 11 7" bearing="0 6" advance="12"/>
<Code index="1079" coord="92 8 5 7" bearing="1 6" advance="6"/>
<Code index="1080" coord="98 8 6 7" bearing="1 6" advance="7"/>
<Code index="1081" coord="91 76 6 10" bearing="1 3" advance="7"/>
<Code index="1082" coord="105 8 6 7" bearing="1 6" advance="7"/>
<Code index="1083" coord="112 8 7 7" bearing="0 6" advance="8"/>
<Code index="1084" coord="120 8 7 7" bearing="1 6" advance="8"/>
<Code index="1085" coord="0 16 6 7" bearing="1 6" advance="7"/>
<Code index="1086" coord="7 16 6 7" bearing="1 6" advance="7"/>
<Code index="1087" coord="14 16 6 7" bearing="1 6" advance="7"/>
<Code index="1088" coord="98 76 6 10" bearing="1 6" advance="7"/>
<Code index="1089" coord="21 16 5 7" bearing="1 6" advance="6"/>
<Code index="1090" coord="27 16 7 7" bearing="1 6" advance="8"/>
<Code index="1091" coord="105 76 8 10" bearing="0 6" advance="7"/>
<Code index="1092" coord="114 100 9 14" bearing="1 2" advance="10"/>
<Code index="1093" coord="35 16 7 7" bearing="0 6"/>
<Code index="1094" coord="9 76 7 9" bearing="1 6" advance="8"/>
<Code index="1095" coord="43 16 6 7" bearing="1 6" advance="7"/>
<Code index="1096" coord="50 16 9 7" bearing="1 6" advance="10"/>
<Code index="1097" coord="17 76 10 9" bearing="1 6" advance="11"/>
<Code index="1098" coord="60 16 9 7" bearing="0 6" advance="10"/>
<Code index="1099" coord="70 16 8 7" bearing="1 6" advance="9"/>
<Code index="1100" coord="79 16 6 7" bearing="1 6" advance="7"/>
<Code index="1101" coord="86 16 5 7" bearing="1 6" advance="6"/>
<Code index="1102" coord="92 16 9 7" bearing="1 6" advance="10"/>
<Code index="1103" coord="102 16 6 7" bearing="1 6" advance="7"/>
<Code index="1104" coord="114 76 6 10" bearing="1 3" advance="7"/>
<Code index="1105" coord="28 76 6 9" bearing="1 4" advance="7"/>
<Code index="8470" coord="35 76 13 9" bearing="0 4" advance="14"/>
<Code index="selected" coord="124 100 0 17"/>
<Code index="selected_back" coord="126 100 0 17"/>
<Code index="cursor" coord="0 118 2 17" advance="0"/>
<Code index="substitute" coord="0 88 7 11" bearing="1 4"/>
</Codes>
</Resource>
</MyGUI>
-48
View File
@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layer" version="1.2">
<Layer type="SharedLayer" name="Wallpaper">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="SharedLayer" name="Back">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="OverlappedLayer" name="Overlapped">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="SharedLayer" name="Middle">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="OverlappedLayer" name="Modal">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="SharedLayer" name="Main">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="OverlappedLayer" name="Popup">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="SharedLayer" name="FadeMiddle">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="OverlappedLayer" name="Info">
<Property key="Pick" value="true"/>
</Layer>
<Layer type="SharedLayer" name="ToolTip">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="SharedLayer" name="DragAndDrop">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="SharedLayer" name="FadeBusy">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="SharedLayer" name="Pointer">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="SharedLayer" name="Fade">
<Property key="Pick" value="false"/>
</Layer>
<Layer type="SharedLayer" name="Statistic">
<Property key="Pick" value="false"/>
</Layer>
</MyGUI>
@@ -1,8 +0,0 @@
#version 130
in vec4 Color;
in vec2 TexCoord;
uniform sampler2D Texture;
void main(void)
{
gl_FragColor = texture2D(Texture, TexCoord) * Color;
}
@@ -1,15 +0,0 @@
#version 130
out vec4 Color;
out vec2 TexCoord;
in vec3 VertexPosition;
in vec4 VertexColor;
in vec2 VertexTexCoord;
uniform float YScale;
void main()
{
TexCoord = VertexTexCoord;
Color = VertexColor;
vec4 vpos = vec4(VertexPosition,1.0);
vpos.y *= YScale;
gl_Position = vpos;
}
@@ -1,64 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceImageSet" name="ArrowPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer" rate="0.15">
<Frame point="13 11" count="30"/>
<Frame point="13 52"/>
<Frame point="56 52"/>
<Frame point="91 52"/>
<Frame point="56 52"/>
<Frame point="13 52"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="BeamPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="45 8"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="SizeLeftPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="122 48"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="SizeRightPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="160 48"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="SizeHorzPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="123 87"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="SizeVertPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="164 90"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="HandPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="154 11"/>
</Index>
</Group>
</Resource>
<Resource type="ResourceImageSet" name="LinkPointerImage">
<Group name="Pointer" texture="MyGUI_Pointers.png" size="32 32">
<Index name="Pointer">
<Frame point="91 11"/>
</Index>
</Group>
</Resource>
</MyGUI>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

-43
View File
@@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Resource" version="1.1">
<Resource type="ResourceImageSetPointer" name="arrow">
<Property key="Point" value="1 1"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="ArrowPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="beam">
<Property key="Point" value="16 16"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="BeamPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="size_left">
<Property key="Point" value="16 16"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="SizeLeftPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="size_right">
<Property key="Point" value="16 16"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="SizeRightPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="size_horz">
<Property key="Point" value="16 16"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="SizeHorzPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="size_vert">
<Property key="Point" value="16 16"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="SizeVertPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="hand">
<Property key="Point" value="16 16"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="HandPointerImage"/>
</Resource>
<Resource type="ResourceImageSetPointer" name="link">
<Property key="Point" value="1 1"/>
<Property key="Size" value="32 32"/>
<Property key="Resource" value="LinkPointerImage"/>
</Resource>
</MyGUI>
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI>
<MyGUI type="Font">
<Property key="Default" value="DejaVuSansFont_15"/>
<Property key="DefaultGenerated" value="DejaVuSansFontGenerated_15"/>
</MyGUI>
<MyGUI type="Pointer">
<Property key="Default" value="arrow"/>
<Property key="Layer" value="Pointer"/>
</MyGUI>
</MyGUI>
-182
View File
@@ -1,182 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Layout" version="3.2.0">
<Widget type="Window" skin="WindowCS" position="0 0 590 825" layer="Overlapped" name="SettingsWindow">
<Property key="Caption" value="Settings"/>
<Property key="MinSize" value="200 200"/>
<Property key="Snap" value="true"/>
<Widget type="ScrollView" skin="ScrollViewEmpty" position="0 0 580 790" align="Stretch" name="ScrollView">
<Property key="CanvasSize" value="580 780"/>
<Property key="VisibleHScroll" value="true"/>
<Property key="VisibleVScroll" value="true"/>
<Property key="CanvasAlign" value="Default"/>
<Widget type="Button" skin="CheckBox" position="15 145 380 20" name="CheckboxNewLighting">
<Property key="Caption" value="Enable New Lighting (Old Lighting Not Exactly Like FL)"/>
<Property key="Enabled" value="true"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="15 170 360 20" name="CheckboxEnvironmentMaps">
<Property key="Caption" value="Enable Environment Maps (Starsphere Reflection)"/>
<Property key="Enabled" value="true"/>
</Widget>
<Widget type="Button" skin="Button" position="350 745 115 35" name="ButtonSave">
<Property key="Caption" value="Save Settings"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="15 490 130 20" name="CheckboxShadows">
<Property key="Caption" value="Enable Shadows"/>
<Property key="Enabled" value="true"/>
<Property key="Depth" value="-1"/>
<Property key="Alpha" value="1"/>
</Widget>
<Widget type="Widget" skin="PanelSkin" position="5 500 570 170" name="GroupBoxShadows">
<Property key="Enabled" value="true"/>
<Property key="Depth" value="0"/>
<Widget type="ComboBox" skin="ComboBox" position="175 35 100 25" name="ComboBoxShadowSplitPlanes">
<Property key="ModeDrop" value="true"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 40 150 15">
<Property key="Caption" value="Number of Split Planes:"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="175 60 100 25" name="ComboBoxShadowMapSize">
<Property key="ModeDrop" value="true"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 65 125 15">
<Property key="Caption" value="Shadow Map Size:"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 90 155 15">
<Property key="Caption" value="Shadow Casting Lights:"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="175 85 60 25" name="ComboBoxShadowLightCount">
<Property key="ModeDrop" value="true"/>
<Property key="AddItem" value="1"/>
<Property key="AddItem" value="2"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="175 10 100 25" name="ComboBoxShadowQuality">
<Property key="ModeDrop" value="true"/>
<Property key="AddItem" value="Custom"/>
<Property key="AddItem" value="Very Low"/>
<Property key="AddItem" value="Low"/>
<Property key="AddItem" value="Medium"/>
<Property key="AddItem" value="High"/>
<Property key="AddItem" value="Very High"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 15 115 15">
<Property key="Caption" value="Shadow Quality:"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="10 135 255 20" name="CheckboxAsteroidShadows">
<Property key="Caption" value="Enable Dynamic Asteroid Shadows"/>
<Property key="Enabled" value="true"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="10 110 245 20" name="CheckboxShadowPCF">
<Property key="Caption" value="Enable Shadow Antialiasing (PCF)"/>
<Property key="Enabled" value="true"/>
</Widget>
</Widget>
<Widget type="Button" skin="CheckBox" position="15 275 175 20" name="CheckboxPostpocessing">
<Property key="Caption" value="Enable Postprocessing"/>
<Property key="Depth" value="-1"/>
</Widget>
<Widget type="Widget" skin="PanelSkin" position="5 285 570 110" name="GroupBoxPostprocessing">
<Property key="Enabled" value="true"/>
<Widget type="Button" skin="CheckBox" position="10 35 400 20" name="CheckBoxAutomaticExposure">
<Property key="Caption" value="Enable Automatic Camera Exposure"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="10 60 350 20" name="CheckboxLightScattering">
<Property key="Caption" value="Enable Light Scattering (Nebula + Asteroid Fields)"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="110 10 195 25" name="ComboBoxTonemapping">
<Property key="ModeDrop" value="true"/>
<Property key="AddItem" value="AGX (Current State of Art)"/>
<Property key="AddItem" value="ACES (More Contrast)"/>
<Property key="AddItem" value="GT Sport (More Saturated)"/>
<Property key="Caption" value="AGX (Current State of Art)"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 15 95 15">
<Property key="Caption" value="Tonemapping:"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 85 170 15">
<Property key="Caption" value="Light Scattering Sun limit:"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="180 80 60 25" name="ComboBoxLightScatteringSunLimit">
<Property key="ModeDrop" value="true"/>
</Widget>
</Widget>
<Widget type="Button" skin="CheckBox" position="15 195 195 20" name="CheckboxParallaxMaps">
<Property key="Caption" value="Enable Parallax Mapping"/>
<Property key="Enabled" value="true"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="15 220 395 20" name="CheckboxHQDiffuse">
<Property key="Caption" value="Enable High Quality Diffuse Lighting (Planets, Rocks etc.)"/>
<Property key="Enabled" value="true"/>
</Widget>
<Widget type="EditBox" skin="WordWrapEmpty" position="15 55 560 35">
<Property key="Caption" value="Warning: Main menu background scene does not use correct rendering yet (do not use for settings testing)"/>
<Property key="WordWrap" value="true"/>
<Property key="TextColour" value="1 0.187135 0.187135"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="310 90 60 25" name="ComboBoxMSAA">
<Property key="AddItem" value="Off"/>
<Property key="AddItem" value="2x"/>
<Property key="AddItem" value="4x"/>
<Property key="AddItem" value="8x"/>
<Property key="ModeDrop" value="true"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="15 95 280 20">
<Property key="Caption" value="Antialiasing (MSAA, Needs Game Restart):"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="15 120 290 20">
<Property key="Caption" value="Anisotropic Filtering (Needs Game Restart):"/>
</Widget>
<Widget type="ComboBox" skin="ComboBox" position="310 115 60 25" name="ComboBoxAnistropicFiltering">
<Property key="ModeDrop" value="true"/>
<Property key="AddItem" value="Off"/>
<Property key="AddItem" value="2x"/>
<Property key="AddItem" value="4x"/>
<Property key="AddItem" value="8x"/>
<Property key="AddItem" value="16x"/>
</Widget>
<Widget type="Button" skin="Button" position="110 745 115 35" name="ButtonUndoChanges">
<Property key="Caption" value="Undo Changes"/>
</Widget>
<Widget type="Widget" skin="PanelSkin" position="5 680 570 60">
<Widget type="Button" skin="CheckBox" position="10 10 415 25" name="CheckBoxDisableGUI">
<Property key="Caption" value="Disable FL GUI Rendering (for Videos etc.)"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="10 35 105 20" name="CheckBoxShowFPS">
<Property key="Caption" value="Show FPS"/>
</Widget>
</Widget>
<Widget type="TextBox" skin="TextBox" position="15 670 175 15">
<Property key="Caption" value="Miscellaneous"/>
</Widget>
<Widget type="EditBox" skin="WordWrapEmpty" position="175 20 400 35" name="WordWrapGraphicsCard">
<Property key="WordWrap" value="true"/>
<Property key="TextColour" value="0.959064 0.916189 0.381382"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="15 20 160 20">
<Property key="Caption" value="Selected Graphics Card:"/>
<Property key="TextColour" value="0.959064 0.916189 0.381382"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="15 0 120 20">
<Property key="Caption" value="Renderer Version: "/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="135 0 440 20" name="TextBoxRendererVersion"/>
<Widget type="Widget" skin="PanelSkin" position="5 415 570 75" name="GroupBoxClusteredShading">
<Widget type="ComboBox" skin="ComboBox" position="180 5 60 30" name="ComboBoxMaxLights">
<Property key="ModeDrop" value="true"/>
</Widget>
<Widget type="TextBox" skin="TextBox" position="10 10 155 20">
<Property key="Caption" value="Max. Number of Lights:"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="10 35 550 25" name="CheckBoxReplaceFakeLights">
<Property key="Caption" value="Replace Fake Lights with Real Lights (Needs Postprocessing + At Least 4x MSAA)"/>
</Widget>
</Widget>
<Widget type="Button" skin="CheckBox" position="10 405 210 20" name="CheckBoxClusteredShading">
<Property key="Caption" value="Enable Clustered Shading"/>
</Widget>
<Widget type="Button" skin="CheckBox" position="15 245 530 25" name="CheckBoxPreciseSRGB">
<Property key="Caption" value="Always Use Accurate SRGB Color Conversion (Slower, But Better Colors)"/>
</Widget>
</Widget>
</Widget>
<CodeGeneratorSettings/>
</MyGUI>
-59
View File
@@ -1,59 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//Color conversion include shader for FLAR by Schmackbolzen
vec3 ToLinearAccurate(vec3 inColor)
{
vec3 treshold=step(vec3(0.04045),inColor);
return mix(inColor / 12.92,pow ((inColor + 0.055) / 1.055, vec3(2.4)),treshold);
}
vec3 ToGammaCorrectedAccurate(vec3 inColor)
{
vec3 treshold=step(vec3(0.0031308),inColor);
return mix(inColor * 12.92,pow (inColor, vec3(1.0/2.4)) * 1.055 - 0.055,treshold);
}
vec3 ToLinearFast(vec3 inColor)
{
return pow(inColor,vec3(2.2));
}
vec3 ToGammaCorrectedFast(vec3 inColor)
{
return pow(inColor.rgb,1./vec3(2.2));
}
$SRGB_CONVERSION_DEFINE
#ifdef ALWAYS_USE_FAST_SRGB_CONVERSION
vec3 ToLinear(vec3 inColor)
{
return ToLinearFast(inColor);
}
vec3 ToGammaCorrected(vec3 inColor)
{
return ToGammaCorrectedFast(inColor);
}
#endif
#ifdef ALWAYS_USE_ACCURATE_SRGB_CONVERSION
vec3 ToLinear(vec3 inColor)
{
return ToLinearAccurate(inColor);
}
vec3 ToGammaCorrected(vec3 inColor)
{
return ToGammaCorrectedAccurate(inColor);
}
#endif
//Works on gamma compressed and linear values (note that the values are not identical)
//Values are from https://en.wikipedia.org/wiki/Luma_(video)
float ToLuma(vec3 color)
{
return dot(color, vec3(0.2126, 0.7152, 0.0722));
}
-47
View File
@@ -1,47 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://learnopengl.com/PBR/IBL/Specular-IBL
#version 330
#include "ColorConversion.inc"
in vec3 WorldPos;
uniform samplerCube environmentMap;
uniform bool convertToLinear;
const float PI = 3.14159265359;
void main()
{
vec3 N = normalize(WorldPos);
vec3 irradiance = vec3(0.0);
// tangent space calculation from origin point
vec3 up = vec3(0.0, 1.0, 0.0);
vec3 right = normalize(cross(up, N));
up = normalize(cross(N, right));
float sampleDelta = 0.025;
float nrSamples = 0.0f;
for(float phi = 0.0; phi < 2.0 * PI; phi += sampleDelta)
{
for(float theta = 0.0; theta < 0.5 * PI; theta += sampleDelta)
{
// spherical to cartesian (in tangent space)
vec3 tangentSample = vec3(sin(theta) * cos(phi), sin(theta) * sin(phi), cos(theta));
// tangent space to world
vec3 sampleVec = tangentSample.x * right + tangentSample.y * up + tangentSample.z * N;
vec3 texColor=texture(environmentMap, sampleVec).rgb;
if(convertToLinear)
texColor=ToLinear(texColor);
irradiance += texColor * cos(theta) * sin(theta);
nrSamples++;
}
}
irradiance = PI * irradiance * (1.0 / float(nrSamples));
gl_FragColor = vec4(ToGammaCorrected(irradiance), 1.0);
}
-81
View File
@@ -1,81 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//PBR bloom downsample shader for FLAR by Schmackbolzen based on code from https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom
//The code has been modified to be more like the original presentation and also blog article from the original
//authors of the technique (referenced in the link above).
#version 330
#include "ColorConversion.inc"
uniform sampler2D srcTexture;
uniform vec2 srcTexelSize[$NUM_MIPS];
uniform int mipLevel;
in vec2 texCoord;
layout (location = 0) out vec3 downsample;
float KarisAverage(vec3 col)
{
// Formula is 1 / (1 + luma)
float luma = ToLuma(col);
return 1.0f / (1.0f + luma);
}
void main()
{
vec2 texelSize = srcTexelSize[mipLevel];
float x = texelSize.x;
float y = texelSize.y;
// Take 13 samples around current texel:
// a - b - c
// - j - k -
// d - e - f
// - l - m -
// g - h - i
// === ('e' is the current texel) ===
vec3 a = texture(srcTexture, vec2(texCoord.x - 2*x, texCoord.y + 2*y)).rgb;
vec3 b = texture(srcTexture, vec2(texCoord.x, texCoord.y + 2*y)).rgb;
vec3 c = texture(srcTexture, vec2(texCoord.x + 2*x, texCoord.y + 2*y)).rgb;
vec3 d = texture(srcTexture, vec2(texCoord.x - 2*x, texCoord.y)).rgb;
vec3 e = texture(srcTexture, vec2(texCoord.x, texCoord.y)).rgb;
vec3 f = texture(srcTexture, vec2(texCoord.x + 2*x, texCoord.y)).rgb;
vec3 g = texture(srcTexture, vec2(texCoord.x - 2*x, texCoord.y - 2*y)).rgb;
vec3 h = texture(srcTexture, vec2(texCoord.x, texCoord.y - 2*y)).rgb;
vec3 i = texture(srcTexture, vec2(texCoord.x + 2*x, texCoord.y - 2*y)).rgb;
vec3 j = texture(srcTexture, vec2(texCoord.x - x, texCoord.y + y)).rgb;
vec3 k = texture(srcTexture, vec2(texCoord.x + x, texCoord.y + y)).rgb;
vec3 l = texture(srcTexture, vec2(texCoord.x - x, texCoord.y - y)).rgb;
vec3 m = texture(srcTexture, vec2(texCoord.x + x, texCoord.y - y)).rgb;
vec3 groups[5];
const float factor1=0.125f/4.f;
const float factor2=0.5f/4.f;
groups[0] = (a+b+d+e) * factor1;
groups[1] = (b+c+e+f) * factor1;
groups[2] = (d+e+g+h) * factor1;
groups[3] = (e+f+h+i) * factor1;
groups[4] = (j+k+l+m) * factor2;
if (mipLevel == 0)
{
float avg1=KarisAverage(groups[0]);
float avg2=KarisAverage(groups[1]);
float avg3=KarisAverage(groups[2]);
float avg4=KarisAverage(groups[3]);
float avg5=KarisAverage(groups[4]);
float normalization=avg1+avg2+avg3+avg4+avg5+0.0001;
downsample = (groups[0]*avg1+groups[1]*avg2+groups[2]*avg3+groups[3]*avg4+groups[4]*avg5)/normalization;
downsample = max(downsample, 0.0001f);
}
else
{
downsample = (groups[0]+groups[1]+groups[2]+groups[3]+groups[4]);
}
}
-18
View File
@@ -1,18 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//PBR bloom downsample shader for FLAR by Schmackbolzen based on code from https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom
#version 330
layout (location = 0) in vec2 aPosition;
layout (location = 1) in vec2 aTexCoord;
out vec2 texCoord;
void main()
{
gl_Position = vec4(aPosition.x, aPosition.y, 0.0, 1.0);
texCoord = aTexCoord;
}
-46
View File
@@ -1,46 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//PBR bloom upsample shader for FLAR by Schmackbolzen based on code from https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom
//The only bug fix is using different filter radii for each direction since the texture is not square
#version 330
uniform sampler2D srcTexture;
uniform float filterRadiusX;
uniform float filterRadiusY;
in vec2 texCoord;
layout (location = 0) out vec3 upsample;
void main()
{
float x = filterRadiusX;
float y = filterRadiusY;
// Take 9 samples around current texel:
// a - b - c
// d - e - f
// g - h - i
// === ('e' is the current texel) ===
vec3 a = texture(srcTexture, vec2(texCoord.x - x, texCoord.y + y)).rgb;
vec3 b = texture(srcTexture, vec2(texCoord.x, texCoord.y + y)).rgb;
vec3 c = texture(srcTexture, vec2(texCoord.x + x, texCoord.y + y)).rgb;
vec3 d = texture(srcTexture, vec2(texCoord.x - x, texCoord.y)).rgb;
vec3 e = texture(srcTexture, vec2(texCoord.x, texCoord.y)).rgb;
vec3 f = texture(srcTexture, vec2(texCoord.x + x, texCoord.y)).rgb;
vec3 g = texture(srcTexture, vec2(texCoord.x - x, texCoord.y - y)).rgb;
vec3 h = texture(srcTexture, vec2(texCoord.x, texCoord.y - y)).rgb;
vec3 i = texture(srcTexture, vec2(texCoord.x + x, texCoord.y - y)).rgb;
// Apply weighted distribution, by using a 3x3 tent filter:
// 1 | 1 2 1 |
// -- * | 2 4 2 |
// 16 | 1 2 1 |
upsample = e*4.0;
upsample += (b+d+f+h)*2.0;
upsample += (a+c+g+i);
upsample *= 1.0 / 16.0;
}
-18
View File
@@ -1,18 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//PBR bloom upsample shader for FLAR by Schmackbolzen based on code from https://learnopengl.com/Guest-Articles/2022/Phys.-Based-Bloom
#version 330
layout (location = 0) in vec2 aPosition;
layout (location = 1) in vec2 aTexCoord;
out vec2 texCoord;
void main()
{
gl_Position = vec4(aPosition.x, aPosition.y, 0.0, 1.0);
texCoord = aTexCoord;
}
-128
View File
@@ -1,128 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://learnopengl.com/PBR/IBL/Specular-IBL
#version 330
in vec2 TexCoords;
const float PI = 3.14159265359;
// ----------------------------------------------------------------------------
// http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html
// efficient VanDerCorpus calculation.
float RadicalInverse_VdC(uint bits)
{
bits = (bits << 16u) | (bits >> 16u);
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
return float(bits) * 2.3283064365386963e-10; // / 0x100000000
}
// ----------------------------------------------------------------------------
vec2 Hammersley(uint i, uint N)
{
return vec2(float(i)/float(N), RadicalInverse_VdC(i));
}
// ----------------------------------------------------------------------------
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughnessSquared)
{
//float a = roughness*roughness;
float a = roughnessSquared;
float phi = 2.0 * PI * Xi.x;
float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a*a - 1.0) * Xi.y));
float sinTheta = sqrt(1.0 - cosTheta*cosTheta);
// from spherical coordinates to cartesian coordinates - halfway vector
vec3 H;
H.x = cos(phi) * sinTheta;
H.y = sin(phi) * sinTheta;
H.z = cosTheta;
// from tangent-space H vector to world-space sample vector
vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangent = normalize(cross(up, N));
vec3 bitangent = cross(N, tangent);
vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z;
return normalize(sampleVec);
}
// ----------------------------------------------------------------------------
float GeometrySchlickGGX(float NdotV, float roughness)
{
// note that we use a different k for IBL
float a = roughness;
float k = (a * a) / 2.0;
float nom = NdotV;
float denom = NdotV * (1.0 - k) + k + 0.00001; // 0.00001 to prevent divide by zero.
return nom / denom;
}
// ----------------------------------------------------------------------------
float GeometrySmith(float NdotV, float NdotL, float roughness)
{
float ggx2 = GeometrySchlickGGX(NdotV, roughness);
float ggx1 = GeometrySchlickGGX(NdotL, roughness);
return ggx1 * ggx2;
}
//"PBR Diffuse Lighting for GGX+Smith Microsurfaces", Earl Hammon, Jr.
float GeometrySmithG2Hammon(float NdotV, float NdotL, float roughnessSquared)
{
float nom = 2*NdotL*NdotV;
float denom = mix(2*NdotL*NdotV,NdotL+NdotV,roughnessSquared) + 0.00001; // 0.00001 to prevent divide by zero.
return nom/denom;
}
// ----------------------------------------------------------------------------
vec2 IntegrateBRDF(float NdotV, float roughness)
{
vec3 V;
V.x = sqrt(1.0 - NdotV*NdotV);
V.y = 0.0;
V.z = NdotV;
float A = 0.0;
float B = 0.0;
vec3 N = vec3(0.0, 0.0, 1.0);
float roughnessSquared = roughness*roughness;
const uint SAMPLE_COUNT = 1024u;
for(uint i = 0u; i < SAMPLE_COUNT; ++i)
{
// generates a sample vector that's biased towards the
// preferred alignment direction (importance sampling).
vec2 Xi = Hammersley(i, SAMPLE_COUNT);
vec3 H = ImportanceSampleGGX(Xi, N, roughnessSquared);
vec3 L = normalize(2.0 * dot(V, H) * H - V);
float NdotL = max(L.z, 0.0);
if(NdotL > 0.0)
{
float NdotH = max(H.z, 0.0);
float VdotH = max(dot(V, H), 0.0);
//float G = GeometrySmith(NdotV, NdotL, roughness);
float G = GeometrySmithG2Hammon(NdotV, NdotL, roughnessSquared);
float G_Vis = (G * VdotH) / (NdotH * NdotV);
float Fc = pow(1.0 - VdotH, 5.0);
A += (1.0 - Fc) * G_Vis;
B += Fc * G_Vis;
}
}
A /= float(SAMPLE_COUNT);
B /= float(SAMPLE_COUNT);
return vec2(A, B);
}
// ----------------------------------------------------------------------------
void main()
{
vec2 integratedBRDF = IntegrateBRDF(TexCoords.x, TexCoords.y);
gl_FragColor.rg = integratedBRDF;
}
-17
View File
@@ -1,17 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://learnopengl.com/PBR/IBL/Specular-IBL
#version 330
layout (location = 0) in vec3 aPos;
layout (location = 1) in vec2 aTexCoords;
out vec2 TexCoords;
void main()
{
TexCoords = aTexCoords;
gl_Position = vec4(aPos, 1.0);
}
-18
View File
@@ -1,18 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://learnopengl.com/PBR/IBL/Specular-IBL
#version 330
layout (location = 0) in vec3 aPos;
out vec3 WorldPos;
uniform mat4 projectionMat;
uniform mat4 viewMat;
void main()
{
WorldPos = aPos;
gl_Position = projectionMat * viewMat * vec4(WorldPos, 1.0);
}
-20
View File
@@ -1,20 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Depth only shader for FLAR by Schmackbolzen
#version 330
uniform sampler2D texture;
uniform float alphaTestValue;
in vec2 outTexCoords;
void main()
{
if (alphaTestValue > 0)
{
if (texture2D(texture, outTexCoords).a < alphaTestValue)
discard;
}
gl_FragColor = vec4(1,0,0,1);
}
-30
View File
@@ -1,30 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on "Parallel-Split Shadow Maps on Programmable GPUs" GPU Gems 3 (2005)
#version 330
const int g_iNumSplits = $NUM_SPLITS;
layout (triangles) in;
layout (triangle_strip, max_vertices = 3) out;
flat in int splitIndex[];
in vec2 inTexCoords[];
uniform mat4 mvpMat[g_iNumSplits];
out vec2 outTexCoords;
void main()
{
for(int iVertex = 0; iVertex < 3; iVertex++)
{
int iSplit = splitIndex[iVertex];
gl_Layer = iSplit;
gl_Position = mvpMat[iSplit]*gl_in[iVertex].gl_Position;
outTexCoords = inTexCoords[iVertex];
EmitVertex();
}
EndPrimitive();
}
-46
View File
@@ -1,46 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on "Parallel-Split Shadow Maps on Programmable GPUs" GPU Gems 3 (2005)
#version 330
layout (location = 0) in vec4 inPosition;
layout (location = 4) in vec2 inTexCoord0;
layout (location = 6) in mat4 inMVPMatInstanced;
layout (location = 10) in int inSplitIndexInstanced;
out vec2 inTexCoords;
flat out int splitIndex;
const int g_iNumSplits = $NUM_SPLITS;
uniform mat4 worldMat;
uniform bool isInstanced;
uniform bool isInstancedSplits;
uniform float alphaTestValue;
uniform int firstSplit;
void main(){
mat4 mvp;
if(!isInstanced)
mvp=worldMat;
else
{
mvp=inMVPMatInstanced;
}
if(!isInstancedSplits)
{
splitIndex = firstSplit + gl_InstanceID;
}
else
{
splitIndex = inSplitIndexInstanced;
}
gl_Position = mvp * inPosition;
if (alphaTestValue > 0)
inTexCoords = inTexCoord0.st;
}
-404
View File
@@ -1,404 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Fixed function shader for FLAR by Schmackbolzen
#version 330
#define TEXTURESTAGE_COUNT 2
#include "ColorConversion.inc"
struct Light{
vec3 ambient;
vec3 diffuse;
vec4 position;
vec3 spotDirection;
float spotExponent;
float spotCosPhi;
float spotCosTheta;
float constantAttenuation;
float linearAttenuation;
float quadraticAttenuation;
float range;
};
struct glFogParameters
{
vec3 color;
float density;
float start;
float end;
};
uniform Light glLightSource[8];
uniform glFogParameters glFog;
uniform sampler2D textures[TEXTURESTAGE_COUNT];
uniform samplerCube cubemap;
uniform int colorOp[TEXTURESTAGE_COUNT];
uniform int alphaOp[TEXTURESTAGE_COUNT];
uniform int colorArg1[TEXTURESTAGE_COUNT];
uniform int colorArg2[TEXTURESTAGE_COUNT];
uniform int alphaArg1[TEXTURESTAGE_COUNT];
uniform int alphaArg2[TEXTURESTAGE_COUNT];
uniform bool textureBound[TEXTURESTAGE_COUNT];
uniform vec3 ambientColor;
uniform vec3 matAmbientColor;
uniform vec4 matDiffuseColor;
uniform vec3 matEmissiveColor;
uniform vec4 matSpecularColor;
uniform float alphaTestValue;
uniform int alphaTestCompareMethod;
uniform int lightCount;
uniform int texture1Index;
uniform int fogMode;
uniform bool enableVertexColor;
uniform bool vertexColorAvailable;
uniform bool specularVertexColorAvailable;
uniform bool enableLighting;
uniform bool enableAlphaTest;
uniform bool enableCubemap;
uniform bool enableRHWCoordinates;
uniform bool enableAccurateSRGB;
uniform bool isInstancedTransparent;
in vec3 N;
in vec3 v;
in float RHWdepth;
in vec2 texCoords[2];
in vec4 vertexColor;
in vec4 vertexColorSecondary;
in float fogEnd;
in float fogScale;
#define D3DTA_DIFFUSE 0x00000000 // select diffuse color (read only)
#define D3DTA_CURRENT 0x00000001 // select stage destination register (read/write)
#define D3DTA_TEXTURE 0x00000002 // select texture color (read only)
#define D3DTA_TFACTOR 0x00000003 // select D3DRS_TEXTUREFACTOR (read only)
#define D3DTA_SPECULAR 0x00000004 // select specular color (read only)
#define D3DTA_TEMP 0x00000005 // select temporary register color (read/write)
#define D3DTA_COMPLEMENT 0x00000010 // take 1.0 x (read modifier)
#define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components (read modifier)
#define D3DTOP_DISABLE 1 // disables stage
#define D3DTOP_SELECTARG1 2 // the default
#define D3DTOP_SELECTARG2 3
// Modulate
#define D3DTOP_MODULATE 4 // multiply args together
#define D3DTOP_MODULATE2X 5 // multiply and << 1 bit
#define D3DTOP_MODULATE4X 6 // multiply and << 2 bits
// Add
#define D3DTOP_ADD 7 // add arguments together
#define D3DTOP_ADDSIGNED 8 // add with -0.5 bias
#define D3DTOP_ADDSIGNED2X 9 // as above but left << 1 bit
vec3 ToLinear(vec3 inColor)
{
if (enableAccurateSRGB)
return ToLinearAccurate(inColor);
else
return ToLinearFast(inColor);
}
vec3 ToGammaCorrected(vec3 inColor)
{
if (enableAccurateSRGB)
return ToGammaCorrectedAccurate(inColor);
else
return ToGammaCorrectedFast(inColor);
}
vec4 GetColorForStage(const int stage, int colorArg, int alphaArg, vec4 previousColor, vec4 gouradDiffuseColor, vec4 specularColor, vec2 texCoords, vec3 cubeMapTexCoords)
{
vec4 color;
vec4 textureColor;
if(colorArg == D3DTA_TEXTURE || alphaArg == D3DTA_TEXTURE)
if(textureBound[stage])
//Use if because some glsl compilers can not propagate the constant stage even though it has a constant value
//when the function gets called (0 or 1) and complain about missing glsl compliance for texture lookup (no constant index)
if (stage==0)
textureColor=texture2D(textures[0],texCoords);
else
if (!enableCubemap)
textureColor=texture2D(textures[1],texCoords);
else
textureColor=texture(cubemap,cubeMapTexCoords);
else
textureColor=vec4(1);
//textureColor.rgb=ToLinear(textureColor.rgb);
if(colorArg == D3DTA_DIFFUSE)
color.rgb=gouradDiffuseColor.rgb;
else if(colorArg == D3DTA_CURRENT)
color.rgb=previousColor.rgb;
else if(colorArg == D3DTA_TEXTURE)
color.rgb=textureColor.rgb;
else if(colorArg == D3DTA_SPECULAR)
color.rgb =specularColor.rgb;
else
color=vec4(1,0,0,1);
if(alphaArg == D3DTA_DIFFUSE)
color.a=gouradDiffuseColor.a;
else if(alphaArg == D3DTA_CURRENT)
color.a=previousColor.a;
else if(alphaArg == D3DTA_TEXTURE)
color.a=textureColor.a;
else if(alphaArg == D3DTA_SPECULAR)
color.a =specularColor.a;
else
color=vec4(1,0,0,1);
return color;
}
vec4 ApplyFunctionForStage(const int stage, vec4 previousColor, vec4 gouradDiffuseColor, vec4 specularColor, vec2 texCoords, vec3 cubeMapTexCoords)
{
vec4 color1=GetColorForStage(stage,colorArg1[stage],alphaArg1[stage], previousColor, gouradDiffuseColor, specularColor, texCoords, cubeMapTexCoords);
vec4 color2=GetColorForStage(stage,colorArg2[stage],alphaArg2[stage], previousColor, gouradDiffuseColor, specularColor, texCoords, cubeMapTexCoords);
if (colorOp[stage]==D3DTOP_SELECTARG2)
{
color1.rgb = color2.rgb;
}
else if (colorOp[stage]==D3DTOP_MODULATE)
{
color1.rgb*=color2.rgb;
}
else if (colorOp[stage]==D3DTOP_MODULATE2X)
{
color1.rgb=color1.rgb*color2.rgb*4.6; //2^2.2 since rendering is gamma correct
}
else if (colorOp[stage]==D3DTOP_MODULATE4X)
{
color1.rgb=color1.rgb*color2.rgb*21.11; //4^2.2 since rendering is gamma correct
}
else if (colorOp[stage]==D3DTOP_ADD)
{
color1.rgb=color1.rgb+color2.rgb;
}
else if (colorOp[stage]==D3DTOP_ADDSIGNED)
{
color1.rgb=color1.rgb+color2.rgb-0.5;
}
else if (colorOp[stage]==D3DTOP_ADDSIGNED2X)
{
color1.rgb=(color1.rgb+color2.rgb-0.5)*4.6; //2^2.2 since rendering is gamma correct
}
if (alphaOp[stage]==D3DTOP_SELECTARG2)
{
color1.a = color2.a;
}
else if (alphaOp[stage]==D3DTOP_MODULATE)
{
color1.a*=color2.a;
}
else if (alphaOp[stage]==D3DTOP_MODULATE2X)
{
color1.a=(color1.a*color2.a)*4.6; //2^2.2 since rendering is gamma correct
}
else if (alphaOp[stage]==D3DTOP_MODULATE4X)
{
color1.a=(color1.a*color2.a)*21.11; //4^2.2 since rendering is gamma correct
}
else if (alphaOp[stage]==D3DTOP_ADD)
{
color1.a=(color1.a+color2.a);
}
else if (alphaOp[stage]==D3DTOP_ADDSIGNED)
{
color1.a=color1.a+color2.a-0.5;
}
else if (alphaOp[stage]==D3DTOP_ADDSIGNED2X)
{
color1.a=(color1.a+color2.a-0.5)*4.6; //2^2.2 since rendering is gamma correct
}
color1.a=pow(color1.a,1.2);
return color1;
}
void main()
{
vec4 gouradDiffuseColor;
vec4 specularColor;
vec3 vertexAmbientColor;
if (enableLighting)
{
if(enableVertexColor)
{
float alpha = vertexColorAvailable ? vertexColor.a : matDiffuseColor.a;
if (specularVertexColorAvailable)
{
vertexAmbientColor=ToLinear(vertexColorSecondary.rgb);
gouradDiffuseColor=vec4(ambientColor*vertexAmbientColor,alpha);
}
else
{
vertexAmbientColor=matAmbientColor.rgb;
gouradDiffuseColor=vec4(ambientColor*vertexAmbientColor,alpha);
}
}
else
{
vertexAmbientColor=matAmbientColor.rgb;
gouradDiffuseColor=vec4(ambientColor*vertexAmbientColor, isInstancedTransparent ? vertexColor.a : matDiffuseColor.a);
}
//FL never has specular lighting enabled
specularColor=vec4(0,0,0,0);
}
else
{
if(vertexColorAvailable)
{
//gouradDiffuseColor=vec4(ToLinear(vertexColor.rgb),vertexColor.a);
//TODO: Weird bug with MSAA and float16 render target
vec4 vertexColorAboveZero=max(vertexColor,0);
gouradDiffuseColor=vec4(ToLinear(vertexColorAboveZero.rgb),vertexColorAboveZero.a);
}
else
gouradDiffuseColor=vec4(1,1,1,1);
if(specularVertexColorAvailable)
specularColor=vec4(ToLinear(vertexColorSecondary.rgb),vertexColor.a);
else
specularColor=vec4(0,0,0,0);
}
vec3 normal=normalize(N);
if (enableLighting)
{
gouradDiffuseColor.rgb+=matEmissiveColor;
vec3 vertexDiffuseColor=vertexColorAvailable&&enableVertexColor ? ToLinear(vertexColor.rgb): matDiffuseColor.rgb;
for (int index = 0; index < lightCount; index++)
{
vec3 lightDir;
float attenFactor;
// attenuation and light direction
if(glLightSource[index].spotCosTheta != -1.)
{
lightDir = normalize(glLightSource[index].position.xyz - v);
float angle = max(dot(normalize(glLightSource[index].spotDirection), -lightDir),0);
if (angle > glLightSource[index].spotCosPhi)
{
float spotAtten;
if (angle < glLightSource[index].spotCosTheta)
spotAtten = (angle-glLightSource[index].spotCosPhi)/(glLightSource[index].spotCosTheta-glLightSource[index].spotCosPhi);
else
spotAtten = 1;
if(glLightSource[index].spotExponent != 1.0)
spotAtten = pow(spotAtten, glLightSource[index].spotExponent);
float dist = distance(glLightSource[index].position.xyz, v);
attenFactor = spotAtten * min(1.0/ (glLightSource[index].constantAttenuation +
glLightSource[index].linearAttenuation * dist +
glLightSource[index].quadraticAttenuation * dist * dist),1);
}
else
attenFactor = 0.;
}
else if (glLightSource[index].position.w != 0.0)
{
// positional light source
float dist = distance(glLightSource[index].position.xyz, v);
if (dist <= glLightSource[index].range )
{
attenFactor = min(1.0/( glLightSource[index].constantAttenuation +
glLightSource[index].linearAttenuation * dist +
glLightSource[index].quadraticAttenuation * dist * dist ),1);
lightDir = normalize(glLightSource[index].position.xyz - v);
}
else
attenFactor = 0;
}
else
{
attenFactor = 1;
lightDir = normalize(glLightSource[index].position.xyz);
}
if(attenFactor > 0)
{
float intensity = max(dot(normal,lightDir),0.0);
vec3 lightColorAmbient = glLightSource[index].ambient.rgb*vertexAmbientColor;
vec3 lightColorDiffuse = glLightSource[index].diffuse.rgb*vertexDiffuseColor*intensity;
gouradDiffuseColor.rgb += (lightColorAmbient + lightColorDiffuse)*attenFactor;
}
}
}
vec4 finalColor=gouradDiffuseColor;
if (colorOp[0]!=D3DTOP_DISABLE)
{
vec3 cubeMapTexCoords;
finalColor=ApplyFunctionForStage(0,finalColor,gouradDiffuseColor,specularColor,texCoords[0], cubeMapTexCoords);
if (colorOp[1]!=D3DTOP_DISABLE)
{
if(enableCubemap)
cubeMapTexCoords=reflect(v,normal);
finalColor=ApplyFunctionForStage(1,finalColor,gouradDiffuseColor,specularColor,texCoords[1], cubeMapTexCoords);
}
}
else
finalColor=gouradDiffuseColor;
if (enableAlphaTest)
if(alphaTestCompareMethod==5)
{
if( finalColor.a <= alphaTestValue)
discard;
}
else if(alphaTestCompareMethod==2)
{
if( finalColor.a > alphaTestValue)
discard;
}
else
finalColor =vec4(1,0,0,1);
if (fogMode > 0)
{
float z;
if(enableRHWCoordinates)
z = RHWdepth;
else
//Radial fog
z = length(v);
const float LOG2E = 1.442695;
float fogFactor;
if (fogMode == 3)
{
fogFactor = (fogEnd - z) * fogScale;
}
else if (fogMode == 1)
{
fogFactor =exp(-glFog.density * z);
}
else if (fogMode == 2)
{
fogFactor = exp2(-glFog.density * glFog.density * z * z * LOG2E);
}
else
fogFactor = 1;
fogFactor = clamp(fogFactor, 0.0, 1.0);
finalColor.rgb = mix(glFog.color.rgb,ToGammaCorrected(finalColor.rgb), fogFactor);
gl_FragColor = vec4((finalColor.rgb), finalColor.a);
}
else
gl_FragColor = vec4(ToGammaCorrected(finalColor.rgb), finalColor.a);
//gl_FragColor = finalColor;
}
-110
View File
@@ -1,110 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Fixed function shader for FLAR by Schmackbolzen
#version 330
out vec2 texCoords[2];
out vec3 N;
out vec3 v;
out float RHWdepth;
out vec4 vertexColor;
out vec4 vertexColorSecondary;
out float fogEnd;
out float fogScale;
struct glFogParameters
{
vec3 color;
float density;
float start;
float end;
};
uniform glFogParameters glFog;
uniform bool enableRHWCoordinates;
uniform mat4 modelViewMat;
uniform mat4 projectionMat;
uniform mat3 normalMat;
uniform vec2 projCorrection[2];
uniform mat4 textureMatrix[2];
uniform bool isInstanced;
uniform bool isInstancedTransparent;
uniform bool isInstancedFog;
uniform bool enableTextureTransform0;
uniform bool enableTextureTransform1;
uniform int texture1Index;
layout (location = 0) in vec4 inPosition;
layout (location = 1) in vec3 inNormal;
layout (location = 2) in vec4 inColor;
layout (location = 3) in vec4 inSecondColor;
layout (location = 4) in vec4 inTexCoord0;
layout (location = 6) in mat4 inModelViewMatInstanced;
layout (location = 10) in float inAlphaValue;
layout (location = 11) in vec2 inFogStartEndInstanced;
void main()
{
mat4 mv;
if(!isInstanced)
mv=modelViewMat;
else
mv=inModelViewMatInstanced;
vertexColor.rgba = (inColor).bgra;
vertexColorSecondary.rgba=inSecondColor.bgra;
if(isInstancedTransparent)
{
vertexColor.a = inAlphaValue;
}
if(!isInstancedFog)
{
fogEnd = glFog.end;
fogScale = 1.0f / (glFog.end - glFog.start);
}
else
{
fogEnd = inFogStartEndInstanced.y;
fogScale = 1.0f / (inFogStartEndInstanced.y - inFogStartEndInstanced.x);
}
v = vec3(mv * inPosition);
N = normalize(mat3(mv) * inNormal);
if (!enableRHWCoordinates)
gl_Position = projectionMat * mv * inPosition;
else
{
const float offset=63.0f / 128.0f;
gl_Position = vec4(((inPosition.x+offset)*projCorrection[0].x-1)*projCorrection[1].x,(1-(inPosition.y+offset)*projCorrection[0].y)*projCorrection[1].y,inPosition.z*2-1,1);
RHWdepth = inPosition.z/inPosition.w;
}
if(enableTextureTransform0)
{
vec4 texCoords0=vec4(inTexCoord0.xy,0,1);
texCoords[0] = (textureMatrix[0]*texCoords0).xy;
}
else
texCoords[0] = inTexCoord0.xy;
if (texture1Index == 0)
if(enableTextureTransform1)
{
vec4 texCoords0=vec4(inTexCoord0.xy,0,1);
texCoords[1] = (textureMatrix[1]*texCoords0).xy;
}
else
texCoords[1] = inTexCoord0.xy;
else if (texture1Index == 1)
if(enableTextureTransform1)
{
vec4 texCoords1=vec4(inTexCoord0.zw,0,1);
texCoords[1] = (textureMatrix[1]*texCoords1).xy;
}
else
texCoords[1] = inTexCoord0.zw;
}
-25
View File
@@ -1,25 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//Simple histogram shader for FLAR by Schmackbolzen
#version 330
#include "ColorConversion.inc"
#define NUM_LIMITS $NUM_LIMITS
in vec2 TexCoords;
uniform sampler2D scene;
uniform vec2 limits[NUM_LIMITS];
uniform int index;
void main()
{
float luma = clamp(ToLuma(texture2D(scene, TexCoords).rgb),limits[0].x,limits[NUM_LIMITS-1].x);
vec2 currentLimits=limits[index];
bool withinLimits;
withinLimits = (luma >= currentLimits.x) && (luma < currentLimits.y);
if (!withinLimits)
discard;
gl_FragDepth= 0;
}
-724
View File
@@ -1,724 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//PBR lighting shader for FLAR by Schmackbolzen
//Sources are either mentioned in the comments below,
//from https://learnopengl.com/PBR/Lighting or https://learnopengl.com/PBR/IBL/Specular-IBL
//or "Parallel-Split Shadow Maps on Programmable GPUs" GPU Gems 3 (2005)
#version 330
#include "ColorConversion.inc"
#define MAX_SHADOWS $MAX_SHADOWS
#define NUM_SPLITS $NUM_SPLITS
#define USE_PCF $USE_PCF
#define USE_HQ_DIFFUSE $USE_HQ_DIFFUSE
#define USE_PARALLAX_MAPS $USE_PARALLAX_MAPS
#define USE_CLUSTERED_SHADING $USE_CLUSTERED_SHADING
//#define SIMPLE_KD
#define IBL_MULTIPLE_SCATTERING
#if USE_CLUSTERED_SHADING == 1
#define NUM_POSSIBLE_LIGHTS $NUM_POSSIBLE_LIGHTS
#define LIGHT_GRID_TILE_DIM_X $LIGHT_GRID_TILE_DIM_X
#define LIGHT_GRID_TILE_DIM_Y $LIGHT_GRID_TILE_DIM_Y
#define LIGHT_GRID_MAX_DIM_X $LIGHT_GRID_MAX_DIM_X
#define LIGHT_GRID_MAX_DIM_Y $LIGHT_GRID_MAX_DIM_Y
#endif
const float PBR_FACTOR = 2;
const float PBR_FACTOR_ENV = 1.5;
in vec3 eyeVec;
in vec3 v,vWorld,worldNormal;
in vec3 N;
in mat3 tbnMatrix,tbnMatrixObj;
in vec4 shadowCoord[MAX_SHADOWS*NUM_SPLITS];
in vec4 texCoords;
in mat3 worldRotMat;
in float alphaValue;
in float fogEnd;
in float fogScale;
struct Light{
vec3 ambient;
vec3 diffuse;
vec4 position;
vec3 spotDirection;
float spotExponent;
float spotCosPhi;
float spotCosTheta;
float constantAttenuation;
float linearAttenuation;
float quadraticAttenuation;
};
struct glFogParameters
{
vec3 color;
vec3 colorLinear;
float density;
float start;
float end;
};
#if USE_CLUSTERED_SHADING == 1
//Has to be 16 byte aligned (otherwise it will be padded)
struct ClusteredLight{
vec4 position;
vec4 diffuse;
};
layout (std140) uniform LightSourceClustered
{
ClusteredLight clusteredLights[NUM_POSSIBLE_LIGHTS];
};
uniform isamplerBuffer clusterLightIndexListsTex;
uniform usamplerBuffer clusterGridTex;
#endif
uniform glFogParameters glFog;
uniform Light glLightSource[8];
uniform sampler2D tex;
uniform sampler2D tex2;
uniform sampler2D heightMap;
uniform sampler2D normalMap;
uniform sampler2D roughnessMap;
uniform sampler2D metalnessMap;
uniform sampler2D reflectionMap;
uniform sampler2D brdfLUT;
uniform sampler2DArrayShadow shadowMap[MAX_SHADOWS];
uniform float splitPlanes[NUM_SPLITS];
uniform samplerCube envMap;
uniform samplerCube irradianceMap;
uniform vec2 texture1Size;
uniform vec2 textureShadowSize;
uniform int lightCount;
uniform int shadowCount;
uniform int tex2Mode;
uniform int fogMode;
uniform float metalnessConst;
uniform float roughnessConst;
uniform float roughnessTextureBias;
uniform mat4 invWorldView;
uniform vec3 camPos;
uniform vec3 ambientColor;
uniform vec3 matAmbientColor;
uniform vec3 matDiffuseColor;
uniform vec3 matEmissiveColor;
uniform int alphaTestCompareMethod;
uniform float alphaTestValue;
uniform bool enableNormalMaps;
uniform bool enableParallaxMaps;
uniform bool enableFirstTexture;
uniform bool enableSecondTexture;
uniform bool enableFog;
uniform bool enableEnvMap;
uniform bool enableTex2Modulate2X;
uniform bool enableRoughnessMap;
uniform bool enableMetalnessMap;
uniform bool enableAlphaTest;
#if USE_CLUSTERED_SHADING == 1
uniform bool enableClusteredShading;
uniform float recNear; /**< 1.0f / g_near */
uniform float recLogSD1; /**< 1.0f / logf(sD + 1.0f), used to compute cluster index. */
#endif
float HEIGHT_SCALE = 0.01;
const float PI = 3.141592654;
out vec4 diffuseColorOut;
float ShadowCalculation(const float bias, const int shadowMapIndex, const int lightIndex, const sampler2DArrayShadow shadowSampler)
{
vec4 fragPosLightSpace = shadowCoord[lightIndex*NUM_SPLITS+shadowMapIndex];
vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w;
#if USE_PCF == 1
float currentDepth = clamp(projCoords.z,0,1);
// Check whether current frag pos is in shadow
//if(projCoords.z <= 1.0)
{
float shadow = 0.0;
vec2 texelSize = 1.0 / vec2(textureShadowSize);
for(int x = -1; x <= 1; ++x)
{
for(int y = -1; y <= 1; ++y)
{
float pcfDepth = clamp(texture(shadowSampler, vec4(projCoords.xy + vec2(x, y) * texelSize, shadowMapIndex, projCoords.z - bias)),0,1);
shadow += pcfDepth;
}
}
shadow *= 1.0/9.0;
return shadow;
}
//else
//return 1;
#else
return texture(shadowSampler, vec4(projCoords.xy, shadowMapIndex, projCoords.z - bias));
#endif
}
float ShadowCalculationForAllSplitPlanes(const int lightIndex, const vec3 lightDirViewSpace, const vec3 normal, float lightIntensity, const sampler2DArrayShadow shadowSampler)
{
float distance = v.z;
float bias = max(0.001 * (1.0 - dot(normal, lightDirViewSpace)), 0.0003);
bool applied = false;
for (int i = 0; i < NUM_SPLITS; i++)
if(!applied && (distance < splitPlanes[i]))
{
lightIntensity *= ShadowCalculation(bias, i, lightIndex, shadowSampler);
applied=true;
//Graphics cards hate break (SLOW), hence boolean value above
//break;
}
return lightIntensity;
}
//Parallax mapping with offset limiting
//You can try different parallax mapping techniques, but they all have problems with steep angles so I decided this is something for later
vec2 ParallaxMapping(vec3 V, vec2 T)
{
// get depth for this fragment
float initialHeight = texture2D(heightMap, T).r-0.5;
// calculate amount of offset for Parallax Mapping With Offset Limiting
vec2 texCoordOffset = HEIGHT_SCALE * V.xy * initialHeight;
// return modified texture coordinates
return T + texCoordOffset;
}
float DistributionGGX(float NdotH, float roughnessSquared)
{
float a = roughnessSquared;
float a2 = a*a;
float NdotH2 = NdotH*NdotH;
float nom = a2;
float denom = NdotH2 * (a2 - 1.0) + 1.0;
denom = PI * denom * denom + 0.0001;
return nom / denom;
}
//"PBR Diffuse Lighting for GGX+Smith Microsurfaces", Earl Hammon, Jr.
float GeometrySmithG2HammonDenom(float NdotL, float NdotV, float roughnessSquared)
{
float denom = mix(2*NdotL*NdotV,NdotL+NdotV,roughnessSquared);
return denom;
}
vec3 fresnelSchlick(float cosTheta, vec3 F0)
{
return F0 + (1.0 - F0) * pow(max(1.0 - cosTheta,0), 5.0);
}
vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness)
{
return F0 + (max(vec3(1.0 - roughness), F0) - F0) * pow(max(1.0 - cosTheta, 0.0), 5.0);
}
struct LightValues
{
vec3 lightVec;
vec3 lightDir;
vec3 lightDirViewSpace;
float attenFactor;
float lightDist;
};
LightValues CalculateLightValues(const int index)
{
LightValues result;
if(glLightSource[index].spotCosTheta != -1.)
{
result.lightVec = glLightSource[index].position.xyz - v;
result.lightDirViewSpace=normalize(result.lightVec);
result.lightDist = length(result.lightVec);
result.lightDir = normalize(result.lightVec);
float angle = max(dot(normalize(glLightSource[index].spotDirection), -result.lightDir),0);
if (angle > glLightSource[index].spotCosPhi)
{
float spotAtten;
if (angle < glLightSource[index].spotCosTheta)
spotAtten = (angle-glLightSource[index].spotCosPhi)/(glLightSource[index].spotCosTheta-glLightSource[index].spotCosPhi);
else
spotAtten = 1;
if(glLightSource[index].spotExponent != 1.0)
spotAtten = pow(spotAtten, glLightSource[index].spotExponent);
result.attenFactor = spotAtten * min(1.0/ (glLightSource[index].constantAttenuation +
glLightSource[index].linearAttenuation * result.lightDist +
glLightSource[index].quadraticAttenuation * result.lightDist * result.lightDist),1);
}
else
result.attenFactor = 0.;
}
else if (glLightSource[index].position.w != 0.0)
{
result.lightVec = glLightSource[index].position.xyz - v;
result.lightDirViewSpace=normalize(result.lightVec);
result.lightDist = length(result.lightVec);
if (enableNormalMaps)
result.lightVec = tbnMatrix*result.lightVec;
result.lightDir = normalize(result.lightVec);
// positional light source
result.attenFactor = clamp(1.0/( glLightSource[index].constantAttenuation +
glLightSource[index].linearAttenuation * result.lightDist +
glLightSource[index].quadraticAttenuation * result.lightDist * result.lightDist ),0,1);
}
else
{
// directional light source
result.attenFactor = 1.0;
if (enableNormalMaps)
{
result.lightDirViewSpace=normalize(glLightSource[index].position.xyz);
result.lightVec = tbnMatrix*glLightSource[index].position.xyz;
result.lightDir = normalize(result.lightVec);
}
else
{
result.lightVec = glLightSource[index].position.xyz;
result.lightDir = normalize(result.lightVec);
result.lightDirViewSpace = result.lightDir;
}
result.lightDist = length(result.lightVec);
}
return result;
}
#if USE_CLUSTERED_SHADING == 1
LightValues CalculateLightValuesClustered(const int index)
{
LightValues result;
result.lightVec = clusteredLights[index].position.xyz - v;
result.lightDirViewSpace=normalize(result.lightVec);
result.lightDist = length(result.lightVec);
if (enableNormalMaps)
result.lightVec = tbnMatrix*result.lightVec;
result.lightDir = normalize(result.lightVec);
// positional light source
float inner = 0.0;
float att = max(1.0 - max(0.0, (result.lightDist - inner) / (clusteredLights[index].position.w - inner)), 0.0);
result.attenFactor = att;
return result;
}
#endif
vec3 ApplyAmbientLight(const int index,const vec3 firstTexture, const float intensity, vec3 lightSum)
{
vec3 IAmbient = (matAmbientColor)*(PBR_FACTOR*glLightSource[index].ambient)*firstTexture;
lightSum.rgb += IAmbient*intensity;
return lightSum;
}
vec3 ApplyPBRLight(vec3 lightDiffuseColor, const LightValues lightValues, const vec3 mapNormal, const vec3 eyeV, const vec3 F0, const float roughness, const vec3 IDiffuse, const vec3 firstTexture, vec3 lightSum, const float metalness)
{
float visible = 1.0;
float intensity = lightValues.attenFactor;
//vec3 IAmbient = (matAmbientColor.rgb)*(PBR_FACTOR*glLightSource[index].ambient)*firstTexture;
//lightSum.rgb += IAmbient*intensity;
vec3 L = lightValues.lightDir;
vec3 V = normalize(eyeV);
vec3 H = normalize(L + V);
vec3 reflected;
vec3 N = mapNormal;
float HdotV = max(dot(H, V), 0.0);
float NdotL = max(dot(N, L), 0.0);
float NdotV = max(dot(N, V), 0.0001);
float NdotH = max(dot(N, H), 0.0001);
vec3 F = fresnelSchlick(HdotV, F0);
// Cook-Torrance BRDF
float roughnessSquared = roughness*roughness;
float NDF = DistributionGGX(NdotH, roughnessSquared);
vec3 nominator = NDF * F;
float denominator = 2.0 * GeometrySmithG2HammonDenom(NdotV, NdotL, roughnessSquared) + 0.00001; // 0.00001 to prevent divide by zero.
vec3 specular = nominator/denominator;
#ifndef SIMPLE_KD
vec3 kD=mix(vec3(1.0)-F,vec3(0.0),metalness);
#else
float kD = 1.0 - metalness;
#endif
#if USE_HQ_DIFFUSE == 1
//GGX Diffuse Approximation from
//"PBR Diffuse Lighting for GGX+Smith Microsurfaces, Earl Hammon, Jr."
float LdotV = dot(L, V);
float facing = 0.5+0.5*LdotV;
float rough = facing*(0.9-0.4*facing)*(.5/(NdotH+0.05) + 1); //+0.05 to prevent too large values
float smooth_ = 1.05*(1-pow(1-NdotL,5))*(1-pow(1-NdotV,5));
float single = 1./PI*mix(smooth_, rough, roughnessSquared);
float multi = 0.1159*roughnessSquared;
vec3 diffuse = kD*IDiffuse.rgb*(single+IDiffuse.rgb*multi);
#else
vec3 diffuse = kD*IDiffuse.rgb/PI;
#endif
lightSum+= PBR_FACTOR*lightDiffuseColor*(diffuse + specular)*intensity*NdotL;
return lightSum;
}
vec3 ApplyLight(const int index, const LightValues lightValues, const vec3 mapNormal, const vec3 eyeV, const vec3 F0, const float roughness, const vec3 IDiffuse, const vec3 firstTexture, vec3 lightSum, const float metalness)
{
lightSum=ApplyAmbientLight(index, firstTexture, lightValues.attenFactor, lightSum);
lightSum=ApplyPBRLight(glLightSource[index].diffuse.rgb, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse, firstTexture, lightSum, metalness);
return lightSum;
}
#if USE_CLUSTERED_SHADING == 1
//Clustered shading code partially from
//"Demo code implementing Clustered Forward Shading, accompanying the talk
//'Tiled and Clustered Forward Shading' presented at Siggraph 2012."
/**
* Computes the {i,j,k} integer index into the cluster grid. For details see our paper:
* 'Clustered Deferred and Forward Shading'
* http://www.cse.chalmers.se/~olaolss/main_frame.php?contents=publication&id=clustered_shading
*/
ivec3 calcClusterLoc(vec2 fragPos, float viewSpaceZ)
{
// i and j coordinates are just the same as tiled shading, and based on screen space position.
ivec2 l = ivec2(int(fragPos.x) / LIGHT_GRID_TILE_DIM_X, int(fragPos.y) / LIGHT_GRID_TILE_DIM_Y);
// k is based on the log of the view space Z coordinate.
float gridLocZ = log(viewSpaceZ * recNear) * recLogSD1;
return ivec3(l, int(gridLocZ));
}
/**
* Linearlizes the 3D cluster location into an offset, which can be used as an
* address into a linear buffer.
*/
int calcClusterOffset(ivec3 clusterLoc)
{
return (clusterLoc.z * LIGHT_GRID_MAX_DIM_Y + clusterLoc.y) * LIGHT_GRID_MAX_DIM_X + clusterLoc.x;
}
/**
* Convenience shorthand function, see above...
*/
int calcClusterOffset(vec2 fragPos, float viewSpaceZ)
{
return calcClusterOffset(calcClusterLoc(fragPos, viewSpaceZ));
}
vec3 ApplyClusteredLights(const vec3 mapNormal, const vec3 eyeV, const vec3 F0, const float roughness, const vec3 IDiffuse, const vec3 firstTexture, vec3 lightSum, const float metalness)
{
// fetch cluster data (i.e. offset to light indices, and numer of lights) from grid buffer.
uvec2 offsetCount = texelFetch(clusterGridTex, calcClusterOffset(gl_FragCoord.xy, v.z)).xy;
int lightOffset = int(offsetCount.x);
int lightCount = int(offsetCount.y);
for (int i = 0; i < lightCount; ++i)
{
// fetch light index from list of lights for the cluster.
int lightIndex = texelFetch(clusterLightIndexListsTex, lightOffset + i).x;
LightValues lightValues = CalculateLightValuesClustered(lightIndex);
// compute and accumulate shading.
lightSum = ApplyPBRLight(clusteredLights[lightIndex].diffuse.rgb*2, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse, firstTexture, lightSum, metalness);
}
return lightSum;
}
#endif
void main(void)
{
float fogFactor = 0;
if (enableFog && fogMode > 0)
{
//Radial fog
float z = length(v);
if (fogMode == 3)
{
fogFactor = (fogEnd - z) * fogScale;
}
else if (fogMode == 1)
{
fogFactor = exp(-glFog.density * z);
}
else if (fogMode == 2)
{
fogFactor = exp(- pow(z * glFog.density,2));
}
fogFactor = clamp(fogFactor, 0.0, 1.0);
}
vec3 eyeV=normalize(eyeVec);
vec3 normal=normalize(N);
vec2 texCoordsProcessed;
#if USE_PARALLAX_MAPS == 1
if (enableParallaxMaps)
texCoordsProcessed = ParallaxMapping(eyeV, texCoords.st);
else
#endif
texCoordsProcessed = texCoords.st;
vec4 firstTexture;
vec4 lightSum = vec4(0);
if (enableFirstTexture)
{
firstTexture = texture2D(tex, texCoordsProcessed);
if (enableSecondTexture)
{
if(tex2Mode == 0)
{
firstTexture *= texture2D(tex2, texCoords.pq);
if (enableTex2Modulate2X)
firstTexture.rgb*=4.6; //2^2.2 since rendering is gamma correct
}
else
{
lightSum.rgb += texture2D(tex2, texCoords.pq).rgb;
}
}
}
else{
firstTexture = vec4(1,1,1,1);
}
float alpha = alphaValue*firstTexture.a;
if (enableAlphaTest)
if(alphaTestCompareMethod==5)
{
if( alpha <= alphaTestValue)
discard;
}
else if(alphaTestCompareMethod==2)
{
if( alpha > alphaTestValue)
discard;
}
else
firstTexture =vec4(1,0,0,1);
vec3 mapNormal;
if (enableNormalMaps)
{
vec3 textureNormal = texture2D(normalMap, texCoordsProcessed).rgb;
textureNormal.xy = (textureNormal.rg * 2.0 - 1.0);
textureNormal.z = sqrt(1.0-dot(textureNormal.xy,textureNormal.xy));
mapNormal = normalize(textureNormal.xyz);
}
else
mapNormal = normal;
lightSum+=vec4(((matEmissiveColor.rgb))* firstTexture.rgb, alpha);
float metalness;
if (enableMetalnessMap)
{
metalness=texture2D(metalnessMap, texCoordsProcessed.st).r;
}
else
{
metalness=metalnessConst;
}
vec3 IDiffuse = (matDiffuseColor)*firstTexture.rgb;
float roughness;
if (enableRoughnessMap)
{
roughness=clamp(roughnessTextureBias+texture2D(roughnessMap, texCoordsProcessed.st).r,0.0,1.0);
}
else
{
roughness=roughnessConst;
}
#define DIELECTRIC_SPECULAR 0.04
vec3 F0 = mix(vec3(DIELECTRIC_SPECULAR), IDiffuse, metalness);
if (enableEnvMap)
{
vec3 n;
if (enableNormalMaps)
n=normalize( worldRotMat * (tbnMatrixObj * mapNormal ));
else
n=normalize(worldNormal);
vec3 v = normalize( camPos - vWorld);
vec3 reflectDir = reflect(-v, n);
const float MAX_REFLECTION_LOD = 7;
float lod = roughness * (2.0 - roughness) * MAX_REFLECTION_LOD;
vec3 irradiance;
vec3 radiance;
if (enableFog)
{
vec3 ambientTint=PBR_FACTOR_ENV*glFog.colorLinear.rgb;
irradiance = vec3(texture(irradianceMap, n).r)*ambientTint;
radiance = vec3(textureLod(envMap, reflectDir, lod).r)*ambientTint;
}
else
{
irradiance = texture(irradianceMap, n).rgb*PBR_FACTOR_ENV;
radiance = textureLod(envMap, reflectDir, lod).rgb*PBR_FACTOR_ENV;
}
float NdotV = max(dot(n,v),0.0);
vec2 brdf = texture(brdfLUT, vec2(NdotV, roughness)).rg;
#ifdef IBL_MULTIPLE_SCATTERING
vec3 diffuseColor = mix(IDiffuse.rgb, vec3(0), metalness);
// Multiple scattering, from:
//"A Multiple-Scattering Microfacet Model for Real-Time Image-based Lighting", Carmelo J. Fdez-Agüera
vec3 kS = F0;
vec3 FssEss = kS * brdf.x + brdf.y;
float Ess = brdf.x + brdf.y;
float Ems = 1.0-Ess;
vec3 Favg = F0 + (1.0-F0)/21.0;
vec3 Fms = FssEss*Favg/(1.0-Ems*Favg);
vec3 FmsEms = Fms * Ems;
// Dielectrics
vec3 Edss = 1.0 - (FssEss + FmsEms);
vec3 kD = diffuseColor * Edss;
// Composition
lightSum.rgb += FssEss * radiance + (FmsEms+kD) * irradiance;
#else
vec3 diffuse = irradiance * IDiffuse;
vec3 F = fresnelSchlickRoughness(NdotV, F0, roughness);
#ifndef SIMPLE_KD
vec3 kD=mix(vec3(1.0)-F,vec3(0.0),metalness);
#else
float kD = 1.0 - metalness;
#endif
vec3 specular = radiance * (F0 * brdf.x + brdf.y);
lightSum.rgb += kD*diffuse + specular;
#endif
}
else
{
if (enableNormalMaps)
{
vec3 dir = vec3(0,0,1);
float ambientIntensity = dot(dir,mapNormal);
lightSum.rgb+=matAmbientColor.rgb * ambientColor.rgb* ambientIntensity*IDiffuse.rgb;
}
else
lightSum.rgb+=matAmbientColor.rgb * ambientColor.rgb* IDiffuse.rgb;
}
//Unrolled loop and a separated shadow pass to help some glsl compilers. Also some glsl compilers need a constant value (not variable!) for sampler arrays.
if(lightCount > 0)
{
const int lightIndex = 0;
LightValues lightValues = CalculateLightValues(lightIndex);
#if MAX_SHADOWS > 0
if (shadowCount > 0)
lightValues.attenFactor = ShadowCalculationForAllSplitPlanes(lightIndex, lightValues.lightDirViewSpace, normal, lightValues.attenFactor, shadowMap[0]);
#endif
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if(lightCount > 1)
{
const int lightIndex = 1;
LightValues lightValues = CalculateLightValues(lightIndex);
#if MAX_SHADOWS > 1
if (shadowCount > 1)
lightValues.attenFactor = ShadowCalculationForAllSplitPlanes(lightIndex, lightValues.lightDirViewSpace, normal, lightValues.attenFactor, shadowMap[1]);
#endif
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if (lightCount > 2)
{
const int lightIndex = 2;
LightValues lightValues = CalculateLightValues(lightIndex);
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if (lightCount > 3)
{
const int lightIndex = 3;
LightValues lightValues = CalculateLightValues(lightIndex);
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if (lightCount > 4)
{
const int lightIndex = 4;
LightValues lightValues = CalculateLightValues(lightIndex);
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if (lightCount > 5)
{
const int lightIndex = 5;
LightValues lightValues = CalculateLightValues(lightIndex);
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if (lightCount > 6)
{
const int lightIndex = 6;
LightValues lightValues = CalculateLightValues(lightIndex);
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
if (lightCount > 7)
{
const int lightIndex = 7;
LightValues lightValues = CalculateLightValues(lightIndex);
lightSum.rgb = ApplyLight(lightIndex, lightValues, mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
}
#if USE_CLUSTERED_SHADING == 1
if(enableClusteredShading)
lightSum.rgb = ApplyClusteredLights(mapNormal, eyeV, F0, roughness, IDiffuse.rgb, firstTexture.rgb, lightSum.rgb, metalness);
#endif
vec4 finalColor = lightSum;
if (enableFog && fogMode > 0)
{
finalColor.rgb = mix(glFog.color.rgb,ToGammaCorrected(finalColor.rgb), fogFactor);
diffuseColorOut=vec4(finalColor.rgb,finalColor.a);
}
else
diffuseColorOut=vec4(ToGammaCorrected(finalColor.rgb),finalColor.a);
}
-146
View File
@@ -1,146 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//PBR lighting shader for FLAR by Schmackbolzen
#version 330
#define MAX_SHADOWS $MAX_SHADOWS
#define NUM_SPLITS $NUM_SPLITS
out vec3 eyeVec;
out vec3 v,vWorld,worldNormal;
out mat3 tbnMatrix,tbnMatrixObj;
out vec3 N;
out vec4 shadowCoord[MAX_SHADOWS*NUM_SPLITS];
out vec4 texCoords;
out mat3 worldRotMat;
out float alphaValue;
out float fogEnd;
out float fogScale;
struct glFogParameters
{
vec3 color;
vec3 colorLinear;
float density;
float start;
float end;
};
uniform glFogParameters glFog;
uniform mat4 depthBiasMVP[MAX_SHADOWS*NUM_SPLITS];
uniform mat4 modelViewMat;
uniform mat4 projectionMat;
uniform mat4 invViewMat;
uniform mat4 textureMatrix[2];
uniform bool enableNormalMaps;
uniform int shadowCount;
uniform bool enableEnvMap;
uniform bool isInstanced;
uniform bool isInstancedTransparent;
uniform bool isInstancedFog;
uniform float matDiffuseAlpha;
uniform int tex2Mode;
uniform int texture1Index;
layout (location = 0) in vec4 inPosition;
layout (location = 1) in vec3 inNormal;
layout (location = 2) in vec4 inColor;
layout (location = 3) in vec4 inSecondColor;
layout (location = 4) in vec4 inTexCoord0;
layout (location = 5) in vec4 inTexCoord2;
layout (location = 6) in mat4 inModelViewMatInstanced;
layout (location = 10) in float inAlphaValueInstanced;
layout (location = 11) in vec2 inFogStartEndInstanced;
const mat4 biasMatrix = mat4(0.5f, 0.0f, 0.0f, 0.0f,
0.0f, 0.5f, 0.0f, 0.0f,
0.0f, 0.0f, 0.5f, 0.0f,
0.5f, 0.5f, 0.5f, 1.0f);
void main(void)
{
mat4 mv;
if(!isInstanced)
mv=modelViewMat;
else
mv=inModelViewMatInstanced;
if(!isInstancedTransparent)
{
alphaValue = matDiffuseAlpha;
}
else
{
alphaValue = inAlphaValueInstanced;
}
if(!isInstancedFog)
{
fogEnd = glFog.end;
fogScale = 1 / (glFog.end - glFog.start);
}
else
{
fogEnd = inFogStartEndInstanced.y;
fogScale = 1 / (inFogStartEndInstanced.y - inFogStartEndInstanced.x);
}
mat3 normalMat = mat3(mv);
v = vec3(mv * inPosition);
mat4 worldMat = invViewMat*mv;
if(enableEnvMap)
{
vWorld = vec3(worldMat * inPosition);
worldRotMat = mat3(worldMat);
worldNormal = worldRotMat * inNormal;
}
if (shadowCount > 0)
{
for(int i=0;i<NUM_SPLITS;i++)
shadowCoord[i] = biasMatrix*depthBiasMVP[i] * worldMat * inPosition;
if (shadowCount > 1)
for(int i=0;i<NUM_SPLITS;i++)
shadowCoord[NUM_SPLITS+i] = biasMatrix*depthBiasMVP[NUM_SPLITS+i] * worldMat * inPosition;
}
N = normalize(normalMat*inNormal);
if (enableNormalMaps)
{
vec3 TO = normalize(vec3(inTexCoord2.s,inTexCoord2.t,inTexCoord2.p));
//TO = normalize(TO - dot(TO, inNormal) * inNormal);
vec3 BO = normalize(cross(inNormal,TO)*(inTexCoord2.q));
vec3 TA=normalMat*TO;
vec3 BA=normalMat*BO;
vec3 T=normalize(TA);
vec3 B=normalize(BA);
tbnMatrix = mat3(T.x, B.x, N.x,
T.y, B.y, N.y,
T.z, B.z, N.z);
tbnMatrixObj = mat3(TO,BO,inNormal.xyz);
eyeVec = tbnMatrix*(-v);
}
else
eyeVec = -v;
gl_Position = projectionMat * mv * inPosition;
vec4 texCoords0=vec4(inTexCoord0.xy,0,1);
vec4 texCoords1=vec4(inTexCoord0.zw,0,1);
texCoords.xy = (textureMatrix[0]*texCoords0).xy;
//texCoords.zw = (textureMatrix[1]*vec4(inTexCoord0.zw,0,1)).zw;
if (texture1Index == 0)
texCoords.zw = (textureMatrix[1]*texCoords0).xy;
else if (texture1Index == 1)
texCoords.zw = (textureMatrix[1]*texCoords1).zw;
}
-13
View File
@@ -1,13 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//No material shader for FLAR by Schmackbolzen
#version 330
uniform vec3 color;
void main()
{
gl_FragColor = vec4(color,1);
}
-23
View File
@@ -1,23 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//No material shader for FLAR by Schmackbolzen
#version 330
uniform mat4 modelViewMat;
uniform mat4 projectionMat;
uniform bool isInstanced;
layout (location = 0) in vec4 inPosition;
layout (location = 6) in mat4 inModelViewMatInstanced;
void main()
{
mat4 mv;
if(!isInstanced)
mv=modelViewMat;
else
mv=inModelViewMatInstanced;
gl_Position = projectionMat * mv * inPosition;
}
-234
View File
@@ -1,234 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Post processing shader for FLAR by Schmackbolzen
//Sources are mentioned in the comments
#version 330
#include "ColorConversion.inc"
#define USE_CURVE $USE_CURVE
#define USE_PBR_BLOOM $USE_PBR_BLOOM
in vec2 TexCoords;
uniform sampler2D scene;
#if USE_PBR_BLOOM == 1
uniform sampler2D bloomtex;
#endif
uniform float exposure;
uniform float exposureLowerLimit;
//https://github.com/TheRealMJP/BakingLab/blob/master/BakingLab/ACES.hlsl
//ACES fit by Steven Hill
// sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT
const mat3 ACESInputMat = mat3(
0.59719, 0.07600, 0.02840,
0.35458, 0.90834, 0.13383,
0.04823, 0.01566, 0.83777);
// ODT_SAT => XYZ => D60_2_D65 => sRGB
const mat3 ACESOutputMat = mat3(
1.60475, -0.10208, -0.00327,
-0.53108, 1.10813, -0.07276,
-0.07367, -0.00605, 1.07602
);
vec3 RRTAndODTFit(vec3 v)
{
vec3 a = v * (v + 0.0245786f) - 0.000090537f;
vec3 b = v * (0.983729f * v + 0.4329510f) + 0.238081f;
return a / b;
}
vec3 ACESFitted(vec3 color)
{
color = ACESInputMat * color;
// Apply RRT and ODT
color = RRTAndODTFit(color);
color = ACESOutputMat * color;
// Clamp to [0, 1]
color = clamp(color,0.,1.);
return color;
}
// Uchimura 2017, "HDR theory and practice"
// Math: https://www.desmos.com/calculator/gslcdxvipg
// Source: https://www.slideshare.net/nikuque/hdr-theory-and-practicce-jp
// Used in "Gran Turismo Sport" game
vec3 uchimura(vec3 x, float P, float a, float m, float l, float c, float b) {
float l0 = ((P - m) * l) / a;
float L0 = m - m / a;
float L1 = m + (1.0 - m) / a;
float S0 = m + l0;
float S1 = m + a * l0;
float C2 = (a * P) / (P - S1);
float CP = -C2 / P;
vec3 w0 = vec3(1.0 - smoothstep(0.0, m, x));
vec3 w2 = vec3(step(m + l0, x));
vec3 w1 = vec3(1.0 - w0 - w2);
vec3 T = vec3(m * pow(x / m, vec3(c)) + b);
vec3 S = vec3(P - (P - S1) * exp(CP * (x - S0)));
vec3 L = vec3(m + a * (x - m));
return T * w0 + L * w1 + S * w2;
}
vec3 uchimura(vec3 x) {
const float P = 1.0; // max display brightness
const float a = 1.0; // contrast
const float m = 0.22; // linear section start
const float l = 0.4; // linear section length
const float c = 1.33; // black
const float b = 0.0; // pedestal
return uchimura(x, P, a, m, l, c, b);
}
//new agx from https://github.com/godotengine/godot/pull/106940
//C++ Code moved to shader by me (Schmackbolzen):
const float tonemap_agx_white = 16.29; // Default to Blender's AgX white.
const float tonemap_agx_contrast = 1.25;
const float output_max_value = 1.0;
// Calculate allenwp tonemapping curve parameters on the CPU to improve shader performance.
// Source and details: https://allenwp.com/blog/2025/05/29/allenwp-tonemapping-curve/
// These constants must match the those in the shader code.
// 18% "middle gray" is perceptually 50% of the brightness of reference white.
const float awp_crossover_point = 0.18;
// When output_max_value and/or awp_crossover_point are no longer constant, awp_shoulder_max can
// be calculated on the CPU and passed in as tonemap_parameters.tonemap_e.
const float awp_shoulder_max = output_max_value - awp_crossover_point;
// awp_toe_a is a solution generated by Mathematica that ensures intersection at awp_crossover_point.
const float awp_toe_a = ((1.0 / awp_crossover_point) - 1.0) * pow(awp_crossover_point, tonemap_agx_contrast);
// Slope formula is simply the derivative of the toe function with an input of awp_crossover_point.
const float awp_slope_denom = pow(awp_crossover_point, tonemap_agx_contrast) + awp_toe_a;
const float awp_slope = (tonemap_agx_contrast * pow(awp_crossover_point, tonemap_agx_contrast - 1.0) * awp_toe_a) / (awp_slope_denom * awp_slope_denom);
const float awp_high_clip = tonemap_agx_white;
const float awp_w=pow(awp_high_clip - awp_crossover_point,2)/awp_shoulder_max*awp_slope;
const float awp_contrast = tonemap_agx_contrast;
//End c++ code
// allenwp tonemapping curve; developed for use in the Godot game engine.
// Source and details: https://allenwp.com/blog/2025/05/29/allenwp-tonemapping-curve/
// Input must be a non-negative linear scene value.
vec3 allenwp_curve(vec3 x) {
// Reinhard-like shoulder:
vec3 s = x - awp_crossover_point;
vec3 slope_s = awp_slope * s;
s = slope_s * (1.0 + s / awp_w) / (1.0 + (slope_s / awp_shoulder_max));
s += awp_crossover_point;
// Sigmoid power function toe:
vec3 t = pow(x, vec3(awp_contrast));
t = t / (t + awp_toe_a);
return mix(s, t, lessThan(x, vec3(awp_crossover_point)));
}
// This is an approximation and simplification of EaryChow's AgX implementation that is used by Blender.
// This code is based off of the script that generates the AgX_Base_sRGB.cube LUT that Blender uses.
// Source: https://github.com/EaryChow/AgX_LUT_Gen/blob/main/AgXBasesRGB.py
// Colorspace transformation source: https://www.colour-science.org:8010/apps/rgb_colourspace_transformation_matrix
vec3 tonemap_agx(vec3 color) {
// Input color should be non-negative!
// Large negative values in one channel and large positive values in other
// channels can result in a colour that appears darker and more saturated than
// desired after passing it through the inset matrix. For this reason, it is
// best to prevent negative input values.
// This is done before the Rec. 2020 transform to allow the Rec. 2020
// transform to be combined with the AgX inset matrix. This results in a loss
// of color information that could be correctly interpreted within the
// Rec. 2020 color space as positive RGB values, but is often not worth
// the performance cost of an additional matrix multiplication.
//
// Additionally, this AgX configuration was created subjectively based on
// output appearance in the Rec. 709 color gamut, so it is possible that these
// matrices will not perform well with non-Rec. 709 output (more testing with
// future wide-gamut displays is be needed).
// See this comment from the author on the decisions made to create the matrices:
// https://github.com/godotengine/godot-proposals/issues/12317#issuecomment-2835824250
// Combined Rec. 709 to Rec. 2020 and Blender AgX inset matrices:
const mat3 rec709_to_rec2020_agx_inset_matrix = mat3(
0.544814746488245, 0.140416948464053, 0.0888104196149096,
0.373787398372697, 0.754137554567394, 0.178871756420858,
0.0813978551390581, 0.105445496968552, 0.732317823964232);
// Combined inverse AgX outset matrix and Rec. 2020 to Rec. 709 matrices.
const mat3 agx_outset_rec2020_to_rec709_matrix = mat3(
1.96488741169489, -0.299313364904742, -0.164352742528393,
-0.855988495690215, 1.32639796461980, -0.238183969428088,
-0.108898916004672, -0.0270845997150571, 1.40253671195648);
// Apply inset matrix.
color = rec709_to_rec2020_agx_inset_matrix * color;
// Use the allenwp tonemapping curve to match the Blender AgX curve while
// providing stability across all variable dyanimc range (SDR, HDR, EDR).
color = allenwp_curve(color);
// Clipping to output_max_value is required to address a cyan colour that occurs
// with very bright inputs.
color = min(vec3(output_max_value), color);
// Apply outset to make the result more chroma-laden and then go back to Rec. 709.
color = agx_outset_rec2020_to_rec709_matrix * color;
// Blender's lusRGB.compensate_low_side is too complex for this shader, so
// simply return the color, even if it has negative components. These negative
// components may be useful for subsequent color adjustments.
return color;
}
#if USE_PBR_BLOOM == 1
const float bloomStrength = 0.2f;
vec4 bloom_new()
{
vec4 hdrColor = texture(scene, TexCoords);
//hdrColor.rgb=vec3(0);
vec3 bloomColor = texture(bloomtex, TexCoords).rgb;
//Blend in linear space
/*hdrColor.rgb=ToLinear(hdrColor.rgb);
bloomColor=ToLinear(bloomColor);*/
vec4 blended=vec4(mix(hdrColor.rgb, bloomColor, bloomStrength),hdrColor.a); // linear interpolation
//Blend in gamma corrected space
blended.rgb=ToLinear(blended.rgb);
return blended;
}
#endif
void main()
{
#if USE_PBR_BLOOM == 0
vec4 color = texture2D(scene, TexCoords);
//Not a nice solution to convert two times (ideally there would be none), but not easily solvable currently
color.rgb = ToLinear(color.rgb);
#else
vec4 color = bloom_new();
#endif
//Exposure is chosen so that all curves have about the same brightness and the look is fine with very bright starspheres like in Tau-37
#if USE_CURVE == 0
color.rgb =tonemap_agx(exposure*color.rgb);
#elif USE_CURVE == 1
color.rgb=ACESFitted(exposure*color.rgb);
#elif USE_CURVE == 2
color.rgb=uchimura(exposure*color.rgb);
#endif
color.rgb=ToGammaCorrected(color.rgb);
gl_FragColor = color;
}
-16
View File
@@ -1,16 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Post processing shader for FLAR by Schmackbolzen
#version 330
layout (location = 0) in vec4 vertex;
out vec2 TexCoords;
void main()
{
gl_Position = vec4(vertex.xy, 1.0f, 1.0f);
vec2 texture = vertex.zw;
TexCoords = texture;
}
@@ -1,46 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://fabiensanglard.net/lightScattering/index.php which is based on
//"Volumetric Light Scattering as a Post-Process" GPU Gems 3 (2005) and
//"Light Shaft Rendering" ShadersX3 (2004).
#version 330
#define MAX_NUM_LIGHTS $MAX_NUM_LIGHTS
in vec2 TexCoords;
uniform float exposure;
uniform float decay;
uniform float density;
uniform float weight;
uniform vec2 lightPositionOnScreen[MAX_NUM_LIGHTS];
uniform sampler2D myTexture;
uniform int numActiveLights;
const int NUM_SAMPLES = 75;
void main()
{
vec4 result = vec4(0);
for (int lightIndex = 0; lightIndex < MAX_NUM_LIGHTS && lightIndex < numActiveLights; lightIndex++ )
{
vec2 deltaTextCoord = vec2( TexCoords.st - lightPositionOnScreen[lightIndex].xy );
vec2 textCoord = TexCoords.st;
deltaTextCoord *= 1.0 / float(NUM_SAMPLES) * density;
float illuminationDecay = 1.0;
for(int i=0; i < NUM_SAMPLES ; i++)
{
textCoord -= deltaTextCoord;
vec4 sample = texture2D(myTexture, textCoord );
sample *= illuminationDecay * weight;
result += sample;
illuminationDecay *= decay;
}
}
result=min(result,vec4(NUM_SAMPLES*weight));
result *= exposure;
gl_FragColor = result;
}
@@ -1,18 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://fabiensanglard.net/lightScattering/index.php which is based on
//"Volumetric Light Scattering as a Post-Process" GPU Gems 3 (2005) and
//"Light Shaft Rendering" ShadersX3 (2004).
#version 330
layout (location = 0) in vec4 vertex;
out vec2 TexCoords;
void main()
{
gl_Position = vec4(vertex.xy, 0.0f, 1.0f);
vec2 texture = vertex.zw;
TexCoords = texture;
}
-129
View File
@@ -1,129 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//Code based on https://learnopengl.com/PBR/IBL/Specular-IBL
#version 330
in vec3 WorldPos;
uniform samplerCube environmentMap;
uniform float roughness;
uniform bool convertToLinear;
uniform bool copyOnly;
const float PI = 3.14159265359;
vec3 ToGammaCorrected(vec3 inColor){
return pow(inColor.rgb,1./vec3(2.2));
}
vec3 ToLinear(vec3 inColor){
return pow(inColor,vec3(2.2));
}
// ----------------------------------------------------------------------------
float DistributionGGX(vec3 N, vec3 H, float roughness)
{
float a = roughness*roughness;
float a2 = a*a;
float NdotH = max(dot(N, H), 0.0);
float NdotH2 = NdotH*NdotH;
float nom = a2;
float denom = (NdotH2 * (a2 - 1.0) + 1.0);
denom = PI * denom * denom + 0.0001;
return nom / denom;
}
// ----------------------------------------------------------------------------
// http://holger.dammertz.org/stuff/notes_HammersleyOnHemisphere.html
// efficient VanDerCorpus calculation.
float RadicalInverse_VdC(uint bits)
{
bits = (bits << 16u) | (bits >> 16u);
bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
return float(bits) * 2.3283064365386963e-10; // / 0x100000000
}
// ----------------------------------------------------------------------------
vec2 Hammersley(uint i, uint N)
{
return vec2(float(i)/float(N), RadicalInverse_VdC(i));
}
// ----------------------------------------------------------------------------
vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness)
{
float a = roughness*roughness;
float phi = 2.0 * PI * Xi.x;
float cosTheta = sqrt((1.0 - Xi.y) / (1.0 + (a*a - 1.0) * Xi.y));
float sinTheta = sqrt(1.0 - cosTheta*cosTheta);
// from spherical coordinates to cartesian coordinates - halfway vector
vec3 H;
H.x = cos(phi) * sinTheta;
H.y = sin(phi) * sinTheta;
H.z = cosTheta;
// from tangent-space H vector to world-space sample vector
vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
vec3 tangent = normalize(cross(up, N));
vec3 bitangent = cross(N, tangent);
vec3 sampleVec = tangent * H.x + bitangent * H.y + N * H.z;
return normalize(sampleVec);
}
// ----------------------------------------------------------------------------
void main()
{
vec3 N = normalize(WorldPos);
// make the simplyfying assumption that V equals R equals the normal
vec3 R = N;
vec3 V = R;
if (!copyOnly)
{
const uint SAMPLE_COUNT = 1024u;
vec3 prefilteredColor = vec3(0.0);
float totalWeight = 0.0;
for(uint i = 0u; i < SAMPLE_COUNT; ++i)
{
// generates a sample vector that's biased towards the preferred alignment direction (importance sampling).
vec2 Xi = Hammersley(i, SAMPLE_COUNT);
vec3 H = ImportanceSampleGGX(Xi, N, roughness);
vec3 L = normalize(2.0 * dot(V, H) * H - V);
float NdotL = max(dot(N, L), 0.0);
if(NdotL > 0.0)
{
// sample from the environment's mip level based on roughness/pdf
float D = DistributionGGX(N, H, roughness);
float NdotH = max(dot(N, H), 0.0);
float HdotV = max(dot(H, V), 0.0);
float pdf = D * NdotH / (4.0 * HdotV + 0.0001);
float resolution = 1024.0; // resolution of source cubemap (per face)
float saTexel = 4.0 * PI / (6.0 * resolution * resolution);
float saSample = 1.0 / (float(SAMPLE_COUNT) * pdf + 0.0001);
float mipLevel = roughness == 0.0 ? 0.0 : 0.5 * log2(saSample / saTexel);
vec3 texColor=textureLod(environmentMap, L, mipLevel).rgb;
if(convertToLinear)
texColor=ToLinear(texColor);
prefilteredColor += texColor * NdotL;
totalWeight += NdotL;
}
}
prefilteredColor = prefilteredColor / totalWeight;
gl_FragColor = vec4(ToGammaCorrected(prefilteredColor), 1.0);
//gl_FragColor = vec4(prefilteredColor, 1.0);
}
else
gl_FragColor = vec4(textureLod(environmentMap, V, 0).rgb, 1.0);
}
-14
View File
@@ -1,14 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//Simple color shader for FLAR by Schmackbolzen
#version 330
in vec3 currentColor;
void main()
{
gl_FragColor = vec4(currentColor,1);
}
-36
View File
@@ -1,36 +0,0 @@
//This shader file is part of FLAR - Advanced Renderer for Freelancer by Schmackbolzen
//If you use the supplied shader files you may not modify them unless you state in them what you changed
//and also mention the source or who the author is.
//
//Simple color shader for FLAR by Schmackbolzen
#version 330
uniform mat4 modelViewMat;
uniform mat4 projectionMat;
uniform vec3 position;
uniform vec3 color;
uniform float size;
uniform bool isInstanced;
layout (location = 0) in vec3 inVertex;
layout (location = 1) in vec3 inPositionInstanced;
layout (location = 2) in float inSizeInstanced;
layout (location = 3) in vec3 inColorInstanced;
out vec3 currentColor;
void main()
{
vec3 worldSpacePos;
if(!isInstanced)
{
currentColor=color;
worldSpacePos=size * inVertex + position;
}
else
{
currentColor=inColorInstanced;
worldSpacePos=inSizeInstanced * inVertex + inPositionInstanced;
}
gl_Position = projectionMat * modelViewMat * vec4(worldSpacePos,1);
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More