mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-10 21:13:07 +08:00
Fix aether and twilight forest dimensions
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
#version 430
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/begin.csh"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#include "/dimensions/all_solid.tcs"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#include "/dimensions/all_solid.tes"
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 430 compatibility
|
||||
#include "/lib/SSBOs.glsl"
|
||||
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#ifdef IS_LPV_ENABLED
|
||||
#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS
|
||||
#extension GL_ARB_explicit_attrib_location: enable
|
||||
#extension GL_ARB_shader_image_load_store: enable
|
||||
#endif
|
||||
@@ -28,6 +31,7 @@ uniform mat4 gbufferProjection;
|
||||
uniform mat4 gbufferProjectionInverse;
|
||||
uniform int hideGUI;
|
||||
uniform vec3 cameraPosition;
|
||||
uniform vec3 relativeEyePosition;
|
||||
uniform float frameTimeCounter;
|
||||
uniform int frameCounter;
|
||||
uniform float screenBrightness;
|
||||
@@ -43,6 +47,7 @@ uniform vec3 shadowLightVec;
|
||||
uniform float shadowMaxProj;
|
||||
attribute vec4 mc_midTexCoord;
|
||||
varying vec4 color;
|
||||
varying vec3 vertexPos;
|
||||
|
||||
attribute vec4 mc_Entity;
|
||||
uniform int blockEntityId;
|
||||
@@ -53,7 +58,7 @@ uniform int entityId;
|
||||
#include "/lib/blocks.glsl"
|
||||
#include "/lib/entities.glsl"
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS
|
||||
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
|
||||
attribute vec4 at_midBlock;
|
||||
#else
|
||||
@@ -69,6 +74,8 @@ uniform int entityId;
|
||||
const float PI48 = 150.796447372*WAVY_SPEED;
|
||||
float pi2wt = PI48*frameTimeCounter;
|
||||
|
||||
out float LIGHTNING;
|
||||
|
||||
vec2 calcWave(in vec3 pos) {
|
||||
|
||||
float magnitude = abs(sin(dot(vec4(frameTimeCounter, pos),vec4(1.0,0.005,0.005,0.005)))*0.5+0.72)*0.013;
|
||||
@@ -138,6 +145,8 @@ vec3 viewToWorld(vec3 viewPos) {
|
||||
return pos.xyz;
|
||||
}
|
||||
|
||||
varying vec3 playerpos;
|
||||
|
||||
// uniform int renderStage;
|
||||
|
||||
// uniform mat4 gbufferModelViewInverse;
|
||||
@@ -199,10 +208,10 @@ void main() {
|
||||
// #endif
|
||||
|
||||
// #if defined IS_LPV_ENABLED || defined WAVY_PLANTS || !defined PLANET_CURVATURE
|
||||
vec3 playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
// #endif
|
||||
|
||||
#if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store
|
||||
#if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || WATER_INTERACTION == 2 || defined SHADER_GRASS
|
||||
PopulateShadowVoxel(playerpos);
|
||||
#endif
|
||||
|
||||
@@ -255,12 +264,19 @@ void main() {
|
||||
}
|
||||
#endif
|
||||
|
||||
LIGHTNING = 0.0;
|
||||
if (entityId == ENTITY_LIGHTNING) LIGHTNING = 1.0;
|
||||
|
||||
#ifdef PLANET_CURVATURE
|
||||
float curvature = length(worldpos) / (16*8);
|
||||
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
|
||||
#endif
|
||||
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
|
||||
#ifdef CUSTOM_MOON_ROTATION
|
||||
position = mat3(customShadowMatrixSSBO) * worldpos + customShadowMatrixSSBO[3].xyz;
|
||||
#else
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
|
||||
#endif
|
||||
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
if (entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SLIME)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#version 430
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#include "/dimensions/begin.csh"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#include "/dimensions/all_solid.tcs"
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#include "/dimensions/all_solid.tes"
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 430 compatibility
|
||||
#include "/lib/SSBOs.glsl"
|
||||
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
#ifdef IS_LPV_ENABLED
|
||||
#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS
|
||||
#extension GL_ARB_explicit_attrib_location: enable
|
||||
#extension GL_ARB_shader_image_load_store: enable
|
||||
#endif
|
||||
@@ -28,6 +31,7 @@ uniform mat4 gbufferProjection;
|
||||
uniform mat4 gbufferProjectionInverse;
|
||||
uniform int hideGUI;
|
||||
uniform vec3 cameraPosition;
|
||||
uniform vec3 relativeEyePosition;
|
||||
uniform float frameTimeCounter;
|
||||
uniform int frameCounter;
|
||||
uniform float screenBrightness;
|
||||
@@ -43,6 +47,7 @@ uniform vec3 shadowLightVec;
|
||||
uniform float shadowMaxProj;
|
||||
attribute vec4 mc_midTexCoord;
|
||||
varying vec4 color;
|
||||
varying vec3 vertexPos;
|
||||
|
||||
attribute vec4 mc_Entity;
|
||||
uniform int blockEntityId;
|
||||
@@ -53,7 +58,7 @@ uniform int entityId;
|
||||
#include "/lib/blocks.glsl"
|
||||
#include "/lib/entities.glsl"
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
#if defined IS_LPV_ENABLED || WATER_INTERACTION == 2 || defined SHADER_GRASS
|
||||
#ifdef IRIS_FEATURE_BLOCK_EMISSION_ATTRIBUTE
|
||||
attribute vec4 at_midBlock;
|
||||
#else
|
||||
@@ -69,6 +74,8 @@ uniform int entityId;
|
||||
const float PI48 = 150.796447372*WAVY_SPEED;
|
||||
float pi2wt = PI48*frameTimeCounter;
|
||||
|
||||
out float LIGHTNING;
|
||||
|
||||
vec2 calcWave(in vec3 pos) {
|
||||
|
||||
float magnitude = abs(sin(dot(vec4(frameTimeCounter, pos),vec4(1.0,0.005,0.005,0.005)))*0.5+0.72)*0.013;
|
||||
@@ -138,6 +145,8 @@ vec3 viewToWorld(vec3 viewPos) {
|
||||
return pos.xyz;
|
||||
}
|
||||
|
||||
varying vec3 playerpos;
|
||||
|
||||
// uniform int renderStage;
|
||||
|
||||
// uniform mat4 gbufferModelViewInverse;
|
||||
@@ -199,10 +208,10 @@ void main() {
|
||||
// #endif
|
||||
|
||||
// #if defined IS_LPV_ENABLED || defined WAVY_PLANTS || !defined PLANET_CURVATURE
|
||||
vec3 playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
playerpos = mat3(shadowModelViewInverse) * position + shadowModelViewInverse[3].xyz;
|
||||
// #endif
|
||||
|
||||
#if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store
|
||||
#if defined IS_LPV_ENABLED && defined MC_GL_ARB_shader_image_load_store || WATER_INTERACTION == 2 || defined SHADER_GRASS
|
||||
PopulateShadowVoxel(playerpos);
|
||||
#endif
|
||||
|
||||
@@ -255,12 +264,19 @@ void main() {
|
||||
}
|
||||
#endif
|
||||
|
||||
LIGHTNING = 0.0;
|
||||
if (entityId == ENTITY_LIGHTNING) LIGHTNING = 1.0;
|
||||
|
||||
#ifdef PLANET_CURVATURE
|
||||
float curvature = length(worldpos) / (16*8);
|
||||
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
|
||||
#endif
|
||||
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
|
||||
#ifdef CUSTOM_MOON_ROTATION
|
||||
position = mat3(customShadowMatrixSSBO) * worldpos + customShadowMatrixSSBO[3].xyz;
|
||||
#else
|
||||
position = mat3(shadowModelView) * worldpos + shadowModelView[3].xyz;
|
||||
#endif
|
||||
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
if (entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SLIME)
|
||||
|
||||
Reference in New Issue
Block a user