Skip to content

Commit

Permalink
Merge commit '9733613c07d65bc726f0eb1d955c363fb8e2b5c7' into taa-only
Browse files Browse the repository at this point in the history
  • Loading branch information
JMS55 committed Mar 2, 2023
2 parents 7c19b60 + 9733613 commit 33012fb
Show file tree
Hide file tree
Showing 94 changed files with 2,767 additions and 1,070 deletions.
1 change: 1 addition & 0 deletions .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ status = [
"run-examples-on-wasm",
"check-doc",
"check-missing-examples-in-docs",
"check-missing-features-in-docs",
# "check-unused-dependencies",
"ci",
"check-compiles",
Expand Down
60 changes: 59 additions & 1 deletion .github/workflows/ci-comment-failures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,65 @@ jobs:
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: 'You added a new example but didn\'t update the readme. Please run `cargo run -p build-example-pages -- update` to update it, and commit the file change.'
body: 'You added a new example but didn\'t update the readme. Please run `cargo run -p build-templated-pages -- update examples` to update it, and commit the file change.'
});
}
missing-features:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'failure'
steps:
- name: 'Download artifact'
id: find-artifact
uses: actions/github-script@v6
with:
result-encoding: string
script: |
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifacts = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "missing-features"
});
if (matchArtifacts.length == 0) { return "false" }
var matchArtifact = matchArtifacts[0];
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/missing-features.zip', Buffer.from(download.data));
return "true"
- run: unzip missing-features.zip
if: ${{ steps.find-artifact.outputs.result == 'true' }}
- name: 'Comment on PR'
if: ${{ steps.find-artifact.outputs.result == 'true' }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./NR'));
if (fs.existsSync('./missing-features')) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: 'You added a new feature but didn\'t add a description for it. Please update the root Cargo.toml file.'
});
}
if (fs.existsSync('./missing-update')) {
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
body: 'You added a new feature but didn\'t update the readme. Please run `cargo run -p build-templated-pages -- update features` to update it, and commit the file change.'
});
}
Expand Down
39 changes: 36 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@ jobs:
- uses: actions/checkout@v3
- name: check for missing metadata
id: missing-metadata
run: cargo run -p build-example-pages -- check-missing
run: cargo run -p build-templated-pages -- check-missing examples
- name: check for missing update
id: missing-update
run: cargo run -p build-example-pages -- update
run: cargo run -p build-templated-pages -- update examples
- name: Check for modified files
run: |
echo "if this step fails, run the following command and commit the changed file on your PR."
echo " > cargo run -p build-example-pages -- update"
echo " > cargo run -p build-templated-pages -- update examples"
git diff --quiet HEAD --
- name: Save PR number
if: ${{ failure() && github.event_name == 'pull_request' }}
Expand All @@ -283,6 +283,39 @@ jobs:
name: missing-examples
path: missing-examples/

check-missing-features-in-docs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: check for missing features
id: missing-features
run: cargo run -p build-templated-pages -- check-missing features
- name: check for missing update
id: missing-update
run: cargo run -p build-templated-pages -- update features
- name: Check for modified files
run: |
echo "if this step fails, run the following command and commit the changed file on your PR."
echo " > cargo run -p build-templated-pages -- update features"
git diff --quiet HEAD --
- name: Save PR number
if: ${{ failure() && github.event_name == 'pull_request' }}
run: |
mkdir -p ./missing-features
echo ${{ github.event.number }} > ./missing-features/NR
- name: log failed task - missing features
if: ${{ failure() && github.event_name == 'pull_request' && steps.missing-features.conclusion == 'failure' }}
run: touch ./missing-features/missing-features
- name: log failed task - missing update
if: ${{ failure() && github.event_name == 'pull_request' && steps.missing-update.conclusion == 'failure' }}
run: touch ./missing-features/missing-update
- uses: actions/upload-artifact@v2
if: ${{ failure() && github.event_name == 'pull_request' }}
with:
name: missing-features
path: missing-features/

