Skip to content

Commit 2b97a16

Browse files
authored
Merge pull request #15 from AstroOrbis/main
Build fixes and QOL
2 parents 0544654 + 54628d8 commit 2b97a16

115 files changed

Lines changed: 8911 additions & 3329 deletions

File tree

Some content is hidden

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

‎.config/dotnet-tools.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"csharpier": {
6+
"version": "1.3.0",
7+
"commands": [
8+
"csharpier"
9+
],
10+
"rollForward": false
11+
}
12+
}
13+
}

‎.csharpierignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# only format our own code
2+
Cafe-Shader-Studio/
3+
4+
# Build artifacts
5+
**/bin/
6+
**/obj/

‎.gitattributes‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# autonormalize, and checkout as native
2+
* text=auto
3+
4+
# these will break with crlf
5+
*.sh text eol=lf
6+
*.nix text eol=lf
7+
*.lock text eol=lf
8+
9+
# These are binaries
10+
*.dll binary
11+
*.exe binary
12+
*.pdb binary
13+
*.so binary
14+
*.dylib binary
15+
*.zip binary
16+
*.dds binary
17+
*.png binary
18+
*.jpg binary
19+
*.jpeg binary
20+
*.bmp binary
21+
*.tif binary
22+
*.ico binary
23+
*.ttf binary
24+
*.otf binary
25+
*.wav binary
26+
*.ogg binary
27+
*.bin binary
28+
*.bfres binary
29+
*.szs binary
30+
*.sarc binary

‎.github/workflows/build.yml‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: '10.0.x'
20+
21+
- name: Restore
22+
run: dotnet restore PlayerViewer/PlayerViewer.csproj
23+
24+
- name: Publish
25+
run: >
26+
dotnet publish PlayerViewer/PlayerViewer.csproj
27+
-c Release
28+
-r win-x64
29+
--self-contained true
30+
-p:PublishSingleFile=true
31+
-o publish
32+
33+
- name: Upload artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: PlayerViewer-win-x64
37+
path: publish
38+
if-no-files-found: error

‎.gitignore‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
bin/
22
obj/
3+
# nix
4+
result
5+
result-*
6+
.direnv/
7+
# dotnet publish output / local nuget cache
8+
publish/
9+
.nuget/
310
.vs/
411
.vscode/
512
.cursor/

‎Cafe-Shader-Studio/AGraphicsLibrary/AGraphicsLibrary.csproj‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netstandard2.1</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Platforms>AnyCPU;x86</Platforms>
66
</PropertyGroup>
77

@@ -22,23 +22,21 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
25+
<PackageReference Include="System.Drawing.Common" Version="8.0.0" PrivateAssets="all" />
2626
</ItemGroup>
2727

2828
<ItemGroup>
2929
<ProjectReference Include="..\GLFrameworkEngine\GLFrameworkEngine.csproj" />
3030
</ItemGroup>
31-
31+
3232
<ItemGroup>
3333
<Reference Include="AampLibraryCSharp">
3434
<HintPath>..\CafeShaderStudio\Lib\AampLibraryCSharp.dll</HintPath>
3535
</Reference>
3636
<Reference Include="BfresLibrary">
3737
<HintPath>..\BfresEditor\Lib\BfresLibrary.dll</HintPath>
3838
</Reference>
39-
<Reference Include="OpenTK">
40-
<HintPath>..\CafeShaderStudio\Lib\OpenTK.dll</HintPath>
41-
</Reference>
39+
<PackageReference Include="OpenTK" Version="3.1.0" />
4240
<Reference Include="Syroot.BinaryData">
4341
<HintPath>..\CafeShaderStudio\Lib\Syroot.BinaryData.dll</HintPath>
4442
</Reference>
@@ -49,5 +47,5 @@
4947
<HintPath>..\CafeShaderStudio\Lib\Toolbox.Core.dll</HintPath>
5048
</Reference>
5149
</ItemGroup>
52-
53-
</Project>
50+
51+
</Project>

