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
#include "mesh_type.hlsl" | |
#include "shader_util.hlsl" | |
#include "view_model_type.hlsl" | |
cbuffer ubo : register(b0, space1) | |
{ | |
ViewUniform view; | |
} | |
struct CustomMaterial |
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
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] | |
pub enum BS13RenderSet { | |
Init, | |
Pipeline, | |
/// Just the spot tangents are generated if enabled. The renderer can also use tangents from the GLTF and fallback | |
/// to generating them in the fragment shader. | |
GenerateTangents, |
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
mod profile_with_puffin; | |
use { | |
bytemuck::cast_slice, inline_spirv::inline_spirv, screen_13::prelude::*, | |
screen_13_window::Window, std::sync::Arc, winit::dpi::PhysicalSize, | |
}; | |
// A Vulkan triangle using a graphic pipeline, vertex/fragment shaders, and index/vertex buffers. | |
fn main() -> anyhow::Result<()> { | |
pretty_env_logger::init(); |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<style> | |
table.spirt-table-90c2056d-5b38-4644-824a-b4be1c82f14d { | |
border-collapse: collapse; | |
} | |
table.spirt-table-90c2056d-5b38-4644-824a-b4be1c82f14d>tbody>tr>*:not(:only-child) { |
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
use bevy::prelude::*; | |
fn main() { | |
App::new() | |
.add_plugins(DefaultPlugins) | |
.add_systems(Startup, setup) | |
.run(); | |
} | |
fn setup( |
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 example compares Forward, Forward + Prepass, and Deferred rendering. | |
use std::f32::consts::*; | |
use bevy::{ | |
core_pipeline::{ | |
fxaa::Fxaa, | |
prepass::{DeferredPrepass, DepthPrepass, MotionVectorPrepass, NormalPrepass}, | |
}, | |
pbr::NotShadowReceiver, |
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
use glam::{vec3, Vec3}; | |
pub const XYZ8E5_EXPONENT_BITS: i32 = 5; | |
pub const XYZ8E5_MANTISSA_BITS: i32 = 8; | |
pub const XYZ8E5_MANTISSA_BITSU: u32 = 8; | |
pub const XYZ8E5_EXP_BIAS: i32 = 15; | |
pub const XYZ8E5_MAX_VALID_BIASED_EXP: i32 = 31; | |
/* | |
pub const MAX_XYZ8E5_EXP: i32 = 16; |
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 example compares Forward, Forward + Prepass, and Deferred rendering. | |
use std::f32::consts::*; | |
use bevy::{ | |
core_pipeline::{ | |
fxaa::Fxaa, | |
prepass::{DeferredPrepass, DepthPrepass, MotionVectorPrepass, NormalPrepass}, | |
}, | |
pbr::{CascadeShadowConfigBuilder, DirectionalLightShadowMap}, |
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 example compares Forward, Forward + Prepass, and Deferred rendering. | |
use std::f32::consts::*; | |
use bevy::{ | |
core_pipeline::{ | |
fxaa::Fxaa, | |
prepass::{DepthPrepass, MotionVectorPrepass, NormalPrepass}, | |
}, | |
pbr::{CascadeShadowConfigBuilder, DirectionalLightShadowMap}, |
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 example compares Forward, Forward + Prepass, and Deferred rendering. | |
use std::f32::consts::*; | |
use bevy::{ | |
core_pipeline::{ | |
fxaa::Fxaa, | |
prepass::{DepthPrepass, MotionVectorPrepass, NormalPrepass}, | |
}, | |
pbr::NotShadowCaster, |
NewerOlder