File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,3 +12,5 @@ high_dpi : false
1212window_title : soluna
1313background : 0x4080c0
1414tmpbuffer_size : 0x20000
15+ text_sampler :
16+ max_anisotropy : 16
Original file line number Diff line number Diff line change @@ -530,6 +530,17 @@ lsampler(lua_State *L) {
530530 desc .mag_filter = read_enum (L , "mag_filter" , filter );
531531 desc .mipmap_filter = read_enum (L , "mipmap_filter" , filter );
532532
533+ if (lua_getfield (L , 1 , "max_anisotropy" ) == LUA_TNUMBER ) {
534+ int max_anisotropy = lua_tointeger (L , -1 );
535+ if (max_anisotropy > 0 ) {
536+ desc .min_filter = SG_FILTER_LINEAR ;
537+ desc .mag_filter = SG_FILTER_LINEAR ;
538+ desc .mipmap_filter = SG_FILTER_LINEAR ;
539+ desc .max_anisotropy = max_anisotropy ;
540+ }
541+ }
542+ lua_pop (L , 1 );
543+
533544 static struct enum_string wrap [] = {
534545 { "repeat" , SG_WRAP_REPEAT },
535546 { "edge" , SG_WRAP_CLAMP_TO_EDGE },
Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ local function render_init(arg)
290290 color0 = setting .background ,
291291 swapchain = true ,
292292 },
293- default_sampler = render .sampler { label = " texquad-sampler" },
293+ default_sampler = render .sampler { label = " texquad-sampler" , max_anisotropy = 16 },
294294 textures = {},
295295 font_texture = font_texture ,
296296 views = views ,
You can’t perform that action at this time.
0 commit comments