Fix sample hydration rendering regressions
This commit is contained in:
1 parent
06010c5922
commit
d52cc2e3b7
8 files changed
+193
-39
No files matched your search
@@ -6,6 +6,7 @@
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
|
||||
use bevy::material::OpaqueRendererMethod;
|
||||
use bevy::mesh::MeshVertexBufferLayoutRef;
|
||||
use bevy::pbr::{
|
||||
ExtendedMaterial, MaterialExtension, MaterialExtensionKey, MaterialExtensionPipeline,
|
||||
@@ -393,6 +394,9 @@ fn build_terrain_layer_material(
|
||||
base: StandardMaterial {
|
||||
base_color: Color::WHITE,
|
||||
perceptual_roughness: 1.0,
|
||||
// Terrain is intentionally absent from the Solari acceleration structure until its
|
||||
// ray-tracing evaluator exists, so keep the layer blend in the raster forward pass.
|
||||
opaque_render_method: OpaqueRendererMethod::Forward,
|
||||
..default()
|
||||
},
|
||||
extension,
|
||||
@@ -1079,6 +1083,10 @@ mod tests {
|
||||
assert_eq!(material.extension.uniform.uv_scales.y, 10.0);
|
||||
assert_eq!(material.extension.uniform.properties[0].w, 1.0);
|
||||
assert_eq!(material.extension.uniform.properties[1].w, 1.0);
|
||||
assert_eq!(
|
||||
material.base.opaque_render_method,
|
||||
OpaqueRendererMethod::Forward
|
||||
);
|
||||
assert_ne!(
|
||||
material.extension.uniform.base_colors[0],
|
||||
material.extension.uniform.base_colors[1]
|
||||
|
||||
Reference in new issue
Block a user