FILE(GLOB WINDOWS_SRC src/*.c src/platforms/platform_win.c)
add_executable(posix_BC ${POSIX_SRC})
+add_executable(ng_posix_BC ${POSIX_SRC})
add_executable(windows_BC ${WINDOWS_SRC})
target_compile_definitions(posix_BC PUBLIC POSIX_BC=1)
+target_compile_definitions(ng_posix_BC PUBLIC POSIX_BC=1)
target_compile_definitions(windows_BC PUBLIC WINDOWS_BC=1)
-target_compile_options(posix_BC PUBLIC -Wall -g)
+target_compile_options(posix_BC PUBLIC -Wall -g -DENABLE_BARROWGEN)
+target_compile_options(ng_posix_BC PUBLIC -Wall -g)
target_link_libraries(posix_BC -lm -lpthread -lraylib)
+target_link_libraries(ng_posix_BC -lm -lpthread -lraylib)
target_link_libraries(windows_BC -lm -lpthread -lraylib)
set_target_properties(posix_BC PROPERTIES RUNTIME_OUTPUT_DIRECTORY ./bin/)
+set_target_properties(ng_posix_BC PROPERTIES RUNTIME_OUTPUT_DIRECTORY ./bin/)
set_target_properties(windows_BC PROPERTIES RUNTIME_OUTPUT_DIRECTORY ./bin/)
room_positions = (Vector3*)malloc(sizeof(Vector3)*(room_count + 1));
/* TODO: Clean this up and integrate into platform system. */
-#define ENABLE_BARROWGEN 1
-#if ENABLE_BARROWGEN
+#ifdef ENABLE_BARROWGEN
barrow.max_iterations *= 1;
IVec2 grid_size = {.x = GRID_X*2.0, .y = GRID_Y * 2.0};
GeneratorArgs gargs =
Vector3 vec3_down = {0.0f, -1.0f, 0.0f};
Vector3 vec3_zero = {0.0f, 0.0f, 0.0f};
-Color orb_color = BLUE;
-Color orb_target_color = BLUE;
+Color orb_color = SKYBLUE;
+Color orb_target_color = SKYBLUE;
Vector4 orb_normal_color;
float orb_intensity = 1.0f; /* TODO: normalized distance from center, but lighting shader already has this. */
Vector3 orb_directionality = {1.0f, 1.0f, 1.0f};
Vector3 each = room_positions[n];
DrawSphere(each, 1.0, RED);
}
- DrawSphere(map_center, 1.0, BLUE);
+ DrawSphere(map_center, 1.0, SKYBLUE);
DrawSphere(barrow_position, 1.0, GREEN);
DrawSphere(floor_position, 1.0, PURPLE);
- for (int n = 0; n < spawn_spoke_count; n++)
- {
- Ray* each = &spawn_spoke_rays[n];
- //DrawRay(*each, RED);
- }
+ //for (int n = 0; n < spawn_spoke_count; n++)
+ //{
+ // Ray* each = &spawn_spoke_rays[n];
+ // DrawRay(*each, RED);
+ //}
//DrawRay(player_collide_ray, RED);
EndShaderMode();
}
if (IsKeyReleased(KEY_ONE))
- orb_target_color = RED;
+ orb_target_color = SKYBLUE;
if (IsKeyReleased(KEY_TWO))
- orb_target_color = BLUE;
+ orb_target_color = RED;
if (IsKeyReleased(KEY_THREE))
+ orb_target_color = BLUE;
+ if (IsKeyReleased(KEY_FOUR))
orb_target_color = GREEN;
orb_color = ColorLerp(orb_color, orb_target_color, frame_time * 2);
//player_collide_point.y -= 1.0f;
controlfuncs[func_idx]();
-
SetShaderValue(shader, cam_position_shader_loc, &cam.position, SHADER_UNIFORM_VEC3);
SetShaderValue(shader, screen_dims_shader_loc, &fscreen_dims, SHADER_UNIFORM_VEC2);
SetShaderValue(shader, map_center_shader_loc, &map_center, SHADER_UNIFORM_VEC3);
const vec3 v3_unit = vec3(1.0f, 1.0f, 1.0f);
const float max_lum = 1.0f;
-const float max_lit_distance = 7.5f;
+const float max_lit_distance = 4.0f;
const float max_center_distance = 8.0f;
vec4 candle_color = vec4(228.0f/255.0f, 103.0f/255.0f, 1.0f/255.0f, 255.0f/255.0f);
-vec2 orb_pos = vec2(5.0 * (screen_dims.x/16), 8 * (screen_dims.y/16));
+vec2 orb_pos = vec2(3.0 * (screen_dims.x/16), 8 * (screen_dims.y/16));
float lumWeight = 0.0f;
if(normalized_lit_distance <= 1.0f)
{
- lumWeight = max(lumWeight, min(0.5f, easeOutExpo(normalized_lit_distance)));
+ lumWeight = max(lumWeight, min(0.6f, easeOutExpo(normalized_lit_distance)));
candle_weight = 1.0f - normalized_lit_distance;
}
float normal_distance_from_orb = distance(orb_pos, gl_FragCoord.xy)/orb_intensity;
if(normal_distance_from_orb < 1.0f)
{
- lumWeight = 3.0f;
+ lumWeight = 2.0f;
finalColor *= (orb_color * lumWeight);
- finalColor.a = (1.5 - easeOutExpo(normal_distance_from_orb));
+ finalColor.a = (2.5 - easeOutExpo(normal_distance_from_orb));
}
lumWeight = min(lumWeight, max_lum);
lumWeights = vec4(1.0f) * lumWeight;
lumWeights *= dot(finalColor, lumWeights);
- lighting_color = vec4(mix(orb_color.rgb * candle_weight, lumWeights.rgb, 0.4f), 1.0f);
+ lighting_color = vec4(mix(orb_color.rgb * candle_weight, lumWeights.rgb, 0.2f), 1.0f);
//lighting_color = vec4(mix(candle_color.rgb * candle_weight, lumWeights.rgb, 0.4f), 1.0f);
finalColor = finalColor * lighting_color;
+ float factor = 35.0;
+ finalColor.r = round((finalColor.r) * factor) / factor;
+ finalColor.g = round((finalColor.g) * factor) / factor;
+ finalColor.b = round((finalColor.b) * factor) / factor;
+
// All single color channel variations with this looks cool as FUCK
// turns this into three levels going b-r-g
//finalColor.b = 0.0f;
uniform vec2 screen_dims;
uniform vec3 map_center;
uniform mat4 matModel;
+uniform float d_time;
// Output vertex attributes (to fragment shader)
out vec2 fragTexCoord;
{
albedo_buffer[x][y] = 0xFF114769;
}
+ albedo_buffer[x][y] += (0x001F1F1F * (rand() % 2));
}
}