Skip to content

Commit

Permalink
Create light.glsl (Credit: @Minecrafthyr)
Browse files Browse the repository at this point in the history
  • Loading branch information
StartsMercury committed Oct 30, 2023
1 parent 5fa786f commit dfaa588
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#version 150

#define MINECRAFT_LIGHT_POWER (0.6)
#define MINECRAFT_AMBIENT_LIGHT (0.4)

vec4 minecraft_mix_light(vec3 lightDir0, vec3 lightDir1, vec3 normal, vec4 color) {
return color;
}

vec4 minecraft_sample_lightmap(sampler2D lightMap, ivec2 uv) {
return texture(lightMap, clamp(uv / 256.0, vec2(0.5 / 16.0), vec2(15.5 / 16.0)));
}

0 comments on commit dfaa588

Please sign in to comment.