Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMoroz committed Aug 22, 2019
1 parent 16fd44f commit 6eac490
Show file tree
Hide file tree
Showing 16 changed files with 115 additions and 1,836 deletions.
4 changes: 2 additions & 2 deletions game_folder/shaders/compute/Illumination_step.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ void main() {

vec4 illum = vec4(0);

if(pos.w<2*td*fovray)
if(pos.w < max(2*fovray*td, MIN_DIST) && SHADOWS_ENABLED)
{
vec4 norm = calcNormal(pos.xyz, td*fovray/8);
norm.xyz = normalize(norm.xyz);
pos.xyz += norm.xyz* 10*td*fovray;
pos.xyz += norm.xyz*5*td*fovray;
illum.x = shadow_march(pos, normalize(vec4(LIGHT_DIRECTION,0)), MAX_DIST, 0.08);

//illum.y = ambient_occlusion(pos, norm);
Expand Down
Loading

0 comments on commit 6eac490

Please sign in to comment.