Quantcast
Channel: Latest Questions by aosome23
Viewing all articles
Browse latest Browse all 64

Switching Texture in Shader or Script

$
0
0
I want to write a shader that has couple different sets of textures. I am planning to use a property field, or maybe #define to switch witch texture should be used. Alternatively, I might use a script that references these textures and swap it out into the material when needed. The question is which approach is better in the two situations and why: -Being switched out constantly every couple seconds -Being switched out only sometimes. The reason why I am asking this is because I dont know if the textures get loaded into VRam if it is not used in the shader. If it does load all the textures referenced in the shader, it will be a big waste of memory bandwith I think? So in that case maybe using script is a better approach but its the same if it doesn't load it? Thank you

Viewing all articles
Browse latest Browse all 64

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>