try fix x11 screens
This commit is contained in:
@@ -9,6 +9,7 @@ use std::{
|
|||||||
use vulkano::{
|
use vulkano::{
|
||||||
command_buffer::CommandBufferUsage,
|
command_buffer::CommandBufferUsage,
|
||||||
image::{sampler::Filter, view::ImageView, Image},
|
image::{sampler::Filter, view::ImageView, Image},
|
||||||
|
pipeline::graphics::color_blend::AttachmentBlend,
|
||||||
};
|
};
|
||||||
use wlx_capture::{
|
use wlx_capture::{
|
||||||
frame::{
|
frame::{
|
||||||
@@ -150,9 +151,9 @@ impl ScreenPipeline {
|
|||||||
let pipeline = app.graphics.create_pipeline(
|
let pipeline = app.graphics.create_pipeline(
|
||||||
view.clone(),
|
view.clone(),
|
||||||
shaders.get("vert_common").unwrap().clone(), // want panic
|
shaders.get("vert_common").unwrap().clone(), // want panic
|
||||||
shaders.get("frag_sprite").unwrap().clone(), // want panic
|
shaders.get("frag_screen").unwrap().clone(), // want panic
|
||||||
app.graphics.native_format,
|
app.graphics.native_format,
|
||||||
Some(BLEND_ALPHA),
|
Some(AttachmentBlend::default()),
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
let extentf = [extent[0] as f32, extent[1] as f32];
|
let extentf = [extent[0] as f32, extent[1] as f32];
|
||||||
|
|||||||
@@ -80,6 +80,26 @@ pub mod frag_sprite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub mod frag_screen {
|
||||||
|
vulkano_shaders::shader! {
|
||||||
|
ty: "fragment",
|
||||||
|
src: r"#version 310 es
|
||||||
|
precision highp float;
|
||||||
|
|
||||||
|
layout (location = 0) in vec2 in_uv;
|
||||||
|
layout (location = 0) out vec4 out_color;
|
||||||
|
|
||||||
|
layout (set = 0, binding = 0) uniform sampler2D in_texture;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
out_color = texture(in_texture, in_uv);
|
||||||
|
out_color.a = 1.0;
|
||||||
|
}
|
||||||
|
",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub mod frag_srgb {
|
pub mod frag_srgb {
|
||||||
vulkano_shaders::shader! {
|
vulkano_shaders::shader! {
|
||||||
ty: "fragment",
|
ty: "fragment",
|
||||||
|
|||||||
Reference in New Issue
Block a user