openrune: just about finish rework, gets to login

This commit is contained in:
therealunull
2020-12-13 15:12:37 -05:00
parent 11a239e94e
commit b54ff7f7db
693 changed files with 11362 additions and 3943 deletions

View File

@@ -547,7 +547,8 @@
526,
2530,
3187,
24655
24655,
25199
],
"monks robe": [
542,
@@ -1652,6 +1653,10 @@
1005,
7957
],
"red cape": [
1007,
25207
],
"blue skirt": [
1011,
7386,
@@ -1662,6 +1667,11 @@
12445,
12447
],
"blue cape": [
1021,
25195,
25208
],
"blue partyhat": [
1042,
2422
@@ -3353,7 +3363,17 @@
],
"explosive potion": [
4045,
23818
23818,
25211
],
"bandages": [
4049,
25202
],
"barricade": [
4053,
25209,
25210
],
"decorative sword": [
4068,
@@ -3402,7 +3422,12 @@
4506,
4511,
20489,
24160
24160,
25157,
25165,
25169,
25174,
25176
],
"decorative shield": [
4072,
@@ -3415,11 +3440,14 @@
4081,
10588,
12017,
12018
12018,
25250,
25278
],
"sled": [
4083,
4084
4084,
25282
],
"dragon platelegs": [
4087,
@@ -3494,7 +3522,8 @@
],
"stick": [
4179,
9702
9702,
25285
],
"extended brush": [
4191,
@@ -4790,20 +4819,24 @@
"seers ring": [
6731,
11770,
23624
23624,
25258
],
"archers ring": [
6733,
11771
11771,
25260
],
"warrior ring": [
6735,
11772
11772,
25262
],
"berserker ring": [
6737,
11773,
23595
23595,
25264
],
"darklight": [
6746,
@@ -6114,7 +6147,18 @@
11781,
11782,
11783,
11784
11784,
25266,
25267,
25268,
25269,
25270,
25271,
25272,
25273,
25274,
25275,
25276
],
"bandana eyepatch": [
8924,
@@ -7387,7 +7431,15 @@
23073,
23075,
24370,
24444
24444,
25177,
25179,
25181,
25183,
25185,
25187,
25189,
25191
],
"slayer ring": [
11866,
@@ -7472,15 +7524,18 @@
],
"ring of the gods": [
12601,
13202
13202,
25252
],
"tyrannical ring": [
12603,
12691
12691,
25254
],
"treasonous ring": [
12605,
12692
12692,
25256
],
"bandos page": [
12613,
@@ -8215,7 +8270,9 @@
19550,
19710,
20655,
20657
20657,
25246,
25248
],
"amulet of torture": [
19553,
@@ -8594,7 +8651,8 @@
],
"granite ring": [
21739,
21752
21752,
25193
],
"imbued saradomin max cape": [
21776,
@@ -8872,6 +8930,10 @@
22405,
22446
],
"old key": [
22428,
25244
],
"battlemage potion": [
22449,
22452,
@@ -9478,5 +9540,64 @@
"extradimensional bag": [
25106,
25108
],
"decorative boots": [
25155,
25163,
25167,
25171,
25173
],
"castlewars brew": [
25159,
25160,
25161,
25162
],
"soul fragment": [
25196,
25201
],
"potion of power": [
25203,
25204,
25205,
25206
],
"blue icon": [
25212,
25213,
25214,
25215,
25216,
25217,
25218,
25219,
25220,
25221,
25222,
25223,
25224,
25225,
25226,
25227
],
"red icon": [
25228,
25229,
25230,
25231,
25232,
25233,
25234,
25235,
25236,
25237,
25238,
25239,
25240,
25241,
25242,
25243
]
}
}

View File

@@ -24,50 +24,35 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<configuration scan="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/.runelite/logs/client.log</file>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/.runelite/logs/client.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${user.home}/.runelite/logs/client_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${user.home}/.runelite/logs/client_%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<!-- when file size is larger than defined, roll to new file -->
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- when file size is larger than defined, roll to new file -->
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<!-- keep 30 days' worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
</encoder>
</appender>
<encoder>
<Pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</Pattern>
</encoder>
</appender>
<!-- Configure the Sentry appender, overriding the logging threshold to the WARN level -->
<appender name="Sentry" class="io.sentry.logback.SentryAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<!-- Optionally add an encoder -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
<appender-ref ref="Sentry" />
</root>
<logger name="org.pf4j" level="WARN"/>
<logger name="org.jgroups" level="WARN"/>
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
</root>
</configuration>

View File

@@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDDDCCAfSgAwIBAgIJAK8uBanmNQZaMA0GCSqGSIb3DQEBCwUAMBsxGTAXBgNV
BAMMEHJ1bmVsaXRlLXBsdWdpbnMwHhcNMTkxMjEyMjEwNzUxWhcNMjUxMjEwMjEw
NzUxWjAbMRkwFwYDVQQDDBBydW5lbGl0ZS1wbHVnaW5zMIIBIjANBgkqhkiG9w0B
AQEFAAOCAQ8AMIIBCgKCAQEApu11OVANSU+pHaXRxB7fIZapucJ6BT46neicEixs
NVPuK/QRVjO/G8F++MXFD/tlZUOEDllDN8uaHBIVwxilqEVYL7oX65Esl7qqC1TZ
WGdjiMyYoK3CXWEWB4w+CdB31T7JG2HqH45ZsVs+U9OVWBkNkL5nNQNPOmZFd+3A
yCb9nGlO7SxduiHpwh3CV19jY47y8tevyo5qpaBuQeWtu3vbpeer0kbDarwD3xoF
yUMPRK518gxRUSmOpsSG5viQ731mKVCUUfIXz91d3s+kJYAjORHS4zJe9s+1dljp
oLYNLkaP6m3CmNtC84OxkmognvZTNMbiQ3GQm/BK4sdjPQIDAQABo1MwUTAdBgNV
HQ4EFgQUxrkiRXNd0OHPMkqgl9UgV1//OuQwHwYDVR0jBBgwFoAUxrkiRXNd0OHP
Mkqgl9UgV1//OuQwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEA
StPyblz3aqOM5z2KqHX1B7Z3Q8B58g55YSefpcfwWEc6LT4HCztszcZDteWpV3W2
ERfemkGKgsDhQ0qkzIt7tS5eNN3PPj7RZZm7vl5HquQ1vC/33ri/Z3CEKzbW7knt
i1iEpx8E9DKb9J9DjdKwNxSomOyCOFUt9YoQJs80xc1mwPDd6aWR3xwvnEUimkm+
Dbj7HMOXLeyN810wkeWcT8nC5GhxH3ZAmVExBHsaIOB876RntzshBehjY8s8JQhw
R+fT1e8EhYMM9ylYDk1KIWFWrAujjU04lS9tXZ5C2e7fr9R953XN6Y0PNM/taNTU
GzwGroJZI02V+1ADO14rRA==
-----END CERTIFICATE-----

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 943 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 759 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1 @@
The images in this folder are derivatives of "twemoji" (https://github.com/twitter/twemoji) by "Twitter, Inc", used under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). The derivatives are licensed under the same license.

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 496 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

View File

@@ -0,0 +1,73 @@
//
// Algorithm from "Analysis of Color Blindness" by Onur Fidaner, Poliang Lin and Nevran Ozguven.
// https://web.archive.org/web/20090731011248/http://scien.stanford.edu/class/psych221/projects/05/ofidaner/project_report.pdf
//
#define NONE 0
#define PROTAN 1
#define DEUTERAN 2
#define TRITAN 3
const mat3 rgb2lms = mat3(
vec3(17.8824, 43.5161, 4.11935),
vec3(3.45565, 27.1554, 3.86714),
vec3(0.0299566, 0.184309, 1.46709)
);
const mat3 lms2lmsp = mat3(
vec3(0.0, 2.02344, -2.52581),
vec3(0.0, 1.0, 0.0),
vec3(0.0, 0.0, 1.0)
);
const mat3 lms2lmsd = mat3(
vec3(1.0, 0.0, 0.0),
vec3(0.494207, 0.0, 1.24827),
vec3(0.0, 0.0, 1.0)
);
const mat3 lms2lmst = mat3(
vec3(1.0, 0.0, 0.0),
vec3(0.0, 1.0, 0.0),
vec3(-0.395913, 0.801109, 0.0)
);
const mat3 corrections = mat3(
vec3(0.0, 0.0, 0.0),
vec3(0.7, 1.0, 0.0),
vec3(0.7, 0.0, 1.0)
);
vec3 colorblind(int mode, vec3 color)
{
vec3 LMS = color * rgb2lms;
vec3 lms;
if (mode == PROTAN) {
lms = LMS * lms2lmsp; // red deficiency
}
else if (mode == DEUTERAN) {
lms = LMS * lms2lmsd; // green deficiency
}
else if (mode == TRITAN) {
lms = LMS * lms2lmst; // blue deficiency
}
else {
return color;
}
// LMS to RGB matrix conversion
mat3 lms2rgb = inverse(rgb2lms);
vec3 error = lms * lms2rgb;
// Isolate invisible colors to color vision deficiency (calculate error matrix)
error = (color - error);
// Shift colors towards visible spectrum (apply error modifications)
vec3 correction = error * corrections;
// Add compensation to original values
correction = color + correction;
return correction;
}

View File

@@ -0,0 +1,82 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer 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 OWNER 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.
*/
#include to_screen.glsl
/*
* Rotate a vertex by a given orientation in JAU
*/
ivec4 rotate(ivec4 vertex, int orientation) {
ivec2 sinCos = sinCosTable[orientation];
int s = sinCos.x;
int c = sinCos.y;
int x = vertex.z * s + vertex.x * c >> 16;
int z = vertex.z * c - vertex.x * s >> 16;
return ivec4(x, vertex.y, z, vertex.w);
}
/*
* Calculate the distance to a vertex given the camera angle
*/
int distance(ivec4 vertex, int cameraYaw, int cameraPitch) {
int yawSin = int(65536.0f * sin(cameraYaw * UNIT));
int yawCos = int(65536.0f * cos(cameraYaw * UNIT));
int pitchSin = int(65536.0f * sin(cameraPitch * UNIT));
int pitchCos = int(65536.0f * cos(cameraPitch * UNIT));
int j = vertex.z * yawCos - vertex.x * yawSin >> 16;
int l = vertex.y * pitchSin + j * pitchCos >> 16;
return l;
}
/*
* Calculate the distance to a face
*/
int face_distance(ivec4 vA, ivec4 vB, ivec4 vC, int cameraYaw, int cameraPitch) {
int dvA = distance(vA, cameraYaw, cameraPitch);
int dvB = distance(vB, cameraYaw, cameraPitch);
int dvC = distance(vC, cameraYaw, cameraPitch);
int faceDistance = (dvA + dvB + dvC) / 3;
return faceDistance;
}
/*
* Test if a face is visible (not backward facing)
*/
bool face_visible(ivec4 vA, ivec4 vB, ivec4 vC, ivec4 position) {
// Move model to scene location, and account for camera offset
ivec4 cameraPos = ivec4(cameraX, cameraY, cameraZ, 0);
vA += position - cameraPos;
vB += position - cameraPos;
vC += position - cameraPos;
vec3 sA = toScreen(vA.xyz, cameraYaw, cameraPitch, centerX, centerY, zoom);
vec3 sB = toScreen(vB.xyz, cameraYaw, cameraPitch, centerX, centerY, zoom);
vec3 sC = toScreen(vC.xyz, cameraYaw, cameraPitch, centerX, centerY, zoom);
return (sA.x - sB.x) * (sC.y - sB.y) - (sC.x - sB.x) * (sA.y - sB.y) > 0;
}

View File

@@ -0,0 +1,109 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer 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 OWNER 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.
*/
#include version_header
shared int totalNum[12]; // number of faces with a given priority
shared int totalDistance[12]; // sum of distances to faces of a given priority
shared int totalMappedNum[18]; // number of faces with a given adjusted priority
shared int min10; // minimum distance to a face of priority 10
shared int dfs[4096]; // packed face id and distance
#include comp_common.glsl
layout(local_size_x = 1024) in;
#include common.glsl
#include priority_render.glsl
void main() {
uint groupId = gl_WorkGroupID.x;
uint localId = gl_LocalInvocationID.x * 4;
modelinfo minfo = ol[groupId];
ivec4 pos = ivec4(minfo.x, minfo.y, minfo.z, 0);
if (localId == 0) {
min10 = 1600;
for (int i = 0; i < 12; ++i) {
totalNum[i] = 0;
totalDistance[i] = 0;
}
for (int i = 0; i < 18; ++i) {
totalMappedNum[i] = 0;
}
}
int prio1, dis1;
ivec4 vA1, vA2, vA3;
int prio2, dis2;
ivec4 vB1, vB2, vB3;
int prio3, dis3;
ivec4 vC1, vC2, vC3;
int prio4, dis4;
ivec4 vD1, vD2, vD3;
get_face(localId, minfo, cameraYaw, cameraPitch, prio1, dis1, vA1, vA2, vA3);
get_face(localId + 1, minfo, cameraYaw, cameraPitch, prio2, dis2, vB1, vB2, vB3);
get_face(localId + 2, minfo, cameraYaw, cameraPitch, prio3, dis3, vC1, vC2, vC3);
get_face(localId + 3, minfo, cameraYaw, cameraPitch, prio4, dis4, vD1, vD2, vD3);
memoryBarrierShared();
barrier();
add_face_prio_distance(localId , minfo, vA1, vA2, vA3, prio1, dis1, pos);
add_face_prio_distance(localId + 1, minfo, vB1, vB2, vB3, prio2, dis2, pos);
add_face_prio_distance(localId + 2, minfo, vC1, vC2, vC3, prio3, dis3, pos);
add_face_prio_distance(localId + 3, minfo, vD1, vD2, vD3, prio4, dis4, pos);
memoryBarrierShared();
barrier();
int prio1Adj, prio2Adj, prio3Adj, prio4Adj;
int idx1 = map_face_priority(localId, minfo, prio1, dis1, prio1Adj);
int idx2 = map_face_priority(localId + 1, minfo, prio2, dis2, prio2Adj);
int idx3 = map_face_priority(localId + 2, minfo, prio3, dis3, prio3Adj);
int idx4 = map_face_priority(localId + 3, minfo, prio4, dis4, prio4Adj);
memoryBarrierShared();
barrier();
insert_dfs(localId , minfo, prio1Adj, dis1, idx1);
insert_dfs(localId + 1, minfo, prio2Adj, dis2, idx2);
insert_dfs(localId + 2, minfo, prio3Adj, dis3, idx3);
insert_dfs(localId + 3, minfo, prio4Adj, dis4, idx4);
memoryBarrierShared();
barrier();
sort_and_insert(localId , minfo, prio1Adj, dis1, vA1, vA2, vA3);
sort_and_insert(localId + 1, minfo, prio2Adj, dis2, vB1, vB2, vB3);
sort_and_insert(localId + 2, minfo, prio3Adj, dis3, vC1, vC2, vC3);
sort_and_insert(localId + 3, minfo, prio4Adj, dis4, vD1, vD2, vD3);
}

View File

@@ -0,0 +1,78 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer 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 OWNER 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.
*/
#define PI 3.1415926535897932384626433832795f
#define UNIT PI / 1024.0f
layout(std140) uniform uniforms {
int cameraYaw;
int cameraPitch;
int centerX;
int centerY;
int zoom;
int cameraX;
int cameraY;
int cameraZ;
ivec2 sinCosTable[2048];
};
struct modelinfo {
int offset; // offset into buffer
int uvOffset; // offset into uv buffer
int size; // length in faces
int idx; // write idx in target buffer
int flags; // radius, orientation
int x; // scene position x
int y; // scene position y
int z; // scene position z
};
layout(std430, binding = 0) readonly buffer modelbuffer_in {
modelinfo ol[];
};
layout(std430, binding = 1) readonly buffer vertexbuffer_in {
ivec4 vb[];
};
layout(std430, binding = 2) readonly buffer tempvertexbuffer_in {
ivec4 tempvb[];
};
layout(std430, binding = 3) writeonly buffer vertex_out {
ivec4 vout[];
};
layout(std430, binding = 4) writeonly buffer uv_out {
vec4 uvout[];
};
layout(std430, binding = 5) readonly buffer uvbuffer_in {
vec4 uv[];
};
layout(std430, binding = 6) readonly buffer tempuvbuffer_in {
vec4 tempuv[];
};

View File

@@ -0,0 +1,85 @@
/*
* Copyright (c) 2018, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer 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 OWNER 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.
*/
#include version_header
shared int totalNum[12]; // number of faces with a given priority
shared int totalDistance[12]; // sum of distances to faces of a given priority
shared int totalMappedNum[18]; // number of faces with a given adjusted priority
shared int min10; // minimum distance to a face of priority 10
shared int dfs[512]; // packed face id and distance
#include comp_common.glsl
layout(local_size_x = 512) in;
#include common.glsl
#include priority_render.glsl
void main() {
uint groupId = gl_WorkGroupID.x;
uint localId = gl_LocalInvocationID.x;
modelinfo minfo = ol[groupId];
ivec4 pos = ivec4(minfo.x, minfo.y, minfo.z, 0);
if (localId == 0) {
min10 = 1600;
for (int i = 0; i < 12; ++i) {
totalNum[i] = 0;
totalDistance[i] = 0;
}
for (int i = 0; i < 18; ++i) {
totalMappedNum[i] = 0;
}
}
int prio1, dis1;
ivec4 vA1, vA2, vA3;
get_face(localId, minfo, cameraYaw, cameraPitch, prio1, dis1, vA1, vA2, vA3);
memoryBarrierShared();
barrier();
add_face_prio_distance(localId, minfo, vA1, vA2, vA3, prio1, dis1, pos);
memoryBarrierShared();
barrier();
int prio1Adj;
int idx1 = map_face_priority(localId, minfo, prio1, dis1, prio1Adj);
memoryBarrierShared();
barrier();
insert_dfs(localId, minfo, prio1Adj, dis1, idx1);
memoryBarrierShared();
barrier();
sort_and_insert(localId, minfo, prio1Adj, dis1, vA1, vA2, vA3);
}

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