kinda working

This commit is contained in:
NULL511
2024-05-02 12:43:30 -04:00
parent 2c4eea5b26
commit 3ab6b68165
16 changed files with 306 additions and 201 deletions

View File

@ -1,4 +1,9 @@
#include "/lib/settings.glsl"
#ifdef IS_LPV_ENABLED
#extension GL_EXT_shader_image_load_store: enable
#endif
#include "/lib/res_params.glsl"
varying vec4 lmtexcoord;
@ -56,6 +61,14 @@ flat varying float HELD_ITEM_BRIGHTNESS;
#include "/lib/volumetricClouds.glsl"
#endif
#ifdef IS_LPV_ENABLED
uniform int frameCounter;
#include "/lib/hsv.glsl"
#include "/lib/lpv_common.glsl"
#include "/lib/lpv_render.glsl"
#endif
#include "/lib/diffuse_lighting.glsl"
#include "/lib/sky_gradient.glsl"
@ -226,7 +239,7 @@ void main() {
vec3 AmbientLightColor = vec3(1.0);
#endif
Indirect_lighting = DoAmbientLightColor(AmbientLightColor,MinimumLightColor, Torch_Color, clamp(lightmap.xy,0,1));
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);

View File

@ -1,4 +1,9 @@
#include "/lib/settings.glsl"
#ifdef IS_LPV_ENABLED
#extension GL_EXT_shader_image_load_store: enable
#endif
#include "/lib/res_params.glsl"
varying vec4 lmtexcoord;
@ -97,6 +102,12 @@ uniform vec3 nsunColor;
#include "/lib/end_fog.glsl"
#endif
#ifdef IS_LPV_ENABLED
#include "/lib/hsv.glsl"
#include "/lib/lpv_common.glsl"
#include "/lib/lpv_render.glsl"
#endif
#include "/lib/diffuse_lighting.glsl"
float blueNoise(){
@ -572,7 +583,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
AmbientLightColor *= clamp(1.5 + dot(WS_normal, normalize(feetPlayerPos))*0.5,0,2);
#endif
Indirect_lighting = DoAmbientLightColor(AmbientLightColor, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy);
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));

View File

@ -1,4 +1,9 @@
#include "/lib/settings.glsl"
#ifdef IS_LPV_ENABLED
#extension GL_EXT_shader_image_load_store: enable
#endif
#include "/lib/res_params.glsl"
@ -162,6 +167,12 @@ vec3 toScreenSpace(vec3 p) {
#include "/lib/volumetricClouds.glsl"
#endif
#ifdef IS_LPV_ENABLED
#include "/lib/hsv.glsl"
#include "/lib/lpv_common.glsl"
#include "/lib/lpv_render.glsl"
#endif
#include "/lib/diffuse_lighting.glsl"
float ld(float dist) {
@ -1256,7 +1267,8 @@ void main() {
#endif
Indirect_lighting = DoAmbientLightColor(Indirect_lighting, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy);
vec3 lpvPos = GetLpvPosition(feetPlayerPos) - 0.5*FlatNormals + slopednormal;
Indirect_lighting = DoAmbientLightColor(lpvPos, Indirect_lighting, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy);
Indirect_lighting *= Absorbtion;
#ifdef OVERWORLD_SHADER