Primary aim is to fix TransformationSkinning.sdsl shader where skinning wasn't working on Android, due to mismatched data type being passed from app to shader. Due to dropping OpenGL ES 2, blend indices can now just behave like non-ES 2 versions (ie. just use uint data type, instead of using float).
Related Issue
Fixes #2284 where the background info/problem arose from.
Anyway, OpenGL ES3+ now supports int/uint data types, so the above no longer needs a workaround.
I have tested this on an Android project and the model is skinned properly now.
PR Details
Primary aim is to fix
TransformationSkinning.sdsl
shader where skinning wasn't working on Android, due to mismatched data type being passed from app to shader. Due to dropping OpenGL ES 2, blend indices can now just behave like non-ES 2 versions (ie. just useuint
data type, instead of usingfloat
).Related Issue
Fixes #2284 where the background info/problem arose from.
Here's my understanding of the original intention/code: OpenGL ES 2 did not support passing
int
/uint
data types, so needed a workaround to usefloat
instead. https://github.com/stride3d/stride/blob/1fc0d5137750a8c3d8acd5f89e3b63c75b6bea7f/sources/engine/Stride.Rendering/Rendering/Skinning/TransformationSkinning.sdsl#L28-L33 As seen in this code (and the comments I removed from theTransformationSkinning.sdsl
file), the workaround for ES 2 was supposed to be to usefloat4
.However, it turns out the importer only passed signed or unsigned integer types: https://github.com/stride3d/stride/blob/1fc0d5137750a8c3d8acd5f89e3b63c75b6bea7f/sources/tools/Stride.Importer.3D/MeshConverter.cs#L724-L753 This was still incorrect and should have been passing a float type. Side note: even though this file is the new importer, this bug goes all the way back to the original importer.
Anyway, OpenGL ES3+ now supports
int
/uint
data types, so the above no longer needs a workaround. I have tested this on an Android project and the model is skinned properly now.Types of changes
Checklist