integrate all shadows
parent
8407a34c37
commit
cb0baf0bf0
BIN
Effects/FXB/DeferredPBR_PointLightEffect.fxb (Stored with Git LFS)
BIN
Effects/FXB/DeferredPBR_PointLightEffect.fxb (Stored with Git LFS)
Binary file not shown.
|
@ -137,6 +137,5 @@ float HardPointShadow(
|
||||||
|
|
||||||
float bias = max(0.05 * (1.0 - dot(N, L)), 0.005);
|
float bias = max(0.05 * (1.0 - dot(N, L)), 0.005);
|
||||||
|
|
||||||
return (currentDepth - bias > closestDepth ? 0.25 : 1.0);
|
return (currentDepth - bias > closestDepth ? 0 : 1.0);
|
||||||
//return closestDepth / farPlane;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ Essential
|
||||||
- [x] Tone map shader
|
- [x] Tone map shader
|
||||||
- [x] Poisson soft shadowing
|
- [x] Poisson soft shadowing
|
||||||
- [ ] Frustum culling
|
- [ ] Frustum culling
|
||||||
- [ ] Shadow-casting point lights
|
- [x] Shadow-casting point lights
|
||||||
- [ ] Parabolic lights
|
- [ ] Parabolic lights
|
||||||
- [x] Skyboxes
|
- [x] Skyboxes
|
||||||
- [ ] Screen-space reflection
|
- [ ] Screen-space reflection
|
||||||
|
|
|
@ -227,7 +227,7 @@ namespace Kav
|
||||||
{
|
{
|
||||||
PointLightRender(camera, modelTransforms, pointLight);
|
PointLightRender(camera, modelTransforms, pointLight);
|
||||||
}
|
}
|
||||||
//DirectionalLightToonRender(camera, modelTransforms, directionalLight);
|
DirectionalLightToonRender(camera, modelTransforms, directionalLight);
|
||||||
SkyboxRender(camera, skybox);
|
SkyboxRender(camera, skybox);
|
||||||
|
|
||||||
GraphicsDevice.SetRenderTarget(null);
|
GraphicsDevice.SetRenderTarget(null);
|
||||||
|
@ -276,7 +276,7 @@ namespace Kav
|
||||||
TextureCube skybox
|
TextureCube skybox
|
||||||
) {
|
) {
|
||||||
GraphicsDevice.RasterizerState.CullMode = CullMode.CullClockwiseFace;
|
GraphicsDevice.RasterizerState.CullMode = CullMode.CullClockwiseFace;
|
||||||
SkyboxEffect.Skybox = PointShadowCubeMap;
|
SkyboxEffect.Skybox = skybox;
|
||||||
|
|
||||||
var view = camera.View;
|
var view = camera.View;
|
||||||
view.Translation = Vector3.Zero;
|
view.Translation = Vector3.Zero;
|
||||||
|
@ -459,7 +459,7 @@ namespace Kav
|
||||||
Deferred_ToonEffect.GNormal = gNormal;
|
Deferred_ToonEffect.GNormal = gNormal;
|
||||||
Deferred_ToonEffect.GMetallicRoughness = gMetallicRoughness;
|
Deferred_ToonEffect.GMetallicRoughness = gMetallicRoughness;
|
||||||
|
|
||||||
Deferred_ToonEffect.DitheredShadows = true;
|
Deferred_ToonEffect.DitheredShadows = false;
|
||||||
|
|
||||||
Deferred_ToonEffect.EyePosition = camera.Position;
|
Deferred_ToonEffect.EyePosition = camera.Position;
|
||||||
Deferred_ToonEffect.DirectionalLightDirection = directionalLight.Direction;
|
Deferred_ToonEffect.DirectionalLightDirection = directionalLight.Direction;
|
||||||
|
|
Loading…
Reference in New Issue