Hello!
How to enable texture anisotropic filtering for specific objects via Castle Editor?
Hi!
This feature is not yet implemented. That is, you cannot control anisotropic filtering by any setting from CGE editor.
This feature is part of the roadmap, see Roadmap | Manual | Castle Game Engine – “(planned for 7.0) New material components (allowing also material editing in the editor)” . So it should happen soon, I want to do this before big 7.0 release.
For now, you can control anisotropic filtering manually, by using X3D node TTexturePropertiesNode
with AnisotropicDegree
value > 1. An example how to load a glTF file and then process it with Pascal code to enable anisotropic filtering for specific textures is on examples/viewport_and_scenes/anisotropic_filtering/anisotropic_filtering.dpr
, on GitHub :castle-engine/examples/viewport_and_scenes/anisotropic_filtering/anisotropic_filtering.dpr at master · castle-engine/castle-engine · GitHub . It is not comfortable (you have to run the project, cannot experiment with value in editor) but it does work for now
Thanks for answer!
I found this example before. Well looks like I will use via code method.
For me I made procedure to set anisotropic filtering for already loaded TCastleScene:
texturemanipulations.pas (1.5 KB)
sample usage:
SetAnisotropicFiltering(Scene.DesignedComponent(‘Body’) as TCastleScene, 8);
( Ignore the nonsense post from the spammer using ChatGPT in this thread that appeared here today. Removed. )