From ec1092d19b6c9d0c2301f03a1fc4dfb8a8e9fe17 Mon Sep 17 00:00:00 2001 From: Shinmera Date: Fri, 1 Mar 2024 11:27:15 +0100 Subject: [PATCH] Idk --- package.lisp | 7 ++++--- renderer/ssao.lisp | 7 +++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.lisp b/package.lisp index 58dd9283f..f6088480f 100644 --- a/package.lisp +++ b/package.lisp @@ -1723,9 +1723,10 @@ ;; ssao,lisp (:export #:ssao-pass - #:position-map - #:normal-map - #:occlusion) + #:depth-map + #:occlusion + #:radius + #:bias) ;; static-vector.lisp (:export #:make-static-vector diff --git a/renderer/ssao.lisp b/renderer/ssao.lisp index 1572a1e90..42c24ca20 100644 --- a/renderer/ssao.lisp +++ b/renderer/ssao.lisp @@ -1,5 +1,12 @@ (in-package #:org.shirakumo.fraf.trial) +(define-shader-pass z-prepass (per-object-pass) + ((depth :port-type output :attachment :depth-attachment :texspec (:internal-format :depth-component))) + (:buffers (trial standard-environment-information))) + +(defmethod compute-shader ((type (eql :fragment-shader)) (pass z-prepass) object) + (load-time-value (list (glsl-toolkit:parse "void main(){}")))) + (defun generate-ssao-noise (&optional (samples 16)) (let ((array (make-array (* samples 3) :element-type 'single-float))) (dotimes (i samples array)