scope skybox

This commit is contained in:
Quaternions 2023-09-20 17:01:06 -07:00
parent 21835d13f6
commit 25e80a7c17

View File

@ -393,6 +393,7 @@ impl strafe_client::framework::Example for GraphicsData {
//load textures //load textures
let device_features = device.features(); let device_features = device.features();
let skybox_texture_view={
let skybox_format = if device_features.contains(wgpu::Features::TEXTURE_COMPRESSION_ASTC) { let skybox_format = if device_features.contains(wgpu::Features::TEXTURE_COMPRESSION_ASTC) {
log::info!("Using ASTC"); log::info!("Using ASTC");
wgpu::TextureFormat::Astc { wgpu::TextureFormat::Astc {
@ -458,11 +459,12 @@ impl strafe_client::framework::Example for GraphicsData {
&skybox_image.data, &skybox_image.data,
); );
let skybox_texture_view = skybox_texture.create_view(&wgpu::TextureViewDescriptor { skybox_texture.create_view(&wgpu::TextureViewDescriptor {
label: Some("Skybox Texture View"), label: Some("Skybox Texture View"),
dimension: Some(wgpu::TextureViewDimension::Cube), dimension: Some(wgpu::TextureViewDimension::Cube),
..wgpu::TextureViewDescriptor::default() ..wgpu::TextureViewDescriptor::default()
}); })
};
//squid //squid
let squid_texture_view={ let squid_texture_view={