Skip to content

Commit

Permalink
Cmake versioning automatization
Browse files Browse the repository at this point in the history
also fixed DOF
  • Loading branch information
MichaelMoroz committed Feb 5, 2020
1 parent c525ec3 commit 7b37b5c
Show file tree
Hide file tree
Showing 17 changed files with 1,566 additions and 206 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.0)
project(MarbleMarcher)
cmake_minimum_required(VERSION 3.8)
project(MarbleMarcher VERSION "1.4.3")
set(CMAKE_CXX_STANDARD 17)
set(MM_VERSION 1.4.1)

configure_file(src/config.h.in config.h)

if (WIN32)
#CHECK THE BITNESS
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
Expand Down Expand Up @@ -52,9 +54,12 @@ target_include_directories(MarbleMarcherSources PUBLIC
${GLEW_INCLUDE_DIRS}
${OpenGL_INCLUDE_DIRS}
${GLM_INCLUDE_DIR}
${PROJECT_BINARY_DIR}
)

include_directories(${PROJECT_BINARY_DIR})
include_directories(${GLM_INCLUDE_DIR})

if(WIN32)
target_include_directories(MarbleMarcherSources PUBLIC
${SFML_INCLUDE_DIR}
Expand Down
Binary file modified assets/icon.ico
Binary file not shown.
Binary file modified game_folder/images/icon.ico
Binary file not shown.
Empty file removed game_folder/levels/scores.bin
Empty file.
2 changes: 1 addition & 1 deletion game_folder/locals/English.loc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Back To Main Menu
#CreateNewLvl
Create a new level
#About
©2019 Original by CodeParade, 1.4.1 beta, Community Edition
Original by CodeParade, Community Edition
Music by PettyTheft
#DetailControls
Roll WASD or Arrows
Expand Down
2 changes: 1 addition & 1 deletion game_folder/locals/German.loc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Zurück zum Hauptmenü
#CreateNewLvl
Erstelle ein neues Level
#About
©2019 Original by CodeParade, 1.4.1 beta, Community Edition
Original by CodeParade, Community Edition
Music von PettyTheft
#DetailControls
Rollen WASD oder Pfeiltasten
Expand Down
2 changes: 1 addition & 1 deletion game_folder/locals/Japanese.loc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Back To Main Menu
#CreateNewLvl
Create a new level
#About
©2019 Original by CodeParade, 1.4.1 beta, Community Edition
Original by CodeParade, Community Edition
Music by PettyTheft
#DetailControls
Roll WASD or Arrows
Expand Down
2 changes: 1 addition & 1 deletion game_folder/locals/Polish.loc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Powrót do menu
#CreateNewLvl
Stwórz nowy poziom
#About
©2019 Original by CodeParade, 1.4.1 beta, Community Edition
Original by CodeParade, Community Edition
Muzyka zrobiona przez PettyTheft
#DetailControls
Toczenie się WASD lub Strzałki
Expand Down
188 changes: 0 additions & 188 deletions game_folder/locals/Russian.loc

This file was deleted.

2 changes: 1 addition & 1 deletion game_folder/locals/Ukrainian.loc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Michael Moroz - англійська, українська та російськ
#CreateNewLvl
Створити новий рівень
#About
©2019 Original by CodeParade, 1.4.1 beta, Community Edition
Original by CodeParade, Community Edition
Музика PettyTheft
#DetailControls
Котитися WASD or Arrows
Expand Down
8 changes: 6 additions & 2 deletions game_folder/shaders/compute/PTGI/GI.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void main() {
vec2 pimg_size = vec2(imageSize(DE_input));
vec2 step_scale = img_size/pimg_size;

vec2 uv = (vec2(global_pos)+hash22(vec2(global_pos))-0.5)/img_size;
vec2 uv = (vec2(global_pos)+0.5*(hash22(vec2(global_pos))-0.5))/img_size;
ray rr = get_ray(uv);
ivec2 prev_pos = min(ivec2(round(uv*pimg_size)),ivec2(pimg_size)-1);
vec4 pos = vec4(rr.pos,0);
Expand Down Expand Up @@ -64,7 +64,11 @@ void main() {
pill *= removeK;
pdir *= removeK;

if(pos.w < max(2*fovray*td, MIN_DIST))
if(pos.w < -max(2*fovray*td, MIN_DIST))
{
pill = vec4(0.,0.,0.,1.);
}
else if(pos.w < max(2*fovray*td, MIN_DIST))
{
float seed = dot(global_pos,vec2(1., SQRT3)) + float(iFrame%1000)*123.5;

Expand Down
12 changes: 6 additions & 6 deletions game_folder/shaders/compute/main/Final_step.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ layout(rgba32f, binding = 6) uniform image2D color_HDR1;
#define DOF_samples 50
#define DOF

#define RA 5.
#define RA 5
const float GA = 2.399;
const mat2 rot = mat2(cos(GA),sin(GA),-sin(GA),cos(GA));

Expand All @@ -36,11 +36,11 @@ float convol_kernel(float w1, float w2, float rad)
return pow(r2,-0.5)*(this_p*cent_p+step(r1,r2)*step(w2,w1)*this_p);
}

vec4 loadDOFsample(ivec2 c)
vec4 loadDOFsample(ivec2 c, vec2 imgs)
{
float td = getTD(imageLoad(DE_input, c).xyz, c);
c = clamp(c, ivec2(0), ivec2(imgs)-1);
vec4 colorsamp = imageLoad(color_HDR1, c);
return vec4(colorsamp.xyz/colorsamp.w, td);
return vec4(colorsamp.xyz/colorsamp.w, getTD(imageLoad(DE_input, c).xyz, vec2(c)/imgs));
}

vec3 dof(vec2 uv)
Expand All @@ -49,15 +49,15 @@ vec3 dof(vec2 uv)
vec2 img_size = vec2(imageSize(color_HDR1));
vec2 pixel=vec2(img_size.x)*0.001, angle=vec2(0,rad);
vec4 acc=vec4(0);
vec4 center = loadDOFsample(ivec2(uv+pixel*(rad-1.)*angle));
vec4 center = loadDOFsample(ivec2(uv+pixel*(rad-1.)*angle), img_size);
acc += convol_kernel(center.w, center.w, rad)*vec4(center.xyz,1.);
rad=1.;
if(Camera.bokeh > 0.1) for (int j=0;j<DOF_samples;j++)
{
rad += 1./rad;
angle *= rot;

vec4 col = loadDOFsample(ivec2(uv+pixel*(rad-1.)*angle));
vec4 col = loadDOFsample(ivec2(uv+pixel*(rad-1.)*angle),img_size);

acc += convol_kernel(center.w, col.w, rad)*vec4(col.xyz,1.);
}
Expand Down
Loading

0 comments on commit 7b37b5c

Please sign in to comment.