Commit c16c02ba authored by Florian Oetke's avatar Florian Oetke
Browse files

fixed error setting physicsFS options, uninitialized variable in shader and...

fixed error setting physicsFS options, uninitialized variable in shader and normalized attribution comments in shaders
parent 705857c4
// Based on: https://learnopengl.com/#!PBR/IBL/Specular-IBL
// TODO: refactor and rewrite as required
float DistributionGGX(vec3 N, vec3 H, float roughness) {
const float PI = 3.14159265359;
......
......@@ -140,10 +140,10 @@ float calc_avg_occluder(vec3 surface_lightspace, float search_area,
out int num_occluders) {
int shadowmap = int(model_uniforms.light_data2.r);
float depth_acc;
float depth_count;
float depth_acc=0;
float depth_count=0;
num_occluders = 0;
#
float angle = random(vec4(surface_lightspace, global_uniforms.time.y));
float sin_angle = sin(angle);
float cos_angle = cos(angle);
......
......@@ -2,6 +2,7 @@
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
// Based on http://graphics.cs.williams.edu/papers/SAOHPG12/McGuire12SAO.pdf
layout(location = 0) in Vertex_data {
vec2 tex_coords;
......@@ -30,8 +31,6 @@ layout(push_constant) uniform Push_constants {
#include "poisson.glsl"
#include "random.glsl"
// heavily based on http://graphics.cs.williams.edu/papers/SAOHPG12/McGuire12SAO.pdf
vec3 to_view_space(ivec2 ss_p, int mip) {
vec2 uv = vec2(ss_p) / textureSize(depth_sampler, MIN_MIP);
......
......@@ -2,6 +2,10 @@
#extension GL_ARB_separate_shader_objects : enable
#extension GL_ARB_shading_language_420pack : enable
// Based on:
// http://twvideo01.ubm-us.net/o1/vault/gdc2016/Presentations/Pedersen_LasseJonFuglsang_TemporalReprojectionAntiAliasing.pdf
// https://github.com/playdeadgames/temporal
#include "global_uniforms.glsl"
#include "normal_encoding.glsl"
......@@ -83,10 +87,6 @@ vec3 prev_color_normalized(vec2 uv) {
}
void main() {
// based on:
// http://twvideo01.ubm-us.net/o1/vault/gdc2016/Presentations/Pedersen_LasseJonFuglsang_TemporalReprojectionAntiAliasing.pdf
// https://github.com/playdeadgames/temporal
mat4 reprojection_fov = constants.reprojection_fov;
vec2 offset = vec2(reprojection_fov[0][3], reprojection_fov[1][3]);
reprojection_fov[0][3] = 0;
......
......@@ -18,9 +18,9 @@ include(nuklear_interface.cmake)
add_subdirectory(magic_get)
SET(PHYSFS_INTERNAL_ZLIB TRUE)
SET(PHYSFS_ARCHIVE_7Z FALSE)
SET(PHYSFS_BUILD_SHARED FALSE)
SET(PHYSFS_INTERNAL_ZLIB TRUE CACHE BOOL "" FORCE)
SET(PHYSFS_ARCHIVE_7Z FALSE CACHE BOOL "" FORCE)
SET(PHYSFS_BUILD_SHARED FALSE CACHE BOOL "" FORCE)
add_subdirectory(physfs)
add_subdirectory(sdl_vulkan)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment