mirror of
https://github.com/X0nk/Bliss-Shader.git
synced 2025-01-03 16:13:30 +08:00
Fix ENTITIES TRANSLUCENT programs, and ambient light not working in end/nether
This commit is contained in:
parent
57ffa75366
commit
339829f952
@ -466,22 +466,19 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NETHER_SHADER
|
#ifdef NETHER_SHADER
|
||||||
WS_normal.xz = -WS_normal.xz;
|
vec3 AmbientLightColor = skyCloudsFromTexLOD2(WS_normal, colortex4, 6).rgb ;
|
||||||
vec3 AmbientLightColor = skyCloudsFromTexLOD2(WS_normal, colortex4, 6).rgb / 15;
|
|
||||||
|
|
||||||
vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb / 15;
|
|
||||||
vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb / 15;
|
|
||||||
|
|
||||||
|
|
||||||
|
vec3 up = skyCloudsFromTexLOD2(vec3( 0, 1, 0), colortex4, 6).rgb;
|
||||||
|
vec3 down = skyCloudsFromTexLOD2(vec3( 0,-1, 0), colortex4, 6).rgb;
|
||||||
|
|
||||||
up *= pow( max( WS_normal.y, 0), 2);
|
up *= pow( max( WS_normal.y, 0), 2);
|
||||||
down *= pow( max(-WS_normal.y, 0), 2);
|
down *= pow( max(-WS_normal.y, 0), 2);
|
||||||
AmbientLightColor += up + down;
|
AmbientLightColor += up + down;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef END_SHADER
|
#ifdef END_SHADER
|
||||||
float fresnelGlow = pow(clamp(1.5 + dot(WS_normal, normalize(feetPlayerPos))*0.5,0,2),2);
|
|
||||||
vec3 AmbientLightColor = (vec3(0.5,0.75,1.0) *0.9 + 0.1)* fresnelGlow;
|
|
||||||
|
|
||||||
|
|
||||||
float vortexBounds = clamp(vortexBoundRange - length(feetPlayerPos+cameraPosition), 0.0,1.0);
|
float vortexBounds = clamp(vortexBoundRange - length(feetPlayerPos+cameraPosition), 0.0,1.0);
|
||||||
@ -496,6 +493,9 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
|
|||||||
|
|
||||||
Direct_lighting = lightColors * endFogPhase(lightPos) * 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(WS_normal, normalize(feetPlayerPos))*0.5,0,2);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Indirect_lighting = DoAmbientLightColor(AmbientLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy);
|
Indirect_lighting = DoAmbientLightColor(AmbientLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy);
|
||||||
|
@ -3,6 +3,7 @@ vec3 DoAmbientLightColor(
|
|||||||
vec3 TorchColor,
|
vec3 TorchColor,
|
||||||
vec2 Lightmap
|
vec2 Lightmap
|
||||||
){
|
){
|
||||||
|
|
||||||
// do sky lighting.
|
// do sky lighting.
|
||||||
float skyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
float skyLM = (pow(Lightmap.y,15.0)*2.0 + pow(Lightmap.y,2.5))*0.5;
|
||||||
SkyColor = (SkyColor / 30.0) * ambient_brightness * skyLM;
|
SkyColor = (SkyColor / 30.0) * ambient_brightness * skyLM;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#version 120
|
#version 120
|
||||||
|
|
||||||
#define ENTITIES
|
#define ENTITIES
|
||||||
#define OVERWORLD_SHADER
|
#define NETHER_SHADER
|
||||||
|
|
||||||
#include "/dimensions/all_translucent.fsh"
|
#include "/dimensions/all_translucent.fsh"
|
@ -1,6 +1,6 @@
|
|||||||
#version 120
|
#version 120
|
||||||
|
|
||||||
#define ENTITIES
|
#define ENTITIES
|
||||||
#define OVERWORLD_SHADER
|
#define NETHER_SHADER
|
||||||
|
|
||||||
#include "/dimensions/all_translucent.vsh"
|
#include "/dimensions/all_translucent.vsh"
|
@ -1,6 +1,6 @@
|
|||||||
#version 120
|
#version 120
|
||||||
|
|
||||||
#define ENTITIES
|
#define ENTITIES
|
||||||
#define OVERWORLD_SHADER
|
#define END_SHADER
|
||||||
|
|
||||||
#include "/dimensions/all_translucent.fsh"
|
#include "/dimensions/all_translucent.fsh"
|
@ -1,6 +1,6 @@
|
|||||||
#version 120
|
#version 120
|
||||||
|
|
||||||
#define ENTITIES
|
#define ENTITIES
|
||||||
#define OVERWORLD_SHADER
|
#define END_SHADER
|
||||||
|
|
||||||
#include "/dimensions/all_translucent.vsh"
|
#include "/dimensions/all_translucent.vsh"
|
Loading…
x
Reference in New Issue
Block a user