fuck this

This commit is contained in:
lizzie 2026-01-14 03:51:23 +00:00 committed by crueter
parent 08ea555d9b
commit 3b61b75107
3 changed files with 23 additions and 20 deletions

View File

@ -1,7 +1,7 @@
diff --git a/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag b/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag diff --git a/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag b/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag
index 69927af..c942bbc 100644 index 69927af..c942bbc 100644
--- a/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag --- a/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag
+++ b/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag +++ b/sgsr/v1/include/glsl/sgsr1_shader_mobile.frag
@@ -34,11 +34,10 @@ precision highp int; @@ -34,11 +34,10 @@ precision highp int;
//////////////////////// ////////////////////////
@ -45,10 +45,10 @@ index 69927af..c942bbc 100644
float mean = (left.y+left.z+right.x+right.w)*0.25; float mean = (left.y+left.z+right.x+right.w)*0.25;
left = left - vec4(mean); left = left - vec4(mean);
diff --git a/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag b/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag diff --git a/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag b/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag
index 1f1daa6..128a348 100644 index 1f1daa6..128a348 100644
--- a/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag --- a/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag
+++ b/d926/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag +++ b/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag
@@ -40,13 +40,12 @@ precision highp int; @@ -40,13 +40,12 @@ precision highp int;
//////////////////////// ////////////////////////

View File

@ -42,6 +42,9 @@ Various graphical filters exist - each of them aimed at a specific target/image
- **MMPX**: Nearest-neighbour filter aimed at providing higher pixel-art quality. - **MMPX**: Nearest-neighbour filter aimed at providing higher pixel-art quality.
- **Pros**: Offers decent pixel-art upscaling. - **Pros**: Offers decent pixel-art upscaling.
- **Cons**: Only works for pixel-art. - **Cons**: Only works for pixel-art.
- **SGSR**: Uses Snapdragon Studios Game Super Resolution to enhance image quality (similar to FSR, but for Adreno devices).
- **Pros**: Optimized for Adreno devices.
- **Cons**: Doesn't play nicely with non-Adreno devices.
### Anisotropy values ### Anisotropy values

View File

@ -116,10 +116,10 @@ VkImageView SGSR::Draw(Scheduler& scheduler, size_t image_index, VkImage source_
// highp vec4 // highp vec4
PushConstants viewport_con{}; PushConstants viewport_con{};
*reinterpret_cast<f32*>(viewport_con.data() + 0) = viewport_x; viewport_con[0] = std::bit_cast<u32>(viewport_x);
*reinterpret_cast<f32*>(viewport_con.data() + 1) = viewport_y; viewport_con[1] = std::bit_cast<u32>(viewport_y);
*reinterpret_cast<f32*>(viewport_con.data() + 2) = viewport_width; viewport_con[2] = std::bit_cast<u32>(viewport_width);
*reinterpret_cast<f32*>(viewport_con.data() + 3) = viewport_height; viewport_con[3] = std::bit_cast<u32>(viewport_height);
UploadImages(scheduler); UploadImages(scheduler);
UpdateDescriptorSets(source_image_view, image_index); UpdateDescriptorSets(source_image_view, image_index);
@ -135,17 +135,17 @@ VkImageView SGSR::Draw(Scheduler& scheduler, size_t image_index, VkImage source_
cmdbuf.Draw(3, 1, 0, 0); cmdbuf.Draw(3, 1, 0, 0);
cmdbuf.EndRenderPass(); cmdbuf.EndRenderPass();
TransitionImageLayout(cmdbuf, stage0_image, VK_IMAGE_LAYOUT_GENERAL); TransitionImageLayout(cmdbuf, stage0_image, VK_IMAGE_LAYOUT_GENERAL);
TransitionImageLayout(cmdbuf, stage1_image, VK_IMAGE_LAYOUT_GENERAL); // TransitionImageLayout(cmdbuf, stage1_image, VK_IMAGE_LAYOUT_GENERAL);
BeginRenderPass(cmdbuf, renderpass, stage1_framebuffer, extent); // BeginRenderPass(cmdbuf, renderpass, stage1_framebuffer, extent);
cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, stage1_pipeline); // cmdbuf.BindPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS, stage1_pipeline);
cmdbuf.BindDescriptorSets(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, stage1_descriptor_set, {}); // cmdbuf.BindDescriptorSets(VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline_layout, 0, stage1_descriptor_set, {});
cmdbuf.PushConstants(pipeline_layout, VK_SHADER_STAGE_FRAGMENT_BIT, viewport_con); // cmdbuf.PushConstants(pipeline_layout, VK_SHADER_STAGE_FRAGMENT_BIT, viewport_con);
cmdbuf.Draw(3, 1, 0, 0); // cmdbuf.Draw(3, 1, 0, 0);
cmdbuf.EndRenderPass(); // cmdbuf.EndRenderPass();
TransitionImageLayout(cmdbuf, stage1_image, VK_IMAGE_LAYOUT_GENERAL); // TransitionImageLayout(cmdbuf, stage1_image, VK_IMAGE_LAYOUT_GENERAL);
}); });
//return *images.image_views[1];
return *images.image_views[1]; return *images.image_views[0];
} }
} // namespace Vulkan } // namespace Vulkan