Skip to content

Commit f8114bb

Browse files
author
eaglercraft
committed
u47
1 parent c3caf6a commit f8114bb

File tree

2,143 files changed

+132266
-3236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,143 files changed

+132266
-3236
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
u46
1+
u47

desktopRuntime/resources/assets/eagler/CREDITS.txt

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,28 @@
217217

218218
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
219219

220+
Project Name: High Performance Primitive Collections
221+
Project Author: Carrot Search
222+
Project URL: http://labs.carrotsearch.com/hppc.html
223+
224+
Used For: Primitive collections library for the client
225+
226+
* Copyright 2010-2013, Carrot Search s.c., Boznicza 11/56, Poznan, Poland
227+
*
228+
* Licensed under the Apache License, Version 2.0 (the "License");
229+
* you may not use this file except in compliance with the License.
230+
* You may obtain a copy of the License at
231+
*
232+
* https://www.apache.org/licenses/LICENSE-2.0
233+
*
234+
* Unless required by applicable law or agreed to in writing, software
235+
* distributed under the License is distributed on an "AS IS" BASIS,
236+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
237+
* See the License for the specific language governing permissions and
238+
* limitations under the License.
239+
240+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241+
220242
Project Name: Google Guava
221243
Project Author: Google
222244
Project URL: https://github.com/google/guava
@@ -514,6 +536,45 @@
514536

515537
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
516538

539+
Project Name: OpenJDK
540+
Project Author: Oracle, IBM
541+
Project URL: https://openjdk.org/projects/jdk/17/
542+
543+
Used For: Debloated version of IBM's ICU4J for reordering Arabic and Hebrew text
544+
545+
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
546+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
547+
*
548+
* This code is free software; you can redistribute it and/or modify it
549+
* under the terms of the GNU General Public License version 2 only, as
550+
* published by the Free Software Foundation. Oracle designates this
551+
* particular file as subject to the "Classpath" exception as provided
552+
* by Oracle in the LICENSE file that accompanied this code.
553+
*
554+
* This code is distributed in the hope that it will be useful, but WITHOUT
555+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
556+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
557+
* version 2 for more details (a copy is included in the LICENSE file that
558+
* accompanied this code).
559+
*
560+
* You should have received a copy of the GNU General Public License version
561+
* 2 along with this work; if not, write to the Free Software Foundation,
562+
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
563+
*
564+
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
565+
* or visit www.oracle.com if you need additional information or have any
566+
* questions.
567+
568+
* (C) Copyright IBM Corp. 1999-2003 - All Rights Reserved
569+
*
570+
* The original version of this source code and documentation is
571+
* copyrighted and owned by IBM. These materials are provided
572+
* under terms of a License Agreement between IBM and Sun.
573+
* This technology is protected by multiple US and International
574+
* patents. This notice and attribution to IBM may not be removed.
575+
576+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
577+
517578
Project Name: Java-WebSocket
518579
Project Author: Nathan Rajlich (TooTallNate)
519580
Project URL: http://tootallnate.github.io/Java-WebSocket

desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_forward.fsh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ void main() {
206206

207207
vec3 dlightDist3f, dlightDir3f, dlightColor3f;
208208
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i; // hate this
209+
float cm;
209210
for(int i = 0; i < safeLightCount; ++i) {
210211
dlightDist3f = worldPosition4f.xyz - u_dynamicLightArray[i].u_lightPosition4f.xyz;
211212
dlightDir3f = normalize(dlightDist3f);
@@ -215,9 +216,11 @@ void main() {
215216
continue;
216217
}
217218
dlightColor3f = u_dynamicLightArray[i].u_lightColor4f.rgb / dot(dlightDist3f, dlightDist3f);
218-
if(dlightColor3f.r + dlightColor3f.g + dlightColor3f.b < 0.025) {
219+
cm = dlightColor3f.r + dlightColor3f.g + dlightColor3f.b;
220+
if(cm < 0.025) {
219221
continue;
220222
}
223+
dlightColor3f *= ((cm - 0.025) / cm);
221224
lightColor3f += eaglercraftLighting(diffuseColor4f.rgb, dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.w;
222225
}
223226

desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_combine.fsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void main() {
6868
vec4 materialData4f;
6969

7070
float depth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r;
71-
if(depth < 0.00001) {
71+
if(depth == 0.0) {
7272
discard;
7373
}
7474

desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_fog.fsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void main() {
5252
vec4 fragPos4f = vec4(v_position2f, textureLod(u_fogDepthTexture, v_position2f, 0.0).r, 1.0);
5353

5454
#ifdef COMPILE_FOG_ATMOSPHERE
55-
if(fragPos4f.z <= 0.0000001) {
55+
if(fragPos4f.z == 0.0) {
5656
discard;
5757
}
5858
#endif

desktopRuntime/resources/assets/eagler/glsl/deferred/forward_core.fsh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ void main() {
404404

405405
vec3 dlightDist3f, dlightDir3f, dlightColor3f;
406406
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i; // hate this
407+
float cm;
407408
for(int i = 0; i < safeLightCount; ++i) {
408409
dlightDist3f = worldPosition4f.xyz - u_dynamicLightArray[i].u_lightPosition4f.xyz;
409410
dlightDir3f = normalize(dlightDist3f);
@@ -412,9 +413,11 @@ void main() {
412413
continue;
413414
}
414415
dlightColor3f = u_dynamicLightArray[i].u_lightColor4f.rgb / dot(dlightDist3f, dlightDist3f);
415-
if(dlightColor3f.r + dlightColor3f.g + dlightColor3f.b < 0.025) {
416+
cm = dlightColor3f.r + dlightColor3f.g + dlightColor3f.b;
417+
if(cm < 0.025) {
416418
continue;
417419
}
420+
dlightColor3f *= ((cm - 0.025) / cm);
418421
lightColor3f += eaglercraftLighting(diffuseColor4f.rgb, dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.w;
419422
}
420423

@@ -451,7 +454,7 @@ void main() {
451454

452455
#ifdef COMPILE_FOG_LIGHT_SHAFTS
453456
fogBlend4f.rgb *= pow(textureLod(u_lightShaftsTexture, v_positionClip2f * 0.5 + 0.5, 0.0).r * 0.9 + 0.1, 2.25);
454-
fogBlend4f.a = fogBlend4f.a * 0.9 + 0.1;
457+
fogBlend4f.a = fogBlend4f.a * 0.85 + 0.2;
455458
#endif
456459
break;
457460
}

desktopRuntime/resources/assets/eagler/glsl/deferred/forward_glass_highlights.fsh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,16 +268,19 @@ void main() {
268268

269269
vec3 dlightDist3f, dlightDir3f, dlightColor3f;
270270
int safeLightCount = u_dynamicLightCount1i > 12 ? 0 : u_dynamicLightCount1i; // hate this
271+
float cm;
271272
for(int i = 0; i < safeLightCount; ++i) {
272273
dlightDist3f = u_dynamicLightArray[i].u_lightPosition4f.xyz - worldPosition4f.xyz;
273274
dlightDir3f = normalize(dlightDist3f);
274275
if(dot(dlightDir3f, normalVector3f) <= 0.0) {
275276
continue;
276277
}
277278
dlightColor3f = u_dynamicLightArray[i].u_lightColor4f.rgb / dot(dlightDist3f, dlightDist3f);
278-
if(dlightColor3f.r + dlightColor3f.g + dlightColor3f.b < 0.025) {
279+
cm = dlightColor3f.r + dlightColor3f.g + dlightColor3f.b;
280+
if(cm < 0.025) {
279281
continue;
280282
}
283+
dlightColor3f *= ((cm - 0.025) / cm);
281284
lightColor3f += eaglercraftLighting_Glass(dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f) * u_blockSkySunDynamicLightFac4f.w;
282285
}
283286

desktopRuntime/resources/assets/eagler/glsl/deferred/hand_depth_mask.fsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ in vec2 v_position2f;
2525
uniform sampler2D u_depthTexture;
2626

2727
void main() {
28-
gl_FragDepth = textureLod(u_depthTexture, v_position2f, 0.0).r <= 0.0000001 ? 0.0 : 1.0;
28+
gl_FragDepth = textureLod(u_depthTexture, v_position2f, 0.0).r == 0.0 ? 0.0 : 1.0;
2929
}

desktopRuntime/resources/assets/eagler/glsl/deferred/light_shafts_sample.fsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ float shadow(in vec3 coords) {
8484
void main() {
8585
output1f = 0.0;
8686
float depth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r;
87-
if(depth < 0.00001) {
87+
if(depth == 0.0) {
8888
return;
8989
}
9090

desktopRuntime/resources/assets/eagler/glsl/deferred/lighting_point.fsh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void main() {
4747
vec3 materialData3f;
4848

4949
float depth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r;
50-
if(depth < 0.00001) {
50+
if(depth == 0.0) {
5151
discard;
5252
}
5353

@@ -59,11 +59,14 @@ void main() {
5959
worldSpacePosition = u_inverseViewMatrix4f * worldSpacePosition;
6060
vec3 lightDist = (worldSpacePosition.xyz / worldSpacePosition.w) - u_lightPosition3f;
6161
vec3 color3f = u_lightColor3f / dot(lightDist, lightDist);
62+
float cm = color3f.r + color3f.g + color3f.b;
6263

63-
if(color3f.r + color3f.g + color3f.b < 0.025) {
64+
if(cm < 0.025) {
6465
discard;
6566
}
6667

68+
color3f *= ((cm - 0.025) / cm);
69+
6770
vec4 sampleVar4f = textureLod(u_gbufferColorTexture, v_position2f, 0.0);
6871
diffuseColor3f.rgb = sampleVar4f.rgb;
6972
lightmapCoords2f.x = sampleVar4f.a;

0 commit comments

Comments
 (0)