Skip to content

Commit 31fe935

Browse files
[Rendering] WIP on SDLGPU transition;
1 parent f1d90b7 commit 31fe935

File tree

21 files changed

+331
-1510
lines changed

21 files changed

+331
-1510
lines changed

BuiltinResources/Hidden/Shaders/Default/SolidColor.shader

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ Type VertexFragment
22

33
Begin Parameters
44

5-
varying vec3 a_position : POSITION
65
uniform color mainColor
76

87
End Parameters
@@ -11,30 +10,37 @@ Begin Instancing
1110
End Instancing
1211

1312
Begin Vertex
14-
$input a_position
1513

16-
void main()
14+
struct Input
1715
{
18-
mat4 model = StapleModelMatrix;
16+
float3 Position : TEXCOORD0;
17+
};
1918

20-
#ifdef SKINNING
21-
model = StapleGetSkinningMatrix(model, a_indices, a_weight);
22-
#endif
19+
struct Output
20+
{
21+
float4 Position : SV_Position;
22+
}
23+
24+
Output main(Input input)
25+
{
26+
Output output;
27+
28+
float4x4 model = StapleModelMatrix;
2329

24-
mat4 projViewWorld = mul(mul(u_proj, u_view), model);
30+
float4x4 projViewWorld = mul(mul(u_proj, u_view), model);
2531

26-
vec4 v_pos = mul(projViewWorld, vec4(a_position, 1.0));
32+
float4 v_pos = mul(projViewWorld, float4(a_position, 1.0));
2733

28-
gl_Position = v_pos;
34+
output.position = v_pos;
2935
}
3036

3137
End Vertex
3238

3339
Begin Fragment
3440

35-
void main()
41+
float4 main() : SV_Target0
3642
{
37-
gl_FragColor = mainColor;
43+
return mainColor;
3844
}
3945

4046
End Fragment

BuiltinResources/Hidden/Shaders/testcompute.computeshader

Lines changed: 0 additions & 17 deletions
This file was deleted.

BuiltinResources/Hidden/Shaders/testcompute.computeshader.meta

Lines changed: 0 additions & 4 deletions
This file was deleted.
6.36 MB
Binary file not shown.
31.5 KB
Binary file not shown.
17.3 MB
Binary file not shown.
1.45 MB
Binary file not shown.
21.5 KB
Binary file not shown.
1.91 MB
Binary file not shown.

Engine/Staple.Core/Rendering/RenderSystem/Backend/Impls/SDLGPU/SDLGPURendererBackend.cs

Lines changed: 131 additions & 118 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)