[ChunkBuilder] Now disabling fallback AO when smooth lighting is enabled.
This commit is contained in:
parent
b0aa1ad7a8
commit
db6f775ae7
@ -52,12 +52,6 @@ void main() {
|
||||
// Very cheap "transparency": don't draw pixels with a low alpha value
|
||||
if(color.a < 0.3 && blockFace > -1.) discard;
|
||||
|
||||
// FIXME: FINISH THIS WITH PROPER CODE AND SUN BASIC DISPLAY
|
||||
// int maxTime = 5 * 1000;
|
||||
// float time = mod(u_lightPosition, maxTime) / maxTime * 2 - 1;
|
||||
// vec3 lightPosition = vec3(0.0, sin(time) * 40, cos(time) * 40);
|
||||
// color *= light(vec3(1.0, 1.0, 1.0), vec4(lightPosition, 1.0), 0.5, 0.5);
|
||||
|
||||
float minBrightness = 2.0 / 16.0;
|
||||
if (lightCheck != -1.) {
|
||||
float ambientIntensity = max(max(v_lightValue.x, v_lightValue.y) / 16.0, minBrightness);
|
||||
@ -75,8 +69,6 @@ void main() {
|
||||
ambientIntensity = max(ambientIntensity * 0.9, minBrightness);
|
||||
|
||||
color = light(color, vec3(1.0, 1.0, 1.0), v_coord3d, ambientIntensity, diffuseIntensity);
|
||||
|
||||
// color = vec4(0, 0, v_lightValue.x / 16.0, 1);
|
||||
}
|
||||
|
||||
color.rgb *= v_ambientOcclusion;
|
||||
|
@ -253,7 +253,7 @@ inline void ChunkBuilder::addFace(s8f x, s8f y, s8f z, s8f f, const ClientChunk
|
||||
}
|
||||
|
||||
auto addVertex = [&](u8 v) {
|
||||
if (!Config::isAmbientOcclusionEnabled)
|
||||
if (!Config::isAmbientOcclusionEnabled || Config::isSmoothLightingEnabled)
|
||||
vertices[v].ambientOcclusion = 5;
|
||||
|
||||
if (block.drawType() == BlockDrawType::Liquid)
|
||||
|
Loading…
x
Reference in New Issue
Block a user