Skip to content

Commit

Permalink
A lot of improvements
Browse files Browse the repository at this point in the history
Fixed some bugs
Removed old resolution choise window
New settings now work just fine
  • Loading branch information
MichaelMoroz committed Aug 31, 2019
1 parent c30a7eb commit 646a118
Show file tree
Hide file tree
Showing 18 changed files with 570 additions and 4,362 deletions.
796 changes: 0 additions & 796 deletions game_folder/shaders/compute/Final_step.glsl_error.txt

This file was deleted.

821 changes: 0 additions & 821 deletions game_folder/shaders/compute/Illumination_step.glsl_error.txt

This file was deleted.

438 changes: 0 additions & 438 deletions game_folder/shaders/compute/MRRM1.glsl_error.txt

This file was deleted.

833 changes: 0 additions & 833 deletions game_folder/shaders/compute/MRRM3.glsl_error.txt

This file was deleted.

809 changes: 0 additions & 809 deletions game_folder/shaders/compute/Shading_step.glsl_error.txt

This file was deleted.

6 changes: 2 additions & 4 deletions game_folder/shaders/compute/camera.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ struct ray
vec3 dir;
};

struct gl_camera
struct glcamera
{
vec3 position;
vec3 dirx;
Expand All @@ -23,8 +23,6 @@ struct gl_camera
float bloomintensity;
float bloomtreshold;
float bloomradius;
int stepN;
int step;
};


Expand All @@ -35,7 +33,7 @@ ivec2 getGpos(int index)
return ivec2(x,y);
}

uniform gl_camera Camera;
uniform glcamera Camera;
float fovray;

ray get_ray(vec2 screen_pos)
Expand Down
4 changes: 2 additions & 2 deletions game_folder/shaders/compute/distance_estimators.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ float de_marble(vec4 p)

vec4 col_marble(vec4 p)
{
vec4 col = vec4(0, 0, 0, de_sphere(p - vec4(iMarblePos, 0), iMarbleRad));
return vec4(col.x, col.y, col.z, de_sphere(p - vec4(iMarblePos, 0), iMarbleRad));
vec4 col = vec4(0.5, 0.5, 0.5, de_sphere(p - vec4(iMarblePos, 0), iMarbleRad));
return col;
}

float de_flag(vec4 p)
Expand Down
7 changes: 3 additions & 4 deletions game_folder/shaders/compute/shading.glsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include<ray_marching.glsl>

#define PI 3.14159265
#define AMBIENT_MARCHES 5
#define AMBIENT_MARCHES 7
#define AMBIENT_COLOR 2*vec4(1,1,1,1)
#define LIGHT_ANGLE 0.08

Expand All @@ -16,7 +16,6 @@ uniform bool SHADOWS_ENABLED;
//better to use a sampler though
vec4 interp(layout (rgba32f) image2D text, vec2 coord)
{
//coord *= 0.99;
ivec2 ci = ivec2(coord);
vec2 d = coord - floor(coord);
return imageLoad(text, ci)*(1-d.x)*(1-d.y) +
Expand Down Expand Up @@ -121,7 +120,7 @@ vec4 ambient_occlusion(in vec4 pos, in vec4 norm, in vec4 dir)
for(int i = 0; i < AMBIENT_MARCHES; i++)
{
//moving in a zig-zag
vec3 direction = normalize(norm.xyz + 0.6*((mod(shifter,3.f)-1)*dir1 + (mod(shifter+1,3.f)-1)*dir2));
vec3 direction = normalize(norm.xyz + 0.8*((mod(shifter,3.f)-1)*dir1 + (mod(shifter+1,3.f)-1)*dir2));
shifter += 1;
pos.xyz += pos.w*direction;
pos.w = DE(pos.xyz);
Expand Down Expand Up @@ -193,7 +192,7 @@ vec3 lighting(vec4 color, vec4 pos, vec4 dir, vec4 norm, vec3 refl, vec3 refr, f
float roughness = PBR_ROUGHNESS;
vec3 L = normalize(LIGHT_DIRECTION);
vec3 H = normalize(V + L);
vec3 radiance = sun_color*shadow*(0.6+0.4*ambient_color.w);
vec3 radiance = sun_color*shadow*(0.8+0.2*ambient_color.w);

// cook-torrance brdf
float NDF = DistributionGGX(N, H, roughness);
Expand Down
Loading

0 comments on commit 646a118

Please sign in to comment.