integrate all shadows

pull/3/head
cosmonaut 2020-10-19 14:00:11 -07:00
parent 8407a34c37
commit cb0baf0bf0
4 changed files with 6 additions and 7 deletions

Binary file not shown.

View File

@ -137,6 +137,5 @@ float HardPointShadow(
float bias = max(0.05 * (1.0 - dot(N, L)), 0.005);
return (currentDepth - bias > closestDepth ? 0.25 : 1.0);
//return closestDepth / farPlane;
return (currentDepth - bias > closestDepth ? 0 : 1.0);
}

View File

@ -15,7 +15,7 @@ Essential
- [x] Tone map shader
- [x] Poisson soft shadowing
- [ ] Frustum culling
- [ ] Shadow-casting point lights
- [x] Shadow-casting point lights
- [ ] Parabolic lights
- [x] Skyboxes
- [ ] Screen-space reflection

View File

@ -227,7 +227,7 @@ namespace Kav
{
PointLightRender(camera, modelTransforms, pointLight);
}
//DirectionalLightToonRender(camera, modelTransforms, directionalLight);
DirectionalLightToonRender(camera, modelTransforms, directionalLight);
SkyboxRender(camera, skybox);
GraphicsDevice.SetRenderTarget(null);
@ -276,7 +276,7 @@ namespace Kav
TextureCube skybox
) {
GraphicsDevice.RasterizerState.CullMode = CullMode.CullClockwiseFace;
SkyboxEffect.Skybox = PointShadowCubeMap;
SkyboxEffect.Skybox = skybox;
var view = camera.View;
view.Translation = Vector3.Zero;
@ -459,7 +459,7 @@ namespace Kav
Deferred_ToonEffect.GNormal = gNormal;
Deferred_ToonEffect.GMetallicRoughness = gMetallicRoughness;
Deferred_ToonEffect.DitheredShadows = true;
Deferred_ToonEffect.DitheredShadows = false;
Deferred_ToonEffect.EyePosition = camera.Position;
Deferred_ToonEffect.DirectionalLightDirection = directionalLight.Direction;