#47
Texture LOD bias setting on top of the shader bias
Depends on #32 and #45. Until they merge, this branch also shows their commits; only the last two commits are new.
This adds the texture LOD bias setting that was in #32. It adds to the per-texture bias that #45 applies in fragment shaders, so it also works on Apple7 GPUs such as the M1, which ignore MTLSamplerDescriptor.lodBias.
- The setting is a slider from -2 to 2 under Graphics, on macOS and iOS, and
NX_LOD_BIAS=<-4 to 4>fornxhost. - It applies only to mipmapped 2D game textures, not to render targets or cube maps. The cube maps hold prefiltered lighting, and a bias of +2 on them turned the character's hair black.
Tests
cargo test --workspacepasses,./make-app.shbuilds the macOS app, and the iOS launcher sources passswiftc -typecheckwith the iOS SDK.- Tested on macOS (M1) with update 4.0.1 on Dragon Driftway: textures get blurrier at +0.5 to +2, and the character keeps its colors at +2. Values below 0 were not checked.
Activity
9This pull request is a draft
Merging is unavailable until it is marked ready for review.