Lyall / HundredHeroesFix

A BepInEx plugin for Eiyuden Chronicle: Hundred Heroes that adds custom resolutions, ultrawide/narrower support and more.
MIT License
24 stars 4 forks source link

Anisotropic Filtering Options (x16 & NEGATIVE LOD BIAS) #6

Closed shinra358 closed 6 months ago

shinra358 commented 6 months ago

Increasing renderscale can tax your pc greatly. However, one could use a lower scale if anisotropic filtering was enabled with the option of NEGATIVE LOD BIAS CLAMP which greatly helps to eliminate shimmering at lower resolutions while maintaining higher resolution like fidelity. So can we have these 2 options?

Lyall commented 6 months ago

I can add anisotropic filtering but for LOD bias I'm assuming you mean texture mipmap bias? There's an actual setting in Unity called LOD Bias but it's not for mips if I'm remembering correctly.

shinra358 commented 6 months ago

usually negative lod bias clamp is associated with anisotropic filtering.

https://forums.guru3d.com/threads/question-about-texture-filtering-negative-lod-bias.338141/

https://github.com/doitsujin/dxvk/issues/2779

shinra358 commented 6 months ago

it seems to be the same thing. determines to strip the level of detail in the far distance depending on the setting freeing up resource. clamp prevents it from going into the negative

Lyall commented 6 months ago

It seems like you can adjust the mipmap bias value but it's per-texture, not a global setting at least based on what I can find in the Unity docs. So I don't think it's something I can add to the mod like I did with anisotropic filtering. Perhaps an alternative would be to apply it via Nvidia Profile Inspector if you're using an Nvidia GPU.

shinra358 commented 6 months ago

im on amd and dvxk doesnt seem to work on this game. doh

shinra358 commented 6 months ago

what about those?

https://docs.unity3d.com/ScriptReference/QualitySettings-lodBias.html https://docs.unity3d.com/ScriptReference/QualitySettings.SetLODSettings.html

Lyall commented 6 months ago

Those aren't related to mipmap LOD bias, they're for adjusting the distance at which switching to different LODs for models etc occurs.

shinra358 commented 6 months ago

yes that's it. that's what i explained in post 4. the mipmap one wasnt what i was looking for.

https://melantechgaming.wordpress.com/2016/12/31/lod-bias/#:~:text=To%20simply%20explain%20LOD%20bias,so%20overall%20textures%20look%20sharper.

Lyall commented 6 months ago

yes that's it. that's what i explained in post 4. the mipmap one wasnt what i was looking for.

https://melantechgaming.wordpress.com/2016/12/31/lod-bias/#:~:text=To%20simply%20explain%20LOD%20bias,so%20overall%20textures%20look%20sharper.

I think we're maybe going round in a circles a bit here. What you just posted is specifically LOD bias for textures. The LOD bias option you linked to in this post is LOD bias for models.

Anyway since we're definitely talking about LOD bias in relation to textures, as I said before, I don't believe there's an option in Unity to set it globally thus I cannot add it to this mod.

shinra358 commented 6 months ago

ok

shinra358 commented 6 months ago

before you close this out, can we get 2 more notches in the Renderscale (6 total) and the option to hide the mouse cursor after 2 secs of keyboard idling (controller unaffected) {yes i know there is the hide completely option}, and a 0 option for aniso just in case someone doesnt want to use it?

I figure work was already done for those so i dont want to clutter the boards with making new threads.

Lyall commented 6 months ago

before you close this out, can we get 2 more notches in the Renderscale (6 total) and the option to hide the mouse cursor after 2 secs of keyboard idling (controller unaffected) {yes i know there is the hide completely option}, and a 0 option for aniso just in case someone doesnt want to use it?

I figure work was already done for those so i dont want to clutter the boards with making new threads.

Regarding renderScale, I actually made an incorrect assumption with my values there. It's actually clamped from 0.1f to 2.0f. You can't go higher than that and the maxRenderScale value is read-only.

As for anisotropic filtering, 1 is the lowest option. It's a multiplier so x1 is just that, the original value.

And for the mouse cursor idle question. I'd have to poll the mouse input constantly which is a bit of a pain and it adds some extra overhead. Frankly not really worth the effort (sorry!).