mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-10 04:53:07 +08:00
improve hand reflection detection, merge some of xonks specular fixes
This commit is contained in:
@@ -625,9 +625,6 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
// 0.4 = translucent particles
|
||||
// 0.3 = hand mask
|
||||
|
||||
#ifdef HAND
|
||||
MATERIALS = 0.3;
|
||||
#endif
|
||||
|
||||
// bool isHand = abs(MATERIALS - 0.1) < 0.01;
|
||||
bool isWater = MATERIALS > 0.99;
|
||||
@@ -636,6 +633,10 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
bool isEntity = abs(MATERIALS - 0.4) < 0.01 || isReflectiveEntity;
|
||||
// bool isNetherPortal = abs(MATERIALS - 0.6) < 0.01;
|
||||
|
||||
#ifdef HAND
|
||||
MATERIALS = 0.3;
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////// ALBEDO /////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -1120,13 +1121,15 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
|
||||
#ifdef HAND
|
||||
isHand = true;
|
||||
f0 = max(specularValues.g, harcodedF0);
|
||||
// f0 = max(specularValues.g, harcodedF0);
|
||||
#endif
|
||||
|
||||
float roughness = specularValues.r;
|
||||
|
||||
if(UnchangedAlpha <= 0.0 && !isReflective) f0 = 0.0;
|
||||
|
||||
if(SpecularTex.g == 0.0 && SpecularTex.r > 0.0) f0 = harcodedF0;
|
||||
|
||||
if (f0 > 0.0){
|
||||
if(isReflective) f0 = max(f0, harcodedF0);
|
||||
|
||||
|
||||
@@ -132,6 +132,8 @@ vec3 getWaveNormal(vec3 posxz, float range){
|
||||
uniform float caveDetection;
|
||||
#endif
|
||||
|
||||
uniform int currentRenderedItemId;
|
||||
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
//////////////////////////////VOID MAIN//////////////////////////////
|
||||
@@ -247,11 +249,11 @@ void main() {
|
||||
#endif
|
||||
|
||||
// translucent blocks
|
||||
if (mc_Entity.x >= 301 && mc_Entity.x <= 338) mat = 0.1;
|
||||
if (mc_Entity.x >= 301 && mc_Entity.x <= 338 || currentRenderedItemId >= 301 && currentRenderedItemId <= 338) mat = 0.1;
|
||||
|
||||
// if (mc_Entity.x == BLOCK_NETHER_PORTAL) mat = 0.6;
|
||||
|
||||
if (mc_Entity.x == WISPJELLY) lmtexcoord.z = 0.0;
|
||||
if (mc_Entity.x == WISPJELLY || currentRenderedItemId== WISPJELLY) lmtexcoord.z = 0.0;
|
||||
|
||||
#if defined ENTITIES && defined IS_IRIS
|
||||
NAMETAG = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - A Bliss Edit
|
||||
prefix.SHADER_VERSION_LABEL = V
|
||||
value.SHADER_VERSION_LABEL.482 = 8.3.0
|
||||
value.SHADER_VERSION_LABEL.482 = 8.3.1
|
||||
|
||||
iris_extension.keybind.key0.name=Flashlight
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
option.SHADER_VERSION_LABEL = §d§lECLIPSE§r - Bliss 编辑版
|
||||
prefix.SHADER_VERSION_LABEL = 版本
|
||||
value.SHADER_VERSION_LABEL.482 = 8.3.0
|
||||
value.SHADER_VERSION_LABEL.482 = 8.3.1
|
||||
|
||||
# 如果你是来翻译的,这不是玩笑,这些选项的功能正如其名
|
||||
profile.POTATO=§4土豆 (极低配置)
|
||||
|
||||
@@ -2337,6 +2337,8 @@ vec3 specularReflections(
|
||||
mat3 basis = CoordBase(normal);
|
||||
vec3 viewDir = -NplayerPos*basis;
|
||||
|
||||
viewDir.z = abs(viewDir.z);
|
||||
|
||||
#if defined FORWARD_ROUGH_REFLECTION || defined DEFERRED_ROUGH_REFLECTION
|
||||
vec3 samplePoints = SampleVNDFGGX(viewDir, roughness, noise.xy);
|
||||
vec3 reflectedVector_L = basis * reflect(-normalize(viewDir), samplePoints);
|
||||
|
||||
Reference in New Issue
Block a user