mirror of
https://github.com/Merlin1809/Eclipse-Shader.git
synced 2026-10-11 09:48:17 +08:00
fix voxy normals (fr this time)
This commit is contained in:
1 parent
a58671dbf0
commit
4532a8d9b5
4 files changed
+11
-12
No files matched your search
@@ -272,6 +272,7 @@ void main() {
|
||||
#endif
|
||||
|
||||
if(vblockID == BLOCK_GROUND_WAVING_VERTICAL || vblockID == BLOCK_GRASS_SHORT || vblockID == BLOCK_GRASS_TALL_LOWER || vblockID == BLOCK_GRASS_TALL_UPPER ) vnormalMat.a = 0.60;
|
||||
if(vblockID == BLOCK_AIR_WAVING) vnormalMat.a = 0.55;
|
||||
|
||||
#if defined WORLD && !defined HAND
|
||||
|
||||
@@ -298,10 +299,8 @@ void main() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if(mc_Entity.x == BLOCK_AIR_WAVING) vnormalMat.a = 0.55;
|
||||
|
||||
#if PUDDLE_MODE > 0 || ShaderSnow > 0
|
||||
if (mc_Entity.x == 244 || mc_Entity.x == 189) vlmtexcoord.w = 0.0;
|
||||
if (vblockID == 244 || vblockID == 189) vlmtexcoord.w = 0.0;
|
||||
#endif
|
||||
|
||||
// special cases light lightning and beacon beams...
|
||||
|
||||
@@ -115,8 +115,12 @@ void voxy_emitFragment(VoxyFragmentParameters parameters) {
|
||||
#endif
|
||||
|
||||
Albedo.a = 1.0;
|
||||
if(blockID == BLOCK_GROUND_WAVING_VERTICAL || blockID == BLOCK_GRASS_SHORT || blockID == BLOCK_GRASS_TALL_LOWER || blockID == BLOCK_GRASS_TALL_UPPER ) Albedo.a = 0.60;
|
||||
if(blockID == BLOCK_AIR_WAVING) Albedo.a = 0.55;
|
||||
|
||||
vec3 normal = vec3(uint((parameters.face>>1)==2), uint((parameters.face>>1)==0), uint((parameters.face>>1)==1)) * (float(int(parameters.face)&1));
|
||||
vec3 normal = vec3(uint((parameters.face>>1)==2), uint((parameters.face>>1)==0), uint((parameters.face>>1)==1)) * (float(int(parameters.face)&1)*2-1);
|
||||
|
||||
if (normal.z<=-0.9) normal.xy = vec2(-0.0000000000001);
|
||||
|
||||
vec4 data1 = clamp( encode(normal, parameters.lightMap), 0.0, 1.0);
|
||||
|
||||
|
||||
@@ -188,7 +188,9 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
vec3 normal = vec3(uint((parameters.face>>1)==2), uint((parameters.face>>1)==0), uint((parameters.face>>1)==1)) * (float(int(parameters.face)&1));
|
||||
vec3 normal = vec3(uint((parameters.face>>1)==2), uint((parameters.face>>1)==0), uint((parameters.face>>1)==1)) * (float(int(parameters.face)&1)*2-1);
|
||||
|
||||
if (normal.z<=-0.9) normal.xy = vec2(-0.0000000000001);
|
||||
|
||||
vec4 lightCol;
|
||||
vec3 WsunVec;
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#if defined DISTANT_HORIZONS && defined DH_SCREENSPACE_REFLECTIONS
|
||||
float invLinZ_DH (float lindepth){
|
||||
return -((2.0*near/lindepth)-dhVoxyFarPlane-near)/(dhVoxyFarPlane-near);
|
||||
}
|
||||
#endif
|
||||
|
||||
float invLinZ (float lindepth){
|
||||
return -((2.0*near/lindepth)-far-near)/(far-near);
|
||||
}
|
||||
@@ -153,7 +147,7 @@ vec3 rayTraceSpeculars(vec3 dir, vec3 position, float dither, float quality, boo
|
||||
spos.xy += TAA_Offset*texelSize*0.5/RENDER_SCALE;
|
||||
#endif
|
||||
|
||||
float minZ = spos.z - 0.00025 / linZ(spos.z);;
|
||||
float minZ = spos.z - 0.00025 / linZ(spos.z);
|
||||
float maxZ = spos.z;
|
||||
|
||||
vec3 hitPos = vec3(1.1);
|
||||
|
||||
Reference in new issue
Block a user