dialog WIP paths consolidation and rendering

This commit is contained in:
Jonas H
2026-03-28 10:34:19 +01:00
parent 4c3ebca96e
commit 11b31169b1
70 changed files with 2658 additions and 485 deletions

View File

@@ -6,6 +6,7 @@ use wgpu::util::DeviceExt;
use crate::{
loaders::mesh::{InstanceRaw, Mesh, Vertex},
paths,
render::{self, DrawCall, Pipeline},
texture::HeightmapTexture,
};
@@ -23,8 +24,8 @@ impl SnowConfig
pub fn default() -> Self
{
Self {
depth_map_path: "textures/snow_depth.exr".to_string(),
heightmap_path: "textures/terrain_heightmap.exr".to_string(),
depth_map_path: paths::textures::snow_depth(),
heightmap_path: paths::textures::terrain_heightmap(),
terrain_size: Vec2::new(1000.0, 1000.0),
resolution: (1000, 1000),
}
@@ -300,7 +301,7 @@ impl SnowLayer
) -> (wgpu::ComputePipeline, wgpu::BindGroup, wgpu::Buffer)
{
render::with_device(|device| {
let shader_source = std::fs::read_to_string("src/shaders/snow_deform.wgsl")
let shader_source = std::fs::read_to_string(&paths::shaders::snow_deform())
.expect("Failed to load snow deform shader");
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {