migrate block data to image; hand-light initial

This commit is contained in:
NULL511
2024-05-06 15:12:52 -04:00
parent bfcf3e1805
commit a1cb96dd03
9 changed files with 955 additions and 919 deletions

View File

@ -2,6 +2,7 @@
#ifdef IS_LPV_ENABLED
#extension GL_EXT_shader_image_load_store: enable
#extension GL_ARB_shading_language_packing: enable
#endif
#include "/lib/res_params.glsl"
@ -49,6 +50,7 @@ uniform sampler2D specular;
uniform sampler2D normals;
#ifdef IS_LPV_ENABLED
uniform usampler1D texBlockData;
uniform sampler3D texLpv1;
uniform sampler3D texLpv2;
#endif
@ -92,6 +94,7 @@ uniform vec3 nsunColor;
#include "/lib/projections.glsl"
#include "/lib/sky_gradient.glsl"
#include "/lib/waterBump.glsl"
#include "/lib/util.glsl"
#ifdef OVERWORLD_SHADER
flat varying float Flashing;
@ -634,7 +637,7 @@ if (gl_FragCoord.x * texelSize.x < 1.0 && gl_FragCoord.y * texelSize.y < 1.0 )
const vec3 lpvPos = vec3(0.0);
#endif
Indirect_lighting = DoAmbientLightColor(lpvPos, AmbientLightColor, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy, exposure);
Indirect_lighting = DoAmbientLightColor(feetPlayerPos, lpvPos, AmbientLightColor, MinimumLightColor, vec3(TORCH_R,TORCH_G,TORCH_B), lightmap.xy, exposure);
vec3 FinalColor = (Indirect_lighting + Direct_lighting) * Albedo;