mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-11 17:58:20 +08:00
Fix shader grass jittering when far away from spawn, fix puddles/shader snow with view bobbing
This commit is contained in:
1 parent
a7259bd9f6
commit
35dbf2fc88
22 files changed
+461
-459
No files matched your search
@@ -71,3 +71,8 @@ Note: With default settings there is at least one guaranteed eclipse per ingame
|
||||
- locate the `green "code" button` on this page. this button is NOT in the `releases` page.
|
||||
- click the `green "code" button` and select `"download zip"`.
|
||||
- once the zip file finishes downloading, install it like a normal shader. you do NOT need to unzip/extract/decompress.
|
||||
|
||||
# You want MOAR performance?
|
||||
Delete the gbuffers_terrain.tcs and gbuffers_terrain.tes files for all world folders in the shaders.
|
||||
This will make the shader grass setting non functional BUT will increase performance, especially with high vanilla render distances!
|
||||
(If you're wondering why, Iris does NOT allow me to disable these files once they're there. So even when Shader Grass is disabled these execute and harm performance!)
|
||||
@@ -20,9 +20,28 @@
|
||||
#define MC_NORMAL_MAP
|
||||
#endif
|
||||
|
||||
#ifndef COLORWHEEL
|
||||
in float VanillaAO;
|
||||
#endif
|
||||
|
||||
in DATA {
|
||||
vec4 color;
|
||||
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
vec3 GrassNormals;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat int blockID;
|
||||
} data_in;
|
||||
|
||||
const float mincoord = 1.0/4096.0;
|
||||
const float maxcoord = 1.0-mincoord;
|
||||
@@ -35,33 +54,23 @@ uniform vec2 texelSize;
|
||||
uniform int framemod8;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
in vec4 texcoordam; // .st for add, .pq for mul
|
||||
in vec2 texcoord;
|
||||
|
||||
vec2 dcdx = dFdx(texcoord.st*texcoordam.pq)*exp2(Texture_MipMap_Bias);
|
||||
vec2 dcdy = dFdy(texcoord.st*texcoordam.pq)*exp2(Texture_MipMap_Bias);
|
||||
vec2 dcdx = dFdx(data_in.texcoord.st*data_in.texcoordam.pq)*exp2(Texture_MipMap_Bias);
|
||||
vec2 dcdy = dFdy(data_in.texcoord.st*data_in.texcoordam.pq)*exp2(Texture_MipMap_Bias);
|
||||
#else
|
||||
const vec2 dcdx = vec2(0.0);
|
||||
const vec2 dcdy = vec2(0.0);
|
||||
#endif
|
||||
|
||||
#include "/lib/res_params.glsl"
|
||||
in vec4 lmtexcoord;
|
||||
|
||||
in vec4 color;
|
||||
|
||||
uniform float far;
|
||||
|
||||
in vec4 normalMat;
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
uniform sampler2D normals;
|
||||
in vec4 tangent;
|
||||
#endif
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
in vec3 GrassNormals;
|
||||
#endif
|
||||
|
||||
uniform sampler2D specular;
|
||||
uniform sampler2D gtexture;
|
||||
@@ -89,8 +98,6 @@ uniform vec4 entityColor;
|
||||
|
||||
// in vec3 velocity;
|
||||
|
||||
flat in float blockID;
|
||||
|
||||
uniform int heldItemId;
|
||||
uniform int heldItemId2;
|
||||
|
||||
@@ -204,11 +211,11 @@ vec3 toClipSpace3(vec3 viewSpacePosition) {
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 readNormal(in vec2 coord)
|
||||
{
|
||||
return texture2DGradARB(normals,fract(coord)*texcoordam.pq+texcoordam.st,dcdx,dcdy);
|
||||
return texture2DGradARB(normals,fract(coord)*data_in.texcoordam.pq+data_in.texcoordam.st,dcdx,dcdy);
|
||||
}
|
||||
vec4 readTexture(in vec2 coord)
|
||||
{
|
||||
return texture2DGradARB(gtexture,fract(coord)*texcoordam.pq+texcoordam.st,dcdx,dcdy);
|
||||
return texture2DGradARB(gtexture,fract(coord)*data_in.texcoordam.pq+data_in.texcoordam.st,dcdx,dcdy);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -327,39 +334,37 @@ void main() {
|
||||
convertHandDepth(FragCoord.z);
|
||||
#endif
|
||||
|
||||
bool ifPOM = false;
|
||||
|
||||
#ifdef POM
|
||||
ifPOM = true;
|
||||
bool ifPOM = true;
|
||||
#else
|
||||
bool ifPOM = false;
|
||||
#endif
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
bool ShaderGrass = blockID == -15.0;
|
||||
if(ShaderGrass) ifPOM = false;
|
||||
bool ShaderGrass = data_in.blockID == -15;
|
||||
ifPOM = !ShaderGrass;
|
||||
#else
|
||||
bool ShaderGrass = false;
|
||||
#endif
|
||||
|
||||
bool SIGN = false;
|
||||
|
||||
if(blockID == BLOCK_SIGN) SIGN = true;
|
||||
bool SIGN = data_in.blockID == BLOCK_SIGN;
|
||||
|
||||
#ifdef ENTITIES
|
||||
// disallow POM to work on item frames.
|
||||
if(blockID == ENTITY_ITEM_FRAME) SIGN = true;
|
||||
SIGN = data_in.blockID == ENTITY_ITEM_FRAME;
|
||||
#else
|
||||
if(blockID == BLOCK_SIGN) SIGN = true;
|
||||
SIGN = data_in.blockID == BLOCK_SIGN;
|
||||
#endif
|
||||
|
||||
if(SIGN) ifPOM = false;
|
||||
ifPOM = !SIGN;
|
||||
|
||||
vec3 normal = normalMat.xyz;
|
||||
vec3 normal = data_in.normalMat.xyz;
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec3 binormal = normalize(cross(tangent.rgb,normal)*tangent.w);
|
||||
mat3 tbnMatrix = mat3(tangent.x, binormal.x, normal.x,
|
||||
tangent.y, binormal.y, normal.y,
|
||||
tangent.z, binormal.z, normal.z);
|
||||
vec3 binormal = normalize(cross(data_in.tangent.rgb,normal)*data_in.tangent.w);
|
||||
mat3 tbnMatrix = mat3(data_in.tangent.x, binormal.x, normal.x,
|
||||
data_in.tangent.y, binormal.y, normal.y,
|
||||
data_in.tangent.z, binormal.z, normal.z);
|
||||
#endif
|
||||
|
||||
vec2 tempOffset = offsets[framemod8];
|
||||
@@ -368,13 +373,13 @@ void main() {
|
||||
vec3 playerpos = mat3(gbufferModelViewInverse) * fragpos + gbufferModelViewInverse[3].xyz;
|
||||
vec3 worldpos = playerpos + cameraPosition;
|
||||
|
||||
vec2 adjustedTexCoord = lmtexcoord.xy;
|
||||
vec2 adjustedTexCoord = data_in.lmtexcoord.xy;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
// vec2 tempOffset=offsets[framemod8];
|
||||
|
||||
#ifndef COLORWHEEL
|
||||
adjustedTexCoord = fract(texcoord.st)*texcoordam.pq+texcoordam.st;
|
||||
adjustedTexCoord = fract(data_in.texcoord.st)*data_in.texcoordam.pq+data_in.texcoordam.st;
|
||||
#endif
|
||||
|
||||
// vec3 fragpos = toScreenSpace(gl_FragCoord.xyz*vec3(texelSize/RENDER_SCALE,1.0)-vec3(vec2(tempOffset)*texelSize*0.5,0.0));
|
||||
@@ -397,7 +402,7 @@ void main() {
|
||||
if (falloff > 0.0)
|
||||
#endif
|
||||
{
|
||||
float depthmap = readNormal(texcoord.st).a;
|
||||
float depthmap = readNormal(data_in.texcoord.st).a;
|
||||
float used_POM_DEPTH = 1.0;
|
||||
float pomdepth = POM_DEPTH*falloff;
|
||||
|
||||
@@ -409,7 +414,7 @@ void main() {
|
||||
#else
|
||||
vec3 interval = viewVector.xyz /-viewVector.z/MAX_OCCLUSION_POINTS*pomdepth;
|
||||
#endif
|
||||
vec3 coord = vec3(texcoord.st , 1.0);
|
||||
vec3 coord = vec3(data_in.texcoord.st , 1.0);
|
||||
|
||||
coord += interval * noise * used_POM_DEPTH;
|
||||
|
||||
@@ -426,7 +431,7 @@ void main() {
|
||||
}
|
||||
}
|
||||
|
||||
adjustedTexCoord = mix(fract(coord.st)*texcoordam.pq+texcoordam.st, adjustedTexCoord, max(dist-MIX_OCCLUSION_DISTANCE,0.0)/(MAX_OCCLUSION_DISTANCE-MIX_OCCLUSION_DISTANCE));
|
||||
adjustedTexCoord = mix(fract(coord.st)*data_in.texcoordam.pq+data_in.texcoordam.st, adjustedTexCoord, max(dist-MIX_OCCLUSION_DISTANCE,0.0)/(MAX_OCCLUSION_DISTANCE-MIX_OCCLUSION_DISTANCE));
|
||||
|
||||
vec3 truePos = fragpos + sumVec*inverseMatrix(tbnMatrix)*interval;
|
||||
|
||||
@@ -434,7 +439,7 @@ void main() {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(!ifPOM) adjustedTexCoord = lmtexcoord.xy;
|
||||
if(!ifPOM) adjustedTexCoord = data_in.lmtexcoord.xy;
|
||||
|
||||
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
@@ -443,10 +448,15 @@ void main() {
|
||||
|
||||
float textureLOD = bias();
|
||||
|
||||
vec2 lmcoord = lmtexcoord.zw;
|
||||
vec2 lmcoord = data_in.lmtexcoord.zw;
|
||||
|
||||
#ifndef COLORWHEEL
|
||||
vec4 Albedo = color;
|
||||
vec4 Color = data_in.color;
|
||||
float vanillaAO = 1.0 - clamp(Color.a,0,1);
|
||||
if (Color.a < 0.3) Color.a = 1.0; // fix vanilla ao on some custom block models.
|
||||
|
||||
vec4 Albedo = Color;
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && defined WORLD
|
||||
if (!ShaderGrass)
|
||||
#endif
|
||||
@@ -456,16 +466,20 @@ void main() {
|
||||
#else
|
||||
vec4 Albedo = texture2D_POMSwitch(gtexture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM, textureLOD);
|
||||
vec4 overlayColor;
|
||||
float VanillaAO;
|
||||
float vanillaAO;
|
||||
|
||||
clrwl_computeFragment(Albedo, Albedo, lmcoord, VanillaAO, overlayColor);
|
||||
clrwl_computeFragment(Albedo, Albedo, lmcoord, vanillaAO, overlayColor);
|
||||
lmcoord = clamp((lmcoord - 1.0 / 32.0) * 32.0 / 30.0, 0.0, 1.0);
|
||||
VanillaAO = 1.0 - clamp(VanillaAO, 0,1);
|
||||
vanillaAO = 1.0 - clamp(vanillaAO, 0,1);
|
||||
#endif
|
||||
|
||||
#ifdef WORLD
|
||||
vec3 flatNormals = viewToWorld(normal);
|
||||
#endif
|
||||
|
||||
#if REPLACE_SHORT_GRASS < 2 && !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
// darken the top of grass blocks a bit
|
||||
if(blockID == 85 && viewToWorld(normalMat.xyz).y > abs(0.9) && !ShaderGrass) Albedo *= smoothstep(-30.0, 25.0, length(playerpos));
|
||||
if(data_in.blockID == 85 && flatNormals.y > abs(0.9) && !ShaderGrass) Albedo *= smoothstep(-30.0, 25.0, length(playerpos));
|
||||
#endif
|
||||
|
||||
#if defined DISTANT_HORIZONS && DH_CHUNK_FADING > 0
|
||||
@@ -509,8 +523,7 @@ void main() {
|
||||
#endif
|
||||
|
||||
#if defined WORLD && !defined ENTITIES && !defined HAND && defined BLOCKENTITIES && !defined COLORWHEEL
|
||||
bool PORTAL = false;
|
||||
if(blockID == BLOCK_END_PORTAL || blockID == 187) PORTAL = true;
|
||||
bool PORTAL = data_in.blockID == BLOCK_END_PORTAL || data_in.blockID == 187;
|
||||
|
||||
float endPortalEmission = 0.0;
|
||||
if(PORTAL) {
|
||||
@@ -519,7 +532,7 @@ void main() {
|
||||
vec3 color = vec3(0.0);
|
||||
float absorbance = 1.0;
|
||||
|
||||
vec3 worldSpaceNormal = viewToWorld(normal);
|
||||
vec3 worldSpaceNormal = flatNormals;
|
||||
|
||||
vec3 viewVec = normalize(tbnMatrix*fragpos);
|
||||
vec3 correctedViewVec = viewVec;
|
||||
@@ -576,26 +589,26 @@ void main() {
|
||||
#ifdef AEROCHROME_MODE
|
||||
float gray = dot(Albedo.rgb, vec3(0.2, 1.0, 0.07));
|
||||
if (
|
||||
blockID == BLOCK_AMETHYST_BUD_MEDIUM || blockID == BLOCK_AMETHYST_BUD_LARGE || blockID == BLOCK_AMETHYST_CLUSTER
|
||||
|| blockID == BLOCK_SSS_STRONG || blockID == BLOCK_SSS_WEAK
|
||||
|| blockID == BLOCK_GLOW_LICHEN || blockID == BLOCK_SNOW_LAYERS
|
||||
|| blockID >= 10 && blockID < 80
|
||||
data_in.blockID == BLOCK_AMETHYST_BUD_MEDIUM || data_in.blockID == BLOCK_AMETHYST_BUD_LARGE || data_in.blockID == BLOCK_AMETHYST_CLUSTER
|
||||
|| data_in.blockID == BLOCK_SSS_STRONG || data_in.blockID == BLOCK_SSS_WEAK
|
||||
|| data_in.blockID == BLOCK_GLOW_LICHEN || data_in.blockID == BLOCK_SNOW_LAYERS
|
||||
|| data_in.blockID >= 10 && data_in.blockID < 80
|
||||
) {
|
||||
// IR Reflective (Pink-red)
|
||||
Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7);
|
||||
}
|
||||
else if(blockID == BLOCK_GRASS) {
|
||||
else if(data_in.blockID == BLOCK_GRASS) {
|
||||
// Special handling for grass block
|
||||
float strength = 1.0 - color.b;
|
||||
float strength = 1.0 - Color.b;
|
||||
Albedo.rgb = mix(Albedo.rgb, aerochrome_color, strength);
|
||||
}
|
||||
#ifdef AEROCHROME_WOOL_ENABLED
|
||||
else if (blockID == BLOCK_SSS_WEAK_2 || blockID == BLOCK_CARPET) {
|
||||
else if (data_in.blockID == BLOCK_SSS_WEAK_2 || data_in.blockID == BLOCK_CARPET) {
|
||||
// Wool
|
||||
Albedo.rgb = mix(Albedo.rgb, aerochrome_color, 0.3);
|
||||
}
|
||||
#endif
|
||||
else if(blockID == BLOCK_WATER || (blockID >= 300 && blockID < 400))
|
||||
else if(data_in.blockID == BLOCK_WATER || (data_in.blockID >= 300 && data_in.blockID < 400))
|
||||
{
|
||||
// IR Absorbsive? Dark.
|
||||
Albedo.rgb = mix(Albedo.rgb, vec3(0.01, 0.08, 0.15), 0.5);
|
||||
@@ -603,7 +616,7 @@ void main() {
|
||||
#endif
|
||||
|
||||
#ifdef WORLD
|
||||
if (Albedo.a > 0.1) Albedo.a = normalMat.a;
|
||||
if (Albedo.a > 0.1) Albedo.a = data_in.normalMat.a;
|
||||
else Albedo.a = 0.0;
|
||||
#endif
|
||||
|
||||
@@ -662,23 +675,23 @@ void main() {
|
||||
/////// ----- SSS ON BLOCKS ----- ///////
|
||||
// strong
|
||||
if (
|
||||
blockID == BLOCK_SSS_STRONG || blockID == BLOCK_SAPLING || blockID == BLOCK_AIR_WAVING
|
||||
data_in.blockID == BLOCK_SSS_STRONG || data_in.blockID == BLOCK_SAPLING || data_in.blockID == BLOCK_AIR_WAVING
|
||||
) {
|
||||
SSSAMOUNT = 1.0;
|
||||
}
|
||||
|
||||
// medium
|
||||
if (
|
||||
blockID == BLOCK_GROUND_WAVING || blockID == BLOCK_GROUND_WAVING_VERTICAL
|
||||
|| blockID == BLOCK_GRASS_SHORT || blockID == BLOCK_GRASS_TALL_UPPER || blockID == BLOCK_GRASS_TALL_LOWER
|
||||
data_in.blockID == BLOCK_GROUND_WAVING || data_in.blockID == BLOCK_GROUND_WAVING_VERTICAL
|
||||
|| data_in.blockID == BLOCK_GRASS_SHORT || data_in.blockID == BLOCK_GRASS_TALL_UPPER || data_in.blockID == BLOCK_GRASS_TALL_LOWER
|
||||
) {
|
||||
SSSAMOUNT = 0.5;
|
||||
}
|
||||
if (
|
||||
blockID == BLOCK_SSS_WEAK || blockID == BLOCK_SSS_WEAK_2 ||
|
||||
blockID == BLOCK_GLOW_LICHEN || blockID == BLOCK_SNOW_LAYERS || blockID == BLOCK_CARPET ||
|
||||
blockID == BLOCK_AMETHYST_BUD_MEDIUM || blockID == BLOCK_AMETHYST_BUD_LARGE || blockID == BLOCK_AMETHYST_CLUSTER ||
|
||||
blockID == BLOCK_BAMBOO || blockID == BLOCK_SAPLING || blockID == BLOCK_VINE || blockID == BLOCK_VINE_OTHER
|
||||
data_in.blockID == BLOCK_SSS_WEAK || data_in.blockID == BLOCK_SSS_WEAK_2 ||
|
||||
data_in.blockID == BLOCK_GLOW_LICHEN || data_in.blockID == BLOCK_SNOW_LAYERS || data_in.blockID == BLOCK_CARPET ||
|
||||
data_in.blockID == BLOCK_AMETHYST_BUD_MEDIUM || data_in.blockID == BLOCK_AMETHYST_BUD_LARGE || data_in.blockID == BLOCK_AMETHYST_CLUSTER ||
|
||||
data_in.blockID == BLOCK_BAMBOO || data_in.blockID == BLOCK_SAPLING || data_in.blockID == BLOCK_VINE || data_in.blockID == BLOCK_VINE_OTHER
|
||||
) {
|
||||
SSSAMOUNT = 0.5;
|
||||
}
|
||||
@@ -686,7 +699,7 @@ void main() {
|
||||
// low
|
||||
#ifdef MISC_BLOCK_SSS
|
||||
if(
|
||||
blockID == BLOCK_SSS_WEIRD || blockID == BLOCK_GRASS
|
||||
data_in.blockID == BLOCK_SSS_WEIRD || data_in.blockID == BLOCK_GRASS
|
||||
){
|
||||
SSSAMOUNT = 0.5;
|
||||
}
|
||||
@@ -696,12 +709,12 @@ void main() {
|
||||
#ifdef MOB_SSS
|
||||
/////// ----- SSS ON MOBS----- ///////
|
||||
// strong
|
||||
if(blockID == ENTITY_SSS_MEDIUM) SSSAMOUNT = 0.75;
|
||||
if(data_in.blockID == ENTITY_SSS_MEDIUM) SSSAMOUNT = 0.75;
|
||||
|
||||
// medium
|
||||
|
||||
// low
|
||||
if(blockID == ENTITY_SSS_WEAK || blockID == ENTITY_PLAYER) SSSAMOUNT = 0.4;
|
||||
if(data_in.blockID == ENTITY_SSS_WEAK || data_in.blockID == ENTITY_PLAYER) SSSAMOUNT = 0.4;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -710,7 +723,7 @@ void main() {
|
||||
// strong
|
||||
|
||||
// medium
|
||||
if(blockID == BLOCK_SSS_WEAK_3) SSSAMOUNT = 0.4;
|
||||
if(data_in.blockID == BLOCK_SSS_WEAK_3) SSSAMOUNT = 0.4;
|
||||
|
||||
// low
|
||||
|
||||
@@ -724,26 +737,26 @@ void main() {
|
||||
// if(vNameTags > 0) EMISSIVE = 0.9;
|
||||
|
||||
// normal block lightsources
|
||||
if(blockID >= 100 && blockID < 300) EMISSIVE = 0.5;
|
||||
if(data_in.blockID >= 100 && data_in.blockID < 300) EMISSIVE = 0.5;
|
||||
|
||||
if(blockID == 266 || blockID == 497) EMISSIVE = 0.2; // sculk stuff
|
||||
if(data_in.blockID == 266 || data_in.blockID == 497) EMISSIVE = 0.2; // sculk stuff
|
||||
|
||||
if(blockID == 195) EMISSIVE = 2.3; // glow lichen
|
||||
if(data_in.blockID == 195) EMISSIVE = 2.3; // glow lichen
|
||||
|
||||
if(blockID == 185) EMISSIVE = 1.5; // crying obsidian
|
||||
if(data_in.blockID == 185) EMISSIVE = 1.5; // crying obsidian
|
||||
|
||||
if(blockID == 105) EMISSIVE = 2.0; // brewing stand
|
||||
if(data_in.blockID == 105) EMISSIVE = 2.0; // brewing stand
|
||||
|
||||
if(blockID == 236) EMISSIVE = 1.0; // respawn anchor
|
||||
if(data_in.blockID == 236) EMISSIVE = 1.0; // respawn anchor
|
||||
|
||||
if(blockID == 101) EMISSIVE = 0.7; // large amethyst bud
|
||||
if(data_in.blockID == 101) EMISSIVE = 0.7; // large amethyst bud
|
||||
|
||||
if(blockID == 103) EMISSIVE = 1.0; // amethyst cluster
|
||||
if(data_in.blockID == 103) EMISSIVE = 1.0; // amethyst cluster
|
||||
|
||||
if(blockID == 244) EMISSIVE = 1.5; // soul fire
|
||||
if(data_in.blockID == 244) EMISSIVE = 1.5; // soul fire
|
||||
|
||||
#ifdef EMISSIVE_ORES
|
||||
if(blockID == 502) EMISSIVE = EMISSIVE_ORES_STRENGTH;
|
||||
if(data_in.blockID == 502) EMISSIVE = EMISSIVE_ORES_STRENGTH;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -829,17 +842,15 @@ void main() {
|
||||
|
||||
normal = viewToWorld(normal);
|
||||
|
||||
vec3 flatNormals = viewToWorld(normalMat.xyz);
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
if (ShaderGrass) {flatNormals = normalMat.xyz; normal = GrassNormals;}
|
||||
if (ShaderGrass) {flatNormals = data_in.normalMat.xyz; normal = data_in.GrassNormals;}
|
||||
#endif
|
||||
|
||||
vec4 data1 = clamp( encode(normal, PackLightmaps), 0.0, 1.0);
|
||||
|
||||
gl_FragData[0] = vec4(encodeVec2(Albedo.x,data1.x), encodeVec2(Albedo.y,data1.y), encodeVec2(Albedo.z,data1.z), encodeVec2(data1.w,Albedo.w));
|
||||
|
||||
gl_FragData[2] = vec4(flatNormals * 0.5 + 0.5, VanillaAO);
|
||||
gl_FragData[2] = vec4(flatNormals * 0.5 + 0.5, vanillaAO);
|
||||
#endif
|
||||
|
||||
}
|
||||
+116
-100
@@ -3,48 +3,61 @@ layout(triangles) in;
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
#if GRASS_QUALITY == 2
|
||||
layout(triangle_strip, max_vertices = 24) out;
|
||||
#elif GRASS_QUALITY == 1
|
||||
layout(triangle_strip, max_vertices = 18) out;
|
||||
#else
|
||||
layout(triangle_strip, max_vertices = 12) out;
|
||||
#endif
|
||||
#else
|
||||
layout(triangle_strip, max_vertices = 3) out;
|
||||
#endif
|
||||
|
||||
in vec4 vcolor[];
|
||||
in float vVanillaAO[];
|
||||
in DATA {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
vec4 grassSideCheck;
|
||||
vec3 centerPosition;
|
||||
#endif
|
||||
|
||||
in vec4 vlmtexcoord[];
|
||||
in vec4 vnormalMat[];
|
||||
vec4 color;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
in vec4 vtexcoordam[]; // .st for add, .pq for mul
|
||||
in vec2 vtexcoord[];
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
out vec4 texcoordam; // .st for add, .pq for mul
|
||||
out vec2 texcoord;
|
||||
#endif
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
in vec4 vtangent[];
|
||||
#endif
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat in float vblockID[];
|
||||
flat int blockID;
|
||||
} data_in[];
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
in vec4 vgrassSideCheck[];
|
||||
in vec3 vcenterPosition[];
|
||||
out vec3 GrassNormals;
|
||||
#endif
|
||||
out DATA {
|
||||
vec4 color;
|
||||
|
||||
out vec4 color;
|
||||
out float VanillaAO;
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
out vec4 lmtexcoord;
|
||||
out vec4 normalMat;
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
out vec4 tangent;
|
||||
#endif
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
vec3 GrassNormals;
|
||||
#endif
|
||||
|
||||
flat out float blockID;
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat int blockID;
|
||||
} data_out;
|
||||
|
||||
|
||||
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
|
||||
@@ -67,6 +80,8 @@ uniform float screenBrightness;
|
||||
uniform mat4 gbufferModelView;
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform vec3 cameraPosition;
|
||||
uniform ivec3 cameraPositionInt;
|
||||
uniform vec3 cameraPositionFract;
|
||||
uniform int framemod8;
|
||||
uniform vec2 texelSize;
|
||||
uniform float frameTimeCounter;
|
||||
@@ -107,75 +122,77 @@ vec3 calculateNormal(vec3 v0, vec3 v1, vec3 v2) {
|
||||
|
||||
void main() {
|
||||
|
||||
vec2 TAA_offsets = offsets[framemod8];
|
||||
#ifdef SHADER_GRASS
|
||||
vec2 TAA_offsets = offsets[framemod8];
|
||||
#endif
|
||||
|
||||
int i;
|
||||
|
||||
#if !defined BLOCKENTITIES && !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined COLORWHEEL && defined WORLD
|
||||
GrassNormals = vec3(0.0, 1.0, 0.0);
|
||||
data_out.GrassNormals = vec3(0.0, 1.0, 0.0);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
vec4 vertex = gl_in[i].gl_Position;
|
||||
|
||||
#if defined PLANET_CURVATURE && !defined HAND
|
||||
float curvature = length(vertex.xyz) / (16.0*8.0);
|
||||
vertex.y -= curvature*curvature * CURVATURE_AMOUNT;
|
||||
#endif
|
||||
#ifdef SHADER_GRASS
|
||||
#if defined PLANET_CURVATURE && !defined HAND
|
||||
float curvature = length(vertex.xyz) / (16.0*8.0);
|
||||
vertex.y -= curvature*curvature * CURVATURE_AMOUNT;
|
||||
#endif
|
||||
|
||||
#if !defined ENTITIES && !defined HAND
|
||||
vertex = toClipSpace3(mat3(gbufferModelView) * vec3(vertex) + gbufferModelView[3].xyz);
|
||||
#if !defined ENTITIES && !defined HAND
|
||||
vertex = toClipSpace3(mat3(gbufferModelView) * vec3(vertex) + gbufferModelView[3].xyz);
|
||||
#endif
|
||||
|
||||
#ifdef TAA_UPSCALING
|
||||
vertex.xy = vertex.xy * RENDER_SCALE + RENDER_SCALE * vertex.w - vertex.w;
|
||||
#endif
|
||||
#ifdef TAA
|
||||
// #ifdef HAND
|
||||
// turn off jitter when camera moves.
|
||||
// this is to hide the jitter when the same happens for TAA blend factor and the jitter becomes visible during camera movement
|
||||
// gl_Position.xy += (offsets[framemod8] * gl_Position.w*texelSize) * detectCameraMovement();
|
||||
// #else
|
||||
vertex.xy += TAA_offsets * vertex.w*texelSize;
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
#if DOF_QUALITY == 5
|
||||
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
||||
jitter = rotate(radians(float(frameCounter))) * jitter;
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
#if MANUAL_FOCUS == -2
|
||||
float focusMul = 0;
|
||||
#elif MANUAL_FOCUS == -1
|
||||
float focusMul = vertex.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = vertex.z - MANUAL_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
vertex.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
gl_Position = vertex;
|
||||
|
||||
#ifdef TAA_UPSCALING
|
||||
gl_Position.xy = gl_Position.xy * RENDER_SCALE + RENDER_SCALE * gl_Position.w - gl_Position.w;
|
||||
#endif
|
||||
#ifdef TAA
|
||||
// #ifdef HAND
|
||||
// turn off jitter when camera moves.
|
||||
// this is to hide the jitter when the same happens for TAA blend factor and the jitter becomes visible during camera movement
|
||||
// gl_Position.xy += (offsets[framemod8] * gl_Position.w*texelSize) * detectCameraMovement();
|
||||
// #else
|
||||
gl_Position.xy += TAA_offsets * gl_Position.w*texelSize;
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
|
||||
#if DOF_QUALITY == 5
|
||||
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
||||
jitter = rotate(radians(float(frameCounter))) * jitter;
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
#if MANUAL_FOCUS == -2
|
||||
float focusMul = 0;
|
||||
#elif MANUAL_FOCUS == -1
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - MANUAL_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
gl_Position.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
|
||||
color = vcolor[i];
|
||||
VanillaAO = vVanillaAO[i];
|
||||
lmtexcoord = vlmtexcoord[i];
|
||||
normalMat = vnormalMat[i];
|
||||
data_out.color = data_in[i].color;
|
||||
data_out.lmtexcoord = data_in[i].lmtexcoord;
|
||||
data_out.normalMat = data_in[i].normalMat;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
texcoordam = vtexcoordam[i];
|
||||
texcoord = vtexcoord[i];
|
||||
data_out.texcoordam = data_in[i].texcoordam;
|
||||
data_out.texcoord = data_in[i].texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
tangent = vtangent[i];
|
||||
data_out.tangent = data_in[i].tangent;
|
||||
#endif
|
||||
blockID = vblockID[i];
|
||||
data_out.blockID = data_in[i].blockID;
|
||||
|
||||
#ifdef COLORWHEEL
|
||||
clrwl_setVertexOut(i);
|
||||
@@ -199,15 +216,15 @@ void main() {
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec3 normals = viewToWorld(vnormalMat[1].xyz);
|
||||
vec3 normals = viewToWorld(data_in[1].normalMat.xyz);
|
||||
#else
|
||||
const vec3 normals = vec3(0.0, 1.0, 0.0);
|
||||
#endif
|
||||
|
||||
#if REPLACE_SHORT_GRASS == 2
|
||||
if (vblockID[1] == 85 && normals.y > 0.9 && vertexDist < GRASS_RANGE && vgrassSideCheck[0].x > 1.5)
|
||||
if (data_in[1].blockID == 85 && normals.y > 0.9 && vertexDist < GRASS_RANGE && data_in[0].grassSideCheck.x > 1.5)
|
||||
#else
|
||||
if (vblockID[1] == 85 && normals.y > 0.9 && vertexDist < GRASS_RANGE)
|
||||
if (data_in[1].blockID == 85 && normals.y > 0.9 && vertexDist < GRASS_RANGE)
|
||||
#endif
|
||||
{
|
||||
#if GRASS_QUALITY == 2
|
||||
@@ -228,20 +245,20 @@ void main() {
|
||||
#endif
|
||||
|
||||
|
||||
float eastHeightMult = pow(clamp(abs(vgrassSideCheck[0].x) * abs(vertex.x-(vcenterPosition[0].x-0.5)), 0.0, 1.0), 2.0);
|
||||
float westHeightMult = pow(clamp(abs(vgrassSideCheck[0].y) * abs(vertex.x-(vcenterPosition[0].x+0.5)), 0.0, 1.0), 2.0);
|
||||
float southHeightMult = pow(clamp(abs(vgrassSideCheck[0].z) * abs(vertex.z-(vcenterPosition[0].z-0.5)), 0.0, 1.0), 2.0);
|
||||
float northHeightMult = pow(clamp(abs(vgrassSideCheck[0].w) * abs(vertex.z-(vcenterPosition[0].z+0.5)), 0.0, 1.0), 2.0);
|
||||
float eastHeightMult = pow(clamp(abs(data_in[0].grassSideCheck.x) * abs(vertex.x-(data_in[0].centerPosition.x-0.5)), 0.0, 1.0), 2.0);
|
||||
float westHeightMult = pow(clamp(abs(data_in[0].grassSideCheck.y) * abs(vertex.x-(data_in[0].centerPosition.x+0.5)), 0.0, 1.0), 2.0);
|
||||
float southHeightMult = pow(clamp(abs(data_in[0].grassSideCheck.z) * abs(vertex.z-(data_in[0].centerPosition.z-0.5)), 0.0, 1.0), 2.0);
|
||||
float northHeightMult = pow(clamp(abs(data_in[0].grassSideCheck.w) * abs(vertex.z-(data_in[0].centerPosition.z+0.5)), 0.0, 1.0), 2.0);
|
||||
|
||||
eastHeightMult *= normalize(vgrassSideCheck[0].x);
|
||||
westHeightMult *= normalize(vgrassSideCheck[0].y);
|
||||
southHeightMult *= normalize(vgrassSideCheck[0].z);
|
||||
northHeightMult *= normalize(vgrassSideCheck[0].w);
|
||||
eastHeightMult *= normalize(data_in[0].grassSideCheck.x);
|
||||
westHeightMult *= normalize(data_in[0].grassSideCheck.y);
|
||||
southHeightMult *= normalize(data_in[0].grassSideCheck.z);
|
||||
northHeightMult *= normalize(data_in[0].grassSideCheck.w);
|
||||
|
||||
float totalHeightMult = 0.5*clamp(eastHeightMult + westHeightMult + southHeightMult + northHeightMult, -1.0*BASE_GRASS_HEIGHT*BASE_GRASS_HEIGHT, 1.0*SHORT_GRASS_HEIGHT) + 1.0*BASE_GRASS_HEIGHT;
|
||||
heightMult *= totalHeightMult;
|
||||
|
||||
if(abs(vgrassSideCheck[0].x) > 1.5) {
|
||||
if(abs(data_in[0].grassSideCheck.x) > 1.5) {
|
||||
eastHeightMult = 0.0;
|
||||
westHeightMult = 0.0;
|
||||
southHeightMult = 0.0;
|
||||
@@ -255,9 +272,9 @@ void main() {
|
||||
float playerDist = smoothstep(0.5, 0.05, length(offsetPos.xz)) * smoothstep(1.0, 0.2, abs(offsetPos.y));
|
||||
vec2 dir2 = normalize(vertex.xz+relativeEyePosition.xz);
|
||||
|
||||
vec2 Wvertex = vertex.xz+cameraPosition.xz;
|
||||
vec2 Wvertex = vertex.xz+cameraPositionFract.xz+mod(vec2(cameraPositionInt.xz), vec2(20.0));
|
||||
|
||||
vec2 randomDir = 2.0*(texture2D(noisetex, fract(GRASS_NOISE1_SCALE*Wvertex)).xy+texture2D(noisetex, fract(GRASS_NOISE2_SCALE*Wvertex.yx)).xy)-1.0;
|
||||
vec2 randomDir = 2.0*(texture2D(noisetex, 0.75*Wvertex).xy+texture2D(noisetex, 0.35*Wvertex.yx).xy)-1.0;
|
||||
// vertex.xz -= 0.05*randomDir;
|
||||
|
||||
|
||||
@@ -369,30 +386,29 @@ void main() {
|
||||
|
||||
float heightfade = smoothstep(-0.35, 1.0, grassHeights[3*j+i]);
|
||||
|
||||
color = vcolor[i]*heightfade;
|
||||
data_out.color = data_in[i].color*heightfade;
|
||||
|
||||
if (vcolor[i].rgb == vec3(1.0)) color.rgb = vec3(0.22,0.32,0.11)*heightfade;
|
||||
if (data_in[i].color.rgb == vec3(1.0)) data_out.color.rgb = vec3(0.22,0.32,0.11)*heightfade;
|
||||
|
||||
VanillaAO = vVanillaAO[i];
|
||||
lmtexcoord = vlmtexcoord[i];
|
||||
normalMat.a = 0.4;
|
||||
data_out.lmtexcoord = data_in[i].lmtexcoord;
|
||||
data_out.normalMat.a = 0.4;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
texcoordam = vtexcoordam[i];
|
||||
texcoord = vtexcoord[i];
|
||||
data_out.texcoordam = data_in[i].texcoordam;
|
||||
data_out.texcoord = data_in[i].texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
tangent = vtangent[i];
|
||||
data_out.tangent = data_in[i].tangent;
|
||||
|
||||
normalMat.xyz = GrassNormal[j];
|
||||
data_out.normalMat.xyz = GrassNormal[j];
|
||||
|
||||
heightfade = smoothstep(0.1, grassHeights[triangle_count], grassHeights[3*j+i]);
|
||||
#endif
|
||||
|
||||
GrassNormals = normalize(mix(GrassNormal[0], GrassNormal[triangle_count-1], vec3(heightfade)));
|
||||
data_out.GrassNormals = normalize(mix(GrassNormal[0], GrassNormal[triangle_count-1], vec3(heightfade)));
|
||||
|
||||
blockID = -15.0;
|
||||
data_out.blockID = -15;
|
||||
|
||||
EmitVertex();
|
||||
}
|
||||
|
||||
@@ -2,45 +2,52 @@ layout (vertices=3) out;
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
in vec4 vcolor[];
|
||||
in float vVanillaAO[];
|
||||
in DATA {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
vec4 grassSideCheck;
|
||||
vec3 centerPosition;
|
||||
int discardGrass;
|
||||
#endif
|
||||
|
||||
in vec4 vlmtexcoord[];
|
||||
in vec4 vnormalMat[];
|
||||
vec4 color;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
in vec4 vtexcoordam[]; // .st for add, .pq for mul
|
||||
in vec2 vtexcoord[];
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
out vec4 texcoordam[]; // .st for add, .pq for mul
|
||||
out vec2 texcoord[];
|
||||
#endif
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
in vec4 vtangent[];
|
||||
#endif
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat in float vblockID[];
|
||||
flat int blockID;
|
||||
} data_in[];
|
||||
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES && defined WORLD
|
||||
flat in int vdiscardGrass[];
|
||||
in vec4 vgrassSideCheck[];
|
||||
out vec4 grassSideCheck[];
|
||||
in vec3 vcenterPosition[];
|
||||
out vec3 centerPosition[];
|
||||
#endif
|
||||
out DATA {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
vec4 grassSideCheck;
|
||||
vec3 centerPosition;
|
||||
#endif
|
||||
|
||||
out vec4 color[];
|
||||
out float VanillaAO[];
|
||||
vec4 color;
|
||||
|
||||
out vec4 lmtexcoord[];
|
||||
out vec4 normalMat[];
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
out vec4 tangent[];
|
||||
#endif
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
flat out float blockID[];
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat int blockID;
|
||||
} data_out[];
|
||||
|
||||
uniform mat4 gbufferModelViewInverse;
|
||||
uniform vec3 cameraPosition;
|
||||
@@ -57,31 +64,30 @@ void main() {
|
||||
|
||||
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
|
||||
|
||||
color[gl_InvocationID] = vcolor[gl_InvocationID];
|
||||
VanillaAO[gl_InvocationID] = vVanillaAO[gl_InvocationID];
|
||||
lmtexcoord[gl_InvocationID] = vlmtexcoord[gl_InvocationID];
|
||||
normalMat[gl_InvocationID] = vnormalMat[gl_InvocationID];
|
||||
data_out[gl_InvocationID].color = data_in[gl_InvocationID].color;
|
||||
data_out[gl_InvocationID].lmtexcoord = data_in[gl_InvocationID].lmtexcoord;
|
||||
data_out[gl_InvocationID].normalMat = data_in[gl_InvocationID].normalMat;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
texcoordam[gl_InvocationID] = vtexcoordam[gl_InvocationID];
|
||||
texcoord[gl_InvocationID] = vtexcoord[gl_InvocationID];
|
||||
data_out[gl_InvocationID].texcoordam = data_in[gl_InvocationID].texcoordam;
|
||||
data_out[gl_InvocationID].texcoord = data_in[gl_InvocationID].texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
tangent[gl_InvocationID] = vtangent[gl_InvocationID];
|
||||
data_out[gl_InvocationID].tangent = data_in[gl_InvocationID].tangent;
|
||||
#endif
|
||||
|
||||
blockID[gl_InvocationID] = vblockID[gl_InvocationID];
|
||||
data_out[gl_InvocationID].blockID = data_in[gl_InvocationID].blockID;
|
||||
|
||||
if(gl_InvocationID == 0) {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES && defined WORLD
|
||||
|
||||
grassSideCheck[gl_InvocationID] = vgrassSideCheck[gl_InvocationID];
|
||||
data_out[gl_InvocationID].grassSideCheck = data_in[gl_InvocationID].grassSideCheck;
|
||||
|
||||
centerPosition[gl_InvocationID] = vcenterPosition[gl_InvocationID];
|
||||
data_out[gl_InvocationID].centerPosition = data_in[gl_InvocationID].centerPosition;
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec3 normals = viewToWorld(vnormalMat[0].xyz);
|
||||
vec3 normals = viewToWorld(data_in[0].normalMat.xyz);
|
||||
#else
|
||||
const vec3 normals = vec3(0.0, 1.0, 0.0);
|
||||
#endif
|
||||
@@ -89,9 +95,9 @@ void main() {
|
||||
float vDist = length(gl_out[gl_InvocationID].gl_Position.xyz);
|
||||
|
||||
#if REPLACE_SHORT_GRASS == 2
|
||||
if (vblockID[0] == 85 && normals.y > 0.9 && vDist < GRASS_RANGE && vgrassSideCheck[gl_InvocationID].x > 1.5)
|
||||
if (data_in[0].blockID == 85 && normals.y > 0.9 && vDist < GRASS_RANGE && data_in[gl_InvocationID].grassSideCheck.x > 1.5)
|
||||
#else
|
||||
if (vblockID[0] == 85 && normals.y > 0.9 && vDist < GRASS_RANGE)
|
||||
if (data_in[0].blockID == 85 && normals.y > 0.9 && vDist < GRASS_RANGE)
|
||||
#endif
|
||||
{
|
||||
// This removes the second layer of some texture packs like patrix, otherwise the grass is duplicated
|
||||
@@ -142,7 +148,7 @@ void main() {
|
||||
}
|
||||
|
||||
#if REPLACE_SHORT_GRASS > 0
|
||||
if(vdiscardGrass[gl_InvocationID] == 1){
|
||||
if(data_in[gl_InvocationID].discardGrass == 1){
|
||||
gl_TessLevelOuter[0] = 0;
|
||||
gl_TessLevelOuter[1] = 0;
|
||||
gl_TessLevelOuter[2] = 0;
|
||||
|
||||
@@ -2,75 +2,78 @@ layout (triangles, fractional_odd_spacing, ccw) in;
|
||||
|
||||
#include "/lib/settings.glsl"
|
||||
|
||||
in vec4 color[];
|
||||
in float VanillaAO[];
|
||||
in DATA {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
vec4 grassSideCheck;
|
||||
vec3 centerPosition;
|
||||
#endif
|
||||
|
||||
in vec4 lmtexcoord[];
|
||||
in vec4 normalMat[];
|
||||
vec4 color;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
in vec4 texcoordam[]; // .st for add, .pq for mul
|
||||
in vec2 texcoord[];
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
out vec4 vtexcoordam; // .st for add, .pq for mul
|
||||
out vec2 vtexcoord;
|
||||
#endif
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
in vec4 tangent[];
|
||||
#endif
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat in float blockID[];
|
||||
flat int blockID;
|
||||
} data_in[];
|
||||
|
||||
out DATA {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
vec4 grassSideCheck;
|
||||
vec3 centerPosition;
|
||||
#endif
|
||||
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES && defined WORLD
|
||||
in vec4 grassSideCheck[];
|
||||
out vec4 vgrassSideCheck;
|
||||
vec4 color;
|
||||
|
||||
in vec3 centerPosition[];
|
||||
out vec3 vcenterPosition;
|
||||
#endif
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
out vec4 vcolor;
|
||||
out float vVanillaAO;
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
out vec4 vlmtexcoord;
|
||||
out vec4 vnormalMat;
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat int blockID;
|
||||
} data_out;
|
||||
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
out vec4 vtangent;
|
||||
#endif
|
||||
|
||||
flat out float vblockID;
|
||||
|
||||
#define calcTessellation(u, v, w) (gl_TessCoord.x * u + gl_TessCoord.y * v + gl_TessCoord.z * w)
|
||||
|
||||
void main() {
|
||||
|
||||
gl_Position = calcTessellation(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_in[2].gl_Position);
|
||||
|
||||
vcolor = calcTessellation(color[0], color[1], color[2]);
|
||||
vVanillaAO = calcTessellation(VanillaAO[0], VanillaAO[1], VanillaAO[2]);
|
||||
vlmtexcoord = calcTessellation(lmtexcoord[0], lmtexcoord[1], lmtexcoord[2]);
|
||||
vnormalMat.rgb = calcTessellation(normalMat[0].rgb, normalMat[1].rgb, normalMat[2].rgb);
|
||||
data_out.color = calcTessellation(data_in[0].color, data_in[1].color, data_in[2].color);
|
||||
data_out.lmtexcoord = calcTessellation(data_in[0].lmtexcoord, data_in[1].lmtexcoord, data_in[2].lmtexcoord);
|
||||
data_out.normalMat.rgb = calcTessellation(data_in[0].normalMat.rgb, data_in[1].normalMat.rgb, data_in[2].normalMat.rgb);
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vtexcoordam = calcTessellation(texcoordam[0], texcoordam[1], texcoordam[2]);
|
||||
vtexcoord = calcTessellation(texcoord[0], texcoord[1], texcoord[2]);
|
||||
data_out.texcoordam = calcTessellation(data_in[0].texcoordam, data_in[1].texcoordam, data_in[2].texcoordam);
|
||||
data_out.texcoord = calcTessellation(data_in[0].texcoord, data_in[1].texcoord, data_in[2].texcoord);
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vtangent = calcTessellation(tangent[0], tangent[1], tangent[2]);
|
||||
data_out.tangent = calcTessellation(data_in[0].tangent, data_in[1].tangent, data_in[2].tangent);
|
||||
#endif
|
||||
|
||||
vnormalMat.a = normalMat[0].a;
|
||||
vblockID = blockID[0];
|
||||
data_out.normalMat.a = data_in[0].normalMat.a;
|
||||
data_out.blockID = data_in[0].blockID;
|
||||
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES && defined WORLD
|
||||
vgrassSideCheck = grassSideCheck[0];
|
||||
vcenterPosition = centerPosition[0];
|
||||
data_out.grassSideCheck = data_in[0].grassSideCheck;
|
||||
data_out.centerPosition = data_in[0].centerPosition;
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -27,25 +27,33 @@ Read the terms of modification and sharing before changing something below pleas
|
||||
#define MC_NORMAL_MAP
|
||||
#endif
|
||||
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
out vec4 vgrassSideCheck;
|
||||
out vec3 vcenterPosition;
|
||||
flat out int vdiscardGrass;
|
||||
#endif
|
||||
|
||||
out vec4 vcolor;
|
||||
out float vVanillaAO;
|
||||
|
||||
out vec4 vlmtexcoord;
|
||||
out vec4 vnormalMat;
|
||||
out DATA {
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && !defined BLOCKENTITIES
|
||||
vec4 grassSideCheck;
|
||||
vec3 centerPosition;
|
||||
int discardGrass;
|
||||
#endif
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
out vec4 vtexcoordam; // .st for add, .pq for mul
|
||||
out vec2 vtexcoord;
|
||||
#endif
|
||||
vec4 color;
|
||||
|
||||
vec4 lmtexcoord;
|
||||
vec4 normalMat;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec4 texcoordam; // .st for add, .pq for mul
|
||||
vec2 texcoord;
|
||||
#endif
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec4 tangent;
|
||||
#endif
|
||||
|
||||
flat int blockID;
|
||||
} data_out;
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
out vec4 vtangent;
|
||||
attribute vec4 at_tangent;
|
||||
#endif
|
||||
|
||||
@@ -58,7 +66,7 @@ attribute vec4 mc_midTexCoord;
|
||||
|
||||
uniform int blockEntityId;
|
||||
uniform int entityId;
|
||||
flat out float vblockID;
|
||||
|
||||
|
||||
uniform int heldItemId;
|
||||
uniform int heldItemId2;
|
||||
@@ -89,18 +97,18 @@ uniform vec3 cameraPosition;
|
||||
uniform vec2 texelSize;
|
||||
|
||||
#if defined HAND
|
||||
uniform mat4 gbufferPreviousModelView;
|
||||
uniform vec3 previousCameraPosition;
|
||||
uniform mat4 gbufferPreviousModelView;
|
||||
uniform vec3 previousCameraPosition;
|
||||
|
||||
float detectCameraMovement(){
|
||||
// simply get the difference of modelview matrices and cameraPosition across a frame.
|
||||
vec3 fakePos = vec3(0.5,0.5,0.0);
|
||||
vec3 hand_playerPos = mat3(gbufferModelViewInverse) * fakePos + (cameraPosition - previousCameraPosition);
|
||||
vec3 previousPosition = mat3(gbufferPreviousModelView) * hand_playerPos;
|
||||
float detectMovement = 1.0 - clamp(distance(previousPosition, fakePos)/texelSize.x,0.0,1.0);
|
||||
float detectCameraMovement(){
|
||||
// simply get the difference of modelview matrices and cameraPosition across a frame.
|
||||
vec3 fakePos = vec3(0.5,0.5,0.0);
|
||||
vec3 hand_playerPos = mat3(gbufferModelViewInverse) * fakePos + (cameraPosition - previousCameraPosition);
|
||||
vec3 previousPosition = mat3(gbufferPreviousModelView) * hand_playerPos;
|
||||
float detectMovement = 1.0 - clamp(distance(previousPosition, fakePos)/texelSize.x,0.0,1.0);
|
||||
|
||||
return detectMovement;
|
||||
}
|
||||
return detectMovement;
|
||||
}
|
||||
#endif
|
||||
|
||||
//#ifndef IS_LPV_ENABLED
|
||||
@@ -108,18 +116,18 @@ float detectCameraMovement(){
|
||||
//#endif
|
||||
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && (defined GRASS_DETECT_FALLOFF || defined GRASS_DETECT_INV_FALLOFF || REPLACE_SHORT_GRASS > 0)
|
||||
uniform usampler1D texBlockData;
|
||||
#include "/lib/lpv_common.glsl"
|
||||
#include "/lib/lpv_blocks.glsl"
|
||||
#include "/lib/lpv_buffer.glsl"
|
||||
#include "/lib/voxel_common.glsl"
|
||||
uniform usampler1D texBlockData;
|
||||
#include "/lib/lpv_common.glsl"
|
||||
#include "/lib/lpv_blocks.glsl"
|
||||
#include "/lib/lpv_buffer.glsl"
|
||||
#include "/lib/voxel_common.glsl"
|
||||
|
||||
uint GetVoxelBlock(const in ivec3 voxelPos) {
|
||||
if (clamp(voxelPos, ivec3(0), ivec3(VoxelSize3-1u)) != voxelPos)
|
||||
return BLOCK_EMPTY;
|
||||
|
||||
return imageLoad(imgVoxelMask, voxelPos).r;
|
||||
}
|
||||
uint GetVoxelBlock(const in ivec3 voxelPos) {
|
||||
if (clamp(voxelPos, ivec3(0), ivec3(VoxelSize3-1u)) != voxelPos)
|
||||
return BLOCK_EMPTY;
|
||||
|
||||
return imageLoad(imgVoxelMask, voxelPos).r;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -184,6 +192,11 @@ vec3 blackbody2(float Temp)
|
||||
#define SEASONS_VSH
|
||||
#include "/lib/climate_settings.glsl"
|
||||
|
||||
uniform int framemod8;
|
||||
|
||||
|
||||
#include "/lib/TAA_jitter.glsl"
|
||||
|
||||
|
||||
uniform sampler2D noisetex;//depth
|
||||
float densityAtPos(in vec3 pos){
|
||||
@@ -227,62 +240,58 @@ void main() {
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
|
||||
/////// ----- COLOR STUFF ----- ///////
|
||||
vcolor = gl_Color;
|
||||
|
||||
vVanillaAO = 1.0 - clamp(vcolor.a,0,1);
|
||||
if (vcolor.a < 0.3) vcolor.a = 1.0; // fix vanilla ao on some custom block models.
|
||||
|
||||
data_out.color = gl_Color;
|
||||
|
||||
|
||||
/////// ----- RANDOM STUFF ----- ///////
|
||||
// gl_TextureMatrix[0] for animated things like charged creepers
|
||||
vlmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
|
||||
data_out.lmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
|
||||
|
||||
#if defined POM && (defined WORLD && !defined ENTITIES && !defined HAND || defined COLORWHEEL)
|
||||
vec2 midcoord = (gl_TextureMatrix[0] * mc_midTexCoord).st;
|
||||
vec2 texcoordminusmid = vlmtexcoord.xy-midcoord;
|
||||
vtexcoordam.pq = abs(texcoordminusmid)*2.;
|
||||
vtexcoordam.st = min(vlmtexcoord.xy,midcoord-texcoordminusmid);
|
||||
vtexcoord.xy = sign(texcoordminusmid)*0.5+0.5;
|
||||
vec2 texcoordminusmid = data_out.lmtexcoord.xy-midcoord;
|
||||
data_out.texcoordam.pq = abs(texcoordminusmid)*2.;
|
||||
data_out.texcoordam.st = min(data_out.lmtexcoord.xy,midcoord-texcoordminusmid);
|
||||
data_out.texcoord.xy = sign(texcoordminusmid)*0.5+0.5;
|
||||
#endif
|
||||
|
||||
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 240.0;
|
||||
vlmtexcoord.zw = lmcoord;
|
||||
data_out.lmtexcoord.zw = lmcoord;
|
||||
|
||||
|
||||
|
||||
#ifdef MC_NORMAL_MAP
|
||||
vec3 alterTangent = at_tangent.rgb;
|
||||
|
||||
vtangent = vec4(normalize(gl_NormalMatrix * alterTangent.rgb), at_tangent.w);
|
||||
data_out.tangent = vec4(normalize(gl_NormalMatrix * alterTangent.rgb), at_tangent.w);
|
||||
#endif
|
||||
|
||||
vnormalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0);
|
||||
data_out.normalMat = vec4(normalize(gl_NormalMatrix * gl_Normal), 1.0);
|
||||
|
||||
vec3 vFlatNormals = vnormalMat.xyz;
|
||||
vec3 vFlatNormals = data_out.normalMat.xyz;
|
||||
|
||||
#ifdef ENTITIES
|
||||
vblockID = entityId;
|
||||
data_out.blockID = int(entityId);
|
||||
#elif defined BLOCKENTITIES
|
||||
vblockID = blockEntityId;
|
||||
data_out.blockID = int(blockEntityId);
|
||||
#else
|
||||
vblockID = mc_Entity.x;
|
||||
data_out.blockID = int(mc_Entity.x);
|
||||
#endif
|
||||
|
||||
if(vblockID == BLOCK_GROUND_WAVING_VERTICAL || vblockID == BLOCK_GRASS_SHORT || vblockID == BLOCK_GRASS_TALL_LOWER || vblockID == BLOCK_GRASS_TALL_UPPER ) vnormalMat.a = 0.60;
|
||||
if(vblockID == BLOCK_AIR_WAVING) vnormalMat.a = 0.55;
|
||||
if(data_out.blockID == BLOCK_GROUND_WAVING_VERTICAL || data_out.blockID == BLOCK_GRASS_SHORT || data_out.blockID == BLOCK_GRASS_TALL_LOWER || data_out.blockID == BLOCK_GRASS_TALL_UPPER ) data_out.normalMat.a = 0.60;
|
||||
if(data_out.blockID == BLOCK_AIR_WAVING) data_out.normalMat.a = 0.55;
|
||||
|
||||
#if defined WORLD && !defined HAND
|
||||
|
||||
#ifdef BLOCKENTITIES
|
||||
if(blockEntityId == BLOCK_END_PORTAL || blockEntityId == 187) {
|
||||
vlmtexcoord.w = 0.0;
|
||||
data_out.lmtexcoord.w = 0.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if PUDDLE_MODE > 0 || ShaderSnow > 0
|
||||
if(vblockID == 215) vlmtexcoord.w = 0.0;
|
||||
if(data_out.blockID == 215) data_out.lmtexcoord.w = 0.0;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -292,20 +301,20 @@ void main() {
|
||||
// if(gl_Color.a < 1.0) vNameTags = 1;
|
||||
// if(gl_Color.a >= 0.24 && gl_Color.a <= 0.25 ) gl_Position = vec4(10,10,10,1);
|
||||
#ifdef INCLUDE_UNLISTED_ENTITIES
|
||||
vnormalMat.a = 0.45;
|
||||
data_out.normalMat.a = 0.45;
|
||||
#else
|
||||
if(entityId == ENTITY_BOAT || entityId == ENTITY_SMALLSHIPS || entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SSS_WEAK || entityId == ENTITY_PLAYER || entityId == 2468) vnormalMat.a = 0.45;
|
||||
if(entityId == ENTITY_BOAT || entityId == ENTITY_SMALLSHIPS || entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SSS_WEAK || entityId == ENTITY_PLAYER || entityId == 2468) data_out.normalMat.a = 0.45;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if PUDDLE_MODE > 0 || ShaderSnow > 0
|
||||
if (vblockID == 244 || vblockID == 189) vlmtexcoord.w = 0.0;
|
||||
if (data_out.blockID == 244 || data_out.blockID == 189) data_out.lmtexcoord.w = 0.0;
|
||||
#endif
|
||||
|
||||
// special cases light lightning and beacon beams...
|
||||
#ifdef ENTITIES
|
||||
if(entityId == ENTITY_LIGHTNING){
|
||||
vnormalMat.a = 0.50;
|
||||
data_out.normalMat.a = 0.50;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -318,16 +327,16 @@ void main() {
|
||||
|
||||
#if !defined ENTITIES && !defined HAND && defined SHADER_GRASS && (defined GRASS_DETECT_FALLOFF || defined GRASS_DETECT_INV_FALLOFF || REPLACE_SHORT_GRASS > 0) && !defined BLOCKENTITIES
|
||||
|
||||
vgrassSideCheck = vec4(0.0);
|
||||
data_out.grassSideCheck = vec4(0.0);
|
||||
|
||||
if(length(worldpos) < min(GRASS_RANGE, 0.5*float(LpvSize)) && vblockID == 85 && worldNormals.y > 0.9) {
|
||||
if(length(worldpos) < min(GRASS_RANGE, 0.5*float(LpvSize)) && data_out.blockID == 85 && worldNormals.y > 0.9) {
|
||||
|
||||
float fractYPos = fract(worldpos.y+cameraPosition.y);
|
||||
if(fractYPos > 0.9999 || fractYPos < 0.0001 || abs(fractYPos - 0.5) < 0.0001) {
|
||||
|
||||
vcenterPosition = worldpos + at_midBlock.xyz / 64.0;
|
||||
data_out.centerPosition = worldpos + at_midBlock.xyz / 64.0;
|
||||
|
||||
vec3 LPVpos = GetLpvPosition(vcenterPosition);
|
||||
vec3 LPVpos = GetLpvPosition(data_out.centerPosition);
|
||||
|
||||
#if REPLACE_SHORT_GRASS > 0
|
||||
uint blockTop = GetVoxelBlock(ivec3(LPVpos.x, LPVpos.y + 0.6, LPVpos.z));
|
||||
@@ -336,7 +345,7 @@ void main() {
|
||||
#endif
|
||||
|
||||
if(blockTop == 12 || blockTop > 4000) {
|
||||
vgrassSideCheck = vec4(2.0);
|
||||
data_out.grassSideCheck = vec4(2.0);
|
||||
}
|
||||
#if REPLACE_SHORT_GRASS < 2
|
||||
else {
|
||||
@@ -345,39 +354,39 @@ void main() {
|
||||
uint blockSouth = GetVoxelBlock(ivec3(LPVpos.x, LPVpos.y + 0.6, LPVpos.z + 1.0));
|
||||
uint blockNorth = GetVoxelBlock(ivec3(LPVpos.x, LPVpos.y + 0.6, LPVpos.z - 1.0));
|
||||
|
||||
if(blockEast > 4000 || blockEast == 12 || (blockEast > 80 && blockEast < 86) || blockEast == 503 || (blockEast > 406 && blockEast < 440)) {vgrassSideCheck.x = 1.0;} else {
|
||||
if(blockEast > 4000 || blockEast == 12 || (blockEast > 80 && blockEast < 86) || blockEast == 503 || (blockEast > 406 && blockEast < 440)) {data_out.grassSideCheck.x = 1.0;} else {
|
||||
#ifdef GRASS_DETECT_FALLOFF
|
||||
blockEast = GetVoxelBlock(ivec3(LPVpos.x + 1.0, LPVpos.y, LPVpos.z));
|
||||
if(blockEast != 85) {vgrassSideCheck.x = -1.0;}
|
||||
if(blockEast != 85) {data_out.grassSideCheck.x = -1.0;}
|
||||
#endif
|
||||
}
|
||||
if(blockWest > 4000 || blockWest == 12 || (blockWest > 80 && blockWest < 86) || blockWest == 503 || (blockWest > 406 && blockWest < 440)) {vgrassSideCheck.y = 1.0;} else {
|
||||
if(blockWest > 4000 || blockWest == 12 || (blockWest > 80 && blockWest < 86) || blockWest == 503 || (blockWest > 406 && blockWest < 440)) {data_out.grassSideCheck.y = 1.0;} else {
|
||||
#ifdef GRASS_DETECT_FALLOFF
|
||||
blockWest = GetVoxelBlock(ivec3(LPVpos.x - 1.0, LPVpos.y, LPVpos.z));
|
||||
if(blockWest != 85) {vgrassSideCheck.y = -1.0;}
|
||||
if(blockWest != 85) {data_out.grassSideCheck.y = -1.0;}
|
||||
#endif
|
||||
}
|
||||
if(blockSouth > 4000 || blockSouth == 12 || (blockSouth > 80 && blockSouth < 86) || blockSouth == 503 || (blockSouth > 406 && blockSouth < 440)) {vgrassSideCheck.z = 1.0;} else {
|
||||
if(blockSouth > 4000 || blockSouth == 12 || (blockSouth > 80 && blockSouth < 86) || blockSouth == 503 || (blockSouth > 406 && blockSouth < 440)) {data_out.grassSideCheck.z = 1.0;} else {
|
||||
#ifdef GRASS_DETECT_FALLOFF
|
||||
blockSouth = GetVoxelBlock(ivec3(LPVpos.x, LPVpos.y, LPVpos.z+ 1.0));
|
||||
if(blockSouth != 85) {vgrassSideCheck.z = -1.0;}
|
||||
if(blockSouth != 85) {data_out.grassSideCheck.z = -1.0;}
|
||||
#endif
|
||||
}
|
||||
if(blockNorth > 4000 || blockNorth == 12 || (blockNorth > 80 && blockNorth < 86) || blockNorth == 503 || (blockNorth > 406 && blockNorth < 440)) {vgrassSideCheck.w = 1.0;} else {
|
||||
if(blockNorth > 4000 || blockNorth == 12 || (blockNorth > 80 && blockNorth < 86) || blockNorth == 503 || (blockNorth > 406 && blockNorth < 440)) {data_out.grassSideCheck.w = 1.0;} else {
|
||||
#ifdef GRASS_DETECT_FALLOFF
|
||||
blockNorth = GetVoxelBlock(ivec3(LPVpos.x, LPVpos.y, LPVpos.z - 1.0));
|
||||
if(blockNorth != 85) {vgrassSideCheck.w = -1.0;}
|
||||
if(blockNorth != 85) {data_out.grassSideCheck.w = -1.0;}
|
||||
#endif
|
||||
}
|
||||
#ifndef GRASS_DETECT_INV_FALLOFF
|
||||
vgrassSideCheck = clamp(vgrassSideCheck, -1.0, 0.0);
|
||||
data_out.grassSideCheck = clamp(data_out.grassSideCheck, -1.0, 0.0);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
vdiscardGrass = 0;
|
||||
data_out.discardGrass = 0;
|
||||
#if REPLACE_SHORT_GRASS > 0
|
||||
#if GRASS_DENSITY == 3
|
||||
float maxShortGrassRange = 28.0;
|
||||
@@ -389,11 +398,11 @@ void main() {
|
||||
float maxShortGrassRange = 16.0;
|
||||
#endif
|
||||
|
||||
if(length(worldpos) < maxShortGrassRange && vblockID == 12) {
|
||||
vcenterPosition = worldpos + at_midBlock.xyz / 64.0;
|
||||
vec3 LPVpos = GetLpvPosition(vcenterPosition);
|
||||
if(length(worldpos) < maxShortGrassRange && data_out.blockID == 12) {
|
||||
data_out.centerPosition = worldpos + at_midBlock.xyz / 64.0;
|
||||
vec3 LPVpos = GetLpvPosition(data_out.centerPosition);
|
||||
uint blockBelow = GetVoxelBlock(ivec3(LPVpos.x, LPVpos.y - 0.6, LPVpos.z));
|
||||
if(blockBelow == 85) vdiscardGrass = 1;
|
||||
if(blockBelow == 85) data_out.discardGrass = 1;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
@@ -422,25 +431,74 @@ void main() {
|
||||
// vec2 dir2 = normalize(UnalteredWorldpos.xz+relativeEyePosition.xz);
|
||||
|
||||
// apply displacement for waving plant blocks
|
||||
worldpos += calcMovePlants(worldpos + cameraPosition) * max(vlmtexcoord.w,0.5);
|
||||
worldpos += calcMovePlants(worldpos + cameraPosition) * max(data_out.lmtexcoord.w,0.5);
|
||||
// worldpos.xz += playerDist*dir2;
|
||||
|
||||
|
||||
// apply displacement for waving leaf blocks specifically, overwriting the other waving mode. these wave off of the air. they wave uniformly
|
||||
if(mc_Entity.x == BLOCK_AIR_WAVING) worldpos = UnalteredWorldpos + calcMoveLeaves(worldpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*vlmtexcoord.w;
|
||||
if(mc_Entity.x == BLOCK_AIR_WAVING) worldpos = UnalteredWorldpos + calcMoveLeaves(worldpos + cameraPosition, 0.0040, 0.0064, 0.0043, 0.0035, 0.0037, 0.0041, vec3(1.0,0.2,1.0), vec3(0.5,0.1,0.5))*data_out.lmtexcoord.w;
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
// position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
|
||||
// ensure hand/entities have the same transformations as the spidereyes and enchant glint programs.
|
||||
#if !defined ENTITIES && !defined HAND
|
||||
gl_Position = vec4(worldpos, 0.0);
|
||||
|
||||
#ifdef SHADER_GRASS
|
||||
#if !defined ENTITIES && !defined HAND
|
||||
gl_Position = vec4(worldpos, 0.0);
|
||||
#endif
|
||||
|
||||
#ifdef BLOCKENTITIES
|
||||
gl_Position = toClipSpace3(mat3(gbufferModelView) * vec3(worldpos) + gbufferModelView[3].xyz);
|
||||
#endif
|
||||
#else
|
||||
#if defined PLANET_CURVATURE && !defined HAND
|
||||
float curvature = length(worldpos.xyz) / (16.0*8.0);
|
||||
worldpos.y -= curvature*curvature * CURVATURE_AMOUNT;
|
||||
#endif
|
||||
|
||||
// ensure hand/entities have the same transformations as the spidereyes and enchant glint programs.
|
||||
#if !defined ENTITIES && !defined HAND
|
||||
gl_Position = toClipSpace3(mat3(gbufferModelView) * vec3(worldpos) + gbufferModelView[3].xyz);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined SHADER_GRASS || defined ENTITIES || defined HAND || defined BLOCKENTITIES
|
||||
#ifdef TAA_UPSCALING
|
||||
gl_Position.xy = gl_Position.xy * RENDER_SCALE + RENDER_SCALE * gl_Position.w - gl_Position.w;
|
||||
#endif
|
||||
#ifdef TAA
|
||||
vec2 TAA_offsets = offsets[framemod8];
|
||||
// #ifdef HAND
|
||||
// turn off jitter when camera moves.
|
||||
// this is to hide the jitter when the same happens for TAA blend factor and the jitter becomes visible during camera movement
|
||||
// gl_Position.xy += (offsets[framemod8] * gl_Position.w*texelSize) * detectCameraMovement();
|
||||
// #else
|
||||
gl_Position.xy += TAA_offsets * gl_Position.w*texelSize;
|
||||
// #endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined Seasons && defined WORLD && !defined ENTITIES && !defined BLOCKENTITIES && !defined HAND
|
||||
YearCycleColor(vcolor.rgb, gl_Color.rgb, mc_Entity.x == BLOCK_AIR_WAVING, true);
|
||||
YearCycleColor(data_out.color.rgb, gl_Color.rgb, mc_Entity.x == BLOCK_AIR_WAVING, true);
|
||||
#endif
|
||||
|
||||
#if DOF_QUALITY == 5 && !defined SHADER_GRASS && (defined ENTITIES || defined HAND)
|
||||
vec2 jitter = clamp(jitter_offsets[frameCounter % 64], -1.0, 1.0);
|
||||
jitter = rotate(radians(float(frameCounter))) * jitter;
|
||||
jitter.y *= aspectRatio;
|
||||
jitter.x *= DOF_ANAMORPHIC_RATIO;
|
||||
|
||||
#if MANUAL_FOCUS == -2
|
||||
float focusMul = 0;
|
||||
#elif MANUAL_FOCUS == -1
|
||||
float focusMul = gl_Position.z - mix(pow(512.0, screenBrightness), 512.0 * screenBrightness, 0.25);
|
||||
#else
|
||||
float focusMul = gl_Position.z - MANUAL_FOCUS;
|
||||
#endif
|
||||
|
||||
vec2 totalOffset = (jitter * JITTER_STRENGTH) * focusMul * 1e-2;
|
||||
gl_Position.xy += hideGUI >= 1 ? totalOffset : vec2(0);
|
||||
#endif
|
||||
}
|
||||
@@ -1180,6 +1180,7 @@ void main() {
|
||||
if ((isEyeInWater == 0 && isWater) || (eyeInWater && !isWater)){
|
||||
|
||||
feetPlayerPos += gbufferModelViewInverse[3].xyz;
|
||||
worldPos = feetPlayerPos + cameraPosition;
|
||||
|
||||
#if defined DISTANT_HORIZONS || defined VOXY
|
||||
vec3 playerPos0 = mat3(gbufferModelViewInverse) * toScreenSpace_DH(texcoord/RENDER_SCALE-TAA_Offset*texelSize*0.5, z0, DH_depth0) + gbufferModelViewInverse[3].xyz;
|
||||
@@ -1245,7 +1246,10 @@ void main() {
|
||||
if (swappedDepth < 1.0) {
|
||||
|
||||
// idk why this do
|
||||
|
||||
// this seems to be compensating view bobbing, but why not do this when calculating feetPlayerPos? hmmm
|
||||
feetPlayerPos += gbufferModelViewInverse[3].xyz;
|
||||
worldPos = feetPlayerPos + cameraPosition;
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////// FILTER STUFF //////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
|
||||
prefix.SHADER_VERSION_LABEL = V
|
||||
value.SHADER_VERSION_LABEL.482 = 5.3.0
|
||||
value.SHADER_VERSION_LABEL.482 = 5.3.1
|
||||
|
||||
# if you're here to translate, this is not a joke, these do what they say
|
||||
profile.POTATO=§4Potato
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版
|
||||
prefix.SHADER_VERSION_LABEL = 版本
|
||||
value.SHADER_VERSION_LABEL.482 = 5.3.0
|
||||
value.SHADER_VERSION_LABEL.482 = 5.3.1
|
||||
|
||||
# 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名
|
||||
profile.POTATO=§4土豆 (极低配置)
|
||||
|
||||
@@ -992,9 +992,6 @@ const vec3 aerochrome_color = mix(vec3(1.0, 0.0, 0.0), vec3(0.715, 0.303, 0.631)
|
||||
|
||||
#define GRASS_RANDOMNESS 0.5 // [0.0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0]
|
||||
|
||||
#define GRASS_NOISE1_SCALE 0.75 // [0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 1.2 1.25]
|
||||
#define GRASS_NOISE2_SCALE 0.35 // [0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 1.0 1.05 1.1 1.15 1.2 1.25]
|
||||
|
||||
#define RAINBOW_SELECT_BOX 0 // [0 1 2]
|
||||
|
||||
///////////////////////////////////////////
|
||||
|
||||
@@ -202,7 +202,7 @@ alphaTest.gbuffers_beaconbeam = false
|
||||
alphaTest.gbuffers_armor_glint = false
|
||||
alphaTest.gbuffers_damagedblock = false
|
||||
|
||||
sliders = SCREENSPACE_CONTACT_SHADOWS PIXELIZATION_STRENGTH MAX_COLORS_PER_CHANNEL RAINBOW_SELECT_BOX CLOUD_SAMPLES GRASS_NOISE1_SCALE GRASS_NOISE2_SCALE AmbientLightThunder_R AmbientLightThunder_G AmbientLightThunder_B GRASS_RANDOMNESS GRASS_WAVY_STRENGTH GRASS_RANGE GRASS_QUALITY GRASS_DENSITY REPLACE_SHORT_GRASS GRASS_THICKNESS_FALLOFF SHORT_GRASS_HEIGHT BASE_GRASS_HEIGHT GRASS_BASE_THICKNESS FILM_GRAIN_STRENGTH PUDDLE_MODE FLASHLIGHT_SHADOWS_STRENGTH LPV_HANDHELD_SHADOWS_STRENGTH AURORA_R AURORA_G AURORA_B AURORA_LOCATION AURORA_MOON AURORA_BRIGHTNESS AURORA_CHANCE WATER_SIM_STRENGTH WATER_SIM_FRAMERATE WATER_SIM_SCALE WATER_SIM_DISTANCE dayStartTick nightStartTick daySpeed nightSpeed FAKE_REFRACTION_AMOUNT FAKE_DISPERSION_AMOUNT REFRACTION_SMUDGE_AMOUNT NORMAL_MAP_MULT DEFERRED_SSR_QUALITY FORWARD_SSR_QUALITY RAINBOW_TIME RAINBOW RAINBOW_DISTANCE RAINBOW_BRIGHTNESS VORTEX_LIGHT_COL_R VORTEX_LIGHT_COL_G VORTEX_LIGHT_COL_B END_LIGHTNING_COL_R END_LIGHTNING_COL_G END_LIGHTNING_COL_B END_HAZE_DENSTIY NETHER_CEILING_SMOKE_DENSITY NETHER_HAZE_DENSITY Max_Filter_Depth_END Min_Shadow_Filter_Radius_END MOON_TIME_OFFSET EARTH_ROTATION_TILT CUSTOM_SHADOWS_QUALITY MOON_LATITUDE MOON_SIZE_SETTING MONTH_LENGTH LIGHTNING_SHADOWS WHITE_BALANCE STARS_BRIGHTNESS STARS_AMOUNT AmbientLightEnd_R AmbientLightEnd_G AmbientLightEnd_B CloudLayer0_distance CloudLayer1_distance CloudLayer2_distance CloudLayer3_distance BLEND_FACTOR_DURING_MOVEMENT CloudLayer0_detail CloudLayer1_detail MIN_LIGHT_AMOUNT_INSIDE CUMULONIMBUS_FADE_TIME CUMULONIMBUS NOISE_RESOLUTION NOISE_INTENSITY NOISE_DROPOFF WAVE_DETAIL DH_CHUNK_FADING CLOUD_MOVEMENT_TYPE LIGHTLEAKFIX_MODE EMISSIVE_ORES_STRENGTH RIPPLE_STRENGTH RIPPLE_INTENSITY CUSTOM_LIGHTNING_SCALE CUSTOM_LIGHTNING_R CUSTOM_LIGHTNING_G CUSTOM_LIGHTNING_B CUSTOM_LIGHTNING_TEX CUSTOM_LIGHTNING_POS_X CUSTOM_LIGHTNING_POS_Y CUSTOM_LIGHTNING_POS_Z CUMULONIMBUS_LIGHTNING_BRIGHTNESS CUMULONIMBUS_LIGHTNING_DELAY ShaderSnow ShaderSnowStrength BorderFogIntensity CAVE_DETECTION ON_FIRE_DISTORT_EFFECT_STRENGTH USE_CUSTOM_SKY_GROUND_LIGHTING_COLORS DIRECTLIGHT_DIFFUSE_R DIRECTLIGHT_DIFFUSE_G DIRECTLIGHT_DIFFUSE_B INDIRECTLIGHT_DIFFUSE_R INDIRECTLIGHT_DIFFUSE_G INDIRECTLIGHT_DIFFUSE_B DIRECTLIGHT_CLOUDS_R DIRECTLIGHT_CLOUDS_G DIRECTLIGHT_CLOUDS_B INDIRECTLIGHT_CLOUDS_R INDIRECTLIGHT_CLOUDS_G INDIRECTLIGHT_CLOUDS_B DIRECTLIGHT_FOG_R DIRECTLIGHT_FOG_G DIRECTLIGHT_FOG_B INDIRECTLIGHT_FOG_R INDIRECTLIGHT_FOG_G INDIRECTLIGHT_FOG_B SKY_GROUND_R SKY_GROUND_G SKY_GROUND_B DOF_DISPERSION_MULT FLASHLIGHT_BRIGHTNESS_MULT FLASHLIGHT_BRIGHTNESS_FALLOFF_MULT FLASHLIGHT_RANGE FLASHLIGHT_SIZE FLASHLIGHT_R FLASHLIGHT_G FLASHLIGHT_B LOW_HEALTH_EFFECT_START CRITICALLY_LOW_HEALTH_EFFECT_START CloudLayer2_scale CloudLayer0_scale CloudLayer1_scale CloudLayer3_scale CloudLayer0_tallness CloudLayer1_tallness EXPOSURE_DARKENING EXPOSURE_BRIGHTENING VIGNETTE_STRENGTH CURVATURE_AMOUNT MINIMUM_WATER_ABSORBANCE CHROMATIC_ABERRATION_STRENGTH SELECT_BOX_COL_R SELECT_BOX_COL_G SELECT_BOX_COL_B LPV_VL_FOG_ILLUMINATION_BRIGHTNESS minRayMarchSteps MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l3_coverage DAY0_l3_density DAY1_l3_coverage DAY1_l3_density DAY2_l3_coverage DAY2_l3_density DAY3_l3_coverage DAY3_l3_density DAY4_l3_coverage DAY4_l3_density DAY5_l3_coverage DAY5_l3_density DAY6_l3_coverage DAY6_l3_density DAY7_l3_coverage DAY7_l3_density DAY8_l3_coverage DAY8_l3_density DAY9_l3_coverage DAY9_l3_density DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS WATER_CAUSTICS_POWER DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_AMOUNLine truncated
|
||||
sliders = SCREENSPACE_CONTACT_SHADOWS PIXELIZATION_STRENGTH MAX_COLORS_PER_CHANNEL RAINBOW_SELECT_BOX CLOUD_SAMPLES AmbientLightThunder_R AmbientLightThunder_G AmbientLightThunder_B GRASS_RANDOMNESS GRASS_WAVY_STRENGTH GRASS_RANGE GRASS_QUALITY GRASS_DENSITY REPLACE_SHORT_GRASS GRASS_THICKNESS_FALLOFF SHORT_GRASS_HEIGHT BASE_GRASS_HEIGHT GRASS_BASE_THICKNESS FILM_GRAIN_STRENGTH PUDDLE_MODE FLASHLIGHT_SHADOWS_STRENGTH LPV_HANDHELD_SHADOWS_STRENGTH AURORA_R AURORA_G AURORA_B AURORA_LOCATION AURORA_MOON AURORA_BRIGHTNESS AURORA_CHANCE WATER_SIM_STRENGTH WATER_SIM_FRAMERATE WATER_SIM_SCALE WATER_SIM_DISTANCE dayStartTick nightStartTick daySpeed nightSpeed FAKE_REFRACTION_AMOUNT FAKE_DISPERSION_AMOUNT REFRACTION_SMUDGE_AMOUNT NORMAL_MAP_MULT DEFERRED_SSR_QUALITY FORWARD_SSR_QUALITY RAINBOW_TIME RAINBOW RAINBOW_DISTANCE RAINBOW_BRIGHTNESS VORTEX_LIGHT_COL_R VORTEX_LIGHT_COL_G VORTEX_LIGHT_COL_B END_LIGHTNING_COL_R END_LIGHTNING_COL_G END_LIGHTNING_COL_B END_HAZE_DENSTIY NETHER_CEILING_SMOKE_DENSITY NETHER_HAZE_DENSITY Max_Filter_Depth_END Min_Shadow_Filter_Radius_END MOON_TIME_OFFSET EARTH_ROTATION_TILT CUSTOM_SHADOWS_QUALITY MOON_LATITUDE MOON_SIZE_SETTING MONTH_LENGTH LIGHTNING_SHADOWS WHITE_BALANCE STARS_BRIGHTNESS STARS_AMOUNT AmbientLightEnd_R AmbientLightEnd_G AmbientLightEnd_B CloudLayer0_distance CloudLayer1_distance CloudLayer2_distance CloudLayer3_distance BLEND_FACTOR_DURING_MOVEMENT CloudLayer0_detail CloudLayer1_detail MIN_LIGHT_AMOUNT_INSIDE CUMULONIMBUS_FADE_TIME CUMULONIMBUS NOISE_RESOLUTION NOISE_INTENSITY NOISE_DROPOFF WAVE_DETAIL DH_CHUNK_FADING CLOUD_MOVEMENT_TYPE LIGHTLEAKFIX_MODE EMISSIVE_ORES_STRENGTH RIPPLE_STRENGTH RIPPLE_INTENSITY CUSTOM_LIGHTNING_SCALE CUSTOM_LIGHTNING_R CUSTOM_LIGHTNING_G CUSTOM_LIGHTNING_B CUSTOM_LIGHTNING_TEX CUSTOM_LIGHTNING_POS_X CUSTOM_LIGHTNING_POS_Y CUSTOM_LIGHTNING_POS_Z CUMULONIMBUS_LIGHTNING_BRIGHTNESS CUMULONIMBUS_LIGHTNING_DELAY ShaderSnow ShaderSnowStrength BorderFogIntensity CAVE_DETECTION ON_FIRE_DISTORT_EFFECT_STRENGTH USE_CUSTOM_SKY_GROUND_LIGHTING_COLORS DIRECTLIGHT_DIFFUSE_R DIRECTLIGHT_DIFFUSE_G DIRECTLIGHT_DIFFUSE_B INDIRECTLIGHT_DIFFUSE_R INDIRECTLIGHT_DIFFUSE_G INDIRECTLIGHT_DIFFUSE_B DIRECTLIGHT_CLOUDS_R DIRECTLIGHT_CLOUDS_G DIRECTLIGHT_CLOUDS_B INDIRECTLIGHT_CLOUDS_R INDIRECTLIGHT_CLOUDS_G INDIRECTLIGHT_CLOUDS_B DIRECTLIGHT_FOG_R DIRECTLIGHT_FOG_G DIRECTLIGHT_FOG_B INDIRECTLIGHT_FOG_R INDIRECTLIGHT_FOG_G INDIRECTLIGHT_FOG_B SKY_GROUND_R SKY_GROUND_G SKY_GROUND_B DOF_DISPERSION_MULT FLASHLIGHT_BRIGHTNESS_MULT FLASHLIGHT_BRIGHTNESS_FALLOFF_MULT FLASHLIGHT_RANGE FLASHLIGHT_SIZE FLASHLIGHT_R FLASHLIGHT_G FLASHLIGHT_B LOW_HEALTH_EFFECT_START CRITICALLY_LOW_HEALTH_EFFECT_START CloudLayer2_scale CloudLayer0_scale CloudLayer1_scale CloudLayer3_scale CloudLayer0_tallness CloudLayer1_tallness EXPOSURE_DARKENING EXPOSURE_BRIGHTENING VIGNETTE_STRENGTH CURVATURE_AMOUNT MINIMUM_WATER_ABSORBANCE CHROMATIC_ABERRATION_STRENGTH SELECT_BOX_COL_R SELECT_BOX_COL_G SELECT_BOX_COL_B LPV_VL_FOG_ILLUMINATION_BRIGHTNESS minRayMarchSteps MOTION_BLUR_STRENGTH OVERDRAW_MAX_DISTANCE DAY0_l3_coverage DAY0_l3_density DAY1_l3_coverage DAY1_l3_density DAY2_l3_coverage DAY2_l3_density DAY3_l3_coverage DAY3_l3_density DAY4_l3_coverage DAY4_l3_density DAY5_l3_coverage DAY5_l3_density DAY6_l3_coverage DAY6_l3_density DAY7_l3_coverage DAY7_l3_density DAY8_l3_coverage DAY8_l3_density DAY9_l3_coverage DAY9_l3_density DAY0_l0_coverage DAY0_l1_coverage DAY0_l2_coverage DAY0_ufog_density DAY0_l0_density DAY0_l1_density DAY0_l2_density DAY0_cfog_density DAY1_l0_coverage DAY1_l1_coverage DAY1_l2_coverage DAY1_ufog_density DAY1_l0_density DAY1_l1_density DAY1_l2_density DAY1_cfog_density DAY2_l0_coverage DAY2_l1_coverage DAY2_l2_coverage DAY2_ufog_density DAY2_l0_density DAY2_l1_density DAY2_l2_density DAY2_cfog_density DAY3_l0_coverage DAY3_l1_coverage DAY3_l2_coverage DAY3_ufog_density DAY3_l0_density DAY3_l1_density DAY3_l2_density DAY3_cfog_density DAY4_l0_coverage DAY4_l1_coverage DAY4_l2_coverage DAY4_ufog_density DAY4_l0_density DAY4_l1_density DAY4_l2_density DAY4_cfog_density DAY5_l0_coverage DAY5_l1_coverage DAY5_l2_coverage DAY5_ufog_density DAY5_l0_density DAY5_l1_density DAY5_l2_density DAY5_cfog_density DAY6_l0_coverage DAY6_l1_coverage DAY6_l2_coverage DAY6_ufog_density DAY6_l0_density DAY6_l1_density DAY6_l2_density DAY6_cfog_density DAY7_l0_coverage DAY7_l1_coverage DAY7_l2_coverage DAY7_ufog_density DAY7_l0_density DAY7_l1_density DAY7_l2_density DAY7_cfog_density DAY8_l0_coverage DAY8_l1_coverage DAY8_l2_coverage DAY8_ufog_density DAY8_l0_density DAY8_l1_density DAY8_l2_density DAY8_cfog_density DAY9_l0_coverage DAY9_l1_coverage DAY9_l2_coverage DAY9_ufog_density DAY9_l0_density DAY9_l1_density DAY9_l2_density DAY9_cfog_density sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS WATER_CAUSTICS_POWER DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_AMOUNT CloudLayer0_coverage CloudLayer0_denLine truncated
|
||||
|
||||
screen.columns=2
|
||||
screen = \
|
||||
@@ -324,7 +324,6 @@ SHADER_VERSION_LABEL <profile> \
|
||||
GRASS_BASE_THICKNESS GRASS_THICKNESS_FALLOFF \
|
||||
BASE_GRASS_HEIGHT SHORT_GRASS_HEIGHT \
|
||||
GRASS_RANDOMNESS <empty> \
|
||||
GRASS_NOISE1_SCALE GRASS_NOISE2_SCALE \
|
||||
<empty> <empty> \
|
||||
GRASS_DETECT_FALLOFF GRASS_DETECT_INV_FALLOFF
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define NETHER_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#define COLORWHEEL
|
||||
#define ENTITIES
|
||||
#define BLOCKENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define BLOCKENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define ENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define HAND
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#define COLORWHEEL
|
||||
#define ENTITIES
|
||||
#define BLOCKENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define BLOCKENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define ENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define HAND
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,11 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define END_SHADER
|
||||
|
||||
#define WORLD
|
||||
|
||||
#define COLORWHEEL
|
||||
#define ENTITIES
|
||||
#define BLOCKENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define BLOCKENTITIES
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
@@ -1,8 +0,0 @@
|
||||
#version 430 compatibility
|
||||
|
||||
#define OVERWORLD_SHADER
|
||||
|
||||
#define WORLD
|
||||
#define HAND
|
||||
|
||||
#include "/dimensions/all_solid.gsh"
|
||||
Reference in new issue
Block a user