use bevy-glsl-to-spirv

This commit is contained in:
Carter Anderson 2020-08-09 18:56:25 -07:00
parent d67d05db97
commit 3deeb05264
2 changed files with 7 additions and 7 deletions

View File

@ -24,7 +24,7 @@ bevy_window = { path = "../bevy_window", version = "0.1" }
# rendering
spirv-reflect = "0.2.3"
glsl-to-spirv = { git = "https://github.com/cart/glsl-to-spirv" }
bevy-glsl-to-spirv = "0.1.7"
image = { version = "0.23", default-features = false, features = ["png", "hdr"] }
# misc

View File

@ -1,6 +1,6 @@
use super::ShaderLayout;
use bevy_asset::Handle;
use glsl_to_spirv::compile;
use bevy_glsl_to_spirv::compile;
use std::{io::Read, marker::Copy};
/// The stage of a shader
@ -11,12 +11,12 @@ pub enum ShaderStage {
Compute,
}
impl Into<glsl_to_spirv::ShaderType> for ShaderStage {
fn into(self) -> glsl_to_spirv::ShaderType {
impl Into<bevy_glsl_to_spirv::ShaderType> for ShaderStage {
fn into(self) -> bevy_glsl_to_spirv::ShaderType {
match self {
ShaderStage::Vertex => glsl_to_spirv::ShaderType::Vertex,
ShaderStage::Fragment => glsl_to_spirv::ShaderType::Fragment,
ShaderStage::Compute => glsl_to_spirv::ShaderType::Compute,
ShaderStage::Vertex => bevy_glsl_to_spirv::ShaderType::Vertex,
ShaderStage::Fragment => bevy_glsl_to_spirv::ShaderType::Fragment,
ShaderStage::Compute => bevy_glsl_to_spirv::ShaderType::Compute,
}
}
}