Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 0 additions & 92 deletions shaders/ambient_occlusion/ground_truth/gtao.comp

This file was deleted.

4 changes: 2 additions & 2 deletions shaders/deferredMrt.frag
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ layout (location = 6) in vec4 inPrevMvpPosition;

layout (location = 0) out vec4 normalTarget;// 10,10,10, (2 unused)
layout (location = 1) out vec4 albedoTarget;// 10,10,10, (2 -> 0 = environment Map, 1 = renderObject)
layout (location = 2) out vec4 pbrTarget;// 8 metallic, 8 roughness, 8 emissive (unused), 8 unused
layout (location = 3) out vec2 velocityTarget;// 16 X, 16 Y
layout (location = 2) out vec4 pbrTarget; // metal/roughness/unused/unused
layout (location = 3) out vec2 velocityTarget;

// layout (std140, set = 0, binding = 0) uniform SceneData - scene.glsl

Expand Down
3 changes: 0 additions & 3 deletions shaders/deferredMrt.vert
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ void main() {
outUV = uv;
outMaterialIndex = materialIndex;

//outCurrMvpPosition = sceneData.viewProj * worldPos;
//outPrevMvpPosition = sceneData.prevViewProj * models.previousModelMatrix * vec4(position, 1.0);

vec4 currClipPos = sceneData.viewProj * worldPos;
vec4 prevClipPos = sceneData.prevViewProj * models.previousModelMatrix * vec4(position, 1.0);
currClipPos.xy += currClipPos.w * sceneData.jitter.xy;
Expand Down
17 changes: 8 additions & 9 deletions shaders/postProcess.comp
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#version 460

#include "scene.glsl"

layout (local_size_x = 16, local_size_y = 16) in;

layout (set = 0, binding = 0) uniform sampler2D inputImage;
layout (rgba16f, set = 0, binding = 1) uniform image2D outputImage;
layout (set = 1, binding = 0) uniform sampler2D inputImage;
layout (rgba16f, set = 1, binding = 1) uniform image2D outputImage;


layout (push_constant) uniform PushConstants {
Expand Down Expand Up @@ -52,19 +54,16 @@ void main() {
return;
}

vec2 uv = (vec2(pixel.x, pixel.y) + 0.5) / vec2(push.width, push.height);

vec2 uv = (vec2(pixel.x, pixel.y) + 0.5) / sceneData.renderTargetSize;
// Flip final image (cause vulkan images starts from top-left)
uv.y = 1 - uv.y;

// Unjitter
uv += sceneData.jitter.xy / 2.0f;

vec3 color = texture(inputImage, uv).rgb;
vec2 texelSize = 1.0 / vec2(push.width, push.height);

if (push.flags == 0) {
imageStore(outputImage, pixel, vec4(color, 1.0));
return;
}

if ((push.flags & 2) != 0) {
color = sharpen(color, texelSize, uv);
}
Expand Down
Loading
Loading