├── .gitattributes
├── .gitignore
├── LICENSE.md
├── README.md
├── bin
├── audio_music_stream.exe
├── core_2d_camera.exe
├── models_billboard.exe
├── raylib.dll
├── res
│ ├── fonts
│ │ ├── AnonymousPro-Bold.ttf
│ │ ├── AnonymousPro_OFL.txt
│ │ ├── KAISG.ttf
│ │ ├── alagard.png
│ │ ├── alpha_beta.png
│ │ ├── bmfont.fnt
│ │ ├── bmfont.png
│ │ ├── custom_alagard.png
│ │ ├── custom_jupiter_crash.png
│ │ ├── custom_mecha.png
│ │ ├── jupiter_crash.png
│ │ ├── mecha.png
│ │ ├── pixantiqua.fnt
│ │ ├── pixantiqua.png
│ │ ├── pixantiqua.ttf
│ │ ├── pixantiqua_0.png
│ │ ├── pixelplay.png
│ │ ├── romulus.png
│ │ └── setback.png
│ ├── images
│ │ ├── cat.png
│ │ ├── fudesumi.png
│ │ ├── fudesumi.raw
│ │ ├── parrots.png
│ │ ├── pitch.png
│ │ ├── ps3.png
│ │ └── xbox.png
│ ├── models
│ │ ├── barracks.obj
│ │ ├── barracks_diffuse.png
│ │ ├── bridge.obj
│ │ ├── bridge_diffuse.png
│ │ ├── castle.obj
│ │ ├── castle_diffuse.png
│ │ ├── church.obj
│ │ ├── church_diffuse.png
│ │ ├── dwarf.obj
│ │ ├── dwarf_diffuse.png
│ │ ├── dwarf_normal.png
│ │ ├── dwarf_specular.png
│ │ ├── house.obj
│ │ ├── house_diffuse.png
│ │ ├── market.obj
│ │ ├── market_diffuse.png
│ │ ├── plane.obj
│ │ ├── plane.png
│ │ ├── plane_diffuse.png
│ │ ├── tower.obj
│ │ ├── tower.png
│ │ ├── turret.obj
│ │ ├── turret_diffuse.png
│ │ ├── watermill.obj
│ │ ├── watermill_diffuse.png
│ │ ├── well.obj
│ │ └── well_diffuse.png
│ ├── music
│ │ ├── applause.mp3
│ │ ├── chiptun1.mod
│ │ ├── deliverance.s3m
│ │ ├── guitar_noodling.ogg
│ │ ├── hitman.mp3
│ │ ├── hitman.ogg
│ │ └── mini1111.xm
│ ├── pbr
│ │ ├── trooper.obj
│ │ ├── trooper_albedo.png
│ │ ├── trooper_ao.png
│ │ ├── trooper_metalness.png
│ │ ├── trooper_normals.png
│ │ └── trooper_roughness.png
│ ├── shaders
│ │ ├── brdf.fs
│ │ ├── brdf.vs
│ │ ├── cubemap.fs
│ │ ├── cubemap.vs
│ │ ├── glsl100
│ │ │ ├── base.fs
│ │ │ ├── base.vs
│ │ │ ├── bloom.fs
│ │ │ ├── blur.fs
│ │ │ ├── cross_hatching.fs
│ │ │ ├── cross_stitching.fs
│ │ │ ├── distortion.fs
│ │ │ ├── dream_vision.fs
│ │ │ ├── fisheye.fs
│ │ │ ├── grayscale.fs
│ │ │ ├── pixelizer.fs
│ │ │ ├── posterization.fs
│ │ │ ├── predator.fs
│ │ │ ├── scanlines.fs
│ │ │ ├── sobel.fs
│ │ │ ├── standard.fs
│ │ │ ├── standard.vs
│ │ │ └── swirl.fs
│ │ ├── glsl120
│ │ │ ├── base.fs
│ │ │ ├── base.vs
│ │ │ ├── bloom.fs
│ │ │ ├── blur.fs
│ │ │ ├── cross_hatching.fs
│ │ │ ├── cross_stitching.fs
│ │ │ ├── distortion.fs
│ │ │ ├── dream_vision.fs
│ │ │ ├── fisheye.fs
│ │ │ ├── grayscale.fs
│ │ │ ├── pixelizer.fs
│ │ │ ├── posterization.fs
│ │ │ ├── predator.fs
│ │ │ ├── scanlines.fs
│ │ │ ├── sobel.fs
│ │ │ └── swirl.fs
│ │ ├── glsl330
│ │ │ ├── base.fs
│ │ │ ├── base.vs
│ │ │ ├── bloom.fs
│ │ │ ├── blur.fs
│ │ │ ├── cross_hatching.fs
│ │ │ ├── cross_stitching.fs
│ │ │ ├── depth.fs
│ │ │ ├── distortion.fs
│ │ │ ├── dream_vision.fs
│ │ │ ├── fisheye.fs
│ │ │ ├── grayscale.fs
│ │ │ ├── overdraw.fs
│ │ │ ├── pixelizer.fs
│ │ │ ├── posterization.fs
│ │ │ ├── predator.fs
│ │ │ ├── scanlines.fs
│ │ │ ├── sobel.fs
│ │ │ ├── standard.fs
│ │ │ ├── standard.vs
│ │ │ └── swirl.fs
│ │ ├── irradiance.fs
│ │ ├── pbr.fs
│ │ ├── pbr.vs
│ │ ├── prefilter.fs
│ │ ├── sdf.fs
│ │ ├── skybox.fs
│ │ └── skybox.vs
│ ├── sound
│ │ ├── coin.wav
│ │ ├── sound.wav
│ │ ├── spring.wav
│ │ ├── tanatana.flac
│ │ ├── tanatana.ogg
│ │ └── weird.wav
│ └── textures
│ │ ├── angle_gauge.png
│ │ ├── background.png
│ │ ├── billboard.png
│ │ ├── cubicmap.png
│ │ ├── cubicmap_atlas.png
│ │ ├── dresden_square.hdr
│ │ ├── fudesumi_BC1.dds
│ │ ├── fudesumi_BC3.dds
│ │ ├── fudesumi_ETC2.ktx
│ │ ├── heightmap.png
│ │ ├── pinetree.hdr
│ │ ├── raylib_logo.png
│ │ ├── scarfy.png
│ │ ├── smoke.png
│ │ └── wabbit_alpha.png
├── shaders_custom_uniform.exe
├── shapes_lines_bezier.exe
├── testbed.exe
├── textures_image_generation.exe
└── textures_particles_blending.exe
├── examples
├── audio_music_stream.dpr
├── audio_music_stream.dproj
├── audio_music_stream.dproj.local
├── audio_music_stream.identcache
├── audio_music_stream.res
├── audio_music_stream.stat
├── common.pas
├── core_2d_camera.dpr
├── core_2d_camera.dproj
├── core_2d_camera.dproj.local
├── core_2d_camera.identcache
├── core_2d_camera.res
├── core_2d_camera.stat
├── models_billboard.dpr
├── models_billboard.dproj
├── models_billboard.dproj.local
├── models_billboard.identcache
├── models_billboard.res
├── models_billboard.stat
├── raylib-pas examples.dsk
├── raylib-pas examples_prjgroup.tvsconfig
├── raylib-pascal Examples.dsk
├── raylib-pascal Examples.groupproj
├── raylib-pascal Examples.groupproj.local
├── raylib-pascal Examples_prjgroup.tvsconfig
├── shaders_custom_uniform.dpr
├── shaders_custom_uniform.dproj
├── shaders_custom_uniform.dproj.local
├── shaders_custom_uniform.identcache
├── shaders_custom_uniform.res
├── shaders_custom_uniform.stat
├── shapes_lines_bezier.dpr
├── shapes_lines_bezier.dproj
├── shapes_lines_bezier.dproj.local
├── shapes_lines_bezier.identcache
├── shapes_lines_bezier.res
├── shapes_lines_bezier.stat
├── template.dpr
├── template.dproj
├── template.dproj.local
├── template.stat
├── textures_image_generation.dpr
├── textures_image_generation.dproj
├── textures_image_generation.dproj.local
├── textures_image_generation.identcache
├── textures_image_generation.res
├── textures_image_generation.stat
├── textures_particles_blending.dpr
├── textures_particles_blending.dproj
├── textures_particles_blending.dproj.local
├── textures_particles_blending.identcache
├── textures_particles_blending.res
└── textures_particles_blending.stat
├── libs
└── raylib.pas
├── logo
├── logo_256x256.png
├── logo_512x512.png
└── raylib-pascal.ico
└── references
└── raylib.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 | bin/* linguist-vendored
4 | references/* linguist-vendored
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | temp/
2 | testbed/
3 | examples/Win32/
4 | examples/__recovery/
5 | libs/__recovery/
6 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 dRez Games
4 | All Rights Reserved.
5 | [https://drez.games](https://drez.games)
6 |
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in all
16 | copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 | SOFTWARE.
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | **raylib is a simple and easy-to-use library to learn videogames programming.**
4 |
5 | raylib-pascal is the pascal bindings to the c99 [raylib](https://github.com/raysan5/raylib) library by [raysan5](https://github.com/raysan5)
6 |
7 | [](LICENSE.md)
8 | [](https://twitter.com/drezgames)
9 |
10 | features
11 | --------
12 | - **NO external dependencies**, all required libraries included with raylib
13 | - Current platforms supported: **Windows**
14 | - Hardware accelerated with OpenGL
15 | - Multiple Fonts formats supported (XNA fonts, AngelCode fonts, TTF)
16 | - Outstanding texture formats support, including compressed formats (DXT, ETC, ASTC)
17 | - **Full 3d support** for 3d Shapes, Models, Billboards, Heightmaps and more!
18 | - Flexible Materials system, supporting classic maps and **PBR maps**
19 | - Shaders support, including Model shaders and Postprocessing shaders
20 | - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
21 | - **VR stereo rendering** support with configurable HMD device parameters
22 | - Bindings for Delphi/FPC. Developed/tested with **Delphi 10.2**
23 |
24 | contact
25 | -------
26 |
27 | * Webpage: [https://drez.games](https://drez.games)
28 | * Twitter: [https://twitter.com/drezgames](http://twitter.com/drezgames)
29 | * YouTube: [https://www.youtube.com/drezgames](https://www.youtube.com/drezgames)
30 |
31 | license
32 | -------
33 |
34 | raylib-pascal is licensed under an MIT license. Check [LICENSE](LICENSE.md) for further details.
35 |
36 |
--------------------------------------------------------------------------------
/bin/audio_music_stream.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/audio_music_stream.exe
--------------------------------------------------------------------------------
/bin/core_2d_camera.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/core_2d_camera.exe
--------------------------------------------------------------------------------
/bin/models_billboard.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/models_billboard.exe
--------------------------------------------------------------------------------
/bin/raylib.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/raylib.dll
--------------------------------------------------------------------------------
/bin/res/fonts/AnonymousPro-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/AnonymousPro-Bold.ttf
--------------------------------------------------------------------------------
/bin/res/fonts/AnonymousPro_OFL.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009, Mark Simonson (http://www.ms-studio.com, mark@marksimonson.com),
2 | with Reserved Font Name Anonymous Pro.
3 |
4 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
5 | This license is copied below, and is also available with a FAQ at:
6 | http://scripts.sil.org/OFL
7 |
8 |
9 | -----------------------------------------------------------
10 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
11 | -----------------------------------------------------------
12 |
13 | PREAMBLE
14 | The goals of the Open Font License (OFL) are to stimulate worldwide
15 | development of collaborative font projects, to support the font creation
16 | efforts of academic and linguistic communities, and to provide a free and
17 | open framework in which fonts may be shared and improved in partnership
18 | with others.
19 |
20 | The OFL allows the licensed fonts to be used, studied, modified and
21 | redistributed freely as long as they are not sold by themselves. The
22 | fonts, including any derivative works, can be bundled, embedded,
23 | redistributed and/or sold with any software provided that any reserved
24 | names are not used by derivative works. The fonts and derivatives,
25 | however, cannot be released under any other type of license. The
26 | requirement for fonts to remain under this license does not apply
27 | to any document created using the fonts or their derivatives.
28 |
29 | DEFINITIONS
30 | "Font Software" refers to the set of files released by the Copyright
31 | Holder(s) under this license and clearly marked as such. This may
32 | include source files, build scripts and documentation.
33 |
34 | "Reserved Font Name" refers to any names specified as such after the
35 | copyright statement(s).
36 |
37 | "Original Version" refers to the collection of Font Software components as
38 | distributed by the Copyright Holder(s).
39 |
40 | "Modified Version" refers to any derivative made by adding to, deleting,
41 | or substituting -- in part or in whole -- any of the components of the
42 | Original Version, by changing formats or by porting the Font Software to a
43 | new environment.
44 |
45 | "Author" refers to any designer, engineer, programmer, technical
46 | writer or other person who contributed to the Font Software.
47 |
48 | PERMISSION & CONDITIONS
49 | Permission is hereby granted, free of charge, to any person obtaining
50 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
51 | redistribute, and sell modified and unmodified copies of the Font
52 | Software, subject to the following conditions:
53 |
54 | 1) Neither the Font Software nor any of its individual components,
55 | in Original or Modified Versions, may be sold by itself.
56 |
57 | 2) Original or Modified Versions of the Font Software may be bundled,
58 | redistributed and/or sold with any software, provided that each copy
59 | contains the above copyright notice and this license. These can be
60 | included either as stand-alone text files, human-readable headers or
61 | in the appropriate machine-readable metadata fields within text or
62 | binary files as long as those fields can be easily viewed by the user.
63 |
64 | 3) No Modified Version of the Font Software may use the Reserved Font
65 | Name(s) unless explicit written permission is granted by the corresponding
66 | Copyright Holder. This restriction only applies to the primary font name as
67 | presented to the users.
68 |
69 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
70 | Software shall not be used to promote, endorse or advertise any
71 | Modified Version, except to acknowledge the contribution(s) of the
72 | Copyright Holder(s) and the Author(s) or with their explicit written
73 | permission.
74 |
75 | 5) The Font Software, modified or unmodified, in part or in whole,
76 | must be distributed entirely under this license, and must not be
77 | distributed under any other license. The requirement for fonts to
78 | remain under this license does not apply to any document created
79 | using the Font Software.
80 |
81 | TERMINATION
82 | This license becomes null and void if any of the above conditions are
83 | not met.
84 |
85 | DISCLAIMER
86 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
87 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
88 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
89 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
90 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
91 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
92 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
93 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
94 | OTHER DEALINGS IN THE FONT SOFTWARE.
95 |
--------------------------------------------------------------------------------
/bin/res/fonts/KAISG.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/KAISG.ttf
--------------------------------------------------------------------------------
/bin/res/fonts/alagard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/alagard.png
--------------------------------------------------------------------------------
/bin/res/fonts/alpha_beta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/alpha_beta.png
--------------------------------------------------------------------------------
/bin/res/fonts/bmfont.fnt:
--------------------------------------------------------------------------------
1 | info face="Arial Black" size=-32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=2,2 outline=0
2 | common lineHeight=45 base=35 scaleW=512 scaleH=256 pages=1 packed=0 alphaChnl=0 redChnl=4 greenChnl=4 blueChnl=4
3 | page id=0 file="bmfont.png"
4 | chars count=95
5 | char id=32 x=423 y=141 width=3 height=45 xoffset=-1 yoffset=0 xadvance=11 page=0 chnl=15
6 | char id=33 x=323 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15
7 | char id=34 x=123 y=141 width=16 height=45 xoffset=0 yoffset=0 xadvance=16 page=0 chnl=15
8 | char id=35 x=221 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
9 | char id=36 x=244 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
10 | char id=37 x=70 y=0 width=30 height=45 xoffset=1 yoffset=0 xadvance=32 page=0 chnl=15
11 | char id=38 x=390 y=0 width=25 height=45 xoffset=2 yoffset=0 xadvance=28 page=0 chnl=15
12 | char id=39 x=378 y=141 width=8 height=45 xoffset=1 yoffset=0 xadvance=9 page=0 chnl=15
13 | char id=40 x=222 y=141 width=11 height=45 xoffset=1 yoffset=0 xadvance=12 page=0 chnl=15
14 | char id=41 x=499 y=94 width=11 height=45 xoffset=1 yoffset=0 xadvance=12 page=0 chnl=15
15 | char id=42 x=497 y=47 width=13 height=45 xoffset=2 yoffset=0 xadvance=18 page=0 chnl=15
16 | char id=43 x=394 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
17 | char id=44 x=367 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15
18 | char id=45 x=261 y=141 width=11 height=45 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
19 | char id=46 x=356 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15
20 | char id=47 x=248 y=141 width=11 height=45 xoffset=-1 yoffset=0 xadvance=9 page=0 chnl=15
21 | char id=48 x=382 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
22 | char id=49 x=496 y=0 width=14 height=45 xoffset=2 yoffset=0 xadvance=21 page=0 chnl=15
23 | char id=50 x=134 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
24 | char id=51 x=359 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
25 | char id=52 x=313 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
26 | char id=53 x=336 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
27 | char id=54 x=178 y=94 width=20 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
28 | char id=55 x=478 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
29 | char id=56 x=290 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
30 | char id=57 x=90 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
31 | char id=58 x=345 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15
32 | char id=59 x=334 y=141 width=9 height=45 xoffset=1 yoffset=0 xadvance=11 page=0 chnl=15
33 | char id=60 x=0 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
34 | char id=61 x=21 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
35 | char id=62 x=310 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
36 | char id=63 x=352 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=20 page=0 chnl=15
37 | char id=64 x=279 y=0 width=26 height=45 xoffset=-1 yoffset=0 xadvance=24 page=0 chnl=15
38 | char id=65 x=193 y=0 width=27 height=45 xoffset=-1 yoffset=0 xadvance=25 page=0 chnl=15
39 | char id=66 x=150 y=47 width=22 height=45 xoffset=2 yoffset=0 xadvance=25 page=0 chnl=15
40 | char id=67 x=444 y=0 width=24 height=45 xoffset=1 yoffset=0 xadvance=25 page=0 chnl=15
41 | char id=68 x=174 y=47 width=22 height=45 xoffset=2 yoffset=0 xadvance=25 page=0 chnl=15
42 | char id=69 x=156 y=94 width=20 height=45 xoffset=2 yoffset=0 xadvance=23 page=0 chnl=15
43 | char id=70 x=63 y=141 width=18 height=45 xoffset=2 yoffset=0 xadvance=21 page=0 chnl=15
44 | char id=71 x=417 y=0 width=25 height=45 xoffset=1 yoffset=0 xadvance=27 page=0 chnl=15
45 | char id=72 x=125 y=47 width=23 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15
46 | char id=73 x=388 y=141 width=8 height=45 xoffset=2 yoffset=0 xadvance=12 page=0 chnl=15
47 | char id=74 x=200 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
48 | char id=75 x=251 y=0 width=26 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15
49 | char id=76 x=373 y=94 width=19 height=45 xoffset=2 yoffset=0 xadvance=21 page=0 chnl=15
50 | char id=77 x=134 y=0 width=28 height=45 xoffset=1 yoffset=0 xadvance=30 page=0 chnl=15
51 | char id=78 x=100 y=47 width=23 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15
52 | char id=79 x=363 y=0 width=25 height=45 xoffset=1 yoffset=0 xadvance=27 page=0 chnl=15
53 | char id=80 x=112 y=94 width=20 height=45 xoffset=2 yoffset=0 xadvance=23 page=0 chnl=15
54 | char id=81 x=335 y=0 width=26 height=45 xoffset=1 yoffset=0 xadvance=27 page=0 chnl=15
55 | char id=82 x=470 y=0 width=24 height=45 xoffset=2 yoffset=0 xadvance=25 page=0 chnl=15
56 | char id=83 x=75 y=47 width=23 height=45 xoffset=0 yoffset=0 xadvance=23 page=0 chnl=15
57 | char id=84 x=50 y=47 width=23 height=45 xoffset=0 yoffset=0 xadvance=23 page=0 chnl=15
58 | char id=85 x=25 y=47 width=23 height=45 xoffset=2 yoffset=0 xadvance=27 page=0 chnl=15
59 | char id=86 x=307 y=0 width=26 height=45 xoffset=0 yoffset=0 xadvance=25 page=0 chnl=15
60 | char id=87 x=0 y=0 width=34 height=45 xoffset=-1 yoffset=0 xadvance=32 page=0 chnl=15
61 | char id=88 x=222 y=0 width=27 height=45 xoffset=-1 yoffset=0 xadvance=25 page=0 chnl=15
62 | char id=89 x=164 y=0 width=27 height=45 xoffset=-1 yoffset=0 xadvance=25 page=0 chnl=15
63 | char id=90 x=0 y=47 width=23 height=45 xoffset=0 yoffset=0 xadvance=23 page=0 chnl=15
64 | char id=91 x=274 y=141 width=11 height=45 xoffset=1 yoffset=0 xadvance=12 page=0 chnl=15
65 | char id=92 x=300 y=141 width=10 height=45 xoffset=-1 yoffset=0 xadvance=9 page=0 chnl=15
66 | char id=93 x=287 y=141 width=11 height=45 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15
67 | char id=94 x=457 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
68 | char id=95 x=103 y=141 width=18 height=45 xoffset=-1 yoffset=0 xadvance=16 page=0 chnl=15
69 | char id=96 x=312 y=141 width=9 height=45 xoffset=0 yoffset=0 xadvance=11 page=0 chnl=15
70 | char id=97 x=474 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
71 | char id=98 x=68 y=94 width=20 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
72 | char id=99 x=267 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
73 | char id=100 x=46 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
74 | char id=101 x=198 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
75 | char id=102 x=141 y=141 width=15 height=45 xoffset=-1 yoffset=0 xadvance=12 page=0 chnl=15
76 | char id=103 x=222 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
77 | char id=104 x=415 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
78 | char id=105 x=398 y=141 width=7 height=45 xoffset=2 yoffset=0 xadvance=11 page=0 chnl=15
79 | char id=106 x=235 y=141 width=11 height=45 xoffset=-2 yoffset=0 xadvance=11 page=0 chnl=15
80 | char id=107 x=405 y=47 width=21 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
81 | char id=108 x=407 y=141 width=7 height=45 xoffset=2 yoffset=0 xadvance=11 page=0 chnl=15
82 | char id=109 x=102 y=0 width=30 height=45 xoffset=1 yoffset=0 xadvance=32 page=0 chnl=15
83 | char id=110 x=331 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
84 | char id=111 x=428 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
85 | char id=112 x=266 y=94 width=20 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
86 | char id=113 x=288 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
87 | char id=114 x=158 y=141 width=15 height=45 xoffset=1 yoffset=0 xadvance=14 page=0 chnl=15
88 | char id=115 x=244 y=94 width=20 height=45 xoffset=0 yoffset=0 xadvance=20 page=0 chnl=15
89 | char id=116 x=175 y=141 width=14 height=45 xoffset=0 yoffset=0 xadvance=14 page=0 chnl=15
90 | char id=117 x=436 y=94 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
91 | char id=118 x=451 y=47 width=21 height=45 xoffset=0 yoffset=0 xadvance=20 page=0 chnl=15
92 | char id=119 x=36 y=0 width=32 height=45 xoffset=-1 yoffset=0 xadvance=30 page=0 chnl=15
93 | char id=120 x=0 y=94 width=21 height=45 xoffset=0 yoffset=0 xadvance=21 page=0 chnl=15
94 | char id=121 x=23 y=94 width=21 height=45 xoffset=0 yoffset=0 xadvance=20 page=0 chnl=15
95 | char id=122 x=83 y=141 width=18 height=45 xoffset=0 yoffset=0 xadvance=18 page=0 chnl=15
96 | char id=123 x=191 y=141 width=14 height=45 xoffset=-1 yoffset=0 xadvance=12 page=0 chnl=15
97 | char id=124 x=416 y=141 width=5 height=45 xoffset=2 yoffset=0 xadvance=9 page=0 chnl=15
98 | char id=125 x=207 y=141 width=13 height=45 xoffset=0 yoffset=0 xadvance=12 page=0 chnl=15
99 | char id=126 x=42 y=141 width=19 height=45 xoffset=1 yoffset=0 xadvance=21 page=0 chnl=15
100 |
--------------------------------------------------------------------------------
/bin/res/fonts/bmfont.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/bmfont.png
--------------------------------------------------------------------------------
/bin/res/fonts/custom_alagard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/custom_alagard.png
--------------------------------------------------------------------------------
/bin/res/fonts/custom_jupiter_crash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/custom_jupiter_crash.png
--------------------------------------------------------------------------------
/bin/res/fonts/custom_mecha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/custom_mecha.png
--------------------------------------------------------------------------------
/bin/res/fonts/jupiter_crash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/jupiter_crash.png
--------------------------------------------------------------------------------
/bin/res/fonts/mecha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/mecha.png
--------------------------------------------------------------------------------
/bin/res/fonts/pixantiqua.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/pixantiqua.png
--------------------------------------------------------------------------------
/bin/res/fonts/pixantiqua.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/pixantiqua.ttf
--------------------------------------------------------------------------------
/bin/res/fonts/pixantiqua_0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/pixantiqua_0.png
--------------------------------------------------------------------------------
/bin/res/fonts/pixelplay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/pixelplay.png
--------------------------------------------------------------------------------
/bin/res/fonts/romulus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/romulus.png
--------------------------------------------------------------------------------
/bin/res/fonts/setback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/fonts/setback.png
--------------------------------------------------------------------------------
/bin/res/images/cat.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/cat.png
--------------------------------------------------------------------------------
/bin/res/images/fudesumi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/fudesumi.png
--------------------------------------------------------------------------------
/bin/res/images/fudesumi.raw:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/fudesumi.raw
--------------------------------------------------------------------------------
/bin/res/images/parrots.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/parrots.png
--------------------------------------------------------------------------------
/bin/res/images/pitch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/pitch.png
--------------------------------------------------------------------------------
/bin/res/images/ps3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/ps3.png
--------------------------------------------------------------------------------
/bin/res/images/xbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/images/xbox.png
--------------------------------------------------------------------------------
/bin/res/models/barracks_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/barracks_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/bridge_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/bridge_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/castle_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/castle_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/church_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/church_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/dwarf_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/dwarf_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/dwarf_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/dwarf_normal.png
--------------------------------------------------------------------------------
/bin/res/models/dwarf_specular.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/dwarf_specular.png
--------------------------------------------------------------------------------
/bin/res/models/house_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/house_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/market_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/market_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/plane.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/plane.png
--------------------------------------------------------------------------------
/bin/res/models/plane_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/plane_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/tower.obj:
--------------------------------------------------------------------------------
1 | # Blender v2.78 (sub 0) OBJ File: 'lowpoly-tower.blend'
2 | # www.blender.org
3 | o Grid
4 | v -4.000000 0.000000 4.000000
5 | v -2.327363 0.000000 4.654725
6 | v 0.000000 0.000000 4.654725
7 | v 2.327363 0.000000 4.654725
8 | v 4.000000 0.000000 4.000000
9 | v -4.654725 0.955085 2.327363
10 | v -2.000000 0.815050 2.000000
11 | v 0.000000 0.476341 2.423448
12 | v 2.000000 0.476341 2.000000
13 | v 4.654725 0.000000 2.327363
14 | v -4.654725 1.649076 0.000000
15 | v -2.423448 1.092402 0.000000
16 | v 2.423448 0.198579 0.000000
17 | v 4.654725 0.000000 0.000000
18 | v -4.654725 1.649076 -2.327363
19 | v -2.000000 1.092402 -2.000000
20 | v 0.000000 0.476341 -2.423448
21 | v 2.000000 -0.012791 -2.000000
22 | v 4.654725 0.000000 -2.612731
23 | v -4.000000 0.955085 -4.000000
24 | v -2.327363 0.955085 -4.654725
25 | v 0.000000 0.955085 -4.654725
26 | v 2.327363 0.000000 -4.654725
27 | v 4.000000 0.000000 -4.000000
28 | v 2.423448 0.682825 0.000000
29 | v 2.000000 0.565423 -2.000000
30 | v -4.654725 -0.020560 2.327363
31 | v -4.654725 0.000000 0.000000
32 | v -4.654725 0.000000 -2.327363
33 | v -4.000000 0.000000 -4.000000
34 | v -2.327363 0.000000 -4.654725
35 | v 0.000000 -0.020560 -4.654725
36 | v 0.000000 0.709880 -1.230535
37 | v -0.000000 7.395413 0.000000
38 | v 0.962071 0.709880 -0.767226
39 | v -0.533909 0.709880 1.108674
40 | v -1.199683 0.709880 0.273820
41 | v -0.962071 0.709880 -0.767226
42 | v 1.506076 0.859071 1.325337
43 | v 1.199683 0.709880 0.273820
44 | v 0.533909 0.709880 1.108674
45 | v 0.000000 1.875340 -1.177842
46 | v -0.000000 2.293973 -0.649884
47 | v -0.000000 4.365648 -0.627970
48 | v 0.000000 6.167194 -0.942957
49 | v 0.000000 6.232434 -1.708677
50 | v 1.335898 6.232434 -1.065343
51 | v 0.737233 6.167195 -0.587924
52 | v 0.490966 4.365648 -0.391533
53 | v 0.508100 2.293973 -0.405196
54 | v 0.920874 1.875340 -0.734372
55 | v -0.741367 6.232434 1.539465
56 | v -0.409133 6.167195 0.849574
57 | v -0.272466 4.365648 0.565781
58 | v -0.281974 2.293973 0.585526
59 | v -0.511047 1.875340 1.061199
60 | v -1.665837 6.232434 0.380217
61 | v -0.919314 6.167195 0.209828
62 | v -0.612225 4.365648 0.139736
63 | v -0.633590 2.293973 0.144613
64 | v -1.148311 1.875340 0.262095
65 | v -1.335898 6.232434 -1.065343
66 | v -0.737233 6.167195 -0.587924
67 | v -0.490967 4.365648 -0.391533
68 | v -0.508100 2.293973 -0.405196
69 | v -0.920874 1.875340 -0.734372
70 | v 1.665837 6.232434 0.380216
71 | v 0.919315 6.167195 0.209828
72 | v 0.612225 4.365648 0.139736
73 | v 0.633590 2.293973 0.144613
74 | v 1.148311 1.875340 0.262095
75 | v 0.741367 6.232434 1.539465
76 | v 0.409133 6.167195 0.849575
77 | v 0.272466 4.365648 0.565781
78 | v 0.281974 2.293973 0.585526
79 | v 0.511046 1.875340 1.061199
80 | v 0.000000 5.012550 -0.969733
81 | v 0.758168 5.012550 -0.604618
82 | v -0.420751 5.012550 0.873699
83 | v -0.945419 5.012550 0.215786
84 | v -0.758168 5.012550 -0.604618
85 | v 0.945419 5.012550 0.215786
86 | v 0.420751 5.012550 0.873699
87 | vt 0.0523 0.5444
88 | vt 0.1817 0.4284
89 | vt 0.1641 0.5859
90 | vt 0.0177 0.4451
91 | vt 0.1526 0.3090
92 | vt 0.0189 0.1737
93 | vt 0.0188 0.3088
94 | vt 0.0561 0.0762
95 | vt 0.1757 0.1924
96 | vt 0.3024 0.4534
97 | vt 0.3071 0.5902
98 | vt 0.3413 0.2459
99 | vt 0.2906 0.1614
100 | vt 0.4116 0.1801
101 | vt 0.2834 0.3774
102 | vt 0.1526 0.0362
103 | vt 0.2917 0.1622
104 | vt 0.4446 0.5865
105 | vt 0.4443 0.2989
106 | vt 0.3711 0.3021
107 | vt 0.4396 0.0275
108 | vt 0.4094 0.1829
109 | vt 0.4219 0.4255
110 | vt 0.5474 0.5381
111 | vt 0.5811 0.4376
112 | vt 0.5715 0.1505
113 | vt 0.5811 0.2997
114 | vt 0.5272 0.0533
115 | vt 0.2208 0.2194
116 | vt 0.3456 0.3610
117 | vt 0.2878 0.0321
118 | vt 0.2321 0.3392
119 | vt 0.4432 0.0177
120 | vt 0.7347 0.7934
121 | vt 0.7382 0.7595
122 | vt 0.8982 0.7768
123 | vt 0.6169 0.7595
124 | vt 0.6139 0.7879
125 | vt 0.4951 0.7634
126 | vt 0.1551 0.6832
127 | vt 0.2925 0.6268
128 | vt 0.2925 0.6832
129 | vt 0.7795 0.6832
130 | vt 0.6421 0.6268
131 | vt 0.7795 0.6255
132 | vt 0.5046 0.7241
133 | vt 0.6421 0.7241
134 | vt 0.3986 0.6268
135 | vt 0.3986 0.6832
136 | vt 0.5046 0.6268
137 | vt 0.0177 0.6268
138 | vt 0.1551 0.6255
139 | vt 0.8856 0.6268
140 | vt 0.1899 0.9579
141 | vt 0.1194 0.8696
142 | vt 0.2324 0.8696
143 | vt 0.1899 0.7813
144 | vt 0.0943 0.7595
145 | vt 0.0177 0.8206
146 | vt 0.0177 0.9186
147 | vt 0.0943 0.9797
148 | vt 0.2793 0.2349
149 | vt 0.2304 0.2758
150 | vt 0.6597 0.0177
151 | vt 0.6954 0.0993
152 | vt 0.6367 0.0768
153 | vt 0.7558 0.0777
154 | vt 0.7238 0.0440
155 | vt 0.8840 0.1330
156 | vt 0.7385 0.1141
157 | vt 0.9157 0.0886
158 | vt 0.9781 0.1232
159 | vt 0.9224 0.1276
160 | vt 0.2677 0.8141
161 | vt 0.3463 0.8037
162 | vt 0.3086 0.8339
163 | vt 0.6387 0.3550
164 | vt 0.7130 0.3801
165 | vt 0.6596 0.4053
166 | vt 0.7245 0.3245
167 | vt 0.6919 0.3383
168 | vt 0.8655 0.3566
169 | vt 0.7351 0.3577
170 | vt 0.9770 0.3365
171 | vt 0.9078 0.3751
172 | vt 0.9174 0.3282
173 | vt 0.2677 0.9018
174 | vt 0.3086 0.8821
175 | vt 0.6803 0.2948
176 | vt 0.6251 0.3035
177 | vt 0.7194 0.2854
178 | vt 0.8764 0.2832
179 | vt 0.9221 0.2861
180 | vt 0.3363 0.9565
181 | vt 0.3464 0.9122
182 | vt 0.6751 0.2482
183 | vt 0.6178 0.2499
184 | vt 0.7179 0.2431
185 | vt 0.9823 0.2484
186 | vt 0.9247 0.2452
187 | vt 0.3935 0.9014
188 | vt 0.6755 0.1996
189 | vt 0.6164 0.1941
190 | vt 0.7201 0.1992
191 | vt 0.8793 0.2446
192 | vt 0.9823 0.2060
193 | vt 0.9257 0.2051
194 | vt 0.4598 0.8580
195 | vt 0.4144 0.8579
196 | vt 0.6819 0.1498
197 | vt 0.6222 0.1361
198 | vt 0.7266 0.1555
199 | vt 0.8831 0.1684
200 | vt 0.9252 0.1659
201 | vt 0.4218 0.7790
202 | vt 0.3934 0.8145
203 | vt 0.3363 0.7595
204 | vt 0.8815 0.2060
205 | vt 0.8720 0.3208
206 | vt 0.8825 0.1012
207 | vt 0.9735 0.0816
208 | vt 0.9718 0.3817
209 | vt 0.9807 0.2918
210 | vt 0.4218 0.9370
211 | vt 0.9810 0.1644
212 | vn 0.1035 0.8806 0.4623
213 | vn 0.0964 0.9481 0.3030
214 | vn 0.0000 0.9780 0.2088
215 | vn 0.0659 0.9835 0.1683
216 | vn 0.2325 0.9320 0.2779
217 | vn 0.0553 0.9960 -0.0702
218 | vn 0.2827 0.9564 0.0728
219 | vn 0.1873 0.9776 -0.0961
220 | vn 0.2421 0.9703 0.0000
221 | vn 0.0921 0.9772 -0.1913
222 | vn -0.0277 0.9947 -0.0993
223 | vn 0.2308 0.9274 -0.2944
224 | vn 0.2771 0.9572 -0.0837
225 | vn 0.3724 0.9074 0.1947
226 | vn 0.0777 0.9770 -0.1985
227 | vn -0.1094 0.9539 0.2794
228 | vn 0.0364 0.9844 0.1721
229 | vn 0.1683 0.9835 0.0659
230 | vn 0.0674 0.9901 0.1230
231 | vn 0.4338 0.8823 0.1829
232 | vn 0.2845 0.9565 0.0649
233 | vn 0.0886 0.9961 0.0000
234 | vn 0.2000 0.9789 0.0424
235 | vn 0.1417 0.9830 0.1171
236 | vn 0.3021 0.9524 0.0412
237 | vn -0.0193 0.9986 -0.0493
238 | vn 0.0000 0.9777 0.2098
239 | vn 0.0005 0.9781 -0.2083
240 | vn 0.1879 0.9782 -0.0887
241 | vn 0.2249 0.0000 0.9744
242 | vn 0.9783 0.0000 -0.2071
243 | vn 0.9783 0.0000 0.2071
244 | vn 0.0000 0.0000 -1.0000
245 | vn -1.0000 0.0000 0.0000
246 | vn -0.3645 0.0000 -0.9312
247 | vn -0.9312 0.0000 -0.3645
248 | vn -0.9312 0.0000 0.3645
249 | vn 0.2615 0.7979 -0.5431
250 | vn 0.5877 0.7979 -0.1341
251 | vn 0.4713 0.7979 0.3758
252 | vn -0.0000 0.7979 0.6028
253 | vn -0.4713 0.7979 0.3758
254 | vn -0.5877 0.7979 -0.1341
255 | vn -0.2615 0.7979 -0.5431
256 | vn -0.1285 0.9864 -0.1025
257 | vn 0.0929 0.8937 0.4389
258 | vn -0.4335 0.0407 -0.9002
259 | vn -0.2867 0.7507 -0.5952
260 | vn -0.4339 0.0095 -0.9009
261 | vn -0.4338 0.0209 -0.9008
262 | vn -0.0408 -0.9956 -0.0848
263 | vn -0.9741 0.0407 -0.2223
264 | vn -0.6441 0.7507 -0.1470
265 | vn -0.9749 0.0095 -0.2225
266 | vn -0.9747 0.0209 -0.2225
267 | vn -0.0918 -0.9956 -0.0209
268 | vn -0.7812 0.0407 0.6230
269 | vn -0.5165 0.7507 0.4119
270 | vn -0.7818 0.0095 0.6235
271 | vn -0.7817 0.0209 0.6234
272 | vn -0.0736 -0.9956 0.0587
273 | vn -0.0000 0.0407 0.9992
274 | vn 0.0000 0.7507 0.6607
275 | vn 0.0000 0.0095 1.0000
276 | vn -0.0000 0.0209 0.9998
277 | vn -0.0000 -0.9956 0.0941
278 | vn 0.7812 0.0407 0.6230
279 | vn 0.5165 0.7507 0.4119
280 | vn 0.7818 0.0095 0.6235
281 | vn 0.7817 0.0209 0.6234
282 | vn 0.0736 -0.9956 0.0587
283 | vn 0.9741 0.0407 -0.2223
284 | vn 0.6441 0.7507 -0.1470
285 | vn 0.9749 0.0095 -0.2225
286 | vn 0.9747 0.0209 -0.2225
287 | vn 0.0918 -0.9956 -0.0209
288 | vn 0.4335 0.0407 -0.9002
289 | vn 0.2867 0.7507 -0.5952
290 | vn 0.4339 0.0095 -0.9009
291 | vn 0.4338 0.0209 -0.9008
292 | vn 0.0408 -0.9956 -0.0848
293 | vn 0.3918 -0.4298 -0.8135
294 | vn 0.8803 -0.4298 -0.2009
295 | vn 0.7059 -0.4298 0.5630
296 | vn -0.0000 -0.4298 0.9029
297 | vn -0.7059 -0.4298 0.5630
298 | vn -0.8803 -0.4298 -0.2009
299 | vn -0.3918 -0.4298 -0.8135
300 | vn 0.0210 0.9998 -0.0048
301 | vn 0.0482 0.9981 -0.0385
302 | vn -0.0166 0.9914 -0.1301
303 | vn -0.0090 0.9904 -0.1379
304 | vn 0.2820 0.9576 0.0597
305 | vn -0.0000 0.9846 0.1749
306 | vn -0.0921 0.9772 -0.1913
307 | vn -0.1734 0.9794 0.1036
308 | s off
309 | f 1/1/1 7/2/1 6/3/1
310 | f 2/4/2 8/5/2 7/2/2
311 | f 4/6/3 8/5/3 3/7/3
312 | f 5/8/4 9/9/4 4/6/4
313 | f 6/3/5 12/10/5 11/11/5
314 | f 35/12/6 25/13/6 26/14/6
315 | f 7/2/7 37/15/7 12/10/7
316 | f 10/16/8 13/17/8 9/9/8
317 | f 12/10/9 15/18/9 11/11/9
318 | f 35/12/10 17/19/10 33/20/10
319 | f 13/17/11 19/21/11 18/22/11
320 | f 16/23/12 20/24/12 15/18/12
321 | f 17/19/13 21/25/13 16/23/13
322 | f 17/19/14 23/26/14 22/27/14
323 | f 26/14/15 24/28/15 23/26/15
324 | f 1/1/16 2/4/16 7/2/16
325 | f 2/4/3 3/7/3 8/5/3
326 | f 4/6/17 9/9/17 8/5/17
327 | f 5/8/18 10/16/18 9/9/18
328 | f 6/3/19 7/2/19 12/10/19
329 | f 25/13/20 39/29/20 9/9/20
330 | f 38/30/21 12/10/21 37/15/21
331 | f 10/16/22 14/31/22 13/17/22
332 | f 12/10/23 16/23/23 15/18/23
333 | f 8/5/24 36/32/24 7/2/24
334 | f 38/30/25 17/19/25 16/23/25
335 | f 13/17/22 14/31/22 19/21/22
336 | f 16/23/26 21/25/26 20/24/26
337 | f 17/19/27 22/27/27 21/25/27
338 | f 17/19/28 26/14/28 23/26/28
339 | f 26/14/29 19/33/29 24/28/29
340 | f 26/34/30 18/35/30 19/36/30
341 | f 26/34/31 13/37/31 18/35/31
342 | f 25/38/32 9/39/32 13/37/32
343 | f 22/40/33 31/41/33 21/42/33
344 | f 6/43/34 28/44/34 27/45/34
345 | f 15/46/34 28/44/34 11/47/34
346 | f 21/42/35 30/48/35 20/49/35
347 | f 20/49/36 29/50/36 15/46/36
348 | f 22/40/33 23/51/33 32/52/33
349 | f 6/43/37 27/45/37 1/53/37
350 | f 46/54/38 34/55/38 47/56/38
351 | f 47/56/39 34/55/39 67/57/39
352 | f 67/57/40 34/55/40 72/58/40
353 | f 72/58/41 34/55/41 52/59/41
354 | f 52/59/42 34/55/42 57/60/42
355 | f 57/60/43 34/55/43 62/61/43
356 | f 62/61/44 34/55/44 46/54/44
357 | f 40/62/45 41/63/45 39/29/45
358 | f 39/29/46 8/5/46 9/9/46
359 | f 38/64/47 42/65/47 33/66/47
360 | f 65/67/48 42/65/48 66/68/48
361 | f 65/67/49 44/69/49 43/70/49
362 | f 81/71/50 45/72/50 77/73/50
363 | f 62/74/51 45/75/51 63/76/51
364 | f 37/77/52 66/78/52 38/79/52
365 | f 60/80/53 66/78/53 61/81/53
366 | f 60/80/54 64/82/54 65/83/54
367 | f 58/84/55 81/85/55 80/86/55
368 | f 57/87/56 63/76/56 58/88/56
369 | f 56/89/57 37/77/57 36/90/57
370 | f 55/91/58 61/81/58 56/89/58
371 | f 54/92/59 60/80/59 55/91/59
372 | f 79/93/60 58/84/60 80/86/60
373 | f 52/94/61 58/88/61 53/95/61
374 | f 76/96/62 36/90/62 41/97/62
375 | f 75/98/63 56/89/63 76/96/63
376 | f 75/98/64 54/92/64 55/91/64
377 | f 73/99/65 79/93/65 83/100/65
378 | f 73/101/66 52/94/66 53/95/66
379 | f 71/102/67 41/97/67 40/103/67
380 | f 70/104/68 76/96/68 71/102/68
381 | f 70/104/69 74/105/69 75/98/69
382 | f 68/106/70 83/100/70 82/107/70
383 | f 67/108/71 73/101/71 68/109/71
384 | f 51/110/72 40/103/72 35/111/72
385 | f 50/112/73 71/102/73 51/110/73
386 | f 49/113/74 70/104/74 50/112/74
387 | f 78/114/75 68/106/75 82/107/75
388 | f 47/115/76 68/109/76 48/116/76
389 | f 42/65/77 35/111/77 33/66/77
390 | f 43/70/78 51/110/78 42/65/78
391 | f 44/69/79 50/112/79 43/70/79
392 | f 45/72/80 78/114/80 77/73/80
393 | f 46/117/81 48/116/81 45/75/81
394 | f 44/69/82 78/114/82 49/113/82
395 | f 49/113/83 82/107/83 69/118/83
396 | f 82/107/84 74/105/84 69/118/84
397 | f 83/100/85 54/92/85 74/105/85
398 | f 79/93/86 59/119/86 54/92/86
399 | f 80/86/87 64/82/87 59/119/87
400 | f 64/120/88 77/73/88 44/69/88
401 | f 35/12/89 40/62/89 25/13/89
402 | f 7/2/90 36/32/90 37/15/90
403 | f 35/12/91 26/14/91 17/19/91
404 | f 25/13/92 40/62/92 39/29/92
405 | f 38/30/93 16/23/93 12/10/93
406 | f 8/5/94 41/63/94 36/32/94
407 | f 38/30/95 33/20/95 17/19/95
408 | f 26/34/31 25/38/31 13/37/31
409 | f 22/40/33 32/52/33 31/41/33
410 | f 6/43/34 11/47/34 28/44/34
411 | f 15/46/34 29/50/34 28/44/34
412 | f 21/42/35 31/41/35 30/48/35
413 | f 20/49/36 30/48/36 29/50/36
414 | f 39/29/96 41/63/96 8/5/96
415 | f 38/64/47 66/68/47 42/65/47
416 | f 65/67/48 43/70/48 42/65/48
417 | f 65/67/49 64/120/49 44/69/49
418 | f 81/71/50 63/121/50 45/72/50
419 | f 62/74/51 46/117/51 45/75/51
420 | f 37/77/52 61/81/52 66/78/52
421 | f 60/80/53 65/83/53 66/78/53
422 | f 60/80/54 59/119/54 64/82/54
423 | f 58/84/55 63/122/55 81/85/55
424 | f 57/87/56 62/74/56 63/76/56
425 | f 56/89/57 61/81/57 37/77/57
426 | f 55/91/58 60/80/58 61/81/58
427 | f 54/92/59 59/119/59 60/80/59
428 | f 79/93/60 53/123/60 58/84/60
429 | f 52/94/61 57/87/61 58/88/61
430 | f 76/96/62 56/89/62 36/90/62
431 | f 75/98/63 55/91/63 56/89/63
432 | f 75/98/64 74/105/64 54/92/64
433 | f 73/99/65 53/123/65 79/93/65
434 | f 73/101/66 72/124/66 52/94/66
435 | f 71/102/67 76/96/67 41/97/67
436 | f 70/104/68 75/98/68 76/96/68
437 | f 70/104/69 69/118/69 74/105/69
438 | f 68/106/70 73/99/70 83/100/70
439 | f 67/108/71 72/124/71 73/101/71
440 | f 51/110/72 71/102/72 40/103/72
441 | f 50/112/73 70/104/73 71/102/73
442 | f 49/113/74 69/118/74 70/104/74
443 | f 78/114/75 48/125/75 68/106/75
444 | f 47/115/76 67/108/76 68/109/76
445 | f 42/65/77 51/110/77 35/111/77
446 | f 43/70/78 50/112/78 51/110/78
447 | f 44/69/79 49/113/79 50/112/79
448 | f 45/72/80 48/125/80 78/114/80
449 | f 46/117/81 47/115/81 48/116/81
450 | f 44/69/82 77/73/82 78/114/82
451 | f 49/113/83 78/114/83 82/107/83
452 | f 82/107/84 83/100/84 74/105/84
453 | f 83/100/85 79/93/85 54/92/85
454 | f 79/93/86 80/86/86 59/119/86
455 | f 80/86/87 81/85/87 64/82/87
456 | f 64/120/88 81/71/88 77/73/88
457 |
--------------------------------------------------------------------------------
/bin/res/models/tower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/tower.png
--------------------------------------------------------------------------------
/bin/res/models/turret_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/turret_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/watermill_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/watermill_diffuse.png
--------------------------------------------------------------------------------
/bin/res/models/well_diffuse.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/models/well_diffuse.png
--------------------------------------------------------------------------------
/bin/res/music/applause.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/applause.mp3
--------------------------------------------------------------------------------
/bin/res/music/chiptun1.mod:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/chiptun1.mod
--------------------------------------------------------------------------------
/bin/res/music/deliverance.s3m:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/deliverance.s3m
--------------------------------------------------------------------------------
/bin/res/music/guitar_noodling.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/guitar_noodling.ogg
--------------------------------------------------------------------------------
/bin/res/music/hitman.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/hitman.mp3
--------------------------------------------------------------------------------
/bin/res/music/hitman.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/hitman.ogg
--------------------------------------------------------------------------------
/bin/res/music/mini1111.xm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/music/mini1111.xm
--------------------------------------------------------------------------------
/bin/res/pbr/trooper_albedo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/pbr/trooper_albedo.png
--------------------------------------------------------------------------------
/bin/res/pbr/trooper_ao.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/pbr/trooper_ao.png
--------------------------------------------------------------------------------
/bin/res/pbr/trooper_metalness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/pbr/trooper_metalness.png
--------------------------------------------------------------------------------
/bin/res/pbr/trooper_normals.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/pbr/trooper_normals.png
--------------------------------------------------------------------------------
/bin/res/pbr/trooper_roughness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/pbr/trooper_roughness.png
--------------------------------------------------------------------------------
/bin/res/shaders/brdf.fs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Bidirectional reflectance distribution function fragment shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 | #define MAX_SAMPLES 1024u
11 |
12 | // Input vertex attributes (from vertex shader)
13 | in vec2 fragTexCoord;
14 |
15 | // Constant values
16 | const float PI = 3.14159265359;
17 |
18 | // Output fragment color
19 | out vec4 finalColor;
20 |
21 | float DistributionGGX(vec3 N, vec3 H, float roughness);
22 | float RadicalInverse_VdC(uint bits);
23 | vec2 Hammersley(uint i, uint N);
24 | vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);
25 | float GeometrySchlickGGX(float NdotV, float roughness);
26 | float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness);
27 | vec2 IntegrateBRDF(float NdotV, float roughness);
28 |
29 | float DistributionGGX(vec3 N, vec3 H, float roughness)
30 | {
31 | float a = roughness*roughness;
32 | float a2 = a*a;
33 | float NdotH = max(dot(N, H), 0.0);
34 | float NdotH2 = NdotH*NdotH;
35 |
36 | float nom = a2;
37 | float denom = (NdotH2*(a2 - 1.0) + 1.0);
38 | denom = PI*denom*denom;
39 |
40 | return nom/denom;
41 | }
42 |
43 | float RadicalInverse_VdC(uint bits)
44 | {
45 | bits = (bits << 16u) | (bits >> 16u);
46 | bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
47 | bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
48 | bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
49 | bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
50 | return float(bits) * 2.3283064365386963e-10; // / 0x100000000
51 | }
52 |
53 | vec2 Hammersley(uint i, uint N)
54 | {
55 | return vec2(float(i)/float(N), RadicalInverse_VdC(i));
56 | }
57 |
58 | vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness)
59 | {
60 | float a = roughness*roughness;
61 | float phi = 2.0 * PI * Xi.x;
62 | float cosTheta = sqrt((1.0 - Xi.y)/(1.0 + (a*a - 1.0)*Xi.y));
63 | float sinTheta = sqrt(1.0 - cosTheta*cosTheta);
64 |
65 | // Transform from spherical coordinates to cartesian coordinates (halfway vector)
66 | vec3 H = vec3(cos(phi)*sinTheta, sin(phi)*sinTheta, cosTheta);
67 |
68 | // Transform from tangent space H vector to world space sample vector
69 | vec3 up = ((abs(N.z) < 0.999) ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0));
70 | vec3 tangent = normalize(cross(up, N));
71 | vec3 bitangent = cross(N, tangent);
72 | vec3 sampleVec = tangent*H.x + bitangent*H.y + N*H.z;
73 |
74 | return normalize(sampleVec);
75 | }
76 |
77 | float GeometrySchlickGGX(float NdotV, float roughness)
78 | {
79 | // For IBL k is calculated different
80 | float k = (roughness*roughness)/2.0;
81 |
82 | float nom = NdotV;
83 | float denom = NdotV*(1.0 - k) + k;
84 |
85 | return nom/denom;
86 | }
87 |
88 | float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
89 | {
90 | float NdotV = max(dot(N, V), 0.0);
91 | float NdotL = max(dot(N, L), 0.0);
92 | float ggx2 = GeometrySchlickGGX(NdotV, roughness);
93 | float ggx1 = GeometrySchlickGGX(NdotL, roughness);
94 |
95 | return ggx1*ggx2;
96 | }
97 |
98 | vec2 IntegrateBRDF(float NdotV, float roughness)
99 | {
100 | vec3 V = vec3(sqrt(1.0 - NdotV*NdotV), 0.0, NdotV);
101 | float A = 0.0;
102 | float B = 0.0;
103 | vec3 N = vec3(0.0, 0.0, 1.0);
104 |
105 | for(uint i = 0u; i < MAX_SAMPLES; i++)
106 | {
107 | // Generate a sample vector that's biased towards the preferred alignment direction (importance sampling)
108 | vec2 Xi = Hammersley(i, MAX_SAMPLES);
109 | vec3 H = ImportanceSampleGGX(Xi, N, roughness);
110 | vec3 L = normalize(2.0*dot(V, H)*H - V);
111 | float NdotL = max(L.z, 0.0);
112 | float NdotH = max(H.z, 0.0);
113 | float VdotH = max(dot(V, H), 0.0);
114 |
115 | if (NdotL > 0.0)
116 | {
117 | float G = GeometrySmith(N, V, L, roughness);
118 | float G_Vis = (G*VdotH)/(NdotH*NdotV);
119 | float Fc = pow(1.0 - VdotH, 5.0);
120 |
121 | A += (1.0 - Fc)*G_Vis;
122 | B += Fc*G_Vis;
123 | }
124 | }
125 |
126 | // Calculate brdf average sample
127 | A /= float(MAX_SAMPLES);
128 | B /= float(MAX_SAMPLES);
129 |
130 | return vec2(A, B);
131 | }
132 |
133 | void main()
134 | {
135 | // Calculate brdf based on texture coordinates
136 | vec2 brdf = IntegrateBRDF(fragTexCoord.x, fragTexCoord.y);
137 |
138 | // Calculate final fragment color
139 | finalColor = vec4(brdf.r, brdf.g, 0.0, 1.0);
140 | }
141 |
--------------------------------------------------------------------------------
/bin/res/shaders/brdf.vs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Bidirectional reflectance distribution function vertex shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes
12 | in vec3 vertexPosition;
13 | in vec2 vertexTexCoord;
14 |
15 | // Output vertex attributes (to fragment shader)
16 | out vec2 fragTexCoord;
17 |
18 | void main()
19 | {
20 | // Calculate fragment position based on model transformations
21 | fragTexCoord = vertexTexCoord;
22 |
23 | // Calculate final vertex position
24 | gl_Position = vec4(vertexPosition, 1.0);
25 | }
--------------------------------------------------------------------------------
/bin/res/shaders/cubemap.fs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Equirectangular to cubemap fragment shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes (from vertex shader)
12 | in vec3 fragPos;
13 |
14 | // Input uniform values
15 | uniform sampler2D equirectangularMap;
16 |
17 | // Output fragment color
18 | out vec4 finalColor;
19 |
20 | vec2 SampleSphericalMap(vec3 v)
21 | {
22 | vec2 uv = vec2(atan(v.z, v.x), asin(v.y));
23 | uv *= vec2(0.1591, 0.3183);
24 | uv += 0.5;
25 | return uv;
26 | }
27 |
28 | void main()
29 | {
30 | // Normalize local position
31 | vec2 uv = SampleSphericalMap(normalize(fragPos));
32 |
33 | // Fetch color from texture map
34 | vec3 color = texture(equirectangularMap, uv).rgb;
35 |
36 | // Calculate final fragment color
37 | finalColor = vec4(color, 1.0);
38 | }
39 |
--------------------------------------------------------------------------------
/bin/res/shaders/cubemap.vs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Equirectangular to cubemap vertex shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes
12 | in vec3 vertexPosition;
13 |
14 | // Input uniform values
15 | uniform mat4 projection;
16 | uniform mat4 view;
17 |
18 | // Output vertex attributes (to fragment shader)
19 | out vec3 fragPos;
20 |
21 | void main()
22 | {
23 | // Calculate fragment position based on model transformations
24 | fragPos = vertexPosition;
25 |
26 | // Calculate final vertex position
27 | gl_Position = projection*view*vec4(vertexPosition, 1.0);
28 | }
29 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/base.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 | uniform vec2 resolution = vec2(800, 450);
15 |
16 | void main()
17 | {
18 | // Texel color fetching from texture sampler
19 | vec4 texelColor = texture2D(texture0, fragTexCoord);
20 |
21 | // NOTE: Implement here your fragment shader code
22 |
23 | gl_FragColor = texelColor*colDiffuse;
24 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/base.vs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | // Input vertex attributes
4 | attribute vec3 vertexPosition;
5 | attribute vec2 vertexTexCoord;
6 | attribute vec3 vertexNormal;
7 | attribute vec4 vertexColor;
8 |
9 | // Input uniform values
10 | uniform mat4 mvp;
11 |
12 | // Output vertex attributes (to fragment shader)
13 | varying vec2 fragTexCoord;
14 | varying vec4 fragColor;
15 |
16 | // NOTE: Add here your custom variables
17 |
18 | void main()
19 | {
20 | // Send vertex attributes to fragment shader
21 | fragTexCoord = vertexTexCoord;
22 | fragColor = vertexColor;
23 |
24 | // Calculate final vertex position
25 | gl_Position = mvp*vec4(vertexPosition, 1.0);
26 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/bloom.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | const vec2 size = vec2(800, 450); // render size
16 | const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance
17 | const float quality = 2.5; // lower = smaller glow, better quality
18 |
19 | void main()
20 | {
21 | vec4 sum = vec4(0);
22 | vec2 sizeFactor = vec2(1)/size*quality;
23 |
24 | // Texel color fetching from texture sampler
25 | vec4 source = texture2D(texture0, fragTexCoord);
26 |
27 | const int range = 2; // should be = (samples - 1)/2;
28 |
29 | for (int x = -range; x <= range; x++)
30 | {
31 | for (int y = -range; y <= range; y++)
32 | {
33 | sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor);
34 | }
35 | }
36 |
37 | // Calculate final fragment color
38 | gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse;
39 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/blur.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | // NOTE: Render size values must be passed from code
16 | const float renderWidth = 800.0;
17 | const float renderHeight = 450.0;
18 |
19 | vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308);
20 | vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703);
21 |
22 | void main()
23 | {
24 | // Texel color fetching from texture sampler
25 | vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x;
26 |
27 | tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y;
28 | tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y;
29 |
30 | tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z;
31 | tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z;
32 |
33 | gl_FragColor = vec4(tc, 1.0);
34 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/cross_hatching.fs:
--------------------------------------------------------------------------------
1 | # version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | float hatchOffsetY = 5.0;
16 | float lumThreshold01 = 0.9;
17 | float lumThreshold02 = 0.7;
18 | float lumThreshold03 = 0.5;
19 | float lumThreshold04 = 0.3;
20 |
21 | void main()
22 | {
23 | vec3 tc = vec3(1.0, 1.0, 1.0);
24 | float lum = length(texture2D(texture0, fragTexCoord).rgb);
25 |
26 | if (lum < lumThreshold01)
27 | {
28 | if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
29 | }
30 |
31 | if (lum < lumThreshold02)
32 | {
33 | if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
34 | }
35 |
36 | if (lum < lumThreshold03)
37 | {
38 | if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
39 | }
40 |
41 | if (lum < lumThreshold04)
42 | {
43 | if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
44 | }
45 |
46 | gl_FragColor = vec4(tc, 1.0);
47 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/cross_stitching.fs:
--------------------------------------------------------------------------------
1 | # version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | // NOTE: Render size values must be passed from code
16 | const float renderWidth = 800.0;
17 | const float renderHeight = 450.0;
18 |
19 | float stitchingSize = 6.0;
20 | int invert = 0;
21 |
22 | vec4 PostFX(sampler2D tex, vec2 uv)
23 | {
24 | vec4 c = vec4(0.0);
25 | float size = stitchingSize;
26 | vec2 cPos = uv * vec2(renderWidth, renderHeight);
27 | vec2 tlPos = floor(cPos / vec2(size, size));
28 | tlPos *= size;
29 |
30 | int remX = int(mod(cPos.x, size));
31 | int remY = int(mod(cPos.y, size));
32 |
33 | if (remX == 0 && remY == 0) tlPos = cPos;
34 |
35 | vec2 blPos = tlPos;
36 | blPos.y += (size - 1.0);
37 |
38 | if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y)))))
39 | {
40 | if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0);
41 | else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4;
42 | }
43 | else
44 | {
45 | if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4;
46 | else c = vec4(0.0, 0.0, 0.0, 1.0);
47 | }
48 |
49 | return c;
50 | }
51 |
52 | void main()
53 | {
54 | vec3 tc = PostFX(texture0, fragTexCoord).rgb;
55 |
56 | gl_FragColor = vec4(tc, 1.0);
57 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/distortion.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 |
8 | // Input uniform values
9 | uniform sampler2D texture0;
10 |
11 | // NOTE: Default parameters for Oculus Rift DK2 device
12 | const vec2 LeftLensCenter = vec2(0.2863248, 0.5);
13 | const vec2 RightLensCenter = vec2(0.7136753, 0.5);
14 | const vec2 LeftScreenCenter = vec2(0.25, 0.5);
15 | const vec2 RightScreenCenter = vec2(0.75, 0.5);
16 | const vec2 Scale = vec2(0.25, 0.45);
17 | const vec2 ScaleIn = vec2(4.0, 2.5);
18 | const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0);
19 | const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
20 |
21 | void main()
22 | {
23 | // The following two variables need to be set per eye
24 | vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter;
25 | vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter;
26 |
27 | // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter)
28 | vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1]
29 | float rSq = theta.x*theta.x + theta.y*theta.y;
30 | vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq);
31 | //vec2 tc = LensCenter + Scale*theta1;
32 |
33 | // Detect whether blue texture coordinates are out of range since these will scaled out the furthest
34 | vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq);
35 | vec2 tcBlue = LensCenter + Scale*thetaBlue;
36 |
37 | if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
38 | else
39 | {
40 | // Do blue texture lookup
41 | float blue = texture2D(texture0, tcBlue).b;
42 |
43 | // Do green lookup (no scaling)
44 | vec2 tcGreen = LensCenter + Scale*theta1;
45 | float green = texture2D(texture0, tcGreen).g;
46 |
47 | // Do red scale and lookup
48 | vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq);
49 | vec2 tcRed = LensCenter + Scale*thetaRed;
50 | float red = texture2D(texture0, tcRed).r;
51 |
52 | gl_FragColor = vec4(red, green, blue, 1.0);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/dream_vision.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | void main()
16 | {
17 | vec4 color = texture2D(texture0, fragTexCoord);
18 |
19 | color += texture2D(texture0, fragTexCoord + 0.001);
20 | color += texture2D(texture0, fragTexCoord + 0.003);
21 | color += texture2D(texture0, fragTexCoord + 0.005);
22 | color += texture2D(texture0, fragTexCoord + 0.007);
23 | color += texture2D(texture0, fragTexCoord + 0.009);
24 | color += texture2D(texture0, fragTexCoord + 0.011);
25 |
26 | color += texture2D(texture0, fragTexCoord - 0.001);
27 | color += texture2D(texture0, fragTexCoord - 0.003);
28 | color += texture2D(texture0, fragTexCoord - 0.005);
29 | color += texture2D(texture0, fragTexCoord - 0.007);
30 | color += texture2D(texture0, fragTexCoord - 0.009);
31 | color += texture2D(texture0, fragTexCoord - 0.011);
32 |
33 | color.rgb = vec3((color.r + color.g + color.b)/3.0);
34 | color = color/9.5;
35 |
36 | gl_FragColor = color;
37 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/fisheye.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | const float PI = 3.1415926535;
16 |
17 | void main()
18 | {
19 | float aperture = 178.0;
20 | float apertureHalf = 0.5 * aperture * (PI / 180.0);
21 | float maxFactor = sin(apertureHalf);
22 |
23 | vec2 uv = vec2(0.0);
24 | vec2 xy = 2.0 * fragTexCoord.xy - 1.0;
25 | float d = length(xy);
26 |
27 | if (d < (2.0 - maxFactor))
28 | {
29 | d = length(xy * maxFactor);
30 | float z = sqrt(1.0 - d * d);
31 | float r = atan(d, z) / PI;
32 | float phi = atan(xy.y, xy.x);
33 |
34 | uv.x = r * cos(phi) + 0.5;
35 | uv.y = r * sin(phi) + 0.5;
36 | }
37 | else
38 | {
39 | uv = fragTexCoord.xy;
40 | }
41 |
42 | gl_FragColor = texture2D(texture0, uv);
43 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/grayscale.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | void main()
16 | {
17 | // Texel color fetching from texture sampler
18 | vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor;
19 |
20 | // Convert texel color to grayscale using NTSC conversion weights
21 | float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));
22 |
23 | // Calculate final fragment color
24 | gl_FragColor = vec4(gray, gray, gray, texelColor.a);
25 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/pixelizer.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | // NOTE: Render size values must be passed from code
16 | const float renderWidth = 800.0;
17 | const float renderHeight = 450.0;
18 |
19 | float pixelWidth = 5.0;
20 | float pixelHeight = 5.0;
21 |
22 | void main()
23 | {
24 | float dx = pixelWidth*(1.0/renderWidth);
25 | float dy = pixelHeight*(1.0/renderHeight);
26 |
27 | vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy));
28 |
29 | vec3 tc = texture2D(texture0, coord).rgb;
30 |
31 | gl_FragColor = vec4(tc, 1.0);
32 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/posterization.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | float gamma = 0.6;
16 | float numColors = 8.0;
17 |
18 | void main()
19 | {
20 | vec3 color = texture2D(texture0, fragTexCoord.xy).rgb;
21 |
22 | color = pow(color, vec3(gamma, gamma, gamma));
23 | color = color*numColors;
24 | color = floor(color);
25 | color = color/numColors;
26 | color = pow(color, vec3(1.0/gamma));
27 |
28 | gl_FragColor = vec4(color, 1.0);
29 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/predator.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | void main()
16 | {
17 | vec3 color = texture2D(texture0, fragTexCoord).rgb;
18 | vec3 colors[3];
19 | colors[0] = vec3(0.0, 0.0, 1.0);
20 | colors[1] = vec3(1.0, 1.0, 0.0);
21 | colors[2] = vec3(1.0, 0.0, 0.0);
22 |
23 | float lum = (color.r + color.g + color.b)/3.0;
24 |
25 | vec3 tc = vec3(0.0, 0.0, 0.0);
26 |
27 | if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5);
28 | else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5);
29 |
30 | gl_FragColor = vec4(tc, 1.0);
31 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/scanlines.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | float offset = 0.0;
16 | float frequency = 450.0/3.0;
17 |
18 | uniform float time;
19 |
20 | void main()
21 | {
22 | /*
23 | // Scanlines method 1
24 | float tval = 0; //time
25 | vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval));
26 |
27 | vec4 color = texture2D(texture0, fragTexCoord);
28 |
29 | color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0);
30 | color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y);
31 | color *= vec4(0.8, 1.0, 0.7, 1);
32 | color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0);
33 | color *= 0.97 + 0.03*sin(110.0*tval);
34 |
35 | fragColor = color;
36 | */
37 | // Scanlines method 2
38 | float globalPos = (fragTexCoord.y + offset) * frequency;
39 | float wavePos = cos((fract(globalPos) - 0.5)*3.14);
40 |
41 | vec4 color = texture2D(texture0, fragTexCoord);
42 |
43 | gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos);
44 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/sobel.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 | vec2 resolution = vec2(800.0, 450.0);
15 |
16 | void main()
17 | {
18 | float x = 1.0/resolution.x;
19 | float y = 1.0/resolution.y;
20 |
21 | vec4 horizEdge = vec4(0.0);
22 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
23 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0;
24 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
25 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
26 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0;
27 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
28 |
29 | vec4 vertEdge = vec4(0.0);
30 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
31 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0;
32 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
33 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
34 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0;
35 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
36 |
37 | vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb));
38 |
39 | gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a);
40 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/standard.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | varying vec3 fragPosition;
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 | varying vec3 fragNormal;
9 |
10 | uniform sampler2D texture0;
11 | uniform sampler2D texture1;
12 | uniform sampler2D texture2;
13 |
14 | uniform vec4 colAmbient;
15 | uniform vec4 colDiffuse;
16 | uniform vec4 colSpecular;
17 | uniform float glossiness;
18 |
19 | uniform int useNormal;
20 | uniform int useSpecular;
21 |
22 | uniform mat4 modelMatrix;
23 | uniform vec3 viewDir;
24 |
25 | struct Light {
26 | int enabled;
27 | int type;
28 | vec3 position;
29 | vec3 direction;
30 | vec4 diffuse;
31 | float intensity;
32 | float radius;
33 | float coneAngle;
34 | };
35 |
36 | const int maxLights = 8;
37 | uniform Light lights[maxLights];
38 |
39 | vec3 ComputeLightPoint(Light l, vec3 n, vec3 v, float s)
40 | {
41 | vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1.0));
42 | vec3 surfaceToLight = l.position - surfacePos;
43 |
44 | // Diffuse shading
45 | float brightness = clamp(float(dot(n, surfaceToLight)/(length(surfaceToLight)*length(n))), 0.0, 1.0);
46 | float diff = 1.0/dot(surfaceToLight/l.radius, surfaceToLight/l.radius)*brightness*l.intensity;
47 |
48 | // Specular shading
49 | float spec = 0.0;
50 | if (diff > 0.0)
51 | {
52 | vec3 h = normalize(-l.direction + v);
53 | spec = pow(abs(dot(n, h)), 3.0 + glossiness)*s;
54 | }
55 |
56 | return (diff*l.diffuse.rgb + spec*colSpecular.rgb);
57 | }
58 |
59 | vec3 ComputeLightDirectional(Light l, vec3 n, vec3 v, float s)
60 | {
61 | vec3 lightDir = normalize(-l.direction);
62 |
63 | // Diffuse shading
64 | float diff = clamp(float(dot(n, lightDir)), 0.0, 1.0)*l.intensity;
65 |
66 | // Specular shading
67 | float spec = 0.0;
68 | if (diff > 0.0)
69 | {
70 | vec3 h = normalize(lightDir + v);
71 | spec = pow(abs(dot(n, h)), 3.0 + glossiness)*s;
72 | }
73 |
74 | // Combine results
75 | return (diff*l.intensity*l.diffuse.rgb + spec*colSpecular.rgb);
76 | }
77 |
78 | vec3 ComputeLightSpot(Light l, vec3 n, vec3 v, float s)
79 | {
80 | vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1));
81 | vec3 lightToSurface = normalize(surfacePos - l.position);
82 | vec3 lightDir = normalize(-l.direction);
83 |
84 | // Diffuse shading
85 | float diff = clamp(float(dot(n, lightDir)), 0.0, 1.0)*l.intensity;
86 |
87 | // Spot attenuation
88 | float attenuation = clamp(float(dot(n, lightToSurface)), 0.0, 1.0);
89 | attenuation = dot(lightToSurface, -lightDir);
90 |
91 | float lightToSurfaceAngle = degrees(acos(attenuation));
92 | if (lightToSurfaceAngle > l.coneAngle) attenuation = 0.0;
93 |
94 | float falloff = (l.coneAngle - lightToSurfaceAngle)/l.coneAngle;
95 |
96 | // Combine diffuse and attenuation
97 | float diffAttenuation = diff*attenuation;
98 |
99 | // Specular shading
100 | float spec = 0.0;
101 | if (diffAttenuation > 0.0)
102 | {
103 | vec3 h = normalize(lightDir + v);
104 | spec = pow(abs(dot(n, h)), 3.0 + glossiness)*s;
105 | }
106 |
107 | return (falloff*(diffAttenuation*l.diffuse.rgb + spec*colSpecular.rgb));
108 | }
109 |
110 | void main()
111 | {
112 | // Calculate fragment normal in screen space
113 | // NOTE: important to multiply model matrix by fragment normal to apply model transformation (rotation and scale)
114 | mat3 normalMatrix = mat3(modelMatrix);
115 | vec3 normal = normalize(normalMatrix*fragNormal);
116 |
117 | // Normalize normal and view direction vectors
118 | vec3 n = normalize(normal);
119 | vec3 v = normalize(viewDir);
120 |
121 | // Calculate diffuse texture color fetching
122 | vec4 texelColor = texture2D(texture0, fragTexCoord);
123 | vec3 lighting = colAmbient.rgb;
124 |
125 | // Calculate normal texture color fetching or set to maximum normal value by default
126 | if (useNormal == 1)
127 | {
128 | n *= texture2D(texture1, fragTexCoord).rgb;
129 | n = normalize(n);
130 | }
131 |
132 | // Calculate specular texture color fetching or set to maximum specular value by default
133 | float spec = 1.0;
134 | if (useSpecular == 1) spec = texture2D(texture2, fragTexCoord).r;
135 |
136 | for (int i = 0; i < maxLights; i++)
137 | {
138 | // Check if light is enabled
139 | if (lights[i].enabled == 1)
140 | {
141 | // Calculate lighting based on light type
142 | if(lights[i].type == 0) lighting += ComputeLightPoint(lights[i], n, v, spec);
143 | else if(lights[i].type == 1) lighting += ComputeLightDirectional(lights[i], n, v, spec);
144 | else if(lights[i].type == 2) lighting += ComputeLightSpot(lights[i], n, v, spec);
145 |
146 | // NOTE: It seems that too many ComputeLight*() operations inside for loop breaks the shader on RPI
147 | }
148 | }
149 |
150 | // Calculate final fragment color
151 | gl_FragColor = vec4(texelColor.rgb*lighting*colDiffuse.rgb, texelColor.a*colDiffuse.a);
152 | }
153 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/standard.vs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | attribute vec3 vertexPosition;
4 | attribute vec3 vertexNormal;
5 | attribute vec2 vertexTexCoord;
6 | attribute vec4 vertexColor;
7 |
8 | varying vec3 fragPosition;
9 | varying vec2 fragTexCoord;
10 | varying vec4 fragColor;
11 | varying vec3 fragNormal;
12 |
13 | uniform mat4 mvp;
14 |
15 | void main()
16 | {
17 | fragPosition = vertexPosition;
18 | fragTexCoord = vertexTexCoord;
19 | fragColor = vertexColor;
20 | fragNormal = vertexNormal;
21 |
22 | gl_Position = mvp*vec4(vertexPosition, 1.0);
23 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl100/swirl.fs:
--------------------------------------------------------------------------------
1 | #version 100
2 |
3 | precision mediump float;
4 |
5 | // Input vertex attributes (from vertex shader)
6 | varying vec2 fragTexCoord;
7 | varying vec4 fragColor;
8 |
9 | // Input uniform values
10 | uniform sampler2D texture0;
11 | uniform vec4 colDiffuse;
12 |
13 | // NOTE: Add here your custom variables
14 |
15 | // NOTE: Render size values should be passed from code
16 | const float renderWidth = 800;
17 | const float renderHeight = 450;
18 |
19 | float radius = 250.0;
20 | float angle = 0.8;
21 |
22 | uniform vec2 center;
23 |
24 | void main()
25 | {
26 | vec2 texSize = vec2(renderWidth, renderHeight);
27 | vec2 tc = fragTexCoord*texSize;
28 | tc -= center;
29 |
30 | float dist = length(tc);
31 |
32 | if (dist < radius)
33 | {
34 | float percent = (radius - dist)/radius;
35 | float theta = percent*percent*angle*8.0;
36 | float s = sin(theta);
37 | float c = cos(theta);
38 |
39 | tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c)));
40 | }
41 |
42 | tc += center;
43 | vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;;
44 |
45 | gl_FragColor = vec4(color.rgb, 1.0);;
46 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/base.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 | uniform vec2 resolution = vec2(800, 450);
13 |
14 | void main()
15 | {
16 | // Texel color fetching from texture sampler
17 | vec4 texelColor = texture2D(texture0, fragTexCoord);
18 |
19 | // NOTE: Implement here your fragment shader code
20 |
21 | gl_FragColor = texelColor*colDiffuse;
22 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/base.vs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes
4 | attribute vec3 vertexPosition;
5 | attribute vec2 vertexTexCoord;
6 | attribute vec3 vertexNormal;
7 | attribute vec4 vertexColor;
8 |
9 | // Input uniform values
10 | uniform mat4 mvp;
11 |
12 | // Output vertex attributes (to fragment shader)
13 | varying vec2 fragTexCoord;
14 | varying vec4 fragColor;
15 |
16 | // NOTE: Add here your custom variables
17 |
18 | void main()
19 | {
20 | // Send vertex attributes to fragment shader
21 | fragTexCoord = vertexTexCoord;
22 | fragColor = vertexColor;
23 |
24 | // Calculate final vertex position
25 | gl_Position = mvp*vec4(vertexPosition, 1.0);
26 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/bloom.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | const vec2 size = vec2(800, 450); // render size
14 | const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance
15 | const float quality = 2.5; // lower = smaller glow, better quality
16 |
17 | void main()
18 | {
19 | vec4 sum = vec4(0);
20 | vec2 sizeFactor = vec2(1)/size*quality;
21 |
22 | // Texel color fetching from texture sampler
23 | vec4 source = texture2D(texture0, fragTexCoord);
24 |
25 | const int range = 2; // should be = (samples - 1)/2;
26 |
27 | for (int x = -range; x <= range; x++)
28 | {
29 | for (int y = -range; y <= range; y++)
30 | {
31 | sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor);
32 | }
33 | }
34 |
35 | // Calculate final fragment color
36 | gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse;
37 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/blur.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | // NOTE: Render size values must be passed from code
14 | const float renderWidth = 800.0;
15 | const float renderHeight = 450.0;
16 |
17 | vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308);
18 | vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703);
19 |
20 | void main()
21 | {
22 | // Texel color fetching from texture sampler
23 | vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x;
24 |
25 | tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y;
26 | tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y;
27 |
28 | tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z;
29 | tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z;
30 |
31 | gl_FragColor = vec4(tc, 1.0);
32 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/cross_hatching.fs:
--------------------------------------------------------------------------------
1 | # version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | float hatchOffsetY = 5.0;
14 | float lumThreshold01 = 0.9;
15 | float lumThreshold02 = 0.7;
16 | float lumThreshold03 = 0.5;
17 | float lumThreshold04 = 0.3;
18 |
19 | void main()
20 | {
21 | vec3 tc = vec3(1.0, 1.0, 1.0);
22 | float lum = length(texture2D(texture0, fragTexCoord).rgb);
23 |
24 | if (lum < lumThreshold01)
25 | {
26 | if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
27 | }
28 |
29 | if (lum < lumThreshold02)
30 | {
31 | if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
32 | }
33 |
34 | if (lum < lumThreshold03)
35 | {
36 | if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
37 | }
38 |
39 | if (lum < lumThreshold04)
40 | {
41 | if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
42 | }
43 |
44 | gl_FragColor = vec4(tc, 1.0);
45 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/cross_stitching.fs:
--------------------------------------------------------------------------------
1 | # version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | // NOTE: Render size values must be passed from code
14 | const float renderWidth = 800.0;
15 | const float renderHeight = 450.0;
16 |
17 | float stitchingSize = 6.0;
18 | int invert = 0;
19 |
20 | vec4 PostFX(sampler2D tex, vec2 uv)
21 | {
22 | vec4 c = vec4(0.0);
23 | float size = stitchingSize;
24 | vec2 cPos = uv * vec2(renderWidth, renderHeight);
25 | vec2 tlPos = floor(cPos / vec2(size, size));
26 | tlPos *= size;
27 |
28 | int remX = int(mod(cPos.x, size));
29 | int remY = int(mod(cPos.y, size));
30 |
31 | if (remX == 0 && remY == 0) tlPos = cPos;
32 |
33 | vec2 blPos = tlPos;
34 | blPos.y += (size - 1.0);
35 |
36 | if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y)))))
37 | {
38 | if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0);
39 | else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4;
40 | }
41 | else
42 | {
43 | if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4;
44 | else c = vec4(0.0, 0.0, 0.0, 1.0);
45 | }
46 |
47 | return c;
48 | }
49 |
50 | void main()
51 | {
52 | vec3 tc = PostFX(texture0, fragTexCoord).rgb;
53 |
54 | gl_FragColor = vec4(tc, 1.0);
55 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/distortion.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 |
6 | // Input uniform values
7 | uniform sampler2D texture0;
8 |
9 | // NOTE: Default parameters for Oculus Rift DK2 device
10 | const vec2 LeftLensCenter = vec2(0.2863248, 0.5);
11 | const vec2 RightLensCenter = vec2(0.7136753, 0.5);
12 | const vec2 LeftScreenCenter = vec2(0.25, 0.5);
13 | const vec2 RightScreenCenter = vec2(0.75, 0.5);
14 | const vec2 Scale = vec2(0.25, 0.45);
15 | const vec2 ScaleIn = vec2(4.0, 2.5);
16 | const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0);
17 | const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
18 |
19 | void main()
20 | {
21 | // The following two variables need to be set per eye
22 | vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter;
23 | vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter;
24 |
25 | // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter)
26 | vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1]
27 | float rSq = theta.x*theta.x + theta.y*theta.y;
28 | vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq);
29 | //vec2 tc = LensCenter + Scale*theta1;
30 |
31 | // Detect whether blue texture coordinates are out of range since these will scaled out the furthest
32 | vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq);
33 | vec2 tcBlue = LensCenter + Scale*thetaBlue;
34 |
35 | if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
36 | else
37 | {
38 | // Do blue texture lookup
39 | float blue = texture2D(texture0, tcBlue).b;
40 |
41 | // Do green lookup (no scaling)
42 | vec2 tcGreen = LensCenter + Scale*theta1;
43 | float green = texture2D(texture0, tcGreen).g;
44 |
45 | // Do red scale and lookup
46 | vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq);
47 | vec2 tcRed = LensCenter + Scale*thetaRed;
48 | float red = texture2D(texture0, tcRed).r;
49 |
50 | gl_FragColor = vec4(red, green, blue, 1.0);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/dream_vision.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | void main()
14 | {
15 | vec4 color = texture2D(texture0, fragTexCoord);
16 |
17 | color += texture2D(texture0, fragTexCoord + 0.001);
18 | color += texture2D(texture0, fragTexCoord + 0.003);
19 | color += texture2D(texture0, fragTexCoord + 0.005);
20 | color += texture2D(texture0, fragTexCoord + 0.007);
21 | color += texture2D(texture0, fragTexCoord + 0.009);
22 | color += texture2D(texture0, fragTexCoord + 0.011);
23 |
24 | color += texture2D(texture0, fragTexCoord - 0.001);
25 | color += texture2D(texture0, fragTexCoord - 0.003);
26 | color += texture2D(texture0, fragTexCoord - 0.005);
27 | color += texture2D(texture0, fragTexCoord - 0.007);
28 | color += texture2D(texture0, fragTexCoord - 0.009);
29 | color += texture2D(texture0, fragTexCoord - 0.011);
30 |
31 | color.rgb = vec3((color.r + color.g + color.b)/3.0);
32 | color = color/9.5;
33 |
34 | gl_FragColor = color;
35 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/fisheye.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | const float PI = 3.1415926535;
14 |
15 | void main()
16 | {
17 | float aperture = 178.0;
18 | float apertureHalf = 0.5 * aperture * (PI / 180.0);
19 | float maxFactor = sin(apertureHalf);
20 |
21 | vec2 uv = vec2(0.0);
22 | vec2 xy = 2.0 * fragTexCoord.xy - 1.0;
23 | float d = length(xy);
24 |
25 | if (d < (2.0 - maxFactor))
26 | {
27 | d = length(xy * maxFactor);
28 | float z = sqrt(1.0 - d * d);
29 | float r = atan(d, z) / PI;
30 | float phi = atan(xy.y, xy.x);
31 |
32 | uv.x = r * cos(phi) + 0.5;
33 | uv.y = r * sin(phi) + 0.5;
34 | }
35 | else
36 | {
37 | uv = fragTexCoord.xy;
38 | }
39 |
40 | gl_FragColor = texture2D(texture0, uv);
41 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/grayscale.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | void main()
14 | {
15 | // Texel color fetching from texture sampler
16 | vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor;
17 |
18 | // Convert texel color to grayscale using NTSC conversion weights
19 | float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));
20 |
21 | // Calculate final fragment color
22 | gl_FragColor = vec4(gray, gray, gray, texelColor.a);
23 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/pixelizer.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | // NOTE: Render size values must be passed from code
14 | const float renderWidth = 800.0;
15 | const float renderHeight = 450.0;
16 |
17 | float pixelWidth = 5.0;
18 | float pixelHeight = 5.0;
19 |
20 | void main()
21 | {
22 | float dx = pixelWidth*(1.0/renderWidth);
23 | float dy = pixelHeight*(1.0/renderHeight);
24 |
25 | vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy));
26 |
27 | vec3 tc = texture2D(texture0, coord).rgb;
28 |
29 | gl_FragColor = vec4(tc, 1.0);
30 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/posterization.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | float gamma = 0.6;
14 | float numColors = 8.0;
15 |
16 | void main()
17 | {
18 | vec3 color = texture2D(texture0, fragTexCoord.xy).rgb;
19 |
20 | color = pow(color, vec3(gamma, gamma, gamma));
21 | color = color*numColors;
22 | color = floor(color);
23 | color = color/numColors;
24 | color = pow(color, vec3(1.0/gamma));
25 |
26 | gl_FragColor = vec4(color, 1.0);
27 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/predator.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | void main()
14 | {
15 | vec3 color = texture2D(texture0, fragTexCoord).rgb;
16 | vec3 colors[3];
17 | colors[0] = vec3(0.0, 0.0, 1.0);
18 | colors[1] = vec3(1.0, 1.0, 0.0);
19 | colors[2] = vec3(1.0, 0.0, 0.0);
20 |
21 | float lum = (color.r + color.g + color.b)/3.0;
22 |
23 | vec3 tc = vec3(0.0, 0.0, 0.0);
24 |
25 | if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5);
26 | else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5);
27 |
28 | gl_FragColor = vec4(tc, 1.0);
29 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/scanlines.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | float offset = 0.0;
14 | float frequency = 450.0/3.0;
15 |
16 | uniform float time;
17 |
18 | void main()
19 | {
20 | /*
21 | // Scanlines method 1
22 | float tval = 0; //time
23 | vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval));
24 |
25 | vec4 color = texture2D(texture0, fragTexCoord);
26 |
27 | color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0);
28 | color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y);
29 | color *= vec4(0.8, 1.0, 0.7, 1);
30 | color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0);
31 | color *= 0.97 + 0.03*sin(110.0*tval);
32 |
33 | fragColor = color;
34 | */
35 | // Scanlines method 2
36 | float globalPos = (fragTexCoord.y + offset) * frequency;
37 | float wavePos = cos((fract(globalPos) - 0.5)*3.14);
38 |
39 | vec4 color = texture2D(texture0, fragTexCoord);
40 |
41 | gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos);
42 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/sobel.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 | vec2 resolution = vec2(800.0, 450.0);
13 |
14 | void main()
15 | {
16 | float x = 1.0/resolution.x;
17 | float y = 1.0/resolution.y;
18 |
19 | vec4 horizEdge = vec4(0.0);
20 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
21 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0;
22 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
23 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
24 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0;
25 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
26 |
27 | vec4 vertEdge = vec4(0.0);
28 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
29 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0;
30 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
31 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
32 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0;
33 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
34 |
35 | vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb));
36 |
37 | gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a);
38 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl120/swirl.fs:
--------------------------------------------------------------------------------
1 | #version 120
2 |
3 | // Input vertex attributes (from vertex shader)
4 | varying vec2 fragTexCoord;
5 | varying vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // NOTE: Add here your custom variables
12 |
13 | // NOTE: Render size values should be passed from code
14 | const float renderWidth = 800;
15 | const float renderHeight = 450;
16 |
17 | float radius = 250.0;
18 | float angle = 0.8;
19 |
20 | uniform vec2 center;
21 |
22 | void main()
23 | {
24 | vec2 texSize = vec2(renderWidth, renderHeight);
25 | vec2 tc = fragTexCoord*texSize;
26 | tc -= center;
27 |
28 | float dist = length(tc);
29 |
30 | if (dist < radius)
31 | {
32 | float percent = (radius - dist)/radius;
33 | float theta = percent*percent*angle*8.0;
34 | float s = sin(theta);
35 | float c = cos(theta);
36 |
37 | tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c)));
38 | }
39 |
40 | tc += center;
41 | vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;;
42 |
43 | gl_FragColor = vec4(color.rgb, 1.0);;
44 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/base.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | void main()
17 | {
18 | // Texel color fetching from texture sampler
19 | vec4 texelColor = texture(texture0, fragTexCoord);
20 |
21 | // NOTE: Implement here your fragment shader code
22 |
23 | finalColor = texelColor*colDiffuse;
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/base.vs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes
4 | in vec3 vertexPosition;
5 | in vec2 vertexTexCoord;
6 | in vec3 vertexNormal;
7 | in vec4 vertexColor;
8 |
9 | // Input uniform values
10 | uniform mat4 mvp;
11 |
12 | // Output vertex attributes (to fragment shader)
13 | out vec2 fragTexCoord;
14 | out vec4 fragColor;
15 |
16 | // NOTE: Add here your custom variables
17 |
18 | void main()
19 | {
20 | // Send vertex attributes to fragment shader
21 | fragTexCoord = vertexTexCoord;
22 | fragColor = vertexColor;
23 |
24 | // Calculate final vertex position
25 | gl_Position = mvp*vec4(vertexPosition, 1.0);
26 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/bloom.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | const vec2 size = vec2(800, 450); // render size
17 | const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance
18 | const float quality = 2.5; // lower = smaller glow, better quality
19 |
20 | void main()
21 | {
22 | vec4 sum = vec4(0);
23 | vec2 sizeFactor = vec2(1)/size*quality;
24 |
25 | // Texel color fetching from texture sampler
26 | vec4 source = texture(texture0, fragTexCoord);
27 |
28 | const int range = 2; // should be = (samples - 1)/2;
29 |
30 | for (int x = -range; x <= range; x++)
31 | {
32 | for (int y = -range; y <= range; y++)
33 | {
34 | sum += texture(texture0, fragTexCoord + vec2(x, y)*sizeFactor);
35 | }
36 | }
37 |
38 | // Calculate final fragment color
39 | finalColor = ((sum/(samples*samples)) + source)*colDiffuse;
40 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/blur.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | // NOTE: Render size values must be passed from code
17 | const float renderWidth = 800;
18 | const float renderHeight = 450;
19 |
20 | float offset[3] = float[](0.0, 1.3846153846, 3.2307692308);
21 | float weight[3] = float[](0.2270270270, 0.3162162162, 0.0702702703);
22 |
23 | void main()
24 | {
25 | // Texel color fetching from texture sampler
26 | vec3 texelColor = texture(texture0, fragTexCoord).rgb*weight[0];
27 |
28 | for (int i = 1; i < 3; i++)
29 | {
30 | texelColor += texture(texture0, fragTexCoord + vec2(offset[i])/renderWidth, 0.0).rgb*weight[i];
31 | texelColor += texture(texture0, fragTexCoord - vec2(offset[i])/renderWidth, 0.0).rgb*weight[i];
32 | }
33 |
34 | finalColor = vec4(texelColor, 1.0);
35 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/cross_hatching.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | float hatchOffsetY = 5.0;
17 | float lumThreshold01 = 0.9;
18 | float lumThreshold02 = 0.7;
19 | float lumThreshold03 = 0.5;
20 | float lumThreshold04 = 0.3;
21 |
22 | void main()
23 | {
24 | vec3 tc = vec3(1.0, 1.0, 1.0);
25 | float lum = length(texture(texture0, fragTexCoord).rgb);
26 |
27 | if (lum < lumThreshold01)
28 | {
29 | if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
30 | }
31 |
32 | if (lum < lumThreshold02)
33 | {
34 | if (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
35 | }
36 |
37 | if (lum < lumThreshold03)
38 | {
39 | if (mod(gl_FragCoord.x + gl_FragCoord.y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
40 | }
41 |
42 | if (lum < lumThreshold04)
43 | {
44 | if (mod(gl_FragCoord.x - gl_FragCoord.y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0);
45 | }
46 |
47 | finalColor = vec4(tc, 1.0);
48 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/cross_stitching.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | // NOTE: Render size values must be passed from code
17 | const float renderWidth = 800.0;
18 | const float renderHeight = 450.0;
19 |
20 | float stitchingSize = 6.0;
21 |
22 | uniform int invert = 0;
23 |
24 | vec4 PostFX(sampler2D tex, vec2 uv)
25 | {
26 | vec4 c = vec4(0.0);
27 | float size = stitchingSize;
28 | vec2 cPos = uv * vec2(renderWidth, renderHeight);
29 | vec2 tlPos = floor(cPos / vec2(size, size));
30 | tlPos *= size;
31 |
32 | int remX = int(mod(cPos.x, size));
33 | int remY = int(mod(cPos.y, size));
34 |
35 | if (remX == 0 && remY == 0) tlPos = cPos;
36 |
37 | vec2 blPos = tlPos;
38 | blPos.y += (size - 1.0);
39 |
40 | if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y)))))
41 | {
42 | if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0);
43 | else c = texture(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4;
44 | }
45 | else
46 | {
47 | if (invert == 1) c = texture(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4;
48 | else c = vec4(0.0, 0.0, 0.0, 1.0);
49 | }
50 |
51 | return c;
52 | }
53 |
54 | void main()
55 | {
56 | vec3 tc = PostFX(texture0, fragTexCoord).rgb;
57 |
58 | finalColor = vec4(tc, 1.0);
59 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/depth.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0; // Depth texture
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | void main()
17 | {
18 | float zNear = 0.01; // camera z near
19 | float zFar = 10.0; // camera z far
20 | float z = texture(texture0, fragTexCoord).x;
21 |
22 | // Linearize depth value
23 | float depth = (2.0*zNear)/(zFar + zNear - z*(zFar - zNear));
24 |
25 | // Calculate final fragment color
26 | finalColor = vec4(depth, depth, depth, 1.0f);
27 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/distortion.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 |
6 | // Input uniform values
7 | uniform sampler2D texture0;
8 |
9 | // Output fragment color
10 | out vec4 finalColor;
11 |
12 | // NOTE: Default parameters for Oculus Rift DK2 device
13 | const vec2 LeftLensCenter = vec2(0.2863248, 0.5);
14 | const vec2 RightLensCenter = vec2(0.7136753, 0.5);
15 | const vec2 LeftScreenCenter = vec2(0.25, 0.5);
16 | const vec2 RightScreenCenter = vec2(0.75, 0.5);
17 | const vec2 Scale = vec2(0.25, 0.45);
18 | const vec2 ScaleIn = vec2(4.0, 2.5);
19 | const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0);
20 | const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0);
21 |
22 | void main()
23 | {
24 | // The following two variables need to be set per eye
25 | vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter;
26 | vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter;
27 |
28 | // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter)
29 | vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1]
30 | float rSq = theta.x*theta.x + theta.y*theta.y;
31 | vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq);
32 | //vec2 tc = LensCenter + Scale*theta1;
33 |
34 | // Detect whether blue texture coordinates are out of range since these will scaled out the furthest
35 | vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq);
36 | vec2 tcBlue = LensCenter + Scale*thetaBlue;
37 |
38 | if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) finalColor = vec4(0.0, 0.0, 0.0, 1.0);
39 | else
40 | {
41 | // Do blue texture lookup
42 | float blue = texture(texture0, tcBlue).b;
43 |
44 | // Do green lookup (no scaling)
45 | vec2 tcGreen = LensCenter + Scale*theta1;
46 | float green = texture(texture0, tcGreen).g;
47 |
48 | // Do red scale and lookup
49 | vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq);
50 | vec2 tcRed = LensCenter + Scale*thetaRed;
51 | float red = texture(texture0, tcRed).r;
52 |
53 | finalColor = vec4(red, green, blue, 1.0);
54 | }
55 | }
56 |
57 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/dream_vision.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | in vec2 fragTexCoord;
4 |
5 | out vec4 fragColor;
6 |
7 | uniform sampler2D texture0;
8 | uniform vec4 colDiffuse;
9 |
10 | // NOTE: Add here your custom variables
11 |
12 | void main()
13 | {
14 | vec4 color = texture(texture0, fragTexCoord);
15 |
16 | color += texture(texture0, fragTexCoord + 0.001);
17 | color += texture(texture0, fragTexCoord + 0.003);
18 | color += texture(texture0, fragTexCoord + 0.005);
19 | color += texture(texture0, fragTexCoord + 0.007);
20 | color += texture(texture0, fragTexCoord + 0.009);
21 | color += texture(texture0, fragTexCoord + 0.011);
22 |
23 | color += texture(texture0, fragTexCoord - 0.001);
24 | color += texture(texture0, fragTexCoord - 0.003);
25 | color += texture(texture0, fragTexCoord - 0.005);
26 | color += texture(texture0, fragTexCoord - 0.007);
27 | color += texture(texture0, fragTexCoord - 0.009);
28 | color += texture(texture0, fragTexCoord - 0.011);
29 |
30 | color.rgb = vec3((color.r + color.g + color.b)/3.0);
31 | color = color/9.5;
32 |
33 | fragColor = color;
34 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/fisheye.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | in vec2 fragTexCoord;
4 |
5 | out vec4 fragColor;
6 |
7 | uniform sampler2D texture0;
8 | uniform vec4 colDiffuse;
9 |
10 | // NOTE: Add here your custom variables
11 |
12 | const float PI = 3.1415926535;
13 |
14 | void main()
15 | {
16 | float aperture = 178.0;
17 | float apertureHalf = 0.5 * aperture * (PI / 180.0);
18 | float maxFactor = sin(apertureHalf);
19 |
20 | vec2 uv = vec2(0);
21 | vec2 xy = 2.0 * fragTexCoord.xy - 1.0;
22 | float d = length(xy);
23 |
24 | if (d < (2.0 - maxFactor))
25 | {
26 | d = length(xy * maxFactor);
27 | float z = sqrt(1.0 - d * d);
28 | float r = atan(d, z) / PI;
29 | float phi = atan(xy.y, xy.x);
30 |
31 | uv.x = r * cos(phi) + 0.5;
32 | uv.y = r * sin(phi) + 0.5;
33 | }
34 | else
35 | {
36 | uv = fragTexCoord.xy;
37 | }
38 |
39 | fragColor = texture(texture0, uv);
40 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/grayscale.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | void main()
17 | {
18 | // Texel color fetching from texture sampler
19 | vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor;
20 |
21 | // Convert texel color to grayscale using NTSC conversion weights
22 | float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114));
23 |
24 | // Calculate final fragment color
25 | finalColor = vec4(gray, gray, gray, texelColor.a);
26 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/overdraw.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | void main()
17 | {
18 | // To show overdraw, we just render all the fragments
19 | // with a solid color and some transparency
20 |
21 | // NOTE: This is not a postpro render,
22 | // it will only render all screen texture in a plain color
23 |
24 | finalColor = vec4(1.0, 0.0, 0.0, 0.2);
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/pixelizer.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | // NOTE: Render size values must be passed from code
17 | const float renderWidth = 800;
18 | const float renderHeight = 450;
19 |
20 | uniform float pixelWidth = 5.0;
21 | uniform float pixelHeight = 5.0;
22 |
23 | void main()
24 | {
25 | float dx = pixelWidth*(1.0/renderWidth);
26 | float dy = pixelHeight*(1.0/renderHeight);
27 |
28 | vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy));
29 |
30 | vec3 tc = texture(texture0, coord).rgb;
31 |
32 | finalColor = vec4(tc, 1.0);
33 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/posterization.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | float gamma = 0.6;
17 | float numColors = 8.0;
18 |
19 | void main()
20 | {
21 | // Texel color fetching from texture sampler
22 | vec3 texelColor = texture(texture0, fragTexCoord.xy).rgb;
23 |
24 | texelColor = pow(texelColor, vec3(gamma, gamma, gamma));
25 | texelColor = texelColor*numColors;
26 | texelColor = floor(texelColor);
27 | texelColor = texelColor/numColors;
28 | texelColor = pow(texelColor, vec3(1.0/gamma));
29 |
30 | finalColor = vec4(texelColor, 1.0);
31 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/predator.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | void main()
17 | {
18 | // Texel color fetching from texture sampler
19 | vec3 texelColor = texture(texture0, fragTexCoord).rgb;
20 | vec3 colors[3];
21 | colors[0] = vec3(0.0, 0.0, 1.0);
22 | colors[1] = vec3(1.0, 1.0, 0.0);
23 | colors[2] = vec3(1.0, 0.0, 0.0);
24 |
25 | float lum = (texelColor.r + texelColor.g + texelColor.b)/3.0;
26 |
27 | int ix = (lum < 0.5)? 0:1;
28 |
29 | vec3 tc = mix(colors[ix], colors[ix + 1], (lum - float(ix)*0.5)/0.5);
30 |
31 | finalColor = vec4(tc, 1.0);
32 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/scanlines.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | // NOTE: Render size values must be passed from code
17 | const float renderWidth = 800;
18 | const float renderHeight = 450;
19 | float offset = 0.0;
20 |
21 | uniform float time;
22 |
23 | void main()
24 | {
25 | float frequency = renderHeight/3.0;
26 | /*
27 | // Scanlines method 1
28 | float tval = 0; //time
29 | vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval));
30 |
31 | vec4 color = texture(texture0, fragTexCoord);
32 |
33 | color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0);
34 | color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y);
35 | color *= vec4(0.8, 1.0, 0.7, 1);
36 | color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0);
37 | color *= 0.97 + 0.03*sin(110.0*tval);
38 |
39 | fragColor = color;
40 | */
41 | // Scanlines method 2
42 | float globalPos = (fragTexCoord.y + offset) * frequency;
43 | float wavePos = cos((fract(globalPos) - 0.5)*3.14);
44 |
45 | // Texel color fetching from texture sampler
46 | vec4 texelColor = texture(texture0, fragTexCoord);
47 |
48 | finalColor = mix(vec4(0.0, 0.3, 0.0, 0.0), texelColor, wavePos);
49 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/sobel.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 | uniform vec2 resolution = vec2(800, 450);
16 |
17 | void main()
18 | {
19 | float x = 1.0/resolution.x;
20 | float y = 1.0/resolution.y;
21 |
22 | vec4 horizEdge = vec4(0.0);
23 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
24 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0;
25 | horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
26 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
27 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0;
28 | horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
29 |
30 | vec4 vertEdge = vec4(0.0);
31 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0;
32 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0;
33 | vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0;
34 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0;
35 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0;
36 | vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0;
37 |
38 | vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb));
39 |
40 | finalColor = vec4(edge, texture2D(texture0, fragTexCoord).a);
41 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/standard.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | in vec3 fragPosition;
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 | in vec3 fragNormal;
7 |
8 | out vec4 finalColor;
9 |
10 | uniform sampler2D texture0;
11 | uniform sampler2D texture1;
12 | uniform sampler2D texture2;
13 |
14 | uniform vec4 colAmbient;
15 | uniform vec4 colDiffuse;
16 | uniform vec4 colSpecular;
17 | uniform float glossiness;
18 |
19 | uniform int useNormal;
20 | uniform int useSpecular;
21 |
22 | uniform mat4 modelMatrix;
23 | uniform vec3 viewDir;
24 |
25 | struct Light {
26 | int enabled;
27 | int type;
28 | vec3 position;
29 | vec3 direction;
30 | vec4 diffuse;
31 | float intensity;
32 | float radius;
33 | float coneAngle;
34 | };
35 |
36 | const int maxLights = 8;
37 | uniform Light lights[maxLights];
38 |
39 | vec3 ComputeLightPoint(Light l, vec3 n, vec3 v, float s)
40 | {
41 | vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1));
42 | vec3 surfaceToLight = l.position - surfacePos;
43 |
44 | // Diffuse shading
45 | float brightness = clamp(float(dot(n, surfaceToLight)/(length(surfaceToLight)*length(n))), 0.0, 1.0);
46 | float diff = 1.0/dot(surfaceToLight/l.radius, surfaceToLight/l.radius)*brightness*l.intensity;
47 |
48 | // Specular shading
49 | float spec = 0.0;
50 | if (diff > 0.0)
51 | {
52 | vec3 h = normalize(-l.direction + v);
53 | spec = pow(abs(dot(n, h)), 3.0 + glossiness)*s;
54 | }
55 |
56 | return (diff*l.diffuse.rgb + spec*colSpecular.rgb);
57 | }
58 |
59 | vec3 ComputeLightDirectional(Light l, vec3 n, vec3 v, float s)
60 | {
61 | vec3 lightDir = normalize(-l.direction);
62 |
63 | // Diffuse shading
64 | float diff = clamp(float(dot(n, lightDir)), 0.0, 1.0)*l.intensity;
65 |
66 | // Specular shading
67 | float spec = 0.0;
68 | if (diff > 0.0)
69 | {
70 | vec3 h = normalize(lightDir + v);
71 | spec = pow(abs(dot(n, h)), 3.0 + glossiness)*s;
72 | }
73 |
74 | // Combine results
75 | return (diff*l.intensity*l.diffuse.rgb + spec*colSpecular.rgb);
76 | }
77 |
78 | vec3 ComputeLightSpot(Light l, vec3 n, vec3 v, float s)
79 | {
80 | vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1));
81 | vec3 lightToSurface = normalize(surfacePos - l.position);
82 | vec3 lightDir = normalize(-l.direction);
83 |
84 | // Diffuse shading
85 | float diff = clamp(float(dot(n, lightDir)), 0.0, 1.0)*l.intensity;
86 |
87 | // Spot attenuation
88 | float attenuation = clamp(float(dot(n, lightToSurface)), 0.0, 1.0);
89 | attenuation = dot(lightToSurface, -lightDir);
90 |
91 | float lightToSurfaceAngle = degrees(acos(attenuation));
92 | if (lightToSurfaceAngle > l.coneAngle) attenuation = 0.0;
93 |
94 | float falloff = (l.coneAngle - lightToSurfaceAngle)/l.coneAngle;
95 |
96 | // Combine diffuse and attenuation
97 | float diffAttenuation = diff*attenuation;
98 |
99 | // Specular shading
100 | float spec = 0.0;
101 | if (diffAttenuation > 0.0)
102 | {
103 | vec3 h = normalize(lightDir + v);
104 | spec = pow(abs(dot(n, h)), 3.0 + glossiness)*s;
105 | }
106 |
107 | return (falloff*(diffAttenuation*l.diffuse.rgb + spec*colSpecular.rgb));
108 | }
109 |
110 | void main()
111 | {
112 | // Calculate fragment normal in screen space
113 | // NOTE: important to multiply model matrix by fragment normal to apply model transformation (rotation and scale)
114 | mat3 normalMatrix = mat3(modelMatrix);
115 | vec3 normal = normalize(normalMatrix*fragNormal);
116 |
117 | // Normalize normal and view direction vectors
118 | vec3 n = normalize(normal);
119 | vec3 v = normalize(viewDir);
120 |
121 | // Calculate diffuse texture color fetching
122 | vec4 texelColor = texture(texture0, fragTexCoord);
123 | vec3 lighting = colAmbient.rgb;
124 |
125 | // Calculate normal texture color fetching or set to maximum normal value by default
126 | if (useNormal == 1)
127 | {
128 | n *= texture(texture1, fragTexCoord).rgb;
129 | n = normalize(n);
130 | }
131 |
132 | // Calculate specular texture color fetching or set to maximum specular value by default
133 | float spec = 1.0;
134 | if (useSpecular == 1) spec = texture(texture2, fragTexCoord).r;
135 |
136 | for (int i = 0; i < maxLights; i++)
137 | {
138 | // Check if light is enabled
139 | if (lights[i].enabled == 1)
140 | {
141 | // Calculate lighting based on light type
142 | if (lights[i].type == 0) lighting += ComputeLightPoint(lights[i], n, v, spec);
143 | else if (lights[i].type == 1) lighting += ComputeLightDirectional(lights[i], n, v, spec);
144 | else if (lights[i].type == 2) lighting += ComputeLightSpot(lights[i], n, v, spec);
145 | }
146 | }
147 |
148 | // Calculate final fragment color
149 | finalColor = vec4(texelColor.rgb*lighting*colDiffuse.rgb, texelColor.a*colDiffuse.a);
150 | }
151 |
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/standard.vs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | in vec3 vertexPosition;
4 | in vec3 vertexNormal;
5 | in vec2 vertexTexCoord;
6 | in vec4 vertexColor;
7 |
8 | out vec3 fragPosition;
9 | out vec2 fragTexCoord;
10 | out vec4 fragColor;
11 | out vec3 fragNormal;
12 |
13 | uniform mat4 mvp;
14 |
15 | void main()
16 | {
17 | fragPosition = vertexPosition;
18 | fragTexCoord = vertexTexCoord;
19 | fragColor = vertexColor;
20 | fragNormal = vertexNormal;
21 |
22 | gl_Position = mvp*vec4(vertexPosition, 1.0);
23 | }
--------------------------------------------------------------------------------
/bin/res/shaders/glsl330/swirl.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 |
16 | // NOTE: Render size values should be passed from code
17 | const float renderWidth = 800;
18 | const float renderHeight = 450;
19 |
20 | float radius = 250.0;
21 | float angle = 0.8;
22 |
23 | uniform vec2 center = vec2(200.0, 200.0);
24 |
25 | void main()
26 | {
27 | vec2 texSize = vec2(renderWidth, renderHeight);
28 | vec2 tc = fragTexCoord*texSize;
29 | tc -= center;
30 |
31 | float dist = length(tc);
32 |
33 | if (dist < radius)
34 | {
35 | float percent = (radius - dist)/radius;
36 | float theta = percent*percent*angle*8.0;
37 | float s = sin(theta);
38 | float c = cos(theta);
39 |
40 | tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c)));
41 | }
42 |
43 | tc += center;
44 | vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;;
45 |
46 | finalColor = vec4(color.rgb, 1.0);;
47 | }
--------------------------------------------------------------------------------
/bin/res/shaders/irradiance.fs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Irradiance cubemap fragment shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes (from vertex shader)
12 | in vec3 fragPos;
13 |
14 | // Input uniform values
15 | uniform samplerCube environmentMap;
16 |
17 | // Constant values
18 | const float PI = 3.14159265359f;
19 |
20 | // Output fragment color
21 | out vec4 finalColor;
22 |
23 | void main()
24 | {
25 | // The sample direction equals the hemisphere's orientation
26 | vec3 normal = normalize(fragPos);
27 |
28 | vec3 irradiance = vec3(0.0);
29 |
30 | vec3 up = vec3(0.0, 1.0, 0.0);
31 | vec3 right = cross(up, normal);
32 | up = cross(normal, right);
33 |
34 | float sampleDelta = 0.025f;
35 | float nrSamples = 0.0f;
36 |
37 | for (float phi = 0.0; phi < 2.0*PI; phi += sampleDelta)
38 | {
39 | for (float theta = 0.0; theta < 0.5*PI; theta += sampleDelta)
40 | {
41 | // Spherical to cartesian (in tangent space)
42 | vec3 tangentSample = vec3(sin(theta)*cos(phi), sin(theta)*sin(phi), cos(theta));
43 |
44 | // tangent space to world
45 | vec3 sampleVec = tangentSample.x*right + tangentSample.y*up + tangentSample.z*normal;
46 |
47 | // Fetch color from environment cubemap
48 | irradiance += texture(environmentMap, sampleVec).rgb*cos(theta)*sin(theta);
49 | nrSamples++;
50 | }
51 | }
52 |
53 | // Calculate irradiance average value from samples
54 | irradiance = PI*irradiance*(1.0/float(nrSamples));
55 |
56 | // Calculate final fragment color
57 | finalColor = vec4(irradiance, 1.0);
58 | }
59 |
--------------------------------------------------------------------------------
/bin/res/shaders/pbr.fs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Physically based rendering fragment shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | #define MAX_REFLECTION_LOD 4.0
12 | #define MAX_DEPTH_LAYER 20
13 | #define MIN_DEPTH_LAYER 10
14 |
15 | #define MAX_LIGHTS 4
16 | #define LIGHT_DIRECTIONAL 0
17 | #define LIGHT_POINT 1
18 |
19 | struct MaterialProperty {
20 | vec3 color;
21 | int useSampler;
22 | sampler2D sampler;
23 | };
24 |
25 | struct Light {
26 | int enabled;
27 | int type;
28 | vec3 position;
29 | vec3 target;
30 | vec4 color;
31 | };
32 |
33 | // Input vertex attributes (from vertex shader)
34 | in vec3 fragPosition;
35 | in vec2 fragTexCoord;
36 | in vec3 fragNormal;
37 | in vec3 fragTangent;
38 | in vec3 fragBinormal;
39 |
40 | // Input material values
41 | uniform MaterialProperty albedo;
42 | uniform MaterialProperty normals;
43 | uniform MaterialProperty metalness;
44 | uniform MaterialProperty roughness;
45 | uniform MaterialProperty occlusion;
46 | uniform MaterialProperty emission;
47 | uniform MaterialProperty height;
48 |
49 | // Input uniform values
50 | uniform samplerCube irradianceMap;
51 | uniform samplerCube prefilterMap;
52 | uniform sampler2D brdfLUT;
53 |
54 | // Input lighting values
55 | uniform Light lights[MAX_LIGHTS];
56 |
57 | // Other uniform values
58 | uniform int renderMode;
59 | uniform vec3 viewPos;
60 | vec2 texCoord;
61 |
62 | // Constant values
63 | const float PI = 3.14159265359;
64 |
65 | // Output fragment color
66 | out vec4 finalColor;
67 |
68 | vec3 ComputeMaterialProperty(MaterialProperty property);
69 | float DistributionGGX(vec3 N, vec3 H, float roughness);
70 | float GeometrySchlickGGX(float NdotV, float roughness);
71 | float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness);
72 | vec3 fresnelSchlick(float cosTheta, vec3 F0);
73 | vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness);
74 | vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir);
75 |
76 | vec3 ComputeMaterialProperty(MaterialProperty property)
77 | {
78 | vec3 result = vec3(0.0, 0.0, 0.0);
79 |
80 | if (property.useSampler == 1) result = texture(property.sampler, texCoord).rgb;
81 | else result = property.color;
82 |
83 | return result;
84 | }
85 |
86 | float DistributionGGX(vec3 N, vec3 H, float roughness)
87 | {
88 | float a = roughness*roughness;
89 | float a2 = a*a;
90 | float NdotH = max(dot(N, H), 0.0);
91 | float NdotH2 = NdotH*NdotH;
92 |
93 | float nom = a2;
94 | float denom = (NdotH2*(a2 - 1.0) + 1.0);
95 | denom = PI*denom*denom;
96 |
97 | return nom/denom;
98 | }
99 |
100 | float GeometrySchlickGGX(float NdotV, float roughness)
101 | {
102 | float r = (roughness + 1.0);
103 | float k = r*r/8.0;
104 |
105 | float nom = NdotV;
106 | float denom = NdotV*(1.0 - k) + k;
107 |
108 | return nom/denom;
109 | }
110 | float GeometrySmith(vec3 N, vec3 V, vec3 L, float roughness)
111 | {
112 | float NdotV = max(dot(N, V), 0.0);
113 | float NdotL = max(dot(N, L), 0.0);
114 | float ggx2 = GeometrySchlickGGX(NdotV, roughness);
115 | float ggx1 = GeometrySchlickGGX(NdotL, roughness);
116 |
117 | return ggx1*ggx2;
118 | }
119 |
120 | vec3 fresnelSchlick(float cosTheta, vec3 F0)
121 | {
122 | return F0 + (1.0 - F0)*pow(1.0 - cosTheta, 5.0);
123 | }
124 |
125 | vec3 fresnelSchlickRoughness(float cosTheta, vec3 F0, float roughness)
126 | {
127 | return F0 + (max(vec3(1.0 - roughness), F0) - F0)*pow(1.0 - cosTheta, 5.0);
128 | }
129 |
130 | vec2 ParallaxMapping(vec2 texCoords, vec3 viewDir)
131 | {
132 | // Calculate the number of depth layers and calculate the size of each layer
133 | float numLayers = mix(MAX_DEPTH_LAYER, MIN_DEPTH_LAYER, abs(dot(vec3(0.0, 0.0, 1.0), viewDir)));
134 | float layerDepth = 1.0/numLayers;
135 |
136 | // Calculate depth of current layer
137 | float currentLayerDepth = 0.0;
138 |
139 | // Calculate the amount to shift the texture coordinates per layer (from vector P)
140 | // Note: height amount is stored in height material attribute color R channel (sampler use is independent)
141 | vec2 P = viewDir.xy*height.color.r;
142 | vec2 deltaTexCoords = P/numLayers;
143 |
144 | // Store initial texture coordinates and depth values
145 | vec2 currentTexCoords = texCoords;
146 | float currentDepthMapValue = texture(height.sampler, currentTexCoords).r;
147 |
148 | while (currentLayerDepth < currentDepthMapValue)
149 | {
150 | // Shift texture coordinates along direction of P
151 | currentTexCoords -= deltaTexCoords;
152 |
153 | // Get depth map value at current texture coordinates
154 | currentDepthMapValue = texture(height.sampler, currentTexCoords).r;
155 |
156 | // Get depth of next layer
157 | currentLayerDepth += layerDepth;
158 | }
159 |
160 | // Get texture coordinates before collision (reverse operations)
161 | vec2 prevTexCoords = currentTexCoords + deltaTexCoords;
162 |
163 | // Get depth after and before collision for linear interpolation
164 | float afterDepth = currentDepthMapValue - currentLayerDepth;
165 | float beforeDepth = texture(height.sampler, prevTexCoords).r - currentLayerDepth + layerDepth;
166 |
167 | // Interpolation of texture coordinates
168 | float weight = afterDepth/(afterDepth - beforeDepth);
169 | vec2 finalTexCoords = prevTexCoords*weight + currentTexCoords*(1.0 - weight);
170 |
171 | return finalTexCoords;
172 | }
173 |
174 | void main()
175 | {
176 | // Calculate TBN and RM matrices
177 | mat3 TBN = transpose(mat3(fragTangent, fragBinormal, fragNormal));
178 |
179 | // Calculate lighting required attributes
180 | vec3 normal = normalize(fragNormal);
181 | vec3 view = normalize(viewPos - fragPosition);
182 | vec3 refl = reflect(-view, normal);
183 |
184 | // Check if parallax mapping is enabled and calculate texture coordinates to use based on height map
185 | // NOTE: remember that 'texCoord' variable must be assigned before calling any ComputeMaterialProperty() function
186 | if (height.useSampler == 1) texCoord = ParallaxMapping(fragTexCoord, view);
187 | else texCoord = fragTexCoord; // Use default texture coordinates
188 |
189 | // Fetch material values from texture sampler or color attributes
190 | vec3 color = ComputeMaterialProperty(albedo);
191 | vec3 metal = ComputeMaterialProperty(metalness);
192 | vec3 rough = ComputeMaterialProperty(roughness);
193 | vec3 emiss = ComputeMaterialProperty(emission);
194 | vec3 ao = ComputeMaterialProperty(occlusion);
195 |
196 | // Check if normal mapping is enabled
197 | if (normals.useSampler == 1)
198 | {
199 | // Fetch normal map color and transform lighting values to tangent space
200 | normal = ComputeMaterialProperty(normals);
201 | normal = normalize(normal*2.0 - 1.0);
202 | normal = normalize(normal*TBN);
203 |
204 | // Convert tangent space normal to world space due to cubemap reflection calculations
205 | refl = normalize(reflect(-view, normal));
206 | }
207 |
208 | // Calculate reflectance at normal incidence
209 | vec3 F0 = vec3(0.04);
210 | F0 = mix(F0, color, metal.r);
211 |
212 | // Calculate lighting for all lights
213 | vec3 Lo = vec3(0.0);
214 | vec3 lightDot = vec3(0.0);
215 |
216 | for (int i = 0; i < MAX_LIGHTS; i++)
217 | {
218 | if (lights[i].enabled == 1)
219 | {
220 | // Calculate per-light radiance
221 | vec3 light = vec3(0.0);
222 | vec3 radiance = lights[i].color.rgb;
223 | if (lights[i].type == LIGHT_DIRECTIONAL) light = -normalize(lights[i].target - lights[i].position);
224 | else if (lights[i].type == LIGHT_POINT)
225 | {
226 | light = normalize(lights[i].position - fragPosition);
227 | float distance = length(lights[i].position - fragPosition);
228 | float attenuation = 1.0/(distance*distance);
229 | radiance *= attenuation;
230 | }
231 |
232 | // Cook-torrance BRDF
233 | vec3 high = normalize(view + light);
234 | float NDF = DistributionGGX(normal, high, rough.r);
235 | float G = GeometrySmith(normal, view, light, rough.r);
236 | vec3 F = fresnelSchlick(max(dot(high, view), 0.0), F0);
237 | vec3 nominator = NDF*G*F;
238 | float denominator = 4*max(dot(normal, view), 0.0)*max(dot(normal, light), 0.0) + 0.001;
239 | vec3 brdf = nominator/denominator;
240 |
241 | // Store to kS the fresnel value and calculate energy conservation
242 | vec3 kS = F;
243 | vec3 kD = vec3(1.0) - kS;
244 |
245 | // Multiply kD by the inverse metalness such that only non-metals have diffuse lighting
246 | kD *= 1.0 - metal.r;
247 |
248 | // Scale light by dot product between normal and light direction
249 | float NdotL = max(dot(normal, light), 0.0);
250 |
251 | // Add to outgoing radiance Lo
252 | // Note: BRDF is already multiplied by the Fresnel so it doesn't need to be multiplied again
253 | Lo += (kD*color/PI + brdf)*radiance*NdotL*lights[i].color.a;
254 | lightDot += radiance*NdotL + brdf*lights[i].color.a;
255 | }
256 | }
257 |
258 | // Calculate ambient lighting using IBL
259 | vec3 F = fresnelSchlickRoughness(max(dot(normal, view), 0.0), F0, rough.r);
260 | vec3 kS = F;
261 | vec3 kD = 1.0 - kS;
262 | kD *= 1.0 - metal.r;
263 |
264 | // Calculate indirect diffuse
265 | vec3 irradiance = texture(irradianceMap, fragNormal).rgb;
266 | vec3 diffuse = color*irradiance;
267 |
268 | // Sample both the prefilter map and the BRDF lut and combine them together as per the Split-Sum approximation
269 | vec3 prefilterColor = textureLod(prefilterMap, refl, rough.r*MAX_REFLECTION_LOD).rgb;
270 | vec2 brdf = texture(brdfLUT, vec2(max(dot(normal, view), 0.0), rough.r)).rg;
271 | vec3 reflection = prefilterColor*(F*brdf.x + brdf.y);
272 |
273 | // Calculate final lighting
274 | vec3 ambient = (kD*diffuse + reflection)*ao;
275 |
276 | // Calculate fragment color based on render mode
277 | vec3 fragmentColor = ambient + Lo + emiss; // Physically Based Rendering
278 |
279 | if (renderMode == 1) fragmentColor = color; // Albedo
280 | else if (renderMode == 2) fragmentColor = normal; // Normals
281 | else if (renderMode == 3) fragmentColor = metal; // Metalness
282 | else if (renderMode == 4) fragmentColor = rough; // Roughness
283 | else if (renderMode == 5) fragmentColor = ao; // Ambient Occlusion
284 | else if (renderMode == 6) fragmentColor = emiss; // Emission
285 | else if (renderMode == 7) fragmentColor = lightDot; // Lighting
286 | else if (renderMode == 8) fragmentColor = kS; // Fresnel
287 | else if (renderMode == 9) fragmentColor = irradiance; // Irradiance
288 | else if (renderMode == 10) fragmentColor = reflection; // Reflection
289 |
290 | // Apply HDR tonemapping
291 | fragmentColor = fragmentColor/(fragmentColor + vec3(1.0));
292 |
293 | // Apply gamma correction
294 | fragmentColor = pow(fragmentColor, vec3(1.0/2.2));
295 |
296 | // Calculate final fragment color
297 | finalColor = vec4(fragmentColor, 1.0);
298 | }
299 |
--------------------------------------------------------------------------------
/bin/res/shaders/pbr.vs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Physically based rendering vertex shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes
12 | in vec3 vertexPosition;
13 | in vec2 vertexTexCoord;
14 | in vec3 vertexNormal;
15 | in vec4 vertexTangent;
16 |
17 | // Input uniform values
18 | uniform mat4 mvp;
19 | uniform mat4 mMatrix;
20 |
21 | // Output vertex attributes (to fragment shader)
22 | out vec3 fragPosition;
23 | out vec2 fragTexCoord;
24 | out vec3 fragNormal;
25 | out vec3 fragTangent;
26 | out vec3 fragBinormal;
27 |
28 | void main()
29 | {
30 | // Calculate binormal from vertex normal and tangent
31 | vec3 vertexBinormal = cross(vertexNormal, vec3(vertexTangent));
32 |
33 | // Calculate fragment normal based on normal transformations
34 | mat3 normalMatrix = transpose(inverse(mat3(mMatrix)));
35 |
36 | // Calculate fragment position based on model transformations
37 | fragPosition = vec3(mMatrix*vec4(vertexPosition, 1.0f));
38 |
39 | // Send vertex attributes to fragment shader
40 | fragTexCoord = vertexTexCoord;
41 | fragNormal = normalize(normalMatrix*vertexNormal);
42 | fragTangent = normalize(normalMatrix*vec3(vertexTangent));
43 | fragTangent = normalize(fragTangent - dot(fragTangent, fragNormal)*fragNormal);
44 | fragBinormal = normalize(normalMatrix*vertexBinormal);
45 | fragBinormal = cross(fragNormal, fragTangent);
46 |
47 | // Calculate final vertex position
48 | gl_Position = mvp*vec4(vertexPosition, 1.0);
49 | }
--------------------------------------------------------------------------------
/bin/res/shaders/prefilter.fs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Prefiltered environment for reflections fragment shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 | #define MAX_SAMPLES 1024u
11 | #define CUBEMAP_RESOLUTION 1024.0
12 |
13 | // Input vertex attributes (from vertex shader)
14 | in vec3 fragPos;
15 |
16 | // Input uniform values
17 | uniform samplerCube environmentMap;
18 | uniform float roughness;
19 |
20 | // Constant values
21 | const float PI = 3.14159265359f;
22 |
23 | // Output fragment color
24 | out vec4 finalColor;
25 |
26 | float DistributionGGX(vec3 N, vec3 H, float roughness);
27 | float RadicalInverse_VdC(uint bits);
28 | vec2 Hammersley(uint i, uint N);
29 | vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness);
30 |
31 | float DistributionGGX(vec3 N, vec3 H, float roughness)
32 | {
33 | float a = roughness*roughness;
34 | float a2 = a*a;
35 | float NdotH = max(dot(N, H), 0.0);
36 | float NdotH2 = NdotH*NdotH;
37 |
38 | float nom = a2;
39 | float denom = (NdotH2*(a2 - 1.0) + 1.0);
40 | denom = PI*denom*denom;
41 |
42 | return nom/denom;
43 | }
44 |
45 | float RadicalInverse_VdC(uint bits)
46 | {
47 | bits = (bits << 16u) | (bits >> 16u);
48 | bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u);
49 | bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u);
50 | bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u);
51 | bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u);
52 | return float(bits) * 2.3283064365386963e-10; // / 0x100000000
53 | }
54 |
55 | vec2 Hammersley(uint i, uint N)
56 | {
57 | return vec2(float(i)/float(N), RadicalInverse_VdC(i));
58 | }
59 |
60 | vec3 ImportanceSampleGGX(vec2 Xi, vec3 N, float roughness)
61 | {
62 | float a = roughness*roughness;
63 | float phi = 2.0 * PI * Xi.x;
64 | float cosTheta = sqrt((1.0 - Xi.y)/(1.0 + (a*a - 1.0)*Xi.y));
65 | float sinTheta = sqrt(1.0 - cosTheta*cosTheta);
66 |
67 | // Transform from spherical coordinates to cartesian coordinates (halfway vector)
68 | vec3 H = vec3(cos(phi)*sinTheta, sin(phi)*sinTheta, cosTheta);
69 |
70 | // Transform from tangent space H vector to world space sample vector
71 | vec3 up = ((abs(N.z) < 0.999) ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0));
72 | vec3 tangent = normalize(cross(up, N));
73 | vec3 bitangent = cross(N, tangent);
74 | vec3 sampleVec = tangent*H.x + bitangent*H.y + N*H.z;
75 |
76 | return normalize(sampleVec);
77 | }
78 |
79 | void main()
80 | {
81 | // Make the simplyfying assumption that V equals R equals the normal
82 | vec3 N = normalize(fragPos);
83 | vec3 R = N;
84 | vec3 V = R;
85 |
86 | vec3 prefilteredColor = vec3(0.0);
87 | float totalWeight = 0.0;
88 |
89 | for (uint i = 0u; i < MAX_SAMPLES; i++)
90 | {
91 | // Generate a sample vector that's biased towards the preferred alignment direction (importance sampling)
92 | vec2 Xi = Hammersley(i, MAX_SAMPLES);
93 | vec3 H = ImportanceSampleGGX(Xi, N, roughness);
94 | vec3 L = normalize(2.0*dot(V, H)*H - V);
95 |
96 | float NdotL = max(dot(N, L), 0.0);
97 | if(NdotL > 0.0)
98 | {
99 | // Sample from the environment's mip level based on roughness/pdf
100 | float D = DistributionGGX(N, H, roughness);
101 | float NdotH = max(dot(N, H), 0.0);
102 | float HdotV = max(dot(H, V), 0.0);
103 | float pdf = D*NdotH/(4.0*HdotV) + 0.0001;
104 |
105 | float resolution = CUBEMAP_RESOLUTION;
106 | float saTexel = 4.0*PI/(6.0*resolution*resolution);
107 | float saSample = 1.0/(float(MAX_SAMPLES)*pdf + 0.0001);
108 | float mipLevel = ((roughness == 0.0) ? 0.0 : 0.5*log2(saSample/saTexel));
109 |
110 | prefilteredColor += textureLod(environmentMap, L, mipLevel).rgb*NdotL;
111 | totalWeight += NdotL;
112 | }
113 | }
114 |
115 | // Calculate prefilter average color
116 | prefilteredColor = prefilteredColor/totalWeight;
117 |
118 | // Calculate final fragment color
119 | finalColor = vec4(prefilteredColor, 1.0);
120 | }
121 |
--------------------------------------------------------------------------------
/bin/res/shaders/sdf.fs:
--------------------------------------------------------------------------------
1 | #version 330
2 |
3 | // Input vertex attributes (from vertex shader)
4 | in vec2 fragTexCoord;
5 | in vec4 fragColor;
6 |
7 | // Input uniform values
8 | uniform sampler2D texture0;
9 | uniform vec4 colDiffuse;
10 |
11 | // Output fragment color
12 | out vec4 finalColor;
13 |
14 | // NOTE: Add here your custom variables
15 | const float smoothing = 1.0/16.0;
16 |
17 | void main()
18 | {
19 | // Texel color fetching from texture sampler
20 | // NOTE: Calculate alpha using signed distance field (SDF)
21 | float distance = texture(texture0, fragTexCoord).a;
22 | float alpha = smoothstep(0.5 - smoothing, 0.5 + smoothing, distance);
23 |
24 | // Calculate final fragment color
25 | finalColor = vec4(fragColor.rgb, fragColor.a*alpha);
26 | }
27 |
--------------------------------------------------------------------------------
/bin/res/shaders/skybox.fs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Background skybox fragment shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes (from vertex shader)
12 | in vec3 fragPos;
13 |
14 | // Input uniform values
15 | uniform samplerCube environmentMap;
16 |
17 | // Output fragment color
18 | out vec4 finalColor;
19 |
20 | void main()
21 | {
22 | // Fetch color from texture map
23 | vec3 color = texture(environmentMap, fragPos).rgb;
24 |
25 | // Apply gamma correction
26 | color = color/(color + vec3(1.0));
27 | color = pow(color, vec3(1.0/2.2));
28 |
29 | // Calculate final fragment color
30 | finalColor = vec4(color, 1.0);
31 | }
32 |
--------------------------------------------------------------------------------
/bin/res/shaders/skybox.vs:
--------------------------------------------------------------------------------
1 | /*******************************************************************************************
2 | *
3 | * rPBR [shader] - Background skybox vertex shader
4 | *
5 | * Copyright (c) 2017 Victor Fisac
6 | *
7 | **********************************************************************************************/
8 |
9 | #version 330
10 |
11 | // Input vertex attributes
12 | in vec3 vertexPosition;
13 |
14 | // Input uniform values
15 | uniform mat4 projection;
16 | uniform mat4 view;
17 |
18 | // Output vertex attributes (to fragment shader)
19 | out vec3 fragPos;
20 |
21 | void main()
22 | {
23 | // Calculate fragment position based on model transformations
24 | fragPos = vertexPosition;
25 |
26 | // Remove translation from the view matrix
27 | mat4 rotView = mat4(mat3(view));
28 | vec4 clipPos = projection*rotView*vec4(vertexPosition, 1.0);
29 |
30 | // Calculate final vertex position
31 | gl_Position = clipPos.xyww;
32 | }
33 |
--------------------------------------------------------------------------------
/bin/res/sound/coin.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/sound/coin.wav
--------------------------------------------------------------------------------
/bin/res/sound/sound.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/sound/sound.wav
--------------------------------------------------------------------------------
/bin/res/sound/spring.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/sound/spring.wav
--------------------------------------------------------------------------------
/bin/res/sound/tanatana.flac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/sound/tanatana.flac
--------------------------------------------------------------------------------
/bin/res/sound/tanatana.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/sound/tanatana.ogg
--------------------------------------------------------------------------------
/bin/res/sound/weird.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/sound/weird.wav
--------------------------------------------------------------------------------
/bin/res/textures/angle_gauge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/angle_gauge.png
--------------------------------------------------------------------------------
/bin/res/textures/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/background.png
--------------------------------------------------------------------------------
/bin/res/textures/billboard.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/billboard.png
--------------------------------------------------------------------------------
/bin/res/textures/cubicmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/cubicmap.png
--------------------------------------------------------------------------------
/bin/res/textures/cubicmap_atlas.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/cubicmap_atlas.png
--------------------------------------------------------------------------------
/bin/res/textures/dresden_square.hdr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/dresden_square.hdr
--------------------------------------------------------------------------------
/bin/res/textures/fudesumi_BC1.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/fudesumi_BC1.dds
--------------------------------------------------------------------------------
/bin/res/textures/fudesumi_BC3.dds:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/fudesumi_BC3.dds
--------------------------------------------------------------------------------
/bin/res/textures/fudesumi_ETC2.ktx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/fudesumi_ETC2.ktx
--------------------------------------------------------------------------------
/bin/res/textures/heightmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/heightmap.png
--------------------------------------------------------------------------------
/bin/res/textures/pinetree.hdr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/pinetree.hdr
--------------------------------------------------------------------------------
/bin/res/textures/raylib_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/raylib_logo.png
--------------------------------------------------------------------------------
/bin/res/textures/scarfy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/scarfy.png
--------------------------------------------------------------------------------
/bin/res/textures/smoke.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/smoke.png
--------------------------------------------------------------------------------
/bin/res/textures/wabbit_alpha.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/res/textures/wabbit_alpha.png
--------------------------------------------------------------------------------
/bin/shaders_custom_uniform.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/shaders_custom_uniform.exe
--------------------------------------------------------------------------------
/bin/shapes_lines_bezier.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/shapes_lines_bezier.exe
--------------------------------------------------------------------------------
/bin/testbed.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/testbed.exe
--------------------------------------------------------------------------------
/bin/textures_image_generation.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/textures_image_generation.exe
--------------------------------------------------------------------------------
/bin/textures_particles_blending.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/bin/textures_particles_blending.exe
--------------------------------------------------------------------------------
/examples/audio_music_stream.dpr:
--------------------------------------------------------------------------------
1 | program audio_music_stream;
2 |
3 | {$APPTYPE CONSOLE}
4 |
5 | {$R *.res}
6 |
7 | uses
8 | System.SysUtils,
9 | common,
10 | raylib in '..\libs\raylib.pas';
11 |
12 | var
13 | mus : TMusic;
14 | timePlayed : Single;
15 | pause : Boolean;
16 | begin
17 | InitWindow(screenWidth, screenHeight, 'raylib [audio] example - music playing (streaming)');
18 | InitAudioDevice();
19 | mus := LoadMusicStream('res/music/guitar_noodling.ogg');
20 | PlayMusicStream(mus);
21 | timePlayed := 0.0;
22 | pause := false;
23 | SetTargetFPS(60);
24 | while not WindowShouldClose() do
25 | begin
26 | UpdateMusicStream(mus);
27 | if IsKeyPressed(KEY_SPACE) then
28 | begin
29 | StopMusicStream(mus);
30 | PlayMusicStream(mus);
31 | end;
32 | if IsKeyPressed(KEY_P) then
33 | begin
34 | pause := not pause;
35 | if pause then PauseMusicStream(mus)
36 | else ResumeMusicStream(mus);
37 | end;
38 | timePlayed := GetMusicTimePlayed(mus)/GetMusicTimeLength(mus)*400;
39 | BeginDrawing();
40 | ClearBackground(RAYWHITE);
41 | DrawText('MUSIC SHOULD BE PLAYING!', 255, 150, 20, LIGHTGRAY);
42 | DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
43 | DrawRectangle(200, 200, Round(timePlayed), 12, MAROON);
44 | DrawRectangleLines(200, 200, 400, 12, GRAY);
45 | DrawText('PRESS SPACE TO RESTART MUSIC', 215, 250, 20, LIGHTGRAY);
46 | DrawText('PRESS P TO PAUSE/RESUME MUSIC', 208, 280, 20, LIGHTGRAY);
47 | EndDrawing();
48 | end;
49 | UnloadMusicStream(mus);
50 | CloseAudioDevice();
51 | CloseWindow();
52 | end.
53 |
--------------------------------------------------------------------------------
/examples/audio_music_stream.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/18 23:53:05.000.424,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\audio_music_stream.dproj=C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj
5 | 2018/04/18 23:53:30.000.156,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/07/22 18:12:33.000.770,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/audio_music_stream.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas QC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\audio_music_stream.dpr
--------------------------------------------------------------------------------
/examples/audio_music_stream.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/audio_music_stream.res
--------------------------------------------------------------------------------
/examples/audio_music_stream.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=542
3 | DesignerSecs=1
4 | InspectorSecs=13
5 | CompileSecs=1899
6 | OtherSecs=100
7 | StartTime=4/19/2018 1:43:20 AM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=59
11 |
--------------------------------------------------------------------------------
/examples/common.pas:
--------------------------------------------------------------------------------
1 | unit common;
2 |
3 | interface
4 |
5 | const
6 | screenWidth = 800;
7 | screenHeight = 450;
8 |
9 | implementation
10 |
11 | end.
12 |
--------------------------------------------------------------------------------
/examples/core_2d_camera.dpr:
--------------------------------------------------------------------------------
1 | program core_2d_camera;
2 |
3 | {$APPTYPE CONSOLE}
4 |
5 | {$R *.res}
6 |
7 | uses
8 | System.SysUtils,
9 | common,
10 | raylib in '..\libs\raylib.pas';
11 |
12 | const
13 | MAX_BUILDINGS = 100;
14 |
15 | var
16 | player: TRectangle;
17 | buildings: array[0..MAX_BUILDINGS - 1] of TRectangle;
18 | buildColors: array[0..MAX_BUILDINGS - 1] of TColor;
19 | spacing: Single = 0;
20 | v: TVector2;
21 | camera: TCamera2D;
22 | i: Integer;
23 | begin
24 | InitWindow(screenWidth, screenHeight, 'raylib [core] example - 2d camera');
25 |
26 | player.&Set(400, 280, 40, 40);
27 |
28 | for i := 0 to MAX_BUILDINGS-1 do
29 | begin
30 | buildings[i].width := GetRandomValue(50, 200);
31 | buildings[i].height := GetRandomValue(100, 800);
32 | buildings[i].y := screenHeight - 130 - buildings[i].height;
33 | buildings[i].x := -6000 + spacing;
34 | spacing := spacing + buildings[i].width;
35 | buildColors[i].&Set(GetRandomValue(200, 240), GetRandomValue(200, 240), GetRandomValue(200, 250), 255);
36 | end;
37 |
38 | camera.target.&Set(player.x + 20, player.y + 20);
39 | camera.offset.&Set(0, 0);
40 | camera.rotation := 0.0;
41 | camera.zoom := 1.0;
42 |
43 | SetTargetFPS(60);
44 |
45 | while not WindowShouldClose do
46 | begin
47 | if IsKeyDown(KEY_RIGHT) then
48 | begin
49 | player.x := player.x + 2;
50 | camera.offset.x := camera.offset.x - 2;
51 | end
52 | else if IsKeyDown(KEY_LEFT) then
53 | begin
54 | player.x := player.x - 2;
55 | camera.offset.x := camera.offset.x + 2;
56 | end;
57 |
58 | camera.target.&Set(player.x + 20, player.y + 20);
59 |
60 | if IsKeyDown(KEY_A) then
61 | camera.rotation := camera.rotation - 1
62 | else if IsKeyDown(KEY_S) then
63 | camera.rotation := camera.rotation + 1;
64 |
65 | if camera.rotation > 40 then
66 | camera.rotation := 40
67 | else if camera.rotation < -40 then
68 | camera.rotation := -40;
69 |
70 | camera.zoom := camera.zoom + Single(GetMouseWheelMove) * 0.05;
71 |
72 | if camera.zoom > 3.0 then camera.zoom := 3.0
73 | else if camera.zoom < 0.1 then camera.zoom := 0.1;
74 |
75 | if IsKeyPressed(KEY_R) then
76 | begin
77 | camera.zoom := 1.0;
78 | camera.rotation := 0.0;
79 | end;
80 |
81 | BeginDrawing();
82 | ClearBackground(RAYWHITE);
83 | BeginMode2D(camera);
84 | DrawRectangle(-6000, 320, 13000, 8000, DARKGRAY);
85 | for i := 0 to MAX_BUILDINGS-1 do DrawRectangleRec(buildings[i], buildColors[i]);
86 | DrawRectangleRec(player, RED);
87 | DrawRectangle(Round(camera.target.x), -500, 1, screenHeight*4, GREEN);
88 | DrawRectangle(-500, Round(camera.target.y), screenWidth*4, 1, GREEN);
89 | EndMode2D;
90 |
91 | DrawText('SCREEN AREA', 640, 10, 20, RED);
92 |
93 | DrawRectangle(0, 0, screenWidth, 5, RED);
94 | DrawRectangle(0, 5, 5, screenHeight - 10, RED);
95 | DrawRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED);
96 | DrawRectangle(0, screenHeight - 5, screenWidth, 5, RED);
97 |
98 | DrawRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5));
99 | DrawRectangleLines( 10, 10, 250, 113, BLUE);
100 |
101 | DrawText('Free 2d camera controls:', 20, 20, 10, BLACK);
102 | DrawText('- Right/Left to move Offset', 40, 40, 10, DARKGRAY);
103 | DrawText('- Mouse Wheel to Zoom in-out', 40, 60, 10, DARKGRAY);
104 | DrawText('- A / S to Rotate', 40, 80, 10, DARKGRAY);
105 | DrawText('- R to reset Zoom and Rotation', 40, 100, 10, DARKGRAY);
106 | EndDrawing;
107 | end;
108 |
109 |
110 | CloseWindow;
111 |
112 | end.
113 |
--------------------------------------------------------------------------------
/examples/core_2d_camera.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/18 22:19:09.000.699,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\core_2d_camera.dproj=C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj
5 | 2018/04/18 22:19:30.000.168,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/07/22 18:22:54.000.254,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/core_2d_camera.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas MC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\core_2d_camera.dpr
--------------------------------------------------------------------------------
/examples/core_2d_camera.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/core_2d_camera.res
--------------------------------------------------------------------------------
/examples/core_2d_camera.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=1210
3 | DesignerSecs=1
4 | InspectorSecs=8
5 | CompileSecs=6664
6 | OtherSecs=134
7 | StartTime=4/18/2018 10:36:29 PM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=225
11 |
--------------------------------------------------------------------------------
/examples/models_billboard.dpr:
--------------------------------------------------------------------------------
1 | program models_billboard;
2 |
3 | {$APPTYPE CONSOLE}
4 | {$R *.res}
5 |
6 | uses
7 | System.SysUtils,
8 | common,
9 | raylib in '..\libs\raylib.pas';
10 |
11 | var
12 | screenWidth, screenHeight: integer;
13 | cam: TCamera;
14 | bill: TTexture2D;
15 | billPosition: TVector3;
16 |
17 | begin
18 | screenWidth := 800;
19 | screenHeight := 450;
20 | InitWindow(screenWidth, screenHeight,
21 | 'raylib [models] example - drawing billboards');
22 |
23 | cam.position := TVector3.Create(5.0, 4.0, 5.0);
24 | cam.target := TVector3.Create(0.0, 2.0, 0.0);
25 | cam.up := TVector3.Create(0.0, 1.0, 0.0);
26 | cam.fovy := 45.0;
27 | cam.&type := CAMERA_PERSPECTIVE;
28 |
29 | bill := LoadTexture('res/textures/billboard.png');
30 | billPosition := TVector3.Create(0.0, 2.0, 0.0);
31 |
32 | SetCameraMode(cam, CAMERA_ORBITAL);
33 | SetTargetFPS(60);
34 |
35 | while not WindowShouldClose() do
36 | begin
37 | UpdateCamera(cam);
38 | BeginDrawing();
39 | ClearBackground(RAYWHITE);
40 | BeginMode3d(cam);
41 | DrawBillboard(cam, bill, billPosition, 2.0, WHITE);
42 | DrawGrid(10, 1.0);
43 | EndMode3D;
44 | DrawFPS(10, 10);
45 | EndDrawing();
46 | end;
47 | UnloadTexture(bill);
48 | CloseWindow();
49 |
50 | end.
51 |
--------------------------------------------------------------------------------
/examples/models_billboard.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/19 00:03:56.000.365,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj=C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj
5 | 2018/04/19 00:04:37.000.493,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/04/19 00:05:13.000.572,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj
7 | 2018/04/19 01:36:55.000.161,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\models_billboard.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj
8 | 2018/07/22 18:33:36.000.645,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/models_billboard.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas OC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\models_billboard.dpr
--------------------------------------------------------------------------------
/examples/models_billboard.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/models_billboard.res
--------------------------------------------------------------------------------
/examples/models_billboard.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=122
3 | DesignerSecs=1
4 | InspectorSecs=3
5 | CompileSecs=1178
6 | OtherSecs=73
7 | StartTime=4/19/2018 1:43:30 AM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=25
11 |
--------------------------------------------------------------------------------
/examples/raylib-pas examples_prjgroup.tvsconfig:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/raylib-pascal Examples.dsk:
--------------------------------------------------------------------------------
1 | [Closed Files]
2 | File_0=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\testbed\utestbed.pas',0,1,1,1,26,0,0,,
3 | File_1=TSourceModule,'c:\program files (x86)\embarcadero\studio\19.0\SOURCE\RTL\SYS\System.SysUtils.pas',0,1,20481,1,20481,0,0,,
4 | File_2=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\libs\dRezEngine.pas',0,1,1204,31,1383,0,0,{{136,0}
5 | File_3=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\sources\engine\uEngine.Utils.pas',0,1,109,1,150,0,0,,
6 | File_4=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\sources\engine\uEngine.Misc.pas',0,1,1,80,156,0,0,,
7 | File_5=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\sources\engine\uEngine.dRez.pas',0,1,80,3,150,0,0,,
8 | File_6=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\sources\arc\udRezArc.pas',0,1,1,14,11,0,0,,
9 | File_7=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\testbed\uDbgTest.pas',0,1,1,49,78,0,0,,
10 | File_8=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\testbed\udeTestbed.pas',0,1,1,15,40,0,0,,
11 | File_9=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\testbed\uCompilerTest.pas',0,1,1,52,46,0,0,,
12 | File_10=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\testbed\uIMGUITest.pas',0,1,22,21,40,0,0,,
13 | File_11=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\testbed\uBezierTest.pas',0,1,1,22,12,0,0,,
14 | File_12=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Delphi\directmysql\uMysqlNet.pas',0,1,918,1,951,0,0,,
15 | File_13=TSourceModule,'C:\Users\drezgames\DropBox\Dev\Game\dRezEngine\sources\engine\uEngine.Debugger.pas',0,1,22,1,1,0,0,,
16 | File_14=TSourceModule,'c:\program files (x86)\embarcadero\studio\19.0\SOURCE\RTL\SYS\System.pas',0,1,6204,43,6234,0,0,,
17 |
18 | [Modules]
19 | Module0=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_particles_blending.dproj
20 | Module1=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_image_generation.dproj
21 | Module2=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shapes_lines_bezier.dproj
22 | Module3=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shaders_custom_uniform.dproj
23 | Module4=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\models_billboard.dproj
24 | Module5=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\core_2d_camera.dproj
25 | Module6=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\audio_music_stream.dproj
26 | Module7=C:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas
27 | Count=8
28 | EditWindowCount=1
29 |
30 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_particles_blending.dproj]
31 | ModuleType=TBaseProject
32 |
33 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_image_generation.dproj]
34 | ModuleType=TBaseProject
35 |
36 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shapes_lines_bezier.dproj]
37 | ModuleType=TBaseProject
38 |
39 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shaders_custom_uniform.dproj]
40 | ModuleType=TBaseProject
41 |
42 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\models_billboard.dproj]
43 | ModuleType=TBaseProject
44 |
45 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\core_2d_camera.dproj]
46 | ModuleType=TBaseProject
47 |
48 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\audio_music_stream.dproj]
49 | ModuleType=TBaseProject
50 |
51 | [C:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas]
52 | ModuleType=TSourceModule
53 |
54 | [EditWindow0]
55 | ViewCount=8
56 | CurrentEditView=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_particles_blending.dpr
57 | View0=0
58 | View1=1
59 | View2=2
60 | View3=3
61 | View4=4
62 | View5=5
63 | View6=6
64 | View7=7
65 | PercentageSizes=1
66 | Create=1
67 | Visible=1
68 | Docked=1
69 | State=0
70 | Left=0
71 | Top=0
72 | Width=10000
73 | Height=9202
74 | MaxLeft=-1
75 | MaxTop=-1
76 | ClientWidth=10000
77 | ClientHeight=9202
78 | DockedToMainForm=1
79 | BorlandEditorCodeExplorer=BorlandEditorCodeExplorer@EditWindow0
80 | TopPanelSize=0
81 | LeftPanelSize=1896
82 | LeftPanelClients=PropertyInspector,DockSite3
83 | LeftPanelData=00000800010100000000031000000000000001680700000000000001000000005C0E000009000000446F636B53697465330100000000771C00001100000050726F7065727479496E73706563746F72FFFFFFFF
84 | RightPanelSize=2000
85 | RightPanelClients=DockSite2,DockSite4
86 | RightPanelData=00000800010100000000031000000000000001D00700000000000001000000004412000009000000446F636B53697465320100000000771C000009000000446F636B5369746534FFFFFFFF
87 | BottomPanelSize=1519
88 | BottomPanelClients=DockSite1,MessageView
89 | BottomPanelData=0000080001020100000009000000446F636B5369746531724500000000000002EF050000000000000100000000724500000F0000004D65737361676556696577466F726DFFFFFFFF
90 | BottomMiddlePanelSize=0
91 | BottomMiddlePanelClients=DockSite0,GraphDrawingModel
92 | BottomMiddelPanelData=0000080001020200000009000000446F636B536974653010000000477261706844726177696E67566965779F1D00000000000002F206000000000000FFFFFFFF
93 |
94 | [View0]
95 | CustomEditViewType=TEditView
96 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas
97 | CursorX=1
98 | CursorY=1
99 | TopLine=1
100 | LeftCol=1
101 | Elisions=
102 | Bookmarks=
103 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas
104 |
105 | [View1]
106 | CustomEditViewType=TEditView
107 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\audio_music_stream.dpr
108 | CursorX=38
109 | CursorY=15
110 | TopLine=1
111 | LeftCol=1
112 | Elisions=
113 | Bookmarks=
114 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\audio_music_stream.dpr
115 |
116 | [View2]
117 | CustomEditViewType=TEditView
118 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\core_2d_camera.dpr
119 | CursorX=1
120 | CursorY=1
121 | TopLine=13
122 | LeftCol=1
123 | Elisions=
124 | Bookmarks=
125 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\core_2d_camera.dpr
126 |
127 | [View3]
128 | CustomEditViewType=TEditView
129 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\models_billboard.dpr
130 | CursorX=37
131 | CursorY=32
132 | TopLine=13
133 | LeftCol=1
134 | Elisions=
135 | Bookmarks=
136 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\models_billboard.dpr
137 |
138 | [View4]
139 | CustomEditViewType=TEditView
140 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shaders_custom_uniform.dpr
141 | CursorX=33
142 | CursorY=59
143 | TopLine=46
144 | LeftCol=1
145 | Elisions=
146 | Bookmarks=
147 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shaders_custom_uniform.dpr
148 |
149 | [View5]
150 | CustomEditViewType=TEditView
151 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shapes_lines_bezier.dpr
152 | CursorX=1
153 | CursorY=1
154 | TopLine=1
155 | LeftCol=1
156 | Elisions=
157 | Bookmarks=
158 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shapes_lines_bezier.dpr
159 |
160 | [View6]
161 | CustomEditViewType=TEditView
162 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_image_generation.dpr
163 | CursorX=1
164 | CursorY=13
165 | TopLine=16
166 | LeftCol=1
167 | Elisions=
168 | Bookmarks=
169 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_image_generation.dpr
170 |
171 | [View7]
172 | CustomEditViewType=TEditView
173 | Module=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_particles_blending.dpr
174 | CursorX=38
175 | CursorY=46
176 | TopLine=1
177 | LeftCol=1
178 | Elisions=
179 | Bookmarks=
180 | EditViewName=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_particles_blending.dpr
181 |
182 | [UndockedDesigner]
183 | Count=0
184 |
185 | [Watches]
186 | Count=0
187 |
188 | [WatchWindow]
189 | WatchColumnWidth=120
190 | WatchShowColumnHeaders=1
191 | PercentageSizes=1
192 | Create=1
193 | Visible=1
194 | Docked=1
195 | State=0
196 | Left=0
197 | Top=0
198 | Width=3823
199 | Height=1163
200 | MaxLeft=-1
201 | MaxTop=-1
202 | ClientWidth=3823
203 | ClientHeight=1163
204 | TBDockHeight=212
205 | LRDockWidth=13604
206 | Dockable=1
207 | StayOnTop=0
208 |
209 | [Breakpoints]
210 | Count=1
211 | Breakpoint0='C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\testbed\utestbed.pas',21,'',0,1,'',1,0,0,'',1,'','','',0,''
212 |
213 | [EmbarcaderoWin32Debugger_AddressBreakpoints]
214 | Count=0
215 |
216 | [Main Window]
217 | PercentageSizes=1
218 | Create=1
219 | Visible=1
220 | Docked=0
221 | State=2
222 | Left=146
223 | Top=269
224 | Width=8932
225 | Height=8519
226 | MaxLeft=-5
227 | MaxTop=-10
228 | MaxWidth=8932
229 | MaxHeight=8519
230 | ClientWidth=10000
231 | ClientHeight=9779
232 | BottomPanelSize=8861
233 | BottomPanelClients=EditWindow0
234 | BottomPanelData=0000080000000000000000000000000000000000000000000000000100000000000000000C0000004564697457696E646F775F30FFFFFFFF
235 |
236 | [ProjectManager]
237 | PercentageSizes=1
238 | Create=1
239 | Visible=1
240 | Docked=1
241 | State=0
242 | Left=0
243 | Top=0
244 | Width=2000
245 | Height=4404
246 | MaxLeft=-1
247 | MaxTop=-1
248 | ClientWidth=2000
249 | ClientHeight=4404
250 | TBDockHeight=5904
251 | LRDockWidth=2349
252 | Dockable=1
253 | StayOnTop=0
254 |
255 | [MessageView]
256 | PercentageSizes=1
257 | Create=1
258 | Visible=1
259 | Docked=1
260 | State=0
261 | Left=0
262 | Top=18
263 | Width=10000
264 | Height=1404
265 | MaxLeft=-1
266 | MaxTop=-1
267 | ClientWidth=10000
268 | ClientHeight=1404
269 | TBDockHeight=1404
270 | LRDockWidth=2771
271 | Dockable=1
272 | StayOnTop=0
273 |
274 | [ToolForm]
275 | PercentageSizes=1
276 | Create=1
277 | Visible=1
278 | Docked=1
279 | State=0
280 | Left=0
281 | Top=0
282 | Width=2000
283 | Height=2538
284 | MaxLeft=-1
285 | MaxTop=-1
286 | ClientWidth=2000
287 | ClientHeight=2538
288 | TBDockHeight=7154
289 | LRDockWidth=2000
290 | Dockable=1
291 | StayOnTop=0
292 |
293 | [ClipboardHistory]
294 | PercentageSizes=1
295 | Create=1
296 | Visible=0
297 | Docked=0
298 | State=0
299 | Left=0
300 | Top=0
301 | Width=1969
302 | Height=4288
303 | MaxLeft=-5
304 | MaxTop=-10
305 | ClientWidth=1885
306 | ClientHeight=3913
307 | TBDockHeight=4288
308 | LRDockWidth=1969
309 | Dockable=1
310 | StayOnTop=0
311 |
312 | [ProjectStatistics]
313 | PercentageSizes=1
314 | Create=1
315 | Visible=0
316 | Docked=0
317 | State=0
318 | Left=0
319 | Top=0
320 | Width=1375
321 | Height=4933
322 | MaxLeft=-5
323 | MaxTop=-10
324 | ClientWidth=1292
325 | ClientHeight=4558
326 | TBDockHeight=4933
327 | LRDockWidth=1375
328 | Dockable=1
329 | StayOnTop=0
330 |
331 | [PropertyInspector]
332 | PercentageSizes=1
333 | Create=1
334 | Visible=1
335 | Docked=1
336 | State=0
337 | Left=0
338 | Top=415
339 | Width=1896
340 | Height=3577
341 | MaxLeft=-1
342 | MaxTop=-1
343 | ClientWidth=1896
344 | ClientHeight=3577
345 | TBDockHeight=9010
346 | LRDockWidth=1896
347 | Dockable=1
348 | StayOnTop=0
349 | SplitPos=111
350 |
351 | [frmDesignPreview]
352 | PercentageSizes=1
353 | Create=1
354 | Visible=1
355 | Docked=1
356 | State=0
357 | Left=0
358 | Top=0
359 | Width=2000
360 | Height=6740
361 | MaxLeft=-1
362 | MaxTop=-1
363 | ClientWidth=2000
364 | ClientHeight=6740
365 | TBDockHeight=5962
366 | LRDockWidth=2510
367 | Dockable=1
368 | StayOnTop=0
369 |
370 | [TFileExplorerForm]
371 | PercentageSizes=1
372 | Create=1
373 | Visible=0
374 | Docked=1
375 | State=0
376 | Left=-1419
377 | Top=-14
378 | Width=2844
379 | Height=6202
380 | MaxLeft=-1
381 | MaxTop=-1
382 | ClientWidth=2844
383 | ClientHeight=6202
384 | TBDockHeight=6202
385 | LRDockWidth=2844
386 | Dockable=1
387 | StayOnTop=0
388 |
389 | [TemplateView]
390 | PercentageSizes=1
391 | Create=1
392 | Visible=0
393 | Docked=1
394 | State=0
395 | Left=-1536
396 | Top=268
397 | Width=276
398 | Height=365
399 | MaxLeft=-1
400 | MaxTop=-1
401 | ClientWidth=276
402 | ClientHeight=365
403 | TBDockHeight=365
404 | LRDockWidth=276
405 | Dockable=1
406 | StayOnTop=0
407 | Name=120
408 | Description=334
409 | filter=1
410 |
411 | [DebugLogView]
412 | PercentageSizes=1
413 | Create=1
414 | Visible=1
415 | Docked=1
416 | State=0
417 | Left=0
418 | Top=0
419 | Width=3823
420 | Height=1163
421 | MaxLeft=-1
422 | MaxTop=-1
423 | ClientWidth=3823
424 | ClientHeight=1163
425 | TBDockHeight=413
426 | LRDockWidth=4953
427 | Dockable=1
428 | StayOnTop=0
429 |
430 | [ThreadStatusWindow]
431 | PercentageSizes=1
432 | Create=1
433 | Visible=1
434 | Docked=1
435 | State=0
436 | Left=0
437 | Top=0
438 | Width=3823
439 | Height=1163
440 | MaxLeft=-1
441 | MaxTop=-1
442 | ClientWidth=3823
443 | ClientHeight=1163
444 | TBDockHeight=212
445 | LRDockWidth=7406
446 | Dockable=1
447 | StayOnTop=0
448 | Column0Width=145
449 | Column1Width=100
450 | Column2Width=115
451 | Column3Width=250
452 |
453 | [LocalVarsWindow]
454 | PercentageSizes=1
455 | Create=1
456 | Visible=1
457 | Docked=1
458 | State=0
459 | Left=0
460 | Top=0
461 | Width=3823
462 | Height=1163
463 | MaxLeft=-1
464 | MaxTop=-1
465 | ClientWidth=3823
466 | ClientHeight=1163
467 | TBDockHeight=1538
468 | LRDockWidth=3484
469 | Dockable=1
470 | StayOnTop=0
471 |
472 | [CallStackWindow]
473 | PercentageSizes=1
474 | Create=1
475 | Visible=1
476 | Docked=1
477 | State=0
478 | Left=0
479 | Top=0
480 | Width=3823
481 | Height=1163
482 | MaxLeft=-1
483 | MaxTop=-1
484 | ClientWidth=3823
485 | ClientHeight=1163
486 | TBDockHeight=2067
487 | LRDockWidth=3484
488 | Dockable=1
489 | StayOnTop=0
490 |
491 | [PatchForm]
492 | PercentageSizes=1
493 | Create=1
494 | Visible=1
495 | Docked=1
496 | State=0
497 | Left=0
498 | Top=0
499 | Width=2339
500 | Height=1240
501 | MaxLeft=-1
502 | MaxTop=-1
503 | ClientWidth=2339
504 | ClientHeight=1240
505 | TBDockHeight=2500
506 | LRDockWidth=3401
507 | Dockable=1
508 | StayOnTop=0
509 |
510 | [FindReferencsForm]
511 | PercentageSizes=1
512 | Create=1
513 | Visible=1
514 | Docked=1
515 | State=0
516 | Left=0
517 | Top=0
518 | Width=2339
519 | Height=1000
520 | MaxLeft=-1
521 | MaxTop=-1
522 | ClientWidth=2339
523 | ClientHeight=1000
524 | TBDockHeight=2317
525 | LRDockWidth=2823
526 | Dockable=1
527 | StayOnTop=0
528 |
529 | [RefactoringForm]
530 | PercentageSizes=1
531 | Create=1
532 | Visible=1
533 | Docked=1
534 | State=0
535 | Left=0
536 | Top=0
537 | Width=2339
538 | Height=1240
539 | MaxLeft=-1
540 | MaxTop=-1
541 | ClientWidth=2339
542 | ClientHeight=1240
543 | TBDockHeight=3212
544 | LRDockWidth=2823
545 | Dockable=1
546 | StayOnTop=0
547 |
548 | [ToDo List]
549 | PercentageSizes=1
550 | Create=1
551 | Visible=1
552 | Docked=1
553 | State=0
554 | Left=0
555 | Top=0
556 | Width=2339
557 | Height=1240
558 | MaxLeft=-1
559 | MaxTop=-1
560 | ClientWidth=2339
561 | ClientHeight=1240
562 | TBDockHeight=1154
563 | LRDockWidth=3677
564 | Dockable=1
565 | StayOnTop=0
566 | Column0Width=314
567 | Column1Width=30
568 | Column2Width=150
569 | Column3Width=172
570 | Column4Width=129
571 | SortOrder=4
572 | ShowHints=1
573 | ShowChecked=1
574 |
575 | [DataExplorerContainer]
576 | PercentageSizes=1
577 | Create=1
578 | Visible=1
579 | Docked=1
580 | State=0
581 | Left=0
582 | Top=0
583 | Width=2000
584 | Height=6740
585 | MaxLeft=-1
586 | MaxTop=-1
587 | ClientWidth=2000
588 | ClientHeight=6740
589 | TBDockHeight=4885
590 | LRDockWidth=7151
591 | Dockable=1
592 | StayOnTop=0
593 |
594 | [GraphDrawingModel]
595 | PercentageSizes=1
596 | Create=1
597 | Visible=0
598 | Docked=1
599 | State=0
600 | Left=370
601 | Top=827
602 | Width=2854
603 | Height=3212
604 | MaxLeft=-1
605 | MaxTop=-1
606 | ClientWidth=2854
607 | ClientHeight=3212
608 | TBDockHeight=3212
609 | LRDockWidth=2854
610 | Dockable=1
611 | StayOnTop=0
612 |
613 | [ClassBrowserTool]
614 | PercentageSizes=1
615 | Create=1
616 | Visible=0
617 | Docked=1
618 | State=0
619 | Left=0
620 | Top=-101
621 | Width=1849
622 | Height=3144
623 | MaxLeft=-1
624 | MaxTop=-1
625 | ClientWidth=1849
626 | ClientHeight=3144
627 | TBDockHeight=3144
628 | LRDockWidth=1849
629 | Dockable=1
630 | StayOnTop=0
631 |
632 | [MetricsView]
633 | PercentageSizes=1
634 | Create=1
635 | Visible=1
636 | Docked=1
637 | State=0
638 | Left=0
639 | Top=0
640 | Width=2339
641 | Height=1240
642 | MaxLeft=-1
643 | MaxTop=-1
644 | ClientWidth=2339
645 | ClientHeight=1240
646 | TBDockHeight=4837
647 | LRDockWidth=3562
648 | Dockable=1
649 | StayOnTop=0
650 |
651 | [QAView]
652 | PercentageSizes=1
653 | Create=1
654 | Visible=1
655 | Docked=1
656 | State=0
657 | Left=0
658 | Top=0
659 | Width=2339
660 | Height=1240
661 | MaxLeft=-1
662 | MaxTop=-1
663 | ClientWidth=2339
664 | ClientHeight=1240
665 | TBDockHeight=4837
666 | LRDockWidth=3562
667 | Dockable=1
668 | StayOnTop=0
669 |
670 | [BreakpointWindow]
671 | PercentageSizes=1
672 | Create=1
673 | Visible=1
674 | Docked=1
675 | State=0
676 | Left=0
677 | Top=0
678 | Width=3823
679 | Height=1163
680 | MaxLeft=-1
681 | MaxTop=-1
682 | ClientWidth=3823
683 | ClientHeight=1163
684 | TBDockHeight=1548
685 | LRDockWidth=8740
686 | Dockable=1
687 | StayOnTop=0
688 | Column0Width=200
689 | Column1Width=75
690 | Column2Width=200
691 | Column3Width=200
692 | Column4Width=200
693 | Column5Width=75
694 | Column6Width=75
695 |
696 | [StructureView]
697 | PercentageSizes=1
698 | Create=1
699 | Visible=1
700 | Docked=1
701 | State=0
702 | Left=0
703 | Top=0
704 | Width=1896
705 | Height=3606
706 | MaxLeft=-1
707 | MaxTop=-1
708 | ClientWidth=1896
709 | ClientHeight=3606
710 | TBDockHeight=3683
711 | LRDockWidth=1896
712 | Dockable=1
713 | StayOnTop=0
714 |
715 | [ModelViewTool]
716 | PercentageSizes=1
717 | Create=1
718 | Visible=1
719 | Docked=1
720 | State=0
721 | Left=0
722 | Top=0
723 | Width=2000
724 | Height=6740
725 | MaxLeft=-1
726 | MaxTop=-1
727 | ClientWidth=2000
728 | ClientHeight=6740
729 | TBDockHeight=4885
730 | LRDockWidth=5307
731 | Dockable=1
732 | StayOnTop=0
733 |
734 | [BorlandEditorCodeExplorer@EditWindow0]
735 | PercentageSizes=1
736 | Create=1
737 | Visible=0
738 | Docked=0
739 | State=0
740 | Left=0
741 | Top=0
742 | Width=1823
743 | Height=6173
744 | MaxLeft=-5
745 | MaxTop=-10
746 | ClientWidth=1740
747 | ClientHeight=5798
748 | TBDockHeight=6173
749 | LRDockWidth=1823
750 | Dockable=1
751 | StayOnTop=0
752 |
753 | [DockHosts]
754 | DockHostCount=5
755 |
756 | [DockSite0]
757 | HostDockSite=DockBottomCenterPanel
758 | DockSiteType=1
759 | PercentageSizes=1
760 | Create=1
761 | Visible=0
762 | Docked=1
763 | State=0
764 | Left=8
765 | Top=8
766 | Width=2339
767 | Height=1481
768 | MaxLeft=-1
769 | MaxTop=-1
770 | ClientWidth=2339
771 | ClientHeight=1481
772 | TBDockHeight=1481
773 | LRDockWidth=2339
774 | Dockable=1
775 | StayOnTop=0
776 | TabPosition=1
777 | ActiveTabID=RefactoringForm
778 | TabDockClients=RefactoringForm,PatchForm,FindReferencsForm,ToDo List,MetricsView,QAView
779 |
780 | [DockSite1]
781 | HostDockSite=DockBottomPanel
782 | DockSiteType=1
783 | PercentageSizes=1
784 | Create=1
785 | Visible=0
786 | Docked=1
787 | State=0
788 | Left=0
789 | Top=18
790 | Width=3823
791 | Height=1404
792 | MaxLeft=-1
793 | MaxTop=-1
794 | ClientWidth=3823
795 | ClientHeight=1404
796 | TBDockHeight=1404
797 | LRDockWidth=3823
798 | Dockable=1
799 | StayOnTop=0
800 | TabPosition=1
801 | ActiveTabID=DebugLogView
802 | TabDockClients=DebugLogView,BreakpointWindow,ThreadStatusWindow,CallStackWindow,WatchWindow,LocalVarsWindow
803 |
804 | [DockSite2]
805 | HostDockSite=DockRightPanel
806 | DockSiteType=1
807 | PercentageSizes=1
808 | Create=1
809 | Visible=1
810 | Docked=1
811 | State=0
812 | Left=0
813 | Top=18
814 | Width=2000
815 | Height=4644
816 | MaxLeft=-1
817 | MaxTop=-1
818 | ClientWidth=2000
819 | ClientHeight=4644
820 | TBDockHeight=9010
821 | LRDockWidth=2000
822 | Dockable=1
823 | StayOnTop=0
824 | TabPosition=1
825 | ActiveTabID=ProjectManager
826 | TabDockClients=ProjectManager,ModelViewTool,DataExplorerContainer,frmDesignPreview,TFileExplorerForm
827 |
828 | [DockSite3]
829 | HostDockSite=DockLeftPanel
830 | DockSiteType=1
831 | PercentageSizes=1
832 | Create=1
833 | Visible=1
834 | Docked=1
835 | State=0
836 | Left=0
837 | Top=18
838 | Width=1896
839 | Height=3606
840 | MaxLeft=-1
841 | MaxTop=-1
842 | ClientWidth=1896
843 | ClientHeight=3606
844 | TBDockHeight=9010
845 | LRDockWidth=1896
846 | Dockable=1
847 | StayOnTop=0
848 | TabPosition=1
849 | ActiveTabID=StructureView
850 | TabDockClients=StructureView,ClassBrowserTool
851 |
852 | [DockSite4]
853 | HostDockSite=DockRightPanel
854 | DockSiteType=1
855 | PercentageSizes=1
856 | Create=1
857 | Visible=1
858 | Docked=1
859 | State=0
860 | Left=0
861 | Top=523
862 | Width=2000
863 | Height=2538
864 | MaxLeft=-1
865 | MaxTop=-1
866 | ClientWidth=2000
867 | ClientHeight=2538
868 | TBDockHeight=9010
869 | LRDockWidth=2000
870 | Dockable=1
871 | StayOnTop=0
872 | TabPosition=1
873 | ActiveTabID=ToolForm
874 | TabDockClients=ToolForm,TemplateView
875 |
876 | [ActiveProject]
877 | ActiveProject=7
878 |
879 |
--------------------------------------------------------------------------------
/examples/raylib-pascal Examples.groupproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | {51174603-13D1-4EC1-96B1-ED0A09071728}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | Default.Personality.12
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/examples/raylib-pascal Examples.groupproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/07/22 18:15:50.000.813,C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\examples\raylib-pas examples.groupproj=C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\ProjectGroup1.groupproj
5 | 2018/08/06 22:44:37.713,C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\raylib-pascal Examples.groupproj=C:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\raylib-pas examples.groupproj
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/raylib-pascal Examples_prjgroup.tvsconfig:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/shaders_custom_uniform.dpr:
--------------------------------------------------------------------------------
1 | (******************************************************************************
2 |
3 | raylib [shaders] example - Apply a postprocessing shader and connect a
4 | custom uniform variable
5 |
6 | NOTE: This example requires raylib OpenGL 3.3 or ES2 versions for shaders
7 | support, OpenGL 1.1 does not support shaders, recompile raylib to
8 | OpenGL 3.3 version.
9 |
10 | NOTE: Shaders used in this example are #version 330 (OpenGL 3.3), to test
11 | this example on OpenGL ES 2.0 platforms (Android, Raspberry Pi,
12 | HTML5), use #version 100 shaders raylib comes with shaders ready for
13 | both versions, check raylib/shaders install folder
14 |
15 | This example has been created using raylib 1.3 (www.raylib.com)
16 | raylib is licensed under an unmodified zlib/libpng license (View raylib.pas
17 | for details)
18 |
19 | Copyright (c) 2015 Ramon Santamaria (@raysan5)
20 | Delphi Conversion Copyright (c) 2018 dRez Games (https://drez.games)
21 | *******************************************************************************)
22 |
23 | program shaders_custom_uniform;
24 |
25 | {$APPTYPE CONSOLE}
26 | {$R *.res}
27 |
28 | uses
29 | System.SysUtils,
30 | common,
31 | raylib in '..\libs\raylib.pas';
32 |
33 | var
34 | cam: TCamera;
35 | dwarf: TModel;
36 | texture: TTexture2d;
37 | position: TVector3;
38 | shdr: TShader;
39 | swirlCenterLoc: integer;
40 | swirlCenter: array [0 .. 1] of single;
41 | target: TRenderTexture2D;
42 | mousePosition: TVector2;
43 |
44 | begin
45 | SetConfigFlags(FLAG_MSAA_4X_HINT);
46 | // Enable Multi Sampling Anti Aliasing 4x (if available)
47 |
48 | InitWindow(screenWidth, screenHeight,
49 | 'raylib [shaders] example - custom uniform variable');
50 |
51 | // Define the camera to look into our 3d world
52 | cam.position.&Set(3.0, 3.0, 3.0);
53 | cam.target.&Set(0.0, 1.5, 0.0);
54 | cam.up.&Set(0.0, 1.0, 0.0);
55 | cam.fovy := 45.0;
56 | cam.&type := CAMERA_PERSPECTIVE;
57 |
58 | dwarf := LoadModel('res/models/dwarf.obj'); // Load OBJ model
59 | texture := LoadTexture('res/models/dwarf_diffuse.png');
60 | // Load model texture (diffuse map)
61 | dwarf.material.maps[MAP_DIFFUSE].texture := texture;
62 | // Set dwarf model diffuse texture
63 |
64 | position.&Set(0.0, 0.0, 0.0); // Set model position
65 |
66 | shdr := LoadShader('res/shaders/glsl330/base.vs',
67 | 'res/shaders/glsl330/swirl.fs'); // Load postpro shader
68 |
69 | // Get variable (uniform) location on the shader to connect with the program
70 | // NOTE: If uniform variable could not be found in the shader, function
71 | // returns -1
72 | swirlCenterLoc := GetShaderLocation(shdr, 'center');
73 |
74 | swirlCenter[0] := screenWidth / 2;
75 | swirlCenter[1] := screenHeight / 2;
76 |
77 | // Create a RenderTexture2D to be used for render to texture
78 | target := LoadRenderTexture(screenWidth, screenHeight);
79 |
80 | // Setup orbital camera
81 | SetCameraMode(cam, CAMERA_ORBITAL); // Set an orbital camera mode
82 |
83 | SetTargetFPS(60); // Set our game to run at 60 frames-per-second
84 | // -------------------------------------------------------------------------
85 |
86 | // Main game loop
87 | while not WindowShouldClose do // Detect window close button or ESC key
88 | begin
89 | // Update
90 | // -----------------------------------------------------------------------
91 | mousePosition := GetMousePosition;
92 |
93 | swirlCenter[0] := mousePosition.x;
94 | swirlCenter[1] := screenHeight - mousePosition.y;
95 |
96 | // Send new value to the shader to be used on drawing
97 | SetShaderValue(shdr, swirlCenterLoc, @swirlCenter, 2);
98 |
99 | UpdateCamera(cam); // Update camera
100 | // -----------------------------------------------------------------------
101 |
102 | // Draw
103 | // -----------------------------------------------------------------------
104 | BeginDrawing();
105 |
106 | ClearBackground(RAYWHITE);
107 |
108 | BeginTextureMode(target); // Enable drawing to texture
109 |
110 | BeginMode3d(cam);
111 |
112 | DrawModel(dwarf, position, 2.0, WHITE); // Draw 3d model with texture
113 |
114 | DrawGrid(10, 1.0); // Draw a grid
115 |
116 | EndMode3d();
117 |
118 | DrawText('TEXT DRAWN IN RENDER TEXTURE', 200, 10, 30, RED);
119 |
120 | EndTextureMode();
121 | // End drawing to texture (now we have a texture available for next passes)
122 |
123 | BeginShaderMode(shdr);
124 |
125 | // NOTE: Render texture must be y-flipped due to default OpenGL
126 | // coordinates (left-bottom)
127 | DrawTextureRec(target.texture, TRectangle.Create(0, 0, target.texture.width,
128 | -target.texture.height), TVector2.Create(0, 0), WHITE);
129 |
130 | EndShaderMode();
131 |
132 | DrawText('(c) Dwarf 3D model by David Moreno', screenWidth - 200,
133 | screenHeight - 20, 10, GRAY);
134 |
135 | DrawFPS(10, 10);
136 |
137 | EndDrawing();
138 | // ----------------------------------------------------------------------
139 | end;
140 |
141 | // De-Initialization
142 | // ------------------------------------------------------------------------
143 | UnloadShader(shdr); // Unload shader
144 | UnloadTexture(texture); // Unload texture
145 | UnloadModel(dwarf); // Unload model
146 | UnloadRenderTexture(target); // Unload render texture
147 |
148 | CloseWindow(); // Close window and OpenGL context
149 |
150 | end.
151 |
--------------------------------------------------------------------------------
/examples/shaders_custom_uniform.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/18 23:24:02.000.673,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shaders_custom_uniform.dproj=C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj
5 | 2018/04/18 23:24:32.000.412,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/07/22 18:33:52.000.660,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/shaders_custom_uniform.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas UC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shaders_custom_uniform.dpr
--------------------------------------------------------------------------------
/examples/shaders_custom_uniform.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/shaders_custom_uniform.res
--------------------------------------------------------------------------------
/examples/shaders_custom_uniform.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=1016
3 | DesignerSecs=1
4 | InspectorSecs=2
5 | CompileSecs=5857
6 | OtherSecs=71
7 | StartTime=4/18/2018 11:34:37 PM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=187
11 |
--------------------------------------------------------------------------------
/examples/shapes_lines_bezier.dpr:
--------------------------------------------------------------------------------
1 | program shapes_lines_bezier;
2 |
3 | {$APPTYPE CONSOLE}
4 |
5 | {$R *.res}
6 |
7 | uses
8 | System.SysUtils,
9 | common,
10 | raylib in '..\libs\raylib.pas';
11 |
12 | var
13 | start,
14 | &end : TVector2;
15 | begin
16 | SetConfigFlags(FLAG_MSAA_4X_HINT);
17 | InitWindow(screenWidth, screenHeight, 'raylib [shapes] example - cubic-bezier lines');
18 | start.&Set(0,0);
19 | &end.&Set(screenWidth, screenHeight);
20 | SetTargetFPS(60);
21 | while not WindowShouldClose() do
22 | begin
23 | if IsMouseButtonDown(MOUSE_LEFT_BUTTON) then start := GetMousePosition
24 | else if IsMouseButtonDown(MOUSE_RIGHT_BUTTON) then &end := GetMousePosition;
25 | BeginDrawing;
26 | ClearBackground(RAYWHITE);
27 | DrawText('USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS', 15, 20, 20, GRAY);
28 | DrawLineBezier(start, &end, 2.0, RED);
29 | EndDrawing;
30 | end;
31 | CloseWindow;
32 | end.
33 |
--------------------------------------------------------------------------------
/examples/shapes_lines_bezier.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/19 00:03:56.000.365,C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj
5 | 2018/04/19 00:04:37.000.493,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/07/22 18:34:11.000.563,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/shapes_lines_bezier.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas RC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\shapes_lines_bezier.dpr
--------------------------------------------------------------------------------
/examples/shapes_lines_bezier.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/shapes_lines_bezier.res
--------------------------------------------------------------------------------
/examples/shapes_lines_bezier.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=150
3 | DesignerSecs=1
4 | InspectorSecs=3
5 | CompileSecs=1628
6 | OtherSecs=101
7 | StartTime=4/19/2018 12:05:46 AM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=59
11 |
--------------------------------------------------------------------------------
/examples/template.dpr:
--------------------------------------------------------------------------------
1 | program template;
2 |
3 | {$APPTYPE CONSOLE}
4 |
5 | {$R *.res}
6 |
7 | uses
8 | System.SysUtils,
9 | raylib in '..\lib\raylib.pas',
10 | common;
11 |
12 | begin
13 | end.
14 |
--------------------------------------------------------------------------------
/examples/template.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/19 00:03:56.000.365,C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj
5 | 2018/04/19 00:04:37.000.493,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/04/19 00:05:13.000.572,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/template.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=1309
3 | DesignerSecs=1
4 | InspectorSecs=1
5 | CompileSecs=4178
6 | OtherSecs=96
7 | StartTime=4/19/2018 12:05:24 AM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=94
11 |
--------------------------------------------------------------------------------
/examples/textures_image_generation.dpr:
--------------------------------------------------------------------------------
1 | program textures_image_generation;
2 |
3 | {$APPTYPE CONSOLE}
4 | {$R *.res}
5 |
6 | uses
7 | System.SysUtils,
8 | common,
9 | raylib in '..\libs\raylib.pas';
10 |
11 | const
12 | NUM_TEXTURES = 7;
13 |
14 | var
15 | verticalGradient,
16 | horizontalGradient,
17 | radialGradient,
18 | checked,
19 | whiteNoise,
20 | perlinNoise,
21 | cellular : TImage;
22 | textures : array [0 .. (NUM_TEXTURES) - 1] of TTexture2D;
23 | currentTexture, i: integer;
24 |
25 | begin
26 | InitWindow(screenWidth, screenHeight, 'raylib [textures] example - procedural images generation');
27 |
28 | verticalGradient := GenImageGradientV(screenWidth, screenHeight, RED, BLUE);
29 | horizontalGradient := GenImageGradientH(screenWidth, screenHeight, RED, BLUE);
30 | radialGradient := GenImageGradientRadial(screenWidth, screenHeight, 0.0, WHITE, BLACK);
31 | checked := GenImageChecked(screenWidth, screenHeight, 32, 32, RED, BLUE);
32 | whiteNoise := GenImageWhiteNoise(screenWidth, screenHeight, 0.5);
33 | perlinNoise := GenImagePerlinNoise(screenWidth, screenHeight, 50, 50, 4.0);
34 | cellular := GenImageCellular(screenWidth, screenHeight, 32);
35 |
36 | textures[0] := LoadTextureFromImage(verticalGradient);
37 | textures[1] := LoadTextureFromImage(horizontalGradient);
38 | textures[2] := LoadTextureFromImage(radialGradient);
39 | textures[3] := LoadTextureFromImage(checked);
40 | textures[4] := LoadTextureFromImage(whiteNoise);
41 | textures[5] := LoadTextureFromImage(perlinNoise);
42 | textures[6] := LoadTextureFromImage(cellular);
43 |
44 | UnloadImage(verticalGradient);
45 | UnloadImage(horizontalGradient);
46 | UnloadImage(radialGradient);
47 | UnloadImage(checked);
48 | UnloadImage(whiteNoise);
49 | UnloadImage(perlinNoise);
50 | UnloadImage(cellular);
51 |
52 | currentTexture := 0;
53 |
54 | SetTargetFPS(60);
55 |
56 | while not WindowShouldClose() do
57 | begin
58 | if IsMouseButtonPressed(MOUSE_LEFT_BUTTON) then
59 | begin
60 | currentTexture := (currentTexture + 1) mod NUM_TEXTURES;
61 | end;
62 | BeginDrawing();
63 | ClearBackground(RAYWHITE);
64 | DrawTexture(textures[currentTexture], 0, 0, WHITE);
65 | DrawRectangle(30, 400, 325, 30, Fade(SKYBLUE, 0.5));
66 | DrawRectangleLines(30, 400, 325, 30, Fade(WHITE, 0.5));
67 | DrawText('MOUSE LEFT BUTTON to CYCLE PROCEDURAL TEXTURES', 40, 410,
68 | 10, WHITE);
69 | case currentTexture of
70 | 0: DrawText('VERTICAL GRADIENT', 560, 10, 20, RAYWHITE);
71 | 1: DrawText('HORIZONTAL GRADIENT', 540, 10, 20, RAYWHITE);
72 | 2: DrawText('RADIAL GRADIENT', 580, 10, 20, LIGHTGRAY);
73 | 3: DrawText('CHECKED', 680, 10, 20, RAYWHITE);
74 | 4: DrawText('WHITE NOISE', 640, 10, 20, RED);
75 | 5: DrawText('PERLIN NOISE', 630, 10, 20, RAYWHITE);
76 | 6: DrawText('CELLULAR', 670, 10, 20, RAYWHITE);
77 | else
78 | break;
79 | end;
80 | EndDrawing();
81 | end;
82 | for i := 0 to NUM_TEXTURES - 1 do
83 | UnloadTexture(textures[i]);
84 | CloseWindow();
85 |
86 | end.
87 |
--------------------------------------------------------------------------------
/examples/textures_image_generation.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/19 00:03:56.000.365,C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj
5 | 2018/04/19 00:04:37.000.493,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/04/19 00:05:13.000.572,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj
7 | 2018/04/19 00:26:45.000.600,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\textures_image_generation.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj
8 | 2018/07/22 18:34:45.000.170,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/textures_image_generation.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas XC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_image_generation.dpr
--------------------------------------------------------------------------------
/examples/textures_image_generation.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/textures_image_generation.res
--------------------------------------------------------------------------------
/examples/textures_image_generation.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=99
3 | DesignerSecs=1
4 | InspectorSecs=2
5 | CompileSecs=1258
6 | OtherSecs=64
7 | StartTime=4/19/2018 1:43:27 AM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=18
11 |
--------------------------------------------------------------------------------
/examples/textures_particles_blending.dpr:
--------------------------------------------------------------------------------
1 | program textures_particles_blending;
2 |
3 | {$APPTYPE CONSOLE}
4 | {$R *.res}
5 |
6 | uses
7 | System.SysUtils,
8 | common,
9 | raylib in '..\libs\raylib.pas';
10 |
11 | const
12 | MAX_PARTICLES = 200;
13 |
14 | type
15 | Particle = record
16 | position: TVector2;
17 | color: TColor;
18 | alpha: Single;
19 | size: Single;
20 | rotation: Single;
21 | active: Boolean; // NOTE: Use it to activate/deactive particle
22 | end;
23 |
24 | var
25 | mouseTail: array [0 .. (MAX_PARTICLES) - 1] of Particle;
26 | i: integer;
27 | gravity: Single;
28 | smoke: TTexture2D;
29 | blending: integer;
30 |
31 | begin
32 | InitWindow(screenWidth, screenHeight, 'raylib [textures] example - particles blending');
33 |
34 | for i := 0 to MAX_PARTICLES - 1 do
35 | begin
36 | mouseTail[i].position.&Set(0, 0);
37 | mouseTail[i].color.&Set(GetRandomValue(0, 255), GetRandomValue(0, 255),
38 | GetRandomValue(0, 255), 255);
39 | mouseTail[i].alpha := 1.0;
40 | mouseTail[i].size := Single(GetRandomValue(1, 30)) / 20.0;
41 | mouseTail[i].rotation := GetRandomValue(0, 360);
42 | mouseTail[i].active := false;
43 | end;
44 |
45 | gravity := 3.0;
46 | smoke := LoadTexture('res/textures/smoke.png');
47 | blending := BLEND_ALPHA;
48 | SetTargetFPS(60);
49 |
50 | while not WindowShouldClose do
51 | begin
52 | for i := 0 to MAX_PARTICLES - 1 do
53 | begin
54 | if not mouseTail[i].active then
55 | begin
56 | mouseTail[i].active := true;
57 | mouseTail[i].alpha := 1.0;
58 | mouseTail[i].position := GetMousePosition;
59 | break;
60 | end;
61 | end;
62 |
63 | for i := 0 to MAX_PARTICLES - 1 do
64 | begin
65 | if mouseTail[i].active then
66 | begin
67 | mouseTail[i].position.y := mouseTail[i].position.y + gravity;
68 | mouseTail[i].alpha := mouseTail[i].alpha - 0.01;
69 | if mouseTail[i].alpha <= 0.0 then
70 | mouseTail[i].active := false;
71 | mouseTail[i].rotation := mouseTail[i].rotation + 5.0;
72 | end;
73 | end;
74 |
75 | if IsKeyPressed(KEY_SPACE) then
76 | begin
77 | if blending = BLEND_ALPHA then
78 | blending := BLEND_ADDITIVE
79 | else
80 | blending := BLEND_ALPHA;
81 | end;
82 |
83 | BeginDrawing;
84 | ClearBackground(DARKGRAY);
85 | BeginBlendMode(blending);
86 | for i := 0 to MAX_PARTICLES - 1 do
87 | begin
88 | if mouseTail[i].active then
89 | DrawTexturePro(smoke, TRectangle.Create(0, 0, smoke.width, smoke.height),
90 | TRectangle.Create(Round(mouseTail[i].position.x),
91 | Round(mouseTail[i].position.y), Round(smoke.width * mouseTail[i].size),
92 | Round(smoke.height * mouseTail[i].size)),
93 | TVector2.Create(smoke.width * mouseTail[i].size / 2,
94 | smoke.height * mouseTail[i].size / 2), mouseTail[i].rotation,
95 | Fade(mouseTail[i].color, mouseTail[i].alpha));
96 | end;
97 | EndBlendMode();
98 | DrawText('PRESS SPACE to CHANGE BLENDING MODE', 180, 20, 20, BLACK);
99 | if blending = BLEND_ALPHA then
100 | DrawText('ALPHA BLENDING', 290, screenHeight - 40, 20, BLACK)
101 | else
102 | DrawText('ADDITIVE BLENDING', 280, screenHeight - 40, 20, RAYWHITE);
103 | EndDrawing();
104 | end;
105 |
106 | UnloadTexture(smoke);
107 | CloseWindow();
108 | end.
109 |
--------------------------------------------------------------------------------
/examples/textures_particles_blending.dproj.local:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 2018/04/19 00:03:56.000.365,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj=C:\Users\drezgames\Documents\Embarcadero\Studio\Projects\Project1.dproj
5 | 2018/04/19 00:04:37.000.493,=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\lib\raylib.pas
6 | 2018/04/19 00:05:13.000.572,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\shapes_lines_bezier.dproj
7 | 2018/04/19 00:11:01.000.146,C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\textures_particles_blending.dproj=C:\Users\drezgames\Documents\Development\Tool\raylib-pascal\examples\template.dproj
8 | 2018/07/22 18:35:00.000.792,=C:\Users\drezgames\DropBox\Dev\Tools\raylib-pascal\libs\raylib.pas
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/textures_particles_blending.identcache:
--------------------------------------------------------------------------------
1 | AC:\Users\drezgames\Documents\GitHub\raylib-pascal\libs\raylib.pas ZC:\Users\drezgames\Documents\GitHub\raylib-pascal\examples\textures_particles_blending.dpr
--------------------------------------------------------------------------------
/examples/textures_particles_blending.res:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/examples/textures_particles_blending.res
--------------------------------------------------------------------------------
/examples/textures_particles_blending.stat:
--------------------------------------------------------------------------------
1 | [Stats]
2 | EditorSecs=2104
3 | DesignerSecs=1
4 | InspectorSecs=3
5 | CompileSecs=4830
6 | OtherSecs=148
7 | StartTime=4/19/2018 12:11:05 AM
8 | RealKeys=0
9 | EffectiveKeys=0
10 | DebugSecs=153
11 |
--------------------------------------------------------------------------------
/logo/logo_256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/logo/logo_256x256.png
--------------------------------------------------------------------------------
/logo/logo_512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/logo/logo_512x512.png
--------------------------------------------------------------------------------
/logo/raylib-pascal.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/drezgames/raylib-pascal/e64cb28aef7d36f45ce1fc2d8be08f4e24143a65/logo/raylib-pascal.ico
--------------------------------------------------------------------------------