Skip to content

Commit

Permalink
Fix equirectangular to cube texture generation on web
Browse files Browse the repository at this point in the history
  • Loading branch information
asny committed Feb 26, 2024
1 parent 9595a89 commit 06496c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/texture/texture_cube_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ impl TextureCubeMap {
context: &Context,
cpu_texture: &CpuTexture,
) -> Self {
let mut cpu_texture = cpu_texture.clone();
cpu_texture.mip_map_filter = None;
let texture_size = cpu_texture.width / 4;
let mut texture = Self::new_empty::<[T; 4]>(
context,
Expand All @@ -455,7 +457,7 @@ impl TextureCubeMap {
);

{
let map = Texture2D::new(context, cpu_texture);
let map = Texture2D::new(context, &cpu_texture);
let fragment_shader_source = "
uniform sampler2D equirectangularMap;
uniform vec3 direction;
Expand Down

0 comments on commit 06496c3

Please sign in to comment.