Skip to content

Instantly share code, notes, and snippets.

Last login: Wed Jun 15 00:37:38 on ttys005
➜ ~/VulkanSDK/1.3.216.0/Applications/vulkaninfo.app/Contents/MacOS/vulkaninfo ; exit;
==========
VULKANINFO
==========
Vulkan Instance Version: 1.3.216
Instance Extensions: count = 13
@zakarumych
zakarumych / terrain.wgsl
Created June 14, 2022 17:25
Terrain shader
struct Uniforms {
offset: vec2<f32>,
scale: vec2<f32>,
tile_size: vec2<u32>,
time_ms: u32,
}
@group(0) @binding(2)
use std::{
mem::transmute,
ptr::{copy_nonoverlapping, write_bytes},
};
/*
QOI - The “Quite OK Image” format for fast, lossless image compression
Dominic Szablewski - https://phoboslab.org
; SPIR-V
; Version: 1.0
; Generator: Khronos; 28
; Bound: 120
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %vs_main "vs_main" %pos %joints %weights %pos_0 %color
OpEntryPoint Fragment %fs_main "fs_main" %pos_1 %color_0 %116
@zakarumych
zakarumych / empty.json
Last active October 9, 2020 08:40
empty json
{"data":[]}
use {
crate::{
mesh::{Binding, Indices, Mesh, MeshBuilder},
vertex::{
FromBytes as _, Normal3d, Position3d, Position3dNormal3d,
VertexLayout, VertexLocation, VertexType,
},
},
byteorder::LittleEndian,
futures::future::{try_join_all, BoxFuture},
use {
crate::{
config::{AssetSource, Config},
renderer::Renderer,
},
alex::{Accessor, Schedule, World, WorldAccess},
cfg_if::cfg_if,
color_eyre::Report,
goods::Cache,
lazy_static::lazy_static,
@zakarumych
zakarumych / cloudSettings
Last active February 27, 2020 19:13
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-02-27T19:13:44.086Z","extensionVersion":"v3.4.3"}
/// Trait for values that can be treted like bitsets.
pub trait BitSet {
/// Exponent of the bitset size.
type Exp: Unsigned;
/// Size of the bitset.
type Size: Unsigned;
/// Exponent for bitset size.
@zakarumych
zakarumych / lint.rs
Last active September 3, 2018 13:04
Crate level lint config.
//! Default crate level lint configuration I prefer to keep my code cleaner.
#![forbid(overflowing_literals)]
#![deny(missing_copy_implementations)]
#![deny(missing_debug_implementations)]
#![deny(missing_docs)]
#![deny(intra_doc_link_resolution_failure)]
#![deny(path_statements)]
#![deny(trivial_bounds)]