Skip to content

Commit

Permalink
Implement Point Light Shadows (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed Jun 21, 2022
1 parent 48ef810 commit 22bc9a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/EditorAssets/Projects/DefaultProject/10041.ERS
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ float ShadowCalculation(STRUCT_PointLight Light)
float bias = 0.05; // we use a much larger bias since depth is now in [near_plane, far_plane] range
float shadow = currentDepth - bias > closestDepth ? 1.0 : 0.0;
// display closestDepth as debug (to visualize depth cubemap)
FragColor = vec4(vec3(closestDepth / Light.MaxDistance), 1.0);
// FragColor = vec4(vec3(closestDepth / Light.MaxDistance), 1.0);

return 1.0f - shadow;
}
Expand Down Expand Up @@ -587,7 +587,7 @@ void main() {
// Apply Gamma Correction
if (HDREnabled_) {
vec3 Mapped = vec3(1.0f) - exp(-Color.xyz * Exposure_);
//FragColor = GammaCorrectResult(vec4(Mapped, 1.0f), GammaCorrectionEnabled_);
FragColor = GammaCorrectResult(vec4(Mapped, 1.0f), GammaCorrectionEnabled_);
} else {
FragColor = GammaCorrectResult(Color, GammaCorrectionEnabled_);
}
Expand Down

0 comments on commit 22bc9a8

Please sign in to comment.