@dcl-regenesislabs/bevy-explorer-web 0.1.0-18354928058.commit-b951631 → 0.1.0-18381724482.commit-d31fa29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +1 -1
- package/index.html +2 -2
- package/main.js +4 -3
- package/package.json +3 -3
- package/pkg/webgpu_build.d.ts +8 -8
- package/pkg/webgpu_build.js +51 -51
- package/pkg/webgpu_build_bg.wasm +0 -0
- package/pkg/webgpu_build_bg.wasm.d.ts +8 -8
- package/assets/animations/Dance_Female.glb +0 -0
- package/assets/animations/Dance_Male.glb +0 -0
- package/assets/animations/F_FistPump.glb +0 -0
- package/assets/animations/F_RobotDance.glb +0 -0
- package/assets/animations/Hands_Air.glb +0 -0
- package/assets/animations/M_FistPump.glb +0 -0
- package/assets/animations/M_RobotDance.glb +0 -0
- package/assets/animations/Raise_Hand.glb +0 -0
- package/assets/animations/Throw Money-Emote.glb +0 -0
- package/assets/animations/Wave_Female.glb +0 -0
- package/assets/animations/Wave_Male.glb +0 -0
- package/assets/animations/clap.glb +0 -0
- package/assets/animations/disco_dance.glb +0 -0
- package/assets/animations/dont_wanna_see.glb +0 -0
- package/assets/animations/f_head_explode.glb +0 -0
- package/assets/animations/idle.glb +0 -0
- package/assets/animations/jump2.glb +0 -0
- package/assets/animations/kiss.glb +0 -0
- package/assets/animations/m_head_explode.glb +0 -0
- package/assets/animations/mchammer-dance.glb +0 -0
- package/assets/animations/run.glb +0 -0
- package/assets/animations/shrug.glb +0 -0
- package/assets/animations/tektonik-dance.glb +0 -0
- package/assets/animations/thumbnails/clap.png +0 -0
- package/assets/animations/thumbnails/dance.png +0 -0
- package/assets/animations/thumbnails/disco.png +0 -0
- package/assets/animations/thumbnails/dontsee.png +0 -0
- package/assets/animations/thumbnails/fistpump.png +0 -0
- package/assets/animations/thumbnails/hammer.png +0 -0
- package/assets/animations/thumbnails/handsair.png +0 -0
- package/assets/animations/thumbnails/headexplode.png +0 -0
- package/assets/animations/thumbnails/kiss.png +0 -0
- package/assets/animations/thumbnails/money.png +0 -0
- package/assets/animations/thumbnails/raisehand.png +0 -0
- package/assets/animations/thumbnails/robot.png +0 -0
- package/assets/animations/thumbnails/shrug.png +0 -0
- package/assets/animations/thumbnails/tektonik.png +0 -0
- package/assets/animations/thumbnails/tik.png +0 -0
- package/assets/animations/thumbnails/wave.png +0 -0
- package/assets/animations/tik-tok-dance.glb +0 -0
- package/assets/animations/walk.glb +0 -0
- package/assets/fonts/NotoSans-Bold.ttf +0 -0
- package/assets/fonts/NotoSans-BoldItalic.ttf +0 -0
- package/assets/fonts/NotoSans-Italic.ttf +0 -0
- package/assets/fonts/NotoSans-Regular.ttf +0 -0
- package/assets/fonts/NotoSansMono-Bold.ttf +0 -0
- package/assets/fonts/NotoSansMono-Regular.ttf +0 -0
- package/assets/fonts/NotoSerif-Bold.ttf +0 -0
- package/assets/fonts/NotoSerif-BoldItalic.ttf +0 -0
- package/assets/fonts/NotoSerif-Italic.ttf +0 -0
- package/assets/fonts/NotoSerif-Regular.ttf +0 -0
- package/assets/fonts/OFL.txt +0 -93
- package/assets/images/FriendsIcon.png +0 -0
- package/assets/images/ask.png +0 -0
- package/assets/images/backpack/Background.jpeg +0 -0
- package/assets/images/backpack/empty.png +0 -0
- package/assets/images/backpack/item_bg.png +0 -0
- package/assets/images/backpack/wearable_categories/body_shape.png +0 -0
- package/assets/images/backpack/wearable_categories/earring.png +0 -0
- package/assets/images/backpack/wearable_categories/eyebrows.png +0 -0
- package/assets/images/backpack/wearable_categories/eyes.png +0 -0
- package/assets/images/backpack/wearable_categories/eyewear.png +0 -0
- package/assets/images/backpack/wearable_categories/facial_hair.png +0 -0
- package/assets/images/backpack/wearable_categories/feet.png +0 -0
- package/assets/images/backpack/wearable_categories/hair.png +0 -0
- package/assets/images/backpack/wearable_categories/hands_wear.png +0 -0
- package/assets/images/backpack/wearable_categories/hat.png +0 -0
- package/assets/images/backpack/wearable_categories/helmet.png +0 -0
- package/assets/images/backpack/wearable_categories/lower_body.png +0 -0
- package/assets/images/backpack/wearable_categories/mask.png +0 -0
- package/assets/images/backpack/wearable_categories/mouth.png +0 -0
- package/assets/images/backpack/wearable_categories/skin.png +0 -0
- package/assets/images/backpack/wearable_categories/tiara.png +0 -0
- package/assets/images/backpack/wearable_categories/top_head.png +0 -0
- package/assets/images/backpack/wearable_categories/upper_body.png +0 -0
- package/assets/images/button copy.png +0 -0
- package/assets/images/button.png +0 -0
- package/assets/images/button_base.png +0 -0
- package/assets/images/chat_button.png +0 -0
- package/assets/images/copy.png +0 -0
- package/assets/images/crosshair.png +0 -0
- package/assets/images/cursor.png +0 -0
- package/assets/images/dao_small.png +0 -0
- package/assets/images/dcl-godot-bevy.png +0 -0
- package/assets/images/discover/art.png +0 -0
- package/assets/images/discover/business.png +0 -0
- package/assets/images/discover/casino.png +0 -0
- package/assets/images/discover/crypto.png +0 -0
- package/assets/images/discover/education.png +0 -0
- package/assets/images/discover/eye.png +0 -0
- package/assets/images/discover/fashion.png +0 -0
- package/assets/images/discover/featured.png +0 -0
- package/assets/images/discover/game.png +0 -0
- package/assets/images/discover/icons.png +0 -0
- package/assets/images/discover/music.png +0 -0
- package/assets/images/discover/point of interest.png +0 -0
- package/assets/images/discover/shop.png +0 -0
- package/assets/images/discover/social.png +0 -0
- package/assets/images/discover/sports.png +0 -0
- package/assets/images/discover/thumbsup.png +0 -0
- package/assets/images/emote-button-background.png +0 -0
- package/assets/images/emote_button.png +0 -0
- package/assets/images/genesis_tx.png +0 -0
- package/assets/images/grid.png +0 -0
- package/assets/images/grip.png +0 -0
- package/assets/images/left-arrow.png +0 -0
- package/assets/images/line.png +0 -0
- package/assets/images/mic_button_inactive.png +0 -0
- package/assets/images/mic_button_off.png +0 -0
- package/assets/images/mic_button_on.png +0 -0
- package/assets/images/next.png +0 -0
- package/assets/images/person.png +0 -0
- package/assets/images/person_button.png +0 -0
- package/assets/images/profile_button.png +0 -0
- package/assets/images/redx.png +0 -0
- package/assets/images/right-arrow.png +0 -0
- package/assets/images/screenshots/montage.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_avatar_attach_1.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_avatar_attach_2.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_avatar_attach_3.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_avatar_attach_4.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_gltfcontainer_avocado.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_gltfcontainer_hev.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_01.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_02.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_03.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_04.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_05.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_06.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_07.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_08.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_09.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_10.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_11.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_12.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_13.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_material_14.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_mesh_renderer_box.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_mesh_renderer_cylinder.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_mesh_renderer_plane.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_mesh_renderer_sphere.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_text_shape_1.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_text_shape_2.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_text_shape_3.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_text_shape_4.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_text_shape_5.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_text_shape_6.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_background_all_screen_green.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_background_all_screen_red.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_background_all_screen_rocks.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_text_1.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_text_2.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_video_player_1.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_video_player_2.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_video_player_3.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_video_player_4.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_visibility_false.png.png +0 -0
- package/assets/images/screenshots/screenshot%2Fbevy_snapshot_visibility_true.png.png +0 -0
- package/assets/images/skybox/skybox_cubemap.png +0 -0
- package/assets/images/skybox/skybox_cubemap_original.png +0 -0
- package/assets/images/spinner.png +0 -0
- package/assets/images/spinner_atlas.png +0 -0
- package/assets/images/tick.png +0 -0
- package/assets/images/toggle-off.png +0 -0
- package/assets/images/toggle-on.png +0 -0
- package/assets/images/unknown_person.png +0 -0
- package/assets/images/you_are_here.png +0 -0
- package/assets/nft_shapes/Baroque_Ornament.glb +0 -0
- package/assets/nft_shapes/Blocky.glb +0 -0
- package/assets/nft_shapes/Canvas.glb +0 -0
- package/assets/nft_shapes/Classic.glb +0 -0
- package/assets/nft_shapes/Diamond_Ornament.glb +0 -0
- package/assets/nft_shapes/Floor_Wood01.png +0 -0
- package/assets/nft_shapes/Genesis_TX.png +0 -0
- package/assets/nft_shapes/Gold_Carved.glb +0 -0
- package/assets/nft_shapes/Gold_Edges.glb +0 -0
- package/assets/nft_shapes/Gold_Rounded.glb +0 -0
- package/assets/nft_shapes/Gold_Wide.glb +0 -0
- package/assets/nft_shapes/Metal_Medium.glb +0 -0
- package/assets/nft_shapes/Metal_Rounded.glb +0 -0
- package/assets/nft_shapes/Metal_Slim.glb +0 -0
- package/assets/nft_shapes/Metal_Wide.glb +0 -0
- package/assets/nft_shapes/Minimal_Black.glb +0 -0
- package/assets/nft_shapes/Minimal_Grey.glb +0 -0
- package/assets/nft_shapes/Minimal_White.glb +0 -0
- package/assets/nft_shapes/Minimal_Wide.glb +0 -0
- package/assets/nft_shapes/MulticolorDotsLoading.png +0 -0
- package/assets/nft_shapes/NFTIcon.png +0 -0
- package/assets/nft_shapes/NoneIcon.png +0 -0
- package/assets/nft_shapes/Pins.glb +0 -0
- package/assets/nft_shapes/Tape.glb +0 -0
- package/assets/nft_shapes/Wood_Slim.glb +0 -0
- package/assets/nft_shapes/Wood_Twigs.glb +0 -0
- package/assets/nft_shapes/Wood_Wide.glb +0 -0
- package/assets/shaders/bound_material.wgsl +0 -183
- package/assets/shaders/bound_material_baker.wgsl +0 -145
- package/assets/shaders/bound_node.wgsl +0 -57
- package/assets/shaders/bound_prepass.wgsl +0 -160
- package/assets/shaders/floor_bake.wgsl +0 -30
- package/assets/shaders/floor_fragment.wgsl +0 -74
- package/assets/shaders/floor_vertex.wgsl +0 -47
- package/assets/shaders/loading.wgsl +0 -35
- package/assets/shaders/mask_material.wgsl +0 -117
- package/assets/shaders/nineslice_material.wgsl +0 -47
- package/assets/shaders/nishita_cloud.wgsl +0 -378
- package/assets/shaders/outline.wgsl +0 -69
- package/assets/shaders/simplex.wgsl +0 -77
- package/assets/shaders/stretch_uv_material.wgsl +0 -79
- package/assets/shaders/text_quad_vertex.wgsl +0 -78
- package/assets/sounds/avatar/avatar_footstep_jump01.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_jump02.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_jump03.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_land01.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_land02.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run01.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run02.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run03.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run04.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run05.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run06.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run07.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_run08.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk01.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk02.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk03.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk04.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk05.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk06.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk07.wav +0 -0
- package/assets/sounds/avatar/avatar_footstep_walk08.wav +0 -0
- package/assets/sounds/ui/generic_button_hover.wav +0 -0
- package/assets/sounds/ui/generic_button_press.wav +0 -0
- package/assets/sounds/ui/mainmenu_widget_open.wav +0 -0
- package/assets/sounds/ui/toggle_disable.wav +0 -0
- package/assets/sounds/ui/toggle_enable.wav +0 -0
- package/assets/sounds/ui/voice_chat_mic_off.wav +0 -0
- package/assets/sounds/ui/voice_chat_mic_on.wav +0 -0
- package/assets/sounds/ui/widget_chat_message_private_send.wav +0 -0
- package/assets/sounds/ui/widget_emotes_close.wav +0 -0
- package/assets/sounds/ui/widget_emotes_highlight.wav +0 -0
- package/assets/sounds/ui/widget_emotes_open.wav +0 -0
- package/assets/ui/app_settings.dui +0 -91
- package/assets/ui/avatar.dui +0 -18
- package/assets/ui/button.dui +0 -78
- package/assets/ui/change-realm.dui +0 -46
- package/assets/ui/chat.dui +0 -182
- package/assets/ui/combo.dui +0 -23
- package/assets/ui/dialog.dui +0 -46
- package/assets/ui/discover.dui +0 -139
- package/assets/ui/emote-select.dui +0 -45
- package/assets/ui/emote.dui +0 -116
- package/assets/ui/foreign-profile-dialog.dui +0 -18
- package/assets/ui/fullscreen-block.dui +0 -12
- package/assets/ui/login.dui +0 -72
- package/assets/ui/map.dui +0 -8
- package/assets/ui/minimap.dui +0 -16
- package/assets/ui/motd.dui +0 -25
- package/assets/ui/nft-dialog.dui +0 -29
- package/assets/ui/oow.dui +0 -41
- package/assets/ui/permissions-dialog.dui +0 -39
- package/assets/ui/permissions.dui +0 -54
- package/assets/ui/profile-detail.dui +0 -24
- package/assets/ui/profile.dui +0 -29
- package/assets/ui/spinner.dui +0 -3
- package/assets/ui/toast.dui +0 -27
- package/assets/ui/tracker.dui +0 -21
- package/assets/ui/update.dui +0 -16
- package/assets/ui/utils.dui +0 -40
- package/assets/ui/wearables.dui +0 -134
package/assets/images/cursor.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/images/grid.png
DELETED
|
Binary file
|
package/assets/images/grip.png
DELETED
|
Binary file
|
|
Binary file
|
package/assets/images/line.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/images/next.png
DELETED
|
Binary file
|
package/assets/images/person.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/images/redx.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_background_all_screen_green.png.png
DELETED
|
Binary file
|
package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_background_all_screen_red.png.png
DELETED
|
Binary file
|
package/assets/images/screenshots/screenshot%2Fbevy_snapshot_ui_background_all_screen_rocks.png.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/assets/images/tick.png
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
#import bevy_pbr::{
|
|
2
|
-
forward_io::{VertexOutput, FragmentOutput},
|
|
3
|
-
pbr_fragment::pbr_input_from_standard_material,
|
|
4
|
-
pbr_functions::{SampleBias, alpha_discard, apply_pbr_lighting, main_pass_post_lighting_processing},
|
|
5
|
-
pbr_bindings::{material, emissive_texture, emissive_sampler},
|
|
6
|
-
pbr_types::STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT,
|
|
7
|
-
mesh_view_bindings::{globals, view},
|
|
8
|
-
pbr_types,
|
|
9
|
-
}
|
|
10
|
-
#import "shaders/simplex.wgsl"::simplex_noise_3d
|
|
11
|
-
#import "shaders/outline.wgsl"::apply_outline
|
|
12
|
-
|
|
13
|
-
struct Bounds {
|
|
14
|
-
min: u32,
|
|
15
|
-
max: u32,
|
|
16
|
-
height: f32,
|
|
17
|
-
_padding0: u32,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
struct SceneBounds {
|
|
21
|
-
bounds: array<Bounds,8>,
|
|
22
|
-
distance: f32,
|
|
23
|
-
flags: u32,
|
|
24
|
-
num_bounds: u32,
|
|
25
|
-
_pad: u32,
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
fn unpack_bounds(packed: u32) -> vec2<f32> {
|
|
29
|
-
let x = i32((packed >> 16) & 0xFFFF);
|
|
30
|
-
let x_signed = select(x, x - 0x10000, (x & 0x8000) != 0);
|
|
31
|
-
let y = i32(packed & 0xFFFF);
|
|
32
|
-
let y_signed = select(y, y - 0x10000, (y & 0x8000) != 0);
|
|
33
|
-
return vec2<f32>(f32((x_signed) * 16), f32((y_signed) * 16));
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const SHOW_OUTSIDE: u32 = 1u;
|
|
37
|
-
//const OUTLINE: u32 = 2u; // replaced by OUTLINE shader def
|
|
38
|
-
const OUTLINE_RED: u32 = 4u;
|
|
39
|
-
const OUTLINE_FORCE: u32 = 8u;
|
|
40
|
-
|
|
41
|
-
@group(2) @binding(100)
|
|
42
|
-
var<uniform> bounds: SceneBounds;
|
|
43
|
-
|
|
44
|
-
@fragment
|
|
45
|
-
fn fragment(
|
|
46
|
-
in: VertexOutput,
|
|
47
|
-
@builtin(front_facing) is_front: bool,
|
|
48
|
-
#ifdef OUTLINE
|
|
49
|
-
#ifdef MULTISAMPLED
|
|
50
|
-
@builtin(sample_index) sample_index: u32,
|
|
51
|
-
#endif
|
|
52
|
-
#endif
|
|
53
|
-
) -> FragmentOutput {
|
|
54
|
-
// generate a PbrInput struct from the StandardMaterial bindings
|
|
55
|
-
var pbr_input = pbr_input_from_standard_material(in, is_front);
|
|
56
|
-
var out: FragmentOutput;
|
|
57
|
-
|
|
58
|
-
#ifdef OUTLINE
|
|
59
|
-
#ifndef MULTISAMPLED
|
|
60
|
-
let sample_index = 0u;
|
|
61
|
-
#endif
|
|
62
|
-
#endif
|
|
63
|
-
|
|
64
|
-
// apply emmissive multiplier
|
|
65
|
-
// dcl uses default 2.0 intensity. we also override bevy_pbr base emissive rules so that
|
|
66
|
-
// - if emissive texture is supplied but color is not, we use the texture (bevy by default multiplies emissive color and emissive texture, so color must be white to pass the texture through)
|
|
67
|
-
// - if emissive color (== gltf emissive_intensity == dcl pbr emissive_color * emissive_intensity) is supplied but emissive texture is not, we use emissive color * base color
|
|
68
|
-
// emissive color | emissive texture | result
|
|
69
|
-
// 0 no 0
|
|
70
|
-
// x no x * base color
|
|
71
|
-
// 0 t 2 * t
|
|
72
|
-
// x != 0 t x * t
|
|
73
|
-
var emissive: vec4<f32> = material.emissive;
|
|
74
|
-
#ifdef VERTEX_UVS
|
|
75
|
-
if ((material.flags & STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT) != 0u) {
|
|
76
|
-
if dot(emissive, emissive) == 0.0 {
|
|
77
|
-
emissive = vec4(2.0);
|
|
78
|
-
}
|
|
79
|
-
var bias: SampleBias;
|
|
80
|
-
bias.mip_bias = view.mip_bias;
|
|
81
|
-
emissive = vec4<f32>(emissive.rgb * textureSampleBias(
|
|
82
|
-
emissive_texture,
|
|
83
|
-
emissive_sampler,
|
|
84
|
-
#ifdef STANDARD_MATERIAL_EMISSIVE_UV_B
|
|
85
|
-
#ifdef VERTEX_UVS_B
|
|
86
|
-
(material.uv_transform * vec3(in.uv_b, 1.0)).xy,
|
|
87
|
-
#else
|
|
88
|
-
(material.uv_transform * vec3(in.uv, 1.0)).xy,
|
|
89
|
-
#endif
|
|
90
|
-
#else
|
|
91
|
-
(material.uv_transform * vec3(in.uv, 1.0)).xy,
|
|
92
|
-
#endif
|
|
93
|
-
bias.mip_bias,
|
|
94
|
-
).rgb, emissive.a);
|
|
95
|
-
} else {
|
|
96
|
-
if dot(emissive, emissive) != 0.0 {
|
|
97
|
-
// emissive is set, no emissive texture, use base color texture as emissive texture
|
|
98
|
-
emissive = emissive * pbr_input.material.base_color;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
#endif
|
|
102
|
-
// scale up for lumens
|
|
103
|
-
pbr_input.material.emissive = emissive * 10.0;
|
|
104
|
-
pbr_input.material.emissive.a = min(pbr_input.material.emissive.a, 1.0);
|
|
105
|
-
|
|
106
|
-
let world_position = pbr_input.world_position.xyz;
|
|
107
|
-
// check bounds
|
|
108
|
-
var outside_amt: f32 = 9999.0;
|
|
109
|
-
var nearest_region_distance: f32 = 9999.0;
|
|
110
|
-
var nearest_region_height: f32 = 9999.0;
|
|
111
|
-
if bounds.num_bounds > 0 {
|
|
112
|
-
for (var ix = 0u; ix < bounds.num_bounds; ix += 1u) {
|
|
113
|
-
let min_wp = unpack_bounds(bounds.bounds[ix].min);
|
|
114
|
-
let max_wp = unpack_bounds(bounds.bounds[ix].max);
|
|
115
|
-
|
|
116
|
-
let outside_xy = abs(clamp(world_position.xz, min_wp, max_wp) - world_position.xz);
|
|
117
|
-
let distance = max(outside_xy.x, outside_xy.y);
|
|
118
|
-
if distance < nearest_region_distance {
|
|
119
|
-
nearest_region_distance = distance;
|
|
120
|
-
nearest_region_height = bounds.bounds[ix].height;
|
|
121
|
-
}
|
|
122
|
-
outside_amt = min(outside_amt, distance);
|
|
123
|
-
}
|
|
124
|
-
let outside_height = max(world_position.y - nearest_region_height, 0.0);
|
|
125
|
-
outside_amt = max(outside_amt, outside_height);
|
|
126
|
-
} else {
|
|
127
|
-
outside_amt = 0.0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
var noise = 0.05;
|
|
131
|
-
var should_discard = false;
|
|
132
|
-
if outside_amt > 0.00 {
|
|
133
|
-
if outside_amt < bounds.distance {
|
|
134
|
-
noise = simplex_noise_3d(world_position * 2.0 + globals.time * vec3(0.2, 0.16, 0.24)) * 0.5 + 0.55;
|
|
135
|
-
if noise < (outside_amt - 0.125) / 2.0 {
|
|
136
|
-
should_discard = true;
|
|
137
|
-
}
|
|
138
|
-
} else if outside_amt > 0.05 {
|
|
139
|
-
should_discard = true;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
if should_discard && ((bounds.flags & SHOW_OUTSIDE) == 0) {
|
|
144
|
-
discard;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// alpha discard
|
|
148
|
-
pbr_input.material.base_color = alpha_discard(pbr_input.material, pbr_input.material.base_color);
|
|
149
|
-
|
|
150
|
-
// apply lighting
|
|
151
|
-
if (pbr_input.material.flags & bevy_pbr::pbr_types::STANDARD_MATERIAL_FLAGS_UNLIT_BIT) == 0u {
|
|
152
|
-
out.color = apply_pbr_lighting(pbr_input);
|
|
153
|
-
} else {
|
|
154
|
-
out.color = pbr_input.material.base_color;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if should_discard {
|
|
158
|
-
out.color.a = out.color.a * 0.5;
|
|
159
|
-
out.color.r = 4.0;
|
|
160
|
-
} else {
|
|
161
|
-
if noise < outside_amt / 2.0 {
|
|
162
|
-
out.color = mix(out.color, vec4(10.0, 1.0, 0.0, 1.0), (outside_amt / 2.0 - noise) / 0.125);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
#ifdef OUTLINE
|
|
167
|
-
let alpha_mode = material.flags & pbr_types::STANDARD_MATERIAL_FLAGS_ALPHA_MODE_RESERVED_BITS;
|
|
168
|
-
if (alpha_mode == pbr_types::STANDARD_MATERIAL_FLAGS_ALPHA_MODE_OPAQUE) || ((bounds.flags & OUTLINE_FORCE) != 0u) {
|
|
169
|
-
out.color = apply_outline(
|
|
170
|
-
in.position,
|
|
171
|
-
out.color,
|
|
172
|
-
(bounds.flags & OUTLINE_RED) != 0u,
|
|
173
|
-
sample_index,
|
|
174
|
-
);
|
|
175
|
-
}
|
|
176
|
-
#endif
|
|
177
|
-
|
|
178
|
-
// apply in-shader post processing (fog, alpha-premultiply, and also tonemapping, debanding if the camera is non-hdr)
|
|
179
|
-
// note this does not include fullscreen postprocessing effects like bloom.
|
|
180
|
-
out.color = main_pass_post_lighting_processing(pbr_input, out.color);
|
|
181
|
-
|
|
182
|
-
return out;
|
|
183
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
#import bevy_pbr::{
|
|
2
|
-
prepass_io::{VertexOutput, FragmentOutput},
|
|
3
|
-
pbr_fragment::pbr_input_from_standard_material,
|
|
4
|
-
pbr_functions::{SampleBias, alpha_discard, apply_pbr_lighting, main_pass_post_lighting_processing},
|
|
5
|
-
pbr_bindings::{material, emissive_texture, emissive_sampler},
|
|
6
|
-
pbr_types::STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT,
|
|
7
|
-
mesh_view_bindings::{globals, view},
|
|
8
|
-
pbr_types,
|
|
9
|
-
}
|
|
10
|
-
#import boimp::shared::pack_pbrinput;
|
|
11
|
-
|
|
12
|
-
struct Bounds {
|
|
13
|
-
min: u32,
|
|
14
|
-
max: u32,
|
|
15
|
-
height: f32,
|
|
16
|
-
_padding0: u32,
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
struct SceneBounds {
|
|
20
|
-
bounds: array<Bounds,8>,
|
|
21
|
-
distance: f32,
|
|
22
|
-
flags: u32,
|
|
23
|
-
num_bounds: u32,
|
|
24
|
-
_pad: u32,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
fn unpack_bounds(packed: u32) -> vec2<f32> {
|
|
28
|
-
let x = i32((packed >> 16) & 0xFFFF);
|
|
29
|
-
let x_signed = select(x, x - 0x10000, (x & 0x8000) != 0);
|
|
30
|
-
let y = i32(packed & 0xFFFF);
|
|
31
|
-
let y_signed = select(y, y - 0x10000, (y & 0x8000) != 0);
|
|
32
|
-
return vec2<f32>(f32((x_signed) * 16), f32((y_signed) * 16));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const SHOW_OUTSIDE: u32 = 1u;
|
|
36
|
-
//const OUTLINE: u32 = 2u; // replaced by OUTLINE shader def
|
|
37
|
-
const OUTLINE_RED: u32 = 4u;
|
|
38
|
-
const OUTLINE_FORCE: u32 = 8u;
|
|
39
|
-
|
|
40
|
-
@group(2) @binding(100)
|
|
41
|
-
var<uniform> bounds: SceneBounds;
|
|
42
|
-
|
|
43
|
-
@fragment
|
|
44
|
-
fn fragment(
|
|
45
|
-
in: VertexOutput,
|
|
46
|
-
@builtin(front_facing) is_front: bool,
|
|
47
|
-
#ifdef OUTLINE
|
|
48
|
-
#ifdef MULTISAMPLED
|
|
49
|
-
@builtin(sample_index) sample_index: u32,
|
|
50
|
-
#endif
|
|
51
|
-
#endif
|
|
52
|
-
) -> @location(0) vec2<u32> {
|
|
53
|
-
// generate a PbrInput struct from the StandardMaterial bindings
|
|
54
|
-
var pbr_input = pbr_input_from_standard_material(in, is_front);
|
|
55
|
-
var out: FragmentOutput;
|
|
56
|
-
|
|
57
|
-
#ifdef OUTLINE
|
|
58
|
-
#ifndef MULTISAMPLED
|
|
59
|
-
let sample_index = 0u;
|
|
60
|
-
#endif
|
|
61
|
-
#endif
|
|
62
|
-
|
|
63
|
-
// apply emmissive multiplier
|
|
64
|
-
// dcl uses default 2.0 intensity. we also override bevy_pbr base emissive rules so that
|
|
65
|
-
// - if emissive texture is supplied but color is not, we use the texture (bevy by default multiplies emissive color and emissive texture, so color must be white to pass the texture through)
|
|
66
|
-
// - if emissive color (== gltf emissive_intensity == dcl pbr emissive_color * emissive_intensity) is supplied but emissive texture is not, we use emissive color * base color
|
|
67
|
-
// emissive color | emissive texture | result
|
|
68
|
-
// 0 no 0
|
|
69
|
-
// x no x * base color
|
|
70
|
-
// 0 t 2 * t
|
|
71
|
-
// x != 0 t x * t
|
|
72
|
-
var emissive: vec4<f32> = material.emissive;
|
|
73
|
-
#ifdef VERTEX_UVS
|
|
74
|
-
if ((material.flags & STANDARD_MATERIAL_FLAGS_EMISSIVE_TEXTURE_BIT) != 0u) {
|
|
75
|
-
if dot(emissive, emissive) == 0.0 {
|
|
76
|
-
emissive = vec4(2.0);
|
|
77
|
-
}
|
|
78
|
-
var bias: SampleBias;
|
|
79
|
-
bias.mip_bias = view.mip_bias;
|
|
80
|
-
emissive = vec4<f32>(emissive.rgb * textureSampleBias(
|
|
81
|
-
emissive_texture,
|
|
82
|
-
emissive_sampler,
|
|
83
|
-
#ifdef STANDARD_MATERIAL_EMISSIVE_UV_B
|
|
84
|
-
#ifdef VERTEX_UVS_B
|
|
85
|
-
(material.uv_transform * vec3(in.uv_b, 1.0)).xy,
|
|
86
|
-
#else
|
|
87
|
-
(material.uv_transform * vec3(in.uv, 1.0)).xy,
|
|
88
|
-
#endif
|
|
89
|
-
#else
|
|
90
|
-
(material.uv_transform * vec3(in.uv, 1.0)).xy,
|
|
91
|
-
#endif
|
|
92
|
-
bias.mip_bias,
|
|
93
|
-
).rgb, emissive.a);
|
|
94
|
-
} else {
|
|
95
|
-
if dot(emissive, emissive) != 0.0 {
|
|
96
|
-
// emissive is set, no emissive texture, use base color texture as emissive texture
|
|
97
|
-
emissive = emissive * pbr_input.material.base_color;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
#endif
|
|
101
|
-
// scale up for lumens
|
|
102
|
-
pbr_input.material.emissive = emissive * 10.0;
|
|
103
|
-
pbr_input.material.emissive.a = min(pbr_input.material.emissive.a, 1.0);
|
|
104
|
-
|
|
105
|
-
let world_position = pbr_input.world_position.xyz;
|
|
106
|
-
|
|
107
|
-
// check bounds
|
|
108
|
-
var outside_amt: f32 = 9999.0;
|
|
109
|
-
var nearest_region_distance: f32 = 9999.0;
|
|
110
|
-
var nearest_region_height: f32 = 9999.0;
|
|
111
|
-
if bounds.num_bounds > 0 {
|
|
112
|
-
for (var ix = 0u; ix < bounds.num_bounds; ix += 1u) {
|
|
113
|
-
let min_wp = unpack_bounds(bounds.bounds[ix].min);
|
|
114
|
-
let max_wp = unpack_bounds(bounds.bounds[ix].max);
|
|
115
|
-
|
|
116
|
-
let outside_xy = abs(clamp(world_position.xz, min_wp, max_wp) - world_position.xz);
|
|
117
|
-
let distance = max(outside_xy.x, outside_xy.y);
|
|
118
|
-
if distance < nearest_region_distance {
|
|
119
|
-
nearest_region_distance = distance;
|
|
120
|
-
nearest_region_height = bounds.bounds[ix].height;
|
|
121
|
-
}
|
|
122
|
-
outside_amt = min(outside_amt, distance);
|
|
123
|
-
}
|
|
124
|
-
let outside_height = max(world_position.y - nearest_region_height, 0.0);
|
|
125
|
-
outside_amt = max(outside_amt, outside_height);
|
|
126
|
-
} else {
|
|
127
|
-
outside_amt = 0.0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
if outside_amt > bounds.distance {
|
|
131
|
-
discard;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// alpha discard
|
|
135
|
-
pbr_input.material.base_color = alpha_discard(pbr_input.material, pbr_input.material.base_color);
|
|
136
|
-
|
|
137
|
-
if pbr_input.material.base_color.a < 0.5 {
|
|
138
|
-
discard;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// use max of emissive and color (imposters only take albedo)
|
|
142
|
-
// pbr_input.material.base_color = max(pbr_input.material.base_color, pbr_input.material.emissive);
|
|
143
|
-
|
|
144
|
-
return pack_pbrinput(pbr_input);
|
|
145
|
-
}
|