Fix skybox for web

This commit is contained in:
Danny McGee
2023-10-02 21:51:45 -04:00
parent e97c14c5da
commit 2273514fa6
3 changed files with 8 additions and 7 deletions
@@ -28,6 +28,9 @@ const mimeTypes = {
".png": "image/png",
".jpg": "image/jpeg",
".gif": "image/gif",
".hdr": "image/vnd.radiance",
".ktx": "image/ktx",
".ktx2": "image/ktx",
".svg": "image/svg+xml",
".json": "application/json",
".woff": "font/woff",
+4 -3
View File
@@ -1,7 +1,6 @@
use std::f32::consts;
use bevy::{
core_pipeline::prepass::{DepthPrepass, NormalPrepass},
input::mouse::{MouseButton, MouseMotion},
prelude::*,
window::{CursorGrabMode, PrimaryWindow},
@@ -52,10 +51,12 @@ fn spawn_camera(mut cmd: Commands) {
cmd.spawn((
Camera3dBundle {
transform: camera_xform,
camera: Camera {
hdr: true,
..default()
},
..default()
},
DepthPrepass,
NormalPrepass,
OrbitCam {
radius: camera_xform.translation.length(),
..default()
+1 -4
View File
@@ -13,10 +13,7 @@ pub struct TestScenePlugin;
impl Plugin for TestScenePlugin {
fn build(&self, app: &mut App) {
app.insert_resource(ClearColor(Color::hsl(0.0, 0.0, 0.25)))
.add_plugins(MaterialPlugin::<ProceduralGridMaterial> {
prepass_enabled: true,
..default()
})
.add_plugins(MaterialPlugin::<ProceduralGridMaterial>::default())
.add_systems(Startup, spawn_scene)
.add_systems(
PostUpdate,