Update to EaglercraftX 1.8 u35

This commit is contained in:
eaglercraft 2024-06-16 18:18:06 -07:00
parent dd4dc68af9
commit 2e717f25a8
23 changed files with 120945 additions and 120885 deletions

Binary file not shown.

View File

@ -170,7 +170,7 @@ void main() {
#ifdef COMPILE_ENABLE_FOG #ifdef COMPILE_ENABLE_FOG
vec3 fogPos = v_position4f.xyz / v_position4f.w; vec3 fogPos = v_position4f.xyz / v_position4f.w;
float dist = sqrt(dot(fogPos, fogPos)); float dist = length(fogPos);
float fogDensity = u_fogParameters4f.y; float fogDensity = u_fogParameters4f.y;
float fogStart = u_fogParameters4f.z; float fogStart = u_fogParameters4f.z;
float fogEnd = u_fogParameters4f.w; float fogEnd = u_fogParameters4f.w;

View File

@ -69,7 +69,7 @@ void main() {
fragPos4f.xyz /= fragPos4f.w; fragPos4f.xyz /= fragPos4f.w;
fragPos4f.w = 1.0; fragPos4f.w = 1.0;
float l = sqrt(dot(fragPos4f.xyz, fragPos4f.xyz)); float l = length(fragPos4f.xyz);
#ifdef COMPILE_FOG_LINEAR #ifdef COMPILE_FOG_LINEAR
float f = (l - u_linearFogParam2f.x) / (u_linearFogParam2f.y - u_linearFogParam2f.x); float f = (l - u_linearFogParam2f.x) / (u_linearFogParam2f.y - u_linearFogParam2f.x);
#else #else

View File

@ -431,7 +431,7 @@ void main() {
float type = u_fogParameters4f.x - atmos; float type = u_fogParameters4f.x - atmos;
fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g); fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g);
float l = sqrt(dot(v_position4f.xyz, v_position4f.xyz)); float l = length(v_position4f.xyz);
if(type == 1.0) { if(type == 1.0) {
f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z); f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z);
}else { }else {

View File

@ -292,7 +292,7 @@ void main() {
fogFade = mix(u_fogColorDark4f.a, u_fogColorLight4f.a, lightmapCoords2f.g); fogFade = mix(u_fogColorDark4f.a, u_fogColorLight4f.a, lightmapCoords2f.g);
float f; float f;
float l = sqrt(dot(v_position4f.xyz, v_position4f.xyz)); float l = length(v_position4f.xyz);
if(type == 1.0) { if(type == 1.0) {
f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z); f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z);
}else { }else {

View File

@ -397,7 +397,7 @@ void main() {
float type = u_fogParameters4f.x - atmos; float type = u_fogParameters4f.x - atmos;
fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g); fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g);
float f, l = sqrt(dot(v_position4f.xyz, v_position4f.xyz)); float f, l = length(v_position4f.xyz);
if(type == 1.0) { if(type == 1.0) {
f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z); f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z);
}else { }else {

View File

@ -1,7 +1,7 @@
{ {
"name": "§eHigh Performance PBR", "name": "§eHigh Performance PBR",
"desc": "Pack made from scratch specifically for this client, designed to give what I call the best balance between quality and performance possible in a browser but obviously that's just my opinion", "desc": "Pack made from scratch specifically for this client, designed to give what I call the best balance between quality and performance possible in a browser but obviously that's just my opinion",
"vers": "1.2.0", "vers": "1.2.1",
"author": "lax1dude", "author": "lax1dude",
"api_vers": 1, "api_vers": 1,
"features": [ "features": [

View File

@ -48,7 +48,9 @@ void main() {
} }
vec4 light; vec4 light;
float blockLight = v_lightmap2f.x;
float diffuse = 0.0; float diffuse = 0.0;
float len;
if(u_dynamicLightCount1i > 0) { if(u_dynamicLightCount1i > 0) {
vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f; vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f;
worldPosition4f.xyz /= worldPosition4f.w; worldPosition4f.xyz /= worldPosition4f.w;
@ -57,11 +59,13 @@ void main() {
for(int i = 0; i < safeLightCount; ++i) { for(int i = 0; i < safeLightCount; ++i) {
light = u_dynamicLightArray[i]; light = u_dynamicLightArray[i];
light.xyz = light.xyz - worldPosition4f.xyz; light.xyz = light.xyz - worldPosition4f.xyz;
diffuse += max(dot(normalize(light.xyz), normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - sqrt(dot(light.xyz, light.xyz)), 0.0); len = length(light.xyz);
diffuse += max(dot(light.xyz / len, normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - len, 0.0);
} }
blockLight = min(blockLight + diffuse * 0.066667, 1.0);
} }
color *= texture(u_lightmapTexture, vec2(min(v_lightmap2f.x + diffuse * 0.066667, 1.0), v_lightmap2f.y)); color *= texture(u_lightmapTexture, vec2(blockLight, v_lightmap2f.y));
output4f = color; output4f = color;
} }

View File

@ -152,6 +152,12 @@ void main() {
#ifdef COMPILE_ENABLE_LIGHTMAP #ifdef COMPILE_ENABLE_LIGHTMAP
float diffuse = 0.0; float diffuse = 0.0;
#ifdef COMPILE_LIGHTMAP_ATTRIB
float blockLight = v_lightmap2f.x;
#else
float blockLight = u_textureCoords02.x;
#endif
float len;
vec4 light; vec4 light;
if(u_dynamicLightCount1i > 0) { if(u_dynamicLightCount1i > 0) {
vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f; vec4 worldPosition4f = u_inverseViewMatrix4f * v_position4f;
@ -161,13 +167,15 @@ void main() {
for(int i = 0; i < safeLightCount; ++i) { for(int i = 0; i < safeLightCount; ++i) {
light = u_dynamicLightArray[i]; light = u_dynamicLightArray[i];
light.xyz = light.xyz - worldPosition4f.xyz; light.xyz = light.xyz - worldPosition4f.xyz;
diffuse += max(dot(normalize(light.xyz), normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - sqrt(dot(light.xyz, light.xyz)), 0.0); len = length(light.xyz);
diffuse += max(dot(light.xyz / len, normalVector3f) * 0.8 + 0.2, 0.0) * max(light.w - len, 0.0);
} }
blockLight = min(blockLight + diffuse * 0.066667, 1.0);
} }
#ifdef COMPILE_LIGHTMAP_ATTRIB #ifdef COMPILE_LIGHTMAP_ATTRIB
color *= texture(u_samplerLightmap, vec2(min(v_lightmap2f.x + diffuse * 0.066667, 1.0), v_lightmap2f.y)); color *= texture(u_samplerLightmap, vec2(blockLight, v_lightmap2f.y));
#else #else
color *= texture(u_samplerLightmap, vec2(min(u_textureCoords02.x + diffuse * 0.066667, 1.0), u_textureCoords02.y)); color *= texture(u_samplerLightmap, vec2(blockLight, u_textureCoords02.y));
#endif #endif
#endif #endif

View File

@ -0,0 +1,2 @@
# Change to 0 to disable blur
enable_blur=1

View File

@ -1 +1 @@
{"pluginName":"EaglercraftXBungee","pluginVersion":"1.2.5","pluginButton":"Download \"EaglerXBungee-1.2.5.jar\"","pluginFilename":"EaglerXBungee.zip"} {"pluginName":"EaglercraftXBungee","pluginVersion":"1.2.6","pluginButton":"Download \"EaglerXBungee-1.2.6.jar\"","pluginFilename":"EaglerXBungee.zip"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -23,14 +23,14 @@
### To compile the latest version of the client, on Windows: ### To compile the latest version of the client, on Windows:
1. Make sure you have at least Java 11 installed and added to your PATH, its is recommended to use Java 17 1. Make sure you have at least Java 11 installed and added to your PATH, it is recommended to use Java 17
2. Download (clone) this repository to your computer 2. Download (clone) this repository to your computer
3. Double click `CompileLatestClient.bat`, a GUI resembling a classic windows installer should open 3. Double click `CompileLatestClient.bat`, a GUI resembling a classic windows installer should open
4. Follow the steps shown to you in the new window to finish compiling 4. Follow the steps shown to you in the new window to finish compiling
### To compile the latest version of the client, on Linux/macOS: ### To compile the latest version of the client, on Linux/macOS:
1. Make sure you have at least Java 11 installed, its is recommended to use Java 17 1. Make sure you have at least Java 11 installed, it is recommended to use Java 17
2. Download (clone) this repository to your computer 2. Download (clone) this repository to your computer
3. Open a terminal in the folder the repository was cloned to 3. Open a terminal in the folder the repository was cloned to
4. Type `chmod +x CompileLatestClient.sh` and hit enter 4. Type `chmod +x CompileLatestClient.sh` and hit enter
@ -63,6 +63,12 @@ EaglercraftX 1.8 includes a deferred physically-based renderer modeled after the
EaglercraftX 1.8 includes an integrated voice-chat service that can be used in shared worlds and also on multiplayer servers when it is enabled by the server owner. This feature also uses WebRTC like shared worlds, so be careful that you don't leak your IP address accidentally by using it on a public server. If you own a website and don't want people to use voice chat on it, edit the `eaglercraftXOpts` variable in your index.html and add `allowVoiceClient: false`. EaglercraftX 1.8 includes an integrated voice-chat service that can be used in shared worlds and also on multiplayer servers when it is enabled by the server owner. This feature also uses WebRTC like shared worlds, so be careful that you don't leak your IP address accidentally by using it on a public server. If you own a website and don't want people to use voice chat on it, edit the `eaglercraftXOpts` variable in your index.html and add `allowVoiceClient: false`.
## Resource Packs
EaglercraftX 1.8 allows you to use any vanilla Minecraft 1.8 resource pack in your browser by importing it as a zip file, resource packs are saved to your browser's local storage and are saved between page refreshes. This can be used to add the original C418 soundtrack back into the game, download and import [this pack](https://bafybeiayojww5jfyzvlmtuk7l5ufkt7nlfto7mhwmzf2vs4bvsjd5ouiuq.ipfs.nftstorage.link/?filename=Music_For_Eaglercraft.zip) to add music back to Eaglercraft. A known bug with the debug desktop runtime is that sound files in resource packs do not play, this may be fixed in the future but is not a high priority issue.
If you are creating a resource pack and want to disable the blur filter on the main menu panorama, create a file called `assets/minecraft/textures/gui/title/background/enable_blur.txt` in your pack and set it's contents to `enable_blur=0`
## Making a Server ## Making a Server
To make a server for EaglercraftX 1.8 the recommended software to use is EaglercraftXBungee ("EaglerXBungee") which is included in this repository in the `gateway/EaglercraftXBungee` folder. This is a plugin designed to be used with BungeeCord to allow Eaglercraft players to join your BungeeCord server. It is assumed that the reader already knows what BungeeCord is and has a working server set up that is joinable via java edition. If you don't know what BungeeCord is, please research the topic yourself first before continuing. Waterfall and FlameCord have also been tested, but EaglerXBungee was natively compiled against BungeeCord. To make a server for EaglercraftX 1.8 the recommended software to use is EaglercraftXBungee ("EaglerXBungee") which is included in this repository in the `gateway/EaglercraftXBungee` folder. This is a plugin designed to be used with BungeeCord to allow Eaglercraft players to join your BungeeCord server. It is assumed that the reader already knows what BungeeCord is and has a working server set up that is joinable via java edition. If you don't know what BungeeCord is, please research the topic yourself first before continuing. Waterfall and FlameCord have also been tested, but EaglerXBungee was natively compiled against BungeeCord.
@ -156,6 +162,7 @@ The default eaglercraftXOpts values is this:
- `allowVoiceClient:` can be used to disable the voice chat feature - `allowVoiceClient:` can be used to disable the voice chat feature
- `allowFNAWSkins:` can be used to disable the high poly FNAW skins - `allowFNAWSkins:` can be used to disable the high poly FNAW skins
- `localStorageNamespace:` can be used to change the prefix of the local storage keys (Default: `"_eaglercraftX"`) - `localStorageNamespace:` can be used to change the prefix of the local storage keys (Default: `"_eaglercraftX"`)
- `enableMinceraft:` can be used to disable the "Minceraft" title screen
- `hooks:` can be used to define JavaScript callbacks for certain events - `hooks:` can be used to define JavaScript callbacks for certain events
* `localStorageSaved:` JavaScript callback to save local storage keys * `localStorageSaved:` JavaScript callback to save local storage keys
* `localStorageLoaded:` JavaScript callback to load local storage keys * `localStorageLoaded:` JavaScript callback to load local storage keys

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long