You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Texture Usage is a useful property when you need/want to manipulate textures using buffer data or copying textures into each other. As it stands there doesn't seem to be a way to change the default TextureUsages on an Image asset loaded by the AssetServer
The idea here would just be to add a texture_usage property to the ImageLoaderSettings for use in AssetServer's load_with_settings
This would allow a user that wants to load textures off disk and change their usage without needing to create another system that tracks the asset event solely for this purpose. This also makes sense to add if the asset is intended to only be a render asset and not available in the standard Assets.
The texture_usage would be passed into the Image fn from_buffer call that is made in the ImageLoader similar to the setting for asset_usage. and applied at the end of the function before returning the image.
Trying to figure out if there is any reason this shouldn't be allowed. If not more than happy to make a PR for it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Texture Usage is a useful property when you need/want to manipulate textures using buffer data or copying textures into each other. As it stands there doesn't seem to be a way to change the default
TextureUsageson anImageasset loaded by theAssetServerThe idea here would just be to add a
texture_usageproperty to theImageLoaderSettingsfor use in AssetServer'sload_with_settingsThis would allow a user that wants to load textures off disk and change their usage without needing to create another system that tracks the asset event solely for this purpose. This also makes sense to add if the asset is intended to only be a render asset and not available in the standard Assets.
The
texture_usagewould be passed into theImagefnfrom_buffercall that is made in theImageLoadersimilar to the setting forasset_usage. and applied at the end of the function before returning the image.Trying to figure out if there is any reason this shouldn't be allowed. If not more than happy to make a PR for it.
Beta Was this translation helpful? Give feedback.
All reactions