New test scene, better render quality (#6)
* Updated test scene * Adjusted lighting, tonemapping * Replaced skybox * Added bloom and FXAA * [meta] Added assets folder to build dependencies
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 971 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 167 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 612 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 898 KiB |
|
After Width: | Height: | Size: 929 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 707 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 932 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 249 KiB |
|
After Width: | Height: | Size: 983 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 244 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 530 KiB |
|
After Width: | Height: | Size: 976 KiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 339 KiB |
|
After Width: | Height: | Size: 445 KiB |
|
After Width: | Height: | Size: 4.1 MiB |
|
After Width: | Height: | Size: 345 KiB |
|
After Width: | Height: | Size: 597 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 445 KiB |
|
After Width: | Height: | Size: 990 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 916 KiB |
|
After Width: | Height: | Size: 253 KiB |
|
After Width: | Height: | Size: 443 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 284 KiB |
|
After Width: | Height: | Size: 914 KiB |
|
After Width: | Height: | Size: 274 KiB |
|
After Width: | Height: | Size: 419 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 258 KiB |
|
After Width: | Height: | Size: 197 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 916 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 309 KiB |
|
After Width: | Height: | Size: 937 KiB |
|
After Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 418 KiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 306 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 377 KiB |
|
After Width: | Height: | Size: 440 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 466 KiB |
|
After Width: | Height: | Size: 136 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 915 KiB |
|
After Width: | Height: | Size: 722 KiB |
|
After Width: | Height: | Size: 774 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 459 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 580 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 52 KiB |
@@ -3,9 +3,13 @@
|
||||
"$schema": "../node_modules/nx/schemas/project-schema.json",
|
||||
"projectType": "application",
|
||||
"sourceRoot": "./studio/src",
|
||||
"namedInputs": {
|
||||
"assets": ["{projectRoot}/assets/**/*"]
|
||||
},
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nxrs/cargo:build",
|
||||
"inputs": ["assets"],
|
||||
"options": {
|
||||
"release": false
|
||||
},
|
||||
@@ -17,6 +21,7 @@
|
||||
},
|
||||
"build:web": {
|
||||
"executor": "nx:run-commands",
|
||||
"inputs": ["assets"],
|
||||
"options": {
|
||||
"commands": [
|
||||
"wasm-pack build --out-dir ../dist/studio/ -- --features wasm",
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
use std::{f32::consts, mem};
|
||||
|
||||
use bevy::{
|
||||
core_pipeline::{
|
||||
bloom::{BloomCompositeMode, BloomPrefilterSettings, BloomSettings},
|
||||
fxaa::Fxaa,
|
||||
tonemapping::Tonemapping,
|
||||
},
|
||||
math::vec3,
|
||||
prelude::*,
|
||||
window::{CursorGrabMode, PrimaryWindow},
|
||||
@@ -59,18 +64,32 @@ impl Default for OrbitCam {
|
||||
}
|
||||
|
||||
fn spawn_camera(mut cmd: Commands) {
|
||||
let focus = vec3(0., 1.5, 0.);
|
||||
let focus = vec3(0.35011, 0.5, -0.99576);
|
||||
let camera_xform = Transform::from_xyz(-2.5, 4.5, 5.0).looking_at(focus, Vec3::Y);
|
||||
|
||||
cmd.spawn((
|
||||
// FIXME: Come up with a good way to separate the camera controller from
|
||||
// all the render settings here (all of these components need to
|
||||
// be paired with the camera)
|
||||
Camera3dBundle {
|
||||
transform: camera_xform,
|
||||
tonemapping: Tonemapping::BlenderFilmic,
|
||||
camera: Camera {
|
||||
hdr: true,
|
||||
..default()
|
||||
},
|
||||
..default()
|
||||
},
|
||||
BloomSettings {
|
||||
composite_mode: BloomCompositeMode::EnergyConserving,
|
||||
intensity: 0.25,
|
||||
prefilter_settings: BloomPrefilterSettings {
|
||||
threshold: 0.8,
|
||||
threshold_softness: 0.5,
|
||||
},
|
||||
..default()
|
||||
},
|
||||
Fxaa::default(),
|
||||
OrbitCam {
|
||||
focus,
|
||||
radius: Vec3::distance(camera_xform.translation, focus),
|
||||
|
||||
@@ -54,7 +54,7 @@ impl SkyboxPaths {
|
||||
}
|
||||
|
||||
fn setup(mut cmd: Commands, assets: Res<AssetServer>) {
|
||||
cmd.insert_resource(Cubemap::new("scythian_tombs_4k", &assets));
|
||||
cmd.insert_resource(Cubemap::new("test_scene", &assets));
|
||||
}
|
||||
|
||||
fn asset_loaded(
|
||||
|
||||