Archived
1
Fork 0

Fix more stuff in SMAA pass

Now it's no longer flipped for some reason, gamma correction soon to follow
This commit is contained in:
Joshua Goins 2022-04-04 11:06:39 -04:00
parent 37866a9470
commit b5655efe0e
4 changed files with 6 additions and 5 deletions

View file

@ -50,7 +50,6 @@ void SMAAPass::render(GFXCommandBuffer* command_buffer, RenderTarget& target) {
struct PushConstant {
prism::float4 viewport;
Matrix4x4 correction_matrix;
} pc;
pc.viewport = prism::float4(1.0f / static_cast<float>(target.extent.width), 1.0f / static_cast<float>(target.extent.height), target.extent.width, target.extent.height);
@ -149,7 +148,7 @@ void SMAAPass::create_pipelines() {
createInfo.render_pass = render_pass;
createInfo.shader_input.push_constants = {
{sizeof(prism::float4) + sizeof(Matrix4x4), 0}
{sizeof(prism::float4), 0}
};
createInfo.shader_input.bindings = {

View file

@ -8,7 +8,8 @@ layout(location = 5) out vec2 outPixUV;
void main() {
outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
gl_Position = correctionMatrix * vec4(outUV * 2.0 + -1.0, 0.0, 1.0);
gl_Position = vec4(outUV * 2.0 + -1.0, 0.0, 1.0);
outUV.y = 1.0 - outUV.y;
SMAABlendingWeightCalculationVS(outUV, outPixUV, outOffset);
}

View file

@ -7,7 +7,8 @@ layout(location = 1) out vec4 outOffset[3];
void main() {
outUV = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
gl_Position = correctionMatrix * vec4(outUV * 2.0 + -1.0, 0.0, 1.0);
gl_Position = vec4(outUV * 2.0 + -1.0, 0.0, 1.0);
outUV.y = 1.0 - outUV.y;
SMAAEdgeDetectionVS(outUV, outOffset);
}

View file

@ -3,10 +3,10 @@
#define SMAA_PRESET_ULTRA 1
#define SMAA_GLSL_4 1
#define SMAA_PREDICATION 1
#define SMAA_FLIP_Y 0
layout(push_constant) uniform PushConstant {
vec4 viewport;
mat4 correctionMatrix;
};
#include "smaa.glsl"