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
GLTF and by extension GLB files support embedding various textures including data for PBR roughness and metallic channels. That data, however, is internally stored in a single GB texture (green is roughness, blue is metallic FWICT from looking at blender shader nodes). While raylib supports loading GLTF files, it simply puts the texture into its MATERIAL_MAP_ROUGHNESS slot.
Now, the question is, should this texture be separated into two textures on load-time? This would add to memory consumption, albeit only during loading, as the Images would be immediately deleted, and two R8 textures should take roughly the same VRAM as one RG8 texture (±overhead for metadata depending on the driver). Additionally, the process would take longer overall, just to copy all the data around (I can't think of any smart ways to separate these channels, either on the CPU or while uploading to the GPU). On the other hand, this would be much more inline with how raylib's material system is already designed, and be much less confusing when you first start out loading PBR models.
I understand the implications of such a change, and my use case would actually allow that I simply do this on my end, but I feel like this would also benefit other members of the raylib community. Any thoughts?
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
-
GLTF and by extension GLB files support embedding various textures including data for PBR roughness and metallic channels. That data, however, is internally stored in a single GB texture (green is roughness, blue is metallic FWICT from looking at blender shader nodes). While raylib supports loading GLTF files, it simply puts the texture into its
MATERIAL_MAP_ROUGHNESS
slot.Now, the question is, should this texture be separated into two textures on load-time? This would add to memory consumption, albeit only during loading, as the
Image
s would be immediately deleted, and two R8 textures should take roughly the same VRAM as one RG8 texture (±overhead for metadata depending on the driver). Additionally, the process would take longer overall, just to copy all the data around (I can't think of any smart ways to separate these channels, either on the CPU or while uploading to the GPU). On the other hand, this would be much more inline with how raylib's material system is already designed, and be much less confusing when you first start out loading PBR models.I understand the implications of such a change, and my use case would actually allow that I simply do this on my end, but I feel like this would also benefit other members of the raylib community. Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions