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
// Generate log2 LUT stimulus | |
// [dependencies] | |
// image = "0.24" | |
// glam = "0.22" | |
use glam::{vec3, Vec3}; | |
use image::{ImageBuffer, Rgb}; | |
extern crate image; |
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
// Convert 32bit, 16bit, or RGB9E5 images in 3D or vertical strip format | |
// to either 16bit or RGB9E5 KTX2 with ZSTD supercompression in 3D | |
// Example cargo run -- --inputs tony_mc_mapface.dds,blender_-11_12.exr,AgX-default_contrast.exr --outputs tony_mc_mapface.ktx2,blender_-11_12.ktx2,AgX-default_contrast.ktx2 | |
// [dependencies] | |
// Should be able to use bevy 0.10 instead when it is release. Needed for exr support. (TODO rewrite without bevy) | |
// bevy = { git = "https://github.com/DGriffin91/bevy", branch = "tonemap_options", features = ["zstd", "ktx2", "exr", "dds"] } | |
// half = { version = "2.1" } | |
// ktx2 = { git = "https://github.com/BVE-Reborn/ktx2", rev = "4a7cc48ffa4deb3aa1ef5b453292220489908fa1" } |
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
// for converting https://github.com/MrLixm/AgXc/blob/main/obs/obs-script/AgX-default_contrast.lut.png | |
// to a vertical exr | |
// [dependencies] | |
// image = "0.24" | |
// glam = "0.22" | |
use std::path::Path; | |
use image::{DynamicImage, GenericImage, GenericImageView, ImageBuffer, Rgb}; |
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
// License: Apache-2.0 / MIT | |
// Combine multiple meshes in Bevy with Transforms | |
// Adapted from https://github.com/bevyengine/bevy/blob/main/examples/3d/3d_shapes.rs | |
use std::f32::consts::PI; | |
use bevy::{ | |
math::Vec4Swizzles, | |
prelude::*, | |
render::{ |
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
Compiling invalid-bitcast v0.1.0 | |
Invalid bitcast | |
%38 = bitcast <2 x i32> %37 to <2 x i24> | |
Invalid bitcast | |
%40 = bitcast <2 x i32> %39 to <2 x i24> | |
in function _ZN4rkyv5impls4core89_$LT$impl$u20$rkyv..DeserializeUnsized$LT$$u5b$U$u5d$$C$D$GT$$u20$for$u20$$u5b$T$u5d$$GT$19deserialize_unsized17h8bf3deadc9a4552bE | |
LLVM ERROR: Broken function found, compilation aborted! | |
error: could not compile `invalid-bitcast` |
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
// License: Apache-2.0 / MIT | |
//camera controller from https://github.com/DGriffin91/bevy_basic_camera | |
use bevy::{ | |
diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}, | |
prelude::*, | |
render::render_resource::PrimitiveTopology, | |
}; | |
use bevy_basic_camera::{CameraController, CameraControllerPlugin}; |
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
// License: Apache-2.0 / MIT | |
use std::num::NonZeroU8; | |
use bevy::{ | |
asset::HandleId, | |
prelude::*, | |
render::{ | |
render_resource::{ | |
Extent3d, TextureDescriptor, TextureDimension, TextureFormat, TextureUsages, |
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
// License: Apache-2.0 / MIT | |
use bevy::{ | |
core_pipeline::clear_color::ClearColorConfig, | |
prelude::*, | |
render::{camera::RenderTarget, render_resource::*, view::RenderLayers}, | |
}; | |
fn main() { | |
App::new() |
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
// License: Apache-2.0 / MIT | |
use bevy::{ | |
prelude::*, | |
reflect::TypeUuid, | |
render::{ | |
camera::{Camera, RenderTarget}, | |
render_resource::{ | |
AsBindGroup, Extent3d, ShaderRef, TextureDescriptor, TextureDimension, TextureFormat, | |
TextureUsages, |
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
// License: Apache-2.0 / MIT | |
// lambert_material.wgsl: | |
/* | |
#import bevy_pbr::mesh_view_bindings | |
#import bevy_pbr::mesh_bindings | |
#import bevy_pbr::pbr_types | |
#import bevy_pbr::utils | |
#import bevy_pbr::clustered_forward |