Compare commits
No commits in common. "master" and "gl4" have entirely different histories.
3
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
|||
*.o
|
||||
build
|
||||
bin_unix/native_*
|
||||
build
|
||||
|
|
80
COPYING.md
|
@ -1,80 +0,0 @@
|
|||
# OctaCore license
|
||||
|
||||
All new OctaCore code is provided to you under the terms of the BSD-2-Clause
|
||||
license, while the original Tesseract/Sauerbraten portions retain their original
|
||||
license. OctaCore only ships the altered source code of the original projects,
|
||||
without the media content.
|
||||
|
||||
Copyright (c) 2020 Daniel "q66" Kolesa
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimers.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimers in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
**THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.**
|
||||
|
||||
# Tesseract
|
||||
|
||||
OctaCore is derived from the Tesseract codebase:
|
||||
|
||||
Tesseract game engine source code, any release.
|
||||
|
||||
Copyright (C) 2001-2020 Wouter van Oortmerssen, Lee Salzman, Mike Dysart,
|
||||
Robert Pointon, Quinton Reeves, and Benjamin Segovia
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
# Sauerbraten
|
||||
|
||||
Tesseract is based on Sauerbraten:
|
||||
|
||||
Sauerbraten game engine source code, any release.
|
||||
|
||||
Copyright (C) 2001-2020 Wouter van Oortmerssen, Lee Salzman, Mike Dysart,
|
||||
Robert Pointon, and Quinton Reeves
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
16
README
|
@ -18,7 +18,6 @@ It provides a bunch of new rendering features such as:
|
|||
* HDR rendering with tonemapping and bloom
|
||||
* real-time diffuse global illumination for sunlight (radiance hints)
|
||||
* volumetric lighting
|
||||
* transparent shadows
|
||||
* screen-space ambient occlusion
|
||||
* screen-space reflections and refractions for water and glass (use as many water planes as you want now!)
|
||||
* screen-space refractive alpha cubes
|
||||
|
@ -82,18 +81,3 @@ Set attribute 5 of a light entity to 4.
|
|||
|
||||
The intensity of the volumetric lighting medium can be controlled by volscale and the color can by controlled by volcolour.
|
||||
|
||||
To make transparent shadows:
|
||||
|
||||
This is toggled on a per-map basis by setting "alphashadow" to 0 (off), 1 (sunlight), or 2 (sunlight and point lights).
|
||||
If set to 1, you must set attribute 5 of a light entity to 16 to enable transparent shadows for that point light.
|
||||
If set to 2, all point lights automatically cast transparent shadows.
|
||||
If a light is volumetric, regardless of "alphashadow" setting, the light entity's attribute 5 must be set to 20 (4 | 16) for it
|
||||
to cast a volumetric transparent shadow.
|
||||
|
||||
To make a cube cast transparent shadows, use the "alpha" material. The texalpha/valpha commands can be then used to control the alpha
|
||||
of the cube, which then is used to determine the intensity of the transparent shadow. This intensity can be further scaled by setting
|
||||
the global map variable "alphashadowscale" (0..2).
|
||||
|
||||
If a texture slot has an alpha texture (slot "a"), this can be used to mask the alpha of the cube. This masked alpha will then be used
|
||||
to further mask the transparent shadow.
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
# OctaCore
|
||||
|
||||
**Last Tesseract SVN import:** 2425
|
||||
|
||||
This is the work in progress engine part of the newly revived OctaForge
|
||||
project.
|
||||
|
||||
Nothing much to see here yet, besides a stripped down, partially refactored
|
||||
Tesseract codebase.
|
||||
OctaCore is the engine component of OctaForge 2.0.
|
||||
|
|
101
bin_unix/readme.txt
Normal file
|
@ -0,0 +1,101 @@
|
|||
* Installing and Running Tesseract
|
||||
|
||||
*nix versions of Tesseract clients and standalone servers.
|
||||
The clients function identical to the win32 client, see config.html for more
|
||||
information about command-line options if necessary.
|
||||
|
||||
Please run "tesseract_unix" from the root Tesseract dir (NOT from inside the "bin_unix"
|
||||
directory) to launch these, or set the TESS_DATA variable at the top of the "tesseract_unix"
|
||||
script to an absolute path to allow it to be run from any location. Note that the "tesseract_unix"
|
||||
script is set up to write any files (saved maps, configs, etc.) into the user's home
|
||||
directory at "~/.tesseract".
|
||||
|
||||
Clients will need the following dynamic link libraries present:
|
||||
* libGL (OpenGL)
|
||||
* SDL2 (>= 2.0.0)
|
||||
* SDL2_image
|
||||
* SDL2_mixer
|
||||
* libpng
|
||||
* libjpeg
|
||||
* zlib
|
||||
|
||||
If native binaries for your platform are not included, then try the following:
|
||||
1) Ensure you have the DEVELOPMENT VERSIONS of the above libraries installed.
|
||||
2) Type "make -C src install".
|
||||
3) Re-run the "tesseract_unix" script if it succeeded.
|
||||
|
||||
The servers (bin_unix/linux_server or bin_unix/native_server) should need no libs
|
||||
other than libstdc++ and zlib. Note that for the server to see the "config/server-init.cfg",
|
||||
it must be run from the root Tesseract directory. If you run a server with the
|
||||
"tesseract_unix -d" command, this happens automatically. However, if you wish to
|
||||
run the standalone servers instead, then you may need to write an appropriate wrapper
|
||||
script to change to the appropriate data directory before running the standalone
|
||||
server binary, as described below in the packaging guide.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
* Packaging Guide for Unix-like Operating System Developers/Maintainers
|
||||
|
||||
If you are packaging Tesseract up for redistribution in a Linux distribution or other
|
||||
similar OS, please avoid using the "tesseract_unix" script in its default/unmodified form.
|
||||
You should at least set the TESS_DATA variable to appropriately find the common Tesseract
|
||||
data files, or better yet replace it with a more appropriate way of starting Tesseract using
|
||||
the script as a basis. If the distribution happens to place program binaries in a specific
|
||||
directory separate from data files, such as "/usr/bin", then much of the lines within the script
|
||||
that deal with finding an appropriate binary can be removed, as they only exist to help people
|
||||
running from the original Tesseract tarball. An example run script is shown further
|
||||
below.
|
||||
|
||||
Also, please note, that if your distribution chooses to package the binaries and game data
|
||||
as separate packages due to whatever licensing rules or cross-architecture package sharing,
|
||||
that client binaries from newer Tesseract editions are NOT compatible with older versions of
|
||||
game data, on whole, nor obviously compatible with newer versions of game data. Game data, as a
|
||||
whole, and client binaries are only roughly compatible within individual Tesseract editions,
|
||||
though patches to individual Tesseract editions generally always retain compatibility with
|
||||
the game data.
|
||||
|
||||
For those writing custom Tesseract run scripts for packaging, they should adhere to the following
|
||||
guidelines:
|
||||
|
||||
Tesseract finds all game files relative to the current directory from which Tesseract is run,
|
||||
so any script running Tesseract should set its current directory to where the Tesseract data
|
||||
files are located before it runs the Tesseract client binaries. No silly symlinking tricks should
|
||||
be at all necessary.
|
||||
|
||||
When running the Tesseract client, one command-line switch should ALWAYS be supplied to
|
||||
the client binary. This is "-u${HOME}/.tesseract", which will instruct Tesseract to
|
||||
write any user private files such as saved maps and configurations to a private ".tesseract"
|
||||
directory within each user's home directory. Tesseract will automatically create this
|
||||
directory and any subdirectories for each user running it, so do not pre-create this directory
|
||||
or install any symlinks within it - as some Linux distribution packages have erroneously done.
|
||||
All command-line switches supplied to the Tesseract run script should be passed to the
|
||||
Tesseract client after the "-u${HOME}/.tesseract" switch.
|
||||
|
||||
A simple script such as the following (with directory/file names set as appropriate) would
|
||||
ultimately suffice for the client:
|
||||
|
||||
#!/bin/sh
|
||||
TESS_DATA=/usr/share/games/tesseract
|
||||
TESS_BIN=/usr/bin/tesseract_client
|
||||
TESS_OPTIONS="-u${HOME}/.tesseract"
|
||||
|
||||
cd ${TESS_DATA}
|
||||
exec ${TESS_BIN} ${TESS_OPTIONS} "$@"
|
||||
|
||||
A simple script for the server, which assumes a global default "config/server-init.cfg" in TESS_DATA,
|
||||
but allows per-user overriding via the home directory, might be:
|
||||
|
||||
#!/bin/sh
|
||||
TESS_DATA=/usr/share/games/tesseract
|
||||
TESS_SERV_BIN=/usr/bin/tesseract_server
|
||||
TESS_SERV_OPTIONS="-u${HOME}/.tesseract"
|
||||
|
||||
cd ${TESS_DATA}
|
||||
exec ${TESS_SERV_BIN} ${TESS_SERV_OPTIONS} "$@"
|
||||
|
||||
With respect to libraries, make sure that you do not link Tesseract against any other ENet package
|
||||
than the one that comes included with the Tesseract, as it may be different from the official ENet
|
||||
releases and might fail to compile or communicate properly.
|
||||
|
|
@ -11,7 +11,7 @@ name "unnamed"
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
miniconfilter 0x300 // display chat and team chat in mini-console
|
||||
confilter (&~ 0xFFF $miniconfilter) // don't display other player frags or mini-console stuff in console
|
||||
fullconsole = 0
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Universal Mouse Scrollwheel //
|
||||
|
|
|
@ -16,17 +16,20 @@ setdefaultenv = [
|
|||
if $emptymap [setdefaultenv]
|
||||
|
||||
materialreset
|
||||
texture glass "mat_glass/nieb/scratch2.png" // Glass Normals
|
||||
texture water "mat_water/nieb/water.png" // Water (Unused)
|
||||
texture 1 "mat_water/appleflap/water_normal.png" // Water Normals
|
||||
texture 1 "mat_water/nieb/waterfall.png" // Waterfall Diffuse
|
||||
texture 1 "mat_water/nieb/waterfall_normal.png" // Waterfall Normals
|
||||
texture lava "mat_lava/nieb/lava.png" // Lava Diffuse
|
||||
texture 1 "mat_lava/nieb/lava_normal.png" // Lava Normals
|
||||
texture 1 "mat_lava/nieb/lava.png" // Lavafall Diffuse
|
||||
texture 1 "mat_lava/nieb/lava_normal.png" // Lavafall Normals
|
||||
loop+ i 1 4 [
|
||||
texture [glass@i] "mat_glass/nieb/scratch2.png" // Glass Normals
|
||||
texture [water@i] "mat_water/nieb/water.png" // Water (Unused)
|
||||
texture 1 "mat_water/appleflap/water_normal.png" // Water Normals
|
||||
texture 1 "mat_water/nieb/waterfall.png" // Waterfall Diffuse
|
||||
texture 1 "mat_water/nieb/waterfall_normal.png" // Waterfall Normals
|
||||
texture [lava@i] "mat_lava/nieb/lava.png" // Lava Diffuse
|
||||
texture 1 "mat_lava/nieb/lava_normal.png" // Lava Normals
|
||||
texture 1 "mat_lava/nieb/lava.png" // Lavafall Diffuse
|
||||
texture 1 "mat_lava/nieb/lava_normal.png" // Lavafall Normals
|
||||
]
|
||||
|
||||
decalreset
|
||||
decalload "nieb/complex/loadingbay"
|
||||
|
||||
texturereset // Start world texture list
|
||||
texsky // Dummy "sky" texture
|
||||
|
@ -37,4 +40,142 @@ texturereset // Start world texture list
|
|||
texload "base/white"
|
||||
texload "base/glow"
|
||||
|
||||
// Nieb/Complex
|
||||
texload "nieb/complex/door_rail"
|
||||
texload "nieb/complex/door_rail"; texrotate 1
|
||||
texload "nieb/complex/electrical-outlet"
|
||||
texload "nieb/complex/glass_2"
|
||||
texload "nieb/complex/glass_subtle"
|
||||
texload "nieb/complex/light-switch"
|
||||
texload "nieb/complex/light01_off"
|
||||
texload "nieb/complex/light01_on"
|
||||
texload "nieb/complex/step01"
|
||||
texload "nieb/complex/step01"; texrotate 1
|
||||
texload "nieb/complex/step02"
|
||||
texload "nieb/complex/step02"; texrotate 1
|
||||
texload "nieb/complex/step03"
|
||||
texload "nieb/complex/step03"; texrotate 1
|
||||
texload "nieb/complex/tile01"
|
||||
texload "nieb/complex/tile02"
|
||||
texload "nieb/complex/vent"
|
||||
texload "nieb/complex/wall01"
|
||||
texload "nieb/complex/woodfloor01"
|
||||
texload "nieb/complex/woodfloor02"
|
||||
texload "nieb/complex/woodfloor03"
|
||||
|
||||
// CGTextures
|
||||
texload "cgtextures/buildingshighrise0290"
|
||||
texload "cgtextures/buildingshighrise0341"
|
||||
texload "cgtextures/buildingshighrise0436"
|
||||
texload "cgtextures/carpet01"
|
||||
texload "cgtextures/ceilingtile01"
|
||||
texload "cgtextures/tilesplain0119"
|
||||
texload "cgtextures/tilesplain0119"; texrotate 1
|
||||
|
||||
// AGF81
|
||||
texload "agf81/concrete1"
|
||||
texload "agf81/concrete1w"
|
||||
texload "agf81/concrete2"
|
||||
texload "agf81/concrete2"; texrotate 1
|
||||
texload "agf81/concrete3"
|
||||
texload "agf81/concrete3"; texrotate 1
|
||||
texload "agf81/concrete4"
|
||||
texload "agf81/concrete5"
|
||||
texload "agf81/door_texture_2"
|
||||
texload "agf81/metal_a2"
|
||||
|
||||
// Nobiax
|
||||
texload "nobiax/pattern019"
|
||||
texload "nobiax/pattern037"
|
||||
texload "nobiax/pattern042"
|
||||
texload "nobiax/pattern044"
|
||||
texload "nobiax/pattern045"
|
||||
texload "nobiax/pattern047"
|
||||
texload "nobiax/pattern055"
|
||||
texload "nobiax/pattern056"
|
||||
texload "nobiax/pattern057"
|
||||
texload "nobiax/pattern205"
|
||||
texload "nobiax/pattern208"
|
||||
|
||||
// philipk2
|
||||
|
||||
texload "philipk2/pk02_ceiling03"
|
||||
texload "philipk2/pk02_door01"
|
||||
texload "philipk2/pk02_door02"
|
||||
texload "philipk2/pk02_door03"
|
||||
texload "philipk2/pk02_floor01"
|
||||
texload "philipk2/pk02_floor02"
|
||||
texload "philipk2/pk02_floor03"
|
||||
texload "philipk2/pk02_floor04"
|
||||
texload "philipk2/pk02_floor05"
|
||||
texload "philipk2/pk02_floor06a"
|
||||
texload "philipk2/pk02_floor06b"
|
||||
texload "philipk2/pk02_floor07"
|
||||
texload "philipk2/pk02_floor08a"
|
||||
texload "philipk2/pk02_floor08b"
|
||||
texload "philipk2/pk02_floor09a"
|
||||
texload "philipk2/pk02_floor09b"
|
||||
texload "philipk2/pk02_floor10"
|
||||
texload "philipk2/pk02_floor11"
|
||||
texload "philipk2/pk02_floor12a"
|
||||
texload "philipk2/pk02_floor12b"
|
||||
texload "philipk2/pk02_floor13a"
|
||||
texload "philipk2/pk02_floor13b"
|
||||
texload "philipk2/pk02_floor_cyl01"
|
||||
texload "philipk2/pk02_floor_cyl02"
|
||||
texload "philipk2/pk02_generic01a"
|
||||
texload "philipk2/pk02_generic01b"
|
||||
texload "philipk2/pk02_light01a"
|
||||
texload "philipk2/pk02_light01b"
|
||||
texload "philipk2/pk02_panels01a"
|
||||
texload "philipk2/pk02_panels01b"
|
||||
texload "philipk2/pk02_panels01c"
|
||||
texload "philipk2/pk02_plates01a"
|
||||
texload "philipk2/pk02_plates01b"
|
||||
texload "philipk2/pk02_rock01"
|
||||
texload "philipk2/pk02_sand01"
|
||||
texload "philipk2/pk02_switches01a"
|
||||
texload "philipk2/pk02_trim01"
|
||||
texload "philipk2/pk02_trim02"
|
||||
texload "philipk2/pk02_trim03"
|
||||
texload "philipk2/pk02_trim04a"
|
||||
texload "philipk2/pk02_trim04b"
|
||||
texload "philipk2/pk02_trim_set01a"
|
||||
texload "philipk2/pk02_trim_set01b"
|
||||
texload "philipk2/pk02_trim_set02a"
|
||||
texload "philipk2/pk02_trim_set02b"
|
||||
texload "philipk2/pk02_wall01"
|
||||
texload "philipk2/pk02_wall03a"
|
||||
texload "philipk2/pk02_wall03b"
|
||||
texload "philipk2/pk02_wall04a"
|
||||
texload "philipk2/pk02_wall04b"
|
||||
texload "philipk2/pk02_wall05a"
|
||||
texload "philipk2/pk02_wall05b"
|
||||
texload "philipk2/pk02_wall05c"
|
||||
texload "philipk2/pk02_wall06a"
|
||||
texload "philipk2/pk02_wall06b"
|
||||
texload "philipk2/pk02_wall07a"
|
||||
texload "philipk2/pk02_wall07b"
|
||||
texload "philipk2/pk02_wall_big01a"
|
||||
texload "philipk2/pk02_wall_big01b"
|
||||
texload "philipk2/pk02_wall_big02a"
|
||||
texload "philipk2/pk02_wall_big02b"
|
||||
texload "philipk2/pk02_wall08a"
|
||||
texload "philipk2/pk02_wall08b"
|
||||
texload "philipk2/pk02_ceiling02"
|
||||
texload "philipk2/pk02_computer01a"
|
||||
texload "philipk2/pk02_computer01b"
|
||||
texload "philipk2/pk02_computer01c"
|
||||
texload "philipk2/pk02_light02a"
|
||||
texload "philipk2/pk02_light02b"
|
||||
texload "philipk2/pk02_light02c"
|
||||
texload "philipk2/pk02_light02"
|
||||
texload "philipk2/pk02_light03"
|
||||
texload "philipk2/pk02_pipes01"
|
||||
texload "philipk2/pk02_switches01b"
|
||||
texload "philipk2/pk02_switches01c"
|
||||
texload "philipk2/pk02_wall02a"
|
||||
texload "philipk2/pk02_wall02b"
|
||||
texload "philipk2/pk02_wall02c"
|
||||
|
||||
setshader "stdworld"
|
||||
|
|
|
@ -10,7 +10,6 @@ exec "config/glsl/gi.cfg"
|
|||
exec "config/glsl/particle.cfg"
|
||||
exec "config/glsl/stain.cfg"
|
||||
exec "config/glsl/material.cfg"
|
||||
exec "config/glsl/smfilter.cfg"
|
||||
exec "config/glsl/deferred.cfg"
|
||||
exec "config/glsl/tonemap.cfg"
|
||||
exec "config/glsl/volumetric.cfg"
|
||||
|
|
|
@ -5,19 +5,15 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
lazyshader 0 "tqaaresolve" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
@(? $tqaaresolvegather [
|
||||
varying vec2 texcoord1;
|
||||
])
|
||||
out vec2 texcoord0;
|
||||
out vec2 texcoord1;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
@(? $tqaaresolvegather [
|
||||
texcoord1 = vtexcoord0 - 0.5;
|
||||
])
|
||||
texcoord1 = vtexcoord0 - 0.5;
|
||||
}
|
||||
] [
|
||||
@(gfetchdefs tex2)
|
||||
|
@ -26,11 +22,9 @@ lazyshader 0 "tqaaresolve" [
|
|||
uniform mat4 reprojectmatrix;
|
||||
uniform vec2 maxvelocity;
|
||||
uniform vec2 colorweight;
|
||||
varying vec2 texcoord0;
|
||||
@(? $tqaaresolvegather [
|
||||
varying vec2 texcoord1;
|
||||
])
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec2 texcoord1;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(gdepthunpack depth [gfetch(tex2, texcoord0)] [
|
||||
|
@ -42,28 +36,19 @@ lazyshader 0 "tqaaresolve" [
|
|||
vec2 vel = prevtc.xy/prevtc.w - texcoord0;
|
||||
float scale = clamp(maxvelocity.x*inversesqrt(dot(vel, vel) + 1e-6), 0.0, 1.0);
|
||||
|
||||
float mask = 1.0 - texture2DRect(tex0, texcoord0 + quincunx.xy).a;
|
||||
vec4 color = texture2DRect(tex0, texcoord0 + mask*quincunx.xy);
|
||||
vec4 prevcolor = texture2DRect(tex1, texcoord0 + mask*(quincunx.zw + vel*scale));
|
||||
float mask = 1.0 - textureRect(tex0, texcoord0 + quincunx.xy).a;
|
||||
vec4 color = textureRect(tex0, texcoord0 + mask*quincunx.xy);
|
||||
vec4 prevcolor = textureRect(tex1, texcoord0 + mask*(quincunx.zw + vel*scale));
|
||||
|
||||
@(? $tqaaresolvegather [
|
||||
vec4 l0 = textureGather(tex0, texcoord1, 1);
|
||||
vec4 l1 = textureGatherOffset(tex0, texcoord1, ivec2(1, 1), 1);
|
||||
float l2 = texture2DRectOffset(tex0, texcoord0, ivec2(1, -1)).g;
|
||||
float l3 = texture2DRectOffset(tex0, texcoord0, ivec2(-1, 1)).g;
|
||||
vec4 l01min = min(l0, l1), l01max = max(l0, l1);
|
||||
l01min.xy = min(l01min.xy, l01min.zw);
|
||||
l01max.xy = max(l01max.xy, l01max.zw);
|
||||
float lmin = min(min(l01min.x, l01min.y), min(l2, l3));
|
||||
float lmax = max(max(l01max.x, l01max.y), max(l2, l3));
|
||||
] [
|
||||
float l0 = texture2DRect(tex0, texcoord0 + vec2(-1.0, -0.5)).g;
|
||||
float l1 = texture2DRect(tex0, texcoord0 + vec2( 0.5, -1.0)).g;
|
||||
float l2 = texture2DRect(tex0, texcoord0 + vec2( 1.0, 0.5)).g;
|
||||
float l3 = texture2DRect(tex0, texcoord0 + vec2(-0.5, 1.0)).g;
|
||||
float lmin = min(color.g, min(min(l0, l1), min(l2, l3)));
|
||||
float lmax = max(color.g, max(max(l0, l1), max(l2, l3)));
|
||||
])
|
||||
vec4 l0 = textureGather(tex0, texcoord1, 1);
|
||||
vec4 l1 = textureGatherOffset(tex0, texcoord1, ivec2(1, 1), 1);
|
||||
float l2 = textureRectOffset(tex0, texcoord0, ivec2(1, -1)).g;
|
||||
float l3 = textureRectOffset(tex0, texcoord0, ivec2(-1, 1)).g;
|
||||
vec4 l01min = min(l0, l1), l01max = max(l0, l1);
|
||||
l01min.xy = min(l01min.xy, l01min.zw);
|
||||
l01max.xy = max(l01max.xy, l01max.zw);
|
||||
float lmin = min(min(l01min.x, l01min.y), min(l2, l3));
|
||||
float lmax = max(max(l01max.x, l01max.y), max(l2, l3));
|
||||
|
||||
float weight = 0.5 - 0.5*clamp((colorweight.x*max(prevcolor.g - lmax, lmin - prevcolor.g) + colorweight.y) / (lmax - lmin + 1e-4), 0.0, 1.0);
|
||||
weight *= clamp(1.0 - 2.0*(prevcolor.a - color.a), 0.0, 1.0);
|
||||
|
|
|
@ -25,10 +25,10 @@ ambientobscurancevariantshader = [
|
|||
derivnormal = (>= (strstr $arg2 "d") 0)
|
||||
maxaotaps = $arg3
|
||||
shader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
@(screentexcoord 1)
|
||||
varying vec2 texcoord0, texcoord1;
|
||||
out vec2 texcoord0, texcoord1;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -53,8 +53,8 @@ ambientobscurancevariantshader = [
|
|||
#define depthtc texcoord0
|
||||
])
|
||||
uniform vec3 gdepthpackparams;
|
||||
varying vec2 texcoord0, texcoord1;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0, texcoord1;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(if (&& $derivnormal [= $aodepthformat 1]) [result [
|
||||
|
@ -90,7 +90,7 @@ ambientobscurancevariantshader = [
|
|||
normal *= normscale > 0.75 ? normscale : 0.0;
|
||||
normal = normalmatrix * normal;
|
||||
]])
|
||||
vec2 noise = texture2D(tex2, texcoord1).rg*2.0-1.0;
|
||||
vec2 noise = texture(tex2, texcoord1).rg*2.0-1.0;
|
||||
float obscure = 0.0;
|
||||
@(loopconcat i $maxaotaps [result [
|
||||
vec2 offset@[i] = reflect(vec2(@(at $aotapoffsets $i)), noise);
|
||||
|
@ -127,9 +127,9 @@ ambientobscuranceshader = [
|
|||
]
|
||||
|
||||
shader 0 "linearizedepth" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -138,8 +138,8 @@ shader 0 "linearizedepth" [
|
|||
] [
|
||||
@(gfetchdefs tex0 $msaasamples)
|
||||
uniform vec3 gdepthpackparams;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(if (! $aodepthformat) [
|
||||
|
@ -165,14 +165,14 @@ bilateralvariantshader = [
|
|||
reduced = $arg4
|
||||
filterdir = $arg5
|
||||
shader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(if $reduced [result [
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
]])
|
||||
@(if $upscaled [result [
|
||||
@(screentexcoord 1)
|
||||
varying vec2 texcoord1;
|
||||
out vec2 texcoord1;
|
||||
]])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -185,27 +185,27 @@ bilateralvariantshader = [
|
|||
uniform sampler2DRect tex0;
|
||||
uniform vec2 bilateralparams;
|
||||
uniform vec3 gdepthpackparams;
|
||||
@(? $reduced [varying vec2 texcoord0;])
|
||||
@(? $upscaled [varying vec2 texcoord1;])
|
||||
fragdata(0) vec4 fragcolor;
|
||||
@(? $reduced [in vec2 texcoord0;])
|
||||
@(? $upscaled [in vec2 texcoord1;])
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
#define tc @(? $upscaled [texcoord1] [gl_FragCoord.xy])
|
||||
#define depthtc @(? $reduced [texcoord0] [gl_FragCoord.xy])
|
||||
#define tapvec(type, i) @(? (=s $filterdir "x") [type(i, 0.0)] [type(0.0, i)])
|
||||
#define texval(i) texture2DRect(tex0, tc + tapvec(vec2, i))
|
||||
#define texvaloffset(i) texture2DRectOffset(tex0, tc, tapvec(ivec2, i))
|
||||
#define texval(i) textureRect(tex0, tc + tapvec(vec2, i))
|
||||
#define texvaloffset(i) textureRectOffset(tex0, tc, tapvec(ivec2, i))
|
||||
#define depthval(i) gfetch(tex1, depthtc + tapvec(vec2, i))
|
||||
#define depthvaloffset(i) gfetchoffset(tex1, depthtc, tapvec(ivec2, i))
|
||||
@(cond [$packed] [
|
||||
if $aodepthformat [result [
|
||||
vec2 vals = texture2DRect(tex0, tc).rg;
|
||||
vec2 vals = textureRect(tex0, tc).rg;
|
||||
#define color vals.x
|
||||
@(if $upscaled [gdepthunpack depth [gfetch(tex1, depthtc)]] [result [
|
||||
#define depth vals.y
|
||||
]])
|
||||
]] [result [
|
||||
vec4 vals = texture2DRect(tex0, tc);
|
||||
vec4 vals = textureRect(tex0, tc);
|
||||
#define color vals.a
|
||||
@(if $upscaled [gdepthunpack depth [gfetch(tex1, depthtc)]] [result [
|
||||
float depth = dot(vals.rgb, gdepthunpackparams);
|
||||
|
@ -219,7 +219,7 @@ bilateralvariantshader = [
|
|||
float depth = dot(gfetch(tex1, depthtc).rgb, gdepthunpackparams);
|
||||
]])
|
||||
]] [result [
|
||||
float color = texture2DRect(tex0, tc).r;
|
||||
float color = textureRect(tex0, tc).r;
|
||||
@(gdepthunpack depth [gfetch(tex1, depthtc)])
|
||||
]])
|
||||
float weights = 1.0;
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
|
||||
blurshader = [
|
||||
shader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
uniform float offsets[8];
|
||||
varying vec2 texcoord0, texcoordp1, texcoordn1;
|
||||
out vec2 texcoord0, texcoordp1, texcoordn1;
|
||||
@(loopconcat+ i 2 (min (- $arg2 1) 2) [result [
|
||||
varying vec2 texcoordp@i, texcoordn@i;
|
||||
out vec2 texcoordp@i, texcoordn@i;
|
||||
]])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -33,11 +33,11 @@ blurshader = [
|
|||
uniform float weights[8];
|
||||
uniform float offsets[8];
|
||||
uniform sampler@[arg4] tex0;
|
||||
varying vec2 texcoord0, texcoordp1, texcoordn1;
|
||||
in vec2 texcoord0, texcoordp1, texcoordn1;
|
||||
@(loopconcat+ i 2 (min (- $arg2 1) 2) [result [
|
||||
varying vec2 texcoordp@i, texcoordn@i;
|
||||
in vec2 texcoordp@i, texcoordn@i;
|
||||
]])
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
#define texval(coords) texture@[arg4](tex0, (coords))
|
||||
|
|
|
@ -51,22 +51,22 @@ decalvariantshader = [
|
|||
defuniformparam "bumpblend" 1 // alpha-blend strength for normals
|
||||
]
|
||||
variantshader $stype $arg1 $srow [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(? (dtopt "n") [
|
||||
attribute vec4 vtangent;
|
||||
varying mat3 world;
|
||||
in vec4 vtangent;
|
||||
out mat3 world;
|
||||
] [
|
||||
varying vec3 nvec;
|
||||
out vec3 nvec;
|
||||
])
|
||||
attribute vec4 vnormal;
|
||||
attribute vec3 vtexcoord0;
|
||||
in vec4 vnormal;
|
||||
in vec3 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
varying vec4 texcoord0;
|
||||
out vec4 texcoord0;
|
||||
@(? (|| (dtopt "p") (dtopt "r")) [
|
||||
uniform vec3 camera;
|
||||
varying vec3 camvec;
|
||||
out vec3 camvec;
|
||||
])
|
||||
@(? (dtopt "G") [uniform float millis; flat varying float pulse;])
|
||||
@(? (dtopt "G") [uniform float millis; flat out float pulse;])
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -91,38 +91,37 @@ decalvariantshader = [
|
|||
}
|
||||
] [
|
||||
@(cond [dtopt "0"] [result [
|
||||
fragdata(0) vec4 gcolor;
|
||||
fragblend(0) vec4 gcolorblend;
|
||||
layout(location = 0) out vec4 gcolor;
|
||||
layout(location = 0, index = 1) out vec4 gcolorblend;
|
||||
]] [dtopt "1"] [
|
||||
? $usepacknorm [
|
||||
fragdata(0) vec4 gnormal;
|
||||
layout(location = 0) out vec4 gnormal;
|
||||
] [
|
||||
fragdata(0) vec4 gnormal;
|
||||
fragblend(0) vec4 gnormalblend;
|
||||
layout(location = 0) out vec4 gnormal;
|
||||
layout(location = 0, index = 1) out vec4 gnormalblend;
|
||||
]
|
||||
] [result [
|
||||
fragdata(0) vec4 gcolor;
|
||||
fragdata(1) vec4 gnormal;
|
||||
layout(location = 0) out vec4 gcolor;
|
||||
layout(location = 1) out vec4 gnormal;
|
||||
]])
|
||||
uniform sampler2D diffusemap;
|
||||
uniform vec4 colorparams;
|
||||
varying vec4 texcoord0;
|
||||
in vec4 texcoord0;
|
||||
@(? (dtopt "n") [
|
||||
uniform sampler2D normalmap;
|
||||
varying mat3 world;
|
||||
in mat3 world;
|
||||
] [
|
||||
varying vec3 nvec;
|
||||
#define bumpblend vec4(1.0)
|
||||
in vec3 nvec;
|
||||
])
|
||||
@(? (|| (dtopt "p") (dtopt "r")) [varying vec3 camvec;])
|
||||
@(? (|| (dtopt "p") (dtopt "r")) [in vec3 camvec;])
|
||||
@(? (|| (dtopt "g") (dtopt "S")) [uniform sampler2D glowmap;])
|
||||
@(? (dtopt "G") [flat varying float pulse;])
|
||||
@(? (dtopt "G") [flat in float pulse;])
|
||||
@(? (dtopt "r") [uniform samplerCube envmap;])
|
||||
void main(void)
|
||||
{
|
||||
@(if (dtopt "n") [result [
|
||||
@(? (dtopt "p") [
|
||||
float height = texture2D(normalmap, texcoord0.xy).a;
|
||||
float height = texture(normalmap, texcoord0.xy).a;
|
||||
vec3 camvecn = normalize(camvec);
|
||||
vec2 dtc = texcoord0.xy + (camvecn * world).xy*(height*parallaxscale.x + parallaxscale.y);
|
||||
] [
|
||||
|
@ -130,7 +129,7 @@ decalvariantshader = [
|
|||
])
|
||||
|
||||
@(? (|| (! (dtopt "0")) (dtopt "r")) [
|
||||
vec3 bump = texture2D(normalmap, dtc).rgb*2.0 - 1.0;
|
||||
vec3 bump = texture(normalmap, dtc).rgb*2.0 - 1.0;
|
||||
vec3 bumpw = world * bump;
|
||||
#define nvec bumpw
|
||||
])
|
||||
|
@ -138,10 +137,10 @@ decalvariantshader = [
|
|||
#define dtc texcoord0.xy
|
||||
]])
|
||||
|
||||
vec4 diffuse = texture2D(diffusemap, dtc);
|
||||
vec4 diffuse = texture(diffusemap, dtc);
|
||||
|
||||
@(if (dtopt "g") [result [
|
||||
vec4 glowspec = texture2D(glowmap, dtc);
|
||||
vec4 glowspec = texture(glowmap, dtc);
|
||||
#define glow glowspec.rgb
|
||||
#define spec glowspec.a
|
||||
glow *= @(? (dtopt "G") [mix(glowcolor.xyz, pulseglowcolor.xyz, pulse)] [glowcolor.xyz]);
|
||||
|
@ -150,7 +149,7 @@ decalvariantshader = [
|
|||
|
||||
@(if (dtopt "0") [result [
|
||||
@(if (&& (dtopt "S") [! (dtopt "g")]) [result [
|
||||
float spec = @(? (|| (! (dtopt "n")) (dtopt "p")) [texture2D(glowmap, dtc).r] [texture2D(normalmap, dtc).a]);
|
||||
float spec = @(? (|| (! (dtopt "n")) (dtopt "p")) [texture(glowmap, dtc).r] [texture(normalmap, dtc).a]);
|
||||
]])
|
||||
@(gspecpack [gloss.x] (if (dtopt "s") [? (dtopt "S") [spec * specscale.x] [specscale.x]]))
|
||||
]])
|
||||
|
@ -168,7 +167,7 @@ decalvariantshader = [
|
|||
])
|
||||
float invfresnel = dot(camvecn, nvec);
|
||||
vec3 rvec = 2.0*nvec*invfresnel - camvecn;
|
||||
vec3 reflect = textureCube(envmap, rvec).rgb * diffuse.a;
|
||||
vec3 reflect = texture(envmap, rvec).rgb * diffuse.a;
|
||||
@(? (dtopt "R") [
|
||||
vec3 rmod = envscale.xyz*spec;
|
||||
] [
|
||||
|
|
|
@ -36,7 +36,7 @@ msaadetectedges = [
|
|||
]
|
||||
|
||||
lazyshader 0 msaaedgedetect [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -55,9 +55,7 @@ lazyshader 0 msaaedgedetect [
|
|||
|
||||
// deferredlighttype:
|
||||
// p -> point-light shadow (default cubemap)
|
||||
// P -> point-light color shadow
|
||||
// c -> CSM
|
||||
// C -> color CSM
|
||||
// a -> AO
|
||||
// A -> AO sun
|
||||
// r -> radiance hints
|
||||
|
@ -66,7 +64,6 @@ lazyshader 0 msaaedgedetect [
|
|||
// E -> 5x5 weighted bilinear filter
|
||||
// F -> 3x3 weighted bilinear filter
|
||||
// f -> 4x rotated grid filter
|
||||
// N -> no filtering
|
||||
// m -> minimap
|
||||
// M -> multisampled
|
||||
// O -> sample 1
|
||||
|
@ -119,21 +116,16 @@ deferredlightvariantshader = [
|
|||
numlights = (+ $arg6 0)
|
||||
baselight = (< (mod $arg2 4) 2)
|
||||
spotlight = (>= (mod $arg2 8) 4)
|
||||
transparent = (<= 8 $arg2 15)
|
||||
avatar = (<= 24 $arg2 31)
|
||||
local colorshadow
|
||||
colorshadow = (|| (? (<= 16 $arg2 23) 2) [&& (dlopt "C") [! $transparent] [! $avatar]])
|
||||
transparent = (<= 8 $arg2 16)
|
||||
avatar = (<= 17 $arg2 31)
|
||||
variantshader 0 $arg1 $arg2 (? (< $arg2 0) [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 lightmatrix;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = lightmatrix * vvertex;
|
||||
}
|
||||
]) [
|
||||
@(? (&& (dlopt "S") [< $glslversion 400]) [
|
||||
#extension GL_ARB_sample_shading : enable
|
||||
])
|
||||
@(? (&& (dlopt "T") [glext "GL_EXT_shader_samples_identical"]) [
|
||||
#extension GL_EXT_shader_samples_identical : enable
|
||||
])
|
||||
|
@ -178,22 +170,6 @@ deferredlightvariantshader = [
|
|||
uniform sampler3D tex6, tex7, tex8, tex9;
|
||||
]])
|
||||
]])
|
||||
@(? $colorshadow [
|
||||
uniform sampler2DRect tex10;
|
||||
#define sunshadowtype vec3
|
||||
#define filtersunshadow(tc) (filtershadow(tc) * filtercolorshadow(tex10, tc))
|
||||
] [
|
||||
#define sunshadowtype float
|
||||
#define filtersunshadow filtershadow
|
||||
])
|
||||
@(? (> $colorshadow 1) [
|
||||
uniform sampler2DRect tex11;
|
||||
#define lightshadowtype vec3
|
||||
#define filterlightshadow(tc) (filtershadow(tc) * filtercolorshadow(tex11, tc))
|
||||
] [
|
||||
#define lightshadowtype float
|
||||
#define filterlightshadow filtershadow
|
||||
])
|
||||
uniform vec3 camera;
|
||||
uniform mat4 worldmatrix;
|
||||
uniform vec4 fogdir;
|
||||
|
@ -204,7 +180,7 @@ deferredlightvariantshader = [
|
|||
uniform vec4 lightscale;
|
||||
@(? (&& (dlopt "a") [! $avatar] [! $transparent]) [uniform sampler2DRect tex5; uniform vec2 aoscale; uniform vec4 aoparams;])
|
||||
@(gdepthunpackparams)
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
@(if (dlopt "p") [
|
||||
? $spotlight [
|
||||
|
@ -228,19 +204,104 @@ deferredlightvariantshader = [
|
|||
])
|
||||
|
||||
@(if (|| (dlopt "p") [dlopt "c"]) [
|
||||
cond [dlopt "G"] [
|
||||
smfilterg5 $colorshadow
|
||||
] [dlopt "g"] [
|
||||
smfilterg3 $colorshadow
|
||||
] [dlopt "E"] [
|
||||
smfilterb5 $colorshadow
|
||||
] [dlopt "F"] [
|
||||
smfilterb3 $colorshadow
|
||||
] [dlopt "f"] [
|
||||
smfilterrg $colorshadow
|
||||
] [
|
||||
smfilternone $colorshadow
|
||||
]
|
||||
cond [dlopt "G"] [result [
|
||||
@(? (> $usetexgather 1) [
|
||||
#define shadowgather(center, xoff, yoff) textureGatherOffset(tex4, center, shadowtc.z, ivec2(xoff, yoff))
|
||||
] [
|
||||
#define shadowgather(center, xoff, yoff) step(shadowtc.z, textureGatherOffset(tex4, center, ivec2(xoff, yoff)))
|
||||
])
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5), center = (shadowtc.xy - offset)*shadowatlasscale;
|
||||
vec4 group1 = shadowgather(center, -2, -2);
|
||||
vec4 group2 = shadowgather(center, 0, -2);
|
||||
vec4 group3 = shadowgather(center, 2, -2);
|
||||
vec4 group4 = shadowgather(center, -2, 0);
|
||||
vec4 group5 = shadowgather(center, 0, 0);
|
||||
vec4 group6 = shadowgather(center, 2, 0);
|
||||
vec4 group7 = shadowgather(center, -2, 2);
|
||||
vec4 group8 = shadowgather(center, 0, 2);
|
||||
vec4 group9 = shadowgather(center, 2, 2);
|
||||
vec4 locols = vec4(group1.ab, group3.ab);
|
||||
vec4 hicols = vec4(group7.rg, group9.rg);
|
||||
locols.yz += group2.ab;
|
||||
hicols.yz += group8.rg;
|
||||
vec4 midcols = vec4(group1.rg, group3.rg) + vec4(group7.ab, group9.ab) +
|
||||
vec4(group4.rg, group6.rg) + vec4(group4.ab, group6.ab) +
|
||||
mix(locols, hicols, offset.y);
|
||||
vec4 cols = group5 + vec4(group2.rg, group8.ab);
|
||||
cols.xyz += mix(midcols.xyz, midcols.yzw, offset.x);
|
||||
return dot(cols, vec4(1.0/25.0));
|
||||
}
|
||||
]] [dlopt "g"] [result [
|
||||
@(? (> $usetexgather 1) [
|
||||
#define shadowgather(center, xoff, yoff) textureGatherOffset(tex4, center, shadowtc.z, ivec2(xoff, yoff))
|
||||
] [
|
||||
#define shadowgather(center, xoff, yoff) step(shadowtc.z, textureGatherOffset(tex4, center, ivec2(xoff, yoff)))
|
||||
])
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5), center = (shadowtc.xy - offset)*shadowatlasscale;
|
||||
vec4 group1 = shadowgather(center, -1, -1);
|
||||
vec4 group2 = shadowgather(center, 1, -1);
|
||||
vec4 group3 = shadowgather(center, -1, 1);
|
||||
vec4 group4 = shadowgather(center, 1, 1);
|
||||
vec4 cols = vec4(group1.rg, group2.rg) + vec4(group3.ab, group4.ab) + mix(vec4(group1.ab, group2.ab), vec4(group3.rg, group4.rg), offset.y);
|
||||
return dot(mix(cols.xyz, cols.yzw, offset.x), vec3(1.0/9.0));
|
||||
}
|
||||
]] [dlopt "E"] [result [
|
||||
#define shadowval(xy, xoff, yoff) float(textureRect(tex4, vec3(xy + vec2(xoff, yoff), shadowtc.z)))
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5);
|
||||
vec4 center = vec4(shadowtc.xy - offset + 0.5, shadowtc.xy - offset*0.5);
|
||||
vec4 size = vec4(offset + 1.0, 2.0 - offset);
|
||||
return (1.0/25.0)*dot(size.zxzx*size.wwyy,
|
||||
vec4(shadowval(center.zw, -1.5, -1.5),
|
||||
shadowval(center.zw, 2.0, -1.5),
|
||||
shadowval(center.zw, -1.5, 2.0),
|
||||
shadowval(center.zw, 2.0, 2.0))) +
|
||||
(2.0/25.0)*dot(size,
|
||||
vec4(shadowval(center.zy, 2.0, 0.0),
|
||||
shadowval(center.xw, 0.0, 2.0),
|
||||
shadowval(center.zy, -1.5, 0.0),
|
||||
shadowval(center.xw, 0.0, -1.5))) +
|
||||
(4.0/25.0)*shadowval(center.xy, 0.0, 0.0);
|
||||
}
|
||||
]] [dlopt "F"] [result [
|
||||
#define shadowval(center, xoff, yoff) float(textureRect(tex4, center + vec3(xoff, yoff, 0.0)))
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5);
|
||||
vec3 center = shadowtc;
|
||||
//center.xy -= offset;
|
||||
//vec4 size = vec4(offset + 1.0, 2.0 - offset), weight = vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0);
|
||||
//return (1.0/9.0)*dot(size.zxzx*size.wwyy,
|
||||
// vec4(shadowval(center, weight.zw),
|
||||
// shadowval(center, weight.xw),
|
||||
// shadowval(center, weight.zy),
|
||||
// shadowval(center, weight.xy)));
|
||||
center.xy -= offset*0.5;
|
||||
vec4 size = vec4(offset + 1.0, 2.0 - offset);
|
||||
return (1.0/9.0)*dot(size.zxzx*size.wwyy,
|
||||
vec4(shadowval(center, -0.5, -0.5),
|
||||
shadowval(center, 1.0, -0.5),
|
||||
shadowval(center, -0.5, 1.0),
|
||||
shadowval(center, 1.0, 1.0)));
|
||||
}
|
||||
]] [dlopt "f"] [result [
|
||||
#define shadowval(center, xoff, yoff) float(textureRect(tex4, center + vec3(xoff, yoff, 0.0)))
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
return dot(vec4(0.25),
|
||||
vec4(shadowval(shadowtc, -0.4, 1.0),
|
||||
shadowval(shadowtc, -1.0, -0.4),
|
||||
shadowval(shadowtc, 0.4, -1.0),
|
||||
shadowval(shadowtc, 1.0, 0.4)));
|
||||
}
|
||||
]] [result [
|
||||
#define filtershadow(shadowtc) float(textureRect(tex4, shadowtc))
|
||||
]]
|
||||
])
|
||||
|
||||
@(if (dlopt "c") [result [
|
||||
|
@ -281,7 +342,7 @@ deferredlightvariantshader = [
|
|||
]])
|
||||
tc.xy += 0.5;
|
||||
tc.z = tc.z * @(divf 1 $numrh) + offset;
|
||||
vec4 shr = texture3D(tex6, tc), shg = texture3D(tex7, tc), shb = texture3D(tex8, tc), sha = texture3D(tex9, tc);
|
||||
vec4 shr = texture(tex6, tc), shg = texture(tex7, tc), shb = texture(tex8, tc), sha = texture(tex9, tc);
|
||||
shr.rgb -= 0.5;
|
||||
shg.rgb -= 0.5;
|
||||
shb.rgb -= 0.5;
|
||||
|
@ -308,7 +369,7 @@ deferredlightvariantshader = [
|
|||
#define accumalpha(alpha) resolved.a += alpha
|
||||
|
||||
@(if (&& [dlopt "a"] [! $avatar] [! $transparent]) [result [
|
||||
float ao = texture2DRect(tex5, gl_FragCoord.xy*aoscale).r;
|
||||
float ao = textureRect(tex5, gl_FragCoord.xy*aoscale).r;
|
||||
]])
|
||||
|
||||
for(int sampleidx = 0; sampleidx < @msaasamples; sampleidx++)
|
||||
|
@ -322,7 +383,7 @@ deferredlightvariantshader = [
|
|||
#define accumalpha(alpha) fragcolor.a = alpha
|
||||
]]
|
||||
] [result [
|
||||
#define gfetch(sampler, coords) texture2DRect(sampler, coords)
|
||||
#define gfetch(sampler, coords) textureRect(sampler, coords)
|
||||
|
||||
#define accumlight(light) fragcolor.rgb = light
|
||||
#define accumalpha(alpha) fragcolor.a = alpha
|
||||
|
@ -405,7 +466,7 @@ deferredlightvariantshader = [
|
|||
|
||||
@(if (&& (dlopt "a") [! $avatar] [! $transparent]) [result [
|
||||
@(? (! (&& (dlopt "M") [dlopt "R"])) [
|
||||
float ao = texture2DRect(tex5, gl_FragCoord.xy*aoscale).r;
|
||||
float ao = textureRect(tex5, gl_FragCoord.xy*aoscale).r;
|
||||
])
|
||||
@(if (dlopt "d") [result [
|
||||
#define aomask ao
|
||||
|
@ -431,7 +492,7 @@ deferredlightvariantshader = [
|
|||
{
|
||||
@(if (= (+ (? (dlopt "p") $numlights) (dlopt "c")) 1) [unpackdistbias])
|
||||
vec3 csmtc = getcsmtc(pos.xyz, distbias);
|
||||
sunshadowtype sunoccluded = filtersunshadow(csmtc);
|
||||
float sunoccluded = filtershadow(csmtc);
|
||||
@(if (dlopt "m") [result [
|
||||
light += diffuse.rgb*sunfacing * sunlightcolor * sunoccluded;
|
||||
]] [result [
|
||||
|
@ -491,16 +552,14 @@ deferredlightvariantshader = [
|
|||
@(if $spotlight [
|
||||
if (dlopt "p") [result [
|
||||
vec3 spot@[j]tc = getspottc(light@[j]dir, spot@[j]dist, spotparams[@@j], shadowparams[@@j], shadowoffset[@@j], distbias * lightpos[@@j].w);
|
||||
lightshadowtype light@[j]shadow = light@[j]atten * spot@[j]atten * filterlightshadow(spot@[j]tc);
|
||||
light@[j]atten *= spot@[j]atten * filtershadow(spot@[j]tc);
|
||||
]] [result [
|
||||
float light@[j]shadow = light@[j]atten * spot@[j]atten;
|
||||
light@[j]atten *= spot@[j]atten;
|
||||
]]
|
||||
] [
|
||||
if (dlopt "p") [result [
|
||||
vec3 shadow@[j]tc = getshadowtc(light@[j]dir, shadowparams[@@j], shadowoffset[@@j], distbias * lightpos[@@j].w);
|
||||
lightshadowtype light@[j]shadow = light@[j]atten * filterlightshadow(shadow@[j]tc);
|
||||
]] [result [
|
||||
#define light@[j]shadow light@[j]atten
|
||||
light@[j]atten *= filtershadow(shadow@[j]tc);
|
||||
]]
|
||||
])
|
||||
@(if (= (+ $numlights $baselight) 1) [result [
|
||||
|
@ -512,14 +571,14 @@ deferredlightvariantshader = [
|
|||
]])
|
||||
light@[j]facing *= light@[j]invdist;
|
||||
@(if (dlopt "m") [result [
|
||||
light += diffuse.rgb*light@[j]facing * lightcolor[@@j].rgb * light@[j]shadow;
|
||||
light += diffuse.rgb*light@[j]facing * lightcolor[@@j].rgb * light@[j]atten;
|
||||
]] [result [
|
||||
@(if (= (+ $numlights (dlopt "c")) 1) [unpackspec])
|
||||
float light@[j]spec = pow(clamp(light@[j]facing*facing - light@[j]invdist*dot(camdir, light@[j]dir), 0.0, 1.0), gloss) * specscale;
|
||||
@(if (dlopt "z") [result [
|
||||
light@[j]spec *= lightcolor[@@j].a;
|
||||
]])
|
||||
light += (diffuse.rgb*light@[j]facing + light@[j]spec) * lightcolor[@@j].rgb * light@[j]shadow;
|
||||
light += (diffuse.rgb*light@[j]facing + light@[j]spec) * lightcolor[@@j].rgb * light@[j]atten;
|
||||
@(? (= (+ $numlights $baselight) 1) [
|
||||
float foglerp = clamp(exp2(fogcoord*fogdensity.x)*fogdensity.y, 0.0, 1.0);
|
||||
light *= foglerp;
|
||||
|
@ -567,14 +626,12 @@ deferredlightshader = [
|
|||
maxvariants = $basevariants
|
||||
if (dlopt "t") [maxvariants = (+ $maxvariants $basevariants 1)]
|
||||
if (dlopt "d") [maxvariants = (+ $maxvariants $basevariants 1)]
|
||||
if (dlopt "P") [maxvariants = (+ $maxvariants (* (max $arg6 1) (? (dlopt "s") 2 1)))]
|
||||
deferredlightvariantshader $shadername -1 $arg1 $arg4 $arg5 0 $maxvariants // null base shader
|
||||
deferredlightvariantshader $shadername 0 (concatword $arg1 $arg3) $arg4 $arg5 0 $maxvariants // row 0, base shader, sunlight
|
||||
deferredlightvariantshader $shadername -1 (concatword $arg1 $arg3) $arg4 $arg5 0 $maxvariants // base shader, no points lights, sunlight
|
||||
if (dlopt "t") [
|
||||
deferredlightvariantshader $shadername 8 (concatword $arg1 $arg3) $arg4 $arg5 0 $maxvariants // row 8, transparency, base shader, sunlight
|
||||
deferredlightvariantshader $shadername 16 (concatword $arg1 $arg3) $arg4 $arg5 0 $maxvariants // row 16, trasparency, base shader, no points lights, sunlight
|
||||
]
|
||||
if (dlopt "d") [
|
||||
deferredlightvariantshader $shadername 24 (concatword $arg1 $arg3) $arg4 $arg5 0 $maxvariants // row 24, avatar, base shader, sunlight
|
||||
deferredlightvariantshader $shadername 17 (concatword $arg1 $arg3) $arg4 $arg5 0 $maxvariants // row 17, avatar, base shader, no points lights, sunlight
|
||||
]
|
||||
loop+ i 1 (max $arg6 1) [
|
||||
if (dlopt "b") [
|
||||
|
@ -607,18 +664,6 @@ deferredlightshader = [
|
|||
deferredlightvariantshader $shadername 15 (concatword $arg1 $arg2) $arg4 $arg5 $i $maxvariants // row 15, transparent, shadowed spot lights
|
||||
]
|
||||
]
|
||||
if (dlopt "P") [
|
||||
if (dlopt "b") [
|
||||
deferredlightvariantshader $shadername 17 (concatword $arg1 $arg2 $arg3) $arg4 $arg5 $i $maxvariants // row 17, color shadow, shadowed point lights, sunlight
|
||||
]
|
||||
deferredlightvariantshader $shadername 19 (concatword $arg1 $arg2) $arg4 $arg5 $i $maxvariants // row 19, color shadow, shadowed point lights
|
||||
if (dlopt "s") [
|
||||
if (dlopt "b") [
|
||||
deferredlightvariantshader $shadername 21 (concatword $arg1 $arg2 $arg3) $arg4 $arg5 $i $maxvariants // row 21, color shadow, shadowed spot lights, sunlight
|
||||
]
|
||||
deferredlightvariantshader $shadername 23 (concatword $arg1 $arg2) $arg4 $arg5 $i $maxvariants // row 23, color shadow, shadowed spot lights
|
||||
]
|
||||
]
|
||||
if (dlopt "d") [
|
||||
if (dlopt "b") [
|
||||
deferredlightvariantshader $shadername 24 (concatword $arg1 $arg3) $arg4 $arg5 $i $maxvariants // row 24, avatar, point lights, sunlight
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
shader 0 "blendbrush" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec4 texgenS, texgenT;
|
||||
uniform float ldrscale;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 color;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -19,22 +19,22 @@ shader 0 "blendbrush" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = texture2D(tex0, texcoord0).r * color;
|
||||
fragcolor = texture(tex0, texcoord0).r * color;
|
||||
}
|
||||
]
|
||||
|
||||
lazyshader 0 "prefab" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec3 vnormal;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec3 vnormal;
|
||||
uniform mat4 prefabmatrix;
|
||||
uniform mat3 prefabworld;
|
||||
varying vec3 nvec;
|
||||
varying vec4 color;
|
||||
out vec3 nvec;
|
||||
out vec4 color;
|
||||
@(msaainterpvert)
|
||||
|
||||
void main(void)
|
||||
|
@ -45,8 +45,8 @@ lazyshader 0 "prefab" [
|
|||
@(msaapackvert)
|
||||
}
|
||||
] [
|
||||
varying vec3 nvec;
|
||||
varying vec4 color;
|
||||
in vec3 nvec;
|
||||
in vec4 color;
|
||||
@(msaainterpfrag)
|
||||
|
||||
void main(void)
|
||||
|
|
|
@ -216,9 +216,9 @@ fxaadefs = [
|
|||
]
|
||||
|
||||
shader 0 [fxaa@fxaapreset@fxaaopts] [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -226,17 +226,17 @@ shader 0 [fxaa@fxaapreset@fxaaopts] [
|
|||
}
|
||||
] [
|
||||
@fxaadefs
|
||||
varying vec2 texcoord0;
|
||||
in vec2 texcoord0;
|
||||
uniform sampler2DRect tex0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
#define posM texcoord0
|
||||
vec4 rgbyM = texture2DRect(tex0, posM);
|
||||
float lumaS = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2( 0, 1)));
|
||||
float lumaE = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2( 1, 0)));
|
||||
float lumaN = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2( 0, -1)));
|
||||
float lumaW = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2(-1, 0)));
|
||||
vec4 rgbyM = textureRect(tex0, posM);
|
||||
float lumaS = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2( 0, 1)));
|
||||
float lumaE = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2( 1, 0)));
|
||||
float lumaN = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2( 0, -1)));
|
||||
float lumaW = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2(-1, 0)));
|
||||
#define lumaM FXAA_LUMA(rgbyM)
|
||||
|
||||
float maxSM = max(lumaS, lumaM);
|
||||
|
@ -258,10 +258,10 @@ shader 0 [fxaa@fxaapreset@fxaaopts] [
|
|||
return;
|
||||
}
|
||||
|
||||
float lumaNW = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2(-1, -1)));
|
||||
float lumaSE = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2( 1, 1)));
|
||||
float lumaNE = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2( 1, -1)));
|
||||
float lumaSW = FXAA_LUMA(texture2DRectOffset(tex0, posM, ivec2(-1, 1)));
|
||||
float lumaNW = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2(-1, -1)));
|
||||
float lumaSE = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2( 1, 1)));
|
||||
float lumaNE = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2( 1, -1)));
|
||||
float lumaSW = FXAA_LUMA(textureRectOffset(tex0, posM, ivec2(-1, 1)));
|
||||
|
||||
float lumaNS = lumaN + lumaS;
|
||||
float lumaWE = lumaW + lumaE;
|
||||
|
@ -311,9 +311,9 @@ shader 0 [fxaa@fxaapreset@fxaaopts] [
|
|||
vec2 posN = posB - offNP * FXAA_QUALITY_P0;
|
||||
vec2 posP = posB + offNP * FXAA_QUALITY_P0;
|
||||
float subpixD = ((-2.0)*subpixC) + 3.0;
|
||||
float lumaEndN = FXAA_LUMA(texture2DRect(tex0, posN));
|
||||
float lumaEndN = FXAA_LUMA(textureRect(tex0, posN));
|
||||
float subpixE = subpixC * subpixC;
|
||||
float lumaEndP = FXAA_LUMA(texture2DRect(tex0, posP));
|
||||
float lumaEndP = FXAA_LUMA(textureRect(tex0, posP));
|
||||
|
||||
if(!pairN) lumaNN = lumaSS;
|
||||
float gradientScaled = gradient * 1.0/4.0;
|
||||
|
@ -332,8 +332,8 @@ shader 0 [fxaa@fxaapreset@fxaaopts] [
|
|||
#if (FXAA_QUALITY_PS > @i)
|
||||
if(contN || contP)
|
||||
{
|
||||
if(contN) lumaEndN = FXAA_LUMA(texture2DRect(tex0, posN));
|
||||
if(contP) lumaEndP = FXAA_LUMA(texture2DRect(tex0, posP));
|
||||
if(contN) lumaEndN = FXAA_LUMA(textureRect(tex0, posN));
|
||||
if(contP) lumaEndP = FXAA_LUMA(textureRect(tex0, posP));
|
||||
if(contN) lumaEndN = lumaEndN - lumaNN * 0.5;
|
||||
if(contP) lumaEndP = lumaEndP - lumaNN * 0.5;
|
||||
contN = abs(lumaEndN) < gradientScaled;
|
||||
|
@ -369,7 +369,7 @@ shader 0 [fxaa@fxaapreset@fxaaopts] [
|
|||
if(!horzSpan) posS.x += pixelOffsetSubpix * lengthSign;
|
||||
if( horzSpan) posS.y += pixelOffsetSubpix * lengthSign;
|
||||
|
||||
fragcolor = texture2DRect(tex0, posS);
|
||||
fragcolor = textureRect(tex0, posS);
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
lazyshader 0 "rsmsky" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 rsmmatrix;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = rsmmatrix * vvertex;
|
||||
}
|
||||
] [
|
||||
fragdata(0) vec4 gcolor;
|
||||
fragdata(1) vec4 gnormal;
|
||||
layout(location = 0) out vec4 gcolor;
|
||||
layout(location = 1) out vec4 gnormal;
|
||||
void main(void)
|
||||
{
|
||||
gcolor = vec4(0.0, 0.0, 0.0, 1.0);
|
||||
|
@ -170,11 +170,11 @@ rsmtapoffsets32 = [
|
|||
radiancehintsshader = [
|
||||
numtaps = (cond [> $arg1 20] 32 [> $arg1 12] 20 12)
|
||||
shader 0 [radiancehints@arg1] [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vtexcoord0;
|
||||
in vec4 vvertex;
|
||||
in vec3 vtexcoord0;
|
||||
uniform mat4 rsmtcmatrix;
|
||||
varying vec3 rhcenter;
|
||||
varying vec2 rsmcenter;
|
||||
out vec3 rhcenter;
|
||||
out vec2 rsmcenter;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -187,20 +187,20 @@ radiancehintsshader = [
|
|||
uniform vec2 rsmspread;
|
||||
uniform float rhatten, rhspread, rhaothreshold, rhaoatten, rhaoheight;
|
||||
uniform vec3 rsmdir;
|
||||
varying vec3 rhcenter;
|
||||
varying vec2 rsmcenter;
|
||||
fragdata(0) vec4 rhr;
|
||||
fragdata(1) vec4 rhg;
|
||||
fragdata(2) vec4 rhb;
|
||||
fragdata(3) vec4 rha;
|
||||
in vec3 rhcenter;
|
||||
in vec2 rsmcenter;
|
||||
layout(location = 0) out vec4 rhr;
|
||||
layout(location = 1) out vec4 rhg;
|
||||
layout(location = 2) out vec4 rhb;
|
||||
layout(location = 3) out vec4 rha;
|
||||
|
||||
void calcrhsample(vec3 rhtap, vec2 rsmtap, inout vec4 shr, inout vec4 shg, inout vec4 shb, inout vec4 sha)
|
||||
{
|
||||
vec3 rhpos = rhcenter + rhtap*rhspread;
|
||||
vec2 rsmtc = rsmcenter + rsmtap*rsmspread;
|
||||
float rsmdepth = texture2DRect(tex0, rsmtc).x;
|
||||
vec3 rsmcolor = texture2DRect(tex1, rsmtc).rgb;
|
||||
vec3 rsmnormal = texture2DRect(tex2, rsmtc).xyz*2.0 - 1.0;
|
||||
float rsmdepth = textureRect(tex0, rsmtc).x;
|
||||
vec3 rsmcolor = textureRect(tex1, rsmtc).rgb;
|
||||
vec3 rsmnormal = textureRect(tex2, rsmtc).xyz*2.0 - 1.0;
|
||||
vec3 rsmpos = (rsmworldmatrix * vec4(rsmtc, rsmdepth, 1.0)).xyz;
|
||||
|
||||
vec3 dir = rhpos - rsmpos;
|
||||
|
@ -234,9 +234,9 @@ radiancehintsshader = [
|
|||
]
|
||||
|
||||
lazyshader 0 radiancehintsborder [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vtexcoord0;
|
||||
varying vec3 texcoord0;
|
||||
in vec4 vvertex;
|
||||
in vec3 vtexcoord0;
|
||||
out vec3 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -245,27 +245,27 @@ lazyshader 0 radiancehintsborder [
|
|||
] [
|
||||
uniform sampler3D tex3, tex4, tex5, tex6;
|
||||
uniform vec3 bordercenter, borderrange, borderscale;
|
||||
varying vec3 texcoord0;
|
||||
fragdata(0) vec4 rhr;
|
||||
fragdata(1) vec4 rhg;
|
||||
fragdata(2) vec4 rhb;
|
||||
fragdata(3) vec4 rha;
|
||||
in vec3 texcoord0;
|
||||
layout(location = 0) out vec4 rhr;
|
||||
layout(location = 1) out vec4 rhg;
|
||||
layout(location = 2) out vec4 rhb;
|
||||
layout(location = 3) out vec4 rha;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float outside = clamp(borderscale.z*(abs(texcoord0.z - bordercenter.z) - borderrange.z), 0.0, 1.0);
|
||||
vec3 tc = vec3(texcoord0.xy, clamp(texcoord0.z, bordercenter.z - borderrange.z, bordercenter.z + borderrange.z));
|
||||
rhr = mix(texture3D(tex3, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rhg = mix(texture3D(tex4, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rhb = mix(texture3D(tex5, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rha = mix(texture3D(tex6, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rhr = mix(texture(tex3, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rhg = mix(texture(tex4, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rhb = mix(texture(tex5, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
rha = mix(texture(tex6, tc), vec4(0.5, 0.5, 0.5, 0.0), outside);
|
||||
}
|
||||
]
|
||||
|
||||
lazyshader 0 radiancehintscached [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vtexcoord0;
|
||||
varying vec3 texcoord0;
|
||||
in vec4 vvertex;
|
||||
in vec3 vtexcoord0;
|
||||
out vec3 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -273,23 +273,23 @@ lazyshader 0 radiancehintscached [
|
|||
}
|
||||
] [
|
||||
uniform sampler3D tex7, tex8, tex9, tex10;
|
||||
varying vec3 texcoord0;
|
||||
fragdata(0) vec4 rhr;
|
||||
fragdata(1) vec4 rhg;
|
||||
fragdata(2) vec4 rhb;
|
||||
fragdata(3) vec4 rha;
|
||||
in vec3 texcoord0;
|
||||
layout(location = 0) out vec4 rhr;
|
||||
layout(location = 1) out vec4 rhg;
|
||||
layout(location = 2) out vec4 rhb;
|
||||
layout(location = 3) out vec4 rha;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
rhr = texture3D(tex7, texcoord0);
|
||||
rhg = texture3D(tex8, texcoord0);
|
||||
rhb = texture3D(tex9, texcoord0);
|
||||
rha = texture3D(tex10, texcoord0);
|
||||
rhr = texture(tex7, texcoord0);
|
||||
rhg = texture(tex8, texcoord0);
|
||||
rhb = texture(tex9, texcoord0);
|
||||
rha = texture(tex10, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
lazyshader 0 radiancehintsdisable [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform vec3 rhcenter;
|
||||
uniform float rhbounds;
|
||||
void main(void)
|
||||
|
@ -297,10 +297,10 @@ lazyshader 0 radiancehintsdisable [
|
|||
gl_Position = vec4((vvertex.xy - rhcenter.xy)/rhbounds, vvertex.zw);
|
||||
}
|
||||
] [
|
||||
fragdata(0) vec4 rhr;
|
||||
fragdata(1) vec4 rhg;
|
||||
fragdata(2) vec4 rhb;
|
||||
fragdata(3) vec4 rha;
|
||||
layout(location = 0) out vec4 rhr;
|
||||
layout(location = 1) out vec4 rhg;
|
||||
layout(location = 2) out vec4 rhb;
|
||||
layout(location = 3) out vec4 rha;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
|
|
@ -13,24 +13,18 @@ grassvariantshader = [
|
|||
local grasstype
|
||||
grasstype = $arg2
|
||||
variantshader 0 $arg1 (? (grassopt "b") 0 -1) [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
attribute vec4 vtangent;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec3 camera;
|
||||
uniform vec3 grassmargin;
|
||||
@(ginterpvert)
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
varying vec2 bounds;
|
||||
@(? (grassopt "b") [uniform vec4 blendmapparams; varying vec2 texcoord1;])
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
@(? (grassopt "b") [uniform vec4 blendmapparams; out vec2 texcoord1;])
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
colorscale = vcolor;
|
||||
texcoord0 = vtexcoord0;
|
||||
vec2 camdir = (camera.xy - vvertex.xy) * grassmargin.y;
|
||||
bounds = vec2(dot(camdir, vtangent.xy), dot(camdir, vtangent.zw)) + grassmargin.z;
|
||||
texcoord0 = vtexcoord0;
|
||||
@(? (grassopt "b") [
|
||||
texcoord1 = (vvertex.xy - blendmapparams.xy)*blendmapparams.zw;
|
||||
])
|
||||
|
@ -40,20 +34,16 @@ grassvariantshader = [
|
|||
uniform sampler2D tex0;
|
||||
uniform float grasstest;
|
||||
@(ginterpfrag)
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
varying vec2 bounds;
|
||||
@(? (grassopt "b") [uniform sampler2D tex1; varying vec2 texcoord1;])
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
@(? (grassopt "b") [uniform sampler2D tex1; in vec2 texcoord1;])
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0) * colorscale;
|
||||
color.a *= clamp(min(bounds.x, bounds.y), 0.0, 1.0);
|
||||
vec4 color = texture(tex0, texcoord0) * colorscale;
|
||||
@(? (grassopt "b") [
|
||||
color.a *= texture2D(tex1, texcoord1).r;
|
||||
color.a *= texture(tex1, texcoord1).r;
|
||||
])
|
||||
vec2 coords = fract((gl_FragCoord.xy - 0.5)*0.5);
|
||||
float dither = coords.x + 1.5*coords.y - 4.0*coords.x*coords.y + 0.25;
|
||||
if(color.a <= grasstest * dither)
|
||||
if(color.a <= grasstest)
|
||||
discard;
|
||||
gcolor = vec4(color.rgb, 0.0);
|
||||
@(gnormpack [vec3(0.5, 0.5, 1.0)])
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
///////////////////////////////////////////////////
|
||||
|
||||
shader 0 "hud" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
|
@ -18,22 +18,22 @@ shader 0 "hud" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
fragcolor = colorscale * color;
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hudtext" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
|
@ -43,12 +43,12 @@ shader 0 "hudtext" [
|
|||
] [
|
||||
uniform sampler2D tex0;
|
||||
uniform vec4 textparams;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
float dist = texture2D(tex0, texcoord0).r;
|
||||
float dist = texture(tex0, texcoord0).r;
|
||||
float border = smoothstep(textparams.x, textparams.y, dist);
|
||||
float outline = smoothstep(textparams.z, textparams.w, dist);
|
||||
fragcolor = vec4(colorscale.rgb * outline, colorscale.a * border);
|
||||
|
@ -56,11 +56,11 @@ shader 0 "hudtext" [
|
|||
]
|
||||
|
||||
shader 0 "hudrgb" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
|
@ -69,29 +69,29 @@ shader 0 "hudrgb" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
fragcolor.rgb = colorscale.rgb * color.rgb;
|
||||
fragcolor.a = colorscale.a;
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hudnotexture" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec4 color;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
color = vcolor;
|
||||
}
|
||||
] [
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color;
|
||||
|
@ -99,11 +99,11 @@ shader 0 "hudnotexture" [
|
|||
]
|
||||
|
||||
shader 0 "hudrect" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
|
@ -112,21 +112,21 @@ shader 0 "hudrect" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = colorscale * texture2DRect(tex0, texcoord0);
|
||||
fragcolor = colorscale * textureRect(tex0, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hud3d" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec3 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec3 vtexcoord0;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec3 texcoord0;
|
||||
varying vec4 color;
|
||||
out vec3 texcoord0;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
|
@ -135,21 +135,21 @@ shader 0 "hud3d" [
|
|||
}
|
||||
] [
|
||||
uniform sampler3D tex0;
|
||||
varying vec3 texcoord0;
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec3 texcoord0;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color * texture3D(tex0, texcoord0);
|
||||
fragcolor = color * texture(tex0, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hudcubemap" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec3 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec3 vtexcoord0;
|
||||
uniform mat4 hudmatrix;
|
||||
varying vec3 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec3 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = hudmatrix * vvertex;
|
||||
|
@ -158,12 +158,12 @@ shader 0 "hudcubemap" [
|
|||
}
|
||||
] [
|
||||
uniform samplerCube tex0;
|
||||
varying vec3 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec3 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = colorscale * textureCube(tex0, texcoord0);
|
||||
fragcolor = colorscale * texture(tex0, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
///////////////////////////////////////////////////
|
||||
|
||||
shader 0 "refractmask" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 camprojmatrix;
|
||||
void main(void)
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ shader 0 "refractmask" [
|
|||
] [
|
||||
@(gfetchdefs tex0)
|
||||
uniform vec3 gdepthpackparams;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(if (= $gdepthformat 1) [result [
|
||||
|
@ -28,7 +28,7 @@ shader 0 "refractmask" [
|
|||
]
|
||||
|
||||
lazyshader 0 "waterminimap" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 camprojmatrix;
|
||||
@(ginterpvert)
|
||||
void main(void)
|
||||
|
@ -50,16 +50,15 @@ lazyshader 0 "waterminimap" [
|
|||
|
||||
watershader = [
|
||||
lazyshader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec3 camera;
|
||||
uniform vec2 watertexgen;
|
||||
uniform float millis;
|
||||
varying vec2 texcoord0, texcoord1, texcoord2, texcoord3;
|
||||
varying vec3 surface;
|
||||
out vec2 texcoord0, texcoord1;
|
||||
out vec3 surface;
|
||||
@(? (>= (strstr $arg1 "reflect") 0) [
|
||||
uniform mat4 raymatrix;
|
||||
varying vec3 esurface;
|
||||
out vec3 esurface;
|
||||
])
|
||||
@(ginterpvert 1)
|
||||
void main(void)
|
||||
|
@ -69,21 +68,17 @@ watershader = [
|
|||
@(? (>= (strstr $arg1 "reflect") 0) [
|
||||
esurface = (raymatrix * vvertex).xyz;
|
||||
])
|
||||
|
||||
vec2 tc = vvertex.xy * watertexgen;
|
||||
texcoord0 = tc * 0.18 + millis*vec2( 0.25, 0.75)*0.1250;
|
||||
texcoord1 = tc * 0.18 + millis*vec2(-0.75, -0.25)*0.1450;
|
||||
texcoord2 = tc * 0.08 + millis*vec2(-0.50, 0.50)*0.0805;
|
||||
texcoord3 = tc * 0.08 + millis*vec2( 0.25, -0.75)*0.0825;
|
||||
|
||||
texcoord0 = vtexcoord0 * 0.18;
|
||||
texcoord1 = vtexcoord0 * 0.08;
|
||||
@(gdepthpackvert 1)
|
||||
}
|
||||
] [
|
||||
@(gfetchdefs [tex7 tex8 tex9])
|
||||
uniform float millis;
|
||||
uniform vec3 camera;
|
||||
uniform mat4 linearworldmatrix;
|
||||
varying vec2 texcoord0, texcoord1, texcoord2, texcoord3;
|
||||
varying vec3 surface;
|
||||
in vec2 texcoord0, texcoord1;
|
||||
in vec3 surface;
|
||||
uniform sampler2D tex0, tex1;
|
||||
uniform vec4 viewsize;
|
||||
uniform vec3 watercolor, waterdeepcolor, waterdeepfade;
|
||||
|
@ -100,17 +95,17 @@ watershader = [
|
|||
])
|
||||
@(? (>= (strstr $arg1 "reflect") 0) [
|
||||
uniform mat4 raymatrix;
|
||||
varying vec3 esurface;
|
||||
in vec3 esurface;
|
||||
])
|
||||
@(ginterpfrag 1)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 camdir = camera - surface, camvec = normalize(camdir);
|
||||
vec3 bump = texture2D(tex1, texcoord0).rgb;
|
||||
vec3 bump2 = texture2D(tex1, texcoord1).rgb;
|
||||
vec3 bump3 = texture2D(tex1, texcoord2).rgb;
|
||||
vec3 bump4 = texture2D(tex1, texcoord3).rgb;
|
||||
vec3 bump = texture(tex1, texcoord0 + millis*vec2( 0.25, 0.75)*0.1250).rgb;
|
||||
vec3 bump2 = texture(tex1, texcoord0 + millis*vec2(-0.75, -0.25)*0.1450).rgb;
|
||||
vec3 bump3 = texture(tex1, texcoord1 + millis*vec2(-0.50, 0.50)*0.0805).rgb;
|
||||
vec3 bump4 = texture(tex1, texcoord1 + millis*vec2( 0.25, -0.75)*0.0825).rgb;
|
||||
bump = normalize(bump + bump2 + bump3 + bump4 - 2.0);
|
||||
vec2 rtc = bump.xy * waterrefract.w;
|
||||
|
||||
|
@ -131,7 +126,7 @@ watershader = [
|
|||
|
||||
@(? (>= (strstr $arg1 "caustics") 0) [
|
||||
vec2 ctc = vec2(dot(causticsS, rpos.xyz), dot(causticsT, rpos.xyz));
|
||||
float caustics = causticsblend.x*texture2D(tex2, ctc).r + causticsblend.y*texture2D(tex3, ctc).r + causticsblend.z;
|
||||
float caustics = causticsblend.x*texture(tex2, ctc).r + causticsblend.y*texture(tex3, ctc).r + causticsblend.z;
|
||||
rcolor *= caustics;
|
||||
])
|
||||
|
||||
|
@ -162,7 +157,7 @@ watershader = [
|
|||
float fresnel = 0.25 + 0.75*pow(clamp(1.0 - dot(camvec, bump), 0.0, 1.0), 4.0);
|
||||
rcolor = mix(rcolor, reflect, fresnel*edgefade);
|
||||
]] [if (>= (strstr $arg1 "env") 0) [result [
|
||||
vec3 reflect = textureCube(tex4, reflectdir).rgb*0.5;
|
||||
vec3 reflect = texture(tex4, reflectdir).rgb*0.5;
|
||||
float fresnel = 0.5*pow(clamp(1.0 - dot(camvec, bump), 0.0, 1.0), 4.0);
|
||||
rcolor = mix(rcolor, reflect, fresnel);
|
||||
]]])
|
||||
|
@ -186,7 +181,7 @@ watershader "underwater"
|
|||
|
||||
causticshader = [
|
||||
lazyshader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -197,7 +192,7 @@ causticshader = [
|
|||
uniform vec3 causticsblend;
|
||||
uniform sampler2D tex0, tex1;
|
||||
uniform vec4 waterdeepfade;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(gdepthunpack depth [gfetch(tex9, gl_FragCoord.xy)] [
|
||||
|
@ -206,7 +201,7 @@ causticshader = [
|
|||
vec4 ctc = causticsmatrix * vec4(gl_FragCoord.xy, depth, 1.0);
|
||||
ctc.xyz /= ctc.w;
|
||||
])
|
||||
float caustics = causticsblend.x*texture2D(tex0, ctc.xy).r + causticsblend.y*texture2D(tex1, ctc.xy).r + causticsblend.z;
|
||||
float caustics = causticsblend.x*texture(tex0, ctc.xy).r + causticsblend.y*texture(tex1, ctc.xy).r + causticsblend.z;
|
||||
caustics *= clamp(ctc.z, 0.0, 1.0) * clamp(exp2(ctc.z*waterdeepfade.w), 0.0, 1.0);
|
||||
fragcolor.rgb = vec3(0.5 + caustics);
|
||||
}
|
||||
|
@ -216,7 +211,7 @@ causticshader caustics
|
|||
|
||||
waterfogshader = [
|
||||
lazyshader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -229,7 +224,7 @@ waterfogshader = [
|
|||
uniform vec2 fogdensity;
|
||||
uniform vec3 waterdeepcolor, waterdeepfade;
|
||||
uniform float waterheight;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(gdepthunpack depth [gfetch(tex9, gl_FragCoord.xy)] [
|
||||
|
@ -251,34 +246,33 @@ waterfogshader = [
|
|||
waterfogshader waterfog
|
||||
|
||||
lazyshader 0 "lava" [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
varying mat3 world;
|
||||
uniform vec4 lavatexgen;
|
||||
varying vec2 texcoord0;
|
||||
out mat3 world;
|
||||
out vec2 texcoord0;
|
||||
@(ginterpvert)
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
vec3 tangent = mix(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), abs(vnormal.x));
|
||||
vec3 bitangent = mix(vec3(0.0, 0.0, -1.0), vec3(0.0, 1.0, 0.0), abs(vnormal.z));
|
||||
world = mat3(tangent, bitangent, vnormal);
|
||||
vec2 tc = vec2(dot(vvertex.xy, tangent.xy), dot(vvertex.yz, bitangent.yz));
|
||||
texcoord0 = (tc + lavatexgen.zw) * lavatexgen.xy;
|
||||
@(gdepthpackvert)
|
||||
}
|
||||
] [
|
||||
uniform sampler2D tex0, tex1;
|
||||
uniform float lavaglow, lavaspec;
|
||||
varying mat3 world;
|
||||
varying vec2 texcoord0;
|
||||
in mat3 world;
|
||||
in vec2 texcoord0;
|
||||
@(ginterpfrag)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 diffuse = texture2D(tex0, texcoord0).rgb;
|
||||
vec3 bump = texture2D(tex1, texcoord0).rgb*2.0-1.0;
|
||||
vec3 diffuse = texture(tex0, texcoord0).rgb;
|
||||
vec3 bump = texture(tex1, texcoord0).rgb*2.0-1.0;
|
||||
vec3 bumpw = normalize(world * bump);
|
||||
gcolor.rgb = diffuse;
|
||||
@(gspecpack 0.0 lavaspec)
|
||||
|
@ -289,24 +283,23 @@ lazyshader 0 "lava" [
|
|||
]
|
||||
|
||||
lazyshader 0 "waterfallenv" [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec4 camera;
|
||||
varying vec3 camdir;
|
||||
varying mat3 world;
|
||||
uniform vec4 waterfalltexgen;
|
||||
varying vec2 texcoord0;
|
||||
out vec3 camdir;
|
||||
out mat3 world;
|
||||
out vec2 texcoord0;
|
||||
@(ginterpvert 1)
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
camdir = camera.xyz - vvertex.xyz;
|
||||
vec3 tangent = mix(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), abs(vnormal.x));
|
||||
vec3 bitangent = mix(vec3(0.0, 0.0, -1.0), vec3(0.0, 1.0, 0.0), abs(vnormal.z));
|
||||
world = mat3(tangent, bitangent, vnormal);
|
||||
vec2 tc = vec2(dot(vvertex.xy, tangent.xy), dot(vvertex.yz, bitangent.yz));
|
||||
texcoord0 = (tc + waterfalltexgen.zw) * waterfalltexgen.xy;
|
||||
@(gdepthpackvert 1)
|
||||
}
|
||||
] [
|
||||
|
@ -317,16 +310,16 @@ lazyshader 0 "waterfallenv" [
|
|||
uniform float waterfallspec;
|
||||
uniform vec4 waterfallrefract;
|
||||
uniform float refractdepth;
|
||||
varying vec3 camdir;
|
||||
varying mat3 world;
|
||||
varying vec2 texcoord0;
|
||||
in vec3 camdir;
|
||||
in mat3 world;
|
||||
in vec2 texcoord0;
|
||||
@(ginterpfrag 1)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 camvec = normalize(camdir);
|
||||
vec3 diffuse = texture2D(tex0, texcoord0).rgb;
|
||||
vec3 bump = texture2D(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 diffuse = texture(tex0, texcoord0).rgb;
|
||||
vec3 bump = texture(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 bumpw = normalize(world * bump);
|
||||
|
||||
vec2 rtc = bump.xy * waterfallrefract.w;
|
||||
|
@ -335,7 +328,7 @@ lazyshader 0 "waterfallenv" [
|
|||
vec3 rcolor = gfetch(tex8, rtc).rgb * waterfallrefract.xyz;
|
||||
|
||||
float invfresnel = dot(camvec, bumpw);
|
||||
vec3 env = textureCube(tex3, 2.0*bumpw*invfresnel - camvec).rgb;
|
||||
vec3 env = texture(tex3, 2.0*bumpw*invfresnel - camvec).rgb;
|
||||
env *= 0.1 + 0.4*pow(clamp(1.0 - invfresnel, 0.0, 1.0), 2.0);
|
||||
|
||||
gcolor.rgb = vec3(0.0);
|
||||
|
@ -347,21 +340,20 @@ lazyshader 0 "waterfallenv" [
|
|||
]
|
||||
|
||||
lazyshader 0 "waterfall" [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
varying mat3 world;
|
||||
uniform vec4 waterfalltexgen;
|
||||
varying vec2 texcoord0;
|
||||
out mat3 world;
|
||||
out vec2 texcoord0;
|
||||
@(ginterpvert 1)
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
vec3 tangent = mix(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), abs(vnormal.x));
|
||||
vec3 bitangent = mix(vec3(0.0, 0.0, -1.0), vec3(0.0, 1.0, 0.0), abs(vnormal.z));
|
||||
world = mat3(tangent, bitangent, vnormal);
|
||||
vec2 tc = vec2(dot(vvertex.xy, tangent.xy), dot(vvertex.yz, bitangent.yz));
|
||||
texcoord0 = (tc + waterfalltexgen.zw) * waterfalltexgen.xy;
|
||||
@(gdepthpackvert 1)
|
||||
}
|
||||
] [
|
||||
|
@ -371,14 +363,14 @@ lazyshader 0 "waterfall" [
|
|||
uniform float waterfallspec;
|
||||
uniform vec4 waterfallrefract;
|
||||
uniform float refractdepth;
|
||||
varying mat3 world;
|
||||
varying vec2 texcoord0;
|
||||
in mat3 world;
|
||||
in vec2 texcoord0;
|
||||
@(ginterpfrag 1)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 diffuse = texture2D(tex0, texcoord0).rgb;
|
||||
vec3 bump = texture2D(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 diffuse = texture(tex0, texcoord0).rgb;
|
||||
vec3 bump = texture(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 bumpw = normalize(world * bump);
|
||||
|
||||
vec2 rtc = bump.xy * waterfallrefract.w;
|
||||
|
@ -395,24 +387,23 @@ lazyshader 0 "waterfall" [
|
|||
]
|
||||
|
||||
lazyshader 0 "glassenv" [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec4 camera;
|
||||
varying vec3 camdir;
|
||||
varying mat3 world;
|
||||
uniform vec2 glasstexgen;
|
||||
varying vec2 texcoord0;
|
||||
out vec3 camdir;
|
||||
out mat3 world;
|
||||
out vec2 texcoord0;
|
||||
@(ginterpvert 1)
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
camdir = camera.xyz - vvertex.xyz;
|
||||
vec3 tangent = mix(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), abs(vnormal.x));
|
||||
vec3 bitangent = mix(vec3(0.0, 0.0, -1.0), vec3(0.0, 1.0, 0.0), abs(vnormal.z));
|
||||
world = mat3(tangent, bitangent, vnormal);
|
||||
vec2 tc = vec2(dot(vvertex.xy, tangent.xy), dot(vvertex.yz, bitangent.yz));
|
||||
texcoord0 = tc * glasstexgen;
|
||||
@(gdepthpackvert 1)
|
||||
}
|
||||
] [
|
||||
|
@ -422,15 +413,15 @@ lazyshader 0 "glassenv" [
|
|||
uniform float glassspec;
|
||||
uniform vec4 glassrefract;
|
||||
uniform float refractdepth;
|
||||
varying vec3 camdir;
|
||||
varying mat3 world;
|
||||
varying vec2 texcoord0;
|
||||
in vec3 camdir;
|
||||
in mat3 world;
|
||||
in vec2 texcoord0;
|
||||
@(ginterpfrag 1)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 camvec = normalize(camdir);
|
||||
vec3 bump = texture2D(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 bump = texture(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 bumpw = normalize(world * bump);
|
||||
|
||||
vec2 rtc = bump.xy * glassrefract.w;
|
||||
|
@ -440,7 +431,7 @@ lazyshader 0 "glassenv" [
|
|||
rcolor *= glassrefract.xyz;
|
||||
|
||||
float invfresnel = dot(camvec, bumpw);
|
||||
vec3 env = textureCube(tex0, 2.0*bumpw*invfresnel - camvec).rgb;
|
||||
vec3 env = texture(tex0, 2.0*bumpw*invfresnel - camvec).rgb;
|
||||
env *= 0.1 + 0.4*pow(clamp(1.0 - invfresnel, 0.0, 1.0), 2.0);
|
||||
|
||||
gcolor.rgb = vec3(0.0);
|
||||
|
@ -452,21 +443,20 @@ lazyshader 0 "glassenv" [
|
|||
]
|
||||
|
||||
lazyshader 0 "glass" [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
varying mat3 world;
|
||||
uniform vec2 glasstexgen;
|
||||
varying vec2 texcoord0;
|
||||
out mat3 world;
|
||||
out vec2 texcoord0;
|
||||
@(ginterpvert 1)
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
vec3 tangent = mix(vec3(1.0, 0.0, 0.0), vec3(0.0, 1.0, 0.0), abs(vnormal.x));
|
||||
vec3 bitangent = mix(vec3(0.0, 0.0, -1.0), vec3(0.0, 1.0, 0.0), abs(vnormal.z));
|
||||
world = mat3(tangent, bitangent, vnormal);
|
||||
vec2 tc = vec2(dot(vvertex.xy, tangent.xy), dot(vvertex.yz, bitangent.yz));
|
||||
texcoord0 = tc * glasstexgen;
|
||||
@(gdepthpackvert 1)
|
||||
}
|
||||
] [
|
||||
|
@ -475,13 +465,13 @@ lazyshader 0 "glass" [
|
|||
uniform float glassspec;
|
||||
uniform vec4 glassrefract;
|
||||
uniform float refractdepth;
|
||||
varying mat3 world;
|
||||
varying vec2 texcoord0;
|
||||
in mat3 world;
|
||||
in vec2 texcoord0;
|
||||
@(ginterpfrag 1)
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 bump = texture2D(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 bump = texture(tex1, texcoord0).rgb*2.0 - 1.0;
|
||||
vec3 bumpw = normalize(world * bump);
|
||||
|
||||
vec2 rtc = bump.xy * glassrefract.w;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
shader 0 "null" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
}
|
||||
] [
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = vec4(1.0, 0.0, 1.0, 1.0);
|
||||
|
@ -19,7 +19,7 @@ shader 0 "null" [
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
shader 0 "nocolor" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 camprojmatrix;
|
||||
void main() { gl_Position = camprojmatrix * vvertex; }
|
||||
] [
|
||||
|
@ -27,7 +27,7 @@ shader 0 "nocolor" [
|
|||
]
|
||||
|
||||
shader 0 "bbquery" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec3 bborigin, bbsize;
|
||||
void main() { gl_Position = camprojmatrix * vec4(bborigin + vvertex.xyz*bbsize, vvertex.w); }
|
||||
|
@ -36,9 +36,9 @@ shader 0 "bbquery" [
|
|||
]
|
||||
|
||||
shader 0 "depth" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 camprojmatrix;
|
||||
@(ginterpdepth)
|
||||
@(ginterpdepth out)
|
||||
void main()
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -46,9 +46,9 @@ shader 0 "depth" [
|
|||
}
|
||||
] [
|
||||
@(? $gdepthformat [
|
||||
fragdata(0) vec4 gdepth;
|
||||
layout(location = 0) out vec4 gdepth;
|
||||
])
|
||||
@(ginterpdepth)
|
||||
@(ginterpdepth in)
|
||||
void main()
|
||||
{
|
||||
@(if (= $gdepthformat 1) [result [
|
||||
|
@ -68,12 +68,12 @@ shader 0 "depth" [
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
shader 0 "ldr" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform float ldrscale;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -82,29 +82,29 @@ shader 0 "ldr" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
fragcolor = colorscale * color;
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "ldrnotexture" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform float ldrscale;
|
||||
varying vec4 color;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
color = vec4(ldrscale * vcolor.rgb, vcolor.a);
|
||||
}
|
||||
] [
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color;
|
||||
|
@ -119,11 +119,11 @@ shader 0 "ldrnotexture" [
|
|||
|
||||
shader 0 "fogged" [
|
||||
//:fog
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -132,29 +132,29 @@ shader 0 "fogged" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec2 texcoord0;
|
||||
varying vec4 colorscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
in vec4 colorscale;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
fragcolor = colorscale * color;
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "foggednotexture" [
|
||||
//:fog
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 camprojmatrix;
|
||||
varying vec4 color;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
color = vcolor;
|
||||
}
|
||||
] [
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color;
|
||||
|
@ -162,16 +162,16 @@ shader 0 "foggednotexture" [
|
|||
]
|
||||
|
||||
shader 0 "fogoverlay" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
varying vec4 color;
|
||||
in vec4 vvertex, vcolor;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
color = vcolor;
|
||||
}
|
||||
] [
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color;
|
||||
|
|
|
@ -20,7 +20,7 @@ qtangentdecode = [
|
|||
|
||||
skelanimdefs = [
|
||||
result [
|
||||
attribute vec4 vboneweight, vboneindex;
|
||||
in vec4 vboneweight, vboneindex;
|
||||
//:uniform animdata
|
||||
uniform vec4 animdata[@@(min $maxvsuniforms $maxskelanimdata)];
|
||||
]
|
||||
|
@ -72,13 +72,13 @@ shadowmodelvertexshader = [
|
|||
local modeltype
|
||||
modeltype = $arg1
|
||||
result [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(if (mdlopt "b") [skelanimdefs $arg2])
|
||||
uniform mat4 modelmatrix;
|
||||
@(? (mdlopt "a") [
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec2 vtexcoord0;
|
||||
uniform vec2 texscroll;
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -104,12 +104,12 @@ shadowmodelfragmentshader = [
|
|||
@(? (mdlopt "a") [
|
||||
uniform sampler2D tex0;
|
||||
uniform float alphatest;
|
||||
varying vec2 texcoord0;
|
||||
in vec2 texcoord0;
|
||||
])
|
||||
void main(void)
|
||||
{
|
||||
@(? (mdlopt "a") [
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
if(color.a <= alphatest)
|
||||
discard;
|
||||
])
|
||||
|
@ -139,29 +139,28 @@ shadowmodelshader "alphashadowmodel" "a"
|
|||
// b -> dual-quat skeletal animation
|
||||
// c -> disable cullface
|
||||
// t -> transparent
|
||||
// u -> dither
|
||||
|
||||
modelvertexshader = [
|
||||
local modeltype
|
||||
modeltype = $arg1
|
||||
result [
|
||||
attribute vec4 vvertex, vtangent;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vtangent;
|
||||
in vec2 vtexcoord0;
|
||||
@(if (mdlopt "b") [skelanimdefs $arg2 (mdlopt "n")])
|
||||
uniform mat4 modelmatrix;
|
||||
uniform mat3 modelworld;
|
||||
uniform vec3 modelcamera;
|
||||
uniform vec2 texscroll;
|
||||
@(? (mdlopt "n") [
|
||||
varying mat3 world;
|
||||
out mat3 world;
|
||||
] [
|
||||
varying vec3 nvec;
|
||||
out vec3 nvec;
|
||||
])
|
||||
@(? (mdlopt "e") [
|
||||
varying vec3 camvec;
|
||||
out vec3 camvec;
|
||||
])
|
||||
@(msaainterpvert)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -202,13 +201,13 @@ modelfragmentshader = [
|
|||
modeltype = $arg1
|
||||
result [
|
||||
@(? (mdlopt "n") [
|
||||
varying mat3 world;
|
||||
in mat3 world;
|
||||
] [
|
||||
varying vec3 nvec;
|
||||
in vec3 nvec;
|
||||
])
|
||||
@(? (mdlopt "e") [
|
||||
uniform vec2 envmapscale;
|
||||
varying vec3 camvec;
|
||||
in vec3 camvec;
|
||||
])
|
||||
uniform vec4 colorscale;
|
||||
uniform vec2 fullbright;
|
||||
|
@ -220,29 +219,22 @@ modelfragmentshader = [
|
|||
@(? (mdlopt "n") [uniform sampler2D tex3;])
|
||||
@(? (|| (mdlopt "d") [mdlopt "D"]) [uniform sampler2D tex4;])
|
||||
@(msaainterpfrag)
|
||||
varying vec2 texcoord0;
|
||||
in vec2 texcoord0;
|
||||
uniform float aamask;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 diffuse = texture2D(tex0, texcoord0);
|
||||
vec4 diffuse = texture(tex0, texcoord0);
|
||||
|
||||
@(if (mdlopt "a") [
|
||||
? (mdlopt "u") [
|
||||
vec2 coords = fract((gl_FragCoord.xy - 0.5)*0.5);
|
||||
float dither = coords.x + 1.5*coords.y - 4.0*coords.x*coords.y + 0.25;
|
||||
if(diffuse.a <= alphatest * dither)
|
||||
discard;
|
||||
] [
|
||||
if(diffuse.a <= alphatest)
|
||||
discard;
|
||||
]
|
||||
@(? (mdlopt "a") [
|
||||
if(diffuse.a <= alphatest)
|
||||
discard;
|
||||
])
|
||||
|
||||
gcolor.rgb = diffuse.rgb*colorscale.rgb;
|
||||
|
||||
@(? (|| (mdlopt "d") [mdlopt "D"]) [
|
||||
vec4 decal = texture2D(tex4, texcoord0);
|
||||
vec4 decal = texture(tex4, texcoord0);
|
||||
@(? (mdlopt "D") [
|
||||
gcolor.rgb = mix(gcolor.rgb, decal.rgb, decal.a);
|
||||
] [
|
||||
|
@ -251,7 +243,7 @@ modelfragmentshader = [
|
|||
])
|
||||
|
||||
@(if (mdlopt "n") [result [
|
||||
vec3 normal = texture2D(tex3, texcoord0).rgb - 0.5;
|
||||
vec3 normal = texture(tex3, texcoord0).rgb - 0.5;
|
||||
@(? (mdlopt "c") [
|
||||
if(!gl_FrontFacing) normal.z = -normal.z;
|
||||
])
|
||||
|
@ -265,7 +257,7 @@ modelfragmentshader = [
|
|||
|
||||
float spec = maskscale.x;
|
||||
@(if (mdlopt "m") [result [
|
||||
vec3 masks = texture2D(tex1, texcoord0).rgb;
|
||||
vec3 masks = texture(tex1, texcoord0).rgb;
|
||||
spec *= masks.r; // specmap in red channel
|
||||
|
||||
@(? (mdlopt "e") [
|
||||
|
@ -273,7 +265,7 @@ modelfragmentshader = [
|
|||
float invfresnel = dot(camn, normal);
|
||||
vec3 rvec = 2.0*invfresnel*normal - camn;
|
||||
float rmod = envmapscale.x*clamp(invfresnel, 0.0, 1.0) + envmapscale.y;
|
||||
vec3 reflect = textureCube(tex2, rvec).rgb;
|
||||
vec3 reflect = texture(tex2, rvec).rgb;
|
||||
gcolor.rgb = mix(gcolor.rgb, reflect, rmod*masks.b); // envmap mask in blue channel
|
||||
])
|
||||
|
||||
|
@ -316,14 +308,14 @@ rsmmodelvertexshader = [
|
|||
local modeltype
|
||||
modeltype = $arg1
|
||||
result [
|
||||
attribute vec4 vvertex, vtangent;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vtangent;
|
||||
in vec2 vtexcoord0;
|
||||
@(if (mdlopt "b") [skelanimdefs $arg2 (mdlopt "n")])
|
||||
uniform mat4 modelmatrix;
|
||||
uniform mat3 modelworld;
|
||||
uniform vec2 texscroll;
|
||||
varying vec2 texcoord0;
|
||||
varying vec3 nvec;
|
||||
out vec2 texcoord0;
|
||||
out vec3 nvec;
|
||||
void main(void)
|
||||
{
|
||||
@(if (mdlopt "b") [
|
||||
|
@ -347,17 +339,17 @@ rsmmodelfragmentshader = [
|
|||
local modeltype
|
||||
modeltype = $arg1
|
||||
result [
|
||||
varying vec2 texcoord0;
|
||||
varying vec3 nvec;
|
||||
in vec2 texcoord0;
|
||||
in vec3 nvec;
|
||||
uniform vec4 colorscale;
|
||||
@(? (mdlopt "a") [uniform float alphatest;])
|
||||
uniform vec3 rsmdir;
|
||||
uniform sampler2D tex0;
|
||||
fragdata(0) vec4 gcolor;
|
||||
fragdata(1) vec4 gnormal;
|
||||
layout(location = 0) out vec4 gcolor;
|
||||
layout(location = 1) out vec4 gnormal;
|
||||
void main(void)
|
||||
{
|
||||
vec4 diffuse = texture2D(tex0, texcoord0);
|
||||
vec4 diffuse = texture(tex0, texcoord0);
|
||||
@(? (mdlopt "a") [
|
||||
if(diffuse.a <= alphatest)
|
||||
discard;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
lazyshader 0 "moviergb" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -15,18 +15,18 @@ lazyshader 0 "moviergb" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = texture2DRect(tex0, texcoord0);
|
||||
fragcolor = textureRect(tex0, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
lazyshader 0 "movieyuv" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -34,11 +34,11 @@ lazyshader 0 "movieyuv" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color = texture2DRect(tex0, texcoord0).rgb;
|
||||
vec3 color = textureRect(tex0, texcoord0).rgb;
|
||||
fragcolor = vec4(dot(color, vec3(0.439216, -0.367788, -0.071427)) + 0.501961,
|
||||
dot(color, vec3(-0.148224, -0.290992, 0.439216)) + 0.501961,
|
||||
dot(color, vec3(0.256788, 0.504125, 0.097905)) + 0.062745,
|
||||
|
@ -47,9 +47,9 @@ lazyshader 0 "movieyuv" [
|
|||
]
|
||||
|
||||
lazyshader 0 "moviey" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -57,14 +57,14 @@ lazyshader 0 "moviey" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color1 = texture2DRectOffset(tex0, texcoord0, ivec2( -2, 0)).rgb;
|
||||
vec3 color2 = texture2DRectOffset(tex0, texcoord0, ivec2( -1, 0)).rgb;
|
||||
vec3 color3 = texture2DRect(tex0, texcoord0).rgb;
|
||||
vec3 color4 = texture2DRectOffset(tex0, texcoord0, ivec2( 1, 0)).rgb;
|
||||
vec3 color1 = textureRectOffset(tex0, texcoord0, ivec2( -2, 0)).rgb;
|
||||
vec3 color2 = textureRectOffset(tex0, texcoord0, ivec2( -1, 0)).rgb;
|
||||
vec3 color3 = textureRect(tex0, texcoord0).rgb;
|
||||
vec3 color4 = textureRectOffset(tex0, texcoord0, ivec2( 1, 0)).rgb;
|
||||
fragcolor = vec4(dot(color3, vec3(0.256788, 0.504125, 0.097905)) + 0.062745,
|
||||
dot(color2, vec3(0.256788, 0.504125, 0.097905)) + 0.062745,
|
||||
dot(color1, vec3(0.256788, 0.504125, 0.097905)) + 0.062745,
|
||||
|
@ -73,9 +73,9 @@ lazyshader 0 "moviey" [
|
|||
]
|
||||
|
||||
lazyshader 0 "movieu" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -83,14 +83,14 @@ lazyshader 0 "movieu" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color1 = texture2DRectOffset(tex0, texcoord0, ivec2(-3, 0)).rgb;
|
||||
vec3 color2 = texture2DRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb;
|
||||
vec3 color3 = texture2DRectOffset(tex0, texcoord0, ivec2( 1, 0)).rgb;
|
||||
vec3 color4 = texture2DRectOffset(tex0, texcoord0, ivec2( 3, 0)).rgb;
|
||||
vec3 color1 = textureRectOffset(tex0, texcoord0, ivec2(-3, 0)).rgb;
|
||||
vec3 color2 = textureRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb;
|
||||
vec3 color3 = textureRectOffset(tex0, texcoord0, ivec2( 1, 0)).rgb;
|
||||
vec3 color4 = textureRectOffset(tex0, texcoord0, ivec2( 3, 0)).rgb;
|
||||
fragcolor = vec4(dot(color3, vec3(-0.148224, -0.290992, 0.43921)) + 0.501961,
|
||||
dot(color2, vec3(-0.148224, -0.290992, 0.43921)) + 0.501961,
|
||||
dot(color1, vec3(-0.148224, -0.290992, 0.43921)) + 0.501961,
|
||||
|
@ -99,9 +99,9 @@ lazyshader 0 "movieu" [
|
|||
]
|
||||
|
||||
lazyshader 0 "moviev" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -109,14 +109,14 @@ lazyshader 0 "moviev" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color1 = texture2DRectOffset(tex0, texcoord0, ivec2(-3, 0)).rgb;
|
||||
vec3 color2 = texture2DRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb;
|
||||
vec3 color3 = texture2DRectOffset(tex0, texcoord0, ivec2( 1, 0)).rgb;
|
||||
vec3 color4 = texture2DRectOffset(tex0, texcoord0, ivec2( 3, 0)).rgb;
|
||||
vec3 color1 = textureRectOffset(tex0, texcoord0, ivec2(-3, 0)).rgb;
|
||||
vec3 color2 = textureRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb;
|
||||
vec3 color3 = textureRectOffset(tex0, texcoord0, ivec2( 1, 0)).rgb;
|
||||
vec3 color4 = textureRectOffset(tex0, texcoord0, ivec2( 3, 0)).rgb;
|
||||
fragcolor = vec4(dot(color3, vec3(0.439216, -0.367788, -0.071427)) + 0.501961,
|
||||
dot(color2, vec3(0.439216, -0.367788, -0.071427)) + 0.501961,
|
||||
dot(color1, vec3(0.439216, -0.367788, -0.071427)) + 0.501961,
|
||||
|
|
|
@ -11,18 +11,18 @@
|
|||
explosionshader = [
|
||||
shader 0 $arg1 [
|
||||
//:fog
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 explosionmatrix;
|
||||
uniform vec3 center;
|
||||
uniform float millis;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec2 vtexcoord0;
|
||||
uniform vec4 texgenS, texgenT;
|
||||
@(? (>= (strstr $arg1 "soft") 0) [
|
||||
uniform vec2 lineardepthscale;
|
||||
varying float lineardepth;
|
||||
out float lineardepth;
|
||||
])
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0, texcoord1, texcoord2;
|
||||
out vec4 color;
|
||||
out vec2 texcoord0, texcoord1, texcoord2;
|
||||
void main(void)
|
||||
{
|
||||
vec4 wobble = vec4(vvertex.xyz*(1.0 + 0.5*abs(fract(dot(vvertex.xyz, center) + millis*2.0) - 0.5)), vvertex.w);
|
||||
|
@ -42,17 +42,17 @@ explosionshader = [
|
|||
@(if (>= (strstr $arg1 "soft") 0) [result [
|
||||
@(gfetchdefs tex2)
|
||||
uniform vec3 softparams;
|
||||
varying float lineardepth;
|
||||
in float lineardepth;
|
||||
]])
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0, texcoord1, texcoord2;
|
||||
in vec4 color;
|
||||
in vec2 texcoord0, texcoord1, texcoord2;
|
||||
uniform sampler2D tex0;
|
||||
uniform vec2 blendparams;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec2 dtc = texcoord0 + texture2D(tex0, texcoord2).xy*0.1; // use color texture as noise to distort texcoords
|
||||
vec4 diffuse = texture2D(tex0, dtc);
|
||||
vec2 dtc = texcoord0 + texture(tex0, texcoord2).xy*0.1; // use color texture as noise to distort texcoords
|
||||
vec4 diffuse = texture(tex0, dtc);
|
||||
float blend = max(pow(clamp(1.0 - dot(texcoord1, texcoord1), 0.0, 1.0), blendparams.x), blendparams.y);
|
||||
diffuse *= blend*4.0; // dup alpha into RGB channels + intensify and over saturate
|
||||
diffuse.b += 0.5 - blend*0.5; // blue tint
|
||||
|
@ -74,18 +74,18 @@ explosionshader "explosionsoft"
|
|||
|
||||
shader 0 "particlenotexture" [
|
||||
//:fog
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec4 colorscale;
|
||||
varying vec4 color;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
color = vcolor * colorscale;
|
||||
}
|
||||
] [
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color;
|
||||
|
@ -94,12 +94,12 @@ shader 0 "particlenotexture" [
|
|||
|
||||
shader 0 "particletext" [
|
||||
//:fog
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform float ldrscale;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 color;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -109,12 +109,12 @@ shader 0 "particletext" [
|
|||
] [
|
||||
uniform vec4 textparams;
|
||||
uniform sampler2D tex0;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
float dist = texture2D(tex0, texcoord0).r;
|
||||
float dist = texture(tex0, texcoord0).r;
|
||||
float border = smoothstep(textparams.x, textparams.y, dist);
|
||||
float outline = smoothstep(textparams.z, textparams.w, dist);
|
||||
fragcolor = vec4(color.rgb * outline, color.a * border);
|
||||
|
@ -124,16 +124,16 @@ shader 0 "particletext" [
|
|||
particleshader = [
|
||||
shader 0 $arg1 [
|
||||
//:fog
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec4 colorscale;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 color;
|
||||
out vec2 texcoord0;
|
||||
@(? (>= (strstr $arg1 "soft") 0) [
|
||||
uniform vec2 lineardepthscale;
|
||||
varying float lineardepth;
|
||||
varying vec2 surface;
|
||||
out float lineardepth;
|
||||
out vec2 surface;
|
||||
])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -150,16 +150,16 @@ particleshader = [
|
|||
@(if (>= (strstr $arg1 "soft") 0) [result [
|
||||
@(gfetchdefs tex2)
|
||||
uniform vec3 softparams;
|
||||
varying float lineardepth;
|
||||
varying vec2 surface;
|
||||
in float lineardepth;
|
||||
in vec2 surface;
|
||||
]])
|
||||
uniform sampler2D tex0;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 diffuse = texture2D(tex0, texcoord0);
|
||||
vec4 diffuse = texture(tex0, texcoord0);
|
||||
|
||||
@(if (>= (strstr $arg1 "soft") 0) [result [
|
||||
@(gdepthunpack depth [gfetch(tex2, gl_FragCoord.xy)])
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
fsvs = [result [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
@arg2
|
||||
void main(void)
|
||||
{
|
||||
|
@ -19,12 +19,12 @@ fsvs = [result [
|
|||
|
||||
fsps = [result [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
@arg2
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2DRect(tex0, texcoord0);
|
||||
vec4 color = textureRect(tex0, texcoord0);
|
||||
@arg1
|
||||
}
|
||||
]]
|
||||
|
@ -37,19 +37,19 @@ fsvs4 = [
|
|||
texcoord4 = vtexcoord0 + vec2( 1.5, 1.5);
|
||||
@arg1
|
||||
] [
|
||||
varying vec2 texcoord1, texcoord2, texcoord3, texcoord4;
|
||||
out vec2 texcoord1, texcoord2, texcoord3, texcoord4;
|
||||
]
|
||||
]
|
||||
|
||||
fsps4 = [
|
||||
fsps [
|
||||
vec4 s00 = texture2DRect(tex0, texcoord1);
|
||||
vec4 s02 = texture2DRect(tex0, texcoord2);
|
||||
vec4 s20 = texture2DRect(tex0, texcoord3);
|
||||
vec4 s22 = texture2DRect(tex0, texcoord4);
|
||||
vec4 s00 = textureRect(tex0, texcoord1);
|
||||
vec4 s02 = textureRect(tex0, texcoord2);
|
||||
vec4 s20 = textureRect(tex0, texcoord3);
|
||||
vec4 s22 = textureRect(tex0, texcoord4);
|
||||
@arg1
|
||||
] [
|
||||
varying vec2 texcoord1, texcoord2, texcoord3, texcoord4;
|
||||
in vec2 texcoord1, texcoord2, texcoord3, texcoord4;
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -70,10 +70,10 @@ lazyshader 0 "sobel" (fsvs4) (fsps4 [
|
|||
// rotoscope
|
||||
|
||||
lazyshader 0 "rotoscope" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
uniform vec4 params;
|
||||
varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;
|
||||
out vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -89,19 +89,19 @@ lazyshader 0 "rotoscope" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 t11, t00, t12, t01, t20, t02, t21, t10, t22;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 c00 = texture2DRect(tex0, t00);
|
||||
vec4 c01 = texture2DRect(tex0, t01);
|
||||
vec4 c02 = texture2DRect(tex0, t02);
|
||||
vec4 c10 = texture2DRect(tex0, t10);
|
||||
vec4 c11 = texture2DRect(tex0, t11);
|
||||
vec4 c12 = texture2DRect(tex0, t12);
|
||||
vec4 c20 = texture2DRect(tex0, t20);
|
||||
vec4 c21 = texture2DRect(tex0, t21);
|
||||
vec4 c22 = texture2DRect(tex0, t22);
|
||||
vec4 c00 = textureRect(tex0, t00);
|
||||
vec4 c01 = textureRect(tex0, t01);
|
||||
vec4 c02 = textureRect(tex0, t02);
|
||||
vec4 c10 = textureRect(tex0, t10);
|
||||
vec4 c11 = textureRect(tex0, t11);
|
||||
vec4 c12 = textureRect(tex0, t12);
|
||||
vec4 c20 = textureRect(tex0, t20);
|
||||
vec4 c21 = textureRect(tex0, t21);
|
||||
vec4 c22 = textureRect(tex0, t22);
|
||||
|
||||
vec4 diag1 = c00 - c22;
|
||||
vec4 diag2 = c02 - c20;
|
||||
|
@ -125,9 +125,9 @@ lazyshader 0 "rotoscope" [
|
|||
|
||||
blur3shader = [
|
||||
lazyshader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0, texcoord1;
|
||||
out vec2 texcoord0, texcoord1;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -136,11 +136,11 @@ blur3shader = [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0, texcoord1;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0, texcoord1;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = 0.5*(texture2DRect(tex0, texcoord0) + texture2DRect(tex0, texcoord1));
|
||||
fragcolor = 0.5*(textureRect(tex0, texcoord0) + textureRect(tex0, texcoord1));
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -149,9 +149,9 @@ blur3shader vblur3 0 1
|
|||
|
||||
blur5shader = [
|
||||
lazyshader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0, texcoord1, texcoord2;
|
||||
out vec2 texcoord0, texcoord1, texcoord2;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -161,11 +161,11 @@ blur5shader = [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0, texcoord1, texcoord2;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0, texcoord1, texcoord2;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = 0.4*texture2DRect(tex0, texcoord0) + 0.3*(texture2DRect(tex0, texcoord1) + texture2DRect(tex0, texcoord2));
|
||||
fragcolor = 0.4*textureRect(tex0, texcoord0) + 0.3*(textureRect(tex0, texcoord1) + textureRect(tex0, texcoord2));
|
||||
}
|
||||
]
|
||||
]
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
shader 0 "scalelinear" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -16,20 +16,20 @@ shader 0 "scalelinear" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = texture2DRect(tex0, texcoord0);
|
||||
fragcolor = textureRect(tex0, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
loop i 2 [
|
||||
lazyshader 0 (? $i "scalecubicy" "scalecubicx") [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -38,8 +38,8 @@ loop i 2 [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
vec4 cubic(float s)
|
||||
{
|
||||
|
@ -57,13 +57,13 @@ loop i 2 [
|
|||
@(if $i [result [
|
||||
float offset = fract(texcoord0.y-0.5);
|
||||
center.y -= offset;
|
||||
#define texval(tap) texture2DRect(tex0, center + vec2(0.0, tap))
|
||||
#define texvaloffset(tap) texture2DRectOffset(tex0, center, ivec2(0, tap))
|
||||
#define texval(tap) textureRect(tex0, center + vec2(0.0, tap))
|
||||
#define texvaloffset(tap) textureRectOffset(tex0, center, ivec2(0, tap))
|
||||
]] [result [
|
||||
float offset = fract(texcoord0.x-0.5);
|
||||
center.x -= offset;
|
||||
#define texval(tap) texture2DRect(tex0, center + vec2(tap, 0.0))
|
||||
#define texvaloffset(tap) texture2DRectOffset(tex0, center, ivec2(tap, 0))
|
||||
#define texval(tap) textureRect(tex0, center + vec2(tap, 0.0))
|
||||
#define texvaloffset(tap) textureRectOffset(tex0, center, ivec2(tap, 0))
|
||||
]])
|
||||
vec4 weight = cubic(offset);
|
||||
weight.y += weight.z;
|
||||
|
@ -74,9 +74,9 @@ loop i 2 [
|
|||
]
|
||||
|
||||
shader 0 "reorient" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform vec3 reorientx, reorienty;
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -86,12 +86,12 @@ shader 0 "reorient" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = texture2DRect(tex0, texcoord0);
|
||||
fragcolor = textureRect(tex0, texcoord0);
|
||||
}
|
||||
]
|
||||
|
||||
|
|
|
@ -8,26 +8,26 @@ ginterpdepth = [
|
|||
result [
|
||||
uniform vec2 lineardepthscale;
|
||||
uniform vec3 gdepthpackparams;
|
||||
varying float lineardepth;
|
||||
@arg1 float lineardepth;
|
||||
]
|
||||
]
|
||||
|
||||
ginterpvert = [
|
||||
if (|| $gdepthformat $arg1) [ginterpdepth]
|
||||
if (|| $gdepthformat $arg1) [ginterpdepth out]
|
||||
]
|
||||
msaainterpvert = [ginterpvert $msaasamples]
|
||||
|
||||
ginterpfrag = [
|
||||
result [
|
||||
fragdata(0) vec4 gcolor;
|
||||
fragdata(1) vec4 gnormal;
|
||||
layout(location = 0) out vec4 gcolor;
|
||||
layout(location = 1) out vec4 gnormal;
|
||||
@(? $gdepthformat [
|
||||
fragdata(2) vec4 gdepth;
|
||||
fragdata(3) vec4 gglow;
|
||||
layout(location = 2) out vec4 gdepth;
|
||||
layout(location = 3) out vec4 gglow;
|
||||
] [
|
||||
fragdata(2) vec4 gglow;
|
||||
layout(location = 2) out vec4 gglow;
|
||||
])
|
||||
@(if (|| $gdepthformat $arg1) [ginterpdepth])
|
||||
@(if (|| $gdepthformat $arg1) [ginterpdepth in])
|
||||
]
|
||||
]
|
||||
msaainterpfrag = [ginterpfrag $msaasamples]
|
||||
|
@ -161,9 +161,9 @@ gfetchdefs = [
|
|||
@(if (! $arg3) [gdepthunpackparams])
|
||||
]] [result [
|
||||
uniform sampler2DRect @(prettylist $arg1);
|
||||
#define @[gfetchprefix](sampler, coords) texture2DRect(sampler, coords)
|
||||
#define @[gfetchprefix]offset(sampler, coords, offset) texture2DRectOffset(sampler, coords, offset)
|
||||
#define @[gfetchprefix]proj(sampler, coords) texture2DRectProj(sampler, coords)
|
||||
#define @[gfetchprefix](sampler, coords) textureRect(sampler, coords)
|
||||
#define @[gfetchprefix]offset(sampler, coords, offset) textureRectOffset(sampler, coords, offset)
|
||||
#define @[gfetchprefix]proj(sampler, coords) textureRectProj(sampler, coords)
|
||||
@(if (! $arg3) [gdepthunpackparams])
|
||||
]]
|
||||
]
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
shader 0 "skybox" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 skymatrix;
|
||||
uniform float ldrscale;
|
||||
varying vec4 colorscale;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = skymatrix * vvertex;
|
||||
|
@ -19,23 +19,23 @@ shader 0 "skybox" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec4 colorscale;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 colorscale;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
fragcolor = colorscale * color;
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "skyboxoverbright" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 skymatrix;
|
||||
uniform float ldrscale;
|
||||
varying vec4 colorscale;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 colorscale;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = skymatrix * vvertex;
|
||||
|
@ -46,12 +46,12 @@ shader 0 "skyboxoverbright" [
|
|||
uniform sampler2D tex0;
|
||||
uniform vec3 overbrightparams;
|
||||
uniform float ldrscale;
|
||||
varying vec4 colorscale;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 colorscale;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 color = texture2D(tex0, texcoord0);
|
||||
vec4 color = texture(tex0, texcoord0);
|
||||
float lum = dot(vec3(@lumweights), color.rgb);
|
||||
float overbright = mix(overbrightparams.x, overbrightparams.y, clamp(lum - overbrightparams.z, 0.0, 1.0));
|
||||
color.rgb *= overbright;
|
||||
|
@ -60,9 +60,9 @@ shader 0 "skyboxoverbright" [
|
|||
]
|
||||
|
||||
shader 0 "atmosphere" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 sunmatrix;
|
||||
varying vec3 camvec;
|
||||
out vec3 camvec;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -71,63 +71,81 @@ shader 0 "atmosphere" [
|
|||
camvec = p.xyz / p.w;
|
||||
}
|
||||
] [
|
||||
uniform vec4 sunlight;
|
||||
// adapted from http://blog.cloudparty.com/2013/09/25/stunning-procedural-skies-in-webgl-part-2/
|
||||
uniform vec3 sunlight;
|
||||
uniform vec3 sundir;
|
||||
uniform vec3 sunweight;
|
||||
uniform vec3 sundiskcolor;
|
||||
uniform vec2 sundiskparams;
|
||||
uniform vec4 opticaldepthparams;
|
||||
uniform vec3 mieparams;
|
||||
uniform vec3 betarayleigh, betamie, betaozone;
|
||||
uniform vec3 sundiskparams;
|
||||
uniform vec3 atmoradius;
|
||||
uniform float gm;
|
||||
uniform vec3 betar, betam, betarm;
|
||||
uniform vec2 hdrgamma;
|
||||
varying vec3 camvec;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
uniform float atmoalpha;
|
||||
in vec3 camvec;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
vec3 calcextinction(float dist)
|
||||
{
|
||||
return exp2(-dist * betarm);
|
||||
}
|
||||
|
||||
vec3 calcscatter(float costheta)
|
||||
{
|
||||
float rphase = 1.0 + costheta*costheta;
|
||||
float mphase = pow(1.0 + gm*(gm - 2.0*costheta), -1.5);
|
||||
return betar*rphase + betam*mphase;
|
||||
}
|
||||
|
||||
float baseopticaldepth(vec3 ray)
|
||||
{
|
||||
float a = atmoradius.x * max(ray.z, min(sundir.z, 0.0));
|
||||
return sqrt(a*a + atmoradius.z) - a;
|
||||
}
|
||||
|
||||
float opticaldepth(vec3 pos, vec3 ray)
|
||||
{
|
||||
pos.z = max(pos.z, 0.0) + atmoradius.x;
|
||||
float a = dot(pos, ray);
|
||||
return sqrt(a*a + atmoradius.y - dot(pos, pos)) - a;
|
||||
}
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec3 camdir = normalize(camvec);
|
||||
float costheta = dot(camdir, sundir);
|
||||
|
||||
// sun disk
|
||||
float edgeoffset = max(1.0 - (1.0 - max(costheta, 0.0)*costheta)*sundiskparams.x, 0.0);
|
||||
// limb darken with distance to edge
|
||||
vec3 limbdarken = pow(vec3(edgeoffset), vec3(0.397, 0.503, 0.64));
|
||||
// lighten edges for corona, but limit it to not interfere with limb darkening
|
||||
float corona = min(edgeoffset * sundiskparams.y, 1.0);
|
||||
corona = max(0.1725 / (1.15 - corona * corona) - 0.15, 0.0);
|
||||
// apply limb darkening and corona to clamped sunlight color
|
||||
vec3 sundisk = sundiskcolor * limbdarken * corona;
|
||||
|
||||
// optical depth along view ray
|
||||
float offset = camdir.z*opticaldepthparams.w;
|
||||
vec3 depth = sqrt(offset*offset + opticaldepthparams.xyz) - offset;
|
||||
vec3 rayleighweight = betarayleigh * depth.x;
|
||||
vec3 mieweight = betamie * depth.y;
|
||||
vec3 ozoneweight = betaozone * (depth.z - depth.x);
|
||||
float raydist = baseopticaldepth(camdir);
|
||||
|
||||
// extinction of light along view ray
|
||||
vec3 viewweight = sunweight - (rayleighweight + mieweight + ozoneweight);
|
||||
vec3 extinction = (exp2(viewweight) - 1.0) / viewweight;
|
||||
|
||||
// calculate in-scattering
|
||||
float rphase = (1.5 + 0.5*costheta*costheta) * (3.0 / (16.0 * 3.14159265));
|
||||
float mphase = inversesqrt(mieparams.x + mieparams.y*min(costheta, mieparams.z));
|
||||
vec3 scatter = rayleighweight * rphase + mieweight * (mphase * mphase * mphase);
|
||||
vec3 extinction = calcextinction(raydist);
|
||||
|
||||
// combine scattering and extinction with sundisk
|
||||
vec3 inscatter = (sunlight.rgb * scatter + sundisk) * extinction;
|
||||
// optical depth for incoming light hitting the view ray
|
||||
float lightraydist = opticaldepth(camdir * (raydist * max(0.15 + 0.75 * sundir.z, 0.0)), sundir);
|
||||
|
||||
// cast a ray towards the sun and calculate the incoming extincted light
|
||||
vec3 incominglight = calcextinction(lightraydist);
|
||||
|
||||
// calculate the in-scattering
|
||||
vec3 scattering = calcscatter(costheta) * (1.0 - extinction);
|
||||
|
||||
// combine
|
||||
vec3 inscatter = incominglight * scattering;
|
||||
|
||||
// sun disk
|
||||
vec3 sundisk = sundiskparams.z * extinction * pow(clamp(costheta*sundiskparams.x + sundiskparams.y, 0.0, 1.0), 8.0);
|
||||
|
||||
inscatter += sundisk;
|
||||
@(hdrgammaencode inscatter)
|
||||
|
||||
fragcolor = vec4(inscatter, sunlight.a);
|
||||
fragcolor = vec4(sunlight * inscatter, atmoalpha);
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "skyfog" [
|
||||
attribute vec4 vvertex, vcolor;
|
||||
in vec4 vvertex, vcolor;
|
||||
uniform mat4 skymatrix;
|
||||
uniform float ldrscale;
|
||||
varying vec4 color;
|
||||
out vec4 color;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = skymatrix * vvertex;
|
||||
|
@ -135,8 +153,8 @@ shader 0 "skyfog" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2D tex0;
|
||||
varying vec4 color;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = color;
|
||||
|
|
|
@ -93,9 +93,9 @@ smaadefs = [
|
|||
]
|
||||
|
||||
shader 0 [SMAALumaEdgeDetection@smaapreset@smaaopts] [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -105,15 +105,15 @@ shader 0 [SMAALumaEdgeDetection@smaapreset@smaaopts] [
|
|||
] [
|
||||
@smaadefs
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
// Calculate lumas:
|
||||
float L = SMAA_LUMA(texture2DRect(tex0, texcoord0));
|
||||
float Lleft = SMAA_LUMA(texture2DRectOffset(tex0, texcoord0, ivec2(-1, 0)));
|
||||
float Ltop = SMAA_LUMA(texture2DRectOffset(tex0, texcoord0, ivec2(0, -1)));
|
||||
float L = SMAA_LUMA(textureRect(tex0, texcoord0));
|
||||
float Lleft = SMAA_LUMA(textureRectOffset(tex0, texcoord0, ivec2(-1, 0)));
|
||||
float Ltop = SMAA_LUMA(textureRectOffset(tex0, texcoord0, ivec2(0, -1)));
|
||||
|
||||
// We do the usual threshold:
|
||||
vec2 delta = abs(L - vec2(Lleft, Ltop));
|
||||
|
@ -128,14 +128,14 @@ shader 0 [SMAALumaEdgeDetection@smaapreset@smaaopts] [
|
|||
])
|
||||
{
|
||||
// Calculate right and bottom deltas:
|
||||
float Lright = SMAA_LUMA(texture2DRectOffset(tex0, texcoord0, ivec2(1, 0)));
|
||||
float Lbottom = SMAA_LUMA(texture2DRectOffset(tex0, texcoord0, ivec2(0, 1)));
|
||||
float Lright = SMAA_LUMA(textureRectOffset(tex0, texcoord0, ivec2(1, 0)));
|
||||
float Lbottom = SMAA_LUMA(textureRectOffset(tex0, texcoord0, ivec2(0, 1)));
|
||||
// Calculate the maximum delta in the direct neighborhood:
|
||||
vec2 maxDelta = max(delta, abs(L - vec2(Lright, Lbottom)));
|
||||
|
||||
// Calculate left-left and top-top deltas:
|
||||
float Lleftleft = SMAA_LUMA(texture2DRectOffset(tex0, texcoord0, ivec2(-2, 0)));
|
||||
float Ltoptop = SMAA_LUMA(texture2DRectOffset(tex0, texcoord0, ivec2(0, -2)));
|
||||
float Lleftleft = SMAA_LUMA(textureRectOffset(tex0, texcoord0, ivec2(-2, 0)));
|
||||
float Ltoptop = SMAA_LUMA(textureRectOffset(tex0, texcoord0, ivec2(0, -2)));
|
||||
// Calculate the final maximum delta:
|
||||
maxDelta = max(maxDelta, abs(vec2(Lleft, Ltop) - vec2(Lleftleft, Ltoptop)));
|
||||
|
||||
|
@ -157,9 +157,9 @@ shader 0 [SMAALumaEdgeDetection@smaapreset@smaaopts] [
|
|||
]
|
||||
|
||||
shader 0 [SMAAColorEdgeDetection@smaapreset@smaaopts] [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -169,15 +169,15 @@ shader 0 [SMAAColorEdgeDetection@smaapreset@smaaopts] [
|
|||
] [
|
||||
@smaadefs
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
// Calculate color deltas:
|
||||
vec3 C = texture2DRect(tex0, texcoord0).rgb;
|
||||
vec3 Cleft = abs(C - texture2DRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb);
|
||||
vec3 Ctop = abs(C - texture2DRectOffset(tex0, texcoord0, ivec2(0, -1)).rgb);
|
||||
vec3 C = textureRect(tex0, texcoord0).rgb;
|
||||
vec3 Cleft = abs(C - textureRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb);
|
||||
vec3 Ctop = abs(C - textureRectOffset(tex0, texcoord0, ivec2(0, -1)).rgb);
|
||||
vec2 delta;
|
||||
delta.x = max(max(Cleft.r, Cleft.g), Cleft.b);
|
||||
delta.y = max(max(Ctop.r, Ctop.g), Ctop.b);
|
||||
|
@ -194,11 +194,11 @@ shader 0 [SMAAColorEdgeDetection@smaapreset@smaaopts] [
|
|||
])
|
||||
{
|
||||
// Calculate right and bottom deltas:
|
||||
vec3 Cright = abs(C - texture2DRectOffset(tex0, texcoord0, ivec2(1, 0)).rgb);
|
||||
vec3 Cbottom = abs(C - texture2DRectOffset(tex0, texcoord0, ivec2(0, 1)).rgb);
|
||||
vec3 Cright = abs(C - textureRectOffset(tex0, texcoord0, ivec2(1, 0)).rgb);
|
||||
vec3 Cbottom = abs(C - textureRectOffset(tex0, texcoord0, ivec2(0, 1)).rgb);
|
||||
// Calculate left-left and top-top deltas:
|
||||
vec3 Cleftleft = abs(C - texture2DRectOffset(tex0, texcoord0, ivec2(-2, 0)).rgb);
|
||||
vec3 Ctoptop = abs(C - texture2DRectOffset(tex0, texcoord0, ivec2(0, -2)).rgb);
|
||||
vec3 Cleftleft = abs(C - textureRectOffset(tex0, texcoord0, ivec2(-2, 0)).rgb);
|
||||
vec3 Ctoptop = abs(C - textureRectOffset(tex0, texcoord0, ivec2(0, -2)).rgb);
|
||||
// Calculate the maximum delta in the direct neighborhood:
|
||||
vec3 t = max(max(Cright, Cbottom), max(Cleftleft, Ctoptop));
|
||||
// Calculate the final maximum delta:
|
||||
|
@ -214,9 +214,9 @@ shader 0 [SMAAColorEdgeDetection@smaapreset@smaaopts] [
|
|||
|
||||
shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
||||
@smaadefs
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0, texcoord1, texcoord2, texcoord3, texcoord4, texcoord5;
|
||||
out vec2 texcoord0, texcoord1, texcoord2, texcoord3, texcoord4, texcoord5;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -232,10 +232,10 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
}
|
||||
] [
|
||||
@smaadefs
|
||||
varying vec2 texcoord0, texcoord1, texcoord2, texcoord3, texcoord4, texcoord5;
|
||||
in vec2 texcoord0, texcoord1, texcoord2, texcoord3, texcoord4, texcoord5;
|
||||
uniform sampler2DRect tex0, tex1, tex2;
|
||||
uniform vec4 subsamples;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
#if __VERSION__ >= 130 || defined(GL_EXT_gpu_shader4)
|
||||
#define SMAARound(e) round(e)
|
||||
|
@ -257,45 +257,45 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
* These functions allows to perform diagonal pattern searches.
|
||||
*/
|
||||
float SMAASearchDiagRightUp(void) {
|
||||
vec2 e = texture2DRectOffset(tex0, texcoord0, ivec2(1, -1)).rg;
|
||||
vec2 e = textureRectOffset(tex0, texcoord0, ivec2(1, -1)).rg;
|
||||
vec2 texcoord = texcoord0 + vec2(1.0, -1.0);
|
||||
for (int i = 1; i < SMAA_MAX_SEARCH_STEPS_DIAG; i++) {
|
||||
if (e.x + e.y < 1.5) break;
|
||||
texcoord += vec2(1.0, -1.0);
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return (texcoord.x - texcoord0.x) - 1.0;
|
||||
}
|
||||
|
||||
float SMAASearchDiagLeftDown(void) {
|
||||
vec2 e = texture2DRectOffset(tex0, texcoord0, ivec2(-1, 1)).rg;
|
||||
vec2 e = textureRectOffset(tex0, texcoord0, ivec2(-1, 1)).rg;
|
||||
vec2 texcoord = texcoord0 + vec2(-1.0, 1.0);
|
||||
for (int i = 1; i < SMAA_MAX_SEARCH_STEPS_DIAG; i++) {
|
||||
if (e.x + e.y < 1.5) break;
|
||||
texcoord += vec2(-1.0, 1.0);
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return (texcoord0.x - texcoord.x) - 1.0 + SMAARound(e.y);
|
||||
}
|
||||
|
||||
float SMAASearchDiagLeftUp(void) {
|
||||
vec2 e = texture2DRectOffset(tex0, texcoord5, ivec2(-1, -1)).rg;
|
||||
vec2 e = textureRectOffset(tex0, texcoord5, ivec2(-1, -1)).rg;
|
||||
vec2 texcoord = texcoord5 + vec2(-1.0, -1.0);
|
||||
for (int i = 1; i < SMAA_MAX_SEARCH_STEPS_DIAG; i++) {
|
||||
if (SMAADecodeDiagBilinearAccess(e.x) + e.y < 1.5) break;
|
||||
texcoord += vec2(-1.0, -1.0);
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return (texcoord5.x - texcoord.x) - 1.0;
|
||||
}
|
||||
|
||||
float SMAASearchDiagRightDown(void) {
|
||||
vec2 e = texture2DRectOffset(tex0, texcoord5, ivec2(1, 1)).rg;
|
||||
vec2 e = textureRectOffset(tex0, texcoord5, ivec2(1, 1)).rg;
|
||||
vec2 texcoord = texcoord5 + vec2(1.0, 1.0);
|
||||
for (int i = 1; i < SMAA_MAX_SEARCH_STEPS_DIAG; i++) {
|
||||
if (SMAADecodeDiagBilinearAccess(e.x) + e.y < 1.5) break;
|
||||
texcoord += vec2(1.0, 1.0);
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return (texcoord.x - texcoord5.x) - 1.0 + SMAARound(e.y);
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
// Move to proper place, according to the subpixel offset:
|
||||
SMAA_AREA_OFFSET(texcoord, offset);
|
||||
|
||||
return SMAA_AREA(texture2DRect(tex1, texcoord));
|
||||
return SMAA_AREA(textureRect(tex1, texcoord));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -332,8 +332,8 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
if (d.x + d.y > 2.0) { // d.x + d.y + 1 > 3
|
||||
vec4 coords = vec4(0.25 - d.x, d.x, d.y, -0.25 - d.y) + texcoord0.xyxy;
|
||||
vec4 c;
|
||||
c.xy = texture2DRectOffset(tex0, coords.xy, ivec2(-1, 0)).rg;
|
||||
c.zw = texture2DRectOffset(tex0, coords.zw, ivec2( 1, 0)).rg;
|
||||
c.xy = textureRectOffset(tex0, coords.xy, ivec2(-1, 0)).rg;
|
||||
c.zw = textureRectOffset(tex0, coords.zw, ivec2( 1, 0)).rg;
|
||||
c.xz = SMAADecodeDiagBilinearAccess(c.xz);
|
||||
c = SMAARound(c);
|
||||
|
||||
|
@ -349,9 +349,9 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
if (d.x + d.y > 2.0) { // d.x + d.y + 1 > 3
|
||||
vec4 coords = vec4(-d.xx, d.yy) + texcoord0.xyxy;
|
||||
vec4 c;
|
||||
c.x = texture2DRectOffset(tex0, coords.xy, ivec2(-1, 0)).g;
|
||||
c.y = texture2DRectOffset(tex0, coords.xy, ivec2( 0, -1)).r;
|
||||
c.zw = texture2DRectOffset(tex0, coords.zw, ivec2( 1, 0)).gr;
|
||||
c.x = textureRectOffset(tex0, coords.xy, ivec2(-1, 0)).g;
|
||||
c.y = textureRectOffset(tex0, coords.xy, ivec2( 0, -1)).r;
|
||||
c.zw = textureRectOffset(tex0, coords.zw, ivec2( 1, 0)).gr;
|
||||
|
||||
vec2 e = 2.0 * c.xz + c.yw;
|
||||
e *= step(d, vec2(float(SMAA_MAX_SEARCH_STEPS_DIAG) - 0.5));
|
||||
|
@ -374,7 +374,7 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
*/
|
||||
float SMAASearchLength(vec2 e, float bias, float scale) {
|
||||
e.r = bias + e.r * scale;
|
||||
return 255.0 * texture2DRect(tex2, e*vec2(float(SMAA_SEARCHTEX_WIDTH), float(SMAA_SEARCHTEX_HEIGHT))).r;
|
||||
return 255.0 * textureRect(tex2, e*vec2(float(SMAA_SEARCHTEX_WIDTH), float(SMAA_SEARCHTEX_HEIGHT))).r;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -388,12 +388,12 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
* Sampling with different offsets in each direction allows to disambiguate
|
||||
* which edges are active from the four fetched ones.
|
||||
*/
|
||||
vec2 e = texture2DRect(tex0, texcoord1).rg;
|
||||
vec2 e = textureRect(tex0, texcoord1).rg;
|
||||
vec2 texcoord = texcoord1;
|
||||
for(int i = 1; i < SMAA_MAX_SEARCH_STEPS; i++) {
|
||||
if(e.g <= 0.8281 || e.r > 0.0) break; // Is there some edge not activated or a crossing edge that breaks the line?
|
||||
texcoord.x -= 2.0;
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
// We correct the previous (-0.25, -0.125) offset we applied:
|
||||
// The searches are bias by 1, so adjust the coords accordingly:
|
||||
|
@ -402,34 +402,34 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
}
|
||||
|
||||
float SMAASearchXRight(void) {
|
||||
vec2 e = texture2DRect(tex0, texcoord2).rg;
|
||||
vec2 e = textureRect(tex0, texcoord2).rg;
|
||||
vec2 texcoord = texcoord2;
|
||||
for(int i = 1; i < SMAA_MAX_SEARCH_STEPS; i++) {
|
||||
if(e.g <= 0.8281 || e.r > 0.0) break; // Is there some edge not activated or a crossing edge that breaks the line?
|
||||
texcoord.x += 2.0;
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return texcoord.x - (0.25 + 1.0) + SMAASearchLength(e, 0.5, 0.5);
|
||||
}
|
||||
|
||||
float SMAASearchYUp(void) {
|
||||
vec2 e = texture2DRect(tex0, texcoord3).rg;
|
||||
vec2 e = textureRect(tex0, texcoord3).rg;
|
||||
vec2 texcoord = texcoord3;
|
||||
for(int i = 1; i < SMAA_MAX_SEARCH_STEPS; i++) {
|
||||
if(e.r <= 0.8281 || e.g > 0.0) break; // Is there some edge not activated or a crossing edge that breaks the line?
|
||||
texcoord.y -= 2.0;
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return texcoord.y + (0.25 + 1.0) - SMAASearchLength(e.gr, 0.0, 0.5);
|
||||
}
|
||||
|
||||
float SMAASearchYDown(void) {
|
||||
vec2 e = texture2DRect(tex0, texcoord4).rg;
|
||||
vec2 e = textureRect(tex0, texcoord4).rg;
|
||||
vec2 texcoord = texcoord4;
|
||||
for(int i = 1; i < SMAA_MAX_SEARCH_STEPS; i++) {
|
||||
if(e.r <= 0.8281 || e.g > 0.0) break; // Is there some edge not activated or a crossing edge that breaks the line?
|
||||
texcoord.y += 2.0;
|
||||
e = texture2DRect(tex0, texcoord).rg;
|
||||
e = textureRect(tex0, texcoord).rg;
|
||||
}
|
||||
return texcoord.y - (0.25 + 1.0) + SMAASearchLength(e.gr, 0.5, 0.5);
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
// Move to proper place, according to the subpixel offset:
|
||||
SMAA_AREA_OFFSET(texcoord, offset);
|
||||
|
||||
return SMAA_AREA(texture2DRect(tex1, texcoord));
|
||||
return SMAA_AREA(textureRect(tex1, texcoord));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -461,16 +461,16 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
vec2 SMAADetectHorizontalCornerPattern(vec3 coords, vec2 d) {
|
||||
vec2 e;
|
||||
if(d.x >= d.y) coords.x = coords.z + 1.0 - 0.5*step(d.x, d.y);
|
||||
e.r = texture2DRectOffset(tex0, coords.xy, ivec2(0, 1)).r;
|
||||
e.g = texture2DRectOffset(tex0, coords.xy, ivec2(0, -2)).r;
|
||||
e.r = textureRectOffset(tex0, coords.xy, ivec2(0, 1)).r;
|
||||
e.g = textureRectOffset(tex0, coords.xy, ivec2(0, -2)).r;
|
||||
return clamp(1.0 - (1.0 - SMAA_CORNER_ROUNDING_NORM) * e, 0.0, 1.0);
|
||||
}
|
||||
|
||||
vec2 SMAADetectVerticalCornerPattern(vec3 coords, vec2 d) {
|
||||
vec2 e;
|
||||
if(d.x >= d.y) coords.y = coords.z + 1.0 - 0.5*step(d.x, d.y);
|
||||
e.r = texture2DRectOffset(tex0, coords.xy, ivec2( 1, 0)).g;
|
||||
e.g = texture2DRectOffset(tex0, coords.xy, ivec2(-2, 0)).g;
|
||||
e.r = textureRectOffset(tex0, coords.xy, ivec2( 1, 0)).g;
|
||||
e.g = textureRectOffset(tex0, coords.xy, ivec2(-2, 0)).g;
|
||||
return clamp(1.0 - (1.0 - SMAA_CORNER_ROUNDING_NORM) * e, 0.0, 1.0);
|
||||
}
|
||||
|
||||
|
@ -483,7 +483,7 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
{
|
||||
vec4 weights = vec4(0.0);
|
||||
|
||||
vec2 e = texture2DRect(tex0, texcoord5).rg;
|
||||
vec2 e = textureRect(tex0, texcoord5).rg;
|
||||
|
||||
if (e.g > 0.5) { // Edge at north
|
||||
#if SMAA_MAX_SEARCH_STEPS_DIAG > 0
|
||||
|
@ -511,9 +511,9 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
// filtering. Sampling at -0.25 (see CROSSING_OFFSET) enables to
|
||||
// discern what value each edge has:
|
||||
vec2 e;
|
||||
e.x = texture2DRect(tex0, coords.xy).r;
|
||||
e.x = textureRect(tex0, coords.xy).r;
|
||||
// Fetch the right crossing edges:
|
||||
e.y = texture2DRectOffset(tex0, coords.zy, ivec2(1, 0)).r;
|
||||
e.y = textureRectOffset(tex0, coords.zy, ivec2(1, 0)).r;
|
||||
|
||||
// Ok, we know how this pattern looks like, now it is time for getting
|
||||
// the actual area:
|
||||
|
@ -544,9 +544,9 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
|
||||
// Fetch the top crossing edges:
|
||||
vec2 e;
|
||||
e.x = texture2DRect(tex0, coords.xy).g;
|
||||
e.x = textureRect(tex0, coords.xy).g;
|
||||
// Fetch the bottom crossing edges:
|
||||
e.y = texture2DRectOffset(tex0, coords.xz, ivec2(0, 1)).g;
|
||||
e.y = textureRectOffset(tex0, coords.xz, ivec2(0, 1)).g;
|
||||
|
||||
// Get the area for this direction:
|
||||
weights.ba = SMAAArea(d, e, subsamples.x);
|
||||
|
@ -563,9 +563,9 @@ shader 0 [SMAABlendingWeightCalculation@smaapreset@smaaopts] [
|
|||
]
|
||||
|
||||
shader 0 [SMAANeighborhoodBlending@smaapreset@smaaopts] [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -574,10 +574,10 @@ shader 0 [SMAANeighborhoodBlending@smaapreset@smaaopts] [
|
|||
}
|
||||
] [
|
||||
@smaadefs
|
||||
varying vec2 texcoord0;
|
||||
in vec2 texcoord0;
|
||||
uniform sampler2DRect tex0, tex1;
|
||||
@(? (smaaopt "s") [uniform sampler2DRect tex2, tex3;])
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
// Neighborhood Blending Pixel Shader (Third Pass)
|
||||
|
||||
|
@ -585,9 +585,9 @@ shader 0 [SMAANeighborhoodBlending@smaapreset@smaaopts] [
|
|||
{
|
||||
// Fetch the blending weights for current pixel:
|
||||
vec4 a;
|
||||
a.xz = texture2DRect(tex1, texcoord0).rb;
|
||||
a.y = texture2DRectOffset(tex1, texcoord0, ivec2(0, 1)).g;
|
||||
a.w = texture2DRectOffset(tex1, texcoord0, ivec2(1, 0)).a;
|
||||
a.xz = textureRect(tex1, texcoord0).rb;
|
||||
a.y = textureRectOffset(tex1, texcoord0, ivec2(0, 1)).g;
|
||||
a.w = textureRectOffset(tex1, texcoord0, ivec2(1, 0)).a;
|
||||
|
||||
// Up to 4 lines can be crossing a pixel (one through each edge). We
|
||||
// favor blending by choosing the line with the maximum weight for each
|
||||
|
@ -604,19 +604,19 @@ shader 0 [SMAANeighborhoodBlending@smaapreset@smaaopts] [
|
|||
|
||||
// We exploit bilinear filtering to mix current pixel with the chosen
|
||||
// neighbor:
|
||||
fragcolor = texture2DRect(tex0, texcoord0 + offset);
|
||||
fragcolor = textureRect(tex0, texcoord0 + offset);
|
||||
|
||||
@(? (smaaopt "s") [
|
||||
a.xz = texture2DRect(tex3, texcoord0).rb;
|
||||
a.y = texture2DRectOffset(tex3, texcoord0, ivec2(0, 1)).g;
|
||||
a.w = texture2DRectOffset(tex3, texcoord0, ivec2(1, 0)).a;
|
||||
a.xz = textureRect(tex3, texcoord0).rb;
|
||||
a.y = textureRectOffset(tex3, texcoord0, ivec2(0, 1)).g;
|
||||
a.w = textureRectOffset(tex3, texcoord0, ivec2(1, 0)).a;
|
||||
offset.x = a.w > a.z ? a.w : -a.z;
|
||||
offset.y = a.y > a.x ? a.y : -a.x;
|
||||
if (abs(offset.x) > abs(offset.y))
|
||||
offset.y = 0.0;
|
||||
else
|
||||
offset.x = 0.0;
|
||||
fragcolor = 0.5*(fragcolor + texture2DRect(tex2, texcoord0 + offset));
|
||||
fragcolor = 0.5*(fragcolor + textureRect(tex2, texcoord0 + offset));
|
||||
])
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,172 +0,0 @@
|
|||
// shadow map filters, arg1 enables color sampling
|
||||
|
||||
smfiltercolor = [result [
|
||||
#define filtercolorshadow(tex, tc) texture2DRect(tex, tc.xy @(if $numargs [result [* @arg1]])).rgb
|
||||
]]
|
||||
|
||||
smfilterg5 = [result [
|
||||
@(? (> $usetexgather 1) [
|
||||
#define shadowgather(center, xoff, yoff) textureGatherOffset(tex4, center, shadowtc.z, ivec2(xoff, yoff))
|
||||
] [
|
||||
#define shadowgather(center, xoff, yoff) step(shadowtc.z, textureGatherOffset(tex4, center, ivec2(xoff, yoff)))
|
||||
])
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5);
|
||||
vec2 center = (shadowtc.xy - offset) * shadowatlasscale;
|
||||
vec4 group1 = shadowgather(center, -2, -2);
|
||||
vec4 group2 = shadowgather(center, 0, -2);
|
||||
vec4 group3 = shadowgather(center, 2, -2);
|
||||
vec4 group4 = shadowgather(center, -2, 0);
|
||||
vec4 group5 = shadowgather(center, 0, 0);
|
||||
vec4 group6 = shadowgather(center, 2, 0);
|
||||
vec4 group7 = shadowgather(center, -2, 2);
|
||||
vec4 group8 = shadowgather(center, 0, 2);
|
||||
vec4 group9 = shadowgather(center, 2, 2);
|
||||
vec4 locols = vec4(group1.ab, group3.ab);
|
||||
vec4 hicols = vec4(group7.rg, group9.rg);
|
||||
locols.yz += group2.ab;
|
||||
hicols.yz += group8.rg;
|
||||
vec4 midcols = vec4(group1.rg, group3.rg) + vec4(group7.ab, group9.ab) +
|
||||
vec4(group4.rg, group6.rg) + vec4(group4.ab, group6.ab) +
|
||||
mix(locols, hicols, offset.y);
|
||||
vec4 cols = group5 + vec4(group2.rg, group8.ab);
|
||||
cols.xyz += mix(midcols.xyz, midcols.yzw, offset.x);
|
||||
return dot(cols, vec4(1.0/25.0));
|
||||
}
|
||||
@(if $arg1 [smfiltercolor 0.5])
|
||||
]]
|
||||
|
||||
smfilterg3 = [result [
|
||||
@(? (> $usetexgather 1) [
|
||||
#define shadowgather(center, xoff, yoff) textureGatherOffset(tex4, center, shadowtc.z, ivec2(xoff, yoff))
|
||||
] [
|
||||
#define shadowgather(center, xoff, yoff) step(shadowtc.z, textureGatherOffset(tex4, center, ivec2(xoff, yoff)))
|
||||
])
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5);
|
||||
vec2 center = (shadowtc.xy - offset) * shadowatlasscale;
|
||||
vec4 group1 = shadowgather(center, -1, -1);
|
||||
vec4 group2 = shadowgather(center, 1, -1);
|
||||
vec4 group3 = shadowgather(center, -1, 1);
|
||||
vec4 group4 = shadowgather(center, 1, 1);
|
||||
vec4 cols = vec4(group1.rg, group2.rg) + vec4(group3.ab, group4.ab) + mix(vec4(group1.ab, group2.ab), vec4(group3.rg, group4.rg), offset.y);
|
||||
return dot(mix(cols.xyz, cols.yzw, offset.x), vec3(1.0/9.0));
|
||||
}
|
||||
@(if $arg1 [smfiltercolor 0.5])
|
||||
]]
|
||||
|
||||
smfilterb5 = [result [
|
||||
#define shadowval(xy, xoff, yoff) float(shadow2DRect(tex4, vec3(xy + vec2(xoff, yoff), shadowtc.z)))
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5);
|
||||
vec4 center = vec4(shadowtc.xy - offset + 0.5, shadowtc.xy - offset*0.5);
|
||||
vec4 size = vec4(offset + 1.0, 2.0 - offset);
|
||||
return (1.0/25.0)*dot(size.zxzx*size.wwyy,
|
||||
vec4(shadowval(center.zw, -1.5, -1.5),
|
||||
shadowval(center.zw, 2.0, -1.5),
|
||||
shadowval(center.zw, -1.5, 2.0),
|
||||
shadowval(center.zw, 2.0, 2.0))) +
|
||||
(2.0/25.0)*dot(size,
|
||||
vec4(shadowval(center.zy, 2.0, 0.0),
|
||||
shadowval(center.xw, 0.0, 2.0),
|
||||
shadowval(center.zy, -1.5, 0.0),
|
||||
shadowval(center.xw, 0.0, -1.5))) +
|
||||
(4.0/25.0)*shadowval(center.xy, 0.0, 0.0);
|
||||
}
|
||||
@(if $arg1 [smfiltercolor 0.5])
|
||||
]]
|
||||
|
||||
smfilterb3 = [result [
|
||||
#define shadowval(center, xoff, yoff) float(shadow2DRect(tex4, center + vec3(xoff, yoff, 0.0)))
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
vec2 offset = fract(shadowtc.xy - 0.5);
|
||||
vec3 center = shadowtc;
|
||||
//center.xy -= offset;
|
||||
//vec4 size = vec4(offset + 1.0, 2.0 - offset), weight = vec4(2.0 - 1.0 / size.xy, 1.0 / size.zw - 1.0);
|
||||
//return (1.0/9.0)*dot(size.zxzx*size.wwyy,
|
||||
// vec4(shadowval(center, weight.zw),
|
||||
// shadowval(center, weight.xw),
|
||||
// shadowval(center, weight.zy),
|
||||
// shadowval(center, weight.xy)));
|
||||
center.xy -= offset*0.5;
|
||||
vec4 size = vec4(offset + 1.0, 2.0 - offset);
|
||||
return (1.0/9.0)*dot(size.zxzx*size.wwyy,
|
||||
vec4(shadowval(center, -0.5, -0.5),
|
||||
shadowval(center, 1.0, -0.5),
|
||||
shadowval(center, -0.5, 1.0),
|
||||
shadowval(center, 1.0, 1.0)));
|
||||
}
|
||||
@(if $arg1 [smfiltercolor 0.5])
|
||||
]]
|
||||
|
||||
smfilterrg = [result [
|
||||
#define shadowval(center, xoff, yoff) float(shadow2DRect(tex4, center + vec3(xoff, yoff, 0.0)))
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
return dot(vec4(0.25),
|
||||
vec4(shadowval(shadowtc, -0.4, 1.0),
|
||||
shadowval(shadowtc, -1.0, -0.4),
|
||||
shadowval(shadowtc, 0.4, -1.0),
|
||||
shadowval(shadowtc, 1.0, 0.4)));
|
||||
}
|
||||
@(if $arg1 [smfiltercolor 0.5])
|
||||
]]
|
||||
|
||||
smfilternone = [result [
|
||||
float filtershadow(vec3 shadowtc)
|
||||
{
|
||||
return float(shadow2DRect(tex4, shadowtc));
|
||||
}
|
||||
@(if $arg1 [smfiltercolor])
|
||||
]]
|
||||
|
||||
lazyshader 0 "smalphaclear" [
|
||||
attribute vec4 vvertex;
|
||||
uniform vec2 shadowatlasscale;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vec4(vvertex.xy * shadowatlasscale * 2.0 - 1.0, 0.0, 1.0);
|
||||
}
|
||||
] [
|
||||
fragdata(0) vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = vec4(1.0);
|
||||
}
|
||||
]
|
||||
|
||||
loop i 2 [
|
||||
lazyshader 0 (? $i "smalphablur2d" "smalphablurrect") [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec4 vtexcoord0;
|
||||
uniform vec2 shadowatlasscale;
|
||||
flat varying vec4 smbounds;
|
||||
varying vec4 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vec4(vvertex.xy * shadowatlasscale * 2.0 - 1.0, 0.0, 1.0);
|
||||
smbounds = (vtexcoord0 + vec4(0.5, 0.5, -0.5, -0.5)) @(? $i [* shadowatlasscale.xyxy]);
|
||||
texcoord0 = (vvertex.xyxy + vec4(-1.0, -1.0, 1.0, 1.0)) @(? $i [* shadowatlasscale.xyxy]);
|
||||
}
|
||||
] [
|
||||
@(? $i [
|
||||
uniform sampler2D tex0;
|
||||
#define texval(tc) texture2D(tex0, tc)
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
#define texval(tc) texture2DRect(tex0, tc)
|
||||
])
|
||||
flat varying vec4 smbounds;
|
||||
varying vec4 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec4 tc = vec4(max(texcoord0.xy, smbounds.xy), min(texcoord0.zw, smbounds.zw));
|
||||
fragcolor = 0.25 * (texval(tc.xy) + texval(tc.zy) + texval(tc.xw) + texval(tc.zw));
|
||||
}
|
||||
]
|
||||
]
|
|
@ -18,12 +18,12 @@ stainvariantshader = [
|
|||
@(? (stainopt "f") [
|
||||
//:fog
|
||||
])
|
||||
attribute vec4 vvertex, vcolor;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vcolor;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec4 colorscale;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 color;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = camprojmatrix * vvertex;
|
||||
|
@ -32,15 +32,15 @@ stainvariantshader = [
|
|||
}
|
||||
]]) [
|
||||
uniform sampler2D tex0;
|
||||
varying vec4 color;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec4 color;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
@(? (stainopt "t") [
|
||||
fragdata(1) vec4 gglow;
|
||||
layout(location = 1) out vec4 gglow;
|
||||
])
|
||||
void main(void)
|
||||
{
|
||||
vec4 diffuse = texture2D(tex0, texcoord0);
|
||||
vec4 diffuse = texture(tex0, texcoord0);
|
||||
@(if (stainopt "o") [result [
|
||||
diffuse.rgb = mix(vec3(0.5), diffuse.rgb, color.rgb);
|
||||
fragcolor.rgb = diffuse.rgb;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
shader 0 "hdrreduce" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -15,18 +15,18 @@ shader 0 "hdrreduce" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor.rgb = texture2DRect(tex0, texcoord0).rgb;
|
||||
fragcolor.rgb = textureRect(tex0, texcoord0).rgb;
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hdrreduce2w" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -34,18 +34,18 @@ shader 0 "hdrreduce2w" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor.rgb = 0.5*(texture2DRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb + texture2DRectOffset(tex0, texcoord0, ivec2(1, 0)).rgb);
|
||||
fragcolor.rgb = 0.5*(textureRectOffset(tex0, texcoord0, ivec2(-1, 0)).rgb + textureRectOffset(tex0, texcoord0, ivec2(1, 0)).rgb);
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hdrreduce2" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -53,24 +53,24 @@ shader 0 "hdrreduce2" [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor.rgb = 0.25*(texture2DRectOffset(tex0, texcoord0, ivec2(-1, -1)).rgb + texture2DRectOffset(tex0, texcoord0, ivec2(1, -1)).rgb +
|
||||
texture2DRectOffset(tex0, texcoord0, ivec2(1, 1)).rgb + texture2DRectOffset(tex0, texcoord0, ivec2(-1, 1)).rgb);
|
||||
fragcolor.rgb = 0.25*(textureRectOffset(tex0, texcoord0, ivec2(-1, -1)).rgb + textureRectOffset(tex0, texcoord0, ivec2(1, -1)).rgb +
|
||||
textureRectOffset(tex0, texcoord0, ivec2(1, 1)).rgb + textureRectOffset(tex0, texcoord0, ivec2(-1, 1)).rgb);
|
||||
}
|
||||
]
|
||||
|
||||
lazyshader 0 msaaresolve [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
}
|
||||
] [
|
||||
uniform sampler2DMS tex0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = texelFetch(tex0, ivec2(gl_FragCoord.xy), 0);
|
||||
|
@ -78,7 +78,7 @@ lazyshader 0 msaaresolve [
|
|||
]
|
||||
|
||||
lazyshader 0 msaaresolvedepth [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -88,7 +88,7 @@ lazyshader 0 msaaresolvedepth [
|
|||
@(if $gdepthformat [result [
|
||||
@(gdepthunpackparams)
|
||||
uniform vec2 gdepthinvscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
]])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -104,9 +104,9 @@ lazyshader 0 msaaresolvedepth [
|
|||
]
|
||||
|
||||
lazyshader 0 msaareducew [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 tap0, tap1;
|
||||
out vec2 tap0, tap1;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -115,8 +115,8 @@ lazyshader 0 msaareducew [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DMS tex0;
|
||||
varying vec2 tap0, tap1;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 tap0, tap1;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = 0.5*(texelFetch(tex0, ivec2(tap0), 0) + texelFetch(tex0, ivec2(tap1), 0));
|
||||
|
@ -124,9 +124,9 @@ lazyshader 0 msaareducew [
|
|||
]
|
||||
|
||||
lazyshader 0 msaareduce [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 tap0, tap1, tap2, tap3;
|
||||
out vec2 tap0, tap1, tap2, tap3;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -137,8 +137,8 @@ lazyshader 0 msaareduce [
|
|||
}
|
||||
] [
|
||||
uniform sampler2DMS tex0;
|
||||
varying vec2 tap0, tap1, tap2, tap3;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 tap0, tap1, tap2, tap3;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
fragcolor = 0.25*(texelFetch(tex0, ivec2(tap0), 0) + texelFetch(tex0, ivec2(tap1), 0) +
|
||||
|
@ -166,9 +166,9 @@ hdrgammaencode = [
|
|||
]
|
||||
|
||||
shader 0 "hdrluminance" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -177,11 +177,11 @@ shader 0 "hdrluminance" [
|
|||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
uniform vec2 hdrgamma;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color = texture2DRect(tex0, texcoord0).rgb*2.0;
|
||||
vec3 color = textureRect(tex0, texcoord0).rgb*2.0;
|
||||
@(hdrgammadecode color)
|
||||
float lum = dot(color, vec3(@lumweights));
|
||||
float loglum = sqrt(clamp(lum, 0.015625, 4.0)) * (1.0/2.0); // allow values as low as 2^-6, and as high 2^2
|
||||
|
@ -190,9 +190,9 @@ shader 0 "hdrluminance" [
|
|||
]
|
||||
|
||||
shader 0 "hdrluminance2w" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -201,12 +201,12 @@ shader 0 "hdrluminance2w" [
|
|||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
uniform vec2 hdrgamma;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(loopconcat i 2 [result [
|
||||
vec3 color@[i] = texture2DRectOffset(tex0, texcoord0, ivec2(@(at ["-1, 0" "1, 0"] $i))).rgb*2.0;
|
||||
vec3 color@[i] = textureRectOffset(tex0, texcoord0, ivec2(@(at ["-1, 0" "1, 0"] $i))).rgb*2.0;
|
||||
@(hdrgammadecode [color@[i]])
|
||||
float lum@[i] = dot(color@[i], vec3(@lumweights));
|
||||
float loglum@[i] = sqrt(clamp(lum@[i], 0.015625, 4.0)) * (1.0/2.0);
|
||||
|
@ -216,9 +216,9 @@ shader 0 "hdrluminance2w" [
|
|||
]
|
||||
|
||||
shader 0 "hdrluminance2" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -227,12 +227,12 @@ shader 0 "hdrluminance2" [
|
|||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
uniform vec2 hdrgamma;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
@(loopconcat i 4 [result [
|
||||
vec3 color@[i] = texture2DRectOffset(tex0, texcoord0, ivec2(@(at ["-1, -1" "1, -1" "1, 1" "-1, 1"] $i))).rgb*2.0;
|
||||
vec3 color@[i] = textureRectOffset(tex0, texcoord0, ivec2(@(at ["-1, -1" "1, -1" "1, 1" "-1, 1"] $i))).rgb*2.0;
|
||||
@(hdrgammadecode [color@[i]])
|
||||
float lum@[i] = dot(color@[i], vec3(@lumweights));
|
||||
float loglum@[i] = sqrt(clamp(lum@[i], 0.015625, 4.0)) * (1.0/2.0);
|
||||
|
@ -242,7 +242,7 @@ shader 0 "hdrluminance2" [
|
|||
]
|
||||
|
||||
shader 0 "hdraccum" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -250,43 +250,43 @@ shader 0 "hdraccum" [
|
|||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
uniform float accumscale;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
float lum = texture2DRect(tex0, vec2(0.5, 0.5)).r * 2.0;
|
||||
float lum = textureRect(tex0, vec2(0.5, 0.5)).r * 2.0;
|
||||
lum *= lum;
|
||||
fragcolor = vec4(vec3(lum*0.25), accumscale);
|
||||
}
|
||||
]
|
||||
|
||||
shader 0 "hdrbloom" [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
@(? (>= $hwvtexunits 4) [
|
||||
uniform sampler2D tex2;
|
||||
] [
|
||||
attribute float vcolor;
|
||||
in float vcolor;
|
||||
])
|
||||
uniform vec4 hdrparams;
|
||||
varying vec2 texcoord0;
|
||||
flat varying float lumscale, lumthreshold;
|
||||
out vec2 texcoord0;
|
||||
flat out float lumscale, lumthreshold;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
float avglum = 4.0 * @(? (>= $hwvtexunits 4) [texture2D(tex2, vec2(0.5, 0.5)).r] [vcolor]);
|
||||
lumscale = hdrparams.x * -log2(1.0 - clamp(avglum, @hdrminexposure, @hdrmaxexposure))/(avglum + 1e-4);
|
||||
float avglum = 4.0 * @(? (>= $hwvtexunits 4) [texture(tex2, vec2(0.5, 0.5)).r] [vcolor]);
|
||||
lumscale = hdrparams.x * -log2(1.0 - clamp(avglum, 0.03, 0.3))/(avglum + 1e-4);
|
||||
lumthreshold = -log2(1.0 - hdrparams.z);
|
||||
}
|
||||
] [
|
||||
uniform sampler2DRect tex0;
|
||||
uniform vec2 hdrgamma;
|
||||
varying vec2 texcoord0;
|
||||
flat varying float lumscale, lumthreshold;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
flat in float lumscale, lumthreshold;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color = texture2DRect(tex0, texcoord0).rgb*2.0;
|
||||
vec3 color = textureRect(tex0, texcoord0).rgb*2.0;
|
||||
@(hdrgammadecode color)
|
||||
float lum = dot(color, vec3(@lumweights));
|
||||
color *= max(lum*lumscale - lumthreshold, 0.0) / (lum + 1e-4);
|
||||
|
@ -297,26 +297,25 @@ shader 0 "hdrbloom" [
|
|||
|
||||
hdrtonemapvertexshader = [
|
||||
result [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
@(screentexcoord 1)
|
||||
@(? (>= $hwvtexunits 4) [
|
||||
uniform sampler2D tex2;
|
||||
] [
|
||||
attribute float vcolor;
|
||||
in float vcolor;
|
||||
])
|
||||
uniform vec4 hdrparams;
|
||||
varying vec2 texcoord0, texcoord1;
|
||||
flat varying float lumscale;
|
||||
flat varying vec2 lumsaturate;
|
||||
out vec2 texcoord0, texcoord1;
|
||||
flat out float lumscale, lumsaturate;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
texcoord0 = vtexcoord0;
|
||||
texcoord1 = vtexcoord1;
|
||||
float avglum = 4.0 * @(? (>= $hwvtexunits 4) [texture2D(tex2, vec2(0.5, 0.5)).r] [vcolor]);
|
||||
lumscale = hdrparams.x * -log2(1.0 - clamp(avglum, @hdrminexposure, @hdrmaxexposure))/(avglum + 1e-4);
|
||||
lumsaturate = vec2(1.0, -hdrparams.y) * 2.0 / max(1.0 - hdrparams.y, 1e-4f);
|
||||
float avglum = 4.0 * @(? (>= $hwvtexunits 4) [texture(tex2, vec2(0.5, 0.5)).r] [vcolor]);
|
||||
lumscale = hdrparams.x * -log2(1.0 - clamp(avglum, 0.03, 0.3))/(avglum + 1e-4);
|
||||
lumsaturate = -log2(1.0 - hdrparams.y) / lumscale;
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -324,8 +323,9 @@ hdrtonemapvertexshader = [
|
|||
hdrtonemapfrag = [
|
||||
result [{
|
||||
// color = 1.0 - exp2(-color*lumscale);
|
||||
float lum = dot(@arg1, vec3(@lumweights)), target = 1.0 - exp2(-lum*lumscale), excess = max(target*lumsaturate.x + lumsaturate.y, 0.0);
|
||||
@arg1 = (@arg1 + excess) * target / (lum + excess + 1e-4);
|
||||
float lum = dot(@arg1, vec3(@lumweights));
|
||||
@arg1 = min(@arg1, lumsaturate);
|
||||
@arg1 *= (1.0 - exp2(-lum*lumscale)) / (dot(@arg1, vec3(@lumweights)) + 1e-4);
|
||||
}]
|
||||
]
|
||||
|
||||
|
@ -333,17 +333,16 @@ hdrtonemapdefs = [
|
|||
result [
|
||||
uniform vec4 hdrparams;
|
||||
uniform vec2 hdrgamma;
|
||||
varying vec2 texcoord0, texcoord1;
|
||||
flat varying float lumscale;
|
||||
flat varying vec2 lumsaturate;
|
||||
in vec2 texcoord0, texcoord1;
|
||||
flat in float lumscale, lumsaturate;
|
||||
]
|
||||
]
|
||||
|
||||
hdrtonemapshaders = [
|
||||
(? $arg1 lazyshader shader) 0 [hdrnop@arg1] [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vvertex;
|
||||
|
@ -352,11 +351,11 @@ hdrtonemapshaders = [
|
|||
] [
|
||||
@arg2
|
||||
uniform sampler2DRect tex0;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 color = texture2DRect(tex0, texcoord0).rgb;
|
||||
vec3 color = textureRect(tex0, texcoord0).rgb;
|
||||
fragcolor.rgb = color;
|
||||
@arg4
|
||||
@(? $arg3 $arg3 [fragcolor.a = 0.0;])
|
||||
|
@ -367,11 +366,11 @@ hdrtonemapshaders = [
|
|||
@arg2
|
||||
uniform sampler2DRect tex0, tex1;
|
||||
@(hdrtonemapdefs)
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 bloom = texture2DRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 color = texture2DRect(tex0, texcoord0).rgb*2.0;
|
||||
vec3 bloom = textureRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 color = textureRect(tex0, texcoord0).rgb*2.0;
|
||||
color += bloom;
|
||||
@(hdrgammadecode color)
|
||||
@(hdrtonemapfrag color)
|
||||
|
@ -392,10 +391,10 @@ msaatonemapshaders = [
|
|||
uniform sampler2DRect tex1;
|
||||
uniform sampler2DMS tex0;
|
||||
@(hdrtonemapdefs)
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 bloom = texture2DRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 bloom = textureRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 color = texelFetch(tex0, ivec2(texcoord0), gl_SampleID).rgb*2.0;
|
||||
color += bloom;
|
||||
@(hdrgammadecode color)
|
||||
|
@ -410,10 +409,10 @@ msaatonemapshaders = [
|
|||
uniform sampler2DRect tex1;
|
||||
uniform sampler2DMS tex0;
|
||||
@(hdrtonemapdefs)
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
vec3 bloom = texture2DRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 bloom = textureRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 resolved = vec3(0.0);
|
||||
for(int sampleidx = 0; sampleidx < @msaasamples; sampleidx++)
|
||||
{
|
||||
|
@ -438,11 +437,11 @@ msaasplitshaders = [
|
|||
uniform sampler2DMS tex0;
|
||||
@(hdrtonemapdefs)
|
||||
@(loopconcat i $msaasamples [result [
|
||||
fragdata(@i) vec4 fragcolor@i;
|
||||
layout(location = @i) out vec4 fragcolor@i;
|
||||
]])
|
||||
void main(void)
|
||||
{
|
||||
vec3 bloom = texture2DRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
vec3 bloom = textureRect(tex1, texcoord1).rgb*hdrparams.w;
|
||||
@arg4
|
||||
@(loopconcat i $msaasamples [result [
|
||||
vec3 color@i = texelFetch(tex0, ivec2(texcoord0), @i).rgb*2.0 + bloom;
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
////////////////////////////////////////////////
|
||||
|
||||
lazyshader 0 "modelpreview" [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec2 vtexcoord0;
|
||||
varying vec2 texcoord0;
|
||||
in vec4 vvertex;
|
||||
in vec2 vtexcoord0;
|
||||
out vec2 texcoord0;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
@ -22,8 +22,8 @@ lazyshader 0 "modelpreview" [
|
|||
uniform vec3 sunlightdir;
|
||||
uniform vec3 sunlightcolor;
|
||||
uniform float cutout;
|
||||
varying vec2 texcoord0;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
in vec2 texcoord0;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
|
|
|
@ -4,10 +4,9 @@ volumetricvariantshader = [
|
|||
local volumetrictype
|
||||
volumetrictype = $arg3
|
||||
maxsteps = $arg4
|
||||
spotlight = (>= $arg2 2)
|
||||
colorshadow = (>= (mod (+ $arg2 1) 3) 2)
|
||||
spotlight = (>= $arg2 1)
|
||||
variantshader 0 $arg1 $arg2 (? (< $arg2 0) [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
uniform mat4 lightmatrix;
|
||||
void main(void)
|
||||
{
|
||||
|
@ -24,13 +23,6 @@ volumetricvariantshader = [
|
|||
uniform sampler2DRectShadow tex4;
|
||||
]]
|
||||
])
|
||||
@(if $colorshadow [result [
|
||||
uniform sampler2DRect tex11;
|
||||
#define filtercolorshadow(tc) texture2DRect(tex11, tc.xy @(? (! (volopt "N")) [* 0.5])).rgb
|
||||
#define lightshadowtype vec3
|
||||
]] [result [
|
||||
#define lightshadowtype float
|
||||
]])
|
||||
uniform vec4 lightpos;
|
||||
uniform vec3 lightcolor;
|
||||
@(? $spotlight [
|
||||
|
@ -51,7 +43,7 @@ volumetricvariantshader = [
|
|||
uniform float volminstep;
|
||||
uniform float voldistclamp;
|
||||
uniform float volprefilter;
|
||||
fragdata(0) vec4 fragcolor;
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
|
||||
@(if (volopt "p") [
|
||||
? $spotlight [
|
||||
|
@ -77,12 +69,12 @@ volumetricvariantshader = [
|
|||
@(if (volopt "p") [
|
||||
if (|| (volopt "g") (volopt "G")) [
|
||||
? (> $usetexgather 1) [
|
||||
#define filtershadow(shadowtc) float(shadow2D(tex4, vec3(shadowtc.xy*shadowatlasscale, shadowtc.z)))
|
||||
#define filtershadow(shadowtc) float(shadow(tex4, vec3(shadowtc.xy*shadowatlasscale, shadowtc.z)))
|
||||
] [
|
||||
#define filtershadow(shadowtc) step(shadowtc.z, float(texture2D(tex4, shadowtc.xy*shadowatlasscale)))
|
||||
#define filtershadow(shadowtc) step(shadowtc.z, float(texture(tex4, shadowtc.xy*shadowatlasscale)))
|
||||
]
|
||||
] [result [
|
||||
#define filtershadow(shadowtc) float(shadow2DRect(tex4, shadowtc))
|
||||
#define filtershadow(shadowtc) float(textureRect(tex4, shadowtc))
|
||||
]]
|
||||
])
|
||||
|
||||
|
@ -100,7 +92,7 @@ volumetricvariantshader = [
|
|||
ray *= invdist;
|
||||
vec3 camlight = lightpos.xyz - camera * lightpos.w;
|
||||
float camlight2 = dot(camlight, camlight), v = dot(camlight, ray), d = v*v + 1.0 - camlight2;
|
||||
lightshadowtype light = lightshadowtype(0.0);
|
||||
float light = 0.0;
|
||||
if(d > 0)
|
||||
{
|
||||
d = sqrt(d);
|
||||
|
@ -144,7 +136,7 @@ volumetricvariantshader = [
|
|||
vec3 spottc = getspottc(lightdir, spotdist);
|
||||
lightatten *= filtershadow(spottc);
|
||||
])
|
||||
light += lightatten @(? $colorshadow [* filtercolorshadow(spottc)]);
|
||||
light += lightatten;
|
||||
}
|
||||
]] [result [
|
||||
float lightatten = clamp(1.0 - length(lightdir), 0.0, 1.0);
|
||||
|
@ -152,7 +144,7 @@ volumetricvariantshader = [
|
|||
vec3 shadowtc = getshadowtc(lightdir);
|
||||
lightatten *= filtershadow(shadowtc);
|
||||
])
|
||||
light += lightatten @(? $colorshadow [* filtercolorshadow(shadowtc)]);
|
||||
light += lightatten;
|
||||
]])
|
||||
space -= stepdist;
|
||||
if(space <= 0) break;
|
||||
|
@ -180,15 +172,9 @@ volumetricshader = [
|
|||
shadername = (concatword "volumetric" $volumetrictype $arg3)
|
||||
volumetricvariantshader $shadername -1 $arg1 $arg3
|
||||
volumetricvariantshader $shadername 0 (concatword $arg1 $arg2) $arg3
|
||||
if (volopt "P") [
|
||||
volumetricvariantshader $shadername 1 (concatword $arg1 $arg2) $arg3
|
||||
]
|
||||
if (volopt "s") [
|
||||
volumetricvariantshader $shadername 2 $arg1 $arg3
|
||||
volumetricvariantshader $shadername 3 (concatword $arg1 $arg2) $arg3
|
||||
if (volopt "P") [
|
||||
volumetricvariantshader $shadername 4 (concatword $arg1 $arg2) $arg3
|
||||
]
|
||||
volumetricvariantshader $shadername 1 $arg1 $arg3
|
||||
volumetricvariantshader $shadername 2 (concatword $arg1 $arg2) $arg3
|
||||
]
|
||||
]
|
||||
|
||||
|
@ -197,10 +183,10 @@ volumetricbilateralvariantshader = [
|
|||
reduced = $arg3
|
||||
filterdir = $arg4
|
||||
shader 0 $arg1 [
|
||||
attribute vec4 vvertex;
|
||||
in vec4 vvertex;
|
||||
@(if $reduced [result [
|
||||
@(screentexcoord 0)
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
]])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -211,18 +197,18 @@ volumetricbilateralvariantshader = [
|
|||
@(gfetchdefs tex3)
|
||||
uniform sampler2DRect tex0;
|
||||
uniform vec2 bilateralparams;
|
||||
@(? $reduced [varying vec2 texcoord0;])
|
||||
fragdata(0) vec4 fragcolor;
|
||||
@(? $reduced [in vec2 texcoord0;])
|
||||
layout(location = 0) out vec4 fragcolor;
|
||||
void main(void)
|
||||
{
|
||||
#define tc gl_FragCoord.xy
|
||||
#define depthtc @(? $reduced [texcoord0] [gl_FragCoord.xy])
|
||||
#define tapvec(type, i) @(? (=s $filterdir "x") [type(i, 0.0)] [type(0.0, i)])
|
||||
#define texval(i) texture2DRect(tex0, tc + tapvec(vec2, i))
|
||||
#define texvaloffset(i) texture2DRectOffset(tex0, tc, tapvec(ivec2, i))
|
||||
#define texval(i) textureRect(tex0, tc + tapvec(vec2, i))
|
||||
#define texvaloffset(i) textureRectOffset(tex0, tc, tapvec(ivec2, i))
|
||||
#define depthval(i) gfetch(tex3, depthtc + tapvec(vec2, i))
|
||||
#define depthvaloffset(i) gfetchoffset(tex3, depthtc, tapvec(ivec2, i))
|
||||
vec3 color = texture2DRect(tex0, tc).rgb;
|
||||
vec3 color = textureRect(tex0, tc).rgb;
|
||||
@(gdepthunpack depth [gfetch(tex3, depthtc)])
|
||||
float weights = 1.0;
|
||||
@(loopconcat i (* 2 $numtaps) [
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
// b -> blendmap
|
||||
// a -> transparent
|
||||
// A -> refractive
|
||||
// m -> alpha-mask
|
||||
// T -> triplanar
|
||||
// d -> detail
|
||||
|
||||
|
@ -59,25 +58,25 @@ worldvariantshader = [
|
|||
srow = 1
|
||||
]
|
||||
variantshader $stype $arg1 $srow [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec2 texgenscroll;
|
||||
varying vec3 nvec;
|
||||
out vec3 nvec;
|
||||
@(ginterpvert (|| $msaalight [&& $msaasamples [! (wtopt "a")]]))
|
||||
@(if (wtopt "T") [result [
|
||||
uniform vec2 texgenscale;
|
||||
varying vec2 texcoordx, texcoordy, texcoordz;
|
||||
out vec2 texcoordx, texcoordy, texcoordz;
|
||||
@(? (wtopt "d") [uniform vec2 detailscale;])
|
||||
]] [result [
|
||||
varying vec2 texcoord0;
|
||||
out vec2 texcoord0;
|
||||
]])
|
||||
@(? (wtopt "r") [uniform vec3 camera; varying vec3 camvec;])
|
||||
@(? (wtopt "G") [uniform float millis; flat varying float pulse;])
|
||||
@(? (wtopt "r") [uniform vec3 camera; out vec3 camvec;])
|
||||
@(? (wtopt "G") [uniform float millis; flat out float pulse;])
|
||||
@(? (wtopt "b") [
|
||||
uniform vec4 blendmapparams;
|
||||
varying vec2 texcoord1;
|
||||
out vec2 texcoord1;
|
||||
])
|
||||
|
||||
void main(void)
|
||||
|
@ -111,21 +110,21 @@ worldvariantshader = [
|
|||
uniform vec4 colorparams;
|
||||
uniform sampler2D diffusemap;
|
||||
@(? (|| $msaalight [&& $msaasamples [! (wtopt "a")]]) [uniform float hashid;])
|
||||
varying vec3 nvec;
|
||||
in vec3 nvec;
|
||||
@(ginterpfrag (|| $msaalight [&& $msaasamples [! (wtopt "a")]]))
|
||||
@(if (wtopt "T") [result [
|
||||
varying vec2 texcoordx, texcoordy, texcoordz;
|
||||
in vec2 texcoordx, texcoordy, texcoordz;
|
||||
@(? (wtopt "d") [uniform sampler2D detaildiffusemap;])
|
||||
]] [result [
|
||||
varying vec2 texcoord0;
|
||||
in vec2 texcoord0;
|
||||
]])
|
||||
@(? (wtopt "g") [uniform sampler2D glowmap;])
|
||||
@(? (wtopt "G") [flat varying float pulse;])
|
||||
@(? (wtopt "r") [uniform samplerCube envmap; varying vec3 camvec;])
|
||||
@(? (wtopt "G") [flat in float pulse;])
|
||||
@(? (wtopt "r") [uniform samplerCube envmap; in vec3 camvec;])
|
||||
@(? (wtopt "b") [
|
||||
uniform float blendlayer;
|
||||
uniform sampler2D blendmap;
|
||||
varying vec2 texcoord1;
|
||||
in vec2 texcoord1;
|
||||
])
|
||||
|
||||
void main(void)
|
||||
|
@ -137,12 +136,12 @@ worldvariantshader = [
|
|||
triblend *= triblend;
|
||||
triblend /= triblend.x + triblend.y + triblend.z;
|
||||
|
||||
vec4 diffusex = texture2D(diffusemap, texcoordx);
|
||||
vec4 diffusey = texture2D(diffusemap, texcoordy);
|
||||
vec4 diffusez = texture2D(@(? (wtopt "d") "detaildiffusemap" "diffusemap"), texcoordz);
|
||||
vec4 diffusex = texture(diffusemap, texcoordx);
|
||||
vec4 diffusey = texture(diffusemap, texcoordy);
|
||||
vec4 diffusez = texture(@(? (wtopt "d") "detaildiffusemap" "diffusemap"), texcoordz);
|
||||
vec4 diffuse = diffusex*triblend.x + diffusey*triblend.y + diffusez*triblend.z;
|
||||
]] [result [
|
||||
vec4 diffuse = texture2D(diffusemap, texcoord0);
|
||||
vec4 diffuse = texture(diffusemap, texcoord0);
|
||||
]])
|
||||
|
||||
gcolor.rgb = diffuse.rgb*colorparams.rgb;
|
||||
|
@ -151,7 +150,7 @@ worldvariantshader = [
|
|||
vec3 camvecn = normalize(camvec);
|
||||
float invfresnel = dot(camvecn, normal);
|
||||
vec3 rvec = 2.0*normal*invfresnel - camvecn;
|
||||
vec3 reflect = textureCube(envmap, rvec).rgb;
|
||||
vec3 reflect = texture(envmap, rvec).rgb;
|
||||
@(? (wtopt "R") [
|
||||
vec3 rmod = envscale.xyz*diffuse.a;
|
||||
] [
|
||||
|
@ -162,12 +161,12 @@ worldvariantshader = [
|
|||
|
||||
@(if (wtopt "g") [result [
|
||||
@(? (wtopt "T") [
|
||||
vec3 glowx = texture2D(glowmap, texcoordx).rgb;
|
||||
vec3 glowy = texture2D(glowmap, texcoordy).rgb;
|
||||
vec3 glowz = texture2D(glowmap, texcoordz).rgb;
|
||||
vec3 glowx = texture(glowmap, texcoordx).rgb;
|
||||
vec3 glowy = texture(glowmap, texcoordy).rgb;
|
||||
vec3 glowz = texture(glowmap, texcoordz).rgb;
|
||||
vec3 glow = glowx*triblend.x + glowy*triblend.y + glowz*triblend.z;
|
||||
] [
|
||||
vec3 glow = texture2D(glowmap, texcoord0).rgb;
|
||||
vec3 glow = texture(glowmap, texcoord0).rgb;
|
||||
])
|
||||
glow *= @(? (wtopt "G") [mix(glowcolor.xyz, pulseglowcolor.xyz, pulse)] [glowcolor.xyz]);
|
||||
@(if (wtopt "a") [result [
|
||||
|
@ -178,20 +177,12 @@ worldvariantshader = [
|
|||
]])
|
||||
|
||||
@(if (wtopt "a") [
|
||||
if (wtopt "A") [result [
|
||||
? (wtopt "A") [
|
||||
vec3 rlight = gfetch(refractlight, gl_FragCoord.xy).rgb;
|
||||
@(? (wtopt "m") [
|
||||
gcolor.rgb *= diffuse.a;
|
||||
gglow.rgb += rlight * refractparams.xyz * (1.0 - colorparams.a * diffuse.a);
|
||||
] [
|
||||
gglow.rgb += rlight * refractparams.xyz * (1.0 - colorparams.a);
|
||||
])
|
||||
]] [? (wtopt "m") [
|
||||
gcolor.rgb *= diffuse.a;
|
||||
#define packnorm diffuse.a * colorparams.a
|
||||
gglow.rgb += rlight * refractparams.xyz;
|
||||
] [
|
||||
#define packnorm colorparams.a
|
||||
]]
|
||||
]
|
||||
])
|
||||
|
||||
@(gnormpackdef normal packnorm)
|
||||
|
@ -199,7 +190,7 @@ worldvariantshader = [
|
|||
@(gdepthpackfrag (|| $msaalight [&& $msaasamples [! (wtopt "a")]]) "" hashid)
|
||||
|
||||
@(? (wtopt "b") [
|
||||
float blend = abs(texture2D(blendmap, texcoord1).r - blendlayer);
|
||||
float blend = abs(texture(blendmap, texcoord1).r - blendlayer);
|
||||
gcolor.rgb *= blend;
|
||||
gnormal.rgb *= blend;
|
||||
gnormal.a *= blendlayer;
|
||||
|
@ -227,17 +218,12 @@ worldshader = [
|
|||
worldshader "stdworld" ""
|
||||
forceshader "stdworld"
|
||||
|
||||
worldshader "alphaworld" "m"
|
||||
|
||||
worldshader "specworld" "s"
|
||||
worldshader "specmapworld" "sS"
|
||||
|
||||
worldshader "glowworld" "g"
|
||||
worldshader "pulseglowworld" "gG"
|
||||
|
||||
worldshader "glowalphaworld" "gm"
|
||||
worldshader "pulseglowalphaworld" "gGm"
|
||||
|
||||
worldshader "envworld" "er"
|
||||
worldshader "envspecworld" "esr"
|
||||
worldshader "envspecmapworld" "esSrR"
|
||||
|
@ -259,7 +245,6 @@ worldshader "triplanardetailworld" "Td"
|
|||
// b -> blendmap
|
||||
// a -> transparent
|
||||
// A -> refractive
|
||||
// m -> alpha-mask
|
||||
// T -> triplanar
|
||||
// d -> detail
|
||||
|
||||
|
@ -306,30 +291,30 @@ bumpvariantshader = [
|
|||
srow = 1
|
||||
]
|
||||
variantshader $stype $arg1 $srow [
|
||||
attribute vec4 vvertex, vtangent;
|
||||
attribute vec3 vnormal;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex, vtangent;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 camprojmatrix;
|
||||
uniform vec2 texgenscroll;
|
||||
@(ginterpvert (|| $msaalight [&& $msaasamples [! (btopt "a")]] [btopt "A"]))
|
||||
@(if (btopt "T") [result [
|
||||
uniform vec2 texgenscale;
|
||||
varying vec2 texcoordx, texcoordy, texcoordz;
|
||||
varying vec3 normal;
|
||||
varying vec3 tangentx, tangenty, tangentz;
|
||||
out vec2 texcoordx, texcoordy, texcoordz;
|
||||
out vec3 normal;
|
||||
out vec3 tangentx, tangenty, tangentz;
|
||||
@(? (btopt "d") [uniform vec2 detailscale;])
|
||||
]] [result [
|
||||
varying vec2 texcoord0;
|
||||
varying mat3 world;
|
||||
out vec2 texcoord0;
|
||||
out mat3 world;
|
||||
]])
|
||||
@(? (|| (btopt "p") (btopt "r") (btopt "T")) [
|
||||
uniform vec3 camera;
|
||||
varying vec3 camvec;
|
||||
out vec3 camvec;
|
||||
])
|
||||
@(? (btopt "G") [uniform float millis; flat varying float pulse;])
|
||||
@(? (btopt "G") [uniform float millis; flat out float pulse;])
|
||||
@(? (btopt "b") [
|
||||
uniform vec4 blendmapparams;
|
||||
varying vec2 texcoord1;
|
||||
out vec2 texcoord1;
|
||||
])
|
||||
|
||||
void main(void)
|
||||
|
@ -376,23 +361,23 @@ bumpvariantshader = [
|
|||
uniform vec4 colorparams;
|
||||
uniform sampler2D diffusemap, normalmap;
|
||||
@(? (|| $msaalight [&& $msaasamples [! (btopt "a")]]) [uniform float hashid;])
|
||||
varying mat3 world;
|
||||
in mat3 world;
|
||||
@(ginterpfrag (|| $msaalight [&& $msaasamples [! (btopt "a")]] [btopt "A"]))
|
||||
@(if (btopt "T") [result [
|
||||
varying vec2 texcoordx, texcoordy, texcoordz;
|
||||
varying vec3 normal, tangentx, tangenty, tangentz;
|
||||
in vec2 texcoordx, texcoordy, texcoordz;
|
||||
in vec3 normal, tangentx, tangenty, tangentz;
|
||||
@(? (btopt "d") [uniform sampler2D detaildiffusemap, detailnormalmap;])
|
||||
]] [result [
|
||||
varying vec2 texcoord0;
|
||||
in vec2 texcoord0;
|
||||
]])
|
||||
@(? (|| (btopt "p") (btopt "r") (btopt "T")) [varying vec3 camvec;])
|
||||
@(? (|| (btopt "p") (btopt "r") (btopt "T")) [in vec3 camvec;])
|
||||
@(? (btopt "g") [uniform sampler2D glowmap;])
|
||||
@(? (btopt "G") [flat varying float pulse;])
|
||||
@(? (btopt "G") [flat in float pulse;])
|
||||
@(? (btopt "r") [uniform samplerCube envmap;])
|
||||
@(? (btopt "b") [
|
||||
uniform float blendlayer;
|
||||
uniform sampler2D blendmap;
|
||||
varying vec2 texcoord1;
|
||||
in vec2 texcoord1;
|
||||
])
|
||||
|
||||
void main(void)
|
||||
|
@ -411,9 +396,9 @@ bumpvariantshader = [
|
|||
#define worldz mat3(tangentx, tangenty, normal)
|
||||
|
||||
@(if (btopt "p") [result [
|
||||
float heightx = texture2D(normalmap, texcoordx).a;
|
||||
float heighty = texture2D(normalmap, texcoordy).a;
|
||||
float heightz = texture2D(@(? (btopt "d") "detailnormalmap" "normalmap"), texcoordz).a;
|
||||
float heightx = texture(normalmap, texcoordx).a;
|
||||
float heighty = texture(normalmap, texcoordy).a;
|
||||
float heightz = texture(@(? (btopt "d") "detailnormalmap" "normalmap"), texcoordz).a;
|
||||
vec3 camvect = camvecn * mat3(tangentx, tangenty, tangentz);
|
||||
|
||||
vec2 dtcx = texcoordx + camvect.yz*(heightx*parallaxscale.x + parallaxscale.y);
|
||||
|
@ -425,14 +410,14 @@ bumpvariantshader = [
|
|||
#define dtcz texcoordz
|
||||
]])
|
||||
|
||||
vec4 diffusex = texture2D(diffusemap, dtcx);
|
||||
vec4 diffusey = texture2D(diffusemap, dtcy);
|
||||
vec4 diffusez = texture2D(@(? (btopt "d") "detaildiffusemap" "diffusemap"), dtcz);
|
||||
vec4 diffusex = texture(diffusemap, dtcx);
|
||||
vec4 diffusey = texture(diffusemap, dtcy);
|
||||
vec4 diffusez = texture(@(? (btopt "d") "detaildiffusemap" "diffusemap"), dtcz);
|
||||
vec4 diffuse = diffusex*triblend.x + diffusey*triblend.y + diffusez*triblend.z;
|
||||
|
||||
vec3 bumpx = (texture2D(normalmap, dtcx).rgb*2.0 - 1.0)*triblend.x;
|
||||
vec3 bumpy = (texture2D(normalmap, dtcy).rgb*2.0 - 1.0)*triblend.y;
|
||||
vec3 bumpz = (texture2D(@(? (btopt "d") "detailnormalmap" "normalmap"), dtcz).rgb*2.0 - 1.0)*triblend.z;
|
||||
vec3 bumpx = (texture(normalmap, dtcx).rgb*2.0 - 1.0)*triblend.x;
|
||||
vec3 bumpy = (texture(normalmap, dtcy).rgb*2.0 - 1.0)*triblend.y;
|
||||
vec3 bumpz = (texture(@(? (btopt "d") "detailnormalmap" "normalmap"), dtcz).rgb*2.0 - 1.0)*triblend.z;
|
||||
vec3 bumpw = normalize(worldx*bumpx + worldy*bumpy + worldz*bumpz);
|
||||
|
||||
@(? (btopt "A") [
|
||||
|
@ -440,21 +425,15 @@ bumpvariantshader = [
|
|||
])
|
||||
]] [result [
|
||||
@(? (btopt "p") [
|
||||
float height = texture2D(normalmap, texcoord0).a;
|
||||
float height = texture(normalmap, texcoord0).a;
|
||||
vec2 dtc = texcoord0 + (camvecn * world).xy*(height*parallaxscale.x + parallaxscale.y);
|
||||
] [
|
||||
#define dtc texcoord0
|
||||
])
|
||||
|
||||
vec4 diffuse = texture2D(diffusemap, dtc);
|
||||
vec4 diffuse = texture(diffusemap, dtc);
|
||||
|
||||
@(? (&& (btopt "a") [btopt "m"]) [
|
||||
vec4 normal = texture2D(normalmap, dtc);
|
||||
#define bump normal.rgb
|
||||
] [
|
||||
vec3 bump = texture2D(normalmap, dtc).rgb;
|
||||
])
|
||||
bump = bump*2.0 - 1.0;
|
||||
vec3 bump = texture(normalmap, dtc).rgb*2.0 - 1.0;
|
||||
vec3 bumpw = normalize(world * bump);
|
||||
]])
|
||||
|
||||
|
@ -463,7 +442,7 @@ bumpvariantshader = [
|
|||
@(if (btopt "r") [result [
|
||||
float invfresnel = dot(camvecn, bumpw);
|
||||
vec3 rvec = 2.0*bumpw*invfresnel - camvecn;
|
||||
vec3 reflect = textureCube(envmap, rvec).rgb;
|
||||
vec3 reflect = texture(envmap, rvec).rgb;
|
||||
@(? (btopt "R") [
|
||||
vec3 rmod = envscale.xyz*diffuse.a;
|
||||
] [
|
||||
|
@ -474,12 +453,12 @@ bumpvariantshader = [
|
|||
|
||||
@(if (btopt "g") [result [
|
||||
@(? (btopt "T") [
|
||||
vec3 glowx = texture2D(glowmap, dtcx).rgb;
|
||||
vec3 glowy = texture2D(glowmap, dtcy).rgb;
|
||||
vec3 glowz = texture2D(glowmap, dtcz).rgb;
|
||||
vec3 glowx = texture(glowmap, dtcx).rgb;
|
||||
vec3 glowy = texture(glowmap, dtcy).rgb;
|
||||
vec3 glowz = texture(glowmap, dtcz).rgb;
|
||||
vec3 glow = glowx*triblend.x + glowy*triblend.y + glowz*triblend.z;
|
||||
] [
|
||||
vec3 glow = texture2D(glowmap, dtc).rgb;
|
||||
vec3 glow = texture(glowmap, dtc).rgb;
|
||||
])
|
||||
glow *= @(? (btopt "G") [mix(glowcolor.xyz, pulseglowcolor.xyz, pulse)] [glowcolor.xyz]);
|
||||
@(if (btopt "a") [result [
|
||||
|
@ -490,22 +469,14 @@ bumpvariantshader = [
|
|||
]])
|
||||
|
||||
@(if (btopt "a") [
|
||||
if (btopt "A") [result [
|
||||
? (btopt "A") [
|
||||
vec2 rtc = bump.xy*refractparams.w;
|
||||
float rmask = clamp(refractdepth*(lineardepth - dot(gfetch(refractmask, gl_FragCoord.xy + rtc).rgb, gdepthunpackparams)), 0.0, 1.0);
|
||||
vec3 rlight = gfetch(refractlight, gl_FragCoord.xy + rtc*rmask).rgb;
|
||||
@(? (btopt "m") [
|
||||
gcolor.rgb *= normal.a;
|
||||
gglow.rgb += rlight * refractparams.xyz * (1.0 - colorparams.a * normal.a);
|
||||
] [
|
||||
gglow.rgb += rlight * refractparams.xyz * (1.0 - colorparams.a);
|
||||
])
|
||||
]] [? (btopt "m") [
|
||||
gcolor.rgb *= normal.a;
|
||||
#define packnorm normal.a * colorparams.a
|
||||
gglow.rgb += rlight * refractparams.xyz;
|
||||
] [
|
||||
#define packnorm colorparams.a
|
||||
]]
|
||||
]
|
||||
])
|
||||
|
||||
@(gnormpackdef bumpw packnorm)
|
||||
|
@ -513,7 +484,7 @@ bumpvariantshader = [
|
|||
@(gdepthpackfrag (|| $msaalight [&& $msaasamples [! (btopt "a")]]) "" hashid)
|
||||
|
||||
@(? (btopt "b") [
|
||||
float blend = abs(texture2D(blendmap, texcoord1).r - blendlayer);
|
||||
float blend = abs(texture(blendmap, texcoord1).r - blendlayer);
|
||||
gcolor.rgb *= blend;
|
||||
gnormal.rgb *= blend;
|
||||
gnormal.a *= blendlayer;
|
||||
|
@ -542,10 +513,6 @@ bumpshader "bumpworld" ""
|
|||
bumpshader "bumpspecworld" "s"
|
||||
bumpshader "bumpspecmapworld" "sS"
|
||||
|
||||
bumpshader "bumpalphaworld" "m"
|
||||
bumpshader "bumpspecalphaworld" "sm"
|
||||
bumpshader "bumpspecmapalphaworld" "sSm"
|
||||
|
||||
bumpshader "bumpglowworld" "g"
|
||||
bumpshader "bumpspecglowworld" "sg"
|
||||
bumpshader "bumpspecmapglowworld" "sSg"
|
||||
|
@ -606,8 +573,8 @@ bumpshader "triplanardetailbumpparallaxworld" "Tdp"
|
|||
bumpshader "triplanardetailbumpspecparallaxworld" "Tdps"
|
||||
bumpshader "triplanardetailbumpspecmapparallaxworld" "TdpsS"
|
||||
|
||||
shader 0 "smworld" [
|
||||
attribute vec4 vvertex;
|
||||
shader 0 shadowmapworld [
|
||||
in vec4 vvertex;
|
||||
uniform mat4 shadowmatrix;
|
||||
void main(void)
|
||||
{
|
||||
|
@ -619,102 +586,21 @@ shader 0 "smworld" [
|
|||
}
|
||||
]
|
||||
|
||||
// shadowmaptype:
|
||||
// a -> transparent
|
||||
// m -> alpha-mask
|
||||
// n -> normalmap
|
||||
|
||||
smtopt = [ >= (strstr $shadowmaptype $arg1) 0 ]
|
||||
|
||||
shadowmapworldvariantshader = [
|
||||
local shadowmaptype
|
||||
shadowmaptype = $arg2
|
||||
srow = -1
|
||||
if (smtopt "m") [
|
||||
srow = 0
|
||||
]
|
||||
if (smtopt "n") [
|
||||
srow = 1
|
||||
]
|
||||
variantshader 1 $arg1 $srow [
|
||||
attribute vec4 vvertex;
|
||||
|
||||
attribute vec2 vtexcoord0;
|
||||
uniform vec2 texgenscroll;
|
||||
uniform vec4 colorparams;
|
||||
varying vec2 texcoord0;
|
||||
|
||||
uniform mat4 shadowmatrix;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = shadowmatrix * vvertex;
|
||||
|
||||
texcoord0 = vtexcoord0 + texgenscroll;
|
||||
}
|
||||
] [
|
||||
uniform vec4 colorparams;
|
||||
uniform sampler2D diffusemap;
|
||||
varying vec2 texcoord0;
|
||||
|
||||
@(? (smtopt "n") [
|
||||
uniform sampler2D normalmap;
|
||||
])
|
||||
|
||||
fragdata(0) vec4 gcolor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
vec4 diffuse = texture2D(diffusemap, texcoord0);
|
||||
|
||||
@(if (smtopt "a") [result [
|
||||
float alpha = colorparams.a;
|
||||
@(if (smtopt "m") [result [
|
||||
@(? (smtopt "n") [
|
||||
alpha *= texture2D(normalmap, texcoord0).a;
|
||||
] [
|
||||
alpha *= diffuse.a;
|
||||
])
|
||||
#define mask alpha
|
||||
]] [result [
|
||||
#define mask 0.0
|
||||
]])
|
||||
]] [result [
|
||||
#define alpha 1.0
|
||||
#define mask 1.0
|
||||
]])
|
||||
|
||||
gcolor.rgb = mix(vec3(1.0), diffuse.rgb*colorparams.rgb, alpha) * (1.0 - mask);
|
||||
gcolor.a = alpha;
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
shadowmapshader = [
|
||||
defershader 1 $arg1 [
|
||||
shadowmapworldvariantshader @arg1 @arg2
|
||||
shadowmapworldvariantshader @arg1 @(concatword $arg2 "m")
|
||||
shadowmapworldvariantshader @arg1 @(concatword $arg2 "mn")
|
||||
]
|
||||
]
|
||||
|
||||
shadowmapshader "smalphaworld" "a"
|
||||
|
||||
defershader 1 "rsmworld" [
|
||||
loop i 2 [
|
||||
variantshader 1 "rsmworld" (- $i 1) [
|
||||
attribute vec4 vvertex;
|
||||
attribute vec3 vnormal;
|
||||
attribute vec2 vtexcoord0;
|
||||
in vec4 vvertex;
|
||||
in vec3 vnormal;
|
||||
in vec2 vtexcoord0;
|
||||
uniform mat4 rsmmatrix;
|
||||
uniform vec2 texgenscroll;
|
||||
uniform vec4 colorparams;
|
||||
uniform vec3 rsmdir;
|
||||
varying vec4 normal;
|
||||
varying vec2 texcoord0;
|
||||
out vec4 normal;
|
||||
out vec2 texcoord0;
|
||||
@(? (= $i 1) [
|
||||
uniform vec4 blendmapparams;
|
||||
varying vec2 texcoord1;
|
||||
out vec2 texcoord1;
|
||||
])
|
||||
void main(void)
|
||||
{
|
||||
|
@ -728,18 +614,18 @@ defershader 1 "rsmworld" [
|
|||
] [
|
||||
uniform vec4 colorparams;
|
||||
uniform sampler2D diffusemap;
|
||||
varying vec4 normal;
|
||||
varying vec2 texcoord0;
|
||||
in vec4 normal;
|
||||
in vec2 texcoord0;
|
||||
@(? (= $i 1) [
|
||||
uniform float blendlayer;
|
||||
uniform sampler2D blendmap;
|
||||
varying vec2 texcoord1;
|
||||
in vec2 texcoord1;
|
||||
])
|
||||
fragdata(0) vec4 gcolor;
|
||||
fragdata(1) vec4 gnormal;
|
||||
layout(location = 0) out vec4 gcolor;
|
||||
layout(location = 1) out vec4 gnormal;
|
||||
void main(void)
|
||||
{
|
||||
vec4 diffuse = texture2D(diffusemap, texcoord0);
|
||||
vec4 diffuse = texture(diffusemap, texcoord0);
|
||||
|
||||
@(if (= $i 2) [result [
|
||||
#define alpha 1.0
|
||||
|
@ -751,7 +637,7 @@ defershader 1 "rsmworld" [
|
|||
gnormal = vec4(normal.xyz*0.5+0.5, 0.0);
|
||||
|
||||
@(if (= $i 1) [result [
|
||||
float blend = abs(texture2D(blendmap, texcoord1).r - blendlayer);
|
||||
float blend = abs(texture(blendmap, texcoord1).r - blendlayer);
|
||||
gcolor.rgb *= blend;
|
||||
gcolor.a = blendlayer;
|
||||
gnormal *= blend;
|
||||
|
|
82
config/server-init.cfg
Normal file
|
@ -0,0 +1,82 @@
|
|||
// basic server configuration script
|
||||
// note that some commands are commented out with //, and need to be uncommented and set to a value to work
|
||||
|
||||
// optional specific IP for server to use
|
||||
// serverip N.N.N.N
|
||||
|
||||
// optional specific port for server to use
|
||||
// serverport 42000
|
||||
|
||||
// maximum number of allowed clients
|
||||
maxclients 8
|
||||
|
||||
// maximum number of bots a master can add - admins are unaffected by this limit
|
||||
// set to 0 to disallow bots
|
||||
serverbotlimit 8
|
||||
|
||||
// controls whether or not the server is intended for "public" use
|
||||
// when set to 0, allows "setmaster 1" and locked/private mastermodes (for coop-editing and such)
|
||||
// when set to 1, can only gain master by "auth" or admin, and doesn't allow locked/private mastermodes
|
||||
// when set to 2, allows "setmaster 1" but disallows private mastermode (for public coop-editing)
|
||||
publicserver 0
|
||||
|
||||
// description server shows for the server browser
|
||||
serverdesc ""
|
||||
|
||||
// password required to connect to the server
|
||||
// generally unnecessary unless you really don't want anyone connecting to your server
|
||||
// using the serverauth option allows people with an appropriate local authkey to connect regardless
|
||||
// serverpass ""
|
||||
|
||||
// password that allows you to gain admin by "setmaster password_here"
|
||||
// local authkeys are more secure than this and should be used instead if possible
|
||||
// adminpass ""
|
||||
|
||||
// domain to use for local authkeys to the server so people can authenticate by "auth domain_here"
|
||||
// must be a non-empty string that should be unique to your server to prevent clashes with other servers
|
||||
// serverauth ""
|
||||
|
||||
// controls whether or not the server reports to the masterserver
|
||||
updatemaster 1
|
||||
|
||||
// optional message of the day to send to players on connect
|
||||
// servermotd "..."
|
||||
|
||||
// controls whether admin privs are necessary to record a demo
|
||||
// when 1 requires admin (default)
|
||||
// when 0 only requires master
|
||||
// restrictdemos 1
|
||||
|
||||
// maximum number of demos the server will store
|
||||
// maxdemos 5
|
||||
|
||||
// maximum size a demo is allowed to grow to in megabytes
|
||||
// maxdemosize 16
|
||||
|
||||
// controls whether admin privs are necessary to pause a game
|
||||
// when 1 requires admin (default)
|
||||
// when 0 only requires master
|
||||
// restrictpausegame 1
|
||||
|
||||
// whether or not to allow players to vote on maps not in the rotation
|
||||
// when 1 requires master
|
||||
// when 2 requires admin
|
||||
// when 0 allows any votes (default)
|
||||
// lockmaprotation 0
|
||||
|
||||
dmmaps = [
|
||||
complex alphacorp ot turbine reflection
|
||||
]
|
||||
ctfmaps = [
|
||||
alphacorp steelribs test_ctf reflection waterworks
|
||||
]
|
||||
tdmmaps = (listunion $dmmaps $ctfmaps)
|
||||
|
||||
maprotationreset
|
||||
maprotation "*" $dmmaps
|
||||
maprotation "?tdm" $tdmmaps
|
||||
maprotation "?ctf" $ctfmaps
|
||||
|
||||
teamkillkickreset
|
||||
teamkillkick "*" 7 30
|
||||
|
46
config/sound.cfg
Normal file
|
@ -0,0 +1,46 @@
|
|||
defaultsoundpack = [
|
||||
soundreset
|
||||
registersound "uphys/jump" 60
|
||||
registersound "uphys/land" 180
|
||||
registersound "uphys/splashin" 160
|
||||
registersound "uphys/splashout" 100
|
||||
registersound "soundsnap/burn" 210
|
||||
registersound // itemspawn
|
||||
registersound "q009/teleport" 255
|
||||
registersound "uphys/jumppad" 100
|
||||
registersound "uphys/punch_swing" 190
|
||||
registersound "uphys/pulse_third" 255
|
||||
registersound "uphys/pulse_first" 255
|
||||
registersound "uphys/pulse_burst" 255
|
||||
registersound "dacker/rail_third" 255
|
||||
registersound "dacker/rail_first" 255
|
||||
registersound "uphys/weapon_switch" 50
|
||||
registersound // noammo
|
||||
registersound "free/hit" 100
|
||||
registersound // pain1
|
||||
registersound // pain2
|
||||
registersound "uphys/die1" 150
|
||||
registersound "uphys/die2" 150
|
||||
registersound "ctf/flagpickup" 100
|
||||
registersound "ctf/flagdrop" 100
|
||||
registersound "ctf/flagreturn" 100
|
||||
registersound "ctf/flagscore" 100
|
||||
registersound "ctf/flagreturn" 100
|
||||
registersound "ctf/flagfail" 100
|
||||
]
|
||||
|
||||
loadsoundpack = [
|
||||
if $soundpack [
|
||||
if (! (exec [media/sound/game/@soundpack/soundpack.cfg] 0)) [
|
||||
error [Failed to load soundpack: @soundpack. Using default sounds.]
|
||||
defaultsoundpack
|
||||
]
|
||||
] [
|
||||
defaultsoundpack
|
||||
]
|
||||
]
|
||||
|
||||
defsvarp soundpack "" [loadsoundpack]
|
||||
|
||||
defaultsoundpack
|
||||
|
577
config/ui.cfg
Normal file
|
@ -0,0 +1,577 @@
|
|||
// standard menu definitions
|
||||
// don't modify, add personal menus to autoexec.cfg instead
|
||||
|
||||
exec "config/ui/lib.cfg" // UI library
|
||||
exec "config/ui/style.cfg" // Styles
|
||||
exec "config/ui/scoreboard.cfg" // Scoreboard
|
||||
exec "config/ui/edithud.cfg" // Edit HUD
|
||||
exec "config/ui/fkey.cfg" // F# Key Menus
|
||||
exec "config/ui/serverbrowser.cfg" // Server Browser
|
||||
exec "config/ui/stats.cfg" // Player Stats
|
||||
exec "config/ui/options.cfg" // Options Menu
|
||||
|
||||
reui = [
|
||||
exec "config/ui.cfg"
|
||||
]
|
||||
|
||||
togglemainmenu = [|| hidetopui [toggleui main]]
|
||||
|
||||
bind ESCAPE [togglemainmenu]
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Main //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UImenu "main" [
|
||||
uieschide (! $mainmenu)
|
||||
uihlist 0 [
|
||||
uivlist 0 [
|
||||
UIbutton "hold2" [uitext "Server Browser" 0.65] 0.2 0.04 [hideui "main" ; showui "server_browser"]
|
||||
UIbutton "hold2" [uitext "Map Browser" 0.65] 0.2 0.04 [hideui "main" ; showui "map_browser"]
|
||||
uifill 0.2 0.02 [UIbar 1]
|
||||
UIbutton "hold2" [uitext "Player Setup" 0.65] 0.2 0.04 [hideui "main" ; showui "player_setup"]
|
||||
UIbutton "hold2" [uitext "Options" 0.65] 0.2 0.04 [hideui "main" ; showui "options"]
|
||||
if $mainmenu [
|
||||
UIbutton "hold2" [uitext "Credits" 0.65] 0.2 0.04 [hideui "main" ; showui "credits"]
|
||||
]
|
||||
uifill 0.2 0.02 [UIbar 1]
|
||||
UIbutton "hold2" [uitext "Quit" 0.65] 0.2 0.04 [quit]
|
||||
]
|
||||
if (! $mainmenu) [
|
||||
uifill 0.02 0.24 [UIbar 0 1]
|
||||
uivlist 0 [
|
||||
if (isspectator $getclientnum) [
|
||||
if $scoreboardmultiplayer [
|
||||
if (ismaster $getclientnum) [
|
||||
UIbutton "hold2" [uitext "Play" 0.65] 0.2 0.04 [hideui "main" ; spectator 0]
|
||||
] [
|
||||
if (> $getmastermode 1) [
|
||||
uifill 0 0.04 [uitext "^f4Play" 0.65]
|
||||
] [
|
||||
UIbutton "hold2" [uitext "Play" 0.65] 0.2 0.04 [hideui "main" ; spectator 0]
|
||||
]
|
||||
]
|
||||
] [
|
||||
UIbutton "hold2" [uitext "Play" 0.65] 0.2 0.04 [hideui "main" ; spectator 0]
|
||||
]
|
||||
] [
|
||||
UIbutton "hold2" [uitext "Spectate" 0.65] 0.2 0.04 [hideui "main" ; spectator 1]
|
||||
]
|
||||
case $getteam [
|
||||
0] [uifill 0 0.04] [
|
||||
1] [UIbutton "hold2" [uitext "Join ^f3Rojo" 0.65] 0.2 0.04 [team rojo]] [
|
||||
2] [UIbutton "hold2" [uitext "Join ^f1Azul" 0.65] 0.2 0.04 [team azul]]
|
||||
uifill 0.2 0.02 [UIbar 1]
|
||||
if $scoreboardmultiplayer [
|
||||
UIbutton "hold2" [uitext "Master" 0.65] 0.2 0.04 [hideui "main" ; showui "master"]
|
||||
if (ismaster $getclientnum) [
|
||||
UIbutton "hold2" [uitext "Bots" 0.65] 0.2 0.04 [hideui "main" ; showui "bots"]
|
||||
] [
|
||||
uifill 0 0.04
|
||||
]
|
||||
] [
|
||||
uifill 0 0.04
|
||||
UIbutton "hold2" [uitext "Bots" 0.65] 0.2 0.04 [hideui "main" ; showui "bots"]
|
||||
]
|
||||
uifill 0.2 0.02 [UIbar 1]
|
||||
UIbutton "hold2" [uitext "Disconnect" 0.65] 0.2 0.04 [disconnect]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Player Setup //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UI_pmodel = 0
|
||||
UI_pteam = 0
|
||||
UI_pweapon = 1
|
||||
|
||||
UImenu "player_setup" [
|
||||
uihlist 0.01 [
|
||||
uivlist 0 [
|
||||
uiplayerpreview $UI_pmodel (case $UI_pteam 0 $playercolor 1 $playercolorazul 2 $playercolorrojo) $UI_pteam $UI_pweapon 0.4 0.5 [
|
||||
style_generic_default
|
||||
uiclamp* 1 1 1 1
|
||||
]
|
||||
uihlist 0 [
|
||||
uiclamp 1 1
|
||||
UIbutton "" [
|
||||
UIradio [= $UI_pweapon 0] 0.016
|
||||
uitext "Railgun" 0.6
|
||||
] 0 0.032 [UI_pweapon = 0] -1
|
||||
UIbutton "" [
|
||||
UIradio [= $UI_pweapon 1] 0.016
|
||||
uitext "Pulse Rifle" 0.6
|
||||
] 0 0.032 [UI_pweapon = 1] -1
|
||||
uiclamp* 1 1
|
||||
]
|
||||
]
|
||||
uivlist 0.01 [
|
||||
uialign -2 -1
|
||||
uivlist 0.0037 [
|
||||
uitext "Name" 0.7
|
||||
uifield name 15 [] 0.7 [uioutline (uifocus? $c_focus $c_line); uiclamp- 1 1 1 1]
|
||||
]
|
||||
looplist3 v t l [
|
||||
"playercolor" 0 9
|
||||
"playercolorazul" 1 4
|
||||
"playercolorrojo" 2 4
|
||||
] [
|
||||
uivlist 0.0037 [
|
||||
case $t 1 [
|
||||
uitext "^f8Azul" 0.7
|
||||
] 2 [
|
||||
uitext "^f3Rojo" 0.7
|
||||
] () [uitext "Solo" 0.7]
|
||||
uigrid (? (< $t 1) 3 2) 0.005 0.005 [
|
||||
local color
|
||||
uihover [UI_pteam = $t]
|
||||
loop i $l [
|
||||
color = (getplayercolor $i $t)
|
||||
uicolor $color 0.0458 0.0458 [
|
||||
uioutline (? (= $$v $i) $c_fill $color)
|
||||
uiclamp- 1 1 1 1
|
||||
uipress [$v $i]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
] [] [] [] "Player Setup"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Credits //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UI_creditlist = [
|
||||
UItitle [
|
||||
uispace 0.015 0 [
|
||||
uialign -1 -2
|
||||
uihlist 0.01 [
|
||||
uiimage "media/interface/cube.png" 0.03 0.03
|
||||
uitext [@@@@arg1] 0.7
|
||||
]
|
||||
]
|
||||
] 0 0.032
|
||||
uispace 0.03 0 [
|
||||
uifill 0 0 [
|
||||
uiclamp 1 1
|
||||
uimodhgradient 0xC0C0C0 0xFFFFFF
|
||||
uiclamp- 1 1 1 1
|
||||
uispace 0.02 0.01 [
|
||||
uialign -1 -2
|
||||
uivlist 0 [
|
||||
looplist i $arg2 [
|
||||
uiwraptext (strreplace (strreplace $i "^"" "^fs^f8^"" "^"^fr") ": " "^f4: ") 0.69 0.6
|
||||
]
|
||||
uialign* -1 -2
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
uifill 0 0.02
|
||||
]
|
||||
|
||||
UImenu "credits" [
|
||||
uihlist 0.01 [
|
||||
uiscroll 0.8 0.8 [
|
||||
uifill 0.77
|
||||
uivlist 0.0008 [
|
||||
uiclamp 1 1
|
||||
uialign -2 -1
|
||||
// Alphabetized by alias
|
||||
UI_creditlist "Project" [
|
||||
[Lee "eihrul" Salzman : Code Gatekeeper]
|
||||
[Shane "Nieb" Nieb : Media Gatekeeper]
|
||||
]
|
||||
UI_creditlist "Code" [
|
||||
[Lee "eihrul" Salzman]
|
||||
[Benjamin Segovia]
|
||||
[Kevin "Hirato Kirata" Meyer]
|
||||
]
|
||||
UI_creditlist "Art" [
|
||||
[Shane "Nieb" Nieb : Playermodel, Mapmodels, Textures]
|
||||
]
|
||||
UI_creditlist "Sound" [
|
||||
[Dylan "Dacker" Ackerly]
|
||||
[Shane "Nieb" Nieb]
|
||||
[Sławomir "Q009" Błauciak]
|
||||
[Jannic "Uphys" Böhme]
|
||||
]
|
||||
UI_creditlist "Cartography" [
|
||||
[Dylan "Dacker" Ackerly : complex]
|
||||
[Shane "Nieb" Nieb : complex, test_ctf]
|
||||
[Sławomir "Q009" Błauciak : steelribs]
|
||||
[Jack "Pritchard" Viney : alphacorp]
|
||||
[Kurt Kessler : waterworks]
|
||||
[James 'Skur' Rucks : reflection]
|
||||
[Yannick 'Snowy' Weber : reflection]
|
||||
]
|
||||
UI_creditlist "Miscellaneous" [
|
||||
[Kevin "Hirato Kirata" Meyer : CubeScript Documentation]
|
||||
[Shane "Nieb" Nieb : UI Design, Tesseract Website]
|
||||
[Daniel "q66" Kolesa : Build-system Improvements]
|
||||
["RaZgRiZ" : UI Documentation, UI Design]
|
||||
]
|
||||
UI_creditlist "Cube Engine 2" [
|
||||
[Wouter "Aardappel" van Oortmerssen]
|
||||
[Lee "eihrul" Salzman]
|
||||
[Mike "Gilt" Dysart]
|
||||
[Robert "baby-rabbit" Pointon]
|
||||
[Quinton "Quin" Reeves]
|
||||
[John "geartrooper" Siar]
|
||||
[and others...]
|
||||
"http://sauerbraten.org/"
|
||||
]
|
||||
uiclamp* 1 1
|
||||
]
|
||||
]
|
||||
UIvscroll 0.02 0.8 2.0
|
||||
]
|
||||
] [] [] [] "Tesseract Contributors"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Master //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
menu_master = [if $isconnected [if $scoreboardmultiplayer [toggleui "master"]]]
|
||||
|
||||
UImenu "master" [
|
||||
uifill 0 0 [
|
||||
uivlist 0 [
|
||||
uihlist 0.01 [
|
||||
if (ismaster $getclientnum) [
|
||||
UIbutton "" [uitext "Relinquish Master" 0.65] 0.24 0.06 [setmaster 0]
|
||||
] [
|
||||
if (issomeoneelsemaster) [
|
||||
UIbutton "" [uitext "^f4Claim Master" 0.65] 0.24 0.06 []
|
||||
] [
|
||||
UIbutton "" [uitext "Claim Master" 0.65] 0.24 0.06 [setmaster 1]
|
||||
]
|
||||
]
|
||||
if (ismaster $getclientnum) [
|
||||
uigrid 2 0 0 [
|
||||
looplist2 n i [
|
||||
"^f0open ^f4(0)" 0 "^f0veto ^f4(1)" 1
|
||||
"^f2locked ^f4(2)" 2 "^f3private ^f4(3)" 3
|
||||
] [
|
||||
UIbutton "" [
|
||||
UIradio [= $getmastermode $i] 0.016
|
||||
uitext $n 0.6
|
||||
] 0.16 0.03 [mastermode $i] -1
|
||||
]
|
||||
]
|
||||
uivlist 0 [
|
||||
UIbutton "" [uitext "Clearbans" 0.65] 0.16 0.03 [clearbans]
|
||||
UIbutton "" [uitext "Bots" 0.65] 0.16 0.03 [hideui "main" ; showui "bots"]
|
||||
]
|
||||
] [
|
||||
uifill 0.49
|
||||
]
|
||||
]
|
||||
uifill 0 0.02 [UIbar 1 ; uiclamp 1 1 1 1]
|
||||
if (ismaster $getclientnum) [
|
||||
if (> $getmode 2) [UI_clientlistteam] [UI_clientlistsolo]
|
||||
] [
|
||||
if (> $getmode 2) [uifill 1.43 0.312] [uifill 0 0.624]
|
||||
]
|
||||
]
|
||||
]
|
||||
] [] [] [] "Master"
|
||||
|
||||
UI_clientlistsolo = [
|
||||
uihlist 0 [
|
||||
uiscroll 0.71 0.624 [
|
||||
uifill 0.71 0.624 [
|
||||
uitable 0 0 [
|
||||
UI_mlc = 0
|
||||
looplist cn (listclients 1 0) [
|
||||
uitablerow [
|
||||
uifill 0.078 0.026 [
|
||||
uicolortext (concatword $cn " : ") (scoreboardstatus $cn) 0.57
|
||||
uialign- 1
|
||||
]
|
||||
uifill 0.362 0.026 [
|
||||
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
|
||||
uialign- -1
|
||||
]
|
||||
if (= $cn $getclientnum)[
|
||||
uifill 0.077 0.026
|
||||
] [
|
||||
UIbutton "hold2" [
|
||||
UItriangle 0xCCCCCC 0.01 0.01 270
|
||||
uitext "Kick" 0.57
|
||||
] 0.077 0.026 [kick @cn] -1
|
||||
]
|
||||
UIbutton "hold2" [
|
||||
UIradio [= (isspectator $cn) 1] 0.016
|
||||
uitext "Spec" 0.57
|
||||
] 0.087 0.026 [spectator @(= (isspectator $cn) 0) @cn] -1
|
||||
UIbutton "hold2" [
|
||||
UIradio [= (ismaster $cn) 1] 0.016
|
||||
uitext (concatword (? (isadmin $cn) "Admin" (? (isauth $cn) "Auth" "Master"))) 0.57
|
||||
] 0.105 0.026 [setmaster (? (ismaster $cn) 0 1) @cn] -1
|
||||
] [
|
||||
UI_mlc = (! $UI_mlc)
|
||||
uicolor (? $UI_mlc 0x99323232 0x99262626) 0 0 [
|
||||
uiclamp 1 1 1 1
|
||||
pushif highlight (scoreboardhighlight $cn) [
|
||||
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
uialign* -1 -1
|
||||
]
|
||||
]
|
||||
uifill 0.01
|
||||
UIvscroll 0.02 0.624 1.56
|
||||
]
|
||||
]
|
||||
|
||||
UI_clientlistteam = [
|
||||
uihlist 0 [
|
||||
uiscroll 1.4 0.312 [
|
||||
uifill 1.4 0.312 [
|
||||
uihlist 0 [
|
||||
uialign 0 -1
|
||||
uitable 0 0 [
|
||||
uifill 0.695
|
||||
UI_mlc = 0
|
||||
looplist cn (listclients 1 0) [
|
||||
if (= (getclientteam $cn) 1) [
|
||||
uitablerow [
|
||||
uifill 0.078 0.026 [
|
||||
uicolortext (concatword $cn " : ") (scoreboardstatus $cn) 0.57
|
||||
uialign- 1
|
||||
]
|
||||
uifill 0.26 0.026 [
|
||||
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
|
||||
uialign- -1
|
||||
]
|
||||
if (= $cn $getclientnum)[
|
||||
uifill 0.077 0.026
|
||||
] [
|
||||
UIbutton "hold2" [
|
||||
UItriangle 0xCCCCCC 0.01 0.01 270
|
||||
uitext "Kick" 0.57
|
||||
] 0.077 0.026 [kick @cn] -1
|
||||
]
|
||||
UIbutton "hold2" [
|
||||
UItriangle 0xCCCCCC 0.01 0.01 270
|
||||
uitext "Team" 0.57
|
||||
] 0.0875 0.026 [setteam @cn @(? (=s (getclientteam $cn) "1") "2" "1")] -1
|
||||
UIbutton "hold2" [
|
||||
UIradio [= (isspectator $cn) 1] 0.016
|
||||
uitext "Spec" 0.57
|
||||
] 0.087 0.026 [spectator @(= (isspectator $cn) 0) @cn] -1
|
||||
UIbutton "hold2" [
|
||||
UIradio [= (ismaster $cn) 1] 0.016
|
||||
uitext (concatword (? (isadmin $cn) "Admin" (? (isauth $cn) "Auth" "Master"))) 0.57
|
||||
] 0.105 0.026 [setmaster (? (ismaster $cn) 0 1) @cn] -1
|
||||
] [
|
||||
UI_mlc = (! $UI_mlc)
|
||||
uicolor (? $UI_mlc 0x99333b40 0x99262b33) 0 0 [
|
||||
uiclamp 1 1 1 1
|
||||
pushif highlight (scoreboardhighlight $cn) [
|
||||
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
uifill 0.01
|
||||
uitable 0 0 [
|
||||
uifill 0.695
|
||||
UI_mlc = 0
|
||||
looplist cn (listclients 1 0) [
|
||||
if (= (getclientteam $cn) 2) [
|
||||
uitablerow [
|
||||
uifill 0.078 0.026 [
|
||||
uicolortext (concatword $cn " : ") (scoreboardstatus $cn) 0.57
|
||||
uialign- 1
|
||||
]
|
||||
uifill 0.26 0.026 [
|
||||
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
|
||||
uialign- -1
|
||||
]
|
||||
if (= $cn $getclientnum)[
|
||||
uifill 0.077 0.026
|
||||
] [
|
||||
UIbutton "hold2" [
|
||||
UItriangle 0 0.01 0.01 270
|
||||
uitext "Kick" 0.57
|
||||
] 0.077 0.026 [kick @cn] -1
|
||||
]
|
||||
UIbutton "hold2" [
|
||||
UItriangle 0 0.01 0.01 270
|
||||
uitext "Team" 0.57
|
||||
] 0.0875 0.026 [setteam @cn @(? (=s (getclientteam $cn) "1") "2" "1")] -1
|
||||
UIbutton "hold2" [
|
||||
UIradio [= (isspectator $cn) 1] 0.016
|
||||
uitext "Spec" 0.57
|
||||
] 0.087 0.026 [spectator @(= (isspectator $cn) 0) @cn] -1
|
||||
UIbutton "hold2" [
|
||||
UIradio [= (ismaster $cn) 1] 0.016
|
||||
uitext (concatword (? (isadmin $cn) "Admin" (? (isauth $cn) "Auth" "Master"))) 0.57
|
||||
] 0.105 0.026 [setmaster (? (ismaster $cn) 0 1) @cn] -1
|
||||
] [
|
||||
UI_mlc = (! $UI_mlc)
|
||||
uicolor (? $UI_mlc 0x99403333 0x99332626) 0 0 [
|
||||
uiclamp 1 1 1 1
|
||||
pushif highlight (scoreboardhighlight $cn) [
|
||||
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
uialign* 0 -1
|
||||
]
|
||||
]
|
||||
]
|
||||
uifill 0.01
|
||||
UIvscroll 0.02 0.312 1.56
|
||||
]
|
||||
]
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Bots //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UI_botskill = 87
|
||||
UI_botaddnum = 9
|
||||
|
||||
UImenu "bots" [
|
||||
uifill 0.65 0.27 [
|
||||
uivlist 0.01 [
|
||||
uitext (concatword "Bots: " (numbots)) 0.6
|
||||
uifill 0 0.01
|
||||
uihlist 0.01 [
|
||||
uialign 1 ; uitext "Skill Level" 0.6 ; UIhslider UI_botskill 1 100 1 0.5 0.032 [uitext $UI_botskill 0.6]
|
||||
]
|
||||
uihlist 0.01 [
|
||||
uialign 1 ; uitext "#" 0.6 ; UIhslider UI_botaddnum 2 32 1 0.5 0.032 [uitext $UI_botaddnum 0.6]
|
||||
]
|
||||
uifill 0 0.015
|
||||
uihlist 0.05 [
|
||||
uivlist 0.01 [
|
||||
UIbutton "" [uitext "Add Bot" 0.65 ; UI_keyref 1 0.027 0.027 "Ins" "" 0.4] 0.2 0.04 [addbot $UI_botskill]
|
||||
UIbutton "" [uitext (concatword "Add " $UI_botaddnum " Bots") 0.65] 0.2 0.04 [loop a (UI_botaddnum) [addbot $UI_botskill]]
|
||||
]
|
||||
uivlist 0.01 [
|
||||
UIbutton "" [uitext "Delete Bot" 0.65 ; UI_keyref 1 0.027 0.027 "Del" "" 0.4] 0.2 0.04 [delbot]
|
||||
UIbutton "" [uitext "Clear Bots" 0.65] 0.2 0.04 [clearbots]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
] [] [] [] "Bots"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Display Changes //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UImenu "changes" [
|
||||
uivlist 0.02 [
|
||||
uiclamp 1 1
|
||||
UItitle [uitext "Apply changes for:" 0.6] 0 0.03
|
||||
uiclamp- 1 1
|
||||
uivlist 0.01 [
|
||||
loop i $pendingchanges [
|
||||
uitext (concatword "^f8" (pendingchanges $i)) 0.6
|
||||
]
|
||||
]
|
||||
uihlist 0 [
|
||||
UIbutton "hold2" [uitext "Yes" 0.6] 0.18 0.032 [applychanges]
|
||||
UIbutton "hold2" [uitext "No" 0.6] 0.18 0.032 [hideui "changes"]
|
||||
]
|
||||
]
|
||||
] [if (= $pendingchanges 0) [hideui "changes"]]
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Notepad //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UI_notepadfile = "untitled.txt"
|
||||
UI_cmc_from = ""
|
||||
UI_cmc_to = ""
|
||||
|
||||
UImenu "notepad" [
|
||||
uivlist 0.01 [
|
||||
uihlist 0.01 [
|
||||
uialign -1 -2
|
||||
uifield UI_notepadfile -35 [] 0.6 [
|
||||
uioutline (uifocus? 0xFF0000 $c_line)
|
||||
uiclamp- 1 1 1 1
|
||||
]
|
||||
UIbutton "hold2" [uitext "Load" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textload $UI_notepadfile]
|
||||
UIbutton "hold2" [uitext "Save" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textsave $UI_notepadfile]
|
||||
UIbutton "hold2" [uitext "Exec" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textexec]
|
||||
uispace 0.01 0 [UIbar 0 1]
|
||||
UIbutton "hold2" [uitext "Copy" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textcopy]
|
||||
UIbutton "hold2" [uitext "Paste" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textpaste]
|
||||
UIbutton "hold2" [uitext "Select All" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textselectall]
|
||||
uispace 0.01 0 [UIbar 0 1]
|
||||
UIbutton "hold2" [uitext "Clear All" 0.6] 0.04 0.032 [textfocus $UI_notepadfile ; textclear]
|
||||
]
|
||||
uitexteditor $UI_notepadfile -80 20 1 "" 0 [
|
||||
uioutline (uifocus? 0xFF0000 $c_line)
|
||||
uiclamp- 1 1 1 1
|
||||
]
|
||||
textinit $UI_notepadfile $UI_notepadfile
|
||||
]
|
||||
] [] [] [] "Notepad"
|
||||
|
||||
notepad = [
|
||||
if $numargs [UI_notepadfile = $arg1]
|
||||
showui "notepad"
|
||||
]
|
||||
|
||||
mapnotepad = [
|
||||
UI_notepadfile = (concatword "media/map/" (? $numargs $arg1 $mapname) ".cfg")
|
||||
showui "notepad"
|
||||
]
|
||||
|
||||
copymapcfg = [
|
||||
if $numargs [
|
||||
UI_cmc_from = $arg1
|
||||
UI_cmc_to = (? (= $numargs 2) $arg2 $mapname)
|
||||
if (findfile (concatword "media/map/" $UI_cmc_from ".cfg")) [
|
||||
if (findfile (concatword "media/map/" $UI_cmc_to ".cfg")) [showui "cmc_confirm"] [
|
||||
textfocus "#copymapcfg"
|
||||
textload (concatword "media/map/" $UI_cmc_from ".cfg")
|
||||
textsave (concatword "media/map/" $UI_cmc_to ".cfg")
|
||||
]
|
||||
] [
|
||||
echo (concatword "^f7Map config "^f8^" $UI_cmc_from "^f7^" does not exist!")
|
||||
UI_cmc_from = "" ; UI_cmc_to = ""
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
UImenu "cmc_confirm" [
|
||||
uivlist 0.02 [
|
||||
uiclamp 1 1
|
||||
UItitle [uitext "Copy map config:" 0.6] 0 0.03
|
||||
uiclamp- 1 1
|
||||
uivlist 0.01 [
|
||||
uitext (concatword "^f2" $UI_cmc_from) 0.6
|
||||
UItriangle 0 0.01 0.01 180
|
||||
uitext (concatword "^f2" $UI_cmc_to) 0.6
|
||||
]
|
||||
uihlist 0 [
|
||||
UIbutton "hold2" [uitext "Proceed" 0.6] 0.18 0.032 [
|
||||
textfocus "#copymapcfg"
|
||||
textload (concatword "media/map/" $UI_cmc_from ".cfg")
|
||||
textsave (concatword "media/map/" $UI_cmc_to ".cfg")
|
||||
hideui "cmc_confirm"
|
||||
]
|
||||
UIbutton "hold2" [uitext "Cancel" 0.6] 0.18 0.032 [hideui "cmc_confirm"]
|
||||
]
|
||||
]
|
||||
] [
|
||||
if (|| [=s $UI_cmc_from ""] [=s $UI_cmc_to ""]) [hideui "cmc_confirm"]
|
||||
] [UI_cmc_from = "" ; UI_cmc_to = ""]
|
||||
|
|
@ -57,7 +57,7 @@ newui "varicons" [
|
|||
uialign 1 1
|
||||
uispace 0.01 0.1 [
|
||||
uivlist 0 [
|
||||
looplist i (concatword "allfaces entselsnap entediting fullbright showmat") [
|
||||
looplist i (concatword "allfaces entselsnap entediting fullbright showmat " (? $scoreboardmultiplayer "nompedit")) [
|
||||
uifont "default_outline" [
|
||||
uialign 1
|
||||
if $$i [
|
||||
|
|
|
@ -495,7 +495,7 @@ UImenu "map_browser" [
|
|||
custommaps = " "
|
||||
loopfiles m "media/map" "ogz" [
|
||||
if (< (indexof $editmaps $m) 0) [
|
||||
custommaps = (concat $custommaps (escape $m))
|
||||
custommaps = (concat $custommaps $m)
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
222
config/ui/scoreboard.cfg
Normal file
|
@ -0,0 +1,222 @@
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Scoreboard //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
newui "scoreboard" [
|
||||
if $mainmenu [hideui "scoreboard"]
|
||||
uiallowinput 0
|
||||
refreshscoreboard
|
||||
uicolor (? $sbtransparent $c_menu_a $c_menu) 0 0 [
|
||||
uivlist 0 [
|
||||
UI_sbheader
|
||||
uifill 0 0.005
|
||||
if (> $getmode 2) UI_playertableteam UI_playertablesolo
|
||||
UI_spectatorlist
|
||||
]
|
||||
]
|
||||
] [if $mainmenu [hideui "scoreboard"]]
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
UI_sbwsolo = 0.68
|
||||
UI_sbwteam = 1.18
|
||||
UI_sbheader = [
|
||||
uifill 0 0.005
|
||||
uifill (? (> $getmode 2) $UI_sbwteam $UI_sbwsolo) 0.05 [
|
||||
uifill (-f (? (> $getmode 2) $UI_sbwteam $UI_sbwsolo) (? (= $showip 1) 0.18 0)) 0 [
|
||||
uialign -1
|
||||
uiclip (-f (? (> $getmode 2) $UI_sbwteam $UI_sbwsolo) (? (= $showip 1) 0.18 0)) 0 [
|
||||
uialign -1
|
||||
uispace 0.01 0 [
|
||||
uivlist 0 [
|
||||
if $scoreboardservinfo [
|
||||
uitext $scoreboardservinfo 0.65
|
||||
] [
|
||||
uitext "^f4Tesseract" 0.65
|
||||
]
|
||||
uihlist 0.015 [
|
||||
uifill
|
||||
uihlist 0.003 [
|
||||
uitext "^fs[" 0.52
|
||||
uitext (concatword (at ["^f0" "^f0" "^f2" "^f3"] $getmastermode) (getmastermodename $getmastermode)) 0.52
|
||||
uitext "^fS]" 0.52
|
||||
]
|
||||
UItriangle 0x606060 0.01 0.01 270
|
||||
uitext (getmodeprettyname $getmode) 0.52
|
||||
UItriangle 0x606060 0.01 0.01 270
|
||||
uitext $scoreboardmap 0.52
|
||||
if (m_timed $getmode) [
|
||||
UItriangle 0x606060 0.01 0.01 270
|
||||
uitext (concatword (? (|| $intermission $paused) "^f3" "^f8") $scoreboardtime) 0.52
|
||||
]
|
||||
]
|
||||
uialign* -1
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
if $scoreboardmultiplayer [
|
||||
if $showip [
|
||||
uifill 0.18 0 [
|
||||
uialign 1
|
||||
UIbar 0 1; uialign- -1
|
||||
uiclip 0.18 0 [
|
||||
uialign 1
|
||||
uispace 0.01 0 [
|
||||
uivlist 0.004 [
|
||||
uicolortext $connectedip 0xA0A0A0 0.52
|
||||
uicolortext $connectedport 0xA0A0A0 0.52
|
||||
uialign* 1
|
||||
]
|
||||
]
|
||||
uialign- 1
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
UI_cw_s = 0.042
|
||||
UI_cw_k = 0.054
|
||||
UI_cw_d = 0.054
|
||||
UI_cw_pj = 0.050
|
||||
UI_cw_p = 0.050
|
||||
UI_cw_cn = 0.040
|
||||
UI_cw_n = [-f (? (> $getmode 2) (*f $UI_sbwteam 0.5) $UI_sbwsolo) (? (> $getmode 2) (? $showscore $UI_cw_s)) (? $showkills $UI_cw_k) (? $showdeaths $UI_cw_d) (? $scoreboardmultiplayer (? $showpj $UI_cw_pj)) (? $scoreboardmultiplayer (? $showping $UI_cw_p)) (? $scoreboardmultiplayer (? $showclientnum $UI_cw_cn)) 0.03]
|
||||
// ^ blarg
|
||||
|
||||
UI_playertablesolo = [
|
||||
uifill 0 0 [
|
||||
uitable 0 0 [
|
||||
uitableheader [
|
||||
uifill 0.015
|
||||
uifill (UI_cw_n) 0.022
|
||||
if $showkills [uifill $UI_cw_k 0.022 [uicolortext "K" 0xBBCC8B 0.45 ; uialign- 1 1]]
|
||||
if $showdeaths [uifill $UI_cw_d 0.022 [uicolortext "D" 0xE56767 0.45 ; uialign- 1 1]]
|
||||
if $scoreboardmultiplayer [
|
||||
if $showpj [uifill $UI_cw_pj 0.022 [uicolortext "PJ" 0x77A1D9 0.45 ; uialign- 1 1]]
|
||||
if $showping [uifill $UI_cw_p 0.022 [uicolortext "P" 0x77A1D9 0.45 ; uialign- 1 1]]
|
||||
if $showclientnum [uifill $UI_cw_cn 0.022 [uicolortext "#" 0xA0A0A0 0.45 ; uialign- 1 1]]
|
||||
]
|
||||
uifill 0.015
|
||||
] [uicolor 0x88161616 0 0 [uiclamp 1 1 1 1]]
|
||||
UI_sbtc = 0
|
||||
loopscoreboard cn 0 [
|
||||
UI_sbtc = (! $UI_sbtc)
|
||||
uitablerow [
|
||||
uifill 0.015
|
||||
uifill (UI_cw_n) 0.026 [uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57 ; uialign- -1]
|
||||
if $showkills [uifill $UI_cw_k 0.026 [uicolortext (getclientfrags $cn) 0xBBCC8B 0.52 ; uialign- 1]]
|
||||
if $showdeaths [uifill $UI_cw_d 0.026 [uicolortext (getclientdeaths $cn) 0xE56767 0.52 ; uialign- 1]]
|
||||
if $scoreboardmultiplayer [
|
||||
if $showpj [uifill $UI_cw_pj 0.026 [uicolortext (? (isai $cn) "^f4-" (scoreboardpj $cn)) 0x77A1D9 0.52 ; uialign- 1]]
|
||||
if $showping [uifill $UI_cw_p 0.026 [uicolortext (? (isai $cn) "^f4-" (scoreboardping $cn)) 0x77A1D9 0.52 ; uialign- 1]]
|
||||
if $showclientnum [uifill $UI_cw_cn 0.026 [uicolortext (? (isai $cn) "^f4-" $cn) 0xA0A0A0 0.52 ; uialign- 1]]
|
||||
]
|
||||
uifill 0.015
|
||||
] [
|
||||
uicolor (? $UI_sbtc 0x99323232 0x99262626) 0 0 [uiclamp 1 1 1 1]
|
||||
pushif highlight (scoreboardhighlight $cn) [uioutline 0xA0A0A0 (-f $UI_sbwsolo 0.002) 0.024]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
UI_playertableteam = [
|
||||
uifill 0 0 [
|
||||
uihlist 0 [
|
||||
uitable 0 0 [
|
||||
uialign 0 -1
|
||||
uitableheader [
|
||||
uifill 0.015
|
||||
if $scoreboardmultiplayer [
|
||||
if $showclientnum [uifill $UI_cw_cn 0.042 [uicolortext "#" 0xA0A0A0 0.45 ; uialign- -1 1]]
|
||||
if $showping [uifill $UI_cw_p 0.042 [uicolortext "P" 0x77A1D9 0.45 ; uialign- -1 1]]
|
||||
if $showpj [uifill $UI_cw_pj 0.042 [uicolortext "PJ" 0x77A1D9 0.45 ; uialign- -1 1]]
|
||||
]
|
||||
if $showdeaths [uifill $UI_cw_d 0.042 [uicolortext "D" 0xE56767 0.45 ; uialign- -1 1]]
|
||||
if $showkills [uifill $UI_cw_k 0.042 [uicolortext "K" 0xBBCC8B 0.45 ; uialign- -1 1]]
|
||||
if $showscore [uifill $UI_cw_s 0.042 [uicolortext "Score" 0x62B370 0.45 ; uialign- -1 1]]
|
||||
uifill (UI_cw_n) 0.042 [uicolortext (getteamscore 1) 0x4060D0 1 ; uialign- 1]
|
||||
uifill 0.015
|
||||
] [uicolor 0x99202860 0 0 [uiclamp 1 1 1 1]]
|
||||
UI_sbtc = 0
|
||||
loopscoreboard cn 1 [
|
||||
UI_sbtc = (! $UI_sbtc)
|
||||
uitablerow [
|
||||
uifill 0.015
|
||||
if $scoreboardmultiplayer [
|
||||
if $showclientnum [uifill $UI_cw_cn 0.026 [uicolortext (? (isai $cn) "^f4-" $cn) 0xA0A0A0 0.52 ; uialign- -1]]
|
||||
if $showping [uifill $UI_cw_p 0.026 [uicolortext (? (isai $cn) "^f4-" (scoreboardping $cn)) 0x77A1D9 0.52 ; uialign- -1]]
|
||||
if $showpj [uifill $UI_cw_pj 0.026 [uicolortext (? (isai $cn) "^f4-" (scoreboardpj $cn)) 0x77A1D9 0.52 ; uialign- -1]]
|
||||
]
|
||||
if $showdeaths [uifill $UI_cw_d 0.026 [uicolortext (getclientdeaths $cn) 0xE56767 0.52 ; uialign- -1]]
|
||||
if $showkills [uifill $UI_cw_k 0.026 [uicolortext (getclientfrags $cn) 0xBBCC8B 0.52 ; uialign- -1]]
|
||||
if $showscore [uifill $UI_cw_s 0.026 [uicolortext (getclientflags $cn) 0x62B370 0.52 ; uialign- -1]]
|
||||
uifill (UI_cw_n) 0.026 [uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57 ; uialign- 1]
|
||||
uifill 0.015
|
||||
] [
|
||||
uicolor (? $UI_sbtc 0x99333b40 0x99262b33) 0 0 [uiclamp 1 1 1 1]
|
||||
pushif highlight (scoreboardhighlight $cn) [uioutline 0xA0A0A0 (-f (*f $UI_sbwteam 0.5) 0.002) 0.024]
|
||||
]
|
||||
]
|
||||
]
|
||||
uitable 0 0 [
|
||||
uialign 0 -1
|
||||
uitableheader [
|
||||
uifill 0.015
|
||||
uifill (UI_cw_n) 0.042 [uicolortext (getteamscore 2) 0xD04040 1 ; uialign- -1]
|
||||
if $showscore [uifill $UI_cw_s 0.042 [uicolortext "Score" 0x62B370 0.45 ; uialign- 1 1]]
|
||||
if $showkills [uifill $UI_cw_k 0.042 [uicolortext "K" 0xBBCC8B 0.45 ; uialign- 1 1]]
|
||||
if $showdeaths [uifill $UI_cw_d 0.042 [uicolortext "D" 0xE56767 0.45 ; uialign- 1 1]]
|
||||
if $scoreboardmultiplayer [
|
||||
if $showpj [uifill $UI_cw_pj 0.042 [uicolortext "PJ" 0x77A1D9 0.45 ; uialign- 1 1]]
|
||||
if $showping [uifill $UI_cw_p 0.042 [uicolortext "P" 0x77A1D9 0.45 ; uialign- 1 1]]
|
||||
if $showclientnum [uifill $UI_cw_cn 0.042 [uicolortext "#" 0xA0A0A0 0.45 ; uialign- 1 1]]
|
||||
]
|
||||
uifill 0.015
|
||||
] [uicolor 0x99602020 0 0 [uiclamp 1 1 1 1]]
|
||||
UI_sbtc = 0
|
||||
loopscoreboard cn 2 [
|
||||
UI_sbtc = (! $UI_sbtc)
|
||||
uitablerow [
|
||||
uifill 0.015
|
||||
uifill (UI_cw_n) 0.026 [uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57 ; uialign- -1]
|
||||
if $showscore [uifill $UI_cw_s 0.026 [uicolortext (getclientflags $cn) 0x62B370 0.52 ; uialign- 1]]
|
||||
if $showkills [uifill $UI_cw_k 0.026 [uicolortext (getclientfrags $cn) 0xBBCC8B 0.52 ; uialign- 1]]
|
||||
if $showdeaths [uifill $UI_cw_d 0.026 [uicolortext (getclientdeaths $cn) 0xE56767 0.52 ; uialign- 1]]
|
||||
if $scoreboardmultiplayer [
|
||||
if $showpj [uifill $UI_cw_pj 0.026 [uicolortext (? (isai $cn) "^f4-" (scoreboardpj $cn)) 0x77A1D9 0.52 ; uialign- 1]]
|
||||
if $showping [uifill $UI_cw_p 0.026 [uicolortext (? (isai $cn) "^f4-" (scoreboardping $cn)) 0x77A1D9 0.52 ; uialign- 1]]
|
||||
if $showclientnum [uifill $UI_cw_cn 0.026 [uicolortext (? (isai $cn) "^f4-" $cn) 0xA0A0A0 0.52 ; uialign- 1]]
|
||||
]
|
||||
uifill 0.015
|
||||
] [
|
||||
uicolor (? $UI_sbtc 0x99403333 0x99332626) 0 0 [uiclamp 1 1 1 1]
|
||||
pushif highlight (scoreboardhighlight $cn) [uioutline 0xA0A0A0 (-f (*f $UI_sbwteam 0.5) 0.002) 0.024]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
UI_spectatorlist = [
|
||||
uicolor 0x88161616 0 0.022 [
|
||||
uiclamp 1 1 1 1
|
||||
if $showspectators [
|
||||
uigrid (? (> $getmode 2) 3 2) 0 0 [
|
||||
loopscoreboard cn -1 [
|
||||
uispace 0.01 0.01 [
|
||||
pushif sbhigh (scoreboardhighlight $cn) [
|
||||
uioutline 0xA0A0A0 ; uiclamp- 1 1 1 1
|
||||
]
|
||||
uihlist 0.01 [
|
||||
uicolortext (getclientcolorname $cn) (scoreboardstatus $cn) 0.57
|
||||
if $scoreboardmultiplayer [if $showclientnum [uitext $cn 0.57]]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
Before Width: | Height: | Size: 703 B After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 84 KiB |
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 412 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 430 B After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 599 B After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 402 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 547 KiB After Width: | Height: | Size: 550 KiB |
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 320 KiB After Width: | Height: | Size: 322 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 46 KiB |
|
@ -1,13 +1,9 @@
|
|||
project('octacore', ['cpp'],
|
||||
version: '0.0.1',
|
||||
default_options: [
|
||||
'buildtype=debugoptimized', 'cpp_std=c++17', 'warning_level=1'
|
||||
],
|
||||
default_options: ['buildtype=debugoptimized', 'cpp_std=c++17'],
|
||||
meson_version: '>=0.46'
|
||||
)
|
||||
|
||||
bin_path = join_paths(meson.source_root(), 'bin_unix')
|
||||
|
||||
cxx = meson.get_compiler('cpp')
|
||||
|
||||
subdir('src')
|
||||
|
|
65
octacore_unix
Executable file
|
@ -0,0 +1,65 @@
|
|||
#!/bin/sh
|
||||
# TESS_DATA should refer to the directory in which OF data files are placed.
|
||||
#TESS_DATA=~/octacore
|
||||
#TESS_DATA=/usr/local/octacore
|
||||
TESS_DATA=.
|
||||
|
||||
# TESS_BIN should refer to the directory in which OF executable files are placed.
|
||||
TESS_BIN=${TESS_DATA}/bin_unix
|
||||
|
||||
# TESS_OPTIONS contains any command line options you would like to start OF with.
|
||||
#TESS_OPTIONS=""
|
||||
TESS_OPTIONS="-u${HOME}/.octaforge"
|
||||
|
||||
# SYSTEM_NAME should be set to the name of your operating system.
|
||||
#SYSTEM_NAME=Linux
|
||||
SYSTEM_NAME=`uname -s`
|
||||
|
||||
# MACHINE_NAME should be set to the name of your processor.
|
||||
#MACHINE_NAME=i686
|
||||
MACHINE_NAME=`uname -m`
|
||||
|
||||
case ${SYSTEM_NAME} in
|
||||
Linux)
|
||||
SYSTEM_NAME=linux_
|
||||
;;
|
||||
*)
|
||||
SYSTEM_NAME=unknown_
|
||||
;;
|
||||
esac
|
||||
|
||||
case ${MACHINE_NAME} in
|
||||
i486|i586|i686)
|
||||
MACHINE_NAME=
|
||||
;;
|
||||
x86_64|amd64)
|
||||
MACHINE_NAME=64_
|
||||
;;
|
||||
*)
|
||||
if [ ${SYSTEM_NAME} != native_ ]
|
||||
then
|
||||
SYSTEM_NAME=native_
|
||||
fi
|
||||
MACHINE_NAME=
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -x ${TESS_BIN}/native_client ]
|
||||
then
|
||||
SYSTEM_NAME=native_
|
||||
MACHINE_NAME=
|
||||
fi
|
||||
|
||||
if [ -x ${TESS_BIN}/${SYSTEM_NAME}${MACHINE_NAME}client ]
|
||||
then
|
||||
cd ${TESS_DATA}
|
||||
exec ${TESS_BIN}/${SYSTEM_NAME}${MACHINE_NAME}client ${TESS_OPTIONS} "$@"
|
||||
else
|
||||
echo "Your platform does not have a pre-compiled OctaForge client."
|
||||
echo "Please follow the following steps to build a native client:"
|
||||
echo "1) Ensure you have the SDL2, SDL2-image, SDL2-mixer, and OpenGL libraries installed."
|
||||
echo "2) Type \"make -C src install\"."
|
||||
echo "3) If the build succeeds, run this script again."
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -1,57 +1,71 @@
|
|||
client_src = [
|
||||
'../sauerlib/tools.cc',
|
||||
'../sauerlib/encoding.cc',
|
||||
'../sauerlib/stream.cc',
|
||||
'../shared/geom.cc',
|
||||
'../shared/glemu.cc',
|
||||
'../shared/gzstream.cc',
|
||||
'../shared/stream.cc',
|
||||
'../shared/zip.cc',
|
||||
'../engine/aa.cc',
|
||||
'../engine/bih.cc',
|
||||
'../engine/blend.cc',
|
||||
'../engine/command.cc',
|
||||
'../engine/console.cc',
|
||||
'../engine/dynlight.cc',
|
||||
'../engine/grass.cc',
|
||||
'../engine/light.cc',
|
||||
'../engine/main.cc',
|
||||
'../engine/material.cc',
|
||||
'../engine/movie.cc',
|
||||
'../engine/normal.cc',
|
||||
'../engine/octa.cc',
|
||||
'../engine/octaedit.cc',
|
||||
'../engine/octarender.cc',
|
||||
'../engine/physics.cc',
|
||||
'../engine/pvs.cc',
|
||||
'../engine/rendergl.cc',
|
||||
'../engine/renderlights.cc',
|
||||
'../engine/rendermodel.cc',
|
||||
'../engine/renderparticles.cc',
|
||||
'../engine/rendersky.cc',
|
||||
'../engine/rendertext.cc',
|
||||
'../engine/renderva.cc',
|
||||
'../engine/shader.cc',
|
||||
'../engine/stain.cc',
|
||||
'../engine/texture.cc',
|
||||
'../engine/water.cc',
|
||||
'../engine/world.cc',
|
||||
'../engine/worldio.cc',
|
||||
'../game/game.cc',
|
||||
'../shared/crypto.cpp',
|
||||
'../shared/geom.cpp',
|
||||
'../shared/glemu.cpp',
|
||||
'../shared/stream.cpp',
|
||||
'../shared/tools.cpp',
|
||||
'../shared/zip.cpp',
|
||||
'../engine/aa.cpp',
|
||||
'../engine/bih.cpp',
|
||||
'../engine/blend.cpp',
|
||||
'../engine/client.cpp',
|
||||
'../engine/command.cpp',
|
||||
'../engine/console.cpp',
|
||||
'../engine/dynlight.cpp',
|
||||
'../engine/grass.cpp',
|
||||
'../engine/light.cpp',
|
||||
'../engine/main.cpp',
|
||||
'../engine/material.cpp',
|
||||
'../engine/menus.cpp',
|
||||
'../engine/movie.cpp',
|
||||
'../engine/normal.cpp',
|
||||
'../engine/octa.cpp',
|
||||
'../engine/octaedit.cpp',
|
||||
'../engine/octarender.cpp',
|
||||
'../engine/physics.cpp',
|
||||
'../engine/pvs.cpp',
|
||||
'../engine/rendergl.cpp',
|
||||
'../engine/renderlights.cpp',
|
||||
'../engine/rendermodel.cpp',
|
||||
'../engine/renderparticles.cpp',
|
||||
'../engine/rendersky.cpp',
|
||||
'../engine/rendertext.cpp',
|
||||
'../engine/renderva.cpp',
|
||||
'../engine/server.cpp',
|
||||
'../engine/serverbrowser.cpp',
|
||||
'../engine/shader.cpp',
|
||||
'../engine/sound.cpp',
|
||||
'../engine/stain.cpp',
|
||||
'../engine/texture.cpp',
|
||||
'../engine/ui.cpp',
|
||||
'../engine/water.cpp',
|
||||
'../engine/world.cpp',
|
||||
'../engine/worldio.cpp',
|
||||
'../game/ai.cpp',
|
||||
'../game/client.cpp',
|
||||
'../game/entities.cpp',
|
||||
'../game/game.cpp',
|
||||
'../game/render.cpp',
|
||||
'../game/scoreboard.cpp',
|
||||
'../game/server.cpp',
|
||||
'../game/waypoint.cpp',
|
||||
'../game/weapon.cpp'
|
||||
]
|
||||
|
||||
threads_dep = dependency('threads')
|
||||
sdl2_dep = dependency('sdl2')
|
||||
sdl2_image_dep = dependency('SDL2_image')
|
||||
sdl2_mixer_dep = dependency('SDL2_mixer')
|
||||
zlib_dep = dependency('zlib')
|
||||
gl_dep = dependency('gl')
|
||||
rt_dep = cxx.find_library('rt', required: false)
|
||||
|
||||
executable('native_client',
|
||||
client_src,
|
||||
dependencies: [
|
||||
threads_dep, sdl2_dep, sdl2_image_dep,
|
||||
zlib_dep, gl_dep, rt_dep
|
||||
threads_dep, libenet, sdl2_dep, sdl2_image_dep,
|
||||
sdl2_mixer_dep, zlib_dep, gl_dep
|
||||
],
|
||||
include_directories: octacore_includes
|
||||
include_directories: octacore_includes,
|
||||
install: true,
|
||||
install_dir: join_paths(meson.source_root(), 'bin_unix')
|
||||
)
|
||||
|
|
150
src/enet/.deps/callbacks.Plo
Normal file
|
@ -0,0 +1,150 @@
|
|||
callbacks.lo: callbacks.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h include/enet/enet.h \
|
||||
/usr/include/stdlib.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
159
src/enet/.deps/compress.Plo
Normal file
|
@ -0,0 +1,159 @@
|
|||
compress.lo: compress.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h /usr/include/string.h \
|
||||
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
|
||||
include/enet/enet.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
159
src/enet/.deps/host.Plo
Normal file
|
@ -0,0 +1,159 @@
|
|||
host.lo: host.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h /usr/include/string.h \
|
||||
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
|
||||
include/enet/enet.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
150
src/enet/.deps/list.Plo
Normal file
|
@ -0,0 +1,150 @@
|
|||
list.lo: list.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h include/enet/enet.h \
|
||||
/usr/include/stdlib.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
159
src/enet/.deps/packet.Plo
Normal file
|
@ -0,0 +1,159 @@
|
|||
packet.lo: packet.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h /usr/include/string.h \
|
||||
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
|
||||
include/enet/enet.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
159
src/enet/.deps/peer.Plo
Normal file
|
@ -0,0 +1,159 @@
|
|||
peer.lo: peer.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h /usr/include/string.h \
|
||||
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
|
||||
include/enet/enet.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
185
src/enet/.deps/protocol.Plo
Normal file
|
@ -0,0 +1,185 @@
|
|||
protocol.lo: protocol.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h /usr/include/stdio.h \
|
||||
/usr/include/features.h /usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/wchar.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio.h /usr/include/string.h \
|
||||
/usr/include/xlocale.h /usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h /usr/include/stdlib.h \
|
||||
include/enet/utility.h include/enet/time.h include/enet/enet.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h /usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/unistd.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
/usr/include/stdio.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/libio.h:
|
||||
|
||||
/usr/include/_G_config.h:
|
||||
|
||||
/usr/include/wchar.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio_lim.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sys_errlist.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdio.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
include/enet/utility.h:
|
||||
|
||||
include/enet/time.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
228
src/enet/.deps/unix.Plo
Normal file
|
@ -0,0 +1,228 @@
|
|||
unix.lo: unix.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h /usr/include/features.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h \
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h /usr/include/time.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h /usr/include/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h \
|
||||
/usr/include/asm-generic/socket.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h \
|
||||
/usr/include/asm-generic/sockios.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/ioctl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctls.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctls.h \
|
||||
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctl.h \
|
||||
/usr/include/asm-generic/ioctl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h /usr/include/arpa/inet.h \
|
||||
/usr/include/netinet/in.h \
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h /usr/include/stdint.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h /usr/include/netdb.h \
|
||||
/usr/include/rpc/netdb.h /usr/include/x86_64-linux-gnu/bits/netdb.h \
|
||||
/usr/include/unistd.h /usr/include/x86_64-linux-gnu/bits/posix_opt.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h /usr/include/getopt.h \
|
||||
/usr/include/string.h /usr/include/xlocale.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h /usr/include/stdlib.h \
|
||||
/usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h \
|
||||
/usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h \
|
||||
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
|
||||
include/enet/enet.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h /usr/include/alloca.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h include/enet/unix.h \
|
||||
include/enet/types.h include/enet/protocol.h include/enet/list.h \
|
||||
include/enet/callbacks.h /usr/include/fcntl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/stat.h \
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/types.h:
|
||||
|
||||
/usr/include/features.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/cdefs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wordsize.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/typesizes.h:
|
||||
|
||||
/usr/include/time.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:
|
||||
|
||||
/usr/include/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/endian.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/byteswap-16.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/select.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sigset.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/time.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/sysmacros.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/uio.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/socket_type.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/sockaddr.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/socket.h:
|
||||
|
||||
/usr/include/asm-generic/socket.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/sockios.h:
|
||||
|
||||
/usr/include/asm-generic/sockios.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/ioctl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctls.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctls.h:
|
||||
|
||||
/usr/include/asm-generic/ioctls.h:
|
||||
|
||||
/usr/include/linux/ioctl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/ioctl.h:
|
||||
|
||||
/usr/include/asm-generic/ioctl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/ioctl-types.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/ttydefaults.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/time.h:
|
||||
|
||||
/usr/include/arpa/inet.h:
|
||||
|
||||
/usr/include/netinet/in.h:
|
||||
|
||||
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdint.h:
|
||||
|
||||
/usr/include/stdint.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/wchar.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/in.h:
|
||||
|
||||
/usr/include/netdb.h:
|
||||
|
||||
/usr/include/rpc/netdb.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/netdb.h:
|
||||
|
||||
/usr/include/unistd.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/posix_opt.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/environments.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/confname.h:
|
||||
|
||||
/usr/include/getopt.h:
|
||||
|
||||
/usr/include/string.h:
|
||||
|
||||
/usr/include/xlocale.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/string2.h:
|
||||
|
||||
/usr/include/stdlib.h:
|
||||
|
||||
/usr/include/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/errno.h:
|
||||
|
||||
/usr/include/linux/errno.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/asm/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno.h:
|
||||
|
||||
/usr/include/asm-generic/errno-base.h:
|
||||
|
||||
include/enet/enet.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitflags.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/waitstatus.h:
|
||||
|
||||
/usr/include/alloca.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h:
|
||||
|
||||
include/enet/unix.h:
|
||||
|
||||
include/enet/types.h:
|
||||
|
||||
include/enet/protocol.h:
|
||||
|
||||
include/enet/list.h:
|
||||
|
||||
include/enet/callbacks.h:
|
||||
|
||||
/usr/include/fcntl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/fcntl-linux.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/stat.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/sys/poll.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/poll.h:
|
6
src/enet/.deps/win32.Plo
Normal file
|
@ -0,0 +1,6 @@
|
|||
win32.lo: win32.c /usr/include/stdc-predef.h \
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
/usr/include/x86_64-linux-gnu/bits/predefs.h:
|
BIN
src/enet/.libs/libenet.a
Normal file
1
src/enet/.libs/libenet.la
Symbolic link
|
@ -0,0 +1 @@
|
|||
../libenet.la
|
41
src/enet/.libs/libenet.lai
Normal file
|
@ -0,0 +1,41 @@
|
|||
# libenet.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.3
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libenet.a'
|
||||
|
||||
# Linker flags that can not go in dependency_libs.
|
||||
inherited_linker_flags=''
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=''
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libenet.
|
||||
current=6
|
||||
age=4
|
||||
revision=0
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=yes
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir='/usr/local/lib'
|
179
src/enet/ChangeLog
Normal file
|
@ -0,0 +1,179 @@
|
|||
* use getaddrinfo and getnameinfo where available
|
||||
|
||||
ENet 1.3.13 (April 30, 2015):
|
||||
|
||||
* miscellaneous bug fixes
|
||||
* added premake and cmake support
|
||||
* miscellaneous documentation cleanups
|
||||
|
||||
ENet 1.3.12 (April 24, 2014):
|
||||
|
||||
* added maximumPacketSize and maximumWaitingData fields to ENetHost to limit the amount of
|
||||
data waiting to be delivered on a peer (beware that the default maximumPacketSize is
|
||||
32MB and should be set higher if desired as should maximumWaitingData)
|
||||
|
||||
ENet 1.3.11 (December 26, 2013):
|
||||
|
||||
* allow an ENetHost to connect to itself
|
||||
* fixed possible bug with disconnect notifications during connect attempts
|
||||
* fixed some preprocessor definition bugs
|
||||
|
||||
ENet 1.3.10 (October 23, 2013);
|
||||
|
||||
* doubled maximum reliable window size
|
||||
* fixed RCVTIMEO/SNDTIMEO socket options and also added NODELAY
|
||||
|
||||
ENet 1.3.9 (August 19, 2013):
|
||||
|
||||
* added duplicatePeers option to ENetHost which can limit the number of peers from duplicate IPs
|
||||
* added enet_socket_get_option() and ENET_SOCKOPT_ERROR
|
||||
* added enet_host_random_seed() platform stub
|
||||
|
||||
ENet 1.3.8 (June 2, 2013):
|
||||
|
||||
* added enet_linked_version() for checking the linked version
|
||||
* added enet_socket_get_address() for querying the local address of a socket
|
||||
* silenced some debugging prints unless ENET_DEBUG is defined during compilation
|
||||
* handle EINTR in enet_socket_wait() so that enet_host_service() doesn't propagate errors from signals
|
||||
* optimized enet_host_bandwidth_throttle() to be less expensive for large numbers of peers
|
||||
|
||||
ENet 1.3.7 (March 6, 2013):
|
||||
|
||||
* added ENET_PACKET_FLAG_SENT to indicate that a packet is being freed because it has been sent
|
||||
* added userData field to ENetPacket
|
||||
* changed how random seed is generated on Windows to avoid import warnings
|
||||
* fixed case where disconnects could be generated with no preceding connect event
|
||||
|
||||
ENet 1.3.6 (December 11, 2012):
|
||||
|
||||
* added support for intercept callback in ENetHost that can be used to process raw packets before ENet
|
||||
* added enet_socket_shutdown() for issuing shutdown on a socket
|
||||