Skip to content

Commit

Permalink
Make ssao kernel size adjustable
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jan 3, 2025
1 parent e6d5300 commit a7c18da
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/renderer/ssao.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const vec3[16] ssao_noise = vec3[16]
vec3(-0.8573853, 0.44876075, 0.0),
vec3(0.17841947, 0.655126, 0.0));

const int ssao_kernel_size = 64;
uniform int ssao_kernel_size = 64;
const vec3[64] ssao_kernel = vec3[64]
(vec3(0.05251223, 0.06853916, 0.050446518),
vec3(-0.046207886, 0.0068898234, 0.08866429),
Expand Down
3 changes: 2 additions & 1 deletion package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -1885,7 +1885,8 @@
#:depth-map
#:occlusion
#:ssao-radius
#:ssao-bias)
#:ssao-bias
#:ssao-kernel-size)
;; text.lisp
(:export
#:debug-text
Expand Down
3 changes: 2 additions & 1 deletion renderer/ssao.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@

(define-shader-pass ssao-pbr-render-pass (z-pre-pbr-render-pass)
((ssao-radius :initform 8.0 :initarg :ssao-radius :accessor ssao-radius :uniform T)
(ssao-bias :initform 5.0 :initarg :ssao-bias :accessor ssao-bias :uniform T))
(ssao-bias :initform 5.0 :initarg :ssao-bias :accessor ssao-bias :uniform T)
(ssao-kernel-size :initform 64 :initarg :ssao-kernel-size :accessor ssao-kernel-size :uniform T))
(:shader-file (trial "renderer/standard-render-pbr-ssao.glsl")))

(define-shader-pass ssao-pass (post-effect-pass)
Expand Down

0 comments on commit a7c18da

Please sign in to comment.