This commit is contained in:
djaidjai committed 2026-09-13 15:18:05 +02:00
1 parent 92e77564dd
commit 5c6bf98f3e
13 files changed
+25 -20

No files matched your search

+2 -5
View File
@@ -1,10 +1,7 @@
use image::{DynamicImage, ImageReader};
use log::trace;
use crate::{
objects::hit::Hit,
vec3::Vec3,
};
use crate::{objects::hit::Hit, vec3::Vec3};
#[derive(Debug)]
pub struct Texture {
@@ -47,7 +44,7 @@ impl Texture {
}
fn _idx(&self, u: f32, v: f32) -> usize {
let x: usize = (u * ((self.width - 1) as f32)) as usize;
let x: usize = (u * ((self.width - 1) as f32)) as usize;
let y: usize = (v * ((self.height - 1) as f32)) as usize;
y * self.width as usize + x
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.