-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
264 additions
and
405 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 11 additions & 14 deletions
25
crates/renderling/src/linkage/bloom_downsample_fragment.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,37 @@ | ||
#![allow(dead_code)] | ||
//! Automatically generated by Renderling's `build.rs`. | ||
use crate::linkage::ShaderLinkage; | ||
mod native { | ||
#[cfg(not(target_arch = "wasm32"))] | ||
mod target { | ||
pub const ENTRY_POINT: &str = "bloom::bloom_downsample_fragment"; | ||
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { | ||
wgpu::include_spirv!("../../shaders/bloom-bloom_downsample_fragment.spv") | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { | ||
log::info!( | ||
"creating native linkage for {}", | ||
"bloom_downsample_fragment" | ||
); | ||
super::ShaderLinkage { | ||
entry_point: ENTRY_POINT, | ||
module: device.create_shader_module(descriptor()).into(), | ||
} | ||
} | ||
} | ||
mod web { | ||
#[cfg(target_arch = "wasm32")] | ||
mod target { | ||
pub const ENTRY_POINT: &str = "bloombloom_downsample_fragment"; | ||
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { | ||
wgpu::include_spirv!("../../shaders/bloom-bloom_downsample_fragment.wgsl") | ||
wgpu::include_wgsl!("../../shaders/bloom-bloom_downsample_fragment.wgsl") | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { | ||
log::info!("creating web linkage for {}", "bloom_downsample_fragment"); | ||
super::ShaderLinkage { | ||
entry_point: ENTRY_POINT, | ||
module: device.create_shader_module(descriptor()).into(), | ||
} | ||
} | ||
} | ||
pub fn linkage_native(device: &wgpu::Device) -> ShaderLinkage { | ||
native::linkage(device) | ||
} | ||
pub fn linkage_web(device: &wgpu::Device) -> ShaderLinkage { | ||
web::linkage(device) | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> ShaderLinkage { | ||
if cfg!(feature = "wasm") { | ||
web::linkage(device) | ||
} else { | ||
native::linkage(device) | ||
} | ||
target::linkage(device) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,34 @@ | ||
#![allow(dead_code)] | ||
//! Automatically generated by Renderling's `build.rs`. | ||
use crate::linkage::ShaderLinkage; | ||
mod native { | ||
#[cfg(not(target_arch = "wasm32"))] | ||
mod target { | ||
pub const ENTRY_POINT: &str = "bloom::bloom_mix_fragment"; | ||
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { | ||
wgpu::include_spirv!("../../shaders/bloom-bloom_mix_fragment.spv") | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { | ||
log::info!("creating native linkage for {}", "bloom_mix_fragment"); | ||
super::ShaderLinkage { | ||
entry_point: ENTRY_POINT, | ||
module: device.create_shader_module(descriptor()).into(), | ||
} | ||
} | ||
} | ||
mod web { | ||
#[cfg(target_arch = "wasm32")] | ||
mod target { | ||
pub const ENTRY_POINT: &str = "bloombloom_mix_fragment"; | ||
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { | ||
wgpu::include_spirv!("../../shaders/bloom-bloom_mix_fragment.wgsl") | ||
wgpu::include_wgsl!("../../shaders/bloom-bloom_mix_fragment.wgsl") | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { | ||
log::info!("creating web linkage for {}", "bloom_mix_fragment"); | ||
super::ShaderLinkage { | ||
entry_point: ENTRY_POINT, | ||
module: device.create_shader_module(descriptor()).into(), | ||
} | ||
} | ||
} | ||
pub fn linkage_native(device: &wgpu::Device) -> ShaderLinkage { | ||
native::linkage(device) | ||
} | ||
pub fn linkage_web(device: &wgpu::Device) -> ShaderLinkage { | ||
web::linkage(device) | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> ShaderLinkage { | ||
if cfg!(feature = "wasm") { | ||
web::linkage(device) | ||
} else { | ||
native::linkage(device) | ||
} | ||
target::linkage(device) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,34 @@ | ||
#![allow(dead_code)] | ||
//! Automatically generated by Renderling's `build.rs`. | ||
use crate::linkage::ShaderLinkage; | ||
mod native { | ||
#[cfg(not(target_arch = "wasm32"))] | ||
mod target { | ||
pub const ENTRY_POINT: &str = "bloom::bloom_upsample_fragment"; | ||
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { | ||
wgpu::include_spirv!("../../shaders/bloom-bloom_upsample_fragment.spv") | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { | ||
log::info!("creating native linkage for {}", "bloom_upsample_fragment"); | ||
super::ShaderLinkage { | ||
entry_point: ENTRY_POINT, | ||
module: device.create_shader_module(descriptor()).into(), | ||
} | ||
} | ||
} | ||
mod web { | ||
#[cfg(target_arch = "wasm32")] | ||
mod target { | ||
pub const ENTRY_POINT: &str = "bloombloom_upsample_fragment"; | ||
pub fn descriptor() -> wgpu::ShaderModuleDescriptor<'static> { | ||
wgpu::include_spirv!("../../shaders/bloom-bloom_upsample_fragment.wgsl") | ||
wgpu::include_wgsl!("../../shaders/bloom-bloom_upsample_fragment.wgsl") | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> super::ShaderLinkage { | ||
log::info!("creating web linkage for {}", "bloom_upsample_fragment"); | ||
super::ShaderLinkage { | ||
entry_point: ENTRY_POINT, | ||
module: device.create_shader_module(descriptor()).into(), | ||
} | ||
} | ||
} | ||
pub fn linkage_native(device: &wgpu::Device) -> ShaderLinkage { | ||
native::linkage(device) | ||
} | ||
pub fn linkage_web(device: &wgpu::Device) -> ShaderLinkage { | ||
web::linkage(device) | ||
} | ||
pub fn linkage(device: &wgpu::Device) -> ShaderLinkage { | ||
if cfg!(feature = "wasm") { | ||
web::linkage(device) | ||
} else { | ||
native::linkage(device) | ||
} | ||
target::linkage(device) | ||
} |
Oops, something went wrong.