@@ -1,5 +1,5 @@
#include "client/rendering/RenderSettings.h"
-RenderSettings::RenderSettings() : ssao(true), shadows(false), testRadius(0.004f), testBias(0.003f), bump(0.5f),
+RenderSettings::RenderSettings() : ssao(true), shadows(true), testRadius(0.01f), testBias(0.0002f), bump(0.5f),
factor(1), dirtyFactor(false) {
}
@@ -53,10 +53,10 @@ void main(void) {
if(shadows) {
vec3 pos = varShadow.xyz / varShadow.w;
- float fbias = zbias * (1.0 - max(dot(normal, -light), 0.0));
+ //float fbias = zbias * (1.0 - max(dot(worldNormal, -light), 0.0));
float shadow = 0.0;
for(int i = 0; i < sampleAmount; i++) {
- shadow += float(texture(shadowSamp, pos.xy + samples[i] * radius).r + fbias > pos.z);
+ shadow += float(texture(shadowSamp, pos.xy + samples[i] * radius).r + zbias > pos.z);
shadow /= sampleAmount;
worldShadow = shadow;