mirror of
https://github.com/scurest/apicula.git
synced 2025-06-18 22:55:33 -04:00
glTF: use NEAREST texture filtering
This commit is contained in:
parent
27274e8324
commit
4f1c282314
@ -72,9 +72,11 @@ pub fn to_gltf(
|
||||
gltf
|
||||
}
|
||||
|
||||
// glTF constants
|
||||
static UNSIGNED_BYTE: u32 = 5121;
|
||||
static UNSIGNED_SHORT: u32 = 5123;
|
||||
static FLOAT: u32 = 5126;
|
||||
static NEAREST: u32 = 9728;
|
||||
|
||||
fn mesh(ctx: &Ctx, gltf: &mut GlTF) {
|
||||
let verts = &ctx.prims.vertices;
|
||||
@ -990,6 +992,8 @@ fn materials(ctx: &Ctx, gltf: &mut GlTF) {
|
||||
object!(
|
||||
"wrapS" => wrap(desc.wrap_s),
|
||||
"wrapT" => wrap(desc.wrap_t),
|
||||
"magFilter" => NEAREST,
|
||||
"minFilter" => NEAREST,
|
||||
)
|
||||
}).collect::<Vec<JsonValue>>().into();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user