mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-02-04 02:51:18 +01:00
edgedir fix
This commit is contained in:
@@ -88,7 +88,7 @@ index 7074999..9e2122e 100644
|
||||
float mean = (left.y+left.z+right.x+right.w)*0.25;
|
||||
left = left - vec4(mean);
|
||||
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 d2df646..91a8d4d 100644
|
||||
index d2df646..3e4f5cd 100644
|
||||
--- a/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag
|
||||
+++ b/sgsr/v1/include/glsl/sgsr1_shader_mobile_edge_direction.frag
|
||||
@@ -1,4 +1,4 @@
|
||||
@@ -97,7 +97,20 @@ index d2df646..91a8d4d 100644
|
||||
|
||||
//============================================================================================================
|
||||
//
|
||||
@@ -50,7 +50,7 @@ uniform highp vec4 ViewportInfo[1];
|
||||
@@ -40,17 +40,16 @@ precision highp int;
|
||||
////////////////////////
|
||||
|
||||
#if defined(UseUniformBlock)
|
||||
-layout (set=0, binding = 0) uniform UniformBlock
|
||||
-{
|
||||
- highp vec4 ViewportInfo[1];
|
||||
+layout( push_constant ) uniform constants {
|
||||
+ highp vec4 ViewportInfo[1];
|
||||
};
|
||||
-layout(set = 0, binding = 1) uniform mediump sampler2D ps0;
|
||||
+layout(set = 0, binding = 0) uniform mediump sampler2D ps0;
|
||||
#else
|
||||
uniform highp vec4 ViewportInfo[1];
|
||||
uniform mediump sampler2D ps0;
|
||||
#endif
|
||||
|
||||
@@ -106,7 +119,7 @@ index d2df646..91a8d4d 100644
|
||||
layout(location=0) out vec4 out_Target0;
|
||||
|
||||
float fastLanczos2(float x)
|
||||
@@ -98,11 +98,15 @@ vec2 edgeDirection(vec4 left, vec4 right)
|
||||
@@ -98,11 +97,15 @@ vec2 edgeDirection(vec4 left, vec4 right)
|
||||
|
||||
void main()
|
||||
{
|
||||
@@ -124,7 +137,7 @@ index d2df646..91a8d4d 100644
|
||||
|
||||
highp float xCenter;
|
||||
xCenter = abs(in_TEXCOORD0.x+-0.5);
|
||||
@@ -116,18 +120,21 @@ void main()
|
||||
@@ -116,18 +119,21 @@ void main()
|
||||
highp vec2 imgCoord = ((in_TEXCOORD0.xy*ViewportInfo[0].zw)+vec2(-0.5,0.5));
|
||||
highp vec2 imgCoordPixel = floor(imgCoord);
|
||||
highp vec2 coord = (imgCoordPixel*ViewportInfo[0].xy);
|
||||
|
||||
@@ -41,7 +41,7 @@ SGSR::SGSR(const Device& device, MemoryAllocator& memory_allocator, size_t image
|
||||
? BuildShader(m_device, SGSR1_SHADER_MOBILE_EDGE_DIRECTION_FRAG_SPV)
|
||||
: BuildShader(m_device, SGSR1_SHADER_MOBILE_FRAG_SPV);
|
||||
// 2 descriptors, 2 descriptor sets per invocation
|
||||
m_descriptor_pool = CreateWrappedDescriptorPool(m_device, 2 * m_image_count, 2 * m_image_count);
|
||||
m_descriptor_pool = CreateWrappedDescriptorPool(m_device, SGSR_STAGE_COUNT * m_image_count, SGSR_STAGE_COUNT * m_image_count);
|
||||
m_descriptor_set_layout = CreateWrappedDescriptorSetLayout(m_device, {VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER});
|
||||
|
||||
std::vector<VkDescriptorSetLayout> layouts(SGSR_STAGE_COUNT, *m_descriptor_set_layout);
|
||||
@@ -72,7 +72,6 @@ void SGSR::UpdateDescriptorSets(VkImageView image_view, size_t image_index) {
|
||||
std::vector<VkWriteDescriptorSet> updates;
|
||||
image_infos.reserve(1);
|
||||
updates.push_back(CreateWriteDescriptorSet(image_infos, *m_sampler, image_view, images.descriptor_sets[0], 0));
|
||||
updates.push_back(CreateWriteDescriptorSet(image_infos, *m_sampler, *images.image_views[0], images.descriptor_sets[1], 0));
|
||||
m_device.GetLogical().UpdateDescriptorSets(updates, {});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user