‎Cafe-Shader-Studio/BfresEditor/Bfres/Render/SPL3/HoianNXRender.cs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public override void ReloadRenderState(BfresMeshAsset mesh)
448448
mesh.Pass = Pass.TRANSPARENT;
449449

450450
//Materials that sample the game framebuffer (gsys_enable_color_buffer=1)
451-
//must render in the transparent pass so the pipeline can capture the
451+
//must render in the transparent pass so the pipeline can capture the
452452
//framebuffer between passes.
453453
bool usesFramebuffer =
454454
(mat.ShaderOptions.TryGetValue("gsys_enable_color_buffer", out string ecb) && ecb == "1");
@@ -967,9 +967,9 @@ public static void InitTextures()
967967
if (WhiteTexture != null)
968968
return;
969969

970-
WhiteTexture = GLTexture2D.FromBitmap(Resources.white);
971-
BlackTexture = GLTexture2D.FromBitmap(Resources.black);
972-
WhiteArrayTexture = GLTexture2DArray.FromBitmap(Resources.white);
970+
WhiteTexture = GLTexture2D.FromRgba(new byte[] { 255, 255, 255, 255 }, 1, 1);
971+
BlackTexture = GLTexture2D.FromRgba(new byte[] { 0, 0, 0, 255 }, 1, 1);
972+
WhiteArrayTexture = GLTexture2DArray.FromRgba(new byte[] { 255, 255, 255, 255 }, 1, 1);
973973
CubemapTexture = GLTextureCube.FromDDS(new DDS(new MemoryStream(Resources.CubemapLightmap)));
974974
BrdfTexture = GLTexture2D.FromGeneric(new DDS(new MemoryStream(Resources.brdf)), new ImageParameters());
975975
FlipTextureY(BrdfTexture);

‎Cafe-Shader-Studio/BfresEditor/BfresEditor.csproj‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<Platforms>AnyCPU;x64;x86</Platforms>
66
<AssemblyName>BfresEditor</AssemblyName>
77
</PropertyGroup>
@@ -30,8 +30,11 @@
3030
</PropertyGroup>
3131

3232
<ItemGroup>
33-
<PackageReference Include="System.Drawing.Common" Version="5.0.2" />
33+
<!-- Cold in PlayerViewer; PrivateAssets stops SDC flowing to its output (CSS refs it directly). -->
34+
<PackageReference Include="System.Drawing.Common" Version="8.0.0" PrivateAssets="all" />
3435
<PackageReference Include="System.Resources.Extensions" Version="6.0.0-preview.1.21102.12" />
36+
<!-- Managed zstd (ZSTB.cs); replaces ZstdNet + its libzstd native. Flows to consumers. -->
37+
<PackageReference Include="ZstdSharp.Port" Version="0.8.8" />
3538
</ItemGroup>
3639

3740
<ItemGroup>
@@ -54,9 +57,7 @@
5457
<Reference Include="LZ4.Frame">
5558
<HintPath>..\CafeShaderStudio\Lib\LZ4.Frame.dll</HintPath>
5659
</Reference>
57-
<Reference Include="OpenTK">
58-
<HintPath>..\CafeShaderStudio\Lib\OpenTK.dll</HintPath>
59-
</Reference>
60+
<PackageReference Include="OpenTK" Version="3.1.0" />
6061
<Reference Include="Ryujinx.Common">
6162
<HintPath>..\CafeShaderStudio\Lib\Ryujinx.Common.dll</HintPath>
6263
</Reference>
@@ -78,9 +79,6 @@
7879
<Reference Include="TrackStudioLibrary">
7980
<HintPath>..\CafeShaderStudio\Lib\TrackStudioLibrary.dll</HintPath>
8081
</Reference>
81-
<Reference Include="ZstdNet">
82-
<HintPath>..\CafeShaderStudio\Lib\ZstdNet.dll</HintPath>
83-
</Reference>
8482
</ItemGroup>
8583

8684
<ItemGroup>
-173 KB
Binary file not shown.
-43.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)