diff --git a/librashader-common/src/d3d11.rs b/librashader-common/src/d3d11.rs index a9d47fc..9516205 100644 --- a/librashader-common/src/d3d11.rs +++ b/librashader-common/src/d3d11.rs @@ -17,7 +17,6 @@ impl From for Direct3D11::D3D11_FILTER { match value { FilterMode::Linear => Direct3D11::D3D11_FILTER_MIN_MAG_MIP_LINEAR, FilterMode::Nearest => Direct3D11::D3D11_FILTER_MIN_MAG_MIP_POINT, - _ => Direct3D11::D3D11_FILTER_MIN_MAG_MIP_LINEAR, } } } diff --git a/librashader-runtime-d3d11/src/filter_chain.rs b/librashader-runtime-d3d11/src/filter_chain.rs index 1b3054c..cac5748 100644 --- a/librashader-runtime-d3d11/src/filter_chain.rs +++ b/librashader-runtime-d3d11/src/filter_chain.rs @@ -527,8 +527,8 @@ impl FilterChainD3D11 { handle: target.create_shader_resource_view()?, size, }, - filter, - wrap_mode, + filter: pass.config.filter, + wrap_mode: pass.config.wrap_mode, }; self.common.output_textures[index] = Some(source.clone()); } diff --git a/test/null.slang b/test/null.slang new file mode 100644 index 0000000..a09fd2c --- /dev/null +++ b/test/null.slang @@ -0,0 +1,29 @@ +#version 450 +// 450 or 310 es are recommended + +layout(set = 0, binding = 0, std140) uniform UBO +{ + mat4 MVP; +}; + +#pragma name StockShader +#pragma format R8G8B8A8_UNORM + +#pragma stage vertex +layout(location = 0) in vec4 Position; +layout(location = 1) in vec2 TexCoord; +layout(location = 0) out vec2 vTexCoord; +void main() +{ + gl_Position = MVP * Position; + vTexCoord = TexCoord; +} + +#pragma stage fragment +layout(location = 0) in vec2 vTexCoord; +layout(location = 0) out vec4 FragColor; +layout(binding = 1) uniform sampler2D Source; +void main() +{ + FragColor = texture(Source, vTexCoord); +} \ No newline at end of file diff --git a/test/null.slangp b/test/null.slangp new file mode 100644 index 0000000..1a0bcb2 --- /dev/null +++ b/test/null.slangp @@ -0,0 +1,7 @@ +shaders = "1" +shader0 = "null.slang" +wrap_mode0 = "clamp_to_border" +mipmap_input0 = "false" +alias0 = "" +float_framebuffer0 = "false" +srgb_framebuffer0 = "false" diff --git a/test/sf2.png b/test/sf2.png new file mode 100644 index 0000000..9b541df Binary files /dev/null and b/test/sf2.png differ diff --git a/triangle.png b/triangle.png new file mode 100644 index 0000000..36d2ed3 Binary files /dev/null and b/triangle.png differ