mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2024-12-22 17:47:34 +08:00
Merge branch 'main' of https://github.com/X0nk/Bliss-Shader
This commit is contained in:
commit
156a8350c4
@ -8,7 +8,6 @@
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
flat varying float exposure;
|
||||
|
||||
#ifdef LINES
|
||||
flat varying int SELECTION_BOX;
|
||||
@ -35,6 +34,7 @@ uniform int isEyeInWater;
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D noisetex;
|
||||
uniform sampler2D colortex4;
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
uniform sampler3D texLpv1;
|
||||
uniform sampler3D texLpv2;
|
||||
@ -118,135 +118,6 @@ float encodeVec2(float x,float y){
|
||||
}
|
||||
|
||||
|
||||
|
||||
// #undef BASIC_SHADOW_FILTER
|
||||
#ifdef OVERWORLD_SHADER
|
||||
float ComputeShadowMap(inout vec3 directLightColor, vec3 playerPos, float maxDistFade){
|
||||
|
||||
if(maxDistFade <= 0.0) return 1.0;
|
||||
|
||||
// setup shadow projection
|
||||
vec3 projectedShadowPosition = mat3(shadowModelView) * playerPos + shadowModelView[3].xyz;
|
||||
projectedShadowPosition = diagonal3(shadowProjection) * projectedShadowPosition + shadowProjection[3].xyz;
|
||||
|
||||
// un-distort
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
float distortFactor = calcDistort(projectedShadowPosition.xy);
|
||||
projectedShadowPosition.xy *= distortFactor;
|
||||
#else
|
||||
float distortFactor = 1.0;
|
||||
#endif
|
||||
|
||||
// hamburger
|
||||
projectedShadowPosition = projectedShadowPosition * vec3(0.5,0.5,0.5/6.0) + vec3(0.5);
|
||||
|
||||
float shadowmap = 0.0;
|
||||
vec3 translucentTint = vec3(0.0);
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
|
||||
// determine when opaque shadows are overlapping translucent shadows by getting the difference of opaque depth and translucent depth
|
||||
float shadowDepthDiff = pow(clamp((shadow2D(shadowtex1, projectedShadowPosition).x - projectedShadowPosition.z) * 2.0,0.0,1.0),2.0);
|
||||
|
||||
// get opaque shadow data to get opaque data from translucent shadows.
|
||||
float opaqueShadow = shadow2D(shadowtex0, projectedShadowPosition).x;
|
||||
shadowmap += max(opaqueShadow, shadowDepthDiff);
|
||||
|
||||
// get translucent shadow data
|
||||
vec4 translucentShadow = texture2D(shadowcolor0, projectedShadowPosition.xy);
|
||||
|
||||
// this curve simply looked the nicest. it has no other meaning.
|
||||
float shadowAlpha = pow(1.0 - pow(translucentShadow.a,5.0),0.2);
|
||||
|
||||
// normalize the color to remove luminance, and keep the hue. remove all opaque color.
|
||||
// mulitply shadow alpha to shadow color, but only on surfaces facing the lightsource. this is a tradeoff to protect subsurface scattering's colored shadow tint from shadow bias on the back of the caster.
|
||||
translucentShadow.rgb = max(normalize(translucentShadow.rgb + 0.0001), max(opaqueShadow, 1.0-shadowAlpha)) * shadowAlpha;
|
||||
|
||||
// make it such that full alpha areas that arent in a shadow have a value of 1.0 instead of 0.0
|
||||
translucentTint += mix(translucentShadow.rgb, vec3(1.0), opaqueShadow*shadowDepthDiff);
|
||||
|
||||
#else
|
||||
shadowmap += shadow2D(shadow, projectedShadowPosition).x;
|
||||
#endif
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
// tint the lightsource color with the translucent shadow color
|
||||
directLightColor *= mix(vec3(1.0), translucentTint.rgb, maxDistFade);
|
||||
#endif
|
||||
|
||||
return mix(1.0, shadowmap, maxDistFade);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined DAMAGE_BLOCK_EFFECT && defined POM
|
||||
#extension GL_ARB_shader_texture_lod : enable
|
||||
|
||||
mat3 inverseMatrix(mat3 m) {
|
||||
float a00 = m[0][0], a01 = m[0][1], a02 = m[0][2];
|
||||
float a10 = m[1][0], a11 = m[1][1], a12 = m[1][2];
|
||||
float a20 = m[2][0], a21 = m[2][1], a22 = m[2][2];
|
||||
|
||||
float b01 = a22 * a11 - a12 * a21;
|
||||
float b11 = -a22 * a10 + a12 * a20;
|
||||
float b21 = a21 * a10 - a11 * a20;
|
||||
|
||||
float det = a00 * b01 + a01 * b11 + a02 * b21;
|
||||
|
||||
return mat3(b01, (-a22 * a01 + a02 * a21), (a12 * a01 - a02 * a11),
|
||||
b11, (a22 * a00 - a02 * a20), (-a12 * a00 + a02 * a10),
|
||||
b21, (-a21 * a00 + a01 * a20), (a11 * a00 - a01 * a10)) / det;
|
||||
}
|
||||
const float MAX_OCCLUSION_DISTANCE = MAX_DIST;
|
||||
const float MIX_OCCLUSION_DISTANCE = MAX_DIST*0.9;
|
||||
const int MAX_OCCLUSION_POINTS = MAX_ITERATIONS;
|
||||
|
||||
varying vec4 vtexcoordam; // .st for add, .pq for mul
|
||||
varying vec4 vtexcoord;
|
||||
|
||||
vec2 dcdx = dFdx(vtexcoord.st*vtexcoordam.pq)*exp2(Texture_MipMap_Bias);
|
||||
vec2 dcdy = dFdy(vtexcoord.st*vtexcoordam.pq)*exp2(Texture_MipMap_Bias);
|
||||
|
||||
|
||||
#define diagonal3(m) vec3((m)[0].x, (m)[1].y, m[2].z)
|
||||
#define projMAD(m, v) (diagonal3(m) * (v) + (m)[3].xyz)
|
||||
|
||||
uniform mat4 gbufferProjection;
|
||||
|
||||
vec3 toClipSpace3(vec3 viewSpacePosition) {
|
||||
return projMAD(gbufferProjection, viewSpacePosition) / -viewSpacePosition.z * 0.5 + 0.5;
|
||||
}
|
||||
|
||||
flat varying vec3 WsunVec2;
|
||||
const float mincoord = 1.0/4096.0;
|
||||
const float maxcoord = 1.0-mincoord;
|
||||
|
||||
uniform sampler2D normals;
|
||||
varying vec4 tangent;
|
||||
varying vec4 normalMat;
|
||||
|
||||
vec4 readNormal(in vec2 coord)
|
||||
{
|
||||
return texture2DGradARB(normals,fract(coord)*vtexcoordam.pq+vtexcoordam.st,dcdx,dcdy);
|
||||
}
|
||||
vec4 readTexture(in vec2 coord)
|
||||
{
|
||||
return texture2DGradARB(texture,fract(coord)*vtexcoordam.pq+vtexcoordam.st,dcdx,dcdy);
|
||||
}
|
||||
#endif
|
||||
uniform float near;
|
||||
// uniform float far;
|
||||
float ld(float dist) {
|
||||
return (2.0 * near) / (far + near - dist * (far - near));
|
||||
}
|
||||
|
||||
vec3 texture2D_POMSwitch(
|
||||
sampler2D sampler,
|
||||
vec2 lightmapCoord,
|
||||
vec4 dcdxdcdy
|
||||
){
|
||||
return texture2DGradARB(sampler, lightmapCoord, dcdxdcdy.xy, dcdxdcdy.zw).rgb;
|
||||
}
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -261,73 +132,6 @@ vec3 texture2D_POMSwitch(
|
||||
|
||||
void main() {
|
||||
|
||||
#ifdef DAMAGE_BLOCK_EFFECT
|
||||
vec2 adjustedTexCoord = lmtexcoord.xy;
|
||||
#ifdef POM
|
||||
vec3 fragpos = toScreenSpace(gl_FragCoord.xyz*vec3(texelSize/RENDER_SCALE,1.0)-vec3(0.0));
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * fragpos + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
|
||||
vec3 normal = normalMat.xyz;
|
||||
vec3 tangent2 = normalize(cross(tangent.rgb,normal)*tangent.w);
|
||||
mat3 tbnMatrix = mat3(tangent.x, tangent2.x, normal.x,
|
||||
tangent.y, tangent2.y, normal.y,
|
||||
tangent.z, tangent2.z, normal.z);
|
||||
|
||||
adjustedTexCoord = fract(vtexcoord.st)*vtexcoordam.pq+vtexcoordam.st;
|
||||
vec3 viewVector = normalize(tbnMatrix*fragpos);
|
||||
|
||||
float dist = length(fragpos);
|
||||
|
||||
float maxdist = MAX_OCCLUSION_DISTANCE;
|
||||
|
||||
// float depth = gl_FragCoord.z;
|
||||
if (dist < maxdist) {
|
||||
|
||||
float depthmap = readNormal(vtexcoord.st).a;
|
||||
float used_POM_DEPTH = 1.0;
|
||||
|
||||
if ( viewVector.z < 0.0 && depthmap < 0.9999 && depthmap > 0.00001) {
|
||||
|
||||
#ifdef Adaptive_Step_length
|
||||
vec3 interval = (viewVector.xyz /-viewVector.z/MAX_OCCLUSION_POINTS * POM_DEPTH) * clamp(1.0-pow(depthmap,2),0.1,1.0);
|
||||
used_POM_DEPTH = 1.0;
|
||||
#else
|
||||
vec3 interval = viewVector.xyz/-viewVector.z/ MAX_OCCLUSION_POINTS*POM_DEPTH;
|
||||
#endif
|
||||
vec3 coord = vec3(vtexcoord.st, 1.0);
|
||||
|
||||
coord += interval * used_POM_DEPTH;
|
||||
|
||||
float sumVec = 0.5;
|
||||
for (int loopCount = 0; (loopCount < MAX_OCCLUSION_POINTS) && (1.0 - POM_DEPTH + POM_DEPTH * readNormal(coord.st).a ) < coord.p && coord.p >= 0.0; ++loopCount) {
|
||||
coord = coord + interval * used_POM_DEPTH;
|
||||
sumVec += used_POM_DEPTH;
|
||||
}
|
||||
|
||||
if (coord.t < mincoord) {
|
||||
if (readTexture(vec2(coord.s,mincoord)).a == 0.0) {
|
||||
coord.t = mincoord;
|
||||
discard;
|
||||
}
|
||||
}
|
||||
|
||||
adjustedTexCoord = mix(fract(coord.st)*vtexcoordam.pq+vtexcoordam.st, adjustedTexCoord, max(dist-MIX_OCCLUSION_DISTANCE,0.0)/(MAX_OCCLUSION_DISTANCE-MIX_OCCLUSION_DISTANCE));
|
||||
|
||||
// vec3 truePos = fragpos + sumVec*inverseMatrix(tbnMatrix)*interval;
|
||||
|
||||
// depth = toClipSpace3(truePos).z;
|
||||
}
|
||||
}
|
||||
|
||||
vec3 Albedo = toLinear(texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy)));
|
||||
#else
|
||||
vec3 Albedo = toLinear(texture2D(texture, adjustedTexCoord.xy).rgb);
|
||||
#endif
|
||||
|
||||
gl_FragData[0] = vec4(encodeVec2(vec2(0.5)), encodeVec2(Albedo.rg), encodeVec2(vec2(Albedo.b,0.02)), 1.0);
|
||||
#endif
|
||||
|
||||
#if !defined DAMAGE_BLOCK_EFFECT
|
||||
#ifdef LINES
|
||||
#ifndef SELECT_BOX
|
||||
if(SELECTION_BOX > 0) discard;
|
||||
@ -341,9 +145,8 @@ void main() {
|
||||
|
||||
vec4 TEXTURE = texture2D(texture, lmtexcoord.xy)*color;
|
||||
|
||||
#ifdef WhiteWorld
|
||||
TEXTURE.rgb = vec3(0.5);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
vec3 Albedo = toLinear(TEXTURE.rgb);
|
||||
|
||||
@ -357,77 +160,104 @@ void main() {
|
||||
lightmap.x = max(lightmap.x, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(viewPos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef WEATHER
|
||||
gl_FragData[1].a = TEXTURE.a; // for bloomy rain and stuff
|
||||
#endif
|
||||
|
||||
#ifndef WEATHER
|
||||
#ifndef LINES
|
||||
gl_FragData[0].a = TEXTURE.a;
|
||||
|
||||
#ifndef WEATHER
|
||||
#ifndef LINES
|
||||
gl_FragData[0].a = TEXTURE.a;
|
||||
#else
|
||||
gl_FragData[0].a = 1.0;
|
||||
#endif
|
||||
#ifndef BLOOMY_PARTICLES
|
||||
gl_FragData[1].a = 0.0; // for bloomy rain and stuff
|
||||
#endif
|
||||
|
||||
vec3 Direct_lighting = vec3(0.0);
|
||||
vec3 Indirect_lighting = vec3(0.0);
|
||||
|
||||
vec3 MinimumLightColor = vec3(1.0);
|
||||
if(isEyeInWater == 1) MinimumLightColor = vec3(10.0);
|
||||
|
||||
vec3 Torch_Color = vec3(TORCH_R,TORCH_G,TORCH_B);
|
||||
|
||||
|
||||
if(lightmap.x >= 0.9) Torch_Color *= LIT_PARTICLE_BRIGHTNESS;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
vec3 Shadows = vec3(1.0);
|
||||
|
||||
vec3 feetPlayerPos_shadow = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz;
|
||||
vec3 projectedShadowPosition = mat3(shadowModelView) * feetPlayerPos_shadow + shadowModelView[3].xyz;
|
||||
projectedShadowPosition = diagonal3(shadowProjection) * projectedShadowPosition + shadowProjection[3].xyz;
|
||||
|
||||
//apply distortion
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
float distortFactor = calcDistort(projectedShadowPosition.xy);
|
||||
projectedShadowPosition.xy *= distortFactor;
|
||||
#else
|
||||
gl_FragData[0].a = 1.0;
|
||||
#endif
|
||||
#ifndef BLOOMY_PARTICLES
|
||||
gl_FragData[1].a = 0.0; // for bloomy rain and stuff
|
||||
float distortFactor = 1.0;
|
||||
#endif
|
||||
|
||||
vec3 Direct_lighting = vec3(0.0);
|
||||
vec3 directLightColor = vec3(0.0);
|
||||
//do shadows only if on shadow map
|
||||
if (abs(projectedShadowPosition.x) < 1.0-1.5/shadowMapResolution && abs(projectedShadowPosition.y) < 1.0-1.5/shadowMapResolution){
|
||||
Shadows = vec3(0.0);
|
||||
|
||||
vec3 Indirect_lighting = vec3(0.0);
|
||||
vec3 AmbientLightColor = vec3(0.0);
|
||||
vec3 Torch_Color = vec3(TORCH_R,TORCH_G,TORCH_B);
|
||||
vec3 MinimumLightColor = vec3(1.0);
|
||||
projectedShadowPosition = projectedShadowPosition * vec3(0.5,0.5,0.5/6.0) + vec3(0.5);
|
||||
|
||||
if(isEyeInWater == 1) MinimumLightColor = vec3(10.0);
|
||||
if(lightmap.x >= 0.9) Torch_Color *= LIT_PARTICLE_BRIGHTNESS;
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
float opaqueShadow = shadow2D(shadowtex0, projectedShadowPosition).x;
|
||||
Shadows += vec3(opaqueShadow);
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
directLightColor = lightCol.rgb/80.0;
|
||||
float Shadows = 1.0;
|
||||
|
||||
vec3 shadowPlayerPos = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz;
|
||||
|
||||
float shadowMapFalloff = smoothstep(0.0, 1.0, min(max(1.0 - length(shadowPlayerPos) / (shadowDistance+16),0.0)*5.0,1.0));
|
||||
float shadowMapFalloff2 = smoothstep(0.0, 1.0, min(max(1.0 - length(shadowPlayerPos) / (shadowDistance+11),0.0)*5.0,1.0));
|
||||
|
||||
float LM_shadowMapFallback = min(max(lightmap.y-0.8, 0.0) * 25,1.0);
|
||||
|
||||
Shadows = ComputeShadowMap(directLightColor, shadowPlayerPos, shadowMapFalloff);
|
||||
|
||||
Shadows = mix(LM_shadowMapFallback, Shadows, shadowMapFalloff2);
|
||||
|
||||
float cloudShadow = GetCloudShadow(feetPlayerPos);
|
||||
|
||||
Direct_lighting = directLightColor * Shadows * cloudShadow;
|
||||
|
||||
#ifndef LINES
|
||||
Direct_lighting *= phaseg(clamp(dot(feetPlayerPos_normalized, WsunVec),0.0,1.0), 0.65)*2 + 0.5;
|
||||
if(shadow2D(shadowtex1, projectedShadowPosition).x > projectedShadowPosition.z){
|
||||
vec4 translucentShadow = texture2D(shadowcolor0, projectedShadowPosition.xy);
|
||||
if(translucentShadow.a < 0.9) Shadows += normalize(translucentShadow.rgb+0.0001) * (1.0-opaqueShadow);
|
||||
}
|
||||
#else
|
||||
Shadows = vec3(shadow2D(shadow, projectedShadowPosition).x);
|
||||
#endif
|
||||
}
|
||||
|
||||
AmbientLightColor = averageSkyCol_Clouds / 30.0;
|
||||
AmbientLightColor *= 2.5;
|
||||
float cloudShadow = GetCloudShadow(feetPlayerPos);
|
||||
|
||||
Direct_lighting = (lightCol.rgb/80.0) * Shadows * cloudShadow;
|
||||
|
||||
|
||||
#ifndef LINES
|
||||
Direct_lighting *= phaseg(clamp(dot(feetPlayerPos_normalized, WsunVec),0.0,1.0), 0.65)*2 + 0.5;
|
||||
#endif
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
vec3 lpvPos = GetLpvPosition(feetPlayerPos);
|
||||
#else
|
||||
const vec3 lpvPos = vec3(0.0);
|
||||
#endif
|
||||
|
||||
Indirect_lighting = DoAmbientLightColor(lpvPos, AmbientLightColor, MinimumLightColor, Torch_Color, clamp(lightmap.xy,0,1), exposure);
|
||||
|
||||
#ifdef LINES
|
||||
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * toLinear(color.rgb);
|
||||
#else
|
||||
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * Albedo;
|
||||
#endif
|
||||
|
||||
// distance fade targeting the world border...
|
||||
if(TEXTURE.a < 0.7 && TEXTURE.a > 0.2) gl_FragData[0] *= clamp(1.0 - length(feetPlayerPos) / 100.0 ,0.0,1.0);
|
||||
|
||||
gl_FragData[0].rgb *= 0.1;
|
||||
vec3 AmbientLightColor = (averageSkyCol_Clouds / 30.0) * 3.0;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef NETHER_SHADER
|
||||
// vec3 AmbientLightColor = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb / 15;
|
||||
vec3 AmbientLightColor = vec3(0.1);
|
||||
#endif
|
||||
|
||||
#ifdef END_SHADER
|
||||
vec3 AmbientLightColor = vec3(1.0);
|
||||
#endif
|
||||
|
||||
Indirect_lighting = DoAmbientLightColor(feetPlayerPos, AmbientLightColor,MinimumLightColor, Torch_Color, clamp(lightmap.xy,0,1));
|
||||
|
||||
#ifdef LINES
|
||||
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * toLinear(color.rgb);
|
||||
#else
|
||||
gl_FragData[0].rgb = (Indirect_lighting + Direct_lighting) * Albedo;
|
||||
#endif
|
||||
|
||||
#ifdef DAMAGE_BLOCK_EFFECT
|
||||
|
||||
gl_FragData[0] = vec4(0.0, encodeVec2(TEXTURE.rg), encodeVec2(vec2(TEXTURE.b,0.0)), TEXTURE.a);
|
||||
#endif
|
||||
|
||||
// distance fade targeting the world border...
|
||||
if(TEXTURE.a < 0.7 && TEXTURE.a > 0.2) gl_FragData[0] *= clamp(1.0 - length(feetPlayerPos) / 100.0 ,0.0,1.0);
|
||||
#endif
|
||||
}
|
@ -280,10 +280,12 @@ vec4 texture2D_POMSwitch(
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
#if defined HAND || defined ENTITIES
|
||||
/* RENDERTARGETS:1,7,8,15,2 */
|
||||
varying vec3 pos;
|
||||
|
||||
#ifdef HAND
|
||||
/* RENDERTARGETS: 1,7,8,15,2 */
|
||||
#else
|
||||
/* RENDERTARGETS:1,7,8,15 */
|
||||
/* RENDERTARGETS: 1,7,8,15 */
|
||||
#endif
|
||||
|
||||
void main() {
|
||||
@ -310,9 +312,19 @@ void main() {
|
||||
vec3 fragpos = toScreenSpace(gl_FragCoord.xyz*vec3(texelSize/RENDER_SCALE,1.0)-vec3(vec2(tempOffset)*texelSize*0.5,0.0));
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * fragpos + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
|
||||
// #if defined DH_OVERDRAW_PREVENTION && defined DISTANT_HORIZONS
|
||||
// // overdraw prevention
|
||||
// if(clamp(1.0-length(pos.xyz)/max(far - 16.0 * sqrt(interleaved_gradientNoise_temporal()),0.0),0.0,1.0) <= 0.0 ){
|
||||
// discard;
|
||||
// return;
|
||||
// }
|
||||
// #endif
|
||||
|
||||
float torchlightmap = lmtexcoord.z;
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
|
||||
|
||||
if(HELD_ITEM_BRIGHTNESS > 0.0) torchlightmap = max(torchlightmap, HELD_ITEM_BRIGHTNESS * clamp( pow(max(1.0-length(fragpos)/HANDHELD_LIGHT_RANGE,0.0),1.5),0.0,1.0));
|
||||
|
||||
#ifdef HAND
|
||||
@ -353,7 +365,7 @@ void main() {
|
||||
float used_POM_DEPTH = 1.0;
|
||||
|
||||
if ( viewVector.z < 0.0 && depthmap < 0.9999 && depthmap > 0.00001) {
|
||||
// float noise = blueNoise();
|
||||
float noise = blueNoise();
|
||||
#ifdef Adaptive_Step_length
|
||||
vec3 interval = (viewVector.xyz /-viewVector.z/MAX_OCCLUSION_POINTS * POM_DEPTH) * clamp(1.0-pow(depthmap,2),0.1,1.0);
|
||||
used_POM_DEPTH = 1.0;
|
||||
@ -362,9 +374,9 @@ void main() {
|
||||
#endif
|
||||
vec3 coord = vec3(vtexcoord.st , 1.0);
|
||||
|
||||
coord += interval * used_POM_DEPTH;
|
||||
coord += interval * noise * used_POM_DEPTH;
|
||||
|
||||
float sumVec = 0.5;
|
||||
float sumVec = noise;
|
||||
for (int loopCount = 0; (loopCount < MAX_OCCLUSION_POINTS) && (1.0 - POM_DEPTH + POM_DEPTH * readNormal(coord.st).a ) < coord.p && coord.p >= 0.0; ++loopCount) {
|
||||
coord = coord + interval * used_POM_DEPTH;
|
||||
sumVec += used_POM_DEPTH;
|
||||
@ -380,11 +392,13 @@ void main() {
|
||||
adjustedTexCoord = mix(fract(coord.st)*vtexcoordam.pq+vtexcoordam.st, adjustedTexCoord, max(dist-MIX_OCCLUSION_DISTANCE,0.0)/(MAX_OCCLUSION_DISTANCE-MIX_OCCLUSION_DISTANCE));
|
||||
|
||||
vec3 truePos = fragpos + sumVec*inverseMatrix(tbnMatrix)*interval;
|
||||
|
||||
gl_FragDepth = toClipSpace3(truePos).z;
|
||||
// #ifdef Depth_Write_POM
|
||||
gl_FragDepth = toClipSpace3(truePos).z;
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!ifPOM) adjustedTexCoord = lmtexcoord.xy;
|
||||
|
||||
|
||||
@ -394,6 +408,7 @@ void main() {
|
||||
float textureLOD = bias();
|
||||
vec4 Albedo = texture2D_POMSwitch(texture, adjustedTexCoord.xy, vec4(dcdx,dcdy), ifPOM, textureLOD) * color;
|
||||
|
||||
|
||||
#if defined HAND
|
||||
if (Albedo.a < 0.1) discard;
|
||||
#endif
|
||||
@ -417,7 +432,7 @@ void main() {
|
||||
blockID == BLOCK_SSS_STRONG || blockID == BLOCK_SSS_WEAK ||
|
||||
blockID >= 10 && blockId < 80
|
||||
) {
|
||||
// IR Reflective (Pink-red)
|
||||
// IR Reflective (Pink-red)
|
||||
Albedo.rgb = mix(vec3(gray), aerochrome_color, 0.7);
|
||||
}
|
||||
else if(blockID == BLOCK_GRASS) {
|
||||
@ -447,14 +462,10 @@ void main() {
|
||||
if (Albedo.a > 0.1){
|
||||
Albedo.a = 0.75;
|
||||
gl_FragData[4].a = 0.0;
|
||||
} else {
|
||||
Albedo.a = 1.0;
|
||||
}
|
||||
} else Albedo.a = 1.0;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef ENTITIES
|
||||
gl_FragData[4].a = 0.0;
|
||||
#endif
|
||||
|
||||
//////////////////////////////// ////////////////////////////////
|
||||
//////////////////////////////// NORMAL ////////////////////////////////
|
||||
@ -472,14 +483,15 @@ void main() {
|
||||
NormalTex.xy = NormalTex.xy * 2.0-1.0;
|
||||
NormalTex.z = sqrt(max(1.0 - dot(NormalTex.xy, NormalTex.xy), 0.0));
|
||||
|
||||
// #if defined HEIGTHMAP_DEPTH_OFFSET && !defined HAND
|
||||
// gl_FragDepth = gl_FragCoord.z;
|
||||
// vec3 truePos = fragpos;
|
||||
// truePos.z -= Heightmap * POM_DEPTH * (1.0 + ld(truePos.z));
|
||||
#if defined HEIGTHMAP_DEPTH_OFFSET && !defined HAND
|
||||
gl_FragDepth = gl_FragCoord.z;
|
||||
vec3 truePos = fragpos;
|
||||
truePos.z -= Heightmap * POM_DEPTH * (1.0 + ld(truePos.z));
|
||||
|
||||
// gl_FragDepth = toClipSpace3(truePos).z;
|
||||
// #endif
|
||||
gl_FragDepth = toClipSpace3(truePos).z;
|
||||
#endif
|
||||
|
||||
|
||||
normal = applyBump(tbnMatrix, NormalTex.xyz, mix(1.0,1-Puddle_shape,rainfall) );
|
||||
// normal = applyBump(tbnMatrix, NormalTex.xyz, 0.0);
|
||||
#endif
|
||||
@ -560,6 +572,10 @@ void main() {
|
||||
// apply noise to lightmaps to reduce banding.
|
||||
vec2 PackLightmaps = vec2(torchlightmap, lmtexcoord.w);
|
||||
|
||||
#if !defined ENTITIES && !defined HAND
|
||||
// PackLightmaps = clamp(PackLightmaps*blueNoise()*0.05 + PackLightmaps,0.0,1.0);
|
||||
#endif
|
||||
|
||||
vec4 data1 = clamp( encode(viewToWorld(normal), PackLightmaps), 0.0, 1.0);
|
||||
// gl_FragData[0] = vec4(.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));
|
||||
|
@ -185,18 +185,26 @@ float luma(vec3 color) {
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
|
||||
varying vec3 pos;
|
||||
void main() {
|
||||
|
||||
gl_Position = ftransform();
|
||||
|
||||
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
|
||||
pos = position;
|
||||
|
||||
/////// ----- COLOR STUFF ----- ///////
|
||||
color = gl_Color;
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
/////// ----- RANDOM STUFF ----- ///////
|
||||
// gl_TextureMatrix[0] for animated things like charged creepers
|
||||
lmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
|
||||
@ -209,8 +217,7 @@ void main() {
|
||||
vtexcoord.xy = sign(texcoordminusmid)*0.5+0.5;
|
||||
// #endif
|
||||
|
||||
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 240.0;
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 255.0; // is this even correct? lol'
|
||||
lmtexcoord.zw = lmcoord;
|
||||
|
||||
|
||||
@ -232,6 +239,7 @@ void main() {
|
||||
SIGN = 0;
|
||||
|
||||
#ifdef WORLD
|
||||
// disallow POM to work on signs.
|
||||
if(blockEntityId == BLOCK_SIGN) SIGN = 1;
|
||||
|
||||
if(blockEntityId == BLOCK_END_PORTAL) PORTAL = 1;
|
||||
@ -249,6 +257,7 @@ void main() {
|
||||
// if( dot(gl_Color.rgb, vec3(1.0/3.0)) < 1.0) NameTags = 1;
|
||||
// if(gl_Color.a < 1.0) NameTags = 1;
|
||||
// if(gl_Color.a >= 0.24 && gl_Color.a <= 0.25 ) gl_Position = vec4(10,10,10,1);
|
||||
|
||||
if(entityId == ENTITY_SSS_MEDIUM || entityId == ENTITY_SSS_WEAK || entityId == ENTITY_PLAYER || entityId == 2468) normalMat.a = 0.45;
|
||||
|
||||
#endif
|
||||
@ -256,8 +265,8 @@ void main() {
|
||||
if(mc_Entity.x == BLOCK_AIR_WAVING) normalMat.a = 0.55;
|
||||
|
||||
/////// ----- EMISSIVE STUFF ----- ///////
|
||||
EMISSIVE = 0.0;
|
||||
LIGHTNING = 0;
|
||||
EMISSIVE = 0.0;
|
||||
LIGHTNING = 0;
|
||||
// if(NameTags > 0) EMISSIVE = 0.9;
|
||||
|
||||
// normal block lightsources
|
||||
@ -272,16 +281,18 @@ void main() {
|
||||
#endif
|
||||
|
||||
/////// ----- SSS STUFF ----- ///////
|
||||
SSSAMOUNT = 0.0;
|
||||
SSSAMOUNT = 0.0;
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
|
||||
#ifdef Hand_Held_lights
|
||||
if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WORLD
|
||||
|
||||
|
||||
/////// ----- SSS ON BLOCKS ----- ///////
|
||||
// strong
|
||||
if (
|
||||
@ -300,6 +311,7 @@ if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_I
|
||||
) {
|
||||
SSSAMOUNT = 0.75;
|
||||
}
|
||||
|
||||
// low
|
||||
#ifdef MISC_BLOCK_SSS
|
||||
if(mc_Entity.x == BLOCK_SSS_WEIRD || mc_Entity.x == BLOCK_GRASS) SSSAMOUNT = 0.5; // weird SSS on blocks like grass and stuff
|
||||
@ -340,7 +352,7 @@ if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_I
|
||||
mc_Entity.x == BLOCK_SAPLING
|
||||
) && istopv && abs(position.z) < 64.0
|
||||
) {
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
vec3 worldpos = mat3(gbufferModelViewInverse) * position + gbufferModelViewInverse[3].xyz + cameraPosition;
|
||||
worldpos.xyz += calcMovePlants(worldpos.xyz)*lmtexcoord.w - cameraPosition;
|
||||
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
}
|
||||
@ -351,7 +363,9 @@ if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_I
|
||||
position = mat3(gbufferModelView) * worldpos + gbufferModelView[3].xyz;
|
||||
}
|
||||
#endif
|
||||
|
||||
gl_Position = toClipSpace3(position);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined Seasons && defined WORLD && !defined ENTITIES && !defined BLOCKENTITIES && !defined HAND
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
uniform vec4 entityColor;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
const bool shadowHardwareFiltering = true;
|
||||
@ -27,7 +26,14 @@ uniform vec4 entityColor;
|
||||
flat varying vec4 lightCol;
|
||||
#endif
|
||||
|
||||
#ifdef BLOCKENTITIES
|
||||
#undef WATER_REFLECTIONS
|
||||
#endif
|
||||
|
||||
#ifdef ENTITIES
|
||||
#undef WATER_BACKGROUND_SPECULAR
|
||||
#undef SCREENSPACE_REFLECTIONS
|
||||
#endif
|
||||
|
||||
flat varying float HELD_ITEM_BRIGHTNESS;
|
||||
|
||||
@ -35,14 +41,10 @@ const bool colortex4MipmapEnabled = true;
|
||||
uniform sampler2D noisetex;
|
||||
uniform sampler2D depthtex1;
|
||||
uniform sampler2D depthtex0;
|
||||
#ifdef DISTANT_HORIZONS
|
||||
uniform sampler2D dhDepthTex1;
|
||||
#endif
|
||||
uniform sampler2D colortex7;
|
||||
uniform sampler2D colortex12;
|
||||
uniform sampler2D colortex14;
|
||||
uniform sampler2D colortex5;
|
||||
uniform sampler2D colortex6;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform sampler2D specular;
|
||||
@ -59,7 +61,6 @@ varying vec3 binormal;
|
||||
varying vec3 flatnormal;
|
||||
|
||||
|
||||
flat varying float exposure;
|
||||
|
||||
|
||||
uniform vec3 sunVec;
|
||||
@ -113,21 +114,25 @@ uniform vec3 nsunColor;
|
||||
#endif
|
||||
|
||||
#include "/lib/diffuse_lighting.glsl"
|
||||
|
||||
float blueNoise(){
|
||||
return fract(texelFetch2D(noisetex, ivec2(gl_FragCoord.xy)%512, 0).a + 1.0/1.6180339887 * frameCounter);
|
||||
}
|
||||
float interleaved_gradientNoise_temporal(){
|
||||
return fract(52.9829189*fract(0.06711056*gl_FragCoord.x + 0.00583715*gl_FragCoord.y)+frameTimeCounter*51.9521);
|
||||
float R2_dither(){
|
||||
vec2 alpha = vec2(0.75487765, 0.56984026);
|
||||
return fract(alpha.x * gl_FragCoord.x + alpha.y * gl_FragCoord.y + 1.0/1.6180339887 * frameCounter) ;
|
||||
}
|
||||
float interleaved_gradientNoise(){
|
||||
vec2 coord = gl_FragCoord.xy;
|
||||
float noise = fract(52.9829189*fract(0.06711056*coord.x + 0.00583715*coord.y));
|
||||
return noise;
|
||||
vec2 coord = gl_FragCoord.xy + (frameCounter%40000);
|
||||
// vec2 coord = gl_FragCoord.xy + frameTimeCounter;
|
||||
// vec2 coord = gl_FragCoord.xy;
|
||||
float noise = fract( 52.9829189 * fract( (coord.x * 0.06711056) + (coord.y * 0.00583715)) );
|
||||
return noise ;
|
||||
}
|
||||
float R2_dither(){
|
||||
vec2 coord = gl_FragCoord.xy + (frameCounter%40000) * 2.0;
|
||||
vec2 alpha = vec2(0.75487765, 0.56984026);
|
||||
return fract(alpha.x * coord.x + alpha.y * coord.y ) ;
|
||||
float interleaved_gradientNoise(float temporal){
|
||||
vec2 coord = gl_FragCoord.xy;
|
||||
float noise = fract(52.9829189*fract(0.06711056*coord.x + 0.00583715*coord.y)+temporal);
|
||||
return noise;
|
||||
}
|
||||
|
||||
const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
@ -145,26 +150,35 @@ const vec2[8] offsets = vec2[8](vec2(1./8.,-3./8.),
|
||||
|
||||
|
||||
|
||||
#define PW_DEPTH 1.5 //[0.5 1.0 1.5 2.0 2.5 3.0]
|
||||
#define PW_POINTS 2 //[2 4 6 8 16 32]
|
||||
#define PW_DEPTH 1.0 //[0.5 1.0 1.5 2.0 2.5 3.0]
|
||||
#define PW_POINTS 1 //[2 4 6 8 16 32]
|
||||
|
||||
varying vec3 viewVector;
|
||||
vec3 getParallaxDisplacement(vec3 posxz) {
|
||||
|
||||
vec3 parallaxPos = posxz;
|
||||
vec2 vec = viewVector.xy * (1.0 / float(PW_POINTS)) * 22.0 * PW_DEPTH;
|
||||
// float waterHeight = (1.0 - (getWaterHeightmap(posxz.xz)*0.5+0.5)) * 2.0 - 1.0;
|
||||
float waterHeight = getWaterHeightmap(posxz.xz) * 2.0;
|
||||
parallaxPos.xz -= waterHeight * vec;
|
||||
vec2 vec = viewVector.xy * (1.0 / float(PW_POINTS)) * 22.0;
|
||||
float waterHeight = getWaterHeightmap(posxz.xz);
|
||||
parallaxPos.xz += waterHeight * vec;
|
||||
|
||||
return parallaxPos;
|
||||
}
|
||||
|
||||
// vec3 getParallaxDisplacement(vec3 posxz,float bumpmult,vec3 viewVec) {
|
||||
|
||||
// vec3 parallaxPos = posxz;
|
||||
// vec2 vec = viewVector.xy * (1.0 / float(PW_POINTS)) * 22.0 * PW_DEPTH;
|
||||
// float waterHeight = getWaterHeightmap(posxz.xz) ;
|
||||
|
||||
// parallaxPos.xz += waterHeight * vec;
|
||||
|
||||
// return parallaxPos;
|
||||
|
||||
// }
|
||||
|
||||
vec3 applyBump(mat3 tbnMatrix, vec3 bump, float puddle_values){
|
||||
float bumpmult = puddle_values;
|
||||
float bumpmult = 1;
|
||||
bump = bump * vec3(bumpmult, bumpmult, bumpmult) + vec3(0.0f, 0.0f, 1.0f - bumpmult);
|
||||
//
|
||||
return normalize(bump*tbnMatrix);
|
||||
}
|
||||
|
||||
@ -261,8 +275,12 @@ vec3 rayTrace(vec3 dir, vec3 position,float dither, float fresnel, bool inwater)
|
||||
|
||||
// decode depth buffer
|
||||
// float sp = sqrt(texelFetch2D(colortex4,ivec2(spos.xy/texelSize/4),0).w/65000.0);
|
||||
|
||||
float sp = sqrt(texelFetch2D(colortex4,ivec2(spos.xy/texelSize/4.0),0).a/65000.0);
|
||||
#ifdef HAND
|
||||
vec2 testthing = spos.xy*texelSize; // fix for ssr on hand
|
||||
#else
|
||||
vec2 testthing = spos.xy/texelSize/4.0;
|
||||
#endif
|
||||
float sp = sqrt((texelFetch2D(colortex4,ivec2(testthing),0).a)/65000.0);
|
||||
sp = invLinZ(sp);
|
||||
|
||||
if(sp <= max(maxZ,minZ) && sp >= min(maxZ,minZ)) return vec3(spos.xy/RENDER_SCALE,sp);
|
||||
@ -281,8 +299,8 @@ vec3 rayTrace(vec3 dir, vec3 position,float dither, float fresnel, bool inwater)
|
||||
return vec3(1.1);
|
||||
}
|
||||
|
||||
float GGX(vec3 n, vec3 v, vec3 l, float r, float f0) {
|
||||
r = max(pow(r,2.5), 0.0001);
|
||||
vec3 GGX (vec3 n, vec3 v, vec3 l, float r, vec3 F0) {
|
||||
r = pow(r,2.5);
|
||||
|
||||
vec3 h = l + v;
|
||||
float hn = inversesqrt(dot(h, h));
|
||||
@ -292,202 +310,94 @@ float GGX(vec3 n, vec3 v, vec3 l, float r, float f0) {
|
||||
float dotNL = clamp(dot(n,l),0.,1.);
|
||||
float dotNHsq = dotNH*dotNH;
|
||||
|
||||
float denom = dotNHsq * r - dotNHsq + 1.;
|
||||
float denom = dotNHsq * r - dotNHsq + 1.0;
|
||||
float D = r / (3.141592653589793 * denom * denom);
|
||||
|
||||
float F = f0 + (1. - f0) * exp2((-5.55473*dotLH-6.98316)*dotLH);
|
||||
vec3 F = 0.2 + (1. - F0) * exp2((-5.55473*dotLH-6.98316)*dotLH);
|
||||
float k2 = .25 * r;
|
||||
|
||||
return dotNL * D * F / (dotLH*dotLH*(1.0-k2)+k2);
|
||||
}
|
||||
|
||||
|
||||
|
||||
uniform float dhFarPlane;
|
||||
|
||||
#include "/lib/DistantHorizons_projections.glsl"
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
float darkSpecularHighlight(vec3 playerPos, vec3 normal, float roughness, float f0){
|
||||
|
||||
roughness = max(pow(1.0 - roughness, 2.0),0.002);
|
||||
|
||||
float distanceFalloff = clamp( exp(-7.0 * (length(playerPos) / 16.0)) ,0.0,1.0);
|
||||
|
||||
// #undef BASIC_SHADOW_FILTER
|
||||
float NdotP = clamp(1.0 + dot(normal, normalize(playerPos)),0.0,1.0);
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
float ComputeShadowMap(inout vec3 directLightColor, vec3 playerPos, float maxDistFade, float noise){
|
||||
float specularHighlight = exp( -(1.0 / roughness) * NdotP ) * f0;
|
||||
|
||||
if(maxDistFade <= 0.0) return 1.0;
|
||||
|
||||
// setup shadow projection
|
||||
vec3 projectedShadowPosition = mat3(shadowModelView) * playerPos + shadowModelView[3].xyz;
|
||||
projectedShadowPosition = diagonal3(shadowProjection) * projectedShadowPosition + shadowProjection[3].xyz;
|
||||
|
||||
// un-distort
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
float distortFactor = calcDistort(projectedShadowPosition.xy);
|
||||
projectedShadowPosition.xy *= distortFactor;
|
||||
#else
|
||||
float distortFactor = 1.0;
|
||||
#endif
|
||||
|
||||
// hamburger
|
||||
projectedShadowPosition = projectedShadowPosition * vec3(0.5,0.5,0.5/6.0) + vec3(0.5);
|
||||
|
||||
float shadowmap = 0.0;
|
||||
vec3 translucentTint = vec3(0.0);
|
||||
|
||||
#ifndef HAND
|
||||
projectedShadowPosition.z -= 0.0001;
|
||||
#endif
|
||||
|
||||
#if defined ENTITIES
|
||||
projectedShadowPosition.z -= 0.0002;
|
||||
#endif
|
||||
|
||||
#ifdef BASIC_SHADOW_FILTER
|
||||
int samples = int(SHADOW_FILTER_SAMPLE_COUNT * 0.5);
|
||||
float rdMul = 14.0*distortFactor*d0*k/shadowMapResolution;
|
||||
|
||||
for(int i = 0; i < samples; i++){
|
||||
vec2 offsetS = tapLocation_simple(i, 7, 9, noise) *0.5;
|
||||
projectedShadowPosition.xy += rdMul*offsetS;
|
||||
#else
|
||||
int samples = 1;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
|
||||
// determine when opaque shadows are overlapping translucent shadows by getting the difference of opaque depth and translucent depth
|
||||
float shadowDepthDiff = pow(clamp((shadow2D(shadowtex1, projectedShadowPosition).x - projectedShadowPosition.z) * 2.0,0.0,1.0),2.0);
|
||||
|
||||
// get opaque shadow data to get opaque data from translucent shadows.
|
||||
float opaqueShadow = shadow2D(shadowtex0, projectedShadowPosition).x;
|
||||
shadowmap += max(opaqueShadow, shadowDepthDiff);
|
||||
|
||||
// get translucent shadow data
|
||||
vec4 translucentShadow = texture2D(shadowcolor0, projectedShadowPosition.xy);
|
||||
|
||||
// this curve simply looked the nicest. it has no other meaning.
|
||||
float shadowAlpha = pow(1.0 - pow(translucentShadow.a,5.0),0.2);
|
||||
|
||||
// normalize the color to remove luminance, and keep the hue. remove all opaque color.
|
||||
// mulitply shadow alpha to shadow color, but only on surfaces facing the lightsource. this is a tradeoff to protect subsurface scattering's colored shadow tint from shadow bias on the back of the caster.
|
||||
translucentShadow.rgb = max(normalize(translucentShadow.rgb + 0.0001), max(opaqueShadow, 1.0-shadowAlpha)) * shadowAlpha;
|
||||
|
||||
// make it such that full alpha areas that arent in a shadow have a value of 1.0 instead of 0.0
|
||||
translucentTint += mix(translucentShadow.rgb, vec3(1.0), opaqueShadow*shadowDepthDiff);
|
||||
|
||||
#else
|
||||
shadowmap += shadow2D(shadow, projectedShadowPosition).x;
|
||||
#endif
|
||||
|
||||
#ifdef BASIC_SHADOW_FILTER
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
// tint the lightsource color with the translucent shadow color
|
||||
directLightColor *= mix(vec3(1.0), translucentTint.rgb / samples, maxDistFade);
|
||||
#endif
|
||||
|
||||
return mix(1.0, shadowmap / samples, maxDistFade);
|
||||
return specularHighlight * distanceFalloff;
|
||||
}
|
||||
#endif
|
||||
|
||||
void convertHandDepth(inout float depth) {
|
||||
float ndcDepth = depth * 2.0 - 1.0;
|
||||
ndcDepth /= MC_HAND_DEPTH;
|
||||
depth = ndcDepth * 0.5 + 0.5;
|
||||
}
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
|
||||
|
||||
uniform vec4 entityColor;
|
||||
/* RENDERTARGETS:2,7,11,14 */
|
||||
|
||||
|
||||
void main() {
|
||||
if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 ) {
|
||||
|
||||
vec3 FragCoord = gl_FragCoord.xyz;
|
||||
|
||||
#ifdef HAND
|
||||
convertHandDepth(FragCoord.z);
|
||||
#endif
|
||||
|
||||
vec2 tempOffset = offsets[framemod8];
|
||||
|
||||
vec3 viewPos = toScreenSpace(FragCoord*vec3(texelSize/RENDER_SCALE,1.0)-vec3(vec2(tempOffset)*texelSize*0.5, 0.0));
|
||||
|
||||
vec3 feetPlayerPos = mat3(gbufferModelViewInverse) * viewPos;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// MATERIAL MASKS ////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
vec3 viewPos = toScreenSpace(gl_FragCoord.xyz*vec3(texelSize/RENDER_SCALE,1.0)-vec3(vec2(tempOffset)*texelSize*0.5,0.0));
|
||||
|
||||
vec3 feetPlayerPos = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz;
|
||||
|
||||
float MATERIALS = normalMat.w;
|
||||
|
||||
// 1.0 = water mask
|
||||
// 0.9 = entity mask
|
||||
// 0.8 = reflective entities
|
||||
// 0.7 = reflective blocks
|
||||
// 0.1 = hand mask
|
||||
////////////////////////////////
|
||||
//////////////////////////////// ALBEDO
|
||||
////////////////////////////////
|
||||
|
||||
#ifdef HAND
|
||||
MATERIALS = 0.1;
|
||||
#endif
|
||||
|
||||
// bool isHand = abs(MATERIALS - 0.1) < 0.01;
|
||||
bool isWater = MATERIALS > 0.99;
|
||||
bool isReflectiveEntity = abs(MATERIALS - 0.8) < 0.01;
|
||||
bool isReflective = abs(MATERIALS - 0.7) < 0.01 || isWater || isReflectiveEntity;
|
||||
bool isEntity = abs(MATERIALS - 0.9) < 0.01 || isReflectiveEntity;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////// ALBEDO /////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
gl_FragData[0] = texture2D(texture, lmtexcoord.xy, Texture_MipMap_Bias) * color;
|
||||
|
||||
float UnchangedAlpha = gl_FragData[0].a;
|
||||
|
||||
|
||||
#ifdef WhiteWorld
|
||||
gl_FragData[0].rgb = vec3(0.5);
|
||||
gl_FragData[0].a = 1.0;
|
||||
#endif
|
||||
|
||||
vec3 Albedo = toLinear(gl_FragData[0].rgb);
|
||||
float UnchangedAlpha = gl_FragData[0].a;
|
||||
|
||||
#ifndef WhiteWorld
|
||||
#ifdef Vanilla_like_water
|
||||
if (isWater) Albedo *= sqrt(luma(Albedo));
|
||||
#else
|
||||
if (isWater){
|
||||
Albedo = vec3(0.0);
|
||||
gl_FragData[0].a = 1.0/255.0;
|
||||
}
|
||||
#endif
|
||||
float iswater = normalMat.w;
|
||||
|
||||
#ifdef HAND
|
||||
iswater = 0.1;
|
||||
#endif
|
||||
|
||||
#ifdef ENTITIES
|
||||
Albedo.rgb = mix(Albedo.rgb, entityColor.rgb, clamp(entityColor.a*1.5,0,1));
|
||||
#ifdef Vanilla_like_water
|
||||
if (iswater > 0.95){
|
||||
Albedo *= sqrt(luma(Albedo));
|
||||
// Albedo = toLinear( gl_FragData[0].rgb * sqrt(luma(gl_FragData[0].rgb)));
|
||||
}
|
||||
#else
|
||||
if (iswater > 0.95){
|
||||
Albedo = vec3(0.0);
|
||||
gl_FragData[0].a = 1.0/255.0;
|
||||
}
|
||||
#endif
|
||||
|
||||
vec4 GLASS_TINT_COLORS = vec4(Albedo, UnchangedAlpha);
|
||||
|
||||
vec4 COLORTEST = vec4(Albedo, UnchangedAlpha);
|
||||
|
||||
#ifdef BIOME_TINT_WATER
|
||||
if (isWater) GLASS_TINT_COLORS.rgb = toLinear(color.rgb);
|
||||
if (iswater > 0.95) COLORTEST.rgb = color.rgb;
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// NORMALS ///////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
vec3 normal = normalMat.xyz; // in viewSpace
|
||||
vec3 worldSpaceNormal = viewToWorld(normal).xyz;
|
||||
////////////////////////////////
|
||||
//////////////////////////////// NORMAL
|
||||
////////////////////////////////
|
||||
|
||||
vec3 normal = normalMat.xyz;
|
||||
vec2 TangentNormal = vec2(0); // for refractions
|
||||
|
||||
vec3 tangent2 = normalize(cross(tangent.rgb,normal)*tangent.w);
|
||||
@ -495,44 +405,40 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
tangent.y, tangent2.y, normal.y,
|
||||
tangent.z, tangent2.z, normal.z);
|
||||
|
||||
vec3 NormalTex = vec3(texture2D(normals, lmtexcoord.xy, Texture_MipMap_Bias).xy,0.0);
|
||||
vec4 NormalTex = texture2D(normals, lmtexcoord.xy, Texture_MipMap_Bias).rgba;
|
||||
|
||||
NormalTex.xy = NormalTex.xy*2.0-1.0;
|
||||
NormalTex.z = clamp(sqrt(1.0 - dot(NormalTex.xy, NormalTex.xy)),0.0,1.0) ;
|
||||
|
||||
// tangent space normals for refraction
|
||||
TangentNormal = NormalTex.xy*0.5+0.5;
|
||||
|
||||
normal = applyBump(tbnMatrix, NormalTex.xyz, 1.0);
|
||||
|
||||
|
||||
#ifndef HAND
|
||||
if (isWater){
|
||||
vec3 posxz = (mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz) + cameraPosition;
|
||||
|
||||
// make the waves flow in the direction the water faces, except for perfectly up facing parts.
|
||||
if(abs(worldSpaceNormal.y) < 0.9995) posxz.xz -= (posxz.y + frameTimeCounter*3 * WATER_WAVE_SPEED) * normalize(worldSpaceNormal.xz) ;
|
||||
if (iswater > 0.95){
|
||||
vec3 posxz = feetPlayerPos + cameraPosition;
|
||||
|
||||
posxz.xyz = getParallaxDisplacement(posxz);
|
||||
float bumpmult = 1.0;
|
||||
|
||||
posxz.xyz = getParallaxDisplacement(posxz) ;
|
||||
|
||||
vec3 bump = normalize(getWaveNormal(posxz, false));
|
||||
|
||||
float bumpmult = 10.0 * WATER_WAVE_STRENGTH;
|
||||
TangentNormal = (bump.xy/3.0)*0.5+0.5; // tangent space normals for refraction
|
||||
|
||||
bump = bump * vec3(bumpmult, bumpmult, bumpmult) + vec3(0.0f, 0.0f, 1.0f - bumpmult);
|
||||
|
||||
NormalTex.xyz = bump;
|
||||
|
||||
// tangent space normals for refraction
|
||||
TangentNormal = (bump.xy/3.0)*0.5+0.5;
|
||||
normal = normalize(bump * tbnMatrix);
|
||||
}
|
||||
#endif
|
||||
|
||||
normal = applyBump(tbnMatrix, NormalTex.xyz, 1.0);
|
||||
gl_FragData[2] = vec4(encodeVec2(TangentNormal), encodeVec2(COLORTEST.rg), encodeVec2(COLORTEST.ba), UnchangedAlpha);
|
||||
|
||||
gl_FragData[2] = vec4(encodeVec2(TangentNormal), encodeVec2(GLASS_TINT_COLORS.rg), encodeVec2(GLASS_TINT_COLORS.ba), 1.0);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// DIFFUSE LIGHTING //////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
vec3 WS_normal = viewToWorld(normal);
|
||||
////////////////////////////////
|
||||
//////////////////////////////// DIFFUSE LIGHTING
|
||||
////////////////////////////////
|
||||
|
||||
vec2 lightmap = lmtexcoord.zw;
|
||||
|
||||
// lightmap.y = 1.0;
|
||||
|
||||
#ifndef OVERWORLD_SHADER
|
||||
lightmap.y = 1.0;
|
||||
@ -545,62 +451,127 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
vec3 Indirect_lighting = vec3(0.0);
|
||||
vec3 MinimumLightColor = vec3(1.0);
|
||||
if(isEyeInWater == 1) MinimumLightColor = vec3(10.0);
|
||||
|
||||
vec3 Direct_lighting = vec3(0.0);
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
vec3 DirectLightColor = lightCol.rgb/80.0;
|
||||
float NdotL = clamp(dot(normal, normalize(WsunVec*mat3(gbufferModelViewInverse))),0.0,1.0); NdotL = clamp((-15 + NdotL*255.0) / 240.0 ,0.0,1.0);
|
||||
float Shadows = 1.0;
|
||||
vec3 Shadows = vec3(0.0);
|
||||
bool inShadowmapBounds = false;
|
||||
|
||||
float shadowMapFalloff = smoothstep(0.0, 1.0, min(max(1.0 - length(feetPlayerPos) / (shadowDistance+16),0.0)*5.0,1.0));
|
||||
float shadowMapFalloff2 = smoothstep(0.0, 1.0, min(max(1.0 - length(feetPlayerPos) / shadowDistance,0.0)*5.0,1.0));
|
||||
vec3 feetPlayerPos_shadow = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz;
|
||||
|
||||
float LM_shadowMapFallback = min(max(lightmap.y-0.8, 0.0) * 25,1.0);
|
||||
// mat4 Custom_ViewMatrix = BuildShadowViewMatrix(LightDir);
|
||||
// vec3 projectedShadowPosition = mat3(Custom_ViewMatrix) * feetPlayerPos_shadow + Custom_ViewMatrix[3].xyz;
|
||||
vec3 projectedShadowPosition = mat3(shadowModelView) * feetPlayerPos_shadow + shadowModelView[3].xyz;
|
||||
projectedShadowPosition = diagonal3(shadowProjection) * projectedShadowPosition + shadowProjection[3].xyz;
|
||||
|
||||
vec3 shadowPlayerPos = mat3(gbufferModelViewInverse) * viewPos + gbufferModelViewInverse[3].xyz;
|
||||
//apply distortion
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
float distortFactor = calcDistort(projectedShadowPosition.xy);
|
||||
projectedShadowPosition.xy *= distortFactor;
|
||||
#else
|
||||
float distortFactor = 1.0;
|
||||
#endif
|
||||
|
||||
bool ShadowBounds = false;
|
||||
if(shadowDistanceRenderMul > 0.0) ShadowBounds = length(feetPlayerPos_shadow) < max(shadowDistance - 20,0.0);
|
||||
|
||||
if(shadowDistanceRenderMul < 0.0) ShadowBounds = abs(projectedShadowPosition.x) < 1.0-1.5/shadowMapResolution && abs(projectedShadowPosition.y) < 1.0-1.5/shadowMapResolution && abs(projectedShadowPosition.z) < 6.0;
|
||||
|
||||
Shadows = ComputeShadowMap(DirectLightColor, shadowPlayerPos, shadowMapFalloff, blueNoise());
|
||||
// sample shadows only if on shadow map
|
||||
if(ShadowBounds){
|
||||
if (NdotL > 0.0){
|
||||
Shadows = vec3(0.0);
|
||||
projectedShadowPosition = projectedShadowPosition * vec3(0.5,0.5,0.5/6.0) + vec3(0.5);
|
||||
|
||||
Shadows = mix(LM_shadowMapFallback, Shadows, shadowMapFalloff2);
|
||||
#ifndef HAND
|
||||
#ifdef BASIC_SHADOW_FILTER
|
||||
const float threshMul = max(2048.0/shadowMapResolution*shadowDistance/128.0,0.95);
|
||||
float distortThresh = (sqrt(1.0-NdotL*NdotL)/NdotL+0.7)/distortFactor;
|
||||
float diffthresh = distortThresh/6000.0*threshMul;
|
||||
|
||||
Shadows *= pow(GetCloudShadow(feetPlayerPos),3);
|
||||
float rdMul = 4.0/shadowMapResolution;
|
||||
float noise = blueNoise();
|
||||
|
||||
Direct_lighting = DirectLightColor * NdotL * Shadows;
|
||||
int SampleCount = 7;
|
||||
for(int i = 0; i < SampleCount; i++){
|
||||
vec2 offsetS = tapLocation_simple(i, 7, 9, noise) * 0.5;
|
||||
float weight = 1.0+(i+noise)*rdMul/9.0*shadowMapResolution;
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
vec3 shadowProjOffsets = projectedShadowPosition + vec3(rdMul*offsetS, -diffthresh*weight);
|
||||
|
||||
float opaqueShadow = shadow2D(shadowtex0, shadowProjOffsets).x;
|
||||
Shadows += vec3(opaqueShadow/SampleCount);
|
||||
|
||||
if(shadow2D(shadowtex1, shadowProjOffsets).x > shadowProjOffsets.z){
|
||||
vec4 translucentShadow = texture2D(shadowcolor0, shadowProjOffsets.xy);
|
||||
if(translucentShadow.a < 0.9) Shadows += (normalize(translucentShadow.rgb+0.0001) * clamp(1.0-opaqueShadow,0.0,1.0)) / SampleCount;
|
||||
}
|
||||
|
||||
#else
|
||||
Shadows += vec3(shadow2D(shadow, projectedShadowPosition + vec3(rdMul*offsetS, -diffthresh*weight)).x / SampleCount);
|
||||
#endif
|
||||
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef TRANSLUCENT_COLORED_SHADOWS
|
||||
projectedShadowPosition -= vec3(0.0,0.0,0.0001);
|
||||
Shadows = vec3(shadow2D(shadowtex0, projectedShadowPosition ).x);
|
||||
|
||||
if(shadow2D(shadowtex1, projectedShadowPosition).x > projectedShadowPosition.z){
|
||||
vec4 shadowLightColor = texture2D(shadowcolor0, projectedShadowPosition.xy);
|
||||
if(shadowLightColor.a < 0.9) Shadows += normalize(shadowLightColor.rgb+0.0001);
|
||||
}
|
||||
#else
|
||||
Shadows = vec3(shadow2D(shadow, projectedShadowPosition - vec3(0.0,0.0,0.0001)).x);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#else
|
||||
Shadows = vec3(shadow2D(shadow, projectedShadowPosition - vec3(0.0,0.0,0.0005)).x);
|
||||
#endif
|
||||
}
|
||||
inShadowmapBounds = true;
|
||||
}
|
||||
|
||||
if(!inShadowmapBounds) Shadows = vec3(1.0);
|
||||
|
||||
Shadows *= GetCloudShadow(feetPlayerPos);
|
||||
|
||||
Direct_lighting = (lightCol.rgb/80.0) * NdotL * Shadows;
|
||||
|
||||
vec3 AmbientLightColor = averageSkyCol_Clouds/30.0;
|
||||
|
||||
|
||||
|
||||
// vec3 ambientcoefs = slopednormal / dot(abs(slopednormal), vec3(1.0));
|
||||
|
||||
// float SkylightDir = ambientcoefs.y*1.5;
|
||||
// if(isGrass) SkylightDir = 1.25;
|
||||
|
||||
// float skylight = max(pow(viewToWorld(FlatNormals).y*0.5+0.5,0.1) + SkylightDir, 0.2 + (1.0-lightmap.y)*0.8) ;
|
||||
|
||||
|
||||
vec3 ambientcoefs = worldSpaceNormal / dot(abs(worldSpaceNormal), vec3(1.0));
|
||||
vec3 ambientcoefs = WS_normal / dot(abs(WS_normal), vec3(1));
|
||||
float SkylightDir = ambientcoefs.y*1.5;
|
||||
|
||||
float skylight = max(pow(viewToWorld(flatnormal).y*0.5+0.5,0.1) + SkylightDir, 0.2);
|
||||
float skylight = max(pow(viewToWorld(flatnormal).y*0.5+0.5,0.1) + SkylightDir, 0.25);
|
||||
AmbientLightColor *= skylight;
|
||||
#endif
|
||||
|
||||
#ifdef NETHER_SHADER
|
||||
// vec3 AmbientLightColor = skyCloudsFromTexLOD2(worldSpaceNormal, colortex4, 6).rgb / 15.0;
|
||||
// vec3 AmbientLightColor = skyCloudsFromTexLOD2(WS_normal, colortex4, 6).rgb / 15.0;
|
||||
|
||||
// vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb/ 30.0;
|
||||
// vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb/ 30.0;
|
||||
|
||||
// up *= pow( max( worldSpaceNormal.y, 0), 2);
|
||||
// down *= pow( max(-worldSpaceNormal.y, 0), 2);
|
||||
// up *= pow( max( WS_normal.y, 0), 2);
|
||||
// down *= pow( max(-WS_normal.y, 0), 2);
|
||||
// AmbientLightColor += up + down;
|
||||
|
||||
vec3 AmbientLightColor = vec3(0.1);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef END_SHADER
|
||||
|
||||
|
||||
float vortexBounds = clamp(vortexBoundRange - length(feetPlayerPos+cameraPosition), 0.0,1.0);
|
||||
vec3 lightPos = LightSourcePosition(feetPlayerPos+cameraPosition, cameraPosition,vortexBounds);
|
||||
|
||||
@ -608,91 +579,56 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
float lightningflash = texelFetch2D(colortex4,ivec2(1,1),0).x/150.0;
|
||||
vec3 lightColors = LightSourceColors(vortexBounds, lightningflash);
|
||||
|
||||
float NdotL = clamp(dot(worldSpaceNormal, normalize(-lightPos))*0.5+0.5,0.0,1.0);
|
||||
|
||||
float NdotL = clamp(dot(WS_normal, normalize(-lightPos))*0.5+0.5,0.0,1.0);
|
||||
NdotL *= NdotL;
|
||||
|
||||
Direct_lighting = lightColors * endFogPhase(lightPos) * NdotL;
|
||||
|
||||
vec3 AmbientLightColor = vec3(0.5,0.75,1.0) * 0.9 + 0.1;
|
||||
AmbientLightColor *= clamp(1.5 + dot(worldSpaceNormal, normalize(feetPlayerPos))*0.5,0,2);
|
||||
#endif
|
||||
|
||||
#ifdef IS_LPV_ENABLED
|
||||
vec3 lpvPos = GetLpvPosition(feetPlayerPos);
|
||||
|
||||
#ifdef LPV_NORMAL_OFFSET
|
||||
lpvPos += -0.5*worldSpaceNormal + viewToWorld(normal);
|
||||
#else
|
||||
lpvPos += 0.5*worldSpaceNormal;
|
||||
#endif
|
||||
#else
|
||||
const vec3 lpvPos = vec3(0.0);
|
||||
#endif
|
||||
|
||||
Indirect_lighting = DoAmbientLightColor(lpvPos, AmbientLightColor, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy, exposure);
|
||||
AmbientLightColor *= clamp(1.5 + dot(WS_normal, normalize(feetPlayerPos))*0.5,0,2);
|
||||
|
||||
#endif
|
||||
Indirect_lighting = DoAmbientLightColor(feetPlayerPos, AmbientLightColor, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy);
|
||||
|
||||
#ifdef ENTITIES
|
||||
Albedo.rgb = mix(Albedo.rgb, entityColor.rgb, clamp(entityColor.a*1.5,0,1));
|
||||
#endif
|
||||
|
||||
vec3 FinalColor = (Indirect_lighting + Direct_lighting) * Albedo;
|
||||
|
||||
// #ifdef Glass_Tint
|
||||
// FinalColor *= min(pow(gl_FragData[0].a,2.0),1.0);
|
||||
// #endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////// SPECULAR LIGHTING /////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////
|
||||
//////////////////////////////// SPECULAR
|
||||
////////////////////////////////
|
||||
#ifdef DAMAGE_BLOCK_EFFECT
|
||||
#undef WATER_REFLECTIONS
|
||||
#endif
|
||||
|
||||
// #ifdef ENTITIES
|
||||
// #undef WATER_BACKGROUND_SPECULAR
|
||||
// #endif
|
||||
|
||||
#ifndef OVERWORLD_SHADER
|
||||
#undef WATER_SUN_SPECULAR
|
||||
#endif
|
||||
|
||||
#ifdef WATER_REFLECTIONS
|
||||
vec2 SpecularTex = texture2D(specular, lmtexcoord.xy, Texture_MipMap_Bias).rg;
|
||||
|
||||
// if nothing is chosen, no smoothness and no reflectance
|
||||
vec2 specularValues = vec2(1.0, 0.0);
|
||||
SpecularTex = (iswater > 0.0 && iswater < 0.9) && SpecularTex.r > 0.0 && SpecularTex.g < 0.9 ? SpecularTex : vec2(1.0,0.02);
|
||||
|
||||
float roughness = max(pow(1.0-SpecularTex.r,2.0),0.05);
|
||||
float f0 = SpecularTex.g;
|
||||
|
||||
// hardcode specular values for select blocks like glass, water, and slime
|
||||
if(isReflective) specularValues = vec2(1.0, 0.02);
|
||||
|
||||
// detect if the specular texture is used, if it is, overwrite hardcoded values
|
||||
if(SpecularTex.r > 0.0 && SpecularTex.g <= 1.0) specularValues = SpecularTex;
|
||||
|
||||
float roughness = pow(1.0-specularValues.r,2.0);
|
||||
float f0 = isReflective ? max(specularValues.g, 0.02) : specularValues.g;
|
||||
|
||||
|
||||
#ifdef HAND
|
||||
f0 = max(specularValues.g, 0.02);
|
||||
#endif
|
||||
|
||||
// specularValues = SpecularTex;
|
||||
// f0 = 0.9;
|
||||
// roughness = 0.0;
|
||||
|
||||
vec3 Metals = f0 > 229.5/255.0 ? normalize(Albedo+1e-7) * (dot(Albedo,vec3(0.21, 0.72, 0.07)) * 0.7 + 0.3) : vec3(1.0);
|
||||
|
||||
// make sure zero alpha is not forced to be full alpha by fresnel on items with funny normal padding
|
||||
if(UnchangedAlpha <= 0.0 && !isReflective) f0 = 0.0;
|
||||
|
||||
|
||||
if (f0 > 0.0){
|
||||
|
||||
if(isReflective) f0 = max(f0, 0.02);
|
||||
// roughness = 0.1;
|
||||
// f0 = 0.1;
|
||||
|
||||
if (iswater > 0.0 && gl_FragData[0].a < 0.9999999){
|
||||
vec3 Reflections_Final = vec3(0.0);
|
||||
vec4 Reflections = vec4(0.0);
|
||||
vec3 BackgroundReflection = FinalColor;
|
||||
vec3 SkyReflection = vec3(0.0);
|
||||
vec3 SunReflection = vec3(0.0);
|
||||
float indoors = pow(1.0-pow(1.0-min(max(lightmap.y-0.6,0.0)*3.0,1.0),0.5),2.0);
|
||||
|
||||
|
||||
float indoors = clamp((lightmap.y-0.6)*5.0, 0.0,1.0);
|
||||
|
||||
vec3 reflectedVector = reflect(normalize(viewPos), normal);
|
||||
float normalDotEye = dot(normal, normalize(viewPos));
|
||||
|
||||
float normalDotEye = dot(normal, normalize(viewPos));
|
||||
float fresnel = pow(clamp(1.0 + normalDotEye, 0.0, 1.0),5.0);
|
||||
|
||||
#ifdef SNELLS_WINDOW
|
||||
@ -702,80 +638,90 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
|
||||
fresnel = mix(f0, 1.0, fresnel);
|
||||
|
||||
vec3 Metals = f0 > 229.5/255.0 ? normalize(Albedo+1e-7) * (dot(Albedo,vec3(0.21, 0.72, 0.07)) * 0.7 + 0.3) : vec3(1.0);
|
||||
|
||||
|
||||
// Sun, Sky, and screen-space reflections
|
||||
#ifdef OVERWORLD_SHADER
|
||||
#ifdef WATER_SUN_SPECULAR
|
||||
SunReflection = Direct_lighting * GGX(normal, -normalize(viewPos), WsunVec*mat3(gbufferModelViewInverse), max(roughness,0.035), f0) * Metals;
|
||||
SunReflection = Direct_lighting * GGX(normal, -normalize(viewPos), WsunVec*mat3(gbufferModelViewInverse), roughness, vec3(f0)) ;
|
||||
#endif
|
||||
#ifdef WATER_BACKGROUND_SPECULAR
|
||||
if(isEyeInWater == 0 && !isReflectiveEntity) BackgroundReflection = skyCloudsFromTex(mat3(gbufferModelViewInverse) * reflectedVector, colortex4).rgb / 30.0 * Metals;
|
||||
if(isEyeInWater == 0) SkyReflection = skyCloudsFromTex(mat3(gbufferModelViewInverse) * reflectedVector, colortex4).rgb / 30.0 ;
|
||||
#endif
|
||||
|
||||
if(isEyeInWater == 1 && isWater) BackgroundReflection.rgb = exp(-8.0 * vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B)) * clamp(WsunVec.y*lightCol.a,0,1);
|
||||
#else
|
||||
#ifdef WATER_BACKGROUND_SPECULAR
|
||||
if(isEyeInWater == 0) BackgroundReflection = skyCloudsFromTexLOD2(mat3(gbufferModelViewInverse) * reflectedVector, colortex4, 0).rgb / 30.0 * Metals;
|
||||
if(isEyeInWater == 0) SkyReflection = skyCloudsFromTexLOD2(mat3(gbufferModelViewInverse) * reflectedVector, colortex4, 0).rgb / 30.0 ;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef SCREENSPACE_REFLECTIONS
|
||||
vec3 rtPos = rayTrace(reflectedVector, viewPos.xyz, interleaved_gradientNoise_temporal(), fresnel, isEyeInWater == 1);
|
||||
if (rtPos.z < 1.){
|
||||
vec3 previousPosition = mat3(gbufferModelViewInverse) * toScreenSpace(rtPos) + gbufferModelViewInverse[3].xyz + cameraPosition-previousCameraPosition;
|
||||
previousPosition = mat3(gbufferPreviousModelView) * previousPosition + gbufferPreviousModelView[3].xyz;
|
||||
previousPosition.xy = projMAD(gbufferPreviousProjection, previousPosition).xy / -previousPosition.z * 0.5 + 0.5;
|
||||
if (previousPosition.x > 0.0 && previousPosition.y > 0.0 && previousPosition.x < 1.0 && previousPosition.x < 1.0) {
|
||||
Reflections.a = 1.0;
|
||||
Reflections.rgb = texture2D(colortex5,previousPosition.xy).rgb * Metals;
|
||||
if(iswater > 0.0){
|
||||
vec3 rtPos = rayTrace(reflectedVector, viewPos.xyz, interleaved_gradientNoise(), fresnel, isEyeInWater == 1);
|
||||
if (rtPos.z < 1.){
|
||||
vec3 previousPosition = mat3(gbufferModelViewInverse) * toScreenSpace(rtPos) + gbufferModelViewInverse[3].xyz + cameraPosition-previousCameraPosition;
|
||||
previousPosition = mat3(gbufferPreviousModelView) * previousPosition + gbufferPreviousModelView[3].xyz;
|
||||
previousPosition.xy = projMAD(gbufferPreviousProjection, previousPosition).xy / -previousPosition.z * 0.5 + 0.5;
|
||||
if (previousPosition.x > 0.0 && previousPosition.y > 0.0 && previousPosition.x < 1.0 && previousPosition.x < 1.0) {
|
||||
Reflections.a = 1.0;
|
||||
Reflections.rgb = texture2D(colortex5,previousPosition.xy).rgb ;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
if(isEyeInWater == 1 && iswater > 0.9){
|
||||
SkyReflection.rgb = exp(-8.0 * vec3(Water_Absorb_R, Water_Absorb_G, Water_Absorb_B)) * clamp(WsunVec.y*lightCol.a,0,1);
|
||||
}
|
||||
|
||||
// if(iswater > 0.9) SkyReflection.rgb = mix(vec3(CaveFogColor_R, CaveFogColor_G, CaveFogColor_B)*0.1, SkyReflection.rgb*indoors, clamp(pow(eyeBrightnessSmooth.y/240. + lightmap.y,2.0),0.0,1.0));
|
||||
#endif
|
||||
|
||||
float visibilityFactor = clamp(exp2((pow(roughness,3.0) / f0) * -4),0,1);
|
||||
|
||||
Reflections_Final = mix(mix(FinalColor, BackgroundReflection, indoors), Reflections.rgb, Reflections.a) * fresnel * visibilityFactor;
|
||||
Reflections_Final += SunReflection;
|
||||
#ifdef ENTITIES
|
||||
Reflections_Final = FinalColor;
|
||||
#else
|
||||
Reflections_Final = mix(SkyReflection*indoors, Reflections.rgb, Reflections.a);
|
||||
Reflections_Final = mix(FinalColor, Reflections_Final * Metals, fresnel);
|
||||
#endif
|
||||
|
||||
Reflections_Final += SunReflection * Metals;
|
||||
|
||||
//correct alpha channel with fresnel
|
||||
float alpha0 = gl_FragData[0].a;
|
||||
|
||||
gl_FragData[0].a = -gl_FragData[0].a * fresnel + gl_FragData[0].a + fresnel;
|
||||
|
||||
// prevent reflections from being darkened by buffer blending
|
||||
gl_FragData[0].rgb = clamp(FinalColor / gl_FragData[0].a*alpha0*(1.0-fresnel) * 0.1 + Reflections_Final / gl_FragData[0].a * 0.1,0.0,65100.0);
|
||||
|
||||
if (gl_FragData[0].r > 65000.) gl_FragData[0].rgba = vec4(0.0);
|
||||
// Reflections_Final += vec3(CaveFogColor_R, CaveFogColor_G, CaveFogColor_B)*0.1 * darkSpecularHighlight(feetPlayerPos, viewToWorld(normal), 0.9, 0.1);
|
||||
|
||||
gl_FragData[0].rgb = Reflections_Final ;
|
||||
|
||||
#ifndef ENTITIES
|
||||
//correct alpha channel with fresnel
|
||||
gl_FragData[0].a = mix(gl_FragData[0].a, 1.0, fresnel);
|
||||
#endif
|
||||
|
||||
|
||||
} else {
|
||||
gl_FragData[0].rgb = FinalColor*0.1;
|
||||
|
||||
gl_FragData[0].rgb = FinalColor;
|
||||
}
|
||||
|
||||
#else
|
||||
gl_FragData[0].rgb = FinalColor*0.1;
|
||||
gl_FragData[0].rgb = FinalColor;
|
||||
#endif
|
||||
|
||||
#if defined DISTANT_HORIZONS && defined DH_OVERDRAW_PREVENTION && !defined HAND
|
||||
bool WATER = texture2D(colortex7, gl_FragCoord.xy*texelSize).a > 0.0 && length(feetPlayerPos) > far-16*4 && texture2D(depthtex1, gl_FragCoord.xy*texelSize).x >= 1.0;
|
||||
// gl_FragData[0].rgb = vec3(1) * (texelFetch2D(depthtex0,ivec2(gl_FragCoord.xy),0).x - texelFetch2D(dhDepthTex1,ivec2(gl_FragCoord.xy),0).x);
|
||||
|
||||
if(WATER) gl_FragData[0].a = 0.0;
|
||||
|
||||
#if defined DISTANT_HORIZONS && defined DH_OVERDRAW_PREVENTION
|
||||
gl_FragData[0].a = mix(gl_FragData[0].a, 0.0, 1.0-min(max(1.0 - length(feetPlayerPos.xz)/max(far,0.0),0.0)*2.0,1.0) );
|
||||
#endif
|
||||
|
||||
#ifndef HAND
|
||||
gl_FragData[1] = vec4(Albedo, MATERIALS);
|
||||
gl_FragData[1] = vec4(Albedo, iswater);
|
||||
#endif
|
||||
|
||||
#if DEBUG_VIEW == debug_DH_WATER_BLENDING
|
||||
if(gl_FragCoord.x*texelSize.x < 0.47) gl_FragData[0] = vec4(0.0);
|
||||
#endif
|
||||
#if DEBUG_VIEW == debug_NORMALS
|
||||
gl_FragData[0].rgb = normal.xyz * 0.1 * vec3(0,0,1);
|
||||
#endif
|
||||
#if DEBUG_VIEW == debug_INDIRECT
|
||||
gl_FragData[0].rgb = Indirect_lighting* 0.1;
|
||||
#endif
|
||||
#if DEBUG_VIEW == debug_DIRECT
|
||||
gl_FragData[0].rgb = Direct_lighting * 0.1;
|
||||
#endif
|
||||
|
||||
gl_FragData[3].a = encodeVec2(lightmap);
|
||||
gl_FragData[3].a = lmtexcoord.w;
|
||||
}
|
||||
}
|
@ -16,9 +16,6 @@ Read the terms of modification and sharing before changing something below pleas
|
||||
varying vec4 lmtexcoord;
|
||||
varying vec4 color;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
flat varying float exposure;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
flat varying vec3 averageSkyCol_Clouds;
|
||||
flat varying vec4 lightCol;
|
||||
@ -38,6 +35,7 @@ flat varying int glass;
|
||||
attribute vec4 at_tangent;
|
||||
attribute vec4 mc_Entity;
|
||||
|
||||
uniform sampler2D colortex4;
|
||||
|
||||
uniform vec3 sunPosition;
|
||||
uniform float sunElevation;
|
||||
@ -75,6 +73,7 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
return vec4(projMAD(gl_ProjectionMatrix, viewSpacePosition),-viewSpacePosition.z);
|
||||
}
|
||||
|
||||
varying vec4 pos;
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@ -83,15 +82,14 @@ vec4 toClipSpace3(vec3 viewSpacePosition) {
|
||||
|
||||
void main() {
|
||||
|
||||
// lmtexcoord.xy = (gl_MultiTexCoord0).xy;
|
||||
lmtexcoord.xy = (gl_TextureMatrix[0] * gl_MultiTexCoord0).xy;
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 240.0;
|
||||
lmtexcoord.xy = (gl_MultiTexCoord0).xy;
|
||||
vec2 lmcoord = gl_MultiTexCoord1.xy / 240.0; // is this even correct? lol
|
||||
lmtexcoord.zw = lmcoord;
|
||||
|
||||
vec3 position = mat3(gl_ModelViewMatrix) * vec3(gl_Vertex) + gl_ModelViewMatrix[3].xyz;
|
||||
|
||||
gl_Position = toClipSpace3(position);
|
||||
|
||||
pos = vec4(position,1);
|
||||
|
||||
HELD_ITEM_BRIGHTNESS = 0.0;
|
||||
|
||||
@ -99,28 +97,21 @@ void main() {
|
||||
if(heldItemId == ITEM_LIGHT_SOURCES || heldItemId2 == ITEM_LIGHT_SOURCES) HELD_ITEM_BRIGHTNESS = 0.9;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// 1.0 = water mask
|
||||
// 0.9 = entity mask
|
||||
// 0.8 = reflective entities
|
||||
// 0.7 = reflective blocks
|
||||
float mat = 0.0;
|
||||
|
||||
// water mask
|
||||
|
||||
if(mc_Entity.x == 8.0) {
|
||||
mat = 1.0;
|
||||
|
||||
gl_Position.z -= 1e-4;
|
||||
}
|
||||
|
||||
// translucent entities
|
||||
if (mc_Entity.x >= 200 && mc_Entity.x < 300) mat = 0.2;
|
||||
if (mc_Entity.x == 72) mat = 0.5;
|
||||
|
||||
#if defined ENTITIES || defined BLOCKENTITIES
|
||||
mat = 0.9;
|
||||
if (entityId == 1403) mat = 0.8;
|
||||
mat = 0.1;
|
||||
#endif
|
||||
|
||||
// translucent blocks
|
||||
if (mc_Entity.x >= 301 && mc_Entity.x <= 321) mat = 0.7;
|
||||
|
||||
tangent = vec4(normalize(gl_NormalMatrix *at_tangent.rgb),at_tangent.w);
|
||||
|
||||
@ -141,7 +132,6 @@ void main() {
|
||||
|
||||
|
||||
color = vec4(gl_Color.rgb, 1.0);
|
||||
exposure = texelFetch2D(colortex4,ivec2(10,37),0).r;
|
||||
|
||||
#ifdef OVERWORLD_SHADER
|
||||
lightCol.rgb = texelFetch2D(colortex4,ivec2(6,37),0).rgb;
|
||||
@ -153,6 +143,8 @@ void main() {
|
||||
// WsunVec = normalize(LightDir);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef TAA_UPSCALING
|
||||
gl_Position.xy = gl_Position.xy * RENDER_SCALE + RENDER_SCALE * gl_Position.w - gl_Position.w;
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -9,18 +9,12 @@ entity.1301= item_frame item_display
|
||||
entity.1302= spectral_arrow bigglobe:torch_arrow
|
||||
entity.1303= tnt firework_rocket
|
||||
|
||||
################################################
|
||||
###### SUB-SURFACE SCATTERING
|
||||
################################################
|
||||
######
|
||||
###### all the different strengths of subsurface scattering and what entities to put them on.
|
||||
######
|
||||
|
||||
## medium sss (same as strong sss for blocks)
|
||||
entity.1401 = giant ghast elder_guardian
|
||||
entity.1401= slime giant ghast elder_guardian
|
||||
|
||||
## weak sss (same as weak sss for blocks)
|
||||
entity.1402 = furnace_minecart player sheep frog chicken iron_golem snow_golem polar_bear zombie_horse armor_stand arrow squid bat cat cod cow donkey fox horse mooshroom mule ocelot parrot pig piglin polar_bear pufferfish rabbit salmon strider tropical_fish turtle villager wandering_trader bee cave_spider dolphin enderman llama panda spider wolf zombified_piglin blaze creeper drowned endermite evoker guardian hoglin husk magma_cube phantom piglin_brute pillager ravager silverfish stray vex vindicator witch zoglin zombie zombie_villager trader_llama
|
||||
|
||||
################################################
|
||||
###### REFLECTIVE TRANSLUCENTS
|
||||
################################################
|
||||
|
||||
entity.1403 = slime
|
||||
entity.1402= sheep frog chicken snow_golem polar_bear zombie_horse armor_stand arrow squid bat cat cod cow donkey fox horse mooshroom mule ocelot parrot pig piglin polar_bear pufferfish rabbit salmon strider tropical_fish turtle villager wandering_trader bee cave_spider dolphin enderman llama panda spider wolf zombified_piglin blaze creeper drowned endermite evoker guardian hoglin husk magma_cube phantom piglin_brute pillager ravager silverfish stray vex vindicator witch zoglin zombie zombie_villager trader_llama
|
||||
|
@ -1 +1 @@
|
||||
item.1000 = glow_berries soul_lantern soul_torch conduit beacon sea_pickle sea_lantern glowstone torch redstone_torch jack_o_lantern magma_block lantern shroomlight end_rod lava_bucket conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:conquest:iron_candelabrum_1 conquest:conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light
|
||||
item.1000= glow_berries soul_lantern soul_torch conduit beacon sea_pickle sea_lantern glowstone torch redstone_torch jack_o_lantern magma_block lantern shroomlight end_rod lava_bucket conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:conquest:iron_candelabrum_1 conquest:conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light
|
||||
|
@ -26,13 +26,10 @@ screen.Waving_Stuff = Waving Stuff
|
||||
|
||||
screen.Direct_Light = Direct Light
|
||||
screen.Shadows = Shadows
|
||||
option.TRANSLUCENT_COLORED_SHADOWS = Colored Shadows
|
||||
option.SCREENSPACE_CONTACT_SHADOWS = Screen-space Shadows
|
||||
option.SCREENSPACE_CONTACT_SHADOWS = Contact Shadows
|
||||
option.RENDER_ENTITY_SHADOWS = Shadows for Entities
|
||||
option.shadowMapResolution = Shadow Resolution
|
||||
option.shadowDistance = Shadow Distance
|
||||
value.shadowDistance.32.0 = 2 Chunks
|
||||
value.shadowDistance.48.0 = 3 Chunks
|
||||
value.shadowDistance.64.0 = 4 Chunks
|
||||
value.shadowDistance.80.0 = 5 Chunks
|
||||
value.shadowDistance.96.0 = 6 Chunks
|
||||
@ -54,34 +51,18 @@ screen.Direct_Light = Direct Light
|
||||
value.shadowDistance.352.0 = 22 Chunks
|
||||
value.shadowDistance.368.0 = 23 Chunks
|
||||
value.shadowDistance.384.0 = 24 Chunks
|
||||
value.shadowDistance.400.0 = 25 Chunks
|
||||
value.shadowDistance.416.0 = 26 Chunks
|
||||
value.shadowDistance.432.0 = 27 Chunks
|
||||
value.shadowDistance.448.0 = 28 Chunks
|
||||
value.shadowDistance.464.0 = 29 Chunks
|
||||
value.shadowDistance.480.0 = 30 Chunks
|
||||
value.shadowDistance.496.0 = 31 Chunks
|
||||
value.shadowDistance.512.0 = 32 Chunks
|
||||
value.shadowDistance.768.0 = 48 Chunks
|
||||
value.shadowDistance.1024.0 = 64 Chunks
|
||||
value.shadowDistance.1536.0 = 96 Chunks
|
||||
value.shadowDistance.2048.0 = 128 Chunks
|
||||
value.shadowDistance.4096.0 = 256 Chunks
|
||||
value.shadowDistance.8192.0 = 512 Chunks
|
||||
|
||||
option.OPTIMIZED_SHADOW_DISTANCE = Max Shadow Bounds
|
||||
value.OPTIMIZED_SHADOW_DISTANCE.-1.0 = Un-Optimized
|
||||
value.OPTIMIZED_SHADOW_DISTANCE.1.0 = Optimized
|
||||
option.shadowDistanceRenderMul = Max Shadow Bounds
|
||||
value.shadowDistanceRenderMul.-1.0 = Un-Optimized
|
||||
value.shadowDistanceRenderMul.1.0 = Optimized
|
||||
option.entityShadowDistanceMul = Entity Shadow Distance
|
||||
value.entityShadowDistanceMul.0.01 = 1% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.02 = 2% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.03 = 3% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.04 = 4% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.05 = 5% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.10 = 10% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.15 = 15% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.20 = 20% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.25 = 25% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.30 = 30% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.35 = 35% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.40 = 40% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.45 = 45% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.50 = 50% of Shadow Distance
|
||||
value.entityShadowDistanceMul.0.75 = 75% of Shadow Distance
|
||||
value.entityShadowDistanceMul.1.00 = 100% of Shadow Distance
|
||||
|
||||
screen.Filtering = Shadow Filtering Settings
|
||||
option.SHADOW_FILTER_SAMPLE_COUNT = Basic Shadow Filter Samples
|
||||
@ -90,7 +71,7 @@ screen.Direct_Light = Direct Light
|
||||
option.VPS_Search_Samples = VPS Filter Samples
|
||||
option.Max_Shadow_Filter_Radius = Maximum Shadow Filter Radius
|
||||
option.Max_Filter_Depth = Sun Size Factor
|
||||
|
||||
|
||||
screen.LPV = FloodFill
|
||||
option.LPV_ENABLED = Enabled
|
||||
option.LPV_SIZE = Size
|
||||
@ -102,6 +83,7 @@ screen.Direct_Light = Direct Light
|
||||
option.LPV_REDSTONE_LIGHTS = Redstone Lights
|
||||
option.LPV_COLORED_CANDLES = Colored Candles
|
||||
|
||||
|
||||
screen.Subsurface_Scattering = Sub-Surface Scattering
|
||||
option.LabSSS_Curve = LabSSS Curve
|
||||
option.MISC_BLOCK_SSS = SSS for random blocks
|
||||
@ -508,11 +490,11 @@ option.moon_illuminance.comment = Configure the brightness of the moon
|
||||
screen.Direct_Light.comment = Configure settings related to the sun and shadows.
|
||||
|
||||
screen.Shadows.comment = Configure the shadows from the sun to your liking.
|
||||
option.SCREENSPACE_CONTACT_SHADOWS.comment = §bWhat is this?§r These are shadows for things that are far away, and on small details nearby. §aPERFORMANCE COST:§r low to medium; it is more expensive at higher resolutions.
|
||||
option.SCREENSPACE_CONTACT_SHADOWS.comment = Screen-space contact shadows. §bWhat is this?§r These are small shadows for things that are far away, and on small details nearby. §aPERFORMANCE COST:§r low to medium; it is more expensive at higher resolutions.
|
||||
option.RENDER_ENTITY_SHADOWS.comment = §bWhat is this?§r Shadows on all types of entities, like mobs, chests, banners, or signs. §aPERFORMANCE COST:§r low to high; it is very expensive when there are many entities nearby.
|
||||
option.shadowMapResolution.comment = The quality of shadows from the sun casted by things in the world. §aPERFORMANCE COST:§r medium to very high; Shadows must render the 3D world a second time from the perspective of the sun, this is why it cuts performance in half.
|
||||
option.shadowDistance.comment = The maximum distance the shadowmap can render. The distance is not measured linearly in chunks when set to un-optimized. §aPERFORMANCE COST:§r medium to very high; If the chunk render distance is high, the shadows will become more expensive.
|
||||
option.OPTIMIZED_SHADOW_DISTANCE.comment = Render the shadows only in a sphere around you, limited to a max distance in chunks. Un-optimized does not render the shadows in a sphere and is not locked to chunks; it can cover alot more area with the same distance settings. The distance is not measured in chunks when set to un-optimized. §aPERFORMANCE COST:§r low to medium. Optimized is faster, and unoptimized is slower.
|
||||
option.shadowDistanceRenderMul.comment = Render the shadows only in a sphere around you, limited to a max distance in chunks. Un-optimized does not render the shadows in a sphere and is not locked to chunks; it can cover alot more area with the same distance settings. The distance is not measured in chunks when set to un-optimized. §aPERFORMANCE COST:§r low to medium. Optimized is faster, and unoptimized is slower.
|
||||
screen.Filtering.comment = Configure the filtering effects applied to the shadows.
|
||||
option.SHADOW_FILTER_SAMPLE_COUNT.comment = The quality of the basic shadow filter. This filter just softens the shadows. §aPERFORMANCE COST:§r low to medium; Increasing this should reduce some noise at the edge of shadows.
|
||||
option.Min_Shadow_Filter_Radius.comment = The maximum softness of the basic shadow filter.
|
||||
@ -692,6 +674,4 @@ value.DH_KNOWN_ISSUES.1 = §a GTAO, RTAO, and SSGI break on LODs - DH support un
|
||||
option.DISTANT_HORIZONS_SHADOWMAP = §c(DO NOT USE IF YOU DO NOT KNOW WHAT THIS IS)§r DH shadowmap support
|
||||
option.DISTANT_HORIZONS_SHADOWMAP.comment = §cTHIS SETTING WILL DESTROY PERFORMANCE THIS WILL MAKE SHADOWS LOOK BLOCKY, FLICKERY, AND LOW DETAIL§r. set shadow distance to 32 chunks (or more). set shadow resolution to 4096 (or more)
|
||||
option.TOGGLE_VL_FOG = Toggle Volumetric Fog
|
||||
option.TOGGLE_VL_FOG.comment = one big button to just turn all the fog off.
|
||||
|
||||
option.TRANSLUCENT_COLORED_SHADOWS.comment = §bWhat is this?§r This effect allows translucent things like stained glass to color the sunlight as it passes through the it. §aPERFORMANCE COST:§r medium
|
||||
option.TOGGLE_VL_FOG.comment = one big button to just turn all the fog off.
|
@ -3,41 +3,32 @@ vec3 DoAmbientLightColor(
|
||||
vec3 SkyColor,
|
||||
vec3 MinimumColor,
|
||||
vec3 TorchColor,
|
||||
vec2 Lightmap,
|
||||
float Exposure
|
||||
vec2 Lightmap
|
||||
){
|
||||
// Lightmap = vec2(0.0,1.0);
|
||||
|
||||
float LightLevelZero = clamp(pow(eyeBrightnessSmooth.y/240. + Lightmap.y,2.0) ,0.0,1.0);
|
||||
|
||||
// do sky lighting.
|
||||
float skyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
||||
vec3 MinimumLight = MinimumColor * (MIN_LIGHT_AMOUNT*0.01 + nightVision);
|
||||
vec3 IndirectLight = max(SkyColor * ambient_brightness * skyLM * 0.7, MinimumLight);
|
||||
|
||||
// do torch lighting
|
||||
float TorchLM = pow(1.0-sqrt(1.0-clamp(Lightmap.x,0.0,1.0)),2.0) * 2.0;
|
||||
float TorchBrightness_autoAdjust = mix(1.0, 30.0, clamp(exp(-10.0*Exposure),0.0,1.0)) ;
|
||||
vec3 TorchLight = TorchColor * TorchLM * TORCH_AMOUNT ;
|
||||
|
||||
vec3 IndirectLight = max(SkyColor * ambient_brightness * skyLM, MinimumLight);
|
||||
|
||||
// do torch lighting.
|
||||
// float TorchLM = 10.0 - ( 1.0 / (pow(exp(-0.5*inversesqrt(Lightmap.x)),5.0)+0.1));
|
||||
// TorchLM = pow(TorchLM/4,10) + pow(Lightmap.x,1.5)*0.5;
|
||||
|
||||
float TorchLM = pow(Lightmap.x,10.0)*5.0 + pow(Lightmap.x,1.5);
|
||||
vec3 TorchLight = TorchColor * TORCH_AMOUNT * TorchLM * (1.0 + LightLevelZero*dot(SkyColor * ambient_brightness,vec3(0.3333)));
|
||||
|
||||
#if defined IS_LPV_ENABLED && defined MC_GL_EXT_shader_image_load_store
|
||||
vec4 lpvSample = SampleLpvLinear(lpvPos);
|
||||
vec3 LpvTorchLight = GetLpvBlockLight(lpvSample);
|
||||
|
||||
// TODO: needs work, just binary transition for now
|
||||
// float LpvFadeF = clamp(lpvPos, vec3(0.0), LpvSize3 - 1.0) == lpvPos ? 1.0 : 0.0;
|
||||
|
||||
// i gotchu
|
||||
float fadeLength = 10.0; // in blocks
|
||||
vec3 cubicRadius = clamp( min(((LpvSize3-1.0) - lpvPos)/fadeLength, lpvPos/fadeLength) ,0.0,1.0);
|
||||
float LpvFadeF = cubicRadius.x*cubicRadius.y*cubicRadius.z;
|
||||
|
||||
LpvFadeF = 1.0 - pow(1.0-pow(LpvFadeF,1.5),3.0); // make it nice and soft :)
|
||||
|
||||
TorchLight = mix(TorchLight,LpvTorchLight/5.0, LpvFadeF) ;
|
||||
float LpvFadeF = clamp(lpvPos, vec3(0.0), LpvSize3 - 1.0) == lpvPos ? 1.0 : 0.0;
|
||||
TorchLight = mix(TorchLight, LpvTorchLight, LpvFadeF);
|
||||
#endif
|
||||
|
||||
return IndirectLight + TorchLight * TorchBrightness_autoAdjust;
|
||||
return IndirectLight + TorchLight;
|
||||
}
|
||||
|
||||
vec4 RT_AmbientLight(
|
||||
|
@ -27,24 +27,22 @@ iris.features.optional = ENTITY_TRANSLUCENT REVERSED_CULLING COMPUTE_SHADERS CUS
|
||||
#ifndef RENDER_ENTITY_SHADOWS
|
||||
shadowBlockEntities = false
|
||||
shadowEntities = false
|
||||
shadowPlayer = true
|
||||
#endif
|
||||
|
||||
#if defined TRANSLUCENT_ENTITIES && defined IS_IRIS
|
||||
separateEntityDraws = true
|
||||
|
||||
#ifdef TRANSLUCENT_ENTITIES
|
||||
separateEntityDraws = true
|
||||
program.gbuffers_entities_translucent.enabled = true
|
||||
program.gbuffers_block_translucent.enabled = true
|
||||
|
||||
blend.gbuffers_entities_translucent = off
|
||||
blend.gbuffers_block_translucent = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
#else
|
||||
separateEntityDraws = true
|
||||
separateEntityDraws = false
|
||||
program.gbuffers_entities_translucent.enabled = IS_IRIS
|
||||
program.gbuffers_block_translucent.enabled = IS_IRIS
|
||||
#endif
|
||||
|
||||
program.world0/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world0/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world-1/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world-1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world1/gbuffers_entities_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
program.world1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
|
||||
|
||||
#if defined DISTANT_HORIZONS && defined IS_IRIS
|
||||
|
||||
#if defined DISTANT_HORIZONS_SHADOWMAP
|
||||
@ -53,15 +51,15 @@ program.world1/gbuffers_block_translucent.enabled = TRANSLUCENT_ENTITIES
|
||||
dhShadow.enabled = false
|
||||
#endif
|
||||
|
||||
program.world0/dh_terrain.enabled = true
|
||||
program.world0/dh_water.enabled = true
|
||||
program.dh_terrain.enabled = true
|
||||
program.dh_water.enabled = true
|
||||
|
||||
blend.dh_terrain = off
|
||||
blend.dh_water = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
#else
|
||||
dhShadow.enabled = false
|
||||
program.world0/dh_terrain.enabled = false
|
||||
program.world0/dh_water.enabled = false
|
||||
program.dh_terrain.enabled = false
|
||||
program.dh_water.enabled = false
|
||||
#endif
|
||||
|
||||
program.composite5.enabled = TAA_UPSCALING
|
||||
@ -71,46 +69,42 @@ program.composite5.enabled = TAA_UPSCALING
|
||||
#Get the correct alpha value : S_A*(1-DST_A)+DST_A
|
||||
|
||||
# terrible blending for shadows on purpose
|
||||
blend.shadow = SRC_COLOR ZERO ONE ZERO
|
||||
blend.gbuffers_water = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_armor_glint = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_hand_water = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_textured = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_textured_lit = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_spidereyes = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_basic = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_weather = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_block_translucent = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_beaconbeam = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
blend.gbuffers_entities_translucent = SRC_ALPHA ZERO ONE ZERO
|
||||
blend.gbuffers_spidereyes = ONE ONE ONE ONE
|
||||
blend.gbuffers_armor_glint = ONE ONE ONE ZERO
|
||||
blend.gbuffers_skytextured = ONE ONE ONE ZERO
|
||||
blend.shadow = SRC_COLOR ZERO ONE ZERO
|
||||
blend.gbuffers_damagedblock = SRC_ALPHA ONE_MINUS_SRC_ALPHA ONE_MINUS_DST_ALPHA ONE
|
||||
|
||||
# Disable blending
|
||||
blend.gbuffers_terrain = off
|
||||
blend.gbuffers_hand = off
|
||||
blend.gbuffers_block = off
|
||||
blend.gbuffers_entities = off
|
||||
blend.gbuffers_damagedblock = off
|
||||
|
||||
# this is important for refraction and glass tint to work correctly
|
||||
blend.gbuffers_beaconbeam = off
|
||||
blend.gbuffers_water.colortex11 = off
|
||||
blend.gbuffers_hand_water.colortex11 = off
|
||||
blend.gbuffers_entities_translucent.colortex11 = off
|
||||
|
||||
blend.composite.colortex12 = off
|
||||
blend.composite.colortex13 = off
|
||||
blend.composite.colortex14 = off
|
||||
|
||||
|
||||
# Alpha test
|
||||
alphaTest.gbuffers_terrain = GREATER 0.1
|
||||
alphaTest.shadow = GREATER 0.1
|
||||
alphaTest.gbuffers_entities = GREATER 0.1
|
||||
alphaTest.gbuffers_hand = GREATER 0.1
|
||||
alphaTest.gbuffers_weather = false
|
||||
alphaTest.gbuffers_water = false
|
||||
alphaTest.gbuffers_skybasic = false
|
||||
alphaTest.gbuffers_skytextured = false
|
||||
|
||||
alphaTest.gbuffers_armor_glint=false
|
||||
alphaTest.gbuffers_weather=false
|
||||
alphaTest.gbuffers_water=false
|
||||
alphaTest.gbuffers_skybasic=false
|
||||
alphaTest.gbuffers_skytextured=false
|
||||
|
||||
|
||||
sliders = sss_density_multiplier sss_absorbance_multiplier MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DAY3_l0_coverage DAY3_l0_density DAY3_l1_coverage DAY3_l1_density DAY3_l2_coverage DAY3_l2_density DAY3_ufog_density DAY3_cfog_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 DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE CONTRAST EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL
|
||||
sliders = MOTION_AMOUNT TONEMAP WATER_WAVE_SPEED WATER_CAUSTICS_BRIGHTNESS DAY3_l0_coverage DAY3_l0_density DAY3_l1_coverage DAY3_l1_density DAY3_l2_coverage DAY3_l2_density DAY3_ufog_density DAY3_cfog_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 DEBUG_VIEW entityShadowDistanceMul HANDHELD_LIGHT_RANGE CLOUD_SHADOW_STRENGTH CloudLayer0_coverage CloudLayer0_density CloudLayer0_height CloudLayer1_coverage CloudLayer1_density CloudLayer1_height CloudLayer2_coverage CloudLayer2_density CloudLayer2_height PLANET_GROUND_BRIGHTNESS FOG_START_HEIGHT WATER_WAVE_STRENGTH SWAMP_UNIFORM_DENSITY SWAMP_CLOUDY_DENSITY SWAMP_R SWAMP_G SWAMP_B JUNGLE_UNIFORM_DENSITY JUNGLE_CLOUDY_DENSITY JUNGLE_R JUNGLE_G JUNGLE_B DARKFOREST_UNIFORM_DENSITY DARKFOREST_CLOUDY_DENSITY DARKFOREST_R DARKFOREST_G DARKFOREST_B NETHER_PLUME_DENSITY END_STORM_DENSTIY LIT_PARTICLE_BRIGHTNESS UPPER_CURVE LOWER_CURVE CONTRAST EMISSIVE_TYPE SCALE_FACTOR ambientsss_brightness SSS_TYPE Cloud_Speed ORB_ColMult ORB_X ORB_Y ORB_Z ORB_R ORB_G ORB_B TOD_Fog_mult Morning_Uniform_Fog Noon_Uniform_Fog Evening_Uniform_Fog Night_Uniform_Fog Morning_Cloudy_Fog Noon_Cloudy_Fog Evening_Cloudy_Fog Night_Cloudy_Fog Summer_Leaf_R Summer_Leaf_G Summer_Leaf_B Fall_Leaf_R Fall_Leaf_G Fall_Leaf_B Winter_Leaf_R Winter_Leaf_G Winter_Leaf_B Spring_Leaf_R Spring_Leaf_G Spring_Leaf_B Summer_R Summer_G Summer_B Fall_R Fall_G Fall_B Winter_R Winter_G Winter_B Spring_R Spring_G Spring_B Season_Length CaveFogFallOff CaveFogColor_R CaveFogColor_G CaveFogColor_B indirect_effect GI_Strength ambient_brightness AmbientLight_R AmbientLight_G AmbientLight_B Rain_coverage Moon_temp Haze_amount RainFog_amount Sun_temp Puddle_Size LabSSS_Curve Emissive_Curve Emissive_Brightness AO_Strength BLOOMY_FOG WAVY_SPEED WAVY_STRENGTH BLOOM_STRENGTH shadowDistance Sky_Brightness fog_coefficientMieR fog_coefficientMieG fog_coefficientMieB sun_illuminance sunColorG sunColorB sunColorR sky_mieg sky_coefficientMieB sky_coefficientMieG sky_coefficientMieR sky_coefficientRayleighB sky_coefficientRayleighG sky_coefficientRayleighR CLOUDS_QUALITY EXPOSURE_MULTIPLIER MIN_LIGHT_AMOUNT TORCH_R TORCH_G TORCH_B TORCH_AMOUNT shadowMapResolution sunPathRotation BLEND_FACTOR VL_SAMPLES Exposure_Speed POM_DEPTH MAX_ITERATIONS MAX_DIST SSR_STEPS ambientOcclusionLevel SEA_LEVEL moon_illuminance moonColorR moonColorG moonColorB fog_coefficientRayleighR fog_coefficientRayleighG SATURATION Manual_exposure_value focal aperture MANUAL_FOCUS SHADOW_FILTER_SAMPLE_COUNT Max_Filter_Depth VPS_Search_Samples Min_Shadow_Filter_Radius Max_Shadow_Filter_Radius Water_Top_Layer fog_coefficientRayleighB SHARPENING rayMarchSampleCount Dirt_Amount Dirt_Scatter_R Dirt_Scatter_G Dirt_Scatter_B Dirt_Absorb_R Dirt_Absorb_G Dirt_Absorb_B Water_Absorb_R Water_Absorb_G Water_Absorb_B Purkinje_strength Purkinje_strength Purkinje_R Purkinje_G Purkinje_B Texture_MipMap_Bias DoF_Adaptation_Speed Purkinje_Multiplier CROSSTALK VL_RENDER_RESOLUTION BLOOM_QUALITY VL_RENDER_RESOLUTION RAY_COUNT STEPS STEP_LENGTH cloud_LevelOfDetail cloud_ShadowLevelOfDetail cloud_LevelOfDetailLQ cloud_ShadowLevelOfDetailLQ minRayMarchSteps maxRayMarchSteps minRayMarchStepsLQ maxRayMarchStepsLQ fbmAmount fbmPower1 fbmPower2 Roughness_Threshold Sun_specular_Strength reflection_quality DOF_QUALITY DOF_ANAMORPHIC_RATIO AEROCHROME_PINKNESS DOF_JITTER_FOCUS JITTER_STRENGTH SHADOWS_GRADE_R MIDS_GRADE_R HIGHLIGHTS_GRADE_R SHADOWS_GRADE_G MIDS_GRADE_G HIGHLIGHTS_GRADE_G SHADOWS_GRADE_B MIDS_GRADE_B HIGHLIGHTS_GRADE_B SHADOWS_GRADE_MUL MIDS_GRADE_MUL HIGHLIGHTS_GRADE_MUL
|
||||
|
||||
screen.columns=2
|
||||
screen = \
|
||||
@ -132,13 +126,13 @@ BLISS_SHADERS <empty> \
|
||||
######## LIGHTING
|
||||
### DIRECT LIGHT
|
||||
screen.Direct_Light.columns=1
|
||||
screen.Direct_Light = [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] OLD_LIGHTLEAK_FIX sunPathRotation sun_illuminance MOONPHASE_BASED_MOONLIGHT moon_illuminance
|
||||
screen.Direct_Light = TRANSLUCENT_COLORED_SHADOWS [Shadows] [Subsurface_Scattering] [Sun_and_Moon_Colors] OLD_LIGHTLEAK_FIX sunPathRotation sun_illuminance MOONPHASE_BASED_MOONLIGHT moon_illuminance [LPV]
|
||||
|
||||
screen.Shadows.columns=1
|
||||
screen.Shadows = TRANSLUCENT_COLORED_SHADOWS SCREENSPACE_CONTACT_SHADOWS RENDER_ENTITY_SHADOWS entityShadowDistanceMul <empty> [Filtering] shadowMapResolution shadowDistance OPTIMIZED_SHADOW_DISTANCE
|
||||
screen.Shadows = SCREENSPACE_CONTACT_SHADOWS RENDER_ENTITY_SHADOWS entityShadowDistanceMul <empty> [Filtering] shadowMapResolution shadowDistance shadowDistanceRenderMul
|
||||
|
||||
screen.Subsurface_Scattering.columns=1
|
||||
screen.Subsurface_Scattering = SSS_TYPE sss_density_multiplier sss_absorbance_multiplier LabSSS_Curve <empty> MISC_BLOCK_SSS MOB_SSS <empty> Ambient_SSS ambientsss_brightness
|
||||
screen.Subsurface_Scattering = SSS_TYPE LabSSS_Curve <empty> MISC_BLOCK_SSS MOB_SSS <empty> Ambient_SSS ambientsss_brightness
|
||||
|
||||
screen.Filtering.columns=1
|
||||
screen.Filtering = BASIC_SHADOW_FILTER SHADOW_FILTER_SAMPLE_COUNT Min_Shadow_Filter_Radius <empty> Variable_Penumbra_Shadows VPS_Search_Samples Max_Shadow_Filter_Radius Max_Filter_Depth
|
||||
@ -148,7 +142,7 @@ BLISS_SHADERS <empty> \
|
||||
|
||||
### AMBIENT LIGHT
|
||||
screen.Ambient_light.columns=1
|
||||
screen.Ambient_light = [LPV] [Torch_Colors] [Ambient_Colors] \
|
||||
screen.Ambient_light = [Torch_Colors] [Ambient_Colors] \
|
||||
MIN_LIGHT_AMOUNT indirect_effect \
|
||||
<empty> <empty> \
|
||||
AO_Strength GI_Strength \
|
||||
@ -175,6 +169,7 @@ BLISS_SHADERS <empty> \
|
||||
### FloodFill
|
||||
screen.LPV.columns = 1
|
||||
screen.LPV = LPV_ENABLED LPV_SIZE LPV_NORMAL_OFFSET LPV_ENTITY_LIGHTS LPV_REDSTONE_LIGHTS LPV_COLORED_CANDLES
|
||||
|
||||
######## WORLD
|
||||
screen.World.columns=1
|
||||
screen.World = [Water] [Waving_Stuff] [LabPBR] SKY_GROUND RESOURCEPACK_SKY <empty> AEROCHROME_MODE AEROCHROME_PINKNESS AEROCHROME_WOOL_ENABLED
|
||||
@ -320,7 +315,7 @@ BLISS_SHADERS <empty> \
|
||||
|
||||
|
||||
######## MISC SETTINGS
|
||||
screen.Misc_Settings = DEBUG_VIEW [the_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH LIT_PARTICLE_BRIGHTNESS PLANET_GROUND_BRIGHTNESS BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER CLOUDS_INFRONT_OF_WORLD SELECT_BOX DENOISE_SSS_AND_SSAO WATER_CAUSTICS_BRIGHTNESS HYPER_DETAILED_WAVES OLD_BLOOM
|
||||
screen.Misc_Settings = DEBUG_VIEW [the_orb] display_LUT WhiteWorld SSS_view ambientLight_only LIGHTNING_FLASH LIT_PARTICLE_BRIGHTNESS PLANET_GROUND_BRIGHTNESS BLOOMY_PARTICLES ORIGINAL_CHOCAPIC_SKY BIOME_TINT_WATER CLOUDS_INFRONT_OF_WORLD SELECT_BOX DENOISE_SSS_AND_SSAO WATER_CAUSTICS_BRIGHTNESS HYPER_DETAILED_WAVES
|
||||
|
||||
screen.the_orb.columns = 1
|
||||
screen.the_orb = THE_ORB ORB_X ORB_Y ORB_Z ORB_ColMult ORB_R ORB_G ORB_B
|
||||
@ -363,19 +358,36 @@ BLISS_SHADERS <empty> \
|
||||
|
||||
######## weather profiles.
|
||||
|
||||
variable.int.maxDays = 2
|
||||
variable.int.DayCounter = worldDay - maxDays * floor(worldDay / maxDays)
|
||||
|
||||
# in seconds...
|
||||
variable.int.WeatherTransitionTime = 1
|
||||
|
||||
variable.float.LAYER0_coverage = smooth(if( \
|
||||
DayCounter == 0, 0.5, \
|
||||
1.3 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
variable.float.LAYER0_denisty = smooth(if( \
|
||||
DayCounter == 0, 0.5, \
|
||||
0.5 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
|
||||
uniform.vec2.LAYER0_params = vec2(LAYER0_coverage, LAYER0_denisty)
|
||||
|
||||
uniform.float.EXAMPLE = smooth(if(DayCounter == 0, 5.0, 0.0 ), 5, 5)
|
||||
|
||||
|
||||
uniform.float.Cumulus_Cov = smooth(if( \
|
||||
moonPhase == 0, 5.0, \
|
||||
moonPhase == 1, 0.0, \
|
||||
moonPhase == 2, 0.0, \
|
||||
moonPhase == 3, 0.0, \
|
||||
moonPhase == 4, 0.0, \
|
||||
moonPhase == 5, 0.0, \
|
||||
moonPhase == 6, 0.0, \
|
||||
moonPhase == 7, 0.0, \
|
||||
moonPhase == 9, 0.0, \
|
||||
DayCounter == 0, 5.0, \
|
||||
DayCounter == 1, 0.0, \
|
||||
DayCounter == 2, 0.0, \
|
||||
DayCounter == 3, 0.0, \
|
||||
DayCounter == 4, 0.0, \
|
||||
DayCounter == 5, 0.0, \
|
||||
DayCounter == 6, 0.0, \
|
||||
DayCounter == 7, 0.0, \
|
||||
DayCounter == 9, 0.0, \
|
||||
0.0 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
uniform.float.Alto_Cov = smooth(if( \
|
||||
@ -398,6 +410,45 @@ uniform.float.Alto_Den = smooth(if( \
|
||||
moonPhase == 6, 0.05, \
|
||||
0.0 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# uniform.float.Cumulus_Cov = smooth(if( \
|
||||
# moonPhase == 0, 0.7, \
|
||||
# moonPhase == 1, 0.9, \
|
||||
# moonPhase == 2, 0.0, \
|
||||
# moonPhase == 3, 0.8, \
|
||||
# moonPhase == 4, 0.0, \
|
||||
# moonPhase == 5, 1.2, \
|
||||
# moonPhase == 6, 0.6, \
|
||||
# 0.0 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
# uniform.float.Alto_Cov = smooth(if( \
|
||||
# moonPhase == 0, 0.1, \
|
||||
# moonPhase == 1, 1.0, \
|
||||
# moonPhase == 2, 1.0, \
|
||||
# moonPhase == 3, 0.3, \
|
||||
# moonPhase == 4, 0.3, \
|
||||
# moonPhase == 5, 0.0, \
|
||||
# moonPhase == 6, 1.5, \
|
||||
# 0.0 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
# uniform.float.Alto_Den = smooth(if( \
|
||||
# moonPhase == 0, 0.1, \
|
||||
# moonPhase == 1, 0.25, \
|
||||
# moonPhase == 2, 0.1, \
|
||||
# moonPhase == 3, 0.7, \
|
||||
# moonPhase == 4, 0.7, \
|
||||
# moonPhase == 5, 0.0, \
|
||||
# moonPhase == 6, 0.05, \
|
||||
# 0.0 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
|
||||
uniform.float.Uniform_Den = smooth(if( \
|
||||
moonPhase == 0, 0, \
|
||||
moonPhase == 1, 0, \
|
||||
@ -418,6 +469,10 @@ uniform.float.Cloudy_Den = smooth(if( \
|
||||
moonPhase == 6, 50, \
|
||||
0 ), WeatherTransitionTime, WeatherTransitionTime)
|
||||
|
||||
# uniform.float.ifEndBoss = smooth(if(bossBattle == 2, 1, 0 ), 1, 1)
|
||||
# uniform.float.EndSequence1 = smooth(if(hideGUI == 1, 1.0, 0.0), 30, 0)
|
||||
# uniform.float.EndSequence2 = smooth(if(EndSequence1 > 0.95, 1.0, 0.0), 1.25, 0)
|
||||
|
||||
# thank you sixthsurge!
|
||||
#ifdef LIGHTNING_FLASH
|
||||
#ifdef IS_IRIS
|
||||
@ -431,6 +486,8 @@ uniform.float.Cloudy_Den = smooth(if( \
|
||||
|
||||
uniform.vec3.lightningEffect = vec3(77.0 * lightningFlash, 153.0 * lightningFlash, 255.0 * lightningFlash)
|
||||
|
||||
|
||||
|
||||
###################################
|
||||
####### BIOME RELATED STUFF #######
|
||||
###################################
|
||||
@ -476,6 +533,14 @@ uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31,
|
||||
####### RANDOM STUFF #######
|
||||
############################
|
||||
|
||||
|
||||
# float Currenthealth = currentPlayerHealth * maxPlayerHealth;
|
||||
# bool isDead = Currenthealth < 1 && currentPlayerHealth > -1;
|
||||
# bool oneHeart = Currenthealth <= 2 && currentPlayerHealth > -1;
|
||||
# bool threeHeart = Currenthealth <= 6 && currentPlayerHealth > -1;
|
||||
|
||||
|
||||
|
||||
#if defined LOW_HEALTH_EFFECT || defined DAMAGE_TAKEN_EFFECT
|
||||
#ifdef IS_IRIS
|
||||
variable.float.Currenthealth = currentPlayerHealth * maxPlayerHealth
|
||||
@ -488,6 +553,8 @@ uniform.float.noPuddleAreas = smooth(if(in(biome, 3, 4, 16, 37, 39, 48, 49, 31,
|
||||
uniform.float.hurt = smooth(if(is_hurt,1,0),0.0,0.5)
|
||||
#endif
|
||||
|
||||
# uniform.vec3.CamPos = vec3(cameraPosition.x,cameraPosition.y,cameraPosition.z)
|
||||
|
||||
# photon stuff
|
||||
uniform.vec2.view_res = vec2(viewWidth, viewHeight)
|
||||
uniform.vec2.view_pixel_size = vec2(1.0 / viewWidth, 1.0 / viewHeight)
|
||||
@ -579,4 +646,4 @@ uniform.float.shadowMaxProj = 150.0/abs(sunPosY)
|
||||
program.world1/shadowcomp.enabled = false
|
||||
program.world0/shadowcomp.enabled = false
|
||||
program.world-1/shadowcomp.enabled = false
|
||||
#endif
|
||||
#endif
|
||||
|
690
shaders/template/block.properties
Normal file
690
shaders/template/block.properties
Normal file
@ -0,0 +1,690 @@
|
||||
layer.translucent = minecraft:glass minecraft:glass_pane
|
||||
|
||||
#= BLOCK_WATER
|
||||
block.8= minecraft:water minecraft:flowing_water
|
||||
|
||||
#= BLOCK_BAMBOO
|
||||
block.11= bamboo bamboo_sapling
|
||||
|
||||
#= BLOCK_GRASS_SHORT
|
||||
block.*= minecraft:short_grass minecraft:grass
|
||||
|
||||
#= BLOCK_GRASS_TALL_LOWER
|
||||
block.*= minecraft:tall_grass:half=lower
|
||||
|
||||
#= BLOCK_GRASS_TALL_UPPER
|
||||
block.*= minecraft:tall_grass:half=upper
|
||||
|
||||
#= BLOCK_SAPLING
|
||||
block.*= minecraft:oak_sapling minecraft:spruce_sapling minecraft:birch_sapling minecraft:jungle_sapling minecraft:acacia_sapling minecraft:dark_oak_sapling
|
||||
|
||||
#= BLOCK_VINE
|
||||
block.*= vine
|
||||
|
||||
|
||||
####### ----- waving blocks with SSS ----- #######
|
||||
|
||||
## ground waving
|
||||
## add a newline to organize for modded blocks
|
||||
#= BLOCK_GROUND_WAVING
|
||||
block.60= minecraft:sunflower:half=upper minecraft:beetroots minecraft:potatoes minecraft:carrots minecraft:wheat minecraft:nether_wart minecraft:kelp minecraft:large_fern:half=upper minecraft:peony:half=upper minecraft:rose_bush:half=upper minecraft:lilac:half=upper minecraft:crimson_roots minecraft:nether_sprouts minecraft:warped_roots minecraft:seagrass minecraft:tall_seagrass:half=upper minecraft:wither_rose minecraft:lily_of_the_valley minecraft:cornflower minecraft:sweet_berry_bush minecraft:oxeye_daisy minecraft:pink_tulip minecraft:white_tulip minecraft:orange_tulip minecraft:red_tulip minecraft:azure_bluet minecraft:allium minecraft:blue_orchid minecraft:poppy minecraft:dandelion minecraft:dead_bush
|
||||
# removed: sapling(s)
|
||||
|
||||
## ground waving vertical models. this exists to brighten up the sides of grass and stuff in shaded places they blend in better with the world.
|
||||
#= BLOCK_GROUND_WAVING_VERTICAL
|
||||
block.*= minecraft:fern conquest:acacia_sapling conquest:alder_tree_sapling conquest:apple_tree_sapling conquest:aspen_tree_sapling conquest:birch_sapling conquest:cherry_tree_sapling conquest:dark_oak_sapling conquest:downy_willow_tree_sapling conquest:gorse_tree_sapling conquest:grape_vine_sapling conquest:horse_chestnut_tree_sapling conquest:jungle_sapling conquest:larch_tree_sapling conquest:mallorn_tree_sapling conquest:oak_sapling conquest:orange_tree_sapling conquest:pear_tree_sapling conquest:pine_tree_sapling conquest:plum_tree_sapling conquest:rowan_tree_sapling conquest:spruce_sapling conquest:willow_tree_sapling conquest:angelica conquest:black_knapweed conquest:buttercups conquest:cornflower conquest:dandelion conquest:elanor conquest:goldenrod conquest:harebell conquest:lily_of_the_valley conquest:lobelia_flowers conquest:marsh_ragwort conquest:meadow_saffron conquest:mediterranean_wild_tulip conquest:moorland_spotted_orchid conquest:niphredil conquest:orange_tulip conquest:orpine conquest:oxeye_daisy conquest:pasque_flower conquest:pink_tulip conquest:poppy conquest:red_tulip conquest:rock_rose conquest:sea_lavender conquest:simbelmyne conquest:white_clematis conquest:white_tulip conquest:wild_dagga conquest:allium conquest:barley conquest:bean_pole conquest:beetroots conquest:cabbage conquest:carrots conquest:common_beans conquest:corn conquest:flax conquest:heirloom_wheat_crops conquest:hemp conquest:lavender conquest:peas conquest:potatoes conquest:rice conquest:thyme conquest:tobacco conquest:turnips conquest:water_mint conquest:wheat conquest:wild_basil conquest:wild_parsley conquest:wild_wheat conquest:common_meadow_grass conquest:cotton_grass conquest:dead_grass conquest:deergrass conquest:grass conquest:kentucky_bluegrass conquest:lush_grass conquest:purple_moor_grass conquest:sea_arrowgrass conquest:seagrass conquest:sweet_grass conquest:timothy_grass conquest:wavy_hair_grass conquest:pine_cones conquest:spruce_cones conquest:beautyberry_bush conquest:bilberry_bush conquest:blackberry_bush conquest:bog_blueberry_bush conquest:broom_bush conquest:dead_bush conquest:hawthorn_bush conquest:lingonberry_bush conquest:raspberry_bush conquest:alpine_sow_thristle conquest:athelas conquest:autumnal_dwarf_birch conquest:birdsfoot_trefoil conquest:bog_asphodel conquest:bottle_sedge conquest:cattails conquest:common_cow_wheat conquest:cow_parsley conquest:cross leaved heath conquest:dead_reeds conquest:dead_shrubs conquest:desert_shrub conquest:dogs_mercury conquest:dooryard_dock conquest:dry_reeds conquest:greater_fen_sedge conquest:greater_wood_rush conquest:green_meadow_fescue conquest:green_spurge conquest:heather conquest:meadow_fescue conquest:melancholy_thristle conquest:nettles conquest:nightshade conquest:papyrus conquest:purple_wolfs_bane conquest:red_common_cow_wheat conquest:rosebay_willowherb conquest:rushes conquest:wild_shrub conquest:sedge conquest:small_fescue conquest:small_scabious conquest:sweet_woodruff conquest:wild_overgrown_nettles conquest:wild_shrub conquest:wood_horsetail conquest:woodland_sedge conquest:wormwood conquest:yellow_wolfs_bane conquest:autumnal_bracken conquest:bracken conquest:dark_autumnal_bracken conquest:dead_bracken conquest:fern conquest:fern_1 conquest:fern_2 conquest:harts_tongue_fern conquest:large_fern_1 conquest:large_fern_2 conquest:large_fern_3 conquest:thick_fern conquest:tall_grass conquest:large_fern conquest:sunflower conquest:tall_lilac conquest:peony conquest:rose_bush conquest:tall_seagrass conquest:cypress conquest:young_tree conquest:young_frozen_tree conquest:cross_leaved_heath conquest:jungle_ground_cover conquest:alpine_sow_thistle conquest:duckweed conquest:red_mushroom conquest:brown_mushroom
|
||||
|
||||
## air waving
|
||||
## add a newline to organize for modded blocks
|
||||
#= BLOCK_AIR_WAVING
|
||||
block.*= minecraft:azalea_leaves minecraft:flowering_azalea_leaves minecraft:cherry_leaves minecraft:mangrove_leaves minecraft:vine minecraft:oak_leaves minecraft:spruce_leaves minecraft:birch_leaves minecraft:jungle_leaves minecraft:acacia_leaves minecraft:dark_oak_leaves westerosblocks:vine_jasmine westerosblocks:apple_fruit_leaves westerosblocks:apricot_fruit_leaves westerosblocks:cherry_fruit_leaves westerosblocks:purple_grape_fruit_leaves westerosblocks:lemon_fruit_leaves westerosblocks:lime_fruit_leaves westerosblocks:orange_fruit_leaves westerosblocks:peach_fruit_leaves westerosblocks:plum_fruit_leaves westerosblocks:pomegranate_fruit_leaves westerosblocks:weirwood_leaves westerosblocks:hop_fruit_leaves westerosblocks:olive_fruit_leaves westerosblocks:palm_leaves westerosblocks:white_grape_fruit_leaves conquest:apple_tree_leaves conquest:ash_tree_leaves conquest:aspen_leaves conquest:autumnal_aspen_leaves conquest:dark_deciduous_leaves conquest:autumnal_beech_tree_leaves conquest:autumnal_birch_leaves conquest:autumnal_horse_chestnut_leaves conquest:autumnal_maple_leaves conquest:autumnal_oak_leaves conquest:autumnal_weeping_willow_leaves conquest:banana_tree_leaves conquest:beech_tree_leaves conquest:bright_autumnal_beech_tree_leaves conquest:bright_autumnal_weeping_willow_leaves conquest:bushy_joshua_tree_leaves conquest:caribbean_royal_palm_leaves conquest:caribbean_royal_palm_leaves_corner conquest:cherry_tree_leaves conquest:dark_beech_tree_leaves conquest:date_palm_leaves conquest:diseased_horse_chestnut_leaves conquest:downy_willow_leaves conquest:downy_willow_leaves_tip conquest:faded_autumnal_beech_tree_leaves conquest:dead_norway_spruce_needles conquest:orange_larch_leaf_top conquest:yellow_larch_leaf_top conquest:larch_leaf_top conquest:larch_spruce_leaf_top conquest:larch_leaf_slab conquest:larch_leaf_long_branch conquest:larch_leaf_branch conquest:larch_spruce_leaf_top conquest:yellow_larch_spruce_leaf_top conquest:yellow_larch_leaf_slab conquest:yellow_larch_leaf_long_branch conquest:yellow_larch_leaf_branch conquest:orange_larch_spruce_leaf_top conquest:orange_larch_leaf_slab conquest:oranch_larch_leaf_long_branch conquest:orange_larch_leaf_branch conquest:dead_spruce_leaf_top conquest:dead_spruce_leaf_slab conquest:dead_spruce_leaf_long_branch conquest:dead_spruce_leaf_branch conquest:light_spruce_leaf_top conquest:light_spruce_leaf_slab conquest:light_spruce_leaf_long_branch conquest:light_spruce_leaf_branch conquest:goat_willow_leaves conquest:gorse_leaves conquest:grape_vine_leaves conquest:holly_leaves conquest:horse_chestnut_leaves conquest:joshua_tree_leaves conquest:lemon_tree_leaves conquest:old_caribbean_royal_palm_leaves conquest:old_caribbean_royal_palm_leaves_corner conquest:olive_tree_leaves conquest:orange_tree_leaves conquest:pear_tree_leaves conquest:plum_tree_leaves conquest:rowan_leaves conquest:weeping_willow_leaves conquest:wisteria_leaves conquest:yellow_autumnal_weeping_willow_leaves conquest:dark_spruce_needles conquest:dead_pine_needles conquest:dead_spruce_needles conquest:larch_needles conquest:light_spruce_needles conquest:orange_autumnal_larch_needles conquest:pine_needles conquest:yellow_autumnal_larch_needles conquest:dead_deciduous_branches conquest:mistletoe_garland conquest:lilac conquest:pink_cherry_blossoms conquest:purple_cherry_blossoms conquest:red_cherry_blossoms conquest:white_cherry_blossoms conquest:wisteria_blossoms conquest:hanging_moss conquest:lianas conquest:moss_vines conquest:spruce_leaf_top conquest:spruce_leaf_branch conquest:spruce_leaf_slab conquest:spruce_leaf_long_branch conquest:thick_hanging_ivy conquest:thick_ivy conquest:hanging_roots conquest:acacia_branch_tip conquest:acacia_branch_tip_45 conquest:acacia_branch_tip_2 conquest:acacia_branch_tip_2_45 conquest:beech_branch_tip conquest:beech_branch_tip_45 conquest:beech_branch_tip_2 conquest:beech _branch_tip_2_45 conquest:birch_branch_tip conquest:birch_branch_tip_45 conquest:birch_branch_tip_2 conquest:birch_branch_tip_2_45 conquest:oak_branch_tip conquest:oak_branch_tip_45 conquest:oak_branch_tip_2 conquest:oak_branch_tip_2_45 conquest:spruce_branch_tip conquest:spruce_branch_tip_45 conquest:spruce_branch_tip_2 conquest:spruce_branch_tip_2_45 conquest:orange_pine_branch_tip conquest:orange_pine_branch_tip_45 conquest:orange_pine_branch_tip_2 conquest:orange_pine_branch_tip_2_45
|
||||
|
||||
|
||||
####### ----- blocks with SSS ----- #######
|
||||
|
||||
## strong sss
|
||||
#= BLOCK_SSS_STRONG
|
||||
block.80= minecraft:flowering_azalea minecraft:tall_seagrass minecraft:seagrass minecraft:kelp minecraft:large_fern:half=lower minecraft:tall_seagrass minecraft:kelp_plant minecraft:peony minecraft:rose_bush minecraft:lilac minecraft:sunflower:half=lower minecraft:packed_ice minecraft:blue_ice minecraft:melon_stem minecraft:pumpkin_stem minecraft:attached_melon_stem minecraft:attached_pumpkin_stem minecraft:lily_pad westerosblocks:blackberry_bush westerosblocks:blueberry_bush westerosblocks:raspberry_bush westerosblocks:juniper_bush westerosblocks:red_rose_bush westerosblocks:pink_rose_bush westerosblocks:white_rose_bush westerosblocks:yellow_rose_bush westerosblocks:yellow_wildflowers westerosblocks:green_spiny_herb westerosblocks:green_leafy_herb westerosblocks:orange_marigolds westerosblocks:orange_trollius westerosblocks:blue_forgetmenots westerosblocks:pink_wildflowers westerosblocks:yellow_tansy westerosblocks:blue_flax westerosblocks:white_daisies westerosblocks:yellow_daisies westerosblocks:green_scrub_grass westerosblocks:dead_scrub_grass westerosblocks:yellow_bedstraw westerosblocks:orange_bells westerosblocks:blue_bells westerosblocks:blue_swamp_bells westerosblocks:yellow_buttercups westerosblocks:orange_bog_asphodel westerosblocks:yellow_lupine westerosblocks:blue_hyacinth westerosblocks:pink_thistle westerosblocks:yellow_dandelions westerosblocks:yellow_daffodils westerosblocks:yellow_roses westerosblocks:strawberry_bush westerosblocks:white_lilyofthevalley westerosblocks:yellow_bells westerosblocks:yellow_sunflower westerosblocks:white_roses westerosblocks:red_dark_roses westerosblocks:yellow_hellebore westerosblocks:meadow_fescue westerosblocks:red_poppies westerosblocks:red_roses westerosblocks:purple_pansies westerosblocks:purple_roses westerosblocks:orange_sun_star westerosblocks:pink_primrose westerosblocks:red_aster westerosblocks:blue_chicory westerosblocks:red_flowering_spiny_herb westerosblocks:purple_foxglove westerosblocks:pink_allium westerosblocks:purple_violets westerosblocks:white_chamomile westerosblocks:red_tulips westerosblocks:white_peony westerosblocks:purple_alpine_sowthistle westerosblocks:red_carnations westerosblocks:magenta_roses westerosblocks:red_chrysanthemum westerosblocks:blue_orchid westerosblocks:yellow_rudbeckia westerosblocks:pink_tulips westerosblocks:cranberry_bush westerosblocks:purple_lavender westerosblocks:red_sourleaf_bush westerosblocks:pink_sweet_peas westerosblocks:red_sorrel westerosblocks:pink_roses westerosblocks:unshaded_grass westerosblocks:cow_parsely westerosblocks:bracken westerosblocks:lady_fern westerosblocks:nettle westerosblocks:dead_bracken westerosblocks:fireweed westerosblocks:heather westerosblocks:red_fern westerosblocks:dock_leaf westerosblocks:jasmine_vines westerosblocks:dappled_moss westerosblocks:cushion_moss_wall westerosblocks:hemp_short westerosblocks:hemp_tall westerosblocks:hemp_dense westerosblocks:crop_carrots westerosblocks:crop_wheat westerosblocks:crop_turnips westerosblocks:crop_peas westerosblocks:cattails westerosblocks:jungle_tall_fern westerosblocks:jungle_tall_grass westerosblocks:savanna_tall_grass
|
||||
|
||||
## weak sss
|
||||
#= BLOCK_SSS_WEAK
|
||||
block.*= minecraft:amethyst_block minecraft:budding_amethyst minecraft:small_amethyst_bud minecraft:pitcher_plant minecraft:small_dripleaf minecraft:grass_block:snowy=true minecraft:snow_block minecraft:snow powder_snow cobweb red_mushroom_block brown_mushroom_block weeping_vines weeping_vines_plant twisting_vines twisting_vines_plant tube_coral tube_coral_block tube_coral_fan tube_coral_wall_fan horn_coral horn_coral_block horn_coral_fan horn_coral_wall_fan fire_coral fire_coral_block fire_coral_fan fire_coral_wall_fan dead_brain_coral dead_brain_coral_block dead_brain_coral_fan dead_brain_coral_wall_fan dead_bubble_coral dead_bubble_coral_block dead_bubble_coral_fan dead_bubble_coral_wall_fan dead_bush dead_fire_coral dead_fire_coral_block dead_fire_coral_fan dead_fire_coral_wall_fan dead_horn_coral dead_horn_coral_block dead_horn_coral_fan dead_horn_coral_wall_fan dead_tube_coral dead_tube_coral_block dead_tube_coral_fan dead_tube_coral_wall_fan bubble_coral bubble_coral_block bubble_coral_fan bubble_coral_wall_fan brain_coral brain_coral_block brain_coral_fan brain_coral_wall_fan minecraft:spore_blossom minecraft:cave_vines:berries=false minecraft:cave_vines_plant:berries=false minecraft:glow_lichen minecraft:melon minecraft:pumpkin minecraft:big_dripleaf minecraft:big_dripleaf_stem minecraft:cactus minecraft:hay_block minecraft:brown_mushroom minecraft:mushroom_stem minecraft:sugar_cane minecraft:crimson_fungus minecraft:warped_fungus minecraft:sea_pickle:waterlogged=false minecraft:honeycomb_block
|
||||
|
||||
## weak sss
|
||||
#= BLOCK_SSS_WEAK_2
|
||||
block.*= minecraft:white_wool minecraft:orange_wool minecraft:magenta_wool minecraft:light_blue_wool minecraft:yellow_wool minecraft:lime_wool minecraft:pink_wool minecraft:gray_wool minecraft:light_gray_wool minecraft:cyan_wool minecraft:purple_wool minecraft:blue_wool minecraft:brown_wool minecraft:green_wool minecraft:red_wool minecraft:black_wool minecraft:orange_carpet minecraft:magenta_carpet minecraft:light_blue_carpet minecraft:yellow_carpet minecraft:lime_carpet minecraft:pink_carpet minecraft:gray_carpet minecraft:light_gray_carpet minecraft:cyan_carpet minecraft:purple_carpet minecraft:blue_carpet minecraft:brown_carpet minecraft:green_carpet minecraft:red_carpet minecraft:black_carpet westerosblocks:clothesline westerosblocks:smoke westerosblocks:brown_mushroom_1 westerosblocks:brown_mushroom_2 westerosblocks:brown_mushroom_3 westerosblocks:brown_mushroom_4 westerosblocks:brown_mushroom_5 westerosblocks:brown_mushroom_6 westerosblocks:brown_mushroom_7 westerosblocks:brown_mushroom_8 westerosblocks:brown_mushroom_9 westerosblocks:brown_mushroom_10 westerosblocks:brown_mushroom_11 westerosblocks:brown_mushroom_12 westerosblocks:brown_mushroom_13 westerosblocks:red_mushroom_1 westerosblocks:red_mushroom_2 westerosblocks:red_mushroom_3 westerosblocks:red_mushroom_4 westerosblocks:red_mushroom_5 westerosblocks:red_mushroom_6 westerosblocks:red_mushroom_7 westerosblocks:red_mushroom_8 westerosblocks:red_mushroom_9 westerosblocks:white_wool_slab westerosblocks:orange_wool_slab westerosblocks:light_brown_wool_slab westerosblocks:light_blue_wool_slab westerosblocks:yellow_wool_slab westerosblocks:dirty_white_wool_slab westerosblocks:pink_wool_slab westerosblocks:grey_wool_slab westerosblocks:light_grey_wool_slab westerosblocks:cyan_wool_slab westerosblocks:purple_wool_slab westerosblocks:blue_wool_slab westerosblocks:brown_wool_slab westerosblocks:green_wool_slab westerosblocks:red_wool_slab westerosblocks:black_wool_slab westerosblocks:white_wool_carpet westerosblocks:orange_wool_carpet westerosblocks:light_brown_wool_carpet westerosblocks:light_blue_wool_carpet westerosblocks:yellow_wool_carpet westerosblocks:dirty_white_wool_carpet westerosblocks:pink_wool_carpet westerosblocks:grey_wool_carpet westerosblocks:light_grey_wool_carpet westerosblocks:cyan_wool_carpet westerosblocks:purple_wool_carpet westerosblocks:blue_wool_carpet westerosblocks:brown_wool_carpet westerosblocks:green_wool_carpet westerosblocks:red_wool_carpet westerosblocks:black_wool_carpet westerosblocks:thatch_light_fur_carpet westerosblocks:thatch_dark_fur_carpet
|
||||
|
||||
## weak sss
|
||||
#= BLOCK_SSS_WEAK_3
|
||||
block.*= minecraft:white_wall_banner minecraft:orange_wall_banner minecraft:magenta_wall_banner minecraft:light_blue_wall_banner minecraft:yellow_wall_banner minecraft:lime_wall_banner minecraft:pink_wall_banner minecraft:gray_wall_banner minecraft:light_gray_wall_banner minecraft:cyan_wall_banner minecraft:purple_wall_banner minecraft:blue_wall_banner minecraft:brown_wall_banner minecraft:green_wall_banner minecraft:red_wall_banner minecraft:black_wall_banner minecraft:white_banner minecraft:orange_banner minecraft:magenta_banner minecraft:light_blue_banner minecraft:yellow_banner minecraft:lime_banner minecraft:pink_banner minecraft:gray_banner minecraft:light_gray_banner minecraft:cyan_banner minecraft:purple_banner minecraft:blue_banner minecraft:brown_banner minecraft:green_banner minecraft:red_banner minecraft:black_banner westerosblocks:renly_banner westerosblocks:redwyne_banner westerosblocks:grafton_banner westerosblocks:grey_banner westerosblocks:red_banner westerosblocks:black_banner westerosblocks:the_faith_of_the_seven_banner westerosblocks:cream_banner westerosblocks:blue_banner westerosblocks:brown_banner westerosblocks:cyan_banner westerosblocks:green_banner westerosblocks:orange_banner westerosblocks:pink_banner westerosblocks:purple_banner westerosblocks:lord_of_light_rhllor_banner westerosblocks:yellow_banner westerosblocks:arryn_banner westerosblocks:baratheon_banner westerosblocks:bolton_banner westerosblocks:dayne_banner westerosblocks:frey_banner westerosblocks:greyjoy_banner westerosblocks:hightower_banner westerosblocks:lannister_banner westerosblocks:manderly_banner westerosblocks:martell_banner westerosblocks:stannis_banner westerosblocks:stark_banner westerosblocks:targaryen_banner westerosblocks:tarly_banner westerosblocks:tully_banner westerosblocks:tyrell_banner
|
||||
|
||||
## weird blocks
|
||||
#= BLOCK_SSS_WEIRD
|
||||
block.*= minecraft:sand minecraft:red_sand
|
||||
|
||||
## grass uwu
|
||||
#= BLOCK_GRASS
|
||||
block.*= minecraft:grass_block:snowy=false
|
||||
|
||||
|
||||
####### ----- lightsources ----- #######
|
||||
|
||||
#= BLOCK_AMETHYST_BUD_LARGE
|
||||
block.101= large_amethyst_bud
|
||||
|
||||
#= BLOCK_AMETHYST_BUD_MEDIUM
|
||||
block.*= medium_amethyst_bud
|
||||
|
||||
#= BLOCK_AMETHYST_CLUSTER
|
||||
block.*= amethyst_cluster
|
||||
|
||||
#= BLOCK_BEACON
|
||||
block.*= beacon
|
||||
|
||||
#= BLOCK_BREWING_STAND
|
||||
block.*= brewing_stand
|
||||
|
||||
group.candle= candle black_candle blue_candle brown_candle cyan_candle gray_candle \
|
||||
green_candle light_blue_candle light_gray_candle lime_candle magenta_candle \
|
||||
orange_candle pink_candle purple_candle red_candle white_candle yellow_candle
|
||||
|
||||
#ifdef LPV_COLORED_CANDLES
|
||||
#= BLOCK_CANDLES_PLAIN_LIT_1
|
||||
block.*= candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PLAIN_LIT_2
|
||||
block.*= candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PLAIN_LIT_3
|
||||
block.*= candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PLAIN_LIT_4
|
||||
block.*= candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLACK_LIT_1
|
||||
block.*= black_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLACK_LIT_2
|
||||
block.*= black_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLACK_LIT_3
|
||||
block.*= black_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLACK_LIT_4
|
||||
block.*= black_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLUE_LIT_1
|
||||
block.*= blue_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLUE_LIT_2
|
||||
block.*= blue_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLUE_LIT_3
|
||||
block.*= blue_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BLUE_LIT_4
|
||||
block.*= blue_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BROWN_LIT_1
|
||||
block.*= brown_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BROWN_LIT_2
|
||||
block.*= brown_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BROWN_LIT_3
|
||||
block.*= brown_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_BROWN_LIT_4
|
||||
block.*= brown_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_CYAN_LIT_1
|
||||
block.*= cyan_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_CYAN_LIT_2
|
||||
block.*= cyan_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_CYAN_LIT_3
|
||||
block.*= cyan_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_CYAN_LIT_4
|
||||
block.*= cyan_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GRAY_LIT_1
|
||||
block.*= gray_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GRAY_LIT_2
|
||||
block.*= gray_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GRAY_LIT_3
|
||||
block.*= gray_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GRAY_LIT_4
|
||||
block.*= gray_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GREEN_LIT_1
|
||||
block.*= green_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GREEN_LIT_2
|
||||
block.*= green_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GREEN_LIT_3
|
||||
block.*= green_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_GREEN_LIT_4
|
||||
block.*= green_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_BLUE_LIT_1
|
||||
block.*= light_blue_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_BLUE_LIT_2
|
||||
block.*= light_blue_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_BLUE_LIT_3
|
||||
block.*= light_blue_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_BLUE_LIT_4
|
||||
block.*= light_blue_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_GRAY_LIT_1
|
||||
block.*= light_gray_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_GRAY_LIT_2
|
||||
block.*= light_gray_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_GRAY_LIT_3
|
||||
block.*= light_gray_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIGHT_GRAY_LIT_4
|
||||
block.*= light_gray_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIME_LIT_1
|
||||
block.*= lime_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIME_LIT_2
|
||||
block.*= lime_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIME_LIT_3
|
||||
block.*= lime_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIME_LIT_4
|
||||
block.*= lime_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_MAGENTA_LIT_1
|
||||
block.*= magenta_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_MAGENTA_LIT_2
|
||||
block.*= magenta_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_MAGENTA_LIT_3
|
||||
block.*= magenta_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_MAGENTA_LIT_4
|
||||
block.*= magenta_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_ORANGE_LIT_1
|
||||
block.*= orange_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_ORANGE_LIT_2
|
||||
block.*= orange_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_ORANGE_LIT_3
|
||||
block.*= orange_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_ORANGE_LIT_4
|
||||
block.*= orange_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PINK_LIT_1
|
||||
block.*= pink_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PINK_LIT_2
|
||||
block.*= pink_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PINK_LIT_3
|
||||
block.*= pink_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PINK_LIT_4
|
||||
block.*= pink_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PURPLE_LIT_1
|
||||
block.*= purple_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PURPLE_LIT_2
|
||||
block.*= purple_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PURPLE_LIT_3
|
||||
block.*= purple_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_PURPLE_LIT_4
|
||||
block.*= purple_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_RED_LIT_1
|
||||
block.*= red_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_RED_LIT_2
|
||||
block.*= red_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_RED_LIT_3
|
||||
block.*= red_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_RED_LIT_4
|
||||
block.*= red_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_WHITE_LIT_1
|
||||
block.*= white_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_WHITE_LIT_2
|
||||
block.*= white_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_WHITE_LIT_3
|
||||
block.*= white_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_WHITE_LIT_4
|
||||
block.*= white_candle:candles=4:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_YELLOW_LIT_1
|
||||
block.*= yellow_candle:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_YELLOW_LIT_2
|
||||
block.*= yellow_candle:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_YELLOW_LIT_3
|
||||
block.*= yellow_candle:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_YELLOW_LIT_4
|
||||
block.*= yellow_candle:candles=4:lit=true
|
||||
#else
|
||||
#= BLOCK_CANDLES_LIT_1
|
||||
block.*= [candle]:candles=1:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIT_2
|
||||
block.*= [candle]:candles=2:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIT_3
|
||||
block.*= [candle]:candles=3:lit=true
|
||||
|
||||
#= BLOCK_CANDLES_LIT_4
|
||||
block.*= [candle]:candles=4:lit=true
|
||||
#endif
|
||||
|
||||
#= BLOCK_CAVE_VINE_BERRIES
|
||||
block.*= cave_vines_plant:berries=true cave_vines:berries=true
|
||||
|
||||
#= BLOCK_COMPARATOR_LIT
|
||||
block.*= comparator:powered=true
|
||||
|
||||
#= BLOCK_COPPER_BULB_LIT
|
||||
block.*= copper_bulb:lit=true waxed_copper_bulb:lit=true
|
||||
|
||||
#= BLOCK_COPPER_BULB_EXPOSED_LIT
|
||||
block.*= exposed_copper_bulb:lit=true waxed_exposed_copper_bulb:lit=true
|
||||
|
||||
#= BLOCK_COPPER_BULB_OXIDIZED_LIT
|
||||
block.*= oxidized_copper_bulb:lit=true waxed_oxidized_copper_bulb:lit=true
|
||||
|
||||
#= BLOCK_COPPER_BULB_WEATHERED_LIT
|
||||
block.*= weathered_copper_bulb:lit=true waxed_weathered_copper_bulb:lit=true
|
||||
|
||||
#= BLOCK_CONDUIT
|
||||
block.*= conduit
|
||||
|
||||
#= BLOCK_CRYING_OBSIDIAN
|
||||
block.*= crying_obsidian
|
||||
|
||||
#= BLOCK_END_GATEWAY
|
||||
block.*= end_gateway
|
||||
|
||||
#= BLOCK_END_ROD
|
||||
block.*= end_rod
|
||||
|
||||
#= BLOCK_FIRE
|
||||
block.*= fire campfire:lit=true
|
||||
|
||||
#= BLOCK_FROGLIGHT_OCHRE
|
||||
block.*= ochre_froglight
|
||||
|
||||
#= BLOCK_FROGLIGHT_PEARLESCENT
|
||||
block.*= pearlescent_froglight
|
||||
|
||||
#= BLOCK_FROGLIGHT_VERDANT
|
||||
block.*= verdant_froglight
|
||||
|
||||
#= BLOCK_GLOW_LICHEN
|
||||
block.*= glow_lichen
|
||||
|
||||
#= BLOCK_GLOWSTONE
|
||||
block.*= glowstone
|
||||
|
||||
#= BLOCK_JACK_O_LANTERN
|
||||
block.*= jack_o_lantern
|
||||
|
||||
#= BLOCK_LANTERN
|
||||
block.*= lantern
|
||||
|
||||
#= BLOCK_LAVA
|
||||
block.*= lava
|
||||
|
||||
#= BLOCK_LIGHT_1
|
||||
block.*= light:level=1
|
||||
|
||||
#= BLOCK_LIGHT_2
|
||||
block.*= light:level=2
|
||||
|
||||
#= BLOCK_LIGHT_3
|
||||
block.*= light:level=3
|
||||
|
||||
#= BLOCK_LIGHT_4
|
||||
block.*= light:level=4
|
||||
|
||||
#= BLOCK_LIGHT_5
|
||||
block.*= light:level=5
|
||||
|
||||
#= BLOCK_LIGHT_6
|
||||
block.*= light:level=6
|
||||
|
||||
#= BLOCK_LIGHT_7
|
||||
block.*= light:level=7
|
||||
|
||||
#= BLOCK_LIGHT_8
|
||||
block.*= light:level=8
|
||||
|
||||
#= BLOCK_LIGHT_9
|
||||
block.*= light:level=9
|
||||
|
||||
#= BLOCK_LIGHT_10
|
||||
block.*= light:level=10
|
||||
|
||||
#= BLOCK_LIGHT_11
|
||||
block.*= light:level=11
|
||||
|
||||
#= BLOCK_LIGHT_12
|
||||
block.*= light:level=12
|
||||
|
||||
#= BLOCK_LIGHT_13
|
||||
block.*= light:level=13
|
||||
|
||||
#= BLOCK_LIGHT_14
|
||||
block.*= light:level=14
|
||||
|
||||
#= BLOCK_LIGHT_15
|
||||
block.*= light:level=15
|
||||
|
||||
#= BLOCK_MAGMA
|
||||
block.*= magma_block
|
||||
|
||||
#= BLOCK_REDSTONE_LAMP_LIT
|
||||
block.*= redstone_lamp:lit=true
|
||||
|
||||
#= BLOCK_REDSTONE_TORCH_LIT
|
||||
block.*= redstone_torch:lit=true redstone_wall_torch:lit=true
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_1
|
||||
block.*= redstone_wire:power=1
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_2
|
||||
block.*= redstone_wire:power=2
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_3
|
||||
block.*= redstone_wire:power=3
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_4
|
||||
block.*= redstone_wire:power=4
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_5
|
||||
block.*= redstone_wire:power=5
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_6
|
||||
block.*= redstone_wire:power=6
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_7
|
||||
block.*= redstone_wire:power=7
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_8
|
||||
block.*= redstone_wire:power=8
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_9
|
||||
block.*= redstone_wire:power=9
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_10
|
||||
block.*= redstone_wire:power=10
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_11
|
||||
block.*= redstone_wire:power=11
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_12
|
||||
block.*= redstone_wire:power=12
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_13
|
||||
block.*= redstone_wire:power=13
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_14
|
||||
block.*= redstone_wire:power=14
|
||||
|
||||
#= BLOCK_REDSTONE_WIRE_15
|
||||
block.*= redstone_wire:power=15
|
||||
|
||||
#= BLOCK_REPEATER_LIT
|
||||
block.*= repeater:powered=true
|
||||
|
||||
#= BLOCK_RESPAWN_ANCHOR_4
|
||||
block.*= respawn_anchor:charges=4
|
||||
|
||||
#= BLOCK_SCULK_SENSOR_ACTIVE
|
||||
block.*= sculk_sensor:sculk_sensor_phase=active
|
||||
|
||||
#= BLOCK_SEA_PICKLE_WET_1
|
||||
block.*= sea_pickle:waterlogged=true:pickles=1
|
||||
|
||||
#= BLOCK_SEA_PICKLE_WET_2
|
||||
block.*= sea_pickle:waterlogged=true:pickles=2
|
||||
|
||||
#= BLOCK_SEA_PICKLE_WET_3
|
||||
block.*= sea_pickle:waterlogged=true:pickles=3
|
||||
|
||||
#= BLOCK_SEA_PICKLE_WET_4
|
||||
block.*= sea_pickle:waterlogged=true:pickles=4
|
||||
|
||||
#= BLOCK_SEA_LANTERN
|
||||
block.*= sea_lantern
|
||||
|
||||
#= BLOCK_SHROOMLIGHT
|
||||
block.*= shroomlight
|
||||
|
||||
#= BLOCK_SMOKER_LIT
|
||||
block.*= smoker:lit=true
|
||||
|
||||
#= BLOCK_SOUL_FIRE
|
||||
block.*= soul_fire soul_campfire:lit=true
|
||||
|
||||
#= BLOCK_SOUL_LANTERN
|
||||
block.*= soul_lantern
|
||||
|
||||
#= BLOCK_SOUL_TORCH
|
||||
block.*= soul_torch soul_wall_torch
|
||||
|
||||
#= BLOCK_TORCH
|
||||
block.*= torch wall_torch
|
||||
|
||||
block.* = westerosblocks:safe_fire
|
||||
block.* = conquest:white_paper_lantern conquest:yellow_paper_lantern conquest:small_red_paper_lantern conquest:chinese_palace_lantern conquest:campfire conquest:brazier conquest:hanging_brazier conquest:chandelier conquest:candelabra conquest:cross_chandelier conquest:iron_candelabrum_1 conquest:golden_candelabrum_1 conquest:candle conquest:hanging_candle_holder conquest:candle_in_a_lantern conquest:candles conquest:hand_candle conquest:torch_with_grille conquest:elven_hand_light conquest:ship_lantern conquest:victorian_lantern conquest:small_lantern conquest:big_lantern conquest:hanging_oil_lamp conquest:oil_lamp conquest:terracotta_oil_lamp conquest:invisible_light_low conquest:invisible_light_medium conquest:invisible_light
|
||||
|
||||
|
||||
####### ----- reflective translucents / glass ----- #######
|
||||
|
||||
#= BLOCK_GLASS
|
||||
block.301= glass glass_pane
|
||||
|
||||
#= BLOCK_HONEY
|
||||
block.*= honey_block
|
||||
|
||||
#= BLOCK_ICE
|
||||
block.*= ice frosted_ice
|
||||
|
||||
#= BLOCK_NETHER_PORTAL
|
||||
block.*= nether_portal
|
||||
|
||||
#= BLOCK_SLIME
|
||||
block.*= slime_block
|
||||
|
||||
#= BLOCK_GLASS_BLACK
|
||||
block.*= black_stained_glass black_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_BLUE
|
||||
block.*= blue_stained_glass blue_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_BROWN
|
||||
block.*= brown_stained_glass brown_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_CYAN
|
||||
block.*= cyan_stained_glass cyan_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_GRAY
|
||||
block.*= gray_stained_glass gray_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_GREEN
|
||||
block.*= green_stained_glass green_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_LIGHT_BLUE
|
||||
block.*= light_blue_stained_glass light_blue_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_LIGHT_GRAY
|
||||
block.*= light_gray_stained_glass light_gray_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_LIME
|
||||
block.*= lime_stained_glass lime_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_MAGENTA
|
||||
block.*= magenta_stained_glass magenta_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_ORANGE
|
||||
block.*= orange_stained_glass orange_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_PINK
|
||||
block.*= pink_stained_glass pink_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_PURPLE
|
||||
block.*= purple_stained_glass purple_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_RED
|
||||
block.*= red_stained_glass red_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_WHITE
|
||||
block.*= white_stained_glass white_stained_glass_pane
|
||||
|
||||
#= BLOCK_GLASS_YELLOW
|
||||
block.*= yellow_stained_glass yellow_stained_glass_pane
|
||||
|
||||
|
||||
####### ----- LPV shapes ----- #######
|
||||
|
||||
#= BLOCK_BUTTON
|
||||
block.401= acacia_button bamboo_button birch_button cherry_button crimson_button dark_oak_button jungle_button mangrove_button oak_button polished_blackstone_button spruce_button stone_button warped_button
|
||||
|
||||
#= BLOCK_CANDLE
|
||||
block.*=[candle]:lit=false
|
||||
|
||||
#= BLOCK_CARPET
|
||||
block.*=black_carpet blue_carpet brown_carpet cyan_carpet gray_carpet green_carpet light_blue_carpet light_gray_carpet \
|
||||
lime_carpet magenta_carpet moss_carpet orange_carpet pink_carpet purple_carpet red_carpet white_carpet yellow_carpet
|
||||
|
||||
#= BLOCK_CHAIN
|
||||
block.*= chain
|
||||
|
||||
group.door= acacia_door bamboo_door birch_door cherry_door crimson_door dark_oak_door \
|
||||
iron_door jungle_door mangrove_door oak_door spruce_door warped_door \
|
||||
copper_door exposed_copper_door weathered_copper_door oxidized_copper_door \
|
||||
waxed_copper_door waxed_exposed_copper_door waxed_weathered_copper_door waxed_oxidized_copper_door
|
||||
|
||||
#= BLOCK_DOOR_N
|
||||
block.*= [door]:facing=north:open=false [door]:facing=west:hinge=left:open=true [door]:facing=east:hinge=right:open=true
|
||||
|
||||
#= BLOCK_DOOR_E
|
||||
block.*= [door]:facing=east:open=false [door]:facing=north:hinge=left:open=true [door]:facing=south:hinge=right:open=true
|
||||
|
||||
#= BLOCK_DOOR_S
|
||||
block.*= [door]:facing=south:open=false [door]:facing=east:hinge=left:open=true [door]:facing=west:hinge=right:open=true
|
||||
|
||||
#= BLOCK_DOOR_W
|
||||
block.*= [door]:facing=west:open=false [door]:facing=south:hinge=left:open=true [door]:facing=north:hinge=right:open=true
|
||||
|
||||
#= BLOCK_FENCE
|
||||
block.*= acacia_fence bamboo_fence birch_fence cherry_fence crimson_fence dark_oak_fence jungle_fence mangrove_fence nether_brick_fence oak_fence spruce_fence warped_fence
|
||||
|
||||
#= BLOCK_FENCE_GATE
|
||||
block.*= acacia_fence_gate bamboo_fence_gate birch_fence_gate cherry_fence_gate crimson_fence_gate dark_oak_fence_gate jungle_fence_gate mangrove_fence_gate oak_fence_gate spruce_fence_gate warped_fence_gate
|
||||
|
||||
#= BLOCK_FLOWER_POT
|
||||
block.*= flower_pot potted_acacia_sapling potted_allium potted_azalea_bush potted_bamboo potted_azure_bluet potted_birch_sapling \
|
||||
potted_blue_orchid potted_brown_mushroom potted_cactus potted_cornflower potted_crimson_fungus potted_crimson_roots \
|
||||
potted_dandelion potted_dark_oak_sapling potted_dead_bush potted_fern potted_flowering_azalea_bush potted_jungle_sapling \
|
||||
potted_lily_of_the_valley potted_mangrove_propagule potted_oak_sapling potted_orange_tulip potted_oxeye_daisy \
|
||||
potted_pink_tulip potted_poppy potted_red_mushroom potted_red_tulip potted_spruce_sapling potted_torchflower \
|
||||
potted_warped_fungus potted_warped_roots potted_white_tulip potted_wither_rose
|
||||
|
||||
#= BLOCK_IRON_BARS
|
||||
block.*= iron_bars
|
||||
|
||||
#= BLOCK_LADDER
|
||||
block.*= ladder
|
||||
|
||||
#= BLOCK_LEVER
|
||||
block.*= lever
|
||||
|
||||
#= BLOCK_PRESSURE_PLATE
|
||||
block.*= acacia_pressure_plate bamboo_pressure_plate birch_pressure_plate cherry_pressure_plate crimson_pressure_plate \
|
||||
dark_oak_pressure_plate heavy_weighted_pressure_plate jungle_pressure_plate light_weighted_pressure_plate mangrove_pressure_plate \
|
||||
oak_pressure_plate polished_blackstone_pressure_plate spruce_pressure_plate stone_pressure_plate warped_pressure_plate
|
||||
|
||||
group.slab= acacia_slab bamboo_slab bamboo_mosaic_slab birch_slab cherry_slab crimson_slab dark_oak_slab jungle_slab mangrove_slab \
|
||||
oak_slab spruce_slab warped_slab andesite_slab blackstone_slab brick_slab cobbled_deepslate_slab cobblestone_slab \
|
||||
cut_copper_slab cut_red_sandstone_slab cut_sandstone_slab dark_prismarine_slab deepslate_brick_slab deepslate_tile_slab \
|
||||
diorite_slab end_stone_brick_slab exposed_cut_copper_slab granite_slab mossy_cobblestone_slab mossy_stone_brick_slab \
|
||||
mud_brick_slab nether_brick_slab oxidized_cut_copper_slab petrified_oak_slab polished_andesite_slab \
|
||||
polished_blackstone_brick_slab polished_blackstone_slab polished_deepslate_slab polished_diorite_slab \
|
||||
polished_granite_slab prismarine_brick_slab prismarine_slab purpur_slab quartz_slab red_nether_brick_slab \
|
||||
red_sandstone_slab sandstone_slab smooth_quartz_slab smooth_red_sandstone_slab smooth_sandstone_slab smooth_stone_slab \
|
||||
stone_brick_slab stone_slab waxed_cut_copper_slab waxed_exposed_cut_copper_slab waxed_oxidized_cut_copper_slab \
|
||||
waxed_weathered_cut_copper_slab weathered_cut_copper_slab
|
||||
|
||||
#= BLOCK_SLAB_TOP
|
||||
block.*= [slab]:type=top
|
||||
|
||||
#= BLOCK_SLAB_BOTTOM
|
||||
block.*= [slab]:type=bottom daylight_detector
|
||||
|
||||
group.trapdoor= acacia_trapdoor bamboo_trapdoor birch_trapdoor cherry_trapdoor crimson_trapdoor dark_oak_trapdoor \
|
||||
iron_trapdoor jungle_trapdoor mangrove_trapdoor oak_trapdoor spruce_trapdoor warped_trapdoor \
|
||||
copper_trapdoor exposed_copper_trapdoor weathered_copper_trapdoor oxidized_copper_trapdoor \
|
||||
waxed_copper_trapdoor waxed_exposed_copper_trapdoor waxed_weathered_copper_trapdoor waxed_oxidized_copper_trapdoor
|
||||
|
||||
#= BLOCK_TRAPDOOR_BOTTOM
|
||||
block.*= [trapdoor]:half=bottom:open=false
|
||||
|
||||
#= BLOCK_TRAPDOOR_TOP
|
||||
block.*= [trapdoor]:half=top:open=false
|
||||
|
||||
#= BLOCK_TRAPDOOR_N
|
||||
block.*= [trapdoor]:facing=north:open=true
|
||||
|
||||
#= BLOCK_TRAPDOOR_E
|
||||
block.*= [trapdoor]:facing=east:open=true
|
||||
|
||||
#= BLOCK_TRAPDOOR_S
|
||||
block.*= [trapdoor]:facing=south:open=true
|
||||
|
||||
#= BLOCK_TRAPDOOR_W
|
||||
block.*= [trapdoor]:facing=west:open=true
|
||||
|
||||
|
||||
####### ----- misc ----- #######
|
||||
|
||||
## stuff
|
||||
#= BLOCK_END_PORTAL
|
||||
block.500= minecraft:end_portal
|
||||
|
||||
## all blocks here get exluded from POM.
|
||||
#= BLOCK_SIGN
|
||||
block.*= minecraft:oak_sign minecraft:spruce_sign minecraft:birch_sign minecraft:jungle_sign minecraft:acacia_sign minecraft:dark_oak_sign minecraft:mangrove_sign minecraft:crimson_sign minecraft:warped_sign minecraft:oak_wall_sign minecraft:spruce_wall_sign minecraft:birch_wall_sign minecraft:jungle_wall_sign minecraft:acacia_wall_sign minecraft:dark_oak_wall_sign minecraft:mangrove_wall_sign minecraft:crimson_wall_sign minecraft:warped_wall_sign
|
||||
|
||||
## workaround mixed render stages
|
||||
##= BLOCK_REDSTONE_WIRE
|
||||
##block.*= minecraft:redstone_wire
|
@ -144,7 +144,7 @@ void main() {
|
||||
|
||||
// position = gl_Vertex.xyz;
|
||||
|
||||
// if((renderStage == 10 || renderStage == 12) && mc_Entity.x != 3000) {
|
||||
// if((renderStage == 10 || renderStage == 12) && mc_Entity.x != BLOCK_REDSTONE_WIRE) {
|
||||
// position = (shadowModelViewInverse * vec4(gl_Vertex.xyz,1.0)).xyz;
|
||||
// }
|
||||
|
||||
@ -204,7 +204,7 @@ void main() {
|
||||
|
||||
SetVoxelBlock(originPos, voxelId);
|
||||
}
|
||||
|
||||
|
||||
#ifdef LPV_ENTITY_LIGHTS
|
||||
if (
|
||||
(currentRenderedItemId > 0 || entityId > 0) &&
|
||||
@ -252,15 +252,30 @@ void main() {
|
||||
#endif
|
||||
|
||||
#ifdef DISTORT_SHADOWMAP
|
||||
if(entityId == 1100) position.xyz = position.xyz - normalize(gl_NormalMatrix * gl_Normal) * 0.25;
|
||||
|
||||
gl_Position = BiasShadowProjection(toClipSpace3(position));
|
||||
#else
|
||||
gl_Position = toClipSpace3(position);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
if (blockId == BLOCK_WATER) gl_Position.w = -1.0;
|
||||
// color.a = 1.0;
|
||||
// if((blockID < 300 || blockID >= 400)) color.a = 0.0;
|
||||
|
||||
|
||||
// materials = 0.0;
|
||||
// if(blockId == 8) materials = 1.0;
|
||||
|
||||
gl_Position.z /= 6.0;
|
||||
}
|
||||
|
||||
/// this is to ease the shadow acne on big fat entities like ghasts.
|
||||
float bias = 6.0;
|
||||
if(entityId == ENTITY_SSS_MEDIUM){
|
||||
// increase bias on parts facing the sun
|
||||
vec3 FlatNormals = normalize(gl_NormalMatrix * gl_Normal);
|
||||
vec3 WsunVec = (float(sunElevation > 1e-5)*2-1.)*normalize(mat3(shadowModelViewInverse) * sunPosition);
|
||||
|
||||
bias = 6.0 + (1-clamp(dot(WsunVec,FlatNormals),0,1))*0.3;
|
||||
}
|
||||
gl_Position.z /= bias;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user