From 38d93aacabba2317cc16f80a6d737b19d0b90dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariusz=20Kry=C5=84ski?= Date: Fri, 13 Nov 2020 10:44:32 +0100 Subject: [PATCH] do not set WGPU macro --- .../src/renderer/wgpu_render_resource_context.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/crates/bevy_wgpu/src/renderer/wgpu_render_resource_context.rs b/crates/bevy_wgpu/src/renderer/wgpu_render_resource_context.rs index 07c9fdf7da191..a2a7ae5d20df2 100644 --- a/crates/bevy_wgpu/src/renderer/wgpu_render_resource_context.rs +++ b/crates/bevy_wgpu/src/renderer/wgpu_render_resource_context.rs @@ -571,15 +571,9 @@ impl RenderResourceContext for WgpuRenderResourceContext { } fn get_specialized_shader(&self, shader: &Shader, macros: Option<&[String]>) -> Shader { - let macros: Vec = macros - .unwrap_or(&[]) - .iter() - .chain((&["WGPU".to_string()]).iter()) - .cloned() - .collect(); let spirv_data = match shader.source { ShaderSource::Spirv(ref bytes) => bytes.clone(), - ShaderSource::Glsl(ref source) => glsl_to_spirv(&source, shader.stage, Some(¯os)), + ShaderSource::Glsl(ref source) => glsl_to_spirv(&source, shader.stage, macros), }; Shader { source: ShaderSource::Spirv(spirv_data),