check-unused-dependencies:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
118 changes: 102 additions & 16 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ members = [
"crates/*",
"examples/mobile",
"tools/ci",
"tools/build-example-pages",
"tools/build-templated-pages",
"tools/build-wasm-example",
"errors",
]
Expand Down Expand Up @@ -56,62 +56,136 @@ default = [
# Force dynamic linking, which improves iterative compile times
dynamic_linking = ["bevy_dylib", "bevy_internal/dynamic_linking"]

# Optional bevy crates
# Provides animation functionality
bevy_animation = ["bevy_internal/bevy_animation"]

# Provides asset functionality
bevy_asset = ["bevy_internal/bevy_asset"]

# Provides audio functionality
bevy_audio = ["bevy_internal/bevy_audio"]

# Provides cameras and other basic render pipeline features
bevy_core_pipeline = ["bevy_internal/bevy_core_pipeline"]

# Plugin for dynamic loading (using [libloading](https://crates.io/crates/libloading))
bevy_dynamic_plugin = ["bevy_internal/bevy_dynamic_plugin"]

# Adds gamepad support
bevy_gilrs = ["bevy_internal/bevy_gilrs"]

# [glTF](https://www.khronos.org/gltf/) support
bevy_gltf = ["bevy_internal/bevy_gltf"]

# Adds PBR rendering
bevy_pbr = ["bevy_internal/bevy_pbr"]

# Provides rendering functionality
bevy_render = ["bevy_internal/bevy_render"]

# Provides scene functionality
bevy_scene = ["bevy_internal/bevy_scene"]

# Provides sprite functionality
bevy_sprite = ["bevy_internal/bevy_sprite"]

# Provides text functionality
bevy_text = ["bevy_internal/bevy_text"]

# A custom ECS-driven UI framework
bevy_ui = ["bevy_internal/bevy_ui"]

# winit window and input backend
bevy_winit = ["bevy_internal/bevy_winit"]

# Tracing features
# Tracing support, saving a file in Chrome Tracing format
trace_chrome = ["trace", "bevy_internal/trace_chrome"]

# Tracing support, exposing a port for Tracy
trace_tracy = ["trace", "bevy_internal/trace_tracy"]

# Tracing support
trace = ["bevy_internal/trace"]

# Save a trace of all wgpu calls
wgpu_trace = ["bevy_internal/wgpu_trace"]

# Image format support for texture loading (PNG and HDR are enabled by default)
# EXR image format support
exr = ["bevy_internal/exr"]

# HDR image format support
hdr = ["bevy_internal/hdr"]

# PNG image format support
png = ["bevy_internal/png"]

# TGA image format support
tga = ["bevy_internal/tga"]

# JPEG image format support
jpeg = ["bevy_internal/jpeg"]

# BMP image format support
bmp = ["bevy_internal/bmp"]

# Basis Universal compressed texture support
basis-universal = ["bevy_internal/basis-universal"]

# DDS compressed texture support
dds = ["bevy_internal/dds"]

# KTX2 compressed texture support
ktx2 = ["bevy_internal/ktx2"]
# For ktx2 supercompression

# For KTX2 supercompression
zlib = ["bevy_internal/zlib"]

# For KTX2 supercompression
zstd = ["bevy_internal/zstd"]

# Audio format support (vorbis is enabled by default)
# FLAC audio format support
flac = ["bevy_internal/flac"]

# MP3 audio format support
mp3 = ["bevy_internal/mp3"]

# OGG/VORBIS audio format support
vorbis = ["bevy_internal/vorbis"]

# WAV audio format support
wav = ["bevy_internal/wav"]

# MP3 audio format support (through minimp3)
minimp3 = ["bevy_internal/minimp3"]

# AAC audio format support (through symphonia)
symphonia-aac = ["bevy_internal/symphonia-aac"]

# AAC, FLAC, MP3, MP4, OGG/VORBIS, and WAV audio formats support (through symphonia)
symphonia-all = ["bevy_internal/symphonia-all"]

# FLAC audio format support (through symphonia)
symphonia-flac = ["bevy_internal/symphonia-flac"]

# MP4 audio format support (through symphonia)
symphonia-isomp4 = ["bevy_internal/symphonia-isomp4"]
symphonia-mp3 = ["bevy_internal/symphonia-mp3"]

# OGG/VORBIS audio format support (through symphonia)
symphonia-vorbis = ["bevy_internal/symphonia-vorbis"]

# WAV audio format support (through symphonia)
symphonia-wav = ["bevy_internal/symphonia-wav"]

# Enable watching file system for asset hot reload
filesystem_watcher = ["bevy_internal/filesystem_watcher"]

# Enable serialization support through serde
serialize = ["bevy_internal/serialize"]

# Display server protocol support (X11 is enabled by default)
# Wayland display server support
wayland = ["bevy_internal/wayland"]

# X11 display server support
x11 = ["bevy_internal/x11"]

# Enable rendering of font glyphs using subpixel accuracy
Expand All @@ -124,18 +198,20 @@ bevy_ci_testing = ["bevy_internal/bevy_ci_testing"]
debug_asset_server = ["bevy_internal/debug_asset_server"]

# Enable animation support, and glTF animation loading
animation = ["bevy_internal/animation"]
animation = ["bevy_internal/animation", "bevy_animation"]

# Enable using a shared stdlib for cxx on Android.
# Enable using a shared stdlib for cxx on Android
android_shared_stdcxx = ["bevy_internal/android_shared_stdcxx"]

# Enable detailed trace event logging.
# These trace events are expensive even when off, thus they require compile time opt-in.
# Enable detailed trace event logging. These trace events are expensive even when off, thus they require compile time opt-in
detailed_trace = ["bevy_internal/detailed_trace"]

# Include tonemapping LUT KTX2 files.
# Include tonemapping Look Up Tables KTX2 files
tonemapping_luts = ["bevy_internal/tonemapping_luts"]

# Enable AccessKit on Unix backends (currently only works with experimental screen readers and forks.)
accesskit_unix = ["bevy_internal/accesskit_unix"]

[dependencies]
bevy_dylib = { path = "crates/bevy_dylib", version = "0.9.0", default-features = false, optional = true }
bevy_internal = { path = "crates/bevy_internal", version = "0.9.0", default-features = false }
Expand Down Expand Up @@ -872,6 +948,16 @@ description = "Full guide to Bevy's ECS"
category = "ECS (Entity Component System)"
wasm = false

[[example]]
name = "apply_system_buffers"
path = "examples/ecs/apply_system_buffers.rs"

[package.metadata.example.apply_system_buffers]
name = "Apply System Buffers"
description = "Show how to use `apply_system_buffers` system"
category = "ECS (Entity Component System)"
wasm = false

[[example]]
name = "component_change_detection"
path = "examples/ecs/component_change_detection.rs"
Expand Down Expand Up @@ -1247,7 +1333,7 @@ category = "Scene"
wasm = false

# Shaders
[[package.metadata.category]]
[[package.metadata.example_category]]
name = "Shaders"
description = """
These examples demonstrate how to implement different shaders in user code.
Expand Down Expand Up @@ -1303,7 +1389,7 @@ path = "examples/shader/shader_prepass.rs"

[package.metadata.example.shader_prepass]
name = "Material Prepass"
description = "A shader that uses the depth texture generated in a prepass"
description = "A shader that uses the various textures generated by the prepass"
category = "Shaders"
wasm = false

Expand Down Expand Up @@ -1378,7 +1464,7 @@ category = "Shaders"
wasm = false

# Stress tests
[[package.metadata.category]]
[[package.metadata.example_category]]
name = "Stress Tests"
description = """
These examples are used to test the performance and stability of various parts of the engine in an isolated way.
Expand Down
19 changes: 11 additions & 8 deletions assets/shaders/show_prepass.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@
#import bevy_pbr::mesh_view_bindings
#import bevy_pbr::prepass_utils

struct ShowPrepassSettings {
show_depth: u32,
show_normals: u32,
padding_1: u32,
padding_2: u32,
}
@group(1) @binding(0)
var<uniform> show_depth: f32;
@group(1) @binding(1)
var<uniform> show_normal: f32;
var<uniform> settings: ShowPrepassSettings;

@fragment
fn fragment(
@builtin(position) frag_coord: vec4<f32>,
@builtin(sample_index) sample_index: u32,
#import bevy_pbr::mesh_vertex_output
) -> @location(0) vec4<f32> {
if show_depth == 1.0 {
if settings.show_depth == 1u {
let depth = prepass_depth(frag_coord, sample_index);
return vec4(depth, depth, depth, 1.0);
} else if show_normal == 1.0 {
} else if settings.show_normals == 1u {
let normal = prepass_normal(frag_coord, sample_index);
return vec4(normal, 1.0);
} else {
// transparent
return vec4(0.0);
}

return vec4(0.0);
}
Loading

0 comments on commit 33012fb

Please sign in to comment.