Skip to content

Commit e3a24f1

Browse files
[Rendering] Fixes to skinning;
[Rendering] Fixes to binding management; [Rendering] Fixed some issues with RenderStates not being properly filled; [Dependencies] Add SDL3-CS into a proper assembly due to NativeAOT;
1 parent 622d23b commit e3a24f1

File tree

400 files changed

+67624
-77
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+67624
-77
lines changed

BuiltinResources/Hidden/Shaders/Default/Standard.shader

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ Variants VERTEX_COLORS, LIT, HALF_LAMBERT, PER_VERTEX_LIGHTING, NORMALMAP, CUTOU
66

77
Begin Parameters
88

9-
float3 viewPosition;
109
texture ambientOcclusionTexture
11-
color diffuseColor = #FFFFFFFF
1210
texture diffuseTexture = WHITE
11+
variant: NORMALMAP texture normalTexture
1312
texture displacementTexture
14-
color emissiveColor
1513
texture emissiveTexture
1614
texture heightTexture
17-
variant: NORMALMAP texture normalTexture
18-
color specularColor
1915
texture specularTexture
20-
variant: CUTOUT float cutout
16+
float3 viewPosition;
17+
color diffuseColor = #FFFFFFFF
18+
color emissiveColor
19+
color specularColor
2120
float alphaThreshold = 0.25
21+
variant: CUTOUT float cutout
2222

2323
End Parameters
2424

@@ -143,10 +143,13 @@ Begin Fragment
143143
[[vk::binding(0, StapleSamplerStorageBufferSet)]]
144144
cbuffer Textures
145145
{
146+
Sampler2D ambientOcclusionTexture;
146147
Sampler2D diffuseTexture;
147-
#ifdef NORMALMAP
148148
Sampler2D normalTexture;
149-
#endif
149+
Sampler2D displacementTexture;
150+
Sampler2D emissiveTexture;
151+
Sampler2D heightTexture;
152+
Sampler2D specularTexture;
150153
};
151154

152155
[shader("fragment")]
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#region License
2+
/* Copyright (c) 2024-2025 Eduard Gushchin.
3+
*
4+
* This software is provided 'as-is', without any express or implied warranty.
5+
* In no event will the authors be held liable for any damages arising from
6+
* the use of this software.
7+
*
8+
* Permission is granted to anyone to use this software for any purpose,
9+
* including commercial applications, and to alter it and redistribute it
10+
* freely, subject to the following restrictions:
11+
*
12+
* 1. The origin of this software must not be misrepresented; you must not
13+
* claim that you wrote the original software. If you use this software in a
14+
* product, an acknowledgment in the product documentation would be
15+
* appreciated but is not required.
16+
*
17+
* 2. Altered source versions must be plainly marked as such, and must not be
18+
* misrepresented as being the original software.
19+
*
20+
* 3. This notice may not be removed or altered from any source distribution.
21+
*/
22+
#endregion
23+
24+
using System.Runtime.InteropServices;
25+
26+
namespace SDL3;
27+
28+
public partial class Image
29+
{
30+
/// <summary>
31+
/// Animated image support
32+
/// Currently only animated GIFs are supported.
33+
/// </summary>
34+
[StructLayout(LayoutKind.Sequential)]
35+
public struct Animation
36+
{
37+
/// <summary>
38+
/// The width of the frames
39+
/// </summary>
40+
public int W;
41+
42+
/// <summary>
43+
/// The height of the frames
44+
/// </summary>
45+
public int H;
46+
47+
/// <summary>
48+
/// The number of frames
49+
/// </summary>
50+
public int Count;
51+
52+
/// <summary>
53+
/// An array of frames
54+
/// </summary>
55+
public IntPtr Frames;
56+
57+
/// <summary>
58+
/// An array of frame delays, in milliseconds
59+
/// </summary>
60+
public IntPtr Delays;
61+
}
62+
}
63+
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#region License
2+
/* Copyright (c) 2024-2025 Eduard Gushchin.
3+
*
4+
* This software is provided 'as-is', without any express or implied warranty.
5+
* In no event will the authors be held liable for any damages arising from
6+
* the use of this software.
7+
*
8+
* Permission is granted to anyone to use this software for any purpose,
9+
* including commercial applications, and to alter it and redistribute it
10+
* freely, subject to the following restrictions:
11+
*
12+
* 1. The origin of this software must not be misrepresented; you must not
13+
* claim that you wrote the original software. If you use this software in a
14+
* product, an acknowledgment in the product documentation would be
15+
* appreciated but is not required.
16+
*
17+
* 2. Altered source versions must be plainly marked as such, and must not be
18+
* misrepresented as being the original software.
19+
*
20+
* 3. This notice may not be removed or altered from any source distribution.
21+
*/
22+
#endregion
23+
24+
namespace SDL3;
25+
26+
public partial class Image
27+
{
28+
/// <summary>
29+
/// An enum representing the status of an animation decoder.
30+
/// </summary>
31+
/// <since>This enum is available since SDL_image 3.4.0.</since>
32+
public enum AnimationDecoderStatus
33+
{
34+
/// <summary>
35+
/// The decoder is invalid
36+
/// </summary>
37+
Invalid = -1,
38+
39+
/// <summary>
40+
/// The decoder is ready to decode the next frame
41+
/// </summary>
42+
Ok,
43+
44+
/// <summary>
45+
/// The decoder failed to decode a frame, call <see cref="SDL.GetError"/> for more information.
46+
/// </summary>
47+
Failed,
48+
49+
/// <summary>
50+
/// No more frames available
51+
/// </summary>
52+
Complete
53+
}
54+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#region License
2+
/* Copyright (c) 2024-2025 Eduard Gushchin.
3+
*
4+
* This software is provided 'as-is', without any express or implied warranty.
5+
* In no event will the authors be held liable for any damages arising from
6+
* the use of this software.
7+
*
8+
* Permission is granted to anyone to use this software for any purpose,
9+
* including commercial applications, and to alter it and redistribute it
10+
* freely, subject to the following restrictions:
11+
*
12+
* 1. The origin of this software must not be misrepresented; you must not
13+
* claim that you wrote the original software. If you use this software in a
14+
* product, an acknowledgment in the product documentation would be
15+
* appreciated but is not required.
16+
*
17+
* 2. Altered source versions must be plainly marked as such, and must not be
18+
* misrepresented as being the original software.
19+
*
20+
* 3. This notice may not be removed or altered from any source distribution.
21+
*/
22+
#endregion
23+
24+
namespace SDL3;
25+
26+
/// <summary>
27+
/// <para>SDL_image: An example image loading library for use with SDL
28+
/// Copyright (C) 1997-2024 Sam Lantinga [email protected]</para>
29+
/// <para>This software is provided 'as-is', without any express or implied
30+
/// warranty. In no event will the authors be held liable for any damages
31+
/// arising from the use of this software.</para>
32+
/// <para>Permission is granted to anyone to use this software for any purpose,
33+
/// including commercial applications, and to alter it and redistribute it
34+
/// freely, subject to the following restrictions:</para>
35+
/// <list type="numeric">
36+
/// <item>1. The origin of this software must not be misrepresented; you must not
37+
/// claim that you wrote the original software. If you use this software
38+
/// in a product, an acknowledgment in the product documentation would be
39+
/// appreciated but is not required.</item>
40+
/// <item>2. Altered source versions must be plainly marked as such, and must not be
41+
/// misrepresented as being the original software.</item>
42+
/// <item>3. This notice may not be removed or altered from any source distribution.</item>
43+
/// </list>
44+
/// </summary>
45+
public partial class Image
46+
{
47+
private const string ImageLibrary = "SDL3_image";
48+
}

0 commit comments

Comments
 (0)