Skip to content

Commit

Permalink
update for assetsv2
Browse files Browse the repository at this point in the history
  • Loading branch information
DGriffin91 committed Sep 7, 2023
1 parent 562fec9 commit ec14655
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
9 changes: 4 additions & 5 deletions crates/bevy_core_pipeline/src/deferred/copy_lighting_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ use crate::{
prepass::{DeferredPrepass, ViewPrepassTextures},
};
use bevy_app::prelude::*;
use bevy_asset::{load_internal_asset, HandleUntyped};
use bevy_asset::{load_internal_asset, Handle};
use bevy_ecs::prelude::*;
use bevy_math::UVec2;
use bevy_reflect::TypeUuid;
use bevy_render::{
camera::ExtractedCamera,
render_resource::*,
Expand All @@ -28,8 +27,8 @@ use bevy_render::{

use super::DEFERRED_LIGHTING_PASS_ID_DEPTH_FORMAT;

const COPY_DEFERRED_LIGHTING_ID_SHADER_HANDLE: HandleUntyped =
HandleUntyped::weak_from_u64(Shader::TYPE_UUID, 5230948520734987);
pub const COPY_DEFERRED_LIGHTING_ID_SHADER_HANDLE: Handle<Shader> =
Handle::weak_from_u128(5230948520734987);
pub struct CopyDeferredLightingIdPlugin;

impl Plugin for CopyDeferredLightingIdPlugin {
Expand Down Expand Up @@ -160,7 +159,7 @@ impl FromWorld for CopyDeferredLightingIdPipeline {
layout: vec![layout.clone()],
vertex: fullscreen_shader_vertex_state(),
fragment: Some(FragmentState {
shader: COPY_DEFERRED_LIGHTING_ID_SHADER_HANDLE.typed(),
shader: COPY_DEFERRED_LIGHTING_ID_SHADER_HANDLE,
shader_defs: vec![],
entry_point: "fragment".into(),
targets: vec![],
Expand Down
11 changes: 5 additions & 6 deletions crates/bevy_pbr/src/deferred/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::{MeshPipeline, MeshViewBindGroup, ScreenSpaceAmbientOcclusionSettings};
use bevy_app::prelude::*;
use bevy_asset::{load_internal_asset, HandleUntyped};
use bevy_asset::{load_internal_asset, Handle};
use bevy_core_pipeline::{
clear_color::ClearColorConfig,
core_3d,
Expand All @@ -25,7 +25,6 @@ use bevy_render::{
Render, RenderSet,
};

use bevy_reflect::TypeUuid;
use bevy_render::{
render_graph::RenderGraphApp, render_resource::*, texture::BevyDefault, view::ExtractedView,
RenderApp,
Expand All @@ -38,8 +37,8 @@ use crate::{

pub struct PbrDeferredLightingPlugin;

pub const DEFERRED_LIGHTING_SHADER_HANDLE: HandleUntyped =
HandleUntyped::weak_from_u64(Shader::TYPE_UUID, 2708011359337029741);
pub const DEFERRED_LIGHTING_SHADER_HANDLE: Handle<Shader> =
Handle::weak_from_u128(2708011359337029741);

pub const DEFAULT_PBR_DEFERRED_LIGHTING_DEPTH_ID: u8 = 1;

Expand Down Expand Up @@ -310,13 +309,13 @@ impl SpecializedRenderPipeline for DeferredLightingLayout {
self.bind_group_layout_1.clone(),
],
vertex: VertexState {
shader: DEFERRED_LIGHTING_SHADER_HANDLE.typed(),
shader: DEFERRED_LIGHTING_SHADER_HANDLE,
shader_defs: shader_defs.clone(),
entry_point: "vertex".into(),
buffers: Vec::new(),
},
fragment: Some(FragmentState {
shader: DEFERRED_LIGHTING_SHADER_HANDLE.typed(),
shader: DEFERRED_LIGHTING_SHADER_HANDLE,
shader_defs,
entry_point: "fragment".into(),
targets: vec![Some(ColorTargetState {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/pbr_material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ impl Material for StandardMaterial {
}

fn deferred_fragment_shader() -> ShaderRef {
PBR_SHADER_HANDLE.typed().into()
PBR_SHADER_HANDLE.into()
}

fn fragment_shader() -> ShaderRef {
Expand Down

0 comments on commit ec14655

Please sign in to comment.