mirror of
https://github.com/raysan5/raylib.git
synced 2026-01-30 10:49:18 -05:00
[rmodels] Optional GPU skinning (#4321)
* Added optional GPU skinning * Added skinned bone matrices support for different file formats. * Moved new shader locations to end of enum to avoid breaking existing examples. Added gpu skinning on drawing of instanced meshes. * Added GPU skinning example. * Removed variable declaration to avoid shadowing warning.
This commit is contained in:
17
examples/models/resources/shaders/glsl330/skinning.fs
Normal file
17
examples/models/resources/shaders/glsl330/skinning.fs
Normal file
@ -0,0 +1,17 @@
|
||||
#version 330
|
||||
|
||||
// Input vertex attributes (from vertex shader)
|
||||
in vec2 fragTexCoord;
|
||||
in vec4 fragColor;
|
||||
|
||||
// Output fragment color
|
||||
out vec4 finalColor;
|
||||
|
||||
uniform sampler2D texture0;
|
||||
uniform vec4 colDiffuse;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 texelColor = texture(texture0, fragTexCoord);
|
||||
finalColor = texelColor*colDiffuse*fragColor;
|
||||
}
|
||||
Reference in New Issue
Block